tellform/public/dist/vendor.min.js

61 lines
1.8 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}if(function(global,factory){"object"==typeof module&&"object"==typeof module.exports?module.exports=global.document?factory(global,!0):function(w){if(!w.document)throw new Error("jQuery requires a window with a document");return factory(w)}:factory(global)}("undefined"!=typeof window?window:this,function(window,noGlobal){function DOMEval(code,doc){doc=doc||document;var script=doc.createElement("script");script.text=code,doc.head.appendChild(script).parentNode.removeChild(script)}function isArrayLike(obj){var length=!!obj&&"length"in obj&&obj.length,type=jQuery.type(obj);return"function"!==type&&!jQuery.isWindow(obj)&&("array"===type||0===length||"number"==typeof length&&length>0&&length-1 in obj)}function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier))return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not});if(qualifier.nodeType)return jQuery.grep(elements,function(elem){return elem===qualifier!==not});if("string"==typeof qualifier){if(risSimple.test(qualifier))return jQuery.filter(qualifier,elements,not);qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not&&1===elem.nodeType})}function sibling(cur,dir){for(;(cur=cur[dir])&&1!==cur.nodeType;);return cur}function createOptions(options){var object={};return jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=!0}),object}function Identity(v){return v}function Thrower(ex){throw ex}function adoptValue(value,resolve,reject){var method;try{value&&jQuery.isFunction(method=value.promise)?method.call(value).done(resolve).fail(reject):value&&jQuery.isFunction(method=value.then)?method.call(value,resolve,reject):resolve.call(void 0,value)}catch(value){reject.call(void 0,value)}}function completed(){document.removeEventListener("DOMContentLoaded",completed),window.removeEventListener("load",completed),jQuery.ready()}function Data(){this.expando=jQuery.expando+Data.uid++}function dataAttr(elem,key,data){var name;if(void 0===data&&1===elem.nodeType)if(name="data-"+key.replace(rmultiDash,"-$&").toLowerCase(),data=elem.getAttribute(name),"string"==typeof data){try{data="true"===data||"false"!==data&&("null"===data?null:+data+""===data?+data:rbrace.test(data)?JSON.parse(data):data)}catch(e){}dataUser.set(elem,key,data)}else data=void 0;return data}function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale=1,maxIterations=20,currentValue=tween?function(){return tween.cur()}:function(){return jQuery.css(elem,prop,"")},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),initialInUnit=(jQuery.cssNumber[prop]||"px"!==unit&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){unit=unit||initialInUnit[3],valueParts=valueParts||[],initialInUnit=+initial||1;do scale=scale||".5",initialInUnit/=scale,jQuery.style(elem,prop,initialInUnit+unit);while(scale!==(scale=currentValue()/initial)&&1!==scale&&--maxIterations)}return valueParts&&(initialInUnit=+initialInUnit||+initial||0,adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2],tween&&(tween.unit=unit,tween.start=initialInUnit,tween.end=adjusted)),adjusted}function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];return display?display:(temp=doc.body.appendChild(doc.createElement(nodeName)),display=jQuery.css(temp,"display"),temp.parentNode.removeChild(temp),"none"===display&&(display="block"),defaultDisplayMap[nodeName]=display,display)}function showHide(elements,show){for(var display,elem,values=[],index=0,length=elements.length;index<length;index++)elem=elements[index],elem.style&&(display=elem.style.display,show?("none"===display&&(values[index]=dataPriv.get(elem,"display")||null,values[index]||(elem.style.display="")),""===elem.style.display&&isHiddenWithinTree(elem)&&(values[index]=getDefaultDisplay(elem))):"none"!==display&&(values[index]="none",dataPriv.set(elem,"display",display)));for(index=0;index<length;index++)null!=values[index]&&(elements[index].style.display=values[index]);return elements}function getAll(context,tag){var ret="undefined"!=typeof context.getElementsByTagName?context.getElementsByTagName(tag||"*"):"undefined"!=typeof context.querySelectorAll?context.querySelectorAll(tag||"*"):[];return void 0===tag||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],ret):ret}function setGlobalEval(elems,refElements){for(var i=0,l=elems.length;i<l;i++)dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"))}function buildFragment(elems,context,scripts,selection,ignored){for(var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;i<l;i++)if(elem=elems[i],elem||0===elem)if("object"===jQuery.type(elem))jQuery.merge(nodes,elem.nodeType?[elem]:elem);else if(rhtml.test(elem)){for(tmp=tmp||fragment.appendChild(context.createElement("div")),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;jQuery.merge(nodes,tmp.childNodes),tmp=fragment.firstChild,tmp.textContent=""}else nodes.push(context.createTextNode(elem));for(fragment.textContent="",i=0;elem=nodes[i++];)if(selection&&jQuery.inArray(elem,selection)>-1)ignored&&ignored.push(elem);else if(contains=jQuery.contains(elem.ownerDocument,elem),tmp=getAll(fragment.appendChild(elem),"script"),contains&&setGlobalEval(tmp),scripts)for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);return fragment}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(err){}}function on(elem,types,selector,data,fn,one){var origFn,type;if("object"==typeof types){"string"!=typeof selector&&(data=data||selector,selector=void 0);for(type in types)on(elem,type,selector,data,types[type],one);return elem}if(null==data&&null==fn?(fn=selector,data=selector=void 0):null==fn&&("string"==typeof selector?(fn=data,data=void 0):(fn=data,data=selector,selector=void 0)),fn===!1)fn=returnFalse;else if(!fn)return elem;return 1===one&&(origFn=fn,fn=function(event){return jQuery().off(event),origFn.apply(this,arguments)},fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)),elem.each(function(){jQuery.event.add(this,types,fn,data,selector)})}function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(11!==content.nodeType?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem:elem}function disableScript(elem){return elem.type=(null!==elem.getAttribute("type"))+"/"+elem.type,elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);return match?elem.type=match[1]:elem.removeAttribute("type"),elem}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,pdataCur,udataOld,udataCur,events;if(1===dest.nodeType){if(dataPriv.hasData(src)&&(pdataOld=dataPriv.access(src),pdataCur=dataPriv.set(dest,pdataOld),events=pdataOld.events)){delete pdataCur.handle,pdataCur.events={};for(type in events)for(i=0,l=events[type].length;i<l;i++)jQuery.event.add(dest,type,events[type][i])}dataUser.hasData(src)&&(udataOld=dataUser.access(src),udataCur=jQuery.extend({},udataOld),dataUser.set(dest,udataCur))}}function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();"input"===nodeName&&rcheckableType.test(src.type)?dest.checked=src.checked:"input"!==nodeName&&"textarea"!==nodeName||(dest.defaultValue=src.defaultValue)}function domManip(collection,args,callback,ignored){args=concat.apply([],args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||l>1&&"string"==typeof value&&!support.checkClone&&rchecked.test(value))return collection.each(function(index){var self=collection.eq(index);isFunction&&(args[0]=value.call(this,index,self.html())),domManip(self,args,callback,ignored)});if(l&&(fragment=buildFragment(args,collection[0].ownerDocument,!1,collection,ignored),first=fragment.firstChild,1===fragment.childNodes.length&&(fragment=first),first||ignored)){for(scripts=jQuery.map(getAll(fragment,"script"),disableScript),hasScripts=scripts.length;i<l;i++)node=fragment,i!==iNoClone&&(node=jQuery.clone(node,!0,!0),hasScripts&&jQuery.merge(scripts,getAll(node,"script"))),callback.call(collection[i],node,i);if(hasScripts)for(doc=scripts[scripts.length-1].ownerDocument,jQuery.map(scripts,restoreScript),i=0;i<hasScripts;i++)node=scripts[i],rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)&&(node.src?jQuery._evalUrl&&jQuery._evalUrl(node.src):DOMEval(node.textContent.replace(rcleanScript,""),doc))}return collection}function remove(elem,selector,keepData){for(var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;null!=(node=nodes[i]);i++)keepData||1!==node.nodeType||jQuery.cleanData(getAll(node)),node.parentNode&&(keepData&&jQuery.contains(node.ownerDocument,node)&&setGlobalEval(getAll(node,"script")),node.parentNode.removeChild(node));return elem}function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;return computed=computed||getStyles(elem),computed&&(ret=computed.getPropertyValue(name)||computed[name],""!==ret||jQuery.contains(elem.ownerDocument,elem)||(ret=jQuery.style(elem,name)),!support.pixelMarginRight()&&rnumnonpx.test(ret)&&rmargin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),void 0!==ret?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){return conditionFn()?void delete this.get:(this.get=hookFn).apply(this,arguments)}}}function vendorPropName(name){if(name in emptyStyle)return name;for(var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;i--;)if(name=cssPrefixes[i]+capName,name in emptyStyle)return name}function setPositiveNumber(elem,value,subtract){var matches=rcssNum.exec(value);return matches?Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){for(var i=extra===(isBorderBox?"border":"content")?4:"width"===name?1:0,val=0;i<4;i+=2)"margin"===extra&&(val+=jQuery.css(elem,extra+cssExpand[i],!0,styles)),isBorderBox?("content"===extra&&(val-=jQuery.css(elem,"padding"+cssExpand[i],!0,styles)),"margin"!==extra&&(val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles))):(val+=jQuery.css(elem,"padding"+cssExpand[i],!0,styles),"padding"!==extra&&(val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles)));return val}function getWidthOrHeight(elem,name,extra){var val,valueIsBorderBox=!0,styles=getStyles(elem),isBorderBox="border-box"===jQuery.css(elem,"boxSizing",!1,styles);if(elem.getClientRects().length&&(val=elem.getBoundingClientRect()[name]),val<=0||null==val){if(val=curCSS(elem,name,styles),(val<0||null==val)&&(val=elem.style[name]),rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]),val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}function raf(){timerId&&(window.requestAnimationFrame(raf),jQuery.fx.tick())}function createFxNow(){return window.setTimeout(function(){fxNow=void 0}),fxNow=jQuery.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};for(includeWidth=includeWidth?1:0;i<4;i+=2-includeWidth)which=cssExpand[i],attrs["margin"+which]=attrs["padding"+which]=type;return includeWidth&&(attrs.opacity=attrs.width=type),attrs}function createTween(value,prop,animation){for(var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;index<length;index++)if(tween=collection[index].call(animation,prop,value))return tween}function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");opts.queue||(hooks=jQuery._queueHooks(elem,"fx"),null==hooks.unqueued&&(hooks.unqueued=0,oldfire=hooks.empty.fire,hooks.empty.fire=function(){hooks.unqueued||oldfire()}),hooks.unqueued++,anim.always(function(){anim.always(function(){hooks.unqueued--,jQuery.queue(elem,"fx").length||hooks.empty.fire()})}));for(prop in props)if(value=props[prop],rfxtypes.test(value)){if(delete props[prop],toggle=toggle||"toggle"===value,value===(hidden?"hide":"show")){if("show"!==value||!dataShow||void 0===dataShow[prop])continue;hidden=!0}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}if(propTween=!jQuery.isEmptyObject(props),propTween||!jQuery.isEmptyObject(orig)){isBox&&1===elem.nodeType&&(opts.overflow=[style.overflow,style.overflowX,style.overflowY],restoreDisplay=dataShow&&dataShow.display,null==restoreDisplay&&(restoreDisplay=dataPriv.get(elem,"display")),display=jQuery.css(elem,"display"),"none"===display&&(restoreDisplay?display=restoreDisplay:(showHide([elem],!0),restoreDisplay=elem.style.display||restoreDisplay,display=jQuery.css(elem,"display"),showHide([elem]))),("inline"===display||"inline-block"===display&&null!=restoreDisplay)&&"none"===jQuery.css(elem,"float")&&(propTween||(anim.done(function(){style.display=restoreDisplay}),null==restoreDisplay&&(display=style.display,restoreDisplay="none"===display?"":display)),style.display="inline-block")),opts.overflow&&(style.overflow="hidden",anim.always(function(){style.overflow=opts.overflow[0],style.overflowX=opts.overflow[1],style.overflowY=opts.overflow[2]})),propTween=!1;for(prop in orig)propTween||(dataShow?"hidden"in dataShow&&(hidden=dataShow.hidden):dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay}),toggle&&(dataShow.hidden=!hidden),hidden&&showHide([elem],!0),anim.done(function(){hidden||showHide([elem]),dataPriv.remove(elem,"fxshow");for(prop in orig)jQuery.style(elem,prop,orig[prop])})),propTween=createTween(hidden?dataShow[prop]:0,prop,anim),prop in dataShow||(dataShow[prop]=propTween.start,hidden&&(propTween.end=propTween.start,propTween.start=0))}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props)if(name=jQuery.camelCase(index),easing=specialEasing[name],value=props[index],jQuery.isArray(value)&&(easing=value[1],value=props[index]=value[0]),index!==name&&(props[name]=value,delete props[index]),hooks=jQuery.cssHooks[name],hooks&&"expand"in hooks){value=hooks.expand(value),delete props[name];for(index in value)index in props||(props[index]=value[index],specialEasing[index]=easing)}else specialEasing[name]=easing}function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped)return!1;for(var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;index<length;index++)animation.tweens[index].run(percent);return deferred.notifyWith(elem,[animation,percent,remaining]),percent<1&&length?remaining:(deferred.resolveWith(elem,[animation]),!1)},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(!0,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);return animation.tweens.push(tween),tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped)return this;for(stopped=!0;index<length;index++)animation.tweens[index].run(1);return gotoEnd?(deferred.notifyWith(elem,[animation,1,0]),deferred.resolveWith(elem,[animation,gotoEnd])):deferred.rejectWith(elem,[animation,gotoEnd]),this}}),props=animation.props;for(propFilter(props,animation.opts.specialEasing);index<length;index++)if(result=Animation.prefilters[index].call(animation,elem,props,animation.opts))return jQuery.isFunction(result.stop)&&(jQuery._queueHooks(animation.elem,animation.opts.queue).stop=jQuery.proxy(result.stop,result)),result;return jQuery.map(props,createTween,animation),jQuery.isFunction(animation.opts.start)&&animation.opts.start.call(elem,animation),jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue})),animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)}function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||""}function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj))jQuery.each(obj,function(i,v){traditional||rbracket.test(prefix)?add(prefix,v):buildParams(prefix+"["+("object"==typeof v&&null!=v?i:"")+"]",v,traditional,add)});else if(traditional||"object"!==jQuery.type(obj))add(prefix,obj);else for(name in obj)buildParams(prefix+"["+name+"]",obj[name],traditional,add)}function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){"string"!=typeof dataTypeExpression&&(func=dataTypeExpression,dataTypeExpression="*");var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func))for(;dataType=dataTypes[i++];)"+"===dataType[0]?(dataType=dataType.slice(1)||"*",(structure[dataType]=structure[dataType]||[]).unshift(func)):(structure[dataType]=structure[dataType]||[]).push(func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){function inspect(dataType){var selected;return inspected[dataType]=!0,jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);return"string"!=typeof dataTypeOrTransport||seekingTransport||inspected[dataTypeOrTransport]?seekingTransport?!(selected=dataTypeOrTransport):void 0:(options.dataTypes.unshift(dataTypeOrTransport),inspect(dataTypeOrTransport),!1)}),selected}var inspected={},seekingTransport=structure===transports;return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src)void 0!==src[key]&&((flatOptions[key]?target:deep||(deep={}))[key]=src[key]);return deep&&jQuery.extend(!0,target,deep),target}function ajaxHandleResponses(s,jqXHR,responses){for(var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;"*"===dataTypes[0];)dataTypes.shift(),void 0===ct&&(ct=s.mimeType||jqXHR.getResponseHeader("Content-Type"));if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}if(dataTypes[0]in responses)finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}firstDataType||(firstDataType=type)}finalDataType=finalDataType||firstDataType}if(finalDataType)return finalDataType!==dataTypes[0]&&dataTypes.unshift(finalDataType),responses[finalDataType]}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];for(current=dataTypes.shift();current;)if(s.responseFields[current]&&(jqXHR[s.responseFields[current]]=response),!prev&&isSuccess&&s.dataFilter&&(response=s.dataFilter(response,s.dataType)),prev=current,current=dataTypes.shift())if("*"===current)current=prev;else if("*"!==prev&&prev!==current){if(conv=converters[prev+" "+current]||converters["* "+current],!conv)for(conv2 in converters)if(tmp=conv2.split(" "),tmp[1]===current&&(conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]])){conv===!0?conv=converters[conv2]:converters[conv2]!==!0&&(current=tmp[0],dataTypes.unshift(tmp[1]));break}if(conv!==!0)if(conv&&s["throws"])response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}return{state:"success",data:response}}function getWindow(elem){return jQuery.isWindow(elem)?elem:9===elem.nodeType&&elem.defaultView}var arr=[],document=window.document,getProto=Object.getPrototypeOf,slice=arr.slice,concat=arr.concat,push=arr.push,indexOf=arr.indexOf,class2type={},toString=class2type.toString,hasOwn=class2type.hasOwnProperty,fnToString=hasOwn.toString,ObjectFunctionString=fnToString.call(Object),support={},version="3.1.0",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,length:0,toArray:function(){return slice.call(this)},get:function(num){return null!=num?num<0?this[num+this.length]:this[num]:slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);return ret.prevObject=this,ret},each:function(callback){return jQuery.each(this,callback)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[])},end:function(){return this.prevObject||this.constructor()},push:push,sort:arr.sort,splice:arr.splice},jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=!1;for("boolean"==typeof target&&(deep=target,target=arguments[i]||{},i++),"object"==typeof target||jQuery.isFunction(target)||(target={}),i===length&&(target=this,i--);i<length;i++)if(null!=(options=arguments[i]))for(name in options)src=target[name],copy=options[name],target!==copy&&(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))?(copyIsArray?(copyIsArray=!1,clone=src&&jQuery.isArray(src)?src:[]):clone=src&&jQuery.isPlainObject(src)?src:{},target[name]=jQuery.extend(deep,clone,copy)):void 0!==copy&&(target[name]=copy));return target},jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:!0,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return"function"===jQuery.type(obj)},isArray:Array.isArray,isWindow:function(obj){return null!=obj&&obj===obj.window},isNumeric:function(obj){var type=jQuery.type(obj);return("number"===type||"string"===type)&&!isNaN(obj-parseFloat(obj))},isPlainObject:function(obj){var proto,Ctor;return!(!obj||"[object Object]"!==toString.call(obj))&&(!(proto=getProto(obj))||(Ctor=hasOwn.call(proto,"constructor")&&proto.constructor,"function"==typeof Ctor&&fnToString.call(Ctor)===ObjectFunctionString))},isEmptyObject:function(obj){var name;for(name in obj)return!1;return!0},type:function(obj){return null==obj?obj+"":"object"==typeof obj||"function"==typeof obj?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){DOMEval(code)},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback){var length,i=0;if(isArrayLike(obj))for(length=obj.length;i<length&&callback.call(obj[i],i,obj[i])!==!1;i++);else for(i in obj)if(callback.call(obj[i],i,obj[i])===!1)break;return obj},trim:function(text){return null==text?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];return null!=arr&&(isArrayLike(Object(arr))?jQuery.merge(ret,"string"==typeof arr?[arr]:arr):push.call(ret,arr)),ret},inArray:function(elem,arr,i){return null==arr?-1:indexOf.call(arr,elem,i)},merge:function(first,second){for(var len=+second.length,j=0,i=first.length;j<len;j++)first[i++]=second[j];return first.length=i,first},grep:function(elems,callback,invert){for(var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;i<length;i++)callbackInverse=!callback(elems[i],i),callbackInverse!==callbackExpect&&matches.push(elems[i]);return matches},map:function(elems,callback,arg){var length,value,i=0,ret=[];if(isArrayLike(elems))for(length=elems.length;i<length;i++)value=callback(elems[i],i,arg),null!=value&&ret.push(value);else for(i in elems)value=callback(elems[i],i,arg),null!=value&&ret.push(value);return concat.apply([],ret)},guid:1,proxy:function(fn,context){var tmp,args,proxy;if("string"==typeof context&&(tmp=fn[context],context=fn,fn=tmp),jQuery.isFunction(fn))return args=slice.call(arguments,2),proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))},proxy.guid=fn.guid=fn.guid||jQuery.guid++,proxy},now:Date.now,support:support}),"function"==typeof Symbol&&(jQuery.fn[Symbol.iterator]=arr[Symbol.iterator]),jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});var Sizzle=function(window){function Sizzle(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;if(results=results||[],"string"!=typeof selector||!selector||1!==nodeType&&9!==nodeType&&11!==nodeType)return results;if(!seed&&((context?context.ownerDocument||context:preferredDoc)!==document&&setDocument(context),context=context||document,documentIsHTML)){if(11!==nodeType&&(match=rquickExpr.exec(selector)))if(m=match[1]){if(9===nodeType){if(!(elem=context.getElementById(m)))return results;if(elem.id===m)return results.push(elem),results}else if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m)return results.push(elem),results}else{if(match[2])return push.apply(results,context.getElementsByTagName(selector)),results;if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName)return push.apply(results,context.getElementsByClassName(m)),results}if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(1!==nodeType)newContext=context,newSelector=selector;else if("object"!==context.nodeName.toLowerCase()){for((nid=context.getAttribute("id"))?nid=nid.replace(rcssescape,fcssescape):context.setAttribute("id",nid=expando),groups=tokenize(selector),i=groups.length;i--;)groups[i]="#"+nid+" "+toSelector(groups[i]);newSelector=groups.join(","),newContext=rsibling.test(selector)&&testContext(context.parentNode)||context}if(newSelector)try{return push.apply(results,newContext.querySelectorAll(newSelector)),results}catch(qsaError){}finally{nid===expando&&context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){function cache(key,value){return keys.push(key+" ")>Expr.cacheLength&&delete cache[keys.shift()],cache[key+" "]=value}var keys=[];return cache}function markFunction(fn){return fn[expando]=!0,fn}function assert(fn){var el=document.createElement("fieldset");try{return!!fn(el)}catch(e){return!1}finally{el.parentNode&&el.parentNode.removeChild(el),el=null}}function addHandle(attrs,handler){for(var arr=attrs.split("|"),i=arr.length;i--;)Expr.attrHandle[arr[i]]=handler}function siblingCheck(a,b){var cur=b&&a,diff=cur&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(diff)return diff;if(cur)for(;cur=cur.nextSibling;)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return("input"===name||"button"===name)&&elem.type===type}}function createDisabledPseudo(disabled){return function(elem){return"label"in elem&&elem.disabled===disabled||"form"in elem&&elem.disabled===disabled||"form"in elem&&elem.disabled===!1&&(elem.isDisabled===disabled||elem.isDisabled!==!disabled&&("label"in elem||!disabledAncestor(elem))!==disabled)}}function createPositionalPseudo(fn){return markFunction(function(argument){return argument=+argument,markFunction(function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))})})}function testContext(context){return context&&"undefined"!=typeof context.getElementsByTagName&&context}function setFilters(){}function toSelector(tokens){for(var i=0,len=tokens.length,selector="";i<len;i++)selector+=tokens[i].value;return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&"parentNode"===key,doneName=done++;return combinator.first?function(elem,context,xml){for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)return matcher(elem,context,xml)}:function(elem,context,xml){var oldCache,uniqueCache,outerCache,newCache=[dirruns,doneName];if(xml){for(;elem=elem[dir];)if((1===elem.nodeType||checkNonElements)&&matcher(elem,context,xml))return!0}else for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)if(outerCache=elem[expando]||(elem[expando]={}),uniqueCache=outerCache[elem.uniqueID]||(outerCache[elem.uniqueID]={}),skip&&skip===elem.nodeName.toLowerCase())elem=elem[dir]||elem;else{if((oldCache=uniqueCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName)return newCache[2]=oldCache[2];if(uniqueCache[key]=newCache,newCache[2]=matcher(elem,context,xml))return!0}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function multipleContexts(selector,contexts,results){for(var i=0,len=contexts.length;i<len;i++)Sizzle(selector,contexts[i],results);return results}function condense(unmatched,map,filter,context,xml){for(var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=null!=map;i<len;i++)(elem=unmatched[i])&&(filter&&!filter(elem,context,xml)||(newUnmatched.push(elem),mapped&&map.push(i)));return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){return postFilter&&!postFilter[expando]&&(postFilter=setMatcher(postFilter)),postFinder&&!postFinder[expando]&&(postFinder=setMatcher(postFinder,postSelector)),markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=!preFilter||!seed&&selector?elems:condense(elems,preMap,preFilter,context,xml),matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher&&matcher(matcherIn,matcherOut,context,xml),postFilter)for(temp=condense(matcherOut,postMap),postFilter(temp,[],context,xml),i=temp.length;i--;)(elem=temp[i])&&(matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem));if(seed){if(postFinder||preFilter){if(postFinder){for(temp=[],i=matcherOut.length;i--;)(elem=matcherOut[i])&&temp.push(matcherIn[i]=elem);postFinder(null,matcherOut=[],temp,xml);
}for(i=matcherOut.length;i--;)(elem=matcherOut[i])&&(temp=postFinder?indexOf(seed,elem):preMap[i])>-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));return checkContext=null,ret}];i<len;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{if(matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches),matcher[expando]){for(j=++i;j<len&&!Expr.relative[tokens[j].type];j++);return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:" "===tokens[i-2].type?"*":""})).replace(rtrim,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens))}matchers.push(matcher)}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=null==contextBackup?1:Math.random()||.1,len=elems.length;for(outermost&&(outermostContext=context===document||context||outermost);i!==len&&null!=(elem=elems[i]);i++){if(byElement&&elem){for(j=0,context||elem.ownerDocument===document||(setDocument(elem),xml=!documentIsHTML);matcher=elementMatchers[j++];)if(matcher(elem,context||document,xml)){results.push(elem);break}outermost&&(dirruns=dirrunsUnique)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)for(;i--;)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched),outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched};return bySet?markFunction(superMatcher):superMatcher}var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){return a===b&&(hasDuplicate=!0),0},hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){for(var i=0,len=list.length;i<len;i++)if(list[i]===elem)return i;return-1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",identifier="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+"*([*^$|!~]?=)"+whitespace+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|.*)\\)|)",rwhitespace=new RegExp(whitespace+"+","g"),rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,1023&high|56320)},rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,fcssescape=function(ch,asCodePoint){return asCodePoint?"\0"===ch?"<22>":ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ":"\\"+ch},unloadHandler=function(){setDocument()},disabledAncestor=addCombinator(function(elem){return elem.disabled===!0},{dir:"parentNode",next:"legend"});try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes),arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){for(var j=target.length,i=0;target[j++]=els[i++];);target.length=j-1}}}support=Sizzle.support={},isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return!!documentElement&&"HTML"!==documentElement.nodeName},setDocument=Sizzle.setDocument=function(node){var hasCompare,subWindow,doc=node?node.ownerDocument||node:preferredDoc;return doc!==document&&9===doc.nodeType&&doc.documentElement?(document=doc,docElem=document.documentElement,documentIsHTML=!isXML(document),preferredDoc!==document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow&&(subWindow.addEventListener?subWindow.addEventListener("unload",unloadHandler,!1):subWindow.attachEvent&&subWindow.attachEvent("onunload",unloadHandler)),support.attributes=assert(function(el){return el.className="i",!el.getAttribute("className")}),support.getElementsByTagName=assert(function(el){return el.appendChild(document.createComment("")),!el.getElementsByTagName("*").length}),support.getElementsByClassName=rnative.test(document.getElementsByClassName),support.getById=assert(function(el){return docElem.appendChild(el).id=expando,!document.getElementsByName||!document.getElementsByName(expando).length}),support.getById?(Expr.find.ID=function(id,context){if("undefined"!=typeof context.getElementById&&documentIsHTML){var m=context.getElementById(id);return m?[m]:[]}},Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}):(delete Expr.find.ID,Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node="undefined"!=typeof elem.getAttributeNode&&elem.getAttributeNode("id");return node&&node.value===attrId}}),Expr.find.TAG=support.getElementsByTagName?function(tag,context){return"undefined"!=typeof context.getElementsByTagName?context.getElementsByTagName(tag):support.qsa?context.querySelectorAll(tag):void 0}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if("*"===tag){for(;elem=results[i++];)1===elem.nodeType&&tmp.push(elem);return tmp}return results},Expr.find.CLASS=support.getElementsByClassName&&function(className,context){if("undefined"!=typeof context.getElementsByClassName&&documentIsHTML)return context.getElementsByClassName(className)},rbuggyMatches=[],rbuggyQSA=[],(support.qsa=rnative.test(document.querySelectorAll))&&(assert(function(el){docElem.appendChild(el).innerHTML="<a id='"+expando+"'></a><select id='"+expando+"-\r\\' msallowcapture=''><option selected=''></option></select>",el.querySelectorAll("[msallowcapture^='']").length&&rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")"),el.querySelectorAll("[selected]").length||rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")"),el.querySelectorAll("[id~="+expando+"-]").length||rbuggyQSA.push("~="),el.querySelectorAll(":checked").length||rbuggyQSA.push(":checked"),el.querySelectorAll("a#"+expando+"+*").length||rbuggyQSA.push(".#.+[+~]")}),assert(function(el){el.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var input=document.createElement("input");input.setAttribute("type","hidden"),el.appendChild(input).setAttribute("name","D"),el.querySelectorAll("[name=d]").length&&rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?="),2!==el.querySelectorAll(":enabled").length&&rbuggyQSA.push(":enabled",":disabled"),docElem.appendChild(el).disabled=!0,2!==el.querySelectorAll(":disabled").length&&rbuggyQSA.push(":enabled",":disabled"),el.querySelectorAll("*,:x"),rbuggyQSA.push(",.*:")})),(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))&&assert(function(el){support.disconnectedMatch=matches.call(el,"*"),matches.call(el,"[s!='']:x"),rbuggyMatches.push("!=",pseudos)}),rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")),rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|")),hasCompare=rnative.test(docElem.compareDocumentPosition),contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=9===a.nodeType?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!(!bup||1!==bup.nodeType||!(adown.contains?adown.contains(bup):a.compareDocumentPosition&&16&a.compareDocumentPosition(bup)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},sortOrder=hasCompare?function(a,b){if(a===b)return hasDuplicate=!0,0;var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;return compare?compare:(compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&compare||!support.sortDetached&&b.compareDocumentPosition(a)===compare?a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)?-1:b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0:4&compare?-1:1)}:function(a,b){if(a===b)return hasDuplicate=!0,0;var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup)return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0;if(aup===bup)return siblingCheck(a,b);for(cur=a;cur=cur.parentNode;)ap.unshift(cur);for(cur=b;cur=cur.parentNode;)bp.unshift(cur);for(;ap[i]===bp[i];)i++;return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0},document):document},Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)},Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document&&setDocument(elem),expr=expr.replace(rattributeQuotes,"='$1']"),support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&11!==elem.document.nodeType)return ret}catch(e){}return Sizzle(expr,document,null,[elem]).length>0},Sizzle.contains=function(context,elem){return(context.ownerDocument||context)!==document&&setDocument(context),contains(context,elem)},Sizzle.attr=function(elem,name){(elem.ownerDocument||elem)!==document&&setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):void 0;return void 0!==val?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null},Sizzle.escape=function(sel){return(sel+"").replace(rcssescape,fcssescape)},Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)},Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;if(hasDuplicate=!support.detectDuplicates,sortInput=!support.sortStable&&results.slice(0),results.sort(sortOrder),hasDuplicate){for(;elem=results[i++];)elem===results[i]&&(j=duplicates.push(i));for(;j--;)results.splice(duplicates[j],1)}return sortInput=null,results},getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(nodeType){if(1===nodeType||9===nodeType||11===nodeType){if("string"==typeof elem.textContent)return elem.textContent;for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)}else if(3===nodeType||4===nodeType)return elem.nodeValue}else for(;node=elem[i++];)ret+=getText(node);return ret},Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(runescape,funescape),match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape),"~="===match[2]&&(match[3]=" "+match[3]+" "),match.slice(0,4)},CHILD:function(match){return match[1]=match[1].toLowerCase(),"nth"===match[1].slice(0,3)?(match[3]||Sizzle.error(match[0]),match[4]=+(match[4]?match[5]+(match[6]||1):2*("even"===match[3]||"odd"===match[3])),match[5]=+(match[7]+match[8]||"odd"===match[3])):match[3]&&Sizzle.error(match[0]),match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];return matchExpr.CHILD.test(match[0])?null:(match[3]?match[2]=match[4]||match[5]||"":unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(match[0]=match[0].slice(0,excess),match[2]=unquoted.slice(0,excess)),match.slice(0,3))}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return"*"===nodeNameSelector?function(){return!0}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test("string"==typeof elem.className&&elem.className||"undefined"!=typeof elem.getAttribute&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);return null==result?"!="===operator:!operator||(result+="","="===operator?result===check:"!="===operator?result!==check:"^="===operator?check&&0===result.indexOf(check):"*="===operator?check&&result.indexOf(check)>-1:"$="===operator?check&&result.slice(-check.length)===check:"~="===operator?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:"|="===operator&&(result===check||result.slice(0,check.length+1)===check+"-"))}},CHILD:function(type,what,argument,first,last){var simple="nth"!==type.slice(0,3),forward="last"!==type.slice(-4),ofType="of-type"===what;return 1===first&&0===last?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=!1;if(parent){if(simple){for(;dir;){for(node=elem;node=node[dir];)if(ofType?node.nodeName.toLowerCase()===name:1===node.nodeType)return!1;start=dir="only"===type&&!start&&"nextSibling"}return!0}if(start=[forward?parent.firstChild:parent.lastChild],forward&&useCache){for(node=parent,outerCache=node[expando]||(node[expando]={}),uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={}),cache=uniqueCache[type]||[],nodeIndex=cache[0]===dirruns&&cache[1],diff=nodeIndex&&cache[2],node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(1===node.nodeType&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break}}else if(useCache&&(node=elem,outerCache=node[expando]||(node[expando]={}),uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={}),cache=uniqueCache[type]||[],nodeIndex=cache[0]===dirruns&&cache[1],diff=nodeIndex),diff===!1)for(;(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())&&((ofType?node.nodeName.toLowerCase()!==name:1!==node.nodeType)||!++diff||(useCache&&(outerCache=node[expando]||(node[expando]={}),uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={}),uniqueCache[type]=[dirruns,diff]),node!==elem)););return diff-=last,diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)idx=indexOf(seed,matched[i]),seed[idx]=!(matches[idx]=matched[i])}):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))}):function(elem,context,xml){return input[0]=elem,matcher(input,null,xml,results),input[0]=null,!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return text=text.replace(runescape,funescape),function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){return ridentifier.test(lang||"")||Sizzle.error("unsupported lang: "+lang),lang=lang.replace(runescape,funescape).toLowerCase(),function(elem){var elemLang;do if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))return elemLang=elemLang.toLowerCase(),elemLang===lang||0===elemLang.indexOf(lang+"-");while((elem=elem.parentNode)&&1===elem.nodeType);return!1}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:createDisabledPseudo(!1),disabled:createDisabledPseudo(!0),checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return"input"===nodeName&&!!elem.checked||"option"===nodeName&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,elem.selected===!0},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return!1;return!0},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&"button"===elem.type||"button"===name},text:function(elem){var attr;return"input"===elem.nodeName.toLowerCase()&&"text"===elem.type&&(null==(attr=elem.getAttribute("type"))||"text"===attr.toLowerCase())},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){for(var i=0;i<length;i+=2)matchIndexes.push(i);return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){for(var i=1;i<length;i+=2)matchIndexes.push(i);return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=argument<0?argument+length:argument;++i<length;)matchIndexes.push(i);return matchIndexes})}},Expr.pseudos.nth=Expr.pseudos.eq;for(i in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Expr.pseudos[i]=createInputPseudo(i);for(i in{submit:!0,reset:!0})Expr.pseudos[i]=createButtonPseudo(i);return setFilters.prototype=Expr.filters=Expr.pseudos,Expr.setFilters=new setFilters,tokenize=Sizzle.tokenize=function(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached)return parseOnly?0:cached.slice(0);for(soFar=selector,groups=[],preFilters=Expr.preFilter;soFar;){matched&&!(match=rcomma.exec(soFar))||(match&&(soFar=soFar.slice(match[0].length)||soFar),groups.push(tokens=[])),matched=!1,(match=rcombinators.exec(soFar))&&(matched=match.shift(),tokens.push({value:matched,type:match[0].replace(rtrim," ")}),soFar=soFar.slice(matched.length));for(type in Expr.filter)!(match=matchExpr[type].exec(soFar))||preFilters[type]&&!(match=preFilters[type](match))||(matched=match.shift(),tokens.push({value:matched,type:type,matches:match}),soFar=soFar.slice(matched.length));if(!matched)break}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)},compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){for(match||(match=tokenize(selector)),i=match.length;i--;)cached=matcherFromTokens(match[i]),cached[expando]?setMatchers.push(cached):elementMatchers.push(cached);cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers)),cached.selector=selector}return cached},select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled="function"==typeof selector&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);if(results=results||[],1===match.length){if(tokens=match[0]=match[0].slice(0),tokens.length>2&&"ID"===(token=tokens[0]).type&&support.getById&&9===context.nodeType&&documentIsHTML&&Expr.relative[tokens[1].type]){if(context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0],!context)return results;compiled&&(context=context.parentNode),selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--&&(token=tokens[i],!Expr.relative[type=token.type]);)if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){if(tokens.splice(i,1),selector=seed.length&&toSelector(tokens),!selector)return push.apply(results,seed),results;break}}return(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context),results},support.sortStable=expando.split("").sort(sortOrder).join("")===expando,support.detectDuplicates=!!hasDuplicate,setDocument(),support.sortDetached=assert(function(el){return 1&el.compareDocumentPosition(document.createElement("fieldset"))}),assert(function(el){return el.innerHTML="<a href='#'></a>","#"===el.firstChild.getAttribute("href")})||addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML)return elem.getAttribute(name,"type"===name.toLowerCase()?1:2)}),support.attributes&&assert(function(el){return el.innerHTML="<input/>",el.firstChild.setAttribute("value",""),""===el.firstChild.getAttribute("value")})||addHandle("value",function(elem,name,isXML){if(!isXML&&"input"===elem.nodeName.toLowerCase())return elem.defaultValue}),assert(function(el){return null==el.getAttribute("disabled")})||addHandle(booleans,function(elem,name,isXML){var val;if(!isXML)return elem[name]===!0?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}),Sizzle}(window);jQuery.find=Sizzle,jQuery.expr=Sizzle.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort,jQuery.text=Sizzle.getText,jQuery.isXMLDoc=Sizzle.isXML,jQuery.contains=Sizzle.contains,jQuery.escapeSelector=Sizzle.escape;var dir=function(elem,dir,until){for(var matched=[],truncate=void 0!==until;(elem=elem[dir])&&9!==elem.nodeType;)if(1===elem.nodeType){if(truncate&&jQuery(elem).is(until))break;matched.push(elem)}return matched},siblings=function(n,elem){for(var matched=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&matched.push(n);return matched},rneedsContext=jQuery.expr.match.needsContext,rsingleTag=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,risSimple=/^.[^:#\[\.,]*$/;jQuery.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),1===elems.length&&1===elem.nodeType?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return 1===elem.nodeType}))},jQuery.fn.extend({find:function(selector){var i,ret,len=this.length,self=this;if("string"!=typeof selector)return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++)if(jQuery.contains(self[i],this))return!0}));for(ret=this.pushStack([]),i=0;i<len;i++)jQuery.find(selector,self[i],ret);return len>1?jQuery.uniqueSort(ret):ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,"string"==typeof selector&&rneedsContext.test(selector)?jQuery(selector):selector||[],!1).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector)return this;if(root=root||rootjQuery,"string"==typeof selector){if(match="<"===selector[0]&&">"===selector[selector.length-1]&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector),!match||!match[1]&&context)return!context||context.jquery?(context||root).find(selector):this.constructor(context).find(selector);if(match[1]){if(context=context instanceof jQuery?context[0]:context,jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)jQuery.isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);return this}return elem=document.getElementById(match[2]),elem&&(this[0]=elem,this.length=1),this}return selector.nodeType?(this[0]=selector,this.length=1,this):jQuery.isFunction(selector)?void 0!==root.ready?root.ready(selector):selector(jQuery):jQuery.makeArray(selector,this)};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){for(var i=0;i<l;i++)if(jQuery.contains(this,targets[i]))return!0})},closest:function(selectors,context){var cur,i=0,l=this.length,matched=[],targets="string"!=typeof selectors&&jQuery(selectors);if(!rneedsContext.test(selectors))for(;i<l;i++)for(cur=this[i];cur&&cur!==context;cur=cur.parentNode)if(cur.nodeType<11&&(targets?targets.index(cur)>-1:1===cur.nodeType&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched)},index:function(elem){return elem?"string"==typeof elem?indexOf.call(jQuery(elem),this[0]):indexOf.call(this,elem.jquery?elem[0]:elem):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}}),jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&11!==parent.nodeType?parent:null},parents:function(elem){return dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return dir(elem,"nextSibling")},prevAll:function(elem){return dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return dir(elem,"previousSibling",until)},siblings:function(elem){return siblings((elem.parentNode||{}).firstChild,elem)},children:function(elem){return siblings(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);return"Until"!==name.slice(-5)&&(selector=until),selector&&"string"==typeof selector&&(matched=jQuery.filter(selector,matched)),this.length>1&&(guaranteedUnique[name]||jQuery.uniqueSort(matched),rparentsprev.test(name)&&matched.reverse()),this.pushStack(matched)}});var rnotwhite=/\S+/g;jQuery.Callbacks=function(options){options="string"==typeof options?createOptions(options):jQuery.extend({},options);var firing,memory,fired,locked,list=[],queue=[],firingIndex=-1,fire=function(){for(locked=options.once,fired=firing=!0;queue.length;firingIndex=-1)for(memory=queue.shift();++firingIndex<list.length;)list[firingIndex].apply(memory[0],memory[1])===!1&&options.stopOnFalse&&(firingIndex=list.length,memory=!1);options.memory||(memory=!1),firing=!1,locked&&(list=memory?[]:"")},self={add:function(){return list&&(memory&&!firing&&(firingIndex=list.length-1,queue.push(memory)),function add(args){jQuery.each(args,function(_,arg){jQuery.isFunction(arg)?options.unique&&self.has(arg)||list.push(arg):arg&&arg.length&&"string"!==jQuery.type(arg)&&add(arg)})}(arguments),memory&&!firing&&fire()),this},remove:function(){return jQuery.each(arguments,function(_,arg){for(var index;(index=jQuery.inArray(arg,list,index))>-1;)list.splice(index,1),index<=firingIndex&&firingIndex--}),this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0},empty:function(){return list&&(list=[]),this},disable:function(){return locked=queue=[],list=memory="",this},disabled:function(){return!list},lock:function(){return locked=queue=[],memory||firing||(list=memory=""),this},locked:function(){return!!locked},fireWith:function(context,args){return locked||(args=args||[],args=[context,args.slice?args.slice():args],queue.push(args),firing||fire()),this},fire:function(){return self.fireWith(this,arguments),this},fired:function(){return!!fired}};return self},jQuery.extend({Deferred:function(func){var tuples=[["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],state="pending",promise={state:function(){return state},always:function(){return deferred.done(arguments).fail(arguments),
this},"catch":function(fn){return promise.then(null,fn)},pipe:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[tuple[4]])&&fns[tuple[4]];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);returned&&jQuery.isFunction(returned.promise)?returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject):newDefer[tuple[0]+"With"](this,fn?[returned]:arguments)})}),fns=null}).promise()},then:function(onFulfilled,onRejected,onProgress){function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function(){var returned,then;if(!(depth<maxDepth)){if(returned=handler.apply(that,args),returned===deferred.promise())throw new TypeError("Thenable self-resolution");then=returned&&("object"==typeof returned||"function"==typeof returned)&&returned.then,jQuery.isFunction(then)?special?then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special)):(maxDepth++,then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith))):(handler!==Identity&&(that=void 0,args=[returned]),(special||deferred.resolveWith)(that,args))}},process=special?mightThrow:function(){try{mightThrow()}catch(e){jQuery.Deferred.exceptionHook&&jQuery.Deferred.exceptionHook(e,process.stackTrace),depth+1>=maxDepth&&(handler!==Thrower&&(that=void 0,args=[e]),deferred.rejectWith(that,args))}};depth?process():(jQuery.Deferred.getStackHook&&(process.stackTrace=jQuery.Deferred.getStackHook()),window.setTimeout(process))}}var maxDepth=0;return jQuery.Deferred(function(newDefer){tuples[0][3].add(resolve(0,newDefer,jQuery.isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith)),tuples[1][3].add(resolve(0,newDefer,jQuery.isFunction(onFulfilled)?onFulfilled:Identity)),tuples[2][3].add(resolve(0,newDefer,jQuery.isFunction(onRejected)?onRejected:Thrower))}).promise()},promise:function(obj){return null!=obj?jQuery.extend(obj,promise):promise}},deferred={};return jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];promise[tuple[1]]=list.add,stateString&&list.add(function(){state=stateString},tuples[3-i][2].disable,tuples[0][2].lock),list.add(tuple[3].fire),deferred[tuple[0]]=function(){return deferred[tuple[0]+"With"](this===deferred?void 0:this,arguments),this},deferred[tuple[0]+"With"]=list.fireWith}),promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(singleValue){var remaining=arguments.length,i=remaining,resolveContexts=Array(i),resolveValues=slice.call(arguments),master=jQuery.Deferred(),updateFunc=function(i){return function(value){resolveContexts[i]=this,resolveValues[i]=arguments.length>1?slice.call(arguments):value,--remaining||master.resolveWith(resolveContexts,resolveValues)}};if(remaining<=1&&(adoptValue(singleValue,master.done(updateFunc(i)).resolve,master.reject),"pending"===master.state()||jQuery.isFunction(resolveValues[i]&&resolveValues[i].then)))return master.then();for(;i--;)adoptValue(resolveValues[i],updateFunc(i),master.reject);return master.promise()}});var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;jQuery.Deferred.exceptionHook=function(error,stack){window.console&&window.console.warn&&error&&rerrorNames.test(error.name)&&window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,stack)},jQuery.readyException=function(error){window.setTimeout(function(){throw error})};var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){return readyList.then(fn)["catch"](function(error){jQuery.readyException(error)}),this},jQuery.extend({isReady:!1,readyWait:1,holdReady:function(hold){hold?jQuery.readyWait++:jQuery.ready(!0)},ready:function(wait){(wait===!0?--jQuery.readyWait:jQuery.isReady)||(jQuery.isReady=!0,wait!==!0&&--jQuery.readyWait>0||readyList.resolveWith(document,[jQuery]))}}),jQuery.ready.then=readyList.then,"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(jQuery.ready):(document.addEventListener("DOMContentLoaded",completed),window.addEventListener("load",completed));var access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=null==key;if("object"===jQuery.type(key)){chainable=!0;for(i in key)access(elems,fn,i,key[i],!0,emptyGet,raw)}else if(void 0!==value&&(chainable=!0,jQuery.isFunction(value)||(raw=!0),bulk&&(raw?(fn.call(elems,value),fn=null):(bulk=fn,fn=function(elem,key,value){return bulk.call(jQuery(elem),value)})),fn))for(;i<len;i++)fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));return chainable?elems:bulk?fn.call(elems):len?fn(elems[0],key):emptyGet},acceptData=function(owner){return 1===owner.nodeType||9===owner.nodeType||!+owner.nodeType};Data.uid=1,Data.prototype={cache:function(owner){var value=owner[this.expando];return value||(value={},acceptData(owner)&&(owner.nodeType?owner[this.expando]=value:Object.defineProperty(owner,this.expando,{value:value,configurable:!0}))),value},set:function(owner,data,value){var prop,cache=this.cache(owner);if("string"==typeof data)cache[jQuery.camelCase(data)]=value;else for(prop in data)cache[jQuery.camelCase(prop)]=data[prop];return cache},get:function(owner,key){return void 0===key?this.cache(owner):owner[this.expando]&&owner[this.expando][jQuery.camelCase(key)]},access:function(owner,key,value){return void 0===key||key&&"string"==typeof key&&void 0===value?this.get(owner,key):(this.set(owner,key,value),void 0!==value?value:key)},remove:function(owner,key){var i,cache=owner[this.expando];if(void 0!==cache){if(void 0!==key){jQuery.isArray(key)?key=key.map(jQuery.camelCase):(key=jQuery.camelCase(key),key=key in cache?[key]:key.match(rnotwhite)||[]),i=key.length;for(;i--;)delete cache[key[i]]}(void 0===key||jQuery.isEmptyObject(cache))&&(owner.nodeType?owner[this.expando]=void 0:delete owner[this.expando])}},hasData:function(owner){var cache=owner[this.expando];return void 0!==cache&&!jQuery.isEmptyObject(cache)}};var dataPriv=new Data,dataUser=new Data,rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;jQuery.extend({hasData:function(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem)},data:function(elem,name,data){return dataUser.access(elem,name,data)},removeData:function(elem,name){dataUser.remove(elem,name)},_data:function(elem,name,data){return dataPriv.access(elem,name,data)},_removeData:function(elem,name){dataPriv.remove(elem,name)}}),jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(void 0===key){if(this.length&&(data=dataUser.get(elem),1===elem.nodeType&&!dataPriv.get(elem,"hasDataAttrs"))){for(i=attrs.length;i--;)attrs[i]&&(name=attrs[i].name,0===name.indexOf("data-")&&(name=jQuery.camelCase(name.slice(5)),dataAttr(elem,name,data[name])));dataPriv.set(elem,"hasDataAttrs",!0)}return data}return"object"==typeof key?this.each(function(){dataUser.set(this,key)}):access(this,function(value){var data;if(elem&&void 0===value){if(data=dataUser.get(elem,key),void 0!==data)return data;if(data=dataAttr(elem,key),void 0!==data)return data}else this.each(function(){dataUser.set(this,key,value)})},null,value,arguments.length>1,null,!0)},removeData:function(key){return this.each(function(){dataUser.remove(this,key)})}}),jQuery.extend({queue:function(elem,type,data){var queue;if(elem)return type=(type||"fx")+"queue",queue=dataPriv.get(elem,type),data&&(!queue||jQuery.isArray(data)?queue=dataPriv.access(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};"inprogress"===fn&&(fn=queue.shift(),startLength--),fn&&("fx"===type&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,next,hooks)),!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key])})})}}),jQuery.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length<setter?jQuery.queue(this[0],type):void 0===data?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type),"fx"===type&&"inprogress"!==queue[0]&&jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[elements])};for("string"!=typeof type&&(obj=type,type=void 0),type=type||"fx";i--;)tmp=dataPriv.get(elements[i],type+"queueHooks"),tmp&&tmp.empty&&(count++,tmp.empty.add(resolve));return resolve(),defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),cssExpand=["Top","Right","Bottom","Left"],isHiddenWithinTree=function(elem,el){return elem=el||elem,"none"===elem.style.display||""===elem.style.display&&jQuery.contains(elem.ownerDocument,elem)&&"none"===jQuery.css(elem,"display")},swap=function(elem,options,callback,args){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret},defaultDisplayMap={};jQuery.fn.extend({show:function(){return showHide(this,!0)},hide:function(){return showHide(this)},toggle:function(state){return"boolean"==typeof state?state?this.show():this.hide():this.each(function(){isHiddenWithinTree(this)?jQuery(this).show():jQuery(this).hide()})}});var rcheckableType=/^(?:checkbox|radio)$/i,rtagName=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,rscriptType=/^$|\/(?:java|ecma)script/i,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td;var rhtml=/<|&#?\w+;/;!function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");input.setAttribute("type","radio"),input.setAttribute("checked","checked"),input.setAttribute("name","t"),div.appendChild(input),support.checkClone=div.cloneNode(!0).cloneNode(!0).lastChild.checked,div.innerHTML="<textarea>x</textarea>",support.noCloneChecked=!!div.cloneNode(!0).lastChild.defaultValue}();var documentElement=document.documentElement,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,rtypenamespace=/^([^.]*)(?:\.(.+)|)/;jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);if(elemData)for(handler.handler&&(handleObjIn=handler,handler=handleObjIn.handler,selector=handleObjIn.selector),selector&&jQuery.find.matchesSelector(documentElement,selector),handler.guid||(handler.guid=jQuery.guid++),(events=elemData.events)||(events=elemData.events={}),(eventHandle=elemData.handle)||(eventHandle=elemData.handle=function(e){return"undefined"!=typeof jQuery&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):void 0}),types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type&&(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=jQuery.event.special[type]||{},handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),(handlers=events[type])||(handlers=events[type]=[],handlers.delegateCount=0,special.setup&&special.setup.call(elem,data,namespaces,eventHandle)!==!1||elem.addEventListener&&elem.addEventListener(type,eventHandle)),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),jQuery.event.global[type]=!0)},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(elemData&&(events=elemData.events)){for(types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)if(tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type){for(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,handlers=events[type]||[],tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"),origCount=j=handlers.length;j--;)handleObj=handlers[j],!mappedTypes&&origType!==handleObj.origType||handler&&handler.guid!==handleObj.guid||tmp&&!tmp.test(handleObj.namespace)||selector&&selector!==handleObj.selector&&("**"!==selector||!handleObj.selector)||(handlers.splice(j,1),handleObj.selector&&handlers.delegateCount--,special.remove&&special.remove.call(elem,handleObj));origCount&&!handlers.length&&(special.teardown&&special.teardown.call(elem,namespaces,elemData.handle)!==!1||jQuery.removeEvent(elem,type,elemData.handle),delete events[type])}else for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,!0);jQuery.isEmptyObject(events)&&dataPriv.remove(elem,"handle events")}},dispatch:function(nativeEvent){var i,j,ret,matched,handleObj,handlerQueue,event=jQuery.event.fix(nativeEvent),args=new Array(arguments.length),handlers=(dataPriv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};for(args[0]=event,i=1;i<arguments.length;i++)args[i]=arguments[i];if(event.delegateTarget=this,!special.preDispatch||special.preDispatch.call(this,event)!==!1){for(handlerQueue=jQuery.event.handlers.call(this,event,handlers),i=0;(matched=handlerQueue[i++])&&!event.isPropagationStopped();)for(event.currentTarget=matched.elem,j=0;(handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped();)event.rnamespace&&!event.rnamespace.test(handleObj.namespace)||(event.handleObj=handleObj,event.data=handleObj.data,ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args),void 0!==ret&&(event.result=ret)===!1&&(event.preventDefault(),event.stopPropagation()));return special.postDispatch&&special.postDispatch.call(this,event),event.result}},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&("click"!==event.type||isNaN(event.button)||event.button<1))for(;cur!==this;cur=cur.parentNode||this)if(1===cur.nodeType&&(cur.disabled!==!0||"click"!==event.type)){for(matches=[],i=0;i<delegateCount;i++)handleObj=handlers[i],sel=handleObj.selector+" ",void 0===matches[sel]&&(matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length),matches[sel]&&matches.push(handleObj);matches.length&&handlerQueue.push({elem:cur,handlers:matches})}return delegateCount<handlers.length&&handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)}),handlerQueue},addProp:function(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:!0,configurable:!0,get:jQuery.isFunction(hook)?function(){if(this.originalEvent)return hook(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[name]},set:function(value){Object.defineProperty(this,name,{enumerable:!0,configurable:!0,writable:!0,value:value})}})},fix:function(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===safeActiveElement()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&jQuery.nodeName(this,"input"))return this.click(),!1},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){void 0!==event.result&&event.originalEvent&&(event.originalEvent.returnValue=event.result)}}}},jQuery.removeEvent=function(elem,type,handle){elem.removeEventListener&&elem.removeEventListener(type,handle)},jQuery.Event=function(src,props){return this instanceof jQuery.Event?(src&&src.type?(this.originalEvent=src,this.type=src.type,this.isDefaultPrevented=src.defaultPrevented||void 0===src.defaultPrevented&&src.returnValue===!1?returnTrue:returnFalse,this.target=src.target&&3===src.target.nodeType?src.target.parentNode:src.target,this.currentTarget=src.currentTarget,this.relatedTarget=src.relatedTarget):this.type=src,props&&jQuery.extend(this,props),this.timeStamp=src&&src.timeStamp||jQuery.now(),void(this[jQuery.expando]=!0)):new jQuery.Event(src,props)},jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},jQuery.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(event){var button=event.button;return null==event.which&&rkeyEvent.test(event.type)?null!=event.charCode?event.charCode:event.keyCode:!event.which&&void 0!==button&&rmouseEvent.test(event.type)?1&button?1:2&button?3:4&button?2:0:event.which}},jQuery.event.addProp),jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;return related&&(related===target||jQuery.contains(target,related))||(event.type=handleObj.origType,ret=handleObj.handler.apply(this,arguments),event.type=fix),ret}}}),jQuery.fn.extend({on:function(types,selector,data,fn){return on(this,types,selector,data,fn)},one:function(types,selector,data,fn){return on(this,types,selector,data,fn,1)},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj)return handleObj=types.handleObj,jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler),this;if("object"==typeof types){for(type in types)this.off(type,selector,types[type]);return this}return selector!==!1&&"function"!=typeof selector||(fn=selector,selector=void 0),fn===!1&&(fn=returnFalse),this.each(function(){jQuery.event.remove(this,types,fn,selector)})}});var rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,rnoInnerhtml=/<script|<style|<link/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;jQuery.extend({htmlPrefilter:function(html){return html.replace(rxhtmlTag,"<$1></$2>")},clone:function(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(!0),inPage=jQuery.contains(elem.ownerDocument,elem);if(!(support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),srcElements=getAll(elem),i=0,l=srcElements.length;i<l;i++)fixInput(srcElements[i],destElements[i]);if(dataAndEvents)if(deepDataAndEvents)for(srcElements=srcElements||getAll(elem),destElements=destElements||getAll(clone),i=0,l=srcElements.length;i<l;i++)cloneCopyEvent(srcElements[i],destElements[i]);else cloneCopyEvent(elem,clone);return destElements=getAll(clone,"script"),destElements.length>0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),clone},cleanData:function(elems){for(var data,elem,type,special=jQuery.event.special,i=0;void 0!==(elem=elems[i]);i++)if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);elem[dataPriv.expando]=void 0}elem[dataUser.expando]&&(elem[dataUser.expando]=void 0)}}}),jQuery.fn.extend({detach:function(selector){return remove(this,selector,!0)},remove:function(selector){return remove(this,selector)},text:function(value){return access(this,function(value){return void 0===value?jQuery.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=value)})},null,value,arguments.length)},append:function(){return domManip(this,arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return domManip(this,arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return domManip(this,arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this)})},after:function(){return domManip(this,arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this.nextSibling)})},empty:function(){for(var elem,i=0;null!=(elem=this[i]);i++)1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.textContent="");return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=null!=dataAndEvents&&dataAndEvents,deepDataAndEvents=null==deepDataAndEvents?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(void 0===value&&1===elem.nodeType)return elem.innerHTML;if("string"==typeof value&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++)elem=this[i]||{},1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.innerHTML=value);elem=0}catch(e){}}elem&&this.empty().append(value)},null,value,arguments.length)},replaceWith:function(){var ignored=[];return domManip(this,arguments,function(elem){var parent=this.parentNode;jQuery.inArray(this,ignored)<0&&(jQuery.cleanData(getAll(this)),parent&&parent.replaceChild(elem,this))},ignored)}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){for(var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;i<=last;i++)elems=i===last?this:this.clone(!0),jQuery(insert[i])[original](elems),push.apply(ret,elems.get());return this.pushStack(ret)}});var rmargin=/^margin/,rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i"),getStyles=function(elem){var view=elem.ownerDocument.defaultView;return view&&view.opener||(view=window),view.getComputedStyle(elem)};!function(){function computeStyleTests(){if(div){div.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",div.innerHTML="",documentElement.appendChild(container);var divStyle=window.getComputedStyle(div);pixelPositionVal="1%"!==divStyle.top,reliableMarginLeftVal="2px"===divStyle.marginLeft,boxSizingReliableVal="4px"===divStyle.width,div.style.marginRight="50%",pixelMarginRightVal="4px"===divStyle.marginRight,documentElement.removeChild(container),div=null}}var pixelPositionVal,boxSizingReliableVal,pixelMarginRightVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");div.style&&(div.style.backgroundClip="content-box",div.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle="content-box"===div.style.backgroundClip,container.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",container.appendChild(div),jQuery.extend(support,{pixelPosition:function(){return computeStyleTests(),pixelPositionVal},boxSizingReliable:function(){return computeStyleTests(),boxSizingReliableVal},pixelMarginRight:function(){return computeStyleTests(),pixelMarginRightVal},reliableMarginLeft:function(){return computeStyleTests(),reliableMarginLeftVal}}))}();var rdisplayswap=/^(none|table(?!-c[ea]).+)/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style;jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return""===ret?"1":ret}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(elem,name,value,extra){if(elem&&3!==elem.nodeType&&8!==elem.nodeType&&elem.style){var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;return name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(origName)||origName),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],void 0===value?hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,!1,extra))?ret:style[name]:(type=typeof value,"string"===type&&(ret=rcssNum.exec(value))&&ret[1]&&(value=adjustCSS(elem,name,ret),type="number"),null!=value&&value===value&&("number"===type&&(value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px")),support.clearCloneStyle||""!==value||0!==name.indexOf("background")||(style[name]="inherit"),hooks&&"set"in hooks&&void 0===(value=hooks.set(elem,value,extra))||(style[name]=value)),void 0)}},css:function(elem,name,extra,styles){var val,num,hooks,origName=jQuery.camelCase(name);return name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(origName)||origName),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],hooks&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),void 0===val&&(val=curCSS(elem,name,styles)),"normal"===val&&name in cssNormalTransform&&(val=cssNormalTransform[name]),""===extra||extra?(num=parseFloat(val),extra===!0||isFinite(num)?num||0:val):val}}),jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){if(computed)return!rdisplayswap.test(jQuery.css(elem,"display"))||elem.getClientRects().length&&elem.getBoundingClientRect().width?getWidthOrHeight(elem,name,extra):swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)})},set:function(elem,value,extra){var matches,styles=extra&&getStyles(elem),subtract=extra&&augmentWidthOrHeight(elem,name,extra,"border-box"===jQuery.css(elem,"boxSizing",!1,styles),styles);return subtract&&(matches=rcssNum.exec(value))&&"px"!==(matches[3]||"px")&&(elem.style[name]=value,value=jQuery.css(elem,name)),setPositiveNumber(elem,value,subtract)}}}),jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed)return(parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left}))+"px"}),jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){for(var i=0,expanded={},parts="string"==typeof value?value.split(" "):[value];i<4;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];return expanded}},rmargin.test(prefix)||(jQuery.cssHooks[prefix+suffix].set=setPositiveNumber)}),jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){for(styles=getStyles(elem),len=name.length;i<len;i++)map[name[i]]=jQuery.css(elem,name[i],!1,styles);return map}return void 0!==value?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem,this.prop=prop,this.easing=easing||jQuery.easing._default,this.options=options,this.start=this.now=this.cur(),this.end=end,this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.options.duration?this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):this.pos=eased=percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(tween){var result;return 1!==tween.elem.nodeType||null!=tween.elem[tween.prop]&&null==tween.elem.style[tween.prop]?tween.elem[tween.prop]:(result=jQuery.css(tween.elem,tween.prop,""),result&&"auto"!==result?result:0)},set:function(tween){jQuery.fx.step[tween.prop]?jQuery.fx.step[tween.prop](tween):1!==tween.elem.nodeType||null==tween.elem.style[jQuery.cssProps[tween.prop]]&&!jQuery.cssHooks[tween.prop]?tween.elem[tween.prop]=tween.now:jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}},jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2},_default:"swing"},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);return adjustCSS(tween.elem,prop,rcssNum.exec(value),tween),tween}]},tweener:function(props,callback){jQuery.isFunction(props)?(callback=props,props=["*"]):props=props.match(rnotwhite);for(var prop,index=0,length=props.length;index<length;index++)prop=props[index],Animation.tweeners[prop]=Animation.tweeners[prop]||[],Animation.tweeners[prop].unshift(callback)},prefilters:[defaultPrefilter],prefilter:function(callback,prepend){prepend?Animation.prefilters.unshift(callback):Animation.prefilters.push(callback)}}),jQuery.speed=function(speed,easing,fn){var opt=speed&&"object"==typeof speed?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing
};return jQuery.fx.off||document.hidden?opt.duration=0:opt.duration="number"==typeof opt.duration?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default,null!=opt.queue&&opt.queue!==!0||(opt.queue="fx"),opt.old=opt.complete,opt.complete=function(){jQuery.isFunction(opt.old)&&opt.old.call(this),opt.queue&&jQuery.dequeue(this,opt.queue)},opt},jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHiddenWithinTree).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);(empty||dataPriv.get(this,"finish"))&&anim.stop(!0)};return doAnimation.finish=doAnimation,empty||optall.queue===!1?this.each(doAnimation):this.queue(optall.queue,doAnimation)},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop,stop(gotoEnd)};return"string"!=typeof type&&(gotoEnd=clearQueue,clearQueue=type,type=void 0),clearQueue&&type!==!1&&this.queue(type||"fx",[]),this.each(function(){var dequeue=!0,index=null!=type&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index)data[index]&&data[index].stop&&stopQueue(data[index]);else for(index in data)data[index]&&data[index].stop&&rrun.test(index)&&stopQueue(data[index]);for(index=timers.length;index--;)timers[index].elem!==this||null!=type&&timers[index].queue!==type||(timers[index].anim.stop(gotoEnd),dequeue=!1,timers.splice(index,1));!dequeue&&gotoEnd||jQuery.dequeue(this,type)})},finish:function(type){return type!==!1&&(type=type||"fx"),this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;for(data.finish=!0,jQuery.queue(this,type,[]),hooks&&hooks.stop&&hooks.stop.call(this,!0),index=timers.length;index--;)timers[index].elem===this&&timers[index].queue===type&&(timers[index].anim.stop(!0),timers.splice(index,1));for(index=0;index<length;index++)queue[index]&&queue[index].finish&&queue[index].finish.call(this);delete data.finish})}}),jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return null==speed||"boolean"==typeof speed?cssFn.apply(this,arguments):this.animate(genFx(name,!0),speed,easing,callback)}}),jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}}),jQuery.timers=[],jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;for(fxNow=jQuery.now();i<timers.length;i++)timer=timers[i],timer()||timers[i]!==timer||timers.splice(i--,1);timers.length||jQuery.fx.stop(),fxNow=void 0},jQuery.fx.timer=function(timer){jQuery.timers.push(timer),timer()?jQuery.fx.start():jQuery.timers.pop()},jQuery.fx.interval=13,jQuery.fx.start=function(){timerId||(timerId=window.requestAnimationFrame?window.requestAnimationFrame(raf):window.setInterval(jQuery.fx.tick,jQuery.fx.interval))},jQuery.fx.stop=function(){window.cancelAnimationFrame?window.cancelAnimationFrame(timerId):window.clearInterval(timerId),timerId=null},jQuery.fx.speeds={slow:600,fast:200,_default:400},jQuery.fn.delay=function(time,type){return time=jQuery.fx?jQuery.fx.speeds[time]||time:time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout)}})},function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox",support.checkOn=""!==input.value,support.optSelected=opt.selected,input=document.createElement("input"),input.value="t",input.type="radio",support.radioValue="t"===input.value}();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}}),jQuery.extend({attr:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(3!==nType&&8!==nType&&2!==nType)return"undefined"==typeof elem.getAttribute?jQuery.prop(elem,name,value):(1===nType&&jQuery.isXMLDoc(elem)||(hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:void 0)),void 0!==value?null===value?void jQuery.removeAttr(elem,name):hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:(elem.setAttribute(name,value+""),value):hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:(ret=jQuery.find.attr(elem,name),null==ret?void 0:ret))},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&"radio"===value&&jQuery.nodeName(elem,"input")){var val=elem.value;return elem.setAttribute("type",value),val&&(elem.value=val),value}}}},removeAttr:function(elem,value){var name,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)elem.removeAttribute(name)}}),boolHook={set:function(elem,value,name){return value===!1?jQuery.removeAttr(elem,name):elem.setAttribute(name,name),name}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();return isXML||(handle=attrHandle[lowercaseName],attrHandle[lowercaseName]=ret,ret=null!=getter(elem,name,isXML)?lowercaseName:null,attrHandle[lowercaseName]=handle),ret}});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}}),jQuery.extend({prop:function(elem,name,value){var ret,hooks,nType=elem.nodeType;if(3!==nType&&8!==nType&&2!==nType)return 1===nType&&jQuery.isXMLDoc(elem)||(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),void 0!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),support.optSelected||(jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&parent.parentNode&&parent.parentNode.selectedIndex,null},set:function(elem){var parent=elem.parentNode;parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex)}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)))});if("string"==typeof value&&value)for(classes=value.match(rnotwhite)||[];elem=this[i++];)if(curValue=getClass(elem),cur=1===elem.nodeType&&(" "+curValue+" ").replace(rclass," ")){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");finalValue=jQuery.trim(cur),curValue!==finalValue&&elem.setAttribute("class",finalValue)}return this},removeClass:function(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof value&&value)for(classes=value.match(rnotwhite)||[];elem=this[i++];)if(curValue=getClass(elem),cur=1===elem.nodeType&&(" "+curValue+" ").replace(rclass," ")){for(j=0;clazz=classes[j++];)for(;cur.indexOf(" "+clazz+" ")>-1;)cur=cur.replace(" "+clazz+" "," ");finalValue=jQuery.trim(cur),curValue!==finalValue&&elem.setAttribute("class",finalValue)}return this},toggleClass:function(value,stateVal){var type=typeof value;return"boolean"==typeof stateVal&&"string"===type?stateVal?this.addClass(value):this.removeClass(value):jQuery.isFunction(value)?this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal)}):this.each(function(){var className,i,self,classNames;if("string"===type)for(i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];className=classNames[i++];)self.hasClass(className)?self.removeClass(className):self.addClass(className);else void 0!==value&&"boolean"!==type||(className=getClass(this),className&&dataPriv.set(this,"__className__",className),this.setAttribute&&this.setAttribute("class",className||value===!1?"":dataPriv.get(this,"__className__")||""))})},hasClass:function(selector){var className,elem,i=0;for(className=" "+selector+" ";elem=this[i++];)if(1===elem.nodeType&&(" "+getClass(elem)+" ").replace(rclass," ").indexOf(className)>-1)return!0;return!1}});var rreturn=/\r/g,rspaces=/[\x20\t\r\n\f]+/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];{if(arguments.length)return isFunction=jQuery.isFunction(value),this.each(function(i){var val;1===this.nodeType&&(val=isFunction?value.call(this,i,jQuery(this).val()):value,null==val?val="":"number"==typeof val?val+="":jQuery.isArray(val)&&(val=jQuery.map(val,function(value){return null==value?"":value+""})),hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()],hooks&&"set"in hooks&&void 0!==hooks.set(this,val,"value")||(this.value=val))});if(elem)return hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()],hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,"value"))?ret:(ret=elem.value,"string"==typeof ret?ret.replace(rreturn,""):null==ret?"":ret)}}}),jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return null!=val?val:jQuery.trim(jQuery.text(elem)).replace(rspaces," ")}},select:{get:function(elem){for(var value,option,options=elem.options,index=elem.selectedIndex,one="select-one"===elem.type,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;i<max;i++)if(option=options[i],(option.selected||i===index)&&!option.disabled&&(!option.parentNode.disabled||!jQuery.nodeName(option.parentNode,"optgroup"))){if(value=jQuery(option).val(),one)return value;values.push(value)}return values},set:function(elem,value){for(var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;i--;)option=options[i],(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1)&&(optionSet=!0);return optionSet||(elem.selectedIndex=-1),values}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value))return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1}},support.checkOn||(jQuery.valHooks[this].get=function(elem){return null===elem.getAttribute("value")?"on":elem.value})});var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/;jQuery.extend(jQuery.event,{trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];if(cur=tmp=elem=elem||document,3!==elem.nodeType&&8!==elem.nodeType&&!rfocusMorph.test(type+jQuery.event.triggered)&&(type.indexOf(".")>-1&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),ontype=type.indexOf(":")<0&&"on"+type,event=event[jQuery.expando]?event:new jQuery.Event(type,"object"==typeof event&&event),event.isTrigger=onlyHandlers?2:3,event.namespace=namespaces.join("."),event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,event.result=void 0,event.target||(event.target=elem),data=null==data?[event]:jQuery.makeArray(data,[event]),special=jQuery.event.special[type]||{},onlyHandlers||!special.trigger||special.trigger.apply(elem,data)!==!1)){if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){for(bubbleType=special.delegateType||type,rfocusMorph.test(bubbleType+type)||(cur=cur.parentNode);cur;cur=cur.parentNode)eventPath.push(cur),tmp=cur;tmp===(elem.ownerDocument||document)&&eventPath.push(tmp.defaultView||tmp.parentWindow||window)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();)event.type=i>1?bubbleType:special.bindType||type,handle=(dataPriv.get(cur,"events")||{})[event.type]&&dataPriv.get(cur,"handle"),handle&&handle.apply(cur,data),handle=ontype&&cur[ontype],handle&&handle.apply&&acceptData(cur)&&(event.result=handle.apply(cur,data),event.result===!1&&event.preventDefault());return event.type=type,onlyHandlers||event.isDefaultPrevented()||special._default&&special._default.apply(eventPath.pop(),data)!==!1||!acceptData(elem)||ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)&&(tmp=elem[ontype],tmp&&(elem[ontype]=null),jQuery.event.triggered=type,elem[type](),jQuery.event.triggered=void 0,tmp&&(elem[ontype]=tmp)),event.result}},simulate:function(type,elem,event){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:!0});jQuery.event.trigger(e,null,elem)}}),jQuery.fn.extend({trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];if(elem)return jQuery.event.trigger(type,data,elem,!0)}}),jQuery.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}}),jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)}}),support.focusin="onfocusin"in window,support.focusin||jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event))};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix);attaches||doc.addEventListener(orig,handler,!0),dataPriv.access(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=dataPriv.access(doc,fix)-1;attaches?dataPriv.access(doc,fix,attaches):(doc.removeEventListener(orig,handler,!0),dataPriv.remove(doc,fix))}}});var location=window.location,nonce=jQuery.now(),rquery=/\?/;jQuery.parseXML=function(data){var xml;if(!data||"string"!=typeof data)return null;try{xml=(new window.DOMParser).parseFromString(data,"text/xml")}catch(e){xml=void 0}return xml&&!xml.getElementsByTagName("parsererror").length||jQuery.error("Invalid XML: "+data),xml};var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,valueOrFunction){var value=jQuery.isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(null==value?"":value)};if(jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a,function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return null==val?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});var r20=/%20/g,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,prefilters={},transports={},allTypes="*/".concat("*"),originAnchor=document.createElement("a");originAnchor.href=location.href,jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;completed||(completed=!0,timeoutTimer&&window.clearTimeout(timeoutTimer),transport=void 0,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,isSuccess=status>=200&&status<300||304===status,responses&&(response=ajaxHandleResponses(s,jqXHR,responses)),response=ajaxConvert(s,response,jqXHR,isSuccess),isSuccess?(s.ifModified&&(modified=jqXHR.getResponseHeader("Last-Modified"),modified&&(jQuery.lastModified[cacheURL]=modified),modified=jqXHR.getResponseHeader("etag"),modified&&(jQuery.etag[cacheURL]=modified)),204===status||"HEAD"===s.type?statusText="nocontent":304===status?statusText="notmodified":(statusText=response.state,success=response.data,error=response.error,isSuccess=!error)):(error=statusText,!status&&statusText||(statusText="error",status<0&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(statusCode),statusCode=void 0,fireGlobals&&globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--jQuery.active||jQuery.event.trigger("ajaxStop")))}"object"==typeof url&&(options=url,url=void 0),options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,urlAnchor,completed,fireGlobals,i,uncached,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(completed){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()]=match[2];match=responseHeaders[key.toLowerCase()]}return null==match?null:match},getAllResponseHeaders:function(){return completed?responseHeadersString:null},setRequestHeader:function(name,value){return null==completed&&(name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name,requestHeaders[name]=value),this},overrideMimeType:function(type){return null==completed&&(s.mimeType=type),this},statusCode:function(map){var code;if(map)if(completed)jqXHR.always(map[jqXHR.status]);else for(code in map)statusCode[code]=[statusCode[code],map[code]];return this},abort:function(statusText){var finalText=statusText||strAbort;return transport&&transport.abort(finalText),done(0,finalText),this}};if(deferred.promise(jqXHR),s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//"),s.type=options.method||options.type||s.method||s.type,s.dataTypes=(s.dataType||"*").toLowerCase().match(rnotwhite)||[""],null==s.crossDomain){urlAnchor=document.createElement("a");try{urlAnchor.href=s.url,urlAnchor.href=urlAnchor.href,s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!=urlAnchor.protocol+"//"+urlAnchor.host}catch(e){s.crossDomain=!0}}if(s.data&&s.processData&&"string"!=typeof s.data&&(s.data=jQuery.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),completed)return jqXHR;fireGlobals=jQuery.event&&s.global,fireGlobals&&0===jQuery.active++&&jQuery.event.trigger("ajaxStart"),s.type=s.type.toUpperCase(),s.hasContent=!rnoContent.test(s.type),cacheURL=s.url.replace(rhash,""),s.hasContent?s.data&&s.processData&&0===(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&(s.data=s.data.replace(r20,"+")):(uncached=s.url.slice(cacheURL.length),s.data&&(cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data,delete s.data),s.cache===!1&&(cacheURL=cacheURL.replace(rts,""),uncached=(rquery.test(cacheURL)?"&":"?")+"_="+nonce++ +uncached),s.url=cacheURL+uncached),s.ifModified&&(jQuery.lastModified[cacheURL]&&jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]),jQuery.etag[cacheURL]&&jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])),(s.data&&s.hasContent&&s.contentType!==!1||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType),jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+("*"!==s.dataTypes[0]?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===!1||completed))return jqXHR.abort();if(strAbort="abort",completeDeferred.add(s.complete),jqXHR.done(s.success),jqXHR.fail(s.error),transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR)){if(jqXHR.readyState=1,fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]),completed)return jqXHR;s.async&&s.timeout>0&&(timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout")},s.timeout));try{completed=!1,transport.send(requestHeaders,done)}catch(e){if(completed)throw e;done(-1,e)}}else done(-1,"No Transport");return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,void 0,callback,"script")}}),jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){return jQuery.isFunction(data)&&(type=type||callback,callback=data,data=void 0),jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url))}}),jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},jQuery.fn.extend({wrapAll:function(html){var wrap;return this[0]&&(jQuery.isFunction(html)&&(html=html.call(this[0])),wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&wrap.insertBefore(this[0]),wrap.map(function(){for(var elem=this;elem.firstElementChild;)elem=elem.firstElementChild;return elem}).append(this)),this},wrapInner:function(html){return jQuery.isFunction(html)?this.each(function(i){jQuery(this).wrapInner(html.call(this,i))}):this.each(function(){var self=jQuery(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(selector){return this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes)}),this}}),jQuery.expr.pseudos.hidden=function(elem){return!jQuery.expr.pseudos.visible(elem)},jQuery.expr.pseudos.visible=function(elem){return!!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length)},jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest}catch(e){}};var xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,support.ajax=xhrSupported=!!xhrSupported,jQuery.ajaxTransport(function(options){var callback,errorCallback;if(support.cors||xhrSupported&&!options.crossDomain)return{send:function(headers,complete){var i,xhr=options.xhr();if(xhr.open(options.type,options.url,options.async,options.username,options.password),options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];options.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(options.mimeType),options.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest");for(i in headers)xhr.setRequestHeader(i,headers[i]);callback=function(type){return function(){callback&&(callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.onreadystatechange=null,"abort"===type?xhr.abort():"error"===type?"number"!=typeof xhr.status?complete(0,"error"):complete(xhr.status,xhr.statusText):complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,"text"!==(xhr.responseType||"text")||"string"!=typeof xhr.responseText?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders()))}},xhr.onload=callback(),errorCallback=xhr.onerror=callback("error"),void 0!==xhr.onabort?xhr.onabort=errorCallback:xhr.onreadystatechange=function(){4===xhr.readyState&&window.setTimeout(function(){callback&&errorCallback()})},callback=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback)throw e}},abort:function(){callback&&callback()}}}),jQuery.ajaxPrefilter(function(s){s.crossDomain&&(s.contents.script=!1)}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(text){return jQuery.globalEval(text),text}}}),jQuery.ajaxPrefilter("script",function(s){void 0===s.cache&&(s.cache=!1),s.crossDomain&&(s.type="GET")}),jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("<script>").prop({charset:s.scriptCharset,src:s.url}).on("load error",callback=function(evt){script.remove(),callback=null,evt&&complete("error"===evt.type?404:200,evt.type)}),document.head.appendChild(script[0])},abort:function(){callback&&callback()}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;return this[callback]=!0,callback}}),jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==!1&&(rjsonp.test(s.url)?"url":"string"==typeof s.data&&0===(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");if(jsonProp||"jsonp"===s.dataTypes[0])return callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,jsonProp?s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName):s.jsonp!==!1&&(s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName),s.converters["script json"]=function(){return responseContainer||jQuery.error(callbackName+" was not called"),responseContainer[0]},s.dataTypes[0]="json",overwritten=window[callbackName],window[callbackName]=function(){responseContainer=arguments},jqXHR.always(function(){void 0===overwritten?jQuery(window).removeProp(callbackName):window[callbackName]=overwritten,s[callbackName]&&(s.jsonpCallback=originalSettings.jsonpCallback,oldCallbacks.push(callbackName)),responseContainer&&jQuery.isFunction(overwritten)&&overwritten(responseContainer[0]),responseContainer=overwritten=void 0}),"script"}),support.createHTMLDocument=function(){var body=document.implementation.createHTMLDocument("").body;return body.innerHTML="<form></form><form></form>",2===body.childNodes.length}(),jQuery.parseHTML=function(data,context,keepScripts){if("string"!=typeof data)return[];"boolean"==typeof context&&(keepScripts=context,context=!1);var base,parsed,scripts;return context||(support.createHTMLDocument?(context=document.implementation.createHTMLDocument(""),base=context.createElement("base"),base.href=document.location.href,context.head.appendChild(base)):context=document),parsed=rsingleTag.exec(data),scripts=!keepScripts&&[],parsed?[context.createElement(parsed[1])]:(parsed=buildFragment([data],context,scripts),scripts&&scripts.length&&jQuery(scripts).remove(),jQuery.merge([],parsed.childNodes))},jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(" ");return off>-1&&(selector=jQuery.trim(url.slice(off)),url=url.slice(0,off)),jQuery.isFunction(params)?(callback=params,params=void 0):params&&"object"==typeof params&&(type="POST"),self.length>0&&jQuery.ajax({url:url,type:type||"GET",dataType:"html",data:params}).done(function(responseText){response=arguments,self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)}).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR])})}),this},jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}}),jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length},jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};"static"===position&&(elem.style.position="relative"),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=("absolute"===position||"fixed"===position)&&(curCSSTop+curCSSLeft).indexOf("auto")>-1,calculatePosition?(curPosition=curElem.position(),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0),jQuery.isFunction(options)&&(options=options.call(elem,i,jQuery.extend({},curOffset))),null!=options.top&&(props.top=options.top-curOffset.top+curTop),null!=options.left&&(props.left=options.left-curOffset.left+curLeft),"using"in options?options.using.call(elem,props):curElem.css(props)}},jQuery.fn.extend({offset:function(options){if(arguments.length)return void 0===options?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var docElem,win,rect,doc,elem=this[0];if(elem)return elem.getClientRects().length?(rect=elem.getBoundingClientRect(),rect.width||rect.height?(doc=elem.ownerDocument,win=getWindow(doc),docElem=doc.documentElement,{top:rect.top+win.pageYOffset-docElem.clientTop,left:rect.left+win.pageXOffset-docElem.clientLeft}):rect):{top:0,left:0}},position:function(){if(this[0]){var offsetParent,offset,elem=this[0],parentOffset={top:0,left:0};return"fixed"===jQuery.css(elem,"position")?offset=elem.getBoundingClientRect():(offsetParent=this.offsetParent(),
offset=this.offset(),jQuery.nodeName(offsetParent[0],"html")||(parentOffset=offsetParent.offset()),parentOffset={top:parentOffset.top+jQuery.css(offsetParent[0],"borderTopWidth",!0),left:parentOffset.left+jQuery.css(offsetParent[0],"borderLeftWidth",!0)}),{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",!0),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent;offsetParent&&"static"===jQuery.css(offsetParent,"position");)offsetParent=offsetParent.offsetParent;return offsetParent||documentElement})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);return void 0===val?win?win[prop]:elem[method]:void(win?win.scrollTo(top?win.pageXOffset:val,top?val:win.pageYOffset):elem[method]=val)},method,val,arguments.length)}}),jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed)return computed=curCSS(elem,prop),rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed})}),jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||"boolean"!=typeof margin),extra=defaultExtra||(margin===!0||value===!0?"margin":"border");return access(this,function(elem,type,value){var doc;return jQuery.isWindow(elem)?0===funcName.indexOf("outer")?elem["inner"+name]:elem.document.documentElement["client"+name]:9===elem.nodeType?(doc=elem.documentElement,Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])):void 0===value?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:void 0,chainable)}})}),jQuery.fn.extend({bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return 1===arguments.length?this.off(selector,"**"):this.off(types,selector||"**",fn)}}),jQuery.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return jQuery});var _jQuery=window.jQuery,_$=window.$;return jQuery.noConflict=function(deep){return window.$===jQuery&&(window.$=_$),deep&&window.jQuery===jQuery&&(window.jQuery=_jQuery),jQuery},noGlobal||(window.jQuery=window.$=jQuery),jQuery}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function($){var version=$.fn.jquery.split(" ")[0].split(".");if(version[0]<2&&version[1]<9||1==version[0]&&9==version[1]&&version[2]<1||version[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function($){function transitionEnd(){var el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var name in transEndEventNames)if(void 0!==el.style[name])return{end:transEndEventNames[name]};return!1}$.fn.emulateTransitionEnd=function(duration){var called=!1,$el=this;$(this).one("bsTransitionEnd",function(){called=!0});var callback=function(){called||$($el).trigger($.support.transition.end)};return setTimeout(callback,duration),this},$(function(){$.support.transition=transitionEnd(),$.support.transition&&($.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function($){function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.alert");data||$this.data("bs.alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})}var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.VERSION="3.3.7",Alert.TRANSITION_DURATION=150,Alert.prototype.close=function(e){function removeElement(){$parent.detach().trigger("closed.bs.alert").remove()}var $this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,""));var $parent=$("#"===selector?[]:selector);e&&e.preventDefault(),$parent.length||($parent=$this.closest(".alert")),$parent.trigger(e=$.Event("close.bs.alert")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.one("bsTransitionEnd",removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement())};var old=$.fn.alert;$.fn.alert=Plugin,$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on("click.bs.alert.data-api",dismiss,Alert.prototype.close)}(jQuery),+function($){function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.button"),options="object"==typeof option&&option;data||$this.data("bs.button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})}var Button=function(element,options){this.$element=$(element),this.options=$.extend({},Button.DEFAULTS,options),this.isLoading=!1};Button.VERSION="3.3.7",Button.DEFAULTS={loadingText:"loading..."},Button.prototype.setState=function(state){var d="disabled",$el=this.$element,val=$el.is("input")?"val":"html",data=$el.data();state+="Text",null==data.resetText&&$el.data("resetText",$el[val]()),setTimeout($.proxy(function(){$el[val](null==data[state]?this.options[state]:data[state]),"loadingText"==state?(this.isLoading=!0,$el.addClass(d).attr(d,d).prop(d,!0)):this.isLoading&&(this.isLoading=!1,$el.removeClass(d).removeAttr(d).prop(d,!1))},this),0)},Button.prototype.toggle=function(){var changed=!0,$parent=this.$element.closest('[data-toggle="buttons"]');if($parent.length){var $input=this.$element.find("input");"radio"==$input.prop("type")?($input.prop("checked")&&(changed=!1),$parent.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==$input.prop("type")&&($input.prop("checked")!==this.$element.hasClass("active")&&(changed=!1),this.$element.toggleClass("active")),$input.prop("checked",this.$element.hasClass("active")),changed&&$input.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=Plugin,$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var $btn=$(e.target).closest(".btn");Plugin.call($btn,"toggle"),$(e.target).is('input[type="radio"], input[type="checkbox"]')||(e.preventDefault(),$btn.is("input,button")?$btn.trigger("focus"):$btn.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){$(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function($){function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.carousel"),options=$.extend({},Carousel.DEFAULTS,$this.data(),"object"==typeof option&&option),action="string"==typeof option?option:options.slide;data||$this.data("bs.carousel",data=new Carousel(this,options)),"number"==typeof option?data.to(option):action?data[action]():options.interval&&data.pause().cycle()})}var Carousel=function(element,options){this.$element=$(element),this.$indicators=this.$element.find(".carousel-indicators"),this.options=options,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",$.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",$.proxy(this.pause,this)).on("mouseleave.bs.carousel",$.proxy(this.cycle,this))};Carousel.VERSION="3.3.7",Carousel.TRANSITION_DURATION=600,Carousel.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},Carousel.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},Carousel.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},Carousel.prototype.getItemIndex=function(item){return this.$items=item.parent().children(".item"),this.$items.index(item||this.$active)},Carousel.prototype.getItemForDirection=function(direction,active){var activeIndex=this.getItemIndex(active),willWrap="prev"==direction&&0===activeIndex||"next"==direction&&activeIndex==this.$items.length-1;if(willWrap&&!this.options.wrap)return active;var delta="prev"==direction?-1:1,itemIndex=(activeIndex+delta)%this.$items.length;return this.$items.eq(itemIndex)},Carousel.prototype.to=function(pos){var that=this,activeIndex=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(pos>this.$items.length-1||pos<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){that.to(pos)}):activeIndex==pos?this.pause().cycle():this.slide(pos>activeIndex?"next":"prev",this.$items.eq(pos))},Carousel.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&$.support.transition&&(this.$element.trigger($.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},Carousel.prototype.next=function(){if(!this.sliding)return this.slide("next")},Carousel.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},Carousel.prototype.slide=function(type,next){var $active=this.$element.find(".item.active"),$next=next||this.getItemForDirection(type,$active),isCycling=this.interval,direction="next"==type?"left":"right",that=this;if($next.hasClass("active"))return this.sliding=!1;var relatedTarget=$next[0],slideEvent=$.Event("slide.bs.carousel",{relatedTarget:relatedTarget,direction:direction});if(this.$element.trigger(slideEvent),!slideEvent.isDefaultPrevented()){if(this.sliding=!0,isCycling&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)]);$nextIndicator&&$nextIndicator.addClass("active")}var slidEvent=$.Event("slid.bs.carousel",{relatedTarget:relatedTarget,direction:direction});return $.support.transition&&this.$element.hasClass("slide")?($next.addClass(type),$next[0].offsetWidth,$active.addClass(direction),$next.addClass(direction),$active.one("bsTransitionEnd",function(){$next.removeClass([type,direction].join(" ")).addClass("active"),$active.removeClass(["active",direction].join(" ")),that.sliding=!1,setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd(Carousel.TRANSITION_DURATION)):($active.removeClass("active"),$next.addClass("active"),this.sliding=!1,this.$element.trigger(slidEvent)),isCycling&&this.cycle(),this}};var old=$.fn.carousel;$.fn.carousel=Plugin,$.fn.carousel.Constructor=Carousel,$.fn.carousel.noConflict=function(){return $.fn.carousel=old,this};var clickHandler=function(e){var href,$this=$(this),$target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""));if($target.hasClass("carousel")){var options=$.extend({},$target.data(),$this.data()),slideIndex=$this.attr("data-slide-to");slideIndex&&(options.interval=!1),Plugin.call($target,options),slideIndex&&$target.data("bs.carousel").to(slideIndex),e.preventDefault()}};$(document).on("click.bs.carousel.data-api","[data-slide]",clickHandler).on("click.bs.carousel.data-api","[data-slide-to]",clickHandler),$(window).on("load",function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this);Plugin.call($carousel,$carousel.data())})})}(jQuery),+function($){function getTargetFromTrigger($trigger){var href,target=$trigger.attr("data-target")||(href=$trigger.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"");return $(target)}function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.collapse"),options=$.extend({},Collapse.DEFAULTS,$this.data(),"object"==typeof option&&option);!data&&options.toggle&&/show|hide/.test(option)&&(options.toggle=!1),data||$this.data("bs.collapse",data=new Collapse(this,options)),"string"==typeof option&&data[option]()})}var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},Collapse.DEFAULTS,options),this.$trigger=$('[data-toggle="collapse"][href="#'+element.id+'"],[data-toggle="collapse"][data-target="#'+element.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};Collapse.VERSION="3.3.7",Collapse.TRANSITION_DURATION=350,Collapse.DEFAULTS={toggle:!0},Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"},Collapse.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var activesData,actives=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(actives&&actives.length&&(activesData=actives.data("bs.collapse"),activesData&&activesData.transitioning))){var startEvent=$.Event("show.bs.collapse");if(this.$element.trigger(startEvent),!startEvent.isDefaultPrevented()){actives&&actives.length&&(Plugin.call(actives,"hide"),activesData||actives.data("bs.collapse",null));var dimension=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[dimension](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var complete=function(){this.$element.removeClass("collapsing").addClass("collapse in")[dimension](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!$.support.transition)return complete.call(this);var scrollSize=$.camelCase(["scroll",dimension].join("-"));this.$element.one("bsTransitionEnd",$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])}}}},Collapse.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var startEvent=$.Event("hide.bs.collapse");if(this.$element.trigger(startEvent),!startEvent.isDefaultPrevented()){var dimension=this.dimension();this.$element[dimension](this.$element[dimension]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var complete=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return $.support.transition?void this.$element[dimension](0).one("bsTransitionEnd",$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION):complete.call(this)}}},Collapse.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},Collapse.prototype.getParent=function(){return $(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each($.proxy(function(i,element){var $element=$(element);this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()},Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass("in");$element.attr("aria-expanded",isOpen),$trigger.toggleClass("collapsed",!isOpen).attr("aria-expanded",isOpen)};var old=$.fn.collapse;$.fn.collapse=Plugin,$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var $this=$(this);$this.attr("data-target")||e.preventDefault();var $target=getTargetFromTrigger($this),data=$target.data("bs.collapse"),option=data?"toggle":$this.data();Plugin.call($target,option)})}(jQuery),+function($){function getParent($this){var selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,""));var $parent=selector&&$(selector);return $parent&&$parent.length?$parent:$this.parent()}function clearMenus(e){e&&3===e.which||($(backdrop).remove(),$(toggle).each(function(){var $this=$(this),$parent=getParent($this),relatedTarget={relatedTarget:this};$parent.hasClass("open")&&(e&&"click"==e.type&&/input|textarea/i.test(e.target.tagName)&&$.contains($parent[0],e.target)||($parent.trigger(e=$.Event("hide.bs.dropdown",relatedTarget)),e.isDefaultPrevented()||($this.attr("aria-expanded","false"),$parent.removeClass("open").trigger($.Event("hidden.bs.dropdown",relatedTarget)))))}))}function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.dropdown");data||$this.data("bs.dropdown",data=new Dropdown(this)),"string"==typeof option&&data[option].call($this)})}var backdrop=".dropdown-backdrop",toggle='[data-toggle="dropdown"]',Dropdown=function(element){$(element).on("click.bs.dropdown",this.toggle)};Dropdown.VERSION="3.3.7",Dropdown.prototype.toggle=function(e){var $this=$(this);if(!$this.is(".disabled, :disabled")){var $parent=getParent($this),isActive=$parent.hasClass("open");if(clearMenus(),!isActive){"ontouchstart"in document.documentElement&&!$parent.closest(".navbar-nav").length&&$(document.createElement("div")).addClass("dropdown-backdrop").insertAfter($(this)).on("click",clearMenus);var relatedTarget={relatedTarget:this};if($parent.trigger(e=$.Event("show.bs.dropdown",relatedTarget)),e.isDefaultPrevented())return;$this.trigger("focus").attr("aria-expanded","true"),$parent.toggleClass("open").trigger($.Event("shown.bs.dropdown",relatedTarget))}return!1}},Dropdown.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var $this=$(this);if(e.preventDefault(),e.stopPropagation(),!$this.is(".disabled, :disabled")){var $parent=getParent($this),isActive=$parent.hasClass("open");if(!isActive&&27!=e.which||isActive&&27==e.which)return 27==e.which&&$parent.find(toggle).trigger("focus"),$this.trigger("click");var desc=" li:not(.disabled):visible a",$items=$parent.find(".dropdown-menu"+desc);if($items.length){var index=$items.index(e.target);38==e.which&&index>0&&index--,40==e.which&&index<$items.length-1&&index++,~index||(index=0),$items.eq(index).trigger("focus")}}}};var old=$.fn.dropdown;$.fn.dropdown=Plugin,$.fn.dropdown.Constructor=Dropdown,$.fn.dropdown.noConflict=function(){return $.fn.dropdown=old,this},$(document).on("click.bs.dropdown.data-api",clearMenus).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",toggle,Dropdown.prototype.toggle).on("keydown.bs.dropdown.data-api",toggle,Dropdown.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",Dropdown.prototype.keydown)}(jQuery),+function($){function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this),data=$this.data("bs.modal"),options=$.extend({},Modal.DEFAULTS,$this.data(),"object"==typeof option&&option);data||$this.data("bs.modal",data=new Modal(this,options)),"string"==typeof option?data[option](_relatedTarget):options.show&&data.show(_relatedTarget)})}var Modal=function(element,options){this.options=options,this.$body=$(document.body),this.$element=$(element),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,$.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};Modal.VERSION="3.3.7",Modal.TRANSITION_DURATION=300,Modal.BACKDROP_TRANSITION_DURATION=150,Modal.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)},Modal.prototype.show=function(_relatedTarget){var that=this,e=$.Event("show.bs.modal",{relatedTarget:_relatedTarget});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',$.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){that.$element.one("mouseup.dismiss.bs.modal",function(e){$(e.target).is(that.$element)&&(that.ignoreBackdropClick=!0)})}),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass("fade");that.$element.parent().length||that.$element.appendTo(that.$body),that.$element.show().scrollTop(0),that.adjustDialog(),transition&&that.$element[0].offsetWidth,that.$element.addClass("in"),that.enforceFocus();var e=$.Event("shown.bs.modal",{relatedTarget:_relatedTarget});transition?that.$dialog.one("bsTransitionEnd",function(){that.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger("focus").trigger(e)}))},Modal.prototype.hide=function(e){e&&e.preventDefault(),e=$.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),$(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),$.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal())},Modal.prototype.enforceFocus=function(){$(document).off("focusin.bs.modal").on("focusin.bs.modal",$.proxy(function(e){document===e.target||this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},Modal.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",$.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},Modal.prototype.resize=function(){this.isShown?$(window).on("resize.bs.modal",$.proxy(this.handleUpdate,this)):$(window).off("resize.bs.modal")},Modal.prototype.hideModal=function(){var that=this;this.$element.hide(),this.backdrop(function(){that.$body.removeClass("modal-open"),that.resetAdjustments(),that.resetScrollbar(),that.$element.trigger("hidden.bs.modal")})},Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},Modal.prototype.backdrop=function(callback){var that=this,animate=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;if(this.$backdrop=$(document.createElement("div")).addClass("modal-backdrop "+animate).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",$.proxy(function(e){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),doAnimate&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!callback)return;doAnimate?this.$backdrop.one("bsTransitionEnd",callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var callbackRemove=function(){that.removeBackdrop(),callback&&callback()};$.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else callback&&callback()},Modal.prototype.handleUpdate=function(){this.adjustDialog()},Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:""})},Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth;if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect();fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)}this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth,this.scrollbarWidth=this.measureScrollbar()},Modal.prototype.setScrollbar=function(){var bodyPad=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",bodyPad+this.scrollbarWidth)},Modal.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement("div");scrollDiv.className="modal-scrollbar-measure",this.$body.append(scrollDiv);var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth;return this.$body[0].removeChild(scrollDiv),scrollbarWidth};var old=$.fn.modal;$.fn.modal=Plugin,$.fn.modal.Constructor=Modal,$.fn.modal.noConflict=function(){return $.fn.modal=old,this},$(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var $this=$(this),href=$this.attr("href"),$target=$($this.attr("data-target")||href&&href.replace(/.*(?=#[^\s]+$)/,"")),option=$target.data("bs.modal")?"toggle":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());$this.is("a")&&e.preventDefault(),$target.one("show.bs.modal",function(showEvent){showEvent.isDefaultPrevented()||$target.one("hidden.bs.modal",function(){$this.is(":visible")&&$this.trigger("focus")})}),Plugin.call($target,option,this)})}(jQuery),+function($){function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.tooltip"),options="object"==typeof option&&option;!data&&/destroy|hide/.test(option)||(data||$this.data("bs.tooltip",data=new Tooltip(this,options)),"string"==typeof option&&data[option]())})}var Tooltip=function(element,options){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",element,options)};Tooltip.VERSION="3.3.7",Tooltip.TRANSITION_DURATION=150,Tooltip.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},Tooltip.prototype.init=function(type,element,options){if(this.enabled=!0,this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.$viewport=this.options.viewport&&$($.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var triggers=this.options.trigger.split(" "),i=triggers.length;i--;){var trigger=triggers[i];if("click"==trigger)this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this));else if("manual"!=trigger){var eventIn="hover"==trigger?"mouseenter":"focusin",eventOut="hover"==trigger?"mouseleave":"focusout";this.$element.on(eventIn+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(eventOut+"."+this.type,this.options.selector,$.proxy(this.leave,this))}}this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS},Tooltip.prototype.getOptions=function(options){return options=$.extend({},this.getDefaults(),this.$element.data(),options),options.delay&&"number"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},Tooltip.prototype.getDelegateOptions=function(){var options={},defaults=this.getDefaults();return this._options&&$.each(this._options,function(key,value){defaults[key]!=value&&(options[key]=value)}),options},Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data("bs."+this.type);return self||(self=new this.constructor(obj.currentTarget,this.getDelegateOptions()),$(obj.currentTarget).data("bs."+this.type,self)),obj instanceof $.Event&&(self.inState["focusin"==obj.type?"focus":"hover"]=!0),self.tip().hasClass("in")||"in"==self.hoverState?void(self.hoverState="in"):(clearTimeout(self.timeout),self.hoverState="in",self.options.delay&&self.options.delay.show?void(self.timeout=setTimeout(function(){"in"==self.hoverState&&self.show()},self.options.delay.show)):self.show())},Tooltip.prototype.isInStateTrue=function(){for(var key in this.inState)if(this.inState[key])return!0;return!1},Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data("bs."+this.type);if(self||(self=new this.constructor(obj.currentTarget,this.getDelegateOptions()),$(obj.currentTarget).data("bs."+this.type,self)),obj instanceof $.Event&&(self.inState["focusout"==obj.type?"focus":"hover"]=!1),!self.isInStateTrue())return clearTimeout(self.timeout),self.hoverState="out",self.options.delay&&self.options.delay.hide?void(self.timeout=setTimeout(function(){"out"==self.hoverState&&self.hide()},self.options.delay.hide)):self.hide()},Tooltip.prototype.show=function(){var e=$.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!inDom)return;var that=this,$tip=this.tip(),tipId=this.getUID(this.type);this.setContent(),$tip.attr("id",tipId),this.$element.attr("aria-describedby",tipId),this.options.animation&&$tip.addClass("fade");var placement="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,autoToken=/\s?auto?\s?/i,autoPlace=autoToken.test(placement);autoPlace&&(placement=placement.replace(autoToken,"")||"top"),$tip.detach().css({top:0,left:0,display:"block"}).addClass(placement).data("bs."+this.type,this),this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var pos=this.getPosition(),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight;if(autoPlace){var orgPlacement=placement,viewportDim=this.getPosition(this.$viewport);placement="bottom"==placement&&pos.bottom+actualHeight>viewportDim.bottom?"top":"top"==placement&&pos.top-actualHeight<viewportDim.top?"bottom":"right"==placement&&pos.right+actualWidth>viewportDim.width?"left":"left"==placement&&pos.left-actualWidth<viewportDim.left?"right":placement,$tip.removeClass(orgPlacement).addClass(placement)}var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight);this.applyPlacement(calculatedOffset,placement);var complete=function(){var prevHoverState=that.hoverState;that.$element.trigger("shown.bs."+that.type),that.hoverState=null,"out"==prevHoverState&&that.leave(that)};
$.support.transition&&this.$tip.hasClass("fade")?$tip.one("bsTransitionEnd",complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}},Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip(),width=$tip[0].offsetWidth,height=$tip[0].offsetHeight,marginTop=parseInt($tip.css("margin-top"),10),marginLeft=parseInt($tip.css("margin-left"),10);isNaN(marginTop)&&(marginTop=0),isNaN(marginLeft)&&(marginLeft=0),offset.top+=marginTop,offset.left+=marginLeft,$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0),$tip.addClass("in");var actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight;"top"==placement&&actualHeight!=height&&(offset.top=offset.top+height-actualHeight);var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight);delta.left?offset.left+=delta.left:offset.top+=delta.top;var isVertical=/top|bottom/.test(placement),arrowDelta=isVertical?2*delta.left-width+actualWidth:2*delta.top-height+actualHeight,arrowOffsetPosition=isVertical?"offsetWidth":"offsetHeight";$tip.offset(offset),this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)},Tooltip.prototype.replaceArrow=function(delta,dimension,isVertical){this.arrow().css(isVertical?"left":"top",50*(1-delta/dimension)+"%").css(isVertical?"top":"left","")},Tooltip.prototype.setContent=function(){var $tip=this.tip(),title=this.getTitle();$tip.find(".tooltip-inner")[this.options.html?"html":"text"](title),$tip.removeClass("fade in top bottom left right")},Tooltip.prototype.hide=function(callback){function complete(){"in"!=that.hoverState&&$tip.detach(),that.$element&&that.$element.removeAttr("aria-describedby").trigger("hidden.bs."+that.type),callback&&callback()}var that=this,$tip=$(this.$tip),e=$.Event("hide.bs."+this.type);if(this.$element.trigger(e),!e.isDefaultPrevented())return $tip.removeClass("in"),$.support.transition&&$tip.hasClass("fade")?$tip.one("bsTransitionEnd",complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete(),this.hoverState=null,this},Tooltip.prototype.fixTitle=function(){var $e=this.$element;($e.attr("title")||"string"!=typeof $e.attr("data-original-title"))&&$e.attr("data-original-title",$e.attr("title")||"").attr("title","")},Tooltip.prototype.hasContent=function(){return this.getTitle()},Tooltip.prototype.getPosition=function($element){$element=$element||this.$element;var el=$element[0],isBody="BODY"==el.tagName,elRect=el.getBoundingClientRect();null==elRect.width&&(elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top}));var isSvg=window.SVGElement&&el instanceof window.SVGElement,elOffset=isBody?{top:0,left:0}:isSvg?null:$element.offset(),scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()},outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null;return $.extend({},elRect,scroll,outerDims,elOffset)},Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return"bottom"==placement?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:"top"==placement?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:"left"==placement?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}},Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0};if(!this.$viewport)return delta;var viewportPadding=this.options.viewport&&this.options.viewport.padding||0,viewportDimensions=this.getPosition(this.$viewport);if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll,bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight;topEdgeOffset<viewportDimensions.top?delta.top=viewportDimensions.top-topEdgeOffset:bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height&&(delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset)}else{var leftEdgeOffset=pos.left-viewportPadding,rightEdgeOffset=pos.left+viewportPadding+actualWidth;leftEdgeOffset<viewportDimensions.left?delta.left=viewportDimensions.left-leftEdgeOffset:rightEdgeOffset>viewportDimensions.right&&(delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset)}return delta},Tooltip.prototype.getTitle=function(){var title,$e=this.$element,o=this.options;return title=$e.attr("data-original-title")||("function"==typeof o.title?o.title.call($e[0]):o.title)},Tooltip.prototype.getUID=function(prefix){do prefix+=~~(1e6*Math.random());while(document.getElementById(prefix));return prefix},Tooltip.prototype.tip=function(){if(!this.$tip&&(this.$tip=$(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},Tooltip.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},Tooltip.prototype.enable=function(){this.enabled=!0},Tooltip.prototype.disable=function(){this.enabled=!1},Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled},Tooltip.prototype.toggle=function(e){var self=this;e&&(self=$(e.currentTarget).data("bs."+this.type),self||(self=new this.constructor(e.currentTarget,this.getDelegateOptions()),$(e.currentTarget).data("bs."+this.type,self))),e?(self.inState.click=!self.inState.click,self.isInStateTrue()?self.enter(self):self.leave(self)):self.tip().hasClass("in")?self.leave(self):self.enter(self)},Tooltip.prototype.destroy=function(){var that=this;clearTimeout(this.timeout),this.hide(function(){that.$element.off("."+that.type).removeData("bs."+that.type),that.$tip&&that.$tip.detach(),that.$tip=null,that.$arrow=null,that.$viewport=null,that.$element=null})};var old=$.fn.tooltip;$.fn.tooltip=Plugin,$.fn.tooltip.Constructor=Tooltip,$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(jQuery),+function($){function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.popover"),options="object"==typeof option&&option;!data&&/destroy|hide/.test(option)||(data||$this.data("bs.popover",data=new Popover(this,options)),"string"==typeof option&&data[option]())})}var Popover=function(element,options){this.init("popover",element,options)};if(!$.fn.tooltip)throw new Error("Popover requires tooltip.js");Popover.VERSION="3.3.7",Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype),Popover.prototype.constructor=Popover,Popover.prototype.getDefaults=function(){return Popover.DEFAULTS},Popover.prototype.setContent=function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent();$tip.find(".popover-title")[this.options.html?"html":"text"](title),$tip.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof content?"html":"append":"text"](content),$tip.removeClass("fade top bottom left right in"),$tip.find(".popover-title").html()||$tip.find(".popover-title").hide()},Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()},Popover.prototype.getContent=function(){var $e=this.$element,o=this.options;return $e.attr("data-content")||("function"==typeof o.content?o.content.call($e[0]):o.content)},Popover.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var old=$.fn.popover;$.fn.popover=Plugin,$.fn.popover.Constructor=Popover,$.fn.popover.noConflict=function(){return $.fn.popover=old,this}}(jQuery),+function($){function ScrollSpy(element,options){this.$body=$(document.body),this.$scrollElement=$($(element).is(document.body)?window:element),this.options=$.extend({},ScrollSpy.DEFAULTS,options),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",$.proxy(this.process,this)),this.refresh(),this.process()}function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.scrollspy"),options="object"==typeof option&&option;data||$this.data("bs.scrollspy",data=new ScrollSpy(this,options)),"string"==typeof option&&data[option]()})}ScrollSpy.VERSION="3.3.7",ScrollSpy.DEFAULTS={offset:10},ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},ScrollSpy.prototype.refresh=function(){var that=this,offsetMethod="offset",offsetBase=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),$.isWindow(this.$scrollElement[0])||(offsetMethod="position",offsetBase=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data("target")||$el.attr("href"),$href=/^#./.test(href)&&$(href);return $href&&$href.length&&$href.is(":visible")&&[[$href[offsetMethod]().top+offsetBase,href]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){that.offsets.push(this[0]),that.targets.push(this[1])})},ScrollSpy.prototype.process=function(){var i,scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.getScrollHeight(),maxScroll=this.options.offset+scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget;if(this.scrollHeight!=scrollHeight&&this.refresh(),scrollTop>=maxScroll)return activeTarget!=(i=targets[targets.length-1])&&this.activate(i);if(activeTarget&&scrollTop<offsets[0])return this.activeTarget=null,this.clear();for(i=offsets.length;i--;)activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(void 0===offsets[i+1]||scrollTop<offsets[i+1])&&this.activate(targets[i])},ScrollSpy.prototype.activate=function(target){this.activeTarget=target,this.clear();var selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]',active=$(selector).parents("li").addClass("active");active.parent(".dropdown-menu").length&&(active=active.closest("li.dropdown").addClass("active")),active.trigger("activate.bs.scrollspy")},ScrollSpy.prototype.clear=function(){$(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var old=$.fn.scrollspy;$.fn.scrollspy=Plugin,$.fn.scrollspy.Constructor=ScrollSpy,$.fn.scrollspy.noConflict=function(){return $.fn.scrollspy=old,this},$(window).on("load.bs.scrollspy.data-api",function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this);Plugin.call($spy,$spy.data())})})}(jQuery),+function($){function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.tab");data||$this.data("bs.tab",data=new Tab(this)),"string"==typeof option&&data[option]()})}var Tab=function(element){this.element=$(element)};Tab.VERSION="3.3.7",Tab.TRANSITION_DURATION=150,Tab.prototype.show=function(){var $this=this.element,$ul=$this.closest("ul:not(.dropdown-menu)"),selector=$this.data("target");if(selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),!$this.parent("li").hasClass("active")){var $previous=$ul.find(".active:last a"),hideEvent=$.Event("hide.bs.tab",{relatedTarget:$this[0]}),showEvent=$.Event("show.bs.tab",{relatedTarget:$previous[0]});if($previous.trigger(hideEvent),$this.trigger(showEvent),!showEvent.isDefaultPrevented()&&!hideEvent.isDefaultPrevented()){var $target=$(selector);this.activate($this.closest("li"),$ul),this.activate($target,$target.parent(),function(){$previous.trigger({type:"hidden.bs.tab",relatedTarget:$this[0]}),$this.trigger({type:"shown.bs.tab",relatedTarget:$previous[0]})})}}},Tab.prototype.activate=function(element,container,callback){function next(){$active.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),element.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),transition?(element[0].offsetWidth,element.addClass("in")):element.removeClass("fade"),element.parent(".dropdown-menu").length&&element.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),callback&&callback()}var $active=container.find("> .active"),transition=callback&&$.support.transition&&($active.length&&$active.hasClass("fade")||!!container.find("> .fade").length);$active.length&&transition?$active.one("bsTransitionEnd",next).emulateTransitionEnd(Tab.TRANSITION_DURATION):next(),$active.removeClass("in")};var old=$.fn.tab;$.fn.tab=Plugin,$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=function(){return $.fn.tab=old,this};var clickHandler=function(e){e.preventDefault(),Plugin.call($(this),"show")};$(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',clickHandler).on("click.bs.tab.data-api",'[data-toggle="pill"]',clickHandler)}(jQuery),+function($){function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data("bs.affix"),options="object"==typeof option&&option;data||$this.data("bs.affix",data=new Affix(this,options)),"string"==typeof option&&data[option]()})}var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options),this.$target=$(this.options.target).on("scroll.bs.affix.data-api",$.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",$.proxy(this.checkPositionWithEventLoop,this)),this.$element=$(element),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};Affix.VERSION="3.3.7",Affix.RESET="affix affix-top affix-bottom",Affix.DEFAULTS={offset:0,target:window},Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop(),position=this.$element.offset(),targetHeight=this.$target.height();if(null!=offsetTop&&"top"==this.affixed)return scrollTop<offsetTop&&"top";if("bottom"==this.affixed)return null!=offsetTop?!(scrollTop+this.unpin<=position.top)&&"bottom":!(scrollTop+targetHeight<=scrollHeight-offsetBottom)&&"bottom";var initializing=null==this.affixed,colliderTop=initializing?scrollTop:position.top,colliderHeight=initializing?targetHeight:height;return null!=offsetTop&&scrollTop<=offsetTop?"top":null!=offsetBottom&&colliderTop+colliderHeight>=scrollHeight-offsetBottom&&"bottom"},Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(Affix.RESET).addClass("affix");var scrollTop=this.$target.scrollTop(),position=this.$element.offset();return this.pinnedOffset=position.top-scrollTop},Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)},Affix.prototype.checkPosition=function(){if(this.$element.is(":visible")){var height=this.$element.height(),offset=this.options.offset,offsetTop=offset.top,offsetBottom=offset.bottom,scrollHeight=Math.max($(document).height(),$(document.body).height());"object"!=typeof offset&&(offsetBottom=offsetTop=offset),"function"==typeof offsetTop&&(offsetTop=offset.top(this.$element)),"function"==typeof offsetBottom&&(offsetBottom=offset.bottom(this.$element));var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom);if(this.affixed!=affix){null!=this.unpin&&this.$element.css("top","");var affixType="affix"+(affix?"-"+affix:""),e=$.Event(affixType+".bs.affix");if(this.$element.trigger(e),e.isDefaultPrevented())return;this.affixed=affix,this.unpin="bottom"==affix?this.getPinnedOffset():null,this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace("affix","affixed")+".bs.affix")}"bottom"==affix&&this.$element.offset({top:scrollHeight-height-offsetBottom})}};var old=$.fn.affix;$.fn.affix=Plugin,$.fn.affix.Constructor=Affix,$.fn.affix.noConflict=function(){return $.fn.affix=old,this},$(window).on("load",function(){$('[data-spy="affix"]').each(function(){var $spy=$(this),data=$spy.data();data.offset=data.offset||{},null!=data.offsetBottom&&(data.offset.bottom=data.offsetBottom),null!=data.offsetTop&&(data.offset.top=data.offsetTop),Plugin.call($spy,data)})})}(jQuery),function(window,document,undefined){function minErr(module,ErrorConstructor){return ErrorConstructor=ErrorConstructor||Error,function(){var paramPrefix,i,SKIP_INDEXES=2,templateArgs=arguments,code=templateArgs[0],message="["+(module?module+":":"")+code+"] ",template=templateArgs[1];for(message+=template.replace(/\{\d+\}/g,function(match){var index=+match.slice(1,-1),shiftedIndex=index+SKIP_INDEXES;return shiftedIndex<templateArgs.length?toDebugString(templateArgs[shiftedIndex]):match}),message+="\nhttp://errors.angularjs.org/1.4.12/"+(module?module+"/":"")+code,i=SKIP_INDEXES,paramPrefix="?";i<templateArgs.length;i++,paramPrefix="&")message+=paramPrefix+"p"+(i-SKIP_INDEXES)+"="+encodeURIComponent(toDebugString(templateArgs[i]));return new ErrorConstructor(message)}}function isArrayLike(obj){if(null==obj||isWindow(obj))return!1;if(isArray(obj)||isString(obj)||jqLite&&obj instanceof jqLite)return!0;var length="length"in Object(obj)&&obj.length;return isNumber(length)&&(length>=0&&(length-1 in obj||obj instanceof Array)||"function"==typeof obj.item)}function forEach(obj,iterator,context){var key,length;if(obj)if(isFunction(obj))for(key in obj)"prototype"==key||"length"==key||"name"==key||obj.hasOwnProperty&&!obj.hasOwnProperty(key)||iterator.call(context,obj[key],key,obj);else if(isArray(obj)||isArrayLike(obj)){var isPrimitive="object"!=typeof obj;for(key=0,length=obj.length;key<length;key++)(isPrimitive||key in obj)&&iterator.call(context,obj[key],key,obj)}else if(obj.forEach&&obj.forEach!==forEach)obj.forEach(iterator,context,obj);else if(isBlankObject(obj))for(key in obj)iterator.call(context,obj[key],key,obj);else if("function"==typeof obj.hasOwnProperty)for(key in obj)obj.hasOwnProperty(key)&&iterator.call(context,obj[key],key,obj);else for(key in obj)hasOwnProperty.call(obj,key)&&iterator.call(context,obj[key],key,obj);return obj}function forEachSorted(obj,iterator,context){for(var keys=Object.keys(obj).sort(),i=0;i<keys.length;i++)iterator.call(context,obj[keys[i]],keys[i]);return keys}function reverseParams(iteratorFn){return function(value,key){iteratorFn(key,value)}}function nextUid(){return++uid}function setHashKey(obj,h){h?obj.$$hashKey=h:delete obj.$$hashKey}function baseExtend(dst,objs,deep){for(var h=dst.$$hashKey,i=0,ii=objs.length;i<ii;++i){var obj=objs[i];if(isObject(obj)||isFunction(obj))for(var keys=Object.keys(obj),j=0,jj=keys.length;j<jj;j++){var key=keys[j],src=obj[key];deep&&isObject(src)?isDate(src)?dst[key]=new Date(src.valueOf()):isRegExp(src)?dst[key]=new RegExp(src):src.nodeName?dst[key]=src.cloneNode(!0):isElement(src)?dst[key]=src.clone():(isObject(dst[key])||(dst[key]=isArray(src)?[]:{}),baseExtend(dst[key],[src],!0)):dst[key]=src}}return setHashKey(dst,h),dst}function extend(dst){return baseExtend(dst,slice.call(arguments,1),!1)}function merge(dst){return baseExtend(dst,slice.call(arguments,1),!0)}function toInt(str){return parseInt(str,10)}function inherit(parent,extra){return extend(Object.create(parent),extra)}function noop(){}function identity($){return $}function valueFn(value){return function(){return value}}function hasCustomToString(obj){return isFunction(obj.toString)&&obj.toString!==toString}function isUndefined(value){return"undefined"==typeof value}function isDefined(value){return"undefined"!=typeof value}function isObject(value){return null!==value&&"object"==typeof value}function isBlankObject(value){return null!==value&&"object"==typeof value&&!getPrototypeOf(value)}function isString(value){return"string"==typeof value}function isNumber(value){return"number"==typeof value}function isDate(value){return"[object Date]"===toString.call(value)}function isFunction(value){return"function"==typeof value}function isRegExp(value){return"[object RegExp]"===toString.call(value)}function isWindow(obj){return obj&&obj.window===obj}function isScope(obj){return obj&&obj.$evalAsync&&obj.$watch}function isFile(obj){return"[object File]"===toString.call(obj)}function isFormData(obj){return"[object FormData]"===toString.call(obj)}function isBlob(obj){return"[object Blob]"===toString.call(obj)}function isBoolean(value){return"boolean"==typeof value}function isPromiseLike(obj){return obj&&isFunction(obj.then)}function isTypedArray(value){return value&&isNumber(value.length)&&TYPED_ARRAY_REGEXP.test(toString.call(value))}function isElement(node){return!(!node||!(node.nodeName||node.prop&&node.attr&&node.find))}function makeMap(str){var i,obj={},items=str.split(",");for(i=0;i<items.length;i++)obj[items[i]]=!0;return obj}function nodeName_(element){return lowercase(element.nodeName||element[0]&&element[0].nodeName)}function arrayRemove(array,value){var index=array.indexOf(value);return index>=0&&array.splice(index,1),index}function copy(source,destination){function copyRecurse(source,destination){var key,h=destination.$$hashKey;if(isArray(source))for(var i=0,ii=source.length;i<ii;i++)destination.push(copyElement(source[i]));else if(isBlankObject(source))for(key in source)destination[key]=copyElement(source[key]);else if(source&&"function"==typeof source.hasOwnProperty)for(key in source)source.hasOwnProperty(key)&&(destination[key]=copyElement(source[key]));else for(key in source)hasOwnProperty.call(source,key)&&(destination[key]=copyElement(source[key]));return setHashKey(destination,h),destination}function copyElement(source){if(!isObject(source))return source;var index=stackSource.indexOf(source);if(index!==-1)return stackDest[index];if(isWindow(source)||isScope(source))throw ngMinErr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var destination,needsRecurse=!1;return isArray(source)?(destination=[],needsRecurse=!0):isTypedArray(source)?destination=new source.constructor(source):isDate(source)?destination=new Date(source.getTime()):isRegExp(source)?(destination=new RegExp(source.source,source.toString().match(/[^\/]*$/)[0]),destination.lastIndex=source.lastIndex):isBlob(source)?destination=new source.constructor([source],{type:source.type}):isFunction(source.cloneNode)?destination=source.cloneNode(!0):(destination=Object.create(getPrototypeOf(source)),needsRecurse=!0),stackSource.push(source),stackDest.push(destination),needsRecurse?copyRecurse(source,destination):destination}var stackSource=[],stackDest=[];if(destination){if(isTypedArray(destination))throw ngMinErr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(source===destination)throw ngMinErr("cpi","Can't copy! Source and destination are identical.");return isArray(destination)?destination.length=0:forEach(destination,function(value,key){"$$hashKey"!==key&&delete destination[key]}),stackSource.push(source),stackDest.push(destination),copyRecurse(source,destination)}return copyElement(source)}function shallowCopy(src,dst){if(isArray(src)){dst=dst||[];for(var i=0,ii=src.length;i<ii;i++)dst[i]=src[i]}else if(isObject(src)){dst=dst||{};for(var key in src)"$"===key.charAt(0)&&"$"===key.charAt(1)||(dst[key]=src[key])}return dst||src}function equals(o1,o2){if(o1===o2)return!0;if(null===o1||null===o2)return!1;if(o1!==o1&&o2!==o2)return!0;var length,key,keySet,t1=typeof o1,t2=typeof o2;if(t1==t2&&"object"==t1){if(!isArray(o1)){if(isDate(o1))return!!isDate(o2)&&equals(o1.getTime(),o2.getTime());if(isRegExp(o1))return!!isRegExp(o2)&&o1.toString()==o2.toString();if(isScope(o1)||isScope(o2)||isWindow(o1)||isWindow(o2)||isArray(o2)||isDate(o2)||isRegExp(o2))return!1;keySet=createMap();for(key in o1)if("$"!==key.charAt(0)&&!isFunction(o1[key])){if(!equals(o1[key],o2[key]))return!1;keySet[key]=!0}for(key in o2)if(!(key in keySet)&&"$"!==key.charAt(0)&&isDefined(o2[key])&&!isFunction(o2[key]))return!1;return!0}if(!isArray(o2))return!1;if((length=o1.length)==o2.length){for(key=0;key<length;key++)if(!equals(o1[key],o2[key]))return!1;return!0}}return!1}function concat(array1,array2,index){return array1.concat(slice.call(array2,index))}function sliceArgs(args,startIndex){return slice.call(args,startIndex||0)}function bind(self,fn){var curryArgs=arguments.length>2?sliceArgs(arguments,2):[];return!isFunction(fn)||fn instanceof RegExp?fn:curryArgs.length?function(){return arguments.length?fn.apply(self,concat(curryArgs,arguments,0)):fn.apply(self,curryArgs)}:function(){return arguments.length?fn.apply(self,arguments):fn.call(self)}}function toJsonReplacer(key,value){var val=value;return"string"==typeof key&&"$"===key.charAt(0)&&"$"===key.charAt(1)?val=undefined:isWindow(value)?val="$WINDOW":value&&document===value?val="$DOCUMENT":isScope(value)&&(val="$SCOPE"),val}function toJson(obj,pretty){return isUndefined(obj)?undefined:(isNumber(pretty)||(pretty=pretty?2:null),JSON.stringify(obj,toJsonReplacer,pretty))}function fromJson(json){return isString(json)?JSON.parse(json):json}function timezoneToOffset(timezone,fallback){timezone=timezone.replace(ALL_COLONS,"");var requestedTimezoneOffset=Date.parse("Jan 01, 1970 00:00:00 "+timezone)/6e4;return isNaN(requestedTimezoneOffset)?fallback:requestedTimezoneOffset}function addDateMinutes(date,minutes){return date=new Date(date.getTime()),date.setMinutes(date.getMinutes()+minutes),date}function convertTimezoneToLocal(date,timezone,reverse){reverse=reverse?-1:1;var dateTimezoneOffset=date.getTimezoneOffset(),timezoneOffset=timezoneToOffset(timezone,dateTimezoneOffset);return addDateMinutes(date,reverse*(timezoneOffset-dateTimezoneOffset))}function startingTag(element){element=jqLite(element).clone();try{element.empty()}catch(e){}var elemHtml=jqLite("<div>").append(element).html();try{return element[0].nodeType===NODE_TYPE_TEXT?lowercase(elemHtml):elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(match,nodeName){return"<"+lowercase(nodeName)})}catch(e){return lowercase(elemHtml)}}function tryDecodeURIComponent(value){try{return decodeURIComponent(value)}catch(e){}}function parseKeyValue(keyValue){var obj={};return forEach((keyValue||"").split("&"),function(keyValue){var splitPoint,key,val;keyValue&&(key=keyValue=keyValue.replace(/\+/g,"%20"),splitPoint=keyValue.indexOf("="),splitPoint!==-1&&(key=keyValue.substring(0,splitPoint),val=keyValue.substring(splitPoint+1)),key=tryDecodeURIComponent(key),isDefined(key)&&(val=!isDefined(val)||tryDecodeURIComponent(val),hasOwnProperty.call(obj,key)?isArray(obj[key])?obj[key].push(val):obj[key]=[obj[key],val]:obj[key]=val))}),obj}function toKeyValue(obj){var parts=[];return forEach(obj,function(value,key){isArray(value)?forEach(value,function(arrayValue){parts.push(encodeUriQuery(key,!0)+(arrayValue===!0?"":"="+encodeUriQuery(arrayValue,!0)))}):parts.push(encodeUriQuery(key,!0)+(value===!0?"":"="+encodeUriQuery(value,!0)))}),parts.length?parts.join("&"):""}function encodeUriSegment(val){return encodeUriQuery(val,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function encodeUriQuery(val,pctEncodeSpaces){return encodeURIComponent(val).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,pctEncodeSpaces?"%20":"+")}function getNgAttribute(element,ngAttr){var attr,i,ii=ngAttrPrefixes.length;for(i=0;i<ii;++i)if(attr=ngAttrPrefixes[i]+ngAttr,isString(attr=element.getAttribute(attr)))return attr;return null}function angularInit(element,bootstrap){var appElement,module,config={};forEach(ngAttrPrefixes,function(prefix){var name=prefix+"app";!appElement&&element.hasAttribute&&element.hasAttribute(name)&&(appElement=element,module=element.getAttribute(name))}),forEach(ngAttrPrefixes,function(prefix){var candidate,name=prefix+"app";!appElement&&(candidate=element.querySelector("["+name.replace(":","\\:")+"]"))&&(appElement=candidate,module=candidate.getAttribute(name))}),appElement&&(config.strictDi=null!==getNgAttribute(appElement,"strict-di"),bootstrap(appElement,module?[module]:[],config))}function bootstrap(element,modules,config){isObject(config)||(config={});var defaultConfig={strictDi:!1};config=extend(defaultConfig,config);var doBootstrap=function(){if(element=jqLite(element),element.injector()){var tag=element[0]===document?"document":startingTag(element);throw ngMinErr("btstrpd","App already bootstrapped with this element '{0}'",tag.replace(/</,"&lt;").replace(/>/,"&gt;"))}modules=modules||[],modules.unshift(["$provide",function($provide){$provide.value("$rootElement",element)}]),config.debugInfoEnabled&&modules.push(["$compileProvider",function($compileProvider){$compileProvider.debugInfoEnabled(!0)}]),modules.unshift("ng");var injector=createInjector(modules,config.strictDi);return injector.invoke(["$rootScope","$rootElement","$compile","$injector",function(scope,element,compile,injector){scope.$apply(function(){element.data("$injector",injector),compile(element)(scope)})}]),injector},NG_ENABLE_DEBUG_INFO=/^NG_ENABLE_DEBUG_INFO!/,NG_DEFER_BOOTSTRAP=/^NG_DEFER_BOOTSTRAP!/;return window&&NG_ENABLE_DEBUG_INFO.test(window.name)&&(config.debugInfoEnabled=!0,window.name=window.name.replace(NG_ENABLE_DEBUG_INFO,"")),window&&!NG_DEFER_BOOTSTRAP.test(window.name)?doBootstrap():(window.name=window.name.replace(NG_DEFER_BOOTSTRAP,""),angular.resumeBootstrap=function(extraModules){return forEach(extraModules,function(module){modules.push(module)}),doBootstrap()},void(isFunction(angular.resumeDeferredBootstrap)&&angular.resumeDeferredBootstrap()))}function reloadWithDebugInfo(){window.name="NG_ENABLE_DEBUG_INFO!"+window.name,window.location.reload()}function getTestability(rootElement){var injector=angular.element(rootElement).injector();if(!injector)throw ngMinErr("test","no injector found for element argument to getTestability");return injector.get("$$testability")}function snake_case(name,separator){return separator=separator||"_",name.replace(SNAKE_CASE_REGEXP,function(letter,pos){return(pos?separator:"")+letter.toLowerCase()})}function bindJQuery(){var originalCleanData;if(!bindJQueryFired){var jqName=jq();jQuery=isUndefined(jqName)?window.jQuery:jqName?window[jqName]:undefined,jQuery&&jQuery.fn.on?(jqLite=jQuery,extend(jQuery.fn,{scope:JQLitePrototype.scope,isolateScope:JQLitePrototype.isolateScope,controller:JQLitePrototype.controller,injector:JQLitePrototype.injector,inheritedData:JQLitePrototype.inheritedData}),originalCleanData=jQuery.cleanData,jQuery.cleanData=function(elems){var events;if(skipDestroyOnNextJQueryCleanData)skipDestroyOnNextJQueryCleanData=!1;else for(var elem,i=0;null!=(elem=elems[i]);i++)events=jQuery._data(elem,"events"),events&&events.$destroy&&jQuery(elem).triggerHandler("$destroy");originalCleanData(elems)}):jqLite=JQLite,angular.element=jqLite,bindJQueryFired=!0}}function assertArg(arg,name,reason){if(!arg)throw ngMinErr("areq","Argument '{0}' is {1}",name||"?",reason||"required");return arg}function assertArgFn(arg,name,acceptArrayAnnotation){return acceptArrayAnnotation&&isArray(arg)&&(arg=arg[arg.length-1]),assertArg(isFunction(arg),name,"not a function, got "+(arg&&"object"==typeof arg?arg.constructor.name||"Object":typeof arg)),arg}function assertNotHasOwnProperty(name,context){if("hasOwnProperty"===name)throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context)}function getter(obj,path,bindFnToScope){if(!path)return obj;for(var key,keys=path.split("."),lastInstance=obj,len=keys.length,i=0;i<len;i++)key=keys[i],obj&&(obj=(lastInstance=obj)[key]);return!bindFnToScope&&isFunction(obj)?bind(lastInstance,obj):obj}function getBlockNodes(nodes){for(var blockNodes,node=nodes[0],endNode=nodes[nodes.length-1],i=1;node!==endNode&&(node=node.nextSibling);i++)(blockNodes||nodes[i]!==node)&&(blockNodes||(blockNodes=jqLite(slice.call(nodes,0,i))),blockNodes.push(node));return blockNodes||nodes}function createMap(){return Object.create(null)}function setupModuleLoader(window){
function ensure(obj,name,factory){return obj[name]||(obj[name]=factory())}var $injectorMinErr=minErr("$injector"),ngMinErr=minErr("ng"),angular=ensure(window,"angular",Object);return angular.$$minErr=angular.$$minErr||minErr,ensure(angular,"module",function(){var modules={};return function(name,requires,configFn){var assertNotHasOwnProperty=function(name,context){if("hasOwnProperty"===name)throw ngMinErr("badname","hasOwnProperty is not a valid {0} name",context)};return assertNotHasOwnProperty(name,"module"),requires&&modules.hasOwnProperty(name)&&(modules[name]=null),ensure(modules,name,function(){function invokeLater(provider,method,insertMethod,queue){return queue||(queue=invokeQueue),function(){return queue[insertMethod||"push"]([provider,method,arguments]),moduleInstance}}function invokeLaterAndSetModuleName(provider,method){return function(recipeName,factoryFunction){return factoryFunction&&isFunction(factoryFunction)&&(factoryFunction.$$moduleName=name),invokeQueue.push([provider,method,arguments]),moduleInstance}}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);var invokeQueue=[],configBlocks=[],runBlocks=[],config=invokeLater("$injector","invoke","push",configBlocks),moduleInstance={_invokeQueue:invokeQueue,_configBlocks:configBlocks,_runBlocks:runBlocks,requires:requires,name:name,provider:invokeLaterAndSetModuleName("$provide","provider"),factory:invokeLaterAndSetModuleName("$provide","factory"),service:invokeLaterAndSetModuleName("$provide","service"),value:invokeLater("$provide","value"),constant:invokeLater("$provide","constant","unshift"),decorator:invokeLaterAndSetModuleName("$provide","decorator"),animation:invokeLaterAndSetModuleName("$animateProvider","register"),filter:invokeLaterAndSetModuleName("$filterProvider","register"),controller:invokeLaterAndSetModuleName("$controllerProvider","register"),directive:invokeLaterAndSetModuleName("$compileProvider","directive"),config:config,run:function(block){return runBlocks.push(block),this}};return configFn&&config(configFn),moduleInstance})}})}function serializeObject(obj){var seen=[];return JSON.stringify(obj,function(key,val){if(val=toJsonReplacer(key,val),isObject(val)){if(seen.indexOf(val)>=0)return"...";seen.push(val)}return val})}function toDebugString(obj){return"function"==typeof obj?obj.toString().replace(/ \{[\s\S]*$/,""):isUndefined(obj)?"undefined":"string"!=typeof obj?serializeObject(obj):obj}function publishExternalAPI(angular){extend(angular,{bootstrap:bootstrap,copy:copy,extend:extend,merge:merge,equals:equals,element:jqLite,forEach:forEach,injector:createInjector,noop:noop,bind:bind,toJson:toJson,fromJson:fromJson,identity:identity,isUndefined:isUndefined,isDefined:isDefined,isString:isString,isFunction:isFunction,isObject:isObject,isNumber:isNumber,isElement:isElement,isArray:isArray,version:version,isDate:isDate,lowercase:lowercase,uppercase:uppercase,callbacks:{counter:0},getTestability:getTestability,$$minErr:minErr,$$csp:csp,reloadWithDebugInfo:reloadWithDebugInfo}),(angularModule=setupModuleLoader(window))("ng",["ngLocale"],["$provide",function($provide){$provide.provider({$$sanitizeUri:$$SanitizeUriProvider}),$provide.provider("$compile",$CompileProvider).directive({a:htmlAnchorDirective,input:inputDirective,textarea:inputDirective,form:formDirective,script:scriptDirective,select:selectDirective,style:styleDirective,option:optionDirective,ngBind:ngBindDirective,ngBindHtml:ngBindHtmlDirective,ngBindTemplate:ngBindTemplateDirective,ngClass:ngClassDirective,ngClassEven:ngClassEvenDirective,ngClassOdd:ngClassOddDirective,ngCloak:ngCloakDirective,ngController:ngControllerDirective,ngForm:ngFormDirective,ngHide:ngHideDirective,ngIf:ngIfDirective,ngInclude:ngIncludeDirective,ngInit:ngInitDirective,ngNonBindable:ngNonBindableDirective,ngPluralize:ngPluralizeDirective,ngRepeat:ngRepeatDirective,ngShow:ngShowDirective,ngStyle:ngStyleDirective,ngSwitch:ngSwitchDirective,ngSwitchWhen:ngSwitchWhenDirective,ngSwitchDefault:ngSwitchDefaultDirective,ngOptions:ngOptionsDirective,ngTransclude:ngTranscludeDirective,ngModel:ngModelDirective,ngList:ngListDirective,ngChange:ngChangeDirective,pattern:patternDirective,ngPattern:patternDirective,required:requiredDirective,ngRequired:requiredDirective,minlength:minlengthDirective,ngMinlength:minlengthDirective,maxlength:maxlengthDirective,ngMaxlength:maxlengthDirective,ngValue:ngValueDirective,ngModelOptions:ngModelOptionsDirective}).directive({ngInclude:ngIncludeFillContentDirective}).directive(ngAttributeAliasDirectives).directive(ngEventDirectives),$provide.provider({$anchorScroll:$AnchorScrollProvider,$animate:$AnimateProvider,$animateCss:$CoreAnimateCssProvider,$$animateJs:$$CoreAnimateJsProvider,$$animateQueue:$$CoreAnimateQueueProvider,$$AnimateRunner:$$AnimateRunnerFactoryProvider,$$animateAsyncRun:$$AnimateAsyncRunFactoryProvider,$browser:$BrowserProvider,$cacheFactory:$CacheFactoryProvider,$controller:$ControllerProvider,$document:$DocumentProvider,$exceptionHandler:$ExceptionHandlerProvider,$filter:$FilterProvider,$$forceReflow:$$ForceReflowProvider,$interpolate:$InterpolateProvider,$interval:$IntervalProvider,$http:$HttpProvider,$httpParamSerializer:$HttpParamSerializerProvider,$httpParamSerializerJQLike:$HttpParamSerializerJQLikeProvider,$httpBackend:$HttpBackendProvider,$xhrFactory:$xhrFactoryProvider,$location:$LocationProvider,$log:$LogProvider,$parse:$ParseProvider,$rootScope:$RootScopeProvider,$q:$QProvider,$$q:$$QProvider,$sce:$SceProvider,$sceDelegate:$SceDelegateProvider,$sniffer:$SnifferProvider,$templateCache:$TemplateCacheProvider,$templateRequest:$TemplateRequestProvider,$$testability:$$TestabilityProvider,$timeout:$TimeoutProvider,$window:$WindowProvider,$$rAF:$$RAFProvider,$$jqLite:$$jqLiteProvider,$$HashMap:$$HashMapProvider,$$cookieReader:$$CookieReaderProvider})}])}function jqNextId(){return++jqId}function camelCase(name){return name.replace(SPECIAL_CHARS_REGEXP,function(_,separator,letter,offset){return offset?letter.toUpperCase():letter}).replace(MOZ_HACK_REGEXP,"Moz$1")}function jqLiteIsTextNode(html){return!HTML_REGEXP.test(html)}function jqLiteAcceptsData(node){var nodeType=node.nodeType;return nodeType===NODE_TYPE_ELEMENT||!nodeType||nodeType===NODE_TYPE_DOCUMENT}function jqLiteHasData(node){for(var key in jqCache[node.ng339])return!0;return!1}function jqLiteBuildFragment(html,context){var tmp,tag,wrap,i,fragment=context.createDocumentFragment(),nodes=[];if(jqLiteIsTextNode(html))nodes.push(context.createTextNode(html));else{for(tmp=tmp||fragment.appendChild(context.createElement("div")),tag=(TAG_NAME_REGEXP.exec(html)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+html.replace(XHTML_TAG_REGEXP,"<$1></$2>")+wrap[2],i=wrap[0];i--;)tmp=tmp.lastChild;nodes=concat(nodes,tmp.childNodes),tmp=fragment.firstChild,tmp.textContent=""}return fragment.textContent="",fragment.innerHTML="",forEach(nodes,function(node){fragment.appendChild(node)}),fragment}function jqLiteParseHTML(html,context){context=context||document;var parsed;return(parsed=SINGLE_TAG_REGEXP.exec(html))?[context.createElement(parsed[1])]:(parsed=jqLiteBuildFragment(html,context))?parsed.childNodes:[]}function jqLiteWrapNode(node,wrapper){var parent=node.parentNode;parent&&parent.replaceChild(wrapper,node),wrapper.appendChild(node)}function JQLite(element){if(element instanceof JQLite)return element;var argIsString;if(isString(element)&&(element=trim(element),argIsString=!0),!(this instanceof JQLite)){if(argIsString&&"<"!=element.charAt(0))throw jqLiteMinErr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new JQLite(element)}argIsString?jqLiteAddNodes(this,jqLiteParseHTML(element)):jqLiteAddNodes(this,element)}function jqLiteClone(element){return element.cloneNode(!0)}function jqLiteDealoc(element,onlyDescendants){if(onlyDescendants||jqLiteRemoveData(element),element.querySelectorAll)for(var descendants=element.querySelectorAll("*"),i=0,l=descendants.length;i<l;i++)jqLiteRemoveData(descendants[i])}function jqLiteOff(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr("offargs","jqLite#off() does not support the `selector` argument");var expandoStore=jqLiteExpandoStore(element),events=expandoStore&&expandoStore.events,handle=expandoStore&&expandoStore.handle;if(handle)if(type){var removeHandler=function(type){var listenerFns=events[type];isDefined(fn)&&arrayRemove(listenerFns||[],fn),isDefined(fn)&&listenerFns&&listenerFns.length>0||(removeEventListenerFn(element,type,handle),delete events[type])};forEach(type.split(" "),function(type){removeHandler(type),MOUSE_EVENT_MAP[type]&&removeHandler(MOUSE_EVENT_MAP[type])})}else for(type in events)"$destroy"!==type&&removeEventListenerFn(element,type,handle),delete events[type]}function jqLiteRemoveData(element,name){var expandoId=element.ng339,expandoStore=expandoId&&jqCache[expandoId];if(expandoStore){if(name)return void delete expandoStore.data[name];expandoStore.handle&&(expandoStore.events.$destroy&&expandoStore.handle({},"$destroy"),jqLiteOff(element)),delete jqCache[expandoId],element.ng339=undefined}}function jqLiteExpandoStore(element,createIfNecessary){var expandoId=element.ng339,expandoStore=expandoId&&jqCache[expandoId];return createIfNecessary&&!expandoStore&&(element.ng339=expandoId=jqNextId(),expandoStore=jqCache[expandoId]={events:{},data:{},handle:undefined}),expandoStore}function jqLiteData(element,key,value){if(jqLiteAcceptsData(element)){var isSimpleSetter=isDefined(value),isSimpleGetter=!isSimpleSetter&&key&&!isObject(key),massGetter=!key,expandoStore=jqLiteExpandoStore(element,!isSimpleGetter),data=expandoStore&&expandoStore.data;if(isSimpleSetter)data[key]=value;else{if(massGetter)return data;if(isSimpleGetter)return data&&data[key];extend(data,key)}}}function jqLiteHasClass(element,selector){return!!element.getAttribute&&(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+selector+" ")>-1}function jqLiteRemoveClass(element,cssClasses){cssClasses&&element.setAttribute&&forEach(cssClasses.split(" "),function(cssClass){element.setAttribute("class",trim((" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+trim(cssClass)+" "," ")))})}function jqLiteAddClass(element,cssClasses){if(cssClasses&&element.setAttribute){var existingClasses=(" "+(element.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");forEach(cssClasses.split(" "),function(cssClass){cssClass=trim(cssClass),existingClasses.indexOf(" "+cssClass+" ")===-1&&(existingClasses+=cssClass+" ")}),element.setAttribute("class",trim(existingClasses))}}function jqLiteAddNodes(root,elements){if(elements)if(elements.nodeType)root[root.length++]=elements;else{var length=elements.length;if("number"==typeof length&&elements.window!==elements){if(length)for(var i=0;i<length;i++)root[root.length++]=elements[i]}else root[root.length++]=elements}}function jqLiteController(element,name){return jqLiteInheritedData(element,"$"+(name||"ngController")+"Controller")}function jqLiteInheritedData(element,name,value){element.nodeType==NODE_TYPE_DOCUMENT&&(element=element.documentElement);for(var names=isArray(name)?name:[name];element;){for(var i=0,ii=names.length;i<ii;i++)if(isDefined(value=jqLite.data(element,names[i])))return value;element=element.parentNode||element.nodeType===NODE_TYPE_DOCUMENT_FRAGMENT&&element.host}}function jqLiteEmpty(element){for(jqLiteDealoc(element,!0);element.firstChild;)element.removeChild(element.firstChild)}function jqLiteRemove(element,keepData){keepData||jqLiteDealoc(element);var parent=element.parentNode;parent&&parent.removeChild(element)}function jqLiteDocumentLoaded(action,win){win=win||window,"complete"===win.document.readyState?win.setTimeout(action):jqLite(win).on("load",action)}function getBooleanAttrName(element,name){var booleanAttr=BOOLEAN_ATTR[name.toLowerCase()];return booleanAttr&&BOOLEAN_ELEMENTS[nodeName_(element)]&&booleanAttr}function getAliasedAttrName(name){return ALIASED_ATTR[name]}function createEventHandler(element,events){var eventHandler=function(event,type){event.isDefaultPrevented=function(){return event.defaultPrevented};var eventFns=events[type||event.type],eventFnsLength=eventFns?eventFns.length:0;if(eventFnsLength){if(isUndefined(event.immediatePropagationStopped)){var originalStopImmediatePropagation=event.stopImmediatePropagation;event.stopImmediatePropagation=function(){event.immediatePropagationStopped=!0,event.stopPropagation&&event.stopPropagation(),originalStopImmediatePropagation&&originalStopImmediatePropagation.call(event)}}event.isImmediatePropagationStopped=function(){return event.immediatePropagationStopped===!0};var handlerWrapper=eventFns.specialHandlerWrapper||defaultHandlerWrapper;eventFnsLength>1&&(eventFns=shallowCopy(eventFns));for(var i=0;i<eventFnsLength;i++)event.isImmediatePropagationStopped()||handlerWrapper(element,event,eventFns[i])}};return eventHandler.elem=element,eventHandler}function defaultHandlerWrapper(element,event,handler){handler.call(element,event)}function specialMouseHandlerWrapper(target,event,handler){var related=event.relatedTarget;related&&(related===target||jqLiteContains.call(target,related))||handler.call(target,event)}function $$jqLiteProvider(){this.$get=function(){return extend(JQLite,{hasClass:function(node,classes){return node.attr&&(node=node[0]),jqLiteHasClass(node,classes)},addClass:function(node,classes){return node.attr&&(node=node[0]),jqLiteAddClass(node,classes)},removeClass:function(node,classes){return node.attr&&(node=node[0]),jqLiteRemoveClass(node,classes)}})}}function hashKey(obj,nextUidFn){var key=obj&&obj.$$hashKey;if(key)return"function"==typeof key&&(key=obj.$$hashKey()),key;var objType=typeof obj;return key="function"==objType||"object"==objType&&null!==obj?obj.$$hashKey=objType+":"+(nextUidFn||nextUid)():objType+":"+obj}function HashMap(array,isolatedUid){if(isolatedUid){var uid=0;this.nextUid=function(){return++uid}}forEach(array,this.put,this)}function anonFn(fn){var fnText=fn.toString().replace(STRIP_COMMENTS,""),args=fnText.match(FN_ARGS);return args?"function("+(args[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function annotate(fn,strictDi,name){var $inject,fnText,argDecl,last;if("function"==typeof fn){if(!($inject=fn.$inject)){if($inject=[],fn.length){if(strictDi)throw isString(name)&&name||(name=fn.name||anonFn(fn)),$injectorMinErr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",name);fnText=fn.toString().replace(STRIP_COMMENTS,""),argDecl=fnText.match(FN_ARGS),forEach(argDecl[1].split(FN_ARG_SPLIT),function(arg){arg.replace(FN_ARG,function(all,underscore,name){$inject.push(name)})})}fn.$inject=$inject}}else isArray(fn)?(last=fn.length-1,assertArgFn(fn[last],"fn"),$inject=fn.slice(0,last)):assertArgFn(fn,"fn",!0);return $inject}function createInjector(modulesToLoad,strictDi){function supportObject(delegate){return function(key,value){return isObject(key)?void forEach(key,reverseParams(delegate)):delegate(key,value)}}function provider(name,provider_){if(assertNotHasOwnProperty(name,"service"),(isFunction(provider_)||isArray(provider_))&&(provider_=providerInjector.instantiate(provider_)),!provider_.$get)throw $injectorMinErr("pget","Provider '{0}' must define $get factory method.",name);return providerCache[name+providerSuffix]=provider_}function enforceReturnValue(name,factory){return function(){var result=instanceInjector.invoke(factory,this);if(isUndefined(result))throw $injectorMinErr("undef","Provider '{0}' must return a value from $get factory method.",name);return result}}function factory(name,factoryFn,enforce){return provider(name,{$get:enforce!==!1?enforceReturnValue(name,factoryFn):factoryFn})}function service(name,constructor){return factory(name,["$injector",function($injector){return $injector.instantiate(constructor)}])}function value(name,val){return factory(name,valueFn(val),!1)}function constant(name,value){assertNotHasOwnProperty(name,"constant"),providerCache[name]=value,instanceCache[name]=value}function decorator(serviceName,decorFn){var origProvider=providerInjector.get(serviceName+providerSuffix),orig$get=origProvider.$get;origProvider.$get=function(){var origInstance=instanceInjector.invoke(orig$get,origProvider);return instanceInjector.invoke(decorFn,null,{$delegate:origInstance})}}function loadModules(modulesToLoad){assertArg(isUndefined(modulesToLoad)||isArray(modulesToLoad),"modulesToLoad","not an array");var moduleFn,runBlocks=[];return forEach(modulesToLoad,function(module){function runInvokeQueue(queue){var i,ii;for(i=0,ii=queue.length;i<ii;i++){var invokeArgs=queue[i],provider=providerInjector.get(invokeArgs[0]);provider[invokeArgs[1]].apply(provider,invokeArgs[2])}}if(!loadedModules.get(module)){loadedModules.put(module,!0);try{isString(module)?(moduleFn=angularModule(module),runBlocks=runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks),runInvokeQueue(moduleFn._invokeQueue),runInvokeQueue(moduleFn._configBlocks)):isFunction(module)?runBlocks.push(providerInjector.invoke(module)):isArray(module)?runBlocks.push(providerInjector.invoke(module)):assertArgFn(module,"module")}catch(e){throw isArray(module)&&(module=module[module.length-1]),e.message&&e.stack&&e.stack.indexOf(e.message)==-1&&(e=e.message+"\n"+e.stack),$injectorMinErr("modulerr","Failed to instantiate module {0} due to:\n{1}",module,e.stack||e.message||e)}}}),runBlocks}function createInternalInjector(cache,factory){function getService(serviceName,caller){if(cache.hasOwnProperty(serviceName)){if(cache[serviceName]===INSTANTIATING)throw $injectorMinErr("cdep","Circular dependency found: {0}",serviceName+" <- "+path.join(" <- "));return cache[serviceName]}try{return path.unshift(serviceName),cache[serviceName]=INSTANTIATING,cache[serviceName]=factory(serviceName,caller)}catch(err){throw cache[serviceName]===INSTANTIATING&&delete cache[serviceName],err}finally{path.shift()}}function invoke(fn,self,locals,serviceName){"string"==typeof locals&&(serviceName=locals,locals=null);var length,i,key,args=[],$inject=createInjector.$$annotate(fn,strictDi,serviceName);for(i=0,length=$inject.length;i<length;i++){if(key=$inject[i],"string"!=typeof key)throw $injectorMinErr("itkn","Incorrect injection token! Expected service name as string, got {0}",key);args.push(locals&&locals.hasOwnProperty(key)?locals[key]:getService(key,serviceName))}return isArray(fn)&&(fn=fn[length]),fn.apply(self,args)}function instantiate(Type,locals,serviceName){var instance=Object.create((isArray(Type)?Type[Type.length-1]:Type).prototype||null),returnedValue=invoke(Type,instance,locals,serviceName);return isObject(returnedValue)||isFunction(returnedValue)?returnedValue:instance}return{invoke:invoke,instantiate:instantiate,get:getService,annotate:createInjector.$$annotate,has:function(name){return providerCache.hasOwnProperty(name+providerSuffix)||cache.hasOwnProperty(name)}}}strictDi=strictDi===!0;var INSTANTIATING={},providerSuffix="Provider",path=[],loadedModules=new HashMap([],(!0)),providerCache={$provide:{provider:supportObject(provider),factory:supportObject(factory),service:supportObject(service),value:supportObject(value),constant:supportObject(constant),decorator:decorator}},providerInjector=providerCache.$injector=createInternalInjector(providerCache,function(serviceName,caller){throw angular.isString(caller)&&path.push(caller),$injectorMinErr("unpr","Unknown provider: {0}",path.join(" <- "))}),instanceCache={},instanceInjector=instanceCache.$injector=createInternalInjector(instanceCache,function(serviceName,caller){var provider=providerInjector.get(serviceName+providerSuffix,caller);return instanceInjector.invoke(provider.$get,provider,undefined,serviceName)});return forEach(loadModules(modulesToLoad),function(fn){fn&&instanceInjector.invoke(fn)}),instanceInjector}function $AnchorScrollProvider(){var autoScrollingEnabled=!0;this.disableAutoScrolling=function(){autoScrollingEnabled=!1},this.$get=["$window","$location","$rootScope",function($window,$location,$rootScope){function getFirstAnchor(list){var result=null;return Array.prototype.some.call(list,function(element){if("a"===nodeName_(element))return result=element,!0}),result}function getYOffset(){var offset=scroll.yOffset;if(isFunction(offset))offset=offset();else if(isElement(offset)){var elem=offset[0],style=$window.getComputedStyle(elem);offset="fixed"!==style.position?0:elem.getBoundingClientRect().bottom}else isNumber(offset)||(offset=0);return offset}function scrollTo(elem){if(elem){elem.scrollIntoView();var offset=getYOffset();if(offset){var elemTop=elem.getBoundingClientRect().top;$window.scrollBy(0,elemTop-offset)}}else $window.scrollTo(0,0)}function scroll(hash){hash=isString(hash)?hash:$location.hash();var elm;hash?(elm=document.getElementById(hash))?scrollTo(elm):(elm=getFirstAnchor(document.getElementsByName(hash)))?scrollTo(elm):"top"===hash&&scrollTo(null):scrollTo(null)}var document=$window.document;return autoScrollingEnabled&&$rootScope.$watch(function(){return $location.hash()},function(newVal,oldVal){newVal===oldVal&&""===newVal||jqLiteDocumentLoaded(function(){$rootScope.$evalAsync(scroll)})}),scroll}]}function mergeClasses(a,b){return a||b?a?b?(isArray(a)&&(a=a.join(" ")),isArray(b)&&(b=b.join(" ")),a+" "+b):a:b:""}function extractElementNode(element){for(var i=0;i<element.length;i++){var elm=element[i];if(elm.nodeType===ELEMENT_NODE)return elm}}function splitClasses(classes){isString(classes)&&(classes=classes.split(" "));var obj=createMap();return forEach(classes,function(klass){klass.length&&(obj[klass]=!0)}),obj}function prepareAnimateOptions(options){return isObject(options)?options:{}}function Browser(window,document,$log,$sniffer){function completeOutstandingRequest(fn){try{fn.apply(null,sliceArgs(arguments,1))}finally{if(outstandingRequestCount--,0===outstandingRequestCount)for(;outstandingRequestCallbacks.length;)try{outstandingRequestCallbacks.pop()()}catch(e){$log.error(e)}}}function getHash(url){var index=url.indexOf("#");return index===-1?"":url.substr(index)}function cacheStateAndFireUrlChange(){pendingLocation=null,cacheState(),fireUrlChange()}function getCurrentState(){try{return history.state}catch(e){}}function cacheState(){cachedState=getCurrentState(),cachedState=isUndefined(cachedState)?null:cachedState,equals(cachedState,lastCachedState)&&(cachedState=lastCachedState),lastCachedState=cachedState}function fireUrlChange(){lastBrowserUrl===self.url()&&lastHistoryState===cachedState||(lastBrowserUrl=self.url(),lastHistoryState=cachedState,forEach(urlChangeListeners,function(listener){listener(self.url(),cachedState)}))}var self=this,location=(document[0],window.location),history=window.history,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,pendingDeferIds={};self.isMock=!1;var outstandingRequestCount=0,outstandingRequestCallbacks=[];self.$$completeOutstandingRequest=completeOutstandingRequest,self.$$incOutstandingRequestCount=function(){outstandingRequestCount++},self.notifyWhenNoOutstandingRequests=function(callback){0===outstandingRequestCount?callback():outstandingRequestCallbacks.push(callback)};var cachedState,lastHistoryState,lastBrowserUrl=location.href,baseElement=document.find("base"),pendingLocation=null;cacheState(),lastHistoryState=cachedState,self.url=function(url,replace,state){if(isUndefined(state)&&(state=null),location!==window.location&&(location=window.location),history!==window.history&&(history=window.history),url){var sameState=lastHistoryState===state;if(lastBrowserUrl===url&&(!$sniffer.history||sameState))return self;var sameBase=lastBrowserUrl&&stripHash(lastBrowserUrl)===stripHash(url);return lastBrowserUrl=url,lastHistoryState=state,!$sniffer.history||sameBase&&sameState?(sameBase&&!pendingLocation||(pendingLocation=url),replace?location.replace(url):sameBase?location.hash=getHash(url):location.href=url,location.href!==url&&(pendingLocation=url)):(history[replace?"replaceState":"pushState"](state,"",url),cacheState(),lastHistoryState=cachedState),self}return pendingLocation||location.href.replace(/%27/g,"'")},self.state=function(){return cachedState};var urlChangeListeners=[],urlChangeInit=!1,lastCachedState=null;self.onUrlChange=function(callback){return urlChangeInit||($sniffer.history&&jqLite(window).on("popstate",cacheStateAndFireUrlChange),jqLite(window).on("hashchange",cacheStateAndFireUrlChange),urlChangeInit=!0),urlChangeListeners.push(callback),callback},self.$$applicationDestroyed=function(){jqLite(window).off("hashchange popstate",cacheStateAndFireUrlChange)},self.$$checkUrlChange=fireUrlChange,self.baseHref=function(){var href=baseElement.attr("href");return href?href.replace(/^(https?\:)?\/\/[^\/]*/,""):""},self.defer=function(fn,delay){var timeoutId;return outstandingRequestCount++,timeoutId=setTimeout(function(){delete pendingDeferIds[timeoutId],completeOutstandingRequest(fn)},delay||0),pendingDeferIds[timeoutId]=!0,timeoutId},self.defer.cancel=function(deferId){return!!pendingDeferIds[deferId]&&(delete pendingDeferIds[deferId],clearTimeout(deferId),completeOutstandingRequest(noop),!0)}}function $BrowserProvider(){this.$get=["$window","$log","$sniffer","$document",function($window,$log,$sniffer,$document){return new Browser($window,$document,$log,$sniffer)}]}function $CacheFactoryProvider(){this.$get=function(){function cacheFactory(cacheId,options){function refresh(entry){entry!=freshEnd&&(staleEnd?staleEnd==entry&&(staleEnd=entry.n):staleEnd=entry,link(entry.n,entry.p),link(entry,freshEnd),freshEnd=entry,freshEnd.n=null)}function link(nextEntry,prevEntry){nextEntry!=prevEntry&&(nextEntry&&(nextEntry.p=prevEntry),prevEntry&&(prevEntry.n=nextEntry))}if(cacheId in caches)throw minErr("$cacheFactory")("iid","CacheId '{0}' is already taken!",cacheId);var size=0,stats=extend({},options,{id:cacheId}),data=createMap(),capacity=options&&options.capacity||Number.MAX_VALUE,lruHash=createMap(),freshEnd=null,staleEnd=null;return caches[cacheId]={put:function(key,value){if(!isUndefined(value)){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key]||(lruHash[key]={key:key});refresh(lruEntry)}return key in data||size++,data[key]=value,size>capacity&&this.remove(staleEnd.key),value}},get:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;refresh(lruEntry)}return data[key]},remove:function(key){if(capacity<Number.MAX_VALUE){var lruEntry=lruHash[key];if(!lruEntry)return;lruEntry==freshEnd&&(freshEnd=lruEntry.p),lruEntry==staleEnd&&(staleEnd=lruEntry.n),link(lruEntry.n,lruEntry.p),delete lruHash[key]}key in data&&(delete data[key],size--)},removeAll:function(){data=createMap(),size=0,lruHash=createMap(),freshEnd=staleEnd=null},destroy:function(){data=null,stats=null,lruHash=null,delete caches[cacheId]},info:function(){return extend({},stats,{size:size})}}}var caches={};return cacheFactory.info=function(){var info={};return forEach(caches,function(cache,cacheId){info[cacheId]=cache.info()}),info},cacheFactory.get=function(cacheId){return caches[cacheId]},cacheFactory}}function $TemplateCacheProvider(){this.$get=["$cacheFactory",function($cacheFactory){return $cacheFactory("templates")}]}function $CompileProvider($provide,$$sanitizeUriProvider){function parseIsolateBindings(scope,directiveName,isController){var LOCAL_REGEXP=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,bindings=createMap();return forEach(scope,function(definition,scopeName){if(definition in bindingCache)return void(bindings[scopeName]=bindingCache[definition]);var match=definition.match(LOCAL_REGEXP);if(!match)throw $compileMinErr("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",directiveName,scopeName,definition,isController?"controller bindings definition":"isolate scope definition");bindings[scopeName]={mode:match[1][0],collection:"*"===match[2],optional:"?"===match[3],attrName:match[4]||scopeName},match[4]&&(bindingCache[definition]=bindings[scopeName])}),bindings}function parseDirectiveBindings(directive,directiveName){var bindings={isolateScope:null,bindToController:null};if(isObject(directive.scope)&&(directive.bindToController===!0?(bindings.bindToController=parseIsolateBindings(directive.scope,directiveName,!0),bindings.isolateScope={}):bindings.isolateScope=parseIsolateBindings(directive.scope,directiveName,!1)),isObject(directive.bindToController)&&(bindings.bindToController=parseIsolateBindings(directive.bindToController,directiveName,!0)),isObject(bindings.bindToController)){var controller=directive.controller,controllerAs=directive.controllerAs;if(!controller)throw $compileMinErr("noctrl","Cannot bind to controller without directive '{0}'s controller.",directiveName);if(!identifierForController(controller,controllerAs))throw $compileMinErr("noident","Cannot bind to controller without identifier for directive '{0}'.",directiveName)}return bindings}function assertValidDirectiveName(name){var letter=name.charAt(0);if(!letter||letter!==lowercase(letter))throw $compileMinErr("baddir","Directive name '{0}' is invalid. The first character must be a lowercase letter",name);if(name!==name.trim())throw $compileMinErr("baddir","Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",name)}var hasDirectives={},Suffix="Directive",COMMENT_DIRECTIVE_REGEXP=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,CLASS_DIRECTIVE_REGEXP=/(([\w\-]+)(?:\:([^;]+))?;?)/,ALL_OR_NOTHING_ATTRS=makeMap("ngSrc,ngSrcset,src,srcset"),REQUIRE_PREFIX_REGEXP=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,EVENT_HANDLER_ATTR_REGEXP=/^(on[a-z]+|formaction)$/,bindingCache=createMap();this.directive=function registerDirective(name,directiveFactory){return assertNotHasOwnProperty(name,"directive"),isString(name)?(assertValidDirectiveName(name),assertArg(directiveFactory,"directiveFactory"),hasDirectives.hasOwnProperty(name)||(hasDirectives[name]=[],$provide.factory(name+Suffix,["$injector","$exceptionHandler",function($injector,$exceptionHandler){var directives=[];return forEach(hasDirectives[name],function(directiveFactory,index){try{var directive=$injector.invoke(directiveFactory);isFunction(directive)?directive={compile:valueFn(directive)}:!directive.compile&&directive.link&&(directive.compile=valueFn(directive.link)),directive.priority=directive.priority||0,directive.index=index,directive.name=directive.name||name,directive.require=directive.require||directive.controller&&directive.name,directive.restrict=directive.restrict||"EA",directive.$$moduleName=directiveFactory.$$moduleName,directives.push(directive)}catch(e){$exceptionHandler(e)}}),directives}])),hasDirectives[name].push(directiveFactory)):forEach(name,reverseParams(registerDirective)),this},this.aHrefSanitizationWhitelist=function(regexp){return isDefined(regexp)?($$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp),this):$$sanitizeUriProvider.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(regexp){return isDefined(regexp)?($$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp),this):$$sanitizeUriProvider.imgSrcSanitizationWhitelist()};var debugInfoEnabled=!0;this.debugInfoEnabled=function(enabled){return isDefined(enabled)?(debugInfoEnabled=enabled,this):debugInfoEnabled},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function($injector,$interpolate,$exceptionHandler,$templateRequest,$parse,$controller,$rootScope,$sce,$animate,$$sanitizeUri){function safeAddClass($element,className){try{$element.addClass(className)}catch(e){}}function compile($compileNodes,transcludeFn,maxPriority,ignoreDirective,previousCompileContext){$compileNodes instanceof jqLite||($compileNodes=jqLite($compileNodes));for(var NOT_EMPTY=/\S+/,i=0,len=$compileNodes.length;i<len;i++){
var domNode=$compileNodes[i];domNode.nodeType===NODE_TYPE_TEXT&&domNode.nodeValue.match(NOT_EMPTY)&&jqLiteWrapNode(domNode,$compileNodes[i]=document.createElement("span"))}var compositeLinkFn=compileNodes($compileNodes,transcludeFn,$compileNodes,maxPriority,ignoreDirective,previousCompileContext);compile.$$addScopeClass($compileNodes);var namespace=null;return function(scope,cloneConnectFn,options){assertArg(scope,"scope"),previousCompileContext&&previousCompileContext.needsNewScope&&(scope=scope.$parent.$new()),options=options||{};var parentBoundTranscludeFn=options.parentBoundTranscludeFn,transcludeControllers=options.transcludeControllers,futureParentElement=options.futureParentElement;parentBoundTranscludeFn&&parentBoundTranscludeFn.$$boundTransclude&&(parentBoundTranscludeFn=parentBoundTranscludeFn.$$boundTransclude),namespace||(namespace=detectNamespaceForChildElements(futureParentElement));var $linkNode;if($linkNode="html"!==namespace?jqLite(wrapTemplate(namespace,jqLite("<div>").append($compileNodes).html())):cloneConnectFn?JQLitePrototype.clone.call($compileNodes):$compileNodes,transcludeControllers)for(var controllerName in transcludeControllers)$linkNode.data("$"+controllerName+"Controller",transcludeControllers[controllerName].instance);return compile.$$addScopeInfo($linkNode,scope),cloneConnectFn&&cloneConnectFn($linkNode,scope),compositeLinkFn&&compositeLinkFn(scope,$linkNode,$linkNode,parentBoundTranscludeFn),$linkNode}}function detectNamespaceForChildElements(parentElement){var node=parentElement&&parentElement[0];return node&&"foreignobject"!==nodeName_(node)&&node.toString().match(/SVG/)?"svg":"html"}function compileNodes(nodeList,transcludeFn,$rootElement,maxPriority,ignoreDirective,previousCompileContext){function compositeLinkFn(scope,nodeList,$rootElement,parentBoundTranscludeFn){var nodeLinkFn,childLinkFn,node,childScope,i,ii,idx,childBoundTranscludeFn,stableNodeList;if(nodeLinkFnFound){var nodeListLength=nodeList.length;for(stableNodeList=new Array(nodeListLength),i=0;i<linkFns.length;i+=3)idx=linkFns[i],stableNodeList[idx]=nodeList[idx]}else stableNodeList=nodeList;for(i=0,ii=linkFns.length;i<ii;)node=stableNodeList[linkFns[i++]],nodeLinkFn=linkFns[i++],childLinkFn=linkFns[i++],nodeLinkFn?(nodeLinkFn.scope?(childScope=scope.$new(),compile.$$addScopeInfo(jqLite(node),childScope)):childScope=scope,childBoundTranscludeFn=nodeLinkFn.transcludeOnThisElement?createBoundTranscludeFn(scope,nodeLinkFn.transclude,parentBoundTranscludeFn):!nodeLinkFn.templateOnThisElement&&parentBoundTranscludeFn?parentBoundTranscludeFn:!parentBoundTranscludeFn&&transcludeFn?createBoundTranscludeFn(scope,transcludeFn):null,nodeLinkFn(childLinkFn,childScope,node,$rootElement,childBoundTranscludeFn)):childLinkFn&&childLinkFn(scope,node.childNodes,undefined,parentBoundTranscludeFn)}for(var attrs,directives,nodeLinkFn,childNodes,childLinkFn,linkFnFound,nodeLinkFnFound,linkFns=[],i=0;i<nodeList.length;i++)attrs=new Attributes,directives=collectDirectives(nodeList[i],[],attrs,0===i?maxPriority:undefined,ignoreDirective),nodeLinkFn=directives.length?applyDirectivesToNode(directives,nodeList[i],attrs,transcludeFn,$rootElement,null,[],[],previousCompileContext):null,nodeLinkFn&&nodeLinkFn.scope&&compile.$$addScopeClass(attrs.$$element),childLinkFn=nodeLinkFn&&nodeLinkFn.terminal||!(childNodes=nodeList[i].childNodes)||!childNodes.length?null:compileNodes(childNodes,nodeLinkFn?(nodeLinkFn.transcludeOnThisElement||!nodeLinkFn.templateOnThisElement)&&nodeLinkFn.transclude:transcludeFn),(nodeLinkFn||childLinkFn)&&(linkFns.push(i,nodeLinkFn,childLinkFn),linkFnFound=!0,nodeLinkFnFound=nodeLinkFnFound||nodeLinkFn),previousCompileContext=null;return linkFnFound?compositeLinkFn:null}function createBoundTranscludeFn(scope,transcludeFn,previousBoundTranscludeFn){var boundTranscludeFn=function(transcludedScope,cloneFn,controllers,futureParentElement,containingScope){return transcludedScope||(transcludedScope=scope.$new(!1,containingScope),transcludedScope.$$transcluded=!0),transcludeFn(transcludedScope,cloneFn,{parentBoundTranscludeFn:previousBoundTranscludeFn,transcludeControllers:controllers,futureParentElement:futureParentElement})};return boundTranscludeFn}function collectDirectives(node,directives,attrs,maxPriority,ignoreDirective){var match,className,nodeType=node.nodeType,attrsMap=attrs.$attr;switch(nodeType){case NODE_TYPE_ELEMENT:addDirective(directives,directiveNormalize(nodeName_(node)),"E",maxPriority,ignoreDirective);for(var attr,name,nName,ngAttrName,value,isNgAttr,nAttrs=node.attributes,j=0,jj=nAttrs&&nAttrs.length;j<jj;j++){var attrStartName=!1,attrEndName=!1;attr=nAttrs[j],name=attr.name,value=trim(attr.value),ngAttrName=directiveNormalize(name),(isNgAttr=NG_ATTR_BINDING.test(ngAttrName))&&(name=name.replace(PREFIX_REGEXP,"").substr(8).replace(/_(.)/g,function(match,letter){return letter.toUpperCase()}));var multiElementMatch=ngAttrName.match(MULTI_ELEMENT_DIR_RE);multiElementMatch&&directiveIsMultiElement(multiElementMatch[1])&&(attrStartName=name,attrEndName=name.substr(0,name.length-5)+"end",name=name.substr(0,name.length-6)),nName=directiveNormalize(name.toLowerCase()),attrsMap[nName]=name,!isNgAttr&&attrs.hasOwnProperty(nName)||(attrs[nName]=value,getBooleanAttrName(node,nName)&&(attrs[nName]=!0)),addAttrInterpolateDirective(node,directives,value,nName,isNgAttr),addDirective(directives,nName,"A",maxPriority,ignoreDirective,attrStartName,attrEndName)}if(className=node.className,isObject(className)&&(className=className.animVal),isString(className)&&""!==className)for(;match=CLASS_DIRECTIVE_REGEXP.exec(className);)nName=directiveNormalize(match[2]),addDirective(directives,nName,"C",maxPriority,ignoreDirective)&&(attrs[nName]=trim(match[3])),className=className.substr(match.index+match[0].length);break;case NODE_TYPE_TEXT:if(11===msie)for(;node.parentNode&&node.nextSibling&&node.nextSibling.nodeType===NODE_TYPE_TEXT;)node.nodeValue=node.nodeValue+node.nextSibling.nodeValue,node.parentNode.removeChild(node.nextSibling);addTextInterpolateDirective(directives,node.nodeValue);break;case NODE_TYPE_COMMENT:try{match=COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue),match&&(nName=directiveNormalize(match[1]),addDirective(directives,nName,"M",maxPriority,ignoreDirective)&&(attrs[nName]=trim(match[2])))}catch(e){}}return directives.sort(byPriority),directives}function groupScan(node,attrStart,attrEnd){var nodes=[],depth=0;if(attrStart&&node.hasAttribute&&node.hasAttribute(attrStart)){do{if(!node)throw $compileMinErr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",attrStart,attrEnd);node.nodeType==NODE_TYPE_ELEMENT&&(node.hasAttribute(attrStart)&&depth++,node.hasAttribute(attrEnd)&&depth--),nodes.push(node),node=node.nextSibling}while(depth>0)}else nodes.push(node);return jqLite(nodes)}function groupElementsLinkFnWrapper(linkFn,attrStart,attrEnd){return function(scope,element,attrs,controllers,transcludeFn){return element=groupScan(element[0],attrStart,attrEnd),linkFn(scope,element,attrs,controllers,transcludeFn)}}function applyDirectivesToNode(directives,compileNode,templateAttrs,transcludeFn,jqCollection,originalReplaceDirective,preLinkFns,postLinkFns,previousCompileContext){function addLinkFns(pre,post,attrStart,attrEnd){pre&&(attrStart&&(pre=groupElementsLinkFnWrapper(pre,attrStart,attrEnd)),pre.require=directive.require,pre.directiveName=directiveName,(newIsolateScopeDirective===directive||directive.$$isolateScope)&&(pre=cloneAndAnnotateFn(pre,{isolateScope:!0})),preLinkFns.push(pre)),post&&(attrStart&&(post=groupElementsLinkFnWrapper(post,attrStart,attrEnd)),post.require=directive.require,post.directiveName=directiveName,(newIsolateScopeDirective===directive||directive.$$isolateScope)&&(post=cloneAndAnnotateFn(post,{isolateScope:!0})),postLinkFns.push(post))}function getControllers(directiveName,require,$element,elementControllers){var value;if(isString(require)){var match=require.match(REQUIRE_PREFIX_REGEXP),name=require.substring(match[0].length),inheritType=match[1]||match[3],optional="?"===match[2];if("^^"===inheritType?$element=$element.parent():(value=elementControllers&&elementControllers[name],value=value&&value.instance),!value){var dataName="$"+name+"Controller";value=inheritType?$element.inheritedData(dataName):$element.data(dataName)}if(!value&&!optional)throw $compileMinErr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",name,directiveName)}else if(isArray(require)){value=[];for(var i=0,ii=require.length;i<ii;i++)value[i]=getControllers(directiveName,require[i],$element,elementControllers)}return value||null}function setupControllers($element,attrs,transcludeFn,controllerDirectives,isolateScope,scope){var elementControllers=createMap();for(var controllerKey in controllerDirectives){var directive=controllerDirectives[controllerKey],locals={$scope:directive===newIsolateScopeDirective||directive.$$isolateScope?isolateScope:scope,$element:$element,$attrs:attrs,$transclude:transcludeFn},controller=directive.controller;"@"==controller&&(controller=attrs[directive.name]);var controllerInstance=$controller(controller,locals,!0,directive.controllerAs);elementControllers[directive.name]=controllerInstance,$element.data("$"+directive.name+"Controller",controllerInstance.instance)}return elementControllers}function nodeLinkFn(childLinkFn,scope,linkNode,$rootElement,boundTranscludeFn){function controllersBoundTransclude(scope,cloneAttachFn,futureParentElement){var transcludeControllers;return isScope(scope)||(futureParentElement=cloneAttachFn,cloneAttachFn=scope,scope=undefined),hasElementTranscludeDirective&&(transcludeControllers=elementControllers),futureParentElement||(futureParentElement=hasElementTranscludeDirective?$element.parent():$element),boundTranscludeFn(scope,cloneAttachFn,transcludeControllers,futureParentElement,scopeToChild)}var linkFn,isolateScope,controllerScope,elementControllers,transcludeFn,$element,attrs,removeScopeBindingWatches,removeControllerBindingWatches;compileNode===linkNode?(attrs=templateAttrs,$element=templateAttrs.$$element):($element=jqLite(linkNode),attrs=new Attributes($element,templateAttrs)),controllerScope=scope,newIsolateScopeDirective?isolateScope=scope.$new(!0):newScopeDirective&&(controllerScope=scope.$parent),boundTranscludeFn&&(transcludeFn=controllersBoundTransclude,transcludeFn.$$boundTransclude=boundTranscludeFn),controllerDirectives&&(elementControllers=setupControllers($element,attrs,transcludeFn,controllerDirectives,isolateScope,scope)),newIsolateScopeDirective&&(compile.$$addScopeInfo($element,isolateScope,!0,!(templateDirective&&(templateDirective===newIsolateScopeDirective||templateDirective===newIsolateScopeDirective.$$originalDirective))),compile.$$addScopeClass($element,!0),isolateScope.$$isolateBindings=newIsolateScopeDirective.$$isolateBindings,removeScopeBindingWatches=initializeDirectiveBindings(scope,attrs,isolateScope,isolateScope.$$isolateBindings,newIsolateScopeDirective),removeScopeBindingWatches&&isolateScope.$on("$destroy",removeScopeBindingWatches));for(var name in elementControllers){var controllerDirective=controllerDirectives[name],controller=elementControllers[name],bindings=controllerDirective.$$bindings.bindToController;controller.identifier&&bindings&&(removeControllerBindingWatches=initializeDirectiveBindings(controllerScope,attrs,controller.instance,bindings,controllerDirective));var controllerResult=controller();controllerResult!==controller.instance&&(controller.instance=controllerResult,$element.data("$"+controllerDirective.name+"Controller",controllerResult),removeControllerBindingWatches&&removeControllerBindingWatches(),removeControllerBindingWatches=initializeDirectiveBindings(controllerScope,attrs,controller.instance,bindings,controllerDirective))}for(i=0,ii=preLinkFns.length;i<ii;i++)linkFn=preLinkFns[i],invokeLinkFn(linkFn,linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn);var scopeToChild=scope;for(newIsolateScopeDirective&&(newIsolateScopeDirective.template||null===newIsolateScopeDirective.templateUrl)&&(scopeToChild=isolateScope),childLinkFn&&childLinkFn(scopeToChild,linkNode.childNodes,undefined,boundTranscludeFn),i=postLinkFns.length-1;i>=0;i--)linkFn=postLinkFns[i],invokeLinkFn(linkFn,linkFn.isolateScope?isolateScope:scope,$element,attrs,linkFn.require&&getControllers(linkFn.directiveName,linkFn.require,$element,elementControllers),transcludeFn)}previousCompileContext=previousCompileContext||{};for(var directive,directiveName,$template,linkFn,directiveValue,terminalPriority=-Number.MAX_VALUE,newScopeDirective=previousCompileContext.newScopeDirective,controllerDirectives=previousCompileContext.controllerDirectives,newIsolateScopeDirective=previousCompileContext.newIsolateScopeDirective,templateDirective=previousCompileContext.templateDirective,nonTlbTranscludeDirective=previousCompileContext.nonTlbTranscludeDirective,hasTranscludeDirective=!1,hasTemplate=!1,hasElementTranscludeDirective=previousCompileContext.hasElementTranscludeDirective,$compileNode=templateAttrs.$$element=jqLite(compileNode),replaceDirective=originalReplaceDirective,childTranscludeFn=transcludeFn,i=0,ii=directives.length;i<ii;i++){directive=directives[i];var attrStart=directive.$$start,attrEnd=directive.$$end;if(attrStart&&($compileNode=groupScan(compileNode,attrStart,attrEnd)),$template=undefined,terminalPriority>directive.priority)break;if((directiveValue=directive.scope)&&(directive.templateUrl||(isObject(directiveValue)?(assertNoDuplicate("new/isolated scope",newIsolateScopeDirective||newScopeDirective,directive,$compileNode),newIsolateScopeDirective=directive):assertNoDuplicate("new/isolated scope",newIsolateScopeDirective,directive,$compileNode)),newScopeDirective=newScopeDirective||directive),directiveName=directive.name,!directive.templateUrl&&directive.controller&&(directiveValue=directive.controller,controllerDirectives=controllerDirectives||createMap(),assertNoDuplicate("'"+directiveName+"' controller",controllerDirectives[directiveName],directive,$compileNode),controllerDirectives[directiveName]=directive),(directiveValue=directive.transclude)&&(hasTranscludeDirective=!0,directive.$$tlb||(assertNoDuplicate("transclusion",nonTlbTranscludeDirective,directive,$compileNode),nonTlbTranscludeDirective=directive),"element"==directiveValue?(hasElementTranscludeDirective=!0,terminalPriority=directive.priority,$template=$compileNode,$compileNode=templateAttrs.$$element=jqLite(document.createComment(" "+directiveName+": "+templateAttrs[directiveName]+" ")),compileNode=$compileNode[0],replaceWith(jqCollection,sliceArgs($template),compileNode),childTranscludeFn=compile($template,transcludeFn,terminalPriority,replaceDirective&&replaceDirective.name,{nonTlbTranscludeDirective:nonTlbTranscludeDirective})):($template=jqLite(jqLiteClone(compileNode)).contents(),$compileNode.empty(),childTranscludeFn=compile($template,transcludeFn,undefined,undefined,{needsNewScope:directive.$$isolateScope||directive.$$newScope}))),directive.template)if(hasTemplate=!0,assertNoDuplicate("template",templateDirective,directive,$compileNode),templateDirective=directive,directiveValue=isFunction(directive.template)?directive.template($compileNode,templateAttrs):directive.template,directiveValue=denormalizeTemplate(directiveValue),directive.replace){if(replaceDirective=directive,$template=jqLiteIsTextNode(directiveValue)?[]:removeComments(wrapTemplate(directive.templateNamespace,trim(directiveValue))),compileNode=$template[0],1!=$template.length||compileNode.nodeType!==NODE_TYPE_ELEMENT)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",directiveName,"");replaceWith(jqCollection,$compileNode,compileNode);var newTemplateAttrs={$attr:{}},templateDirectives=collectDirectives(compileNode,[],newTemplateAttrs),unprocessedDirectives=directives.splice(i+1,directives.length-(i+1));(newIsolateScopeDirective||newScopeDirective)&&markDirectiveScope(templateDirectives,newIsolateScopeDirective,newScopeDirective),directives=directives.concat(templateDirectives).concat(unprocessedDirectives),mergeTemplateAttributes(templateAttrs,newTemplateAttrs),ii=directives.length}else $compileNode.html(directiveValue);if(directive.templateUrl)hasTemplate=!0,assertNoDuplicate("template",templateDirective,directive,$compileNode),templateDirective=directive,directive.replace&&(replaceDirective=directive),nodeLinkFn=compileTemplateUrl(directives.splice(i,directives.length-i),$compileNode,templateAttrs,jqCollection,hasTranscludeDirective&&childTranscludeFn,preLinkFns,postLinkFns,{controllerDirectives:controllerDirectives,newScopeDirective:newScopeDirective!==directive&&newScopeDirective,newIsolateScopeDirective:newIsolateScopeDirective,templateDirective:templateDirective,nonTlbTranscludeDirective:nonTlbTranscludeDirective}),ii=directives.length;else if(directive.compile)try{linkFn=directive.compile($compileNode,templateAttrs,childTranscludeFn),isFunction(linkFn)?addLinkFns(null,linkFn,attrStart,attrEnd):linkFn&&addLinkFns(linkFn.pre,linkFn.post,attrStart,attrEnd)}catch(e){$exceptionHandler(e,startingTag($compileNode))}directive.terminal&&(nodeLinkFn.terminal=!0,terminalPriority=Math.max(terminalPriority,directive.priority))}return nodeLinkFn.scope=newScopeDirective&&newScopeDirective.scope===!0,nodeLinkFn.transcludeOnThisElement=hasTranscludeDirective,nodeLinkFn.templateOnThisElement=hasTemplate,nodeLinkFn.transclude=childTranscludeFn,previousCompileContext.hasElementTranscludeDirective=hasElementTranscludeDirective,nodeLinkFn}function markDirectiveScope(directives,isolateScope,newScope){for(var j=0,jj=directives.length;j<jj;j++)directives[j]=inherit(directives[j],{$$isolateScope:isolateScope,$$newScope:newScope})}function addDirective(tDirectives,name,location,maxPriority,ignoreDirective,startAttrName,endAttrName){if(name===ignoreDirective)return null;var match=null;if(hasDirectives.hasOwnProperty(name))for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;i<ii;i++)try{if(directive=directives[i],(isUndefined(maxPriority)||maxPriority>directive.priority)&&directive.restrict.indexOf(location)!=-1){if(startAttrName&&(directive=inherit(directive,{$$start:startAttrName,$$end:endAttrName})),!directive.$$bindings){var bindings=directive.$$bindings=parseDirectiveBindings(directive,directive.name);isObject(bindings.isolateScope)&&(directive.$$isolateBindings=bindings.isolateScope)}tDirectives.push(directive),match=directive}}catch(e){$exceptionHandler(e)}return match}function directiveIsMultiElement(name){if(hasDirectives.hasOwnProperty(name))for(var directive,directives=$injector.get(name+Suffix),i=0,ii=directives.length;i<ii;i++)if(directive=directives[i],directive.multiElement)return!0;return!1}function mergeTemplateAttributes(dst,src){var srcAttr=src.$attr,dstAttr=dst.$attr,$element=dst.$$element;forEach(dst,function(value,key){"$"!=key.charAt(0)&&(src[key]&&src[key]!==value&&(value+=("style"===key?";":" ")+src[key]),dst.$set(key,value,!0,srcAttr[key]))}),forEach(src,function(value,key){"class"==key?(safeAddClass($element,value),dst["class"]=(dst["class"]?dst["class"]+" ":"")+value):"style"==key?($element.attr("style",$element.attr("style")+";"+value),dst.style=(dst.style?dst.style+";":"")+value):"$"==key.charAt(0)||dst.hasOwnProperty(key)||(dst[key]=value,dstAttr[key]=srcAttr[key])})}function compileTemplateUrl(directives,$compileNode,tAttrs,$rootElement,childTranscludeFn,preLinkFns,postLinkFns,previousCompileContext){var afterTemplateNodeLinkFn,afterTemplateChildLinkFn,linkQueue=[],beforeTemplateCompileNode=$compileNode[0],origAsyncDirective=directives.shift(),derivedSyncDirective=inherit(origAsyncDirective,{templateUrl:null,transclude:null,replace:null,$$originalDirective:origAsyncDirective}),templateUrl=isFunction(origAsyncDirective.templateUrl)?origAsyncDirective.templateUrl($compileNode,tAttrs):origAsyncDirective.templateUrl,templateNamespace=origAsyncDirective.templateNamespace;return $compileNode.empty(),$templateRequest(templateUrl).then(function(content){var compileNode,tempTemplateAttrs,$template,childBoundTranscludeFn;if(content=denormalizeTemplate(content),origAsyncDirective.replace){if($template=jqLiteIsTextNode(content)?[]:removeComments(wrapTemplate(templateNamespace,trim(content))),compileNode=$template[0],1!=$template.length||compileNode.nodeType!==NODE_TYPE_ELEMENT)throw $compileMinErr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",origAsyncDirective.name,templateUrl);tempTemplateAttrs={$attr:{}},replaceWith($rootElement,$compileNode,compileNode);var templateDirectives=collectDirectives(compileNode,[],tempTemplateAttrs);isObject(origAsyncDirective.scope)&&markDirectiveScope(templateDirectives,!0),directives=templateDirectives.concat(directives),mergeTemplateAttributes(tAttrs,tempTemplateAttrs)}else compileNode=beforeTemplateCompileNode,$compileNode.html(content);for(directives.unshift(derivedSyncDirective),afterTemplateNodeLinkFn=applyDirectivesToNode(directives,compileNode,tAttrs,childTranscludeFn,$compileNode,origAsyncDirective,preLinkFns,postLinkFns,previousCompileContext),forEach($rootElement,function(node,i){node==compileNode&&($rootElement[i]=$compileNode[0])}),afterTemplateChildLinkFn=compileNodes($compileNode[0].childNodes,childTranscludeFn);linkQueue.length;){var scope=linkQueue.shift(),beforeTemplateLinkNode=linkQueue.shift(),linkRootElement=linkQueue.shift(),boundTranscludeFn=linkQueue.shift(),linkNode=$compileNode[0];if(!scope.$$destroyed){if(beforeTemplateLinkNode!==beforeTemplateCompileNode){var oldClasses=beforeTemplateLinkNode.className;previousCompileContext.hasElementTranscludeDirective&&origAsyncDirective.replace||(linkNode=jqLiteClone(compileNode)),replaceWith(linkRootElement,jqLite(beforeTemplateLinkNode),linkNode),safeAddClass(jqLite(linkNode),oldClasses)}childBoundTranscludeFn=afterTemplateNodeLinkFn.transcludeOnThisElement?createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn):boundTranscludeFn,afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,linkNode,$rootElement,childBoundTranscludeFn)}}linkQueue=null}),function(ignoreChildLinkFn,scope,node,rootElement,boundTranscludeFn){var childBoundTranscludeFn=boundTranscludeFn;scope.$$destroyed||(linkQueue?linkQueue.push(scope,node,rootElement,childBoundTranscludeFn):(afterTemplateNodeLinkFn.transcludeOnThisElement&&(childBoundTranscludeFn=createBoundTranscludeFn(scope,afterTemplateNodeLinkFn.transclude,boundTranscludeFn)),afterTemplateNodeLinkFn(afterTemplateChildLinkFn,scope,node,rootElement,childBoundTranscludeFn)))}}function byPriority(a,b){var diff=b.priority-a.priority;return 0!==diff?diff:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function assertNoDuplicate(what,previousDirective,directive,element){function wrapModuleNameIfDefined(moduleName){return moduleName?" (module: "+moduleName+")":""}if(previousDirective)throw $compileMinErr("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",previousDirective.name,wrapModuleNameIfDefined(previousDirective.$$moduleName),directive.name,wrapModuleNameIfDefined(directive.$$moduleName),what,startingTag(element))}function addTextInterpolateDirective(directives,text){var interpolateFn=$interpolate(text,!0);interpolateFn&&directives.push({priority:0,compile:function(templateNode){var templateNodeParent=templateNode.parent(),hasCompileParent=!!templateNodeParent.length;return hasCompileParent&&compile.$$addBindingClass(templateNodeParent),function(scope,node){var parent=node.parent();hasCompileParent||compile.$$addBindingClass(parent),compile.$$addBindingInfo(parent,interpolateFn.expressions),scope.$watch(interpolateFn,function(value){node[0].nodeValue=value})}}})}function wrapTemplate(type,template){switch(type=lowercase(type||"html")){case"svg":case"math":var wrapper=document.createElement("div");return wrapper.innerHTML="<"+type+">"+template+"</"+type+">",wrapper.childNodes[0].childNodes;default:return template}}function getTrustedContext(node,attrNormalizedName){if("srcdoc"==attrNormalizedName)return $sce.HTML;var tag=nodeName_(node);return"xlinkHref"==attrNormalizedName||"form"==tag&&"action"==attrNormalizedName||"img"!=tag&&("src"==attrNormalizedName||"ngSrc"==attrNormalizedName)?$sce.RESOURCE_URL:void 0}function addAttrInterpolateDirective(node,directives,value,name,allOrNothing){var trustedContext=getTrustedContext(node,name);allOrNothing=ALL_OR_NOTHING_ATTRS[name]||allOrNothing;var interpolateFn=$interpolate(value,!0,trustedContext,allOrNothing);if(interpolateFn){if("multiple"===name&&"select"===nodeName_(node))throw $compileMinErr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",startingTag(node));directives.push({priority:100,compile:function(){return{pre:function(scope,element,attr){var $$observers=attr.$$observers||(attr.$$observers=createMap());if(EVENT_HANDLER_ATTR_REGEXP.test(name))throw $compileMinErr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var newValue=attr[name];newValue!==value&&(interpolateFn=newValue&&$interpolate(newValue,!0,trustedContext,allOrNothing),value=newValue),interpolateFn&&(attr[name]=interpolateFn(scope),($$observers[name]||($$observers[name]=[])).$$inter=!0,(attr.$$observers&&attr.$$observers[name].$$scope||scope).$watch(interpolateFn,function(newValue,oldValue){"class"===name&&newValue!=oldValue?attr.$updateClass(newValue,oldValue):attr.$set(name,newValue)}))}}}})}}function replaceWith($rootElement,elementsToRemove,newNode){var i,ii,firstElementToRemove=elementsToRemove[0],removeCount=elementsToRemove.length,parent=firstElementToRemove.parentNode;if($rootElement)for(i=0,ii=$rootElement.length;i<ii;i++)if($rootElement[i]==firstElementToRemove){$rootElement[i++]=newNode;for(var j=i,j2=j+removeCount-1,jj=$rootElement.length;j<jj;j++,j2++)j2<jj?$rootElement[j]=$rootElement[j2]:delete $rootElement[j];$rootElement.length-=removeCount-1,$rootElement.context===firstElementToRemove&&($rootElement.context=newNode);break}parent&&parent.replaceChild(newNode,firstElementToRemove);var fragment=document.createDocumentFragment();fragment.appendChild(firstElementToRemove),jqLite.hasData(firstElementToRemove)&&(jqLite.data(newNode,jqLite.data(firstElementToRemove)),jQuery?(skipDestroyOnNextJQueryCleanData=!0,jQuery.cleanData([firstElementToRemove])):delete jqLite.cache[firstElementToRemove[jqLite.expando]]);for(var k=1,kk=elementsToRemove.length;k<kk;k++){var element=elementsToRemove[k];jqLite(element).remove(),fragment.appendChild(element),delete elementsToRemove[k]}elementsToRemove[0]=newNode,elementsToRemove.length=1}function cloneAndAnnotateFn(fn,annotation){return extend(function(){return fn.apply(null,arguments)},fn,annotation)}function invokeLinkFn(linkFn,scope,$element,attrs,controllers,transcludeFn){try{linkFn(scope,$element,attrs,controllers,transcludeFn)}catch(e){$exceptionHandler(e,startingTag($element))}}function initializeDirectiveBindings(scope,attrs,destination,bindings,directive){var removeWatchCollection=[];return forEach(bindings,function(definition,scopeName){var lastValue,parentGet,parentSet,compare,attrName=definition.attrName,optional=definition.optional,mode=definition.mode;switch(mode){case"@":optional||hasOwnProperty.call(attrs,attrName)||(destination[scopeName]=attrs[attrName]=void 0),attrs.$observe(attrName,function(value){isString(value)&&(destination[scopeName]=value)}),attrs.$$observers[attrName].$$scope=scope,lastValue=attrs[attrName],isString(lastValue)?destination[scopeName]=$interpolate(lastValue)(scope):isBoolean(lastValue)&&(destination[scopeName]=lastValue);break;case"=":if(!hasOwnProperty.call(attrs,attrName)){if(optional)break;attrs[attrName]=void 0}if(optional&&!attrs[attrName])break;parentGet=$parse(attrs[attrName]),compare=parentGet.literal?equals:function(a,b){return a===b||a!==a&&b!==b},parentSet=parentGet.assign||function(){throw lastValue=destination[scopeName]=parentGet(scope),$compileMinErr("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",attrs[attrName],attrName,directive.name)},lastValue=destination[scopeName]=parentGet(scope);var parentValueWatch=function(parentValue){return compare(parentValue,destination[scopeName])||(compare(parentValue,lastValue)?parentSet(scope,parentValue=destination[scopeName]):destination[scopeName]=parentValue),lastValue=parentValue};parentValueWatch.$stateful=!0;var removeWatch;removeWatch=definition.collection?scope.$watchCollection(attrs[attrName],parentValueWatch):scope.$watch($parse(attrs[attrName],parentValueWatch),null,parentGet.literal),removeWatchCollection.push(removeWatch);break;case"&":if(parentGet=attrs.hasOwnProperty(attrName)?$parse(attrs[attrName]):noop,parentGet===noop&&optional)break;destination[scopeName]=function(locals){return parentGet(scope,locals)}}}),removeWatchCollection.length&&function(){for(var i=0,ii=removeWatchCollection.length;i<ii;++i)removeWatchCollection[i]()}}var Attributes=function(element,attributesToCopy){if(attributesToCopy){var i,l,key,keys=Object.keys(attributesToCopy);for(i=0,l=keys.length;i<l;i++)key=keys[i],this[key]=attributesToCopy[key]}else this.$attr={};this.$$element=element};Attributes.prototype={$normalize:directiveNormalize,$addClass:function(classVal){classVal&&classVal.length>0&&$animate.addClass(this.$$element,classVal)},$removeClass:function(classVal){classVal&&classVal.length>0&&$animate.removeClass(this.$$element,classVal)},$updateClass:function(newClasses,oldClasses){var toAdd=tokenDifference(newClasses,oldClasses);toAdd&&toAdd.length&&$animate.addClass(this.$$element,toAdd);var toRemove=tokenDifference(oldClasses,newClasses);toRemove&&toRemove.length&&$animate.removeClass(this.$$element,toRemove)},$set:function(key,value,writeAttr,attrName){var nodeName,node=this.$$element[0],booleanKey=getBooleanAttrName(node,key),aliasedKey=getAliasedAttrName(key),observer=key;if(booleanKey?(this.$$element.prop(key,value),attrName=booleanKey):aliasedKey&&(this[aliasedKey]=value,observer=aliasedKey),this[key]=value,attrName?this.$attr[key]=attrName:(attrName=this.$attr[key],attrName||(this.$attr[key]=attrName=snake_case(key,"-"))),nodeName=nodeName_(this.$$element),"a"===nodeName&&"href"===key||"img"===nodeName&&"src"===key)this[key]=value=$$sanitizeUri(value,"src"===key);else if("img"===nodeName&&"srcset"===key&&isDefined(value)){for(var result="",trimmedSrcset=trim(value),srcPattern=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,pattern=/\s/.test(trimmedSrcset)?srcPattern:/(,)/,rawUris=trimmedSrcset.split(pattern),nbrUrisWith2parts=Math.floor(rawUris.length/2),i=0;i<nbrUrisWith2parts;i++){var innerIdx=2*i;result+=$$sanitizeUri(trim(rawUris[innerIdx]),!0),result+=" "+trim(rawUris[innerIdx+1])}var lastTuple=trim(rawUris[2*i]).split(/\s/);result+=$$sanitizeUri(trim(lastTuple[0]),!0),2===lastTuple.length&&(result+=" "+trim(lastTuple[1])),this[key]=value=result}writeAttr!==!1&&(null===value||isUndefined(value)?this.$$element.removeAttr(attrName):this.$$element.attr(attrName,value));var $$observers=this.$$observers;$$observers&&forEach($$observers[observer],function(fn){try{fn(value)}catch(e){$exceptionHandler(e)}})},$observe:function(key,fn){var attrs=this,$$observers=attrs.$$observers||(attrs.$$observers=createMap()),listeners=$$observers[key]||($$observers[key]=[]);return listeners.push(fn),$rootScope.$evalAsync(function(){listeners.$$inter||!attrs.hasOwnProperty(key)||isUndefined(attrs[key])||fn(attrs[key])}),function(){arrayRemove(listeners,fn)}}};var startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),denormalizeTemplate="{{"==startSymbol&&"}}"==endSymbol?identity:function(template){return template.replace(/\{\{/g,startSymbol).replace(/}}/g,endSymbol)},NG_ATTR_BINDING=/^ngAttr[A-Z]/,MULTI_ELEMENT_DIR_RE=/^(.+)Start$/;
return compile.$$addBindingInfo=debugInfoEnabled?function($element,binding){var bindings=$element.data("$binding")||[];isArray(binding)?bindings=bindings.concat(binding):bindings.push(binding),$element.data("$binding",bindings)}:noop,compile.$$addBindingClass=debugInfoEnabled?function($element){safeAddClass($element,"ng-binding")}:noop,compile.$$addScopeInfo=debugInfoEnabled?function($element,scope,isolated,noTemplate){var dataName=isolated?noTemplate?"$isolateScopeNoTemplate":"$isolateScope":"$scope";$element.data(dataName,scope)}:noop,compile.$$addScopeClass=debugInfoEnabled?function($element,isolated){safeAddClass($element,isolated?"ng-isolate-scope":"ng-scope")}:noop,compile}]}function directiveNormalize(name){return camelCase(name.replace(PREFIX_REGEXP,""))}function tokenDifference(str1,str2){var values="",tokens1=str1.split(/\s+/),tokens2=str2.split(/\s+/);outer:for(var i=0;i<tokens1.length;i++){for(var token=tokens1[i],j=0;j<tokens2.length;j++)if(token==tokens2[j])continue outer;values+=(values.length>0?" ":"")+token}return values}function removeComments(jqNodes){jqNodes=jqLite(jqNodes);var i=jqNodes.length;if(i<=1)return jqNodes;for(;i--;){var node=jqNodes[i];node.nodeType===NODE_TYPE_COMMENT&&splice.call(jqNodes,i,1)}return jqNodes}function identifierForController(controller,ident){if(ident&&isString(ident))return ident;if(isString(controller)){var match=CNTRL_REG.exec(controller);if(match)return match[3]}}function $ControllerProvider(){var controllers={},globals=!1;this.register=function(name,constructor){assertNotHasOwnProperty(name,"controller"),isObject(name)?extend(controllers,name):controllers[name]=constructor},this.allowGlobals=function(){globals=!0},this.$get=["$injector","$window",function($injector,$window){function addIdentifier(locals,identifier,instance,name){if(!locals||!isObject(locals.$scope))throw minErr("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",name,identifier);locals.$scope[identifier]=instance}return function(expression,locals,later,ident){var instance,match,constructor,identifier;if(later=later===!0,ident&&isString(ident)&&(identifier=ident),isString(expression)){if(match=expression.match(CNTRL_REG),!match)throw $controllerMinErr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",expression);constructor=match[1],identifier=identifier||match[3],expression=controllers.hasOwnProperty(constructor)?controllers[constructor]:getter(locals.$scope,constructor,!0)||(globals?getter($window,constructor,!0):undefined),assertArgFn(expression,constructor,!0)}if(later){var controllerPrototype=(isArray(expression)?expression[expression.length-1]:expression).prototype;instance=Object.create(controllerPrototype||null),identifier&&addIdentifier(locals,identifier,instance,constructor||expression.name);var instantiate;return instantiate=extend(function(){var result=$injector.invoke(expression,instance,locals,constructor);return result!==instance&&(isObject(result)||isFunction(result))&&(instance=result,identifier&&addIdentifier(locals,identifier,instance,constructor||expression.name)),instance},{instance:instance,identifier:identifier})}return instance=$injector.instantiate(expression,locals,constructor),identifier&&addIdentifier(locals,identifier,instance,constructor||expression.name),instance}}]}function $DocumentProvider(){this.$get=["$window",function(window){return jqLite(window.document)}]}function $ExceptionHandlerProvider(){this.$get=["$log",function($log){return function(exception,cause){$log.error.apply($log,arguments)}}]}function serializeValue(v){return isObject(v)?isDate(v)?v.toISOString():toJson(v):v}function $HttpParamSerializerProvider(){this.$get=function(){return function(params){if(!params)return"";var parts=[];return forEachSorted(params,function(value,key){null===value||isUndefined(value)||(isArray(value)?forEach(value,function(v,k){parts.push(encodeUriQuery(key)+"="+encodeUriQuery(serializeValue(v)))}):parts.push(encodeUriQuery(key)+"="+encodeUriQuery(serializeValue(value))))}),parts.join("&")}}}function $HttpParamSerializerJQLikeProvider(){this.$get=function(){return function(params){function serialize(toSerialize,prefix,topLevel){null===toSerialize||isUndefined(toSerialize)||(isArray(toSerialize)?forEach(toSerialize,function(value,index){serialize(value,prefix+"["+(isObject(value)?index:"")+"]")}):isObject(toSerialize)&&!isDate(toSerialize)?forEachSorted(toSerialize,function(value,key){serialize(value,prefix+(topLevel?"":"[")+key+(topLevel?"":"]"))}):parts.push(encodeUriQuery(prefix)+"="+encodeUriQuery(serializeValue(toSerialize))))}if(!params)return"";var parts=[];return serialize(params,"",!0),parts.join("&")}}}function defaultHttpResponseTransform(data,headers){if(isString(data)){var tempData=data.replace(JSON_PROTECTION_PREFIX,"").trim();if(tempData){var contentType=headers("Content-Type");(contentType&&0===contentType.indexOf(APPLICATION_JSON)||isJsonLike(tempData))&&(data=fromJson(tempData))}}return data}function isJsonLike(str){var jsonStart=str.match(JSON_START);return jsonStart&&JSON_ENDS[jsonStart[0]].test(str)}function parseHeaders(headers){function fillInParsed(key,val){key&&(parsed[key]=parsed[key]?parsed[key]+", "+val:val)}var i,parsed=createMap();return isString(headers)?forEach(headers.split("\n"),function(line){i=line.indexOf(":"),fillInParsed(lowercase(trim(line.substr(0,i))),trim(line.substr(i+1)))}):isObject(headers)&&forEach(headers,function(headerVal,headerKey){fillInParsed(lowercase(headerKey),trim(headerVal))}),parsed}function headersGetter(headers){var headersObj;return function(name){if(headersObj||(headersObj=parseHeaders(headers)),name){var value=headersObj[lowercase(name)];return void 0===value&&(value=null),value}return headersObj}}function transformData(data,headers,status,fns){return isFunction(fns)?fns(data,headers,status):(forEach(fns,function(fn){data=fn(data,headers,status)}),data)}function isSuccess(status){return 200<=status&&status<300}function $HttpProvider(){var defaults=this.defaults={transformResponse:[defaultHttpResponseTransform],transformRequest:[function(d){return!isObject(d)||isFile(d)||isBlob(d)||isFormData(d)?d:toJson(d)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),put:shallowCopy(CONTENT_TYPE_APPLICATION_JSON),patch:shallowCopy(CONTENT_TYPE_APPLICATION_JSON)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},useApplyAsync=!1;this.useApplyAsync=function(value){return isDefined(value)?(useApplyAsync=!!value,this):useApplyAsync};var useLegacyPromise=!0;this.useLegacyPromiseExtensions=function(value){return isDefined(value)?(useLegacyPromise=!!value,this):useLegacyPromise};var interceptorFactories=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function($httpBackend,$$cookieReader,$cacheFactory,$rootScope,$q,$injector){function $http(requestConfig){function transformResponse(response){var resp=extend({},response);return resp.data=transformData(response.data,response.headers,response.status,config.transformResponse),isSuccess(response.status)?resp:$q.reject(resp)}function executeHeaderFns(headers,config){var headerContent,processedHeaders={};return forEach(headers,function(headerFn,header){isFunction(headerFn)?(headerContent=headerFn(config),null!=headerContent&&(processedHeaders[header]=headerContent)):processedHeaders[header]=headerFn}),processedHeaders}function mergeHeaders(config){var defHeaderName,lowercaseDefHeaderName,reqHeaderName,defHeaders=defaults.headers,reqHeaders=extend({},config.headers);defHeaders=extend({},defHeaders.common,defHeaders[lowercase(config.method)]);defaultHeadersIteration:for(defHeaderName in defHeaders){lowercaseDefHeaderName=lowercase(defHeaderName);for(reqHeaderName in reqHeaders)if(lowercase(reqHeaderName)===lowercaseDefHeaderName)continue defaultHeadersIteration;reqHeaders[defHeaderName]=defHeaders[defHeaderName]}return executeHeaderFns(reqHeaders,shallowCopy(config))}if(!angular.isObject(requestConfig))throw minErr("$http")("badreq","Http request configuration must be an object. Received: {0}",requestConfig);if(!isString(requestConfig.url))throw minErr("$http")("badreq","Http request configuration url must be a string. Received: {0}",requestConfig.url);var config=extend({method:"get",transformRequest:defaults.transformRequest,transformResponse:defaults.transformResponse,paramSerializer:defaults.paramSerializer},requestConfig);config.headers=mergeHeaders(requestConfig),config.method=uppercase(config.method),config.paramSerializer=isString(config.paramSerializer)?$injector.get(config.paramSerializer):config.paramSerializer;var serverRequest=function(config){var headers=config.headers,reqData=transformData(config.data,headersGetter(headers),undefined,config.transformRequest);return isUndefined(reqData)&&forEach(headers,function(value,header){"content-type"===lowercase(header)&&delete headers[header]}),isUndefined(config.withCredentials)&&!isUndefined(defaults.withCredentials)&&(config.withCredentials=defaults.withCredentials),sendReq(config,reqData).then(transformResponse,transformResponse)},chain=[serverRequest,undefined],promise=$q.when(config);for(forEach(reversedInterceptors,function(interceptor){(interceptor.request||interceptor.requestError)&&chain.unshift(interceptor.request,interceptor.requestError),(interceptor.response||interceptor.responseError)&&chain.push(interceptor.response,interceptor.responseError)});chain.length;){var thenFn=chain.shift(),rejectFn=chain.shift();promise=promise.then(thenFn,rejectFn)}return useLegacyPromise?(promise.success=function(fn){return assertArgFn(fn,"fn"),promise.then(function(response){fn(response.data,response.status,response.headers,config)}),promise},promise.error=function(fn){return assertArgFn(fn,"fn"),promise.then(null,function(response){fn(response.data,response.status,response.headers,config)}),promise}):(promise.success=$httpMinErrLegacyFn("success"),promise.error=$httpMinErrLegacyFn("error")),promise}function createShortMethods(names){forEach(arguments,function(name){$http[name]=function(url,config){return $http(extend({},config||{},{method:name,url:url}))}})}function createShortMethodsWithData(name){forEach(arguments,function(name){$http[name]=function(url,data,config){return $http(extend({},config||{},{method:name,url:url,data:data}))}})}function sendReq(config,reqData){function done(status,response,headersString,statusText){function resolveHttpPromise(){resolvePromise(response,status,headersString,statusText)}cache&&(isSuccess(status)?cache.put(url,[status,response,parseHeaders(headersString),statusText]):cache.remove(url)),useApplyAsync?$rootScope.$applyAsync(resolveHttpPromise):(resolveHttpPromise(),$rootScope.$$phase||$rootScope.$apply())}function resolvePromise(response,status,headers,statusText){status=status>=-1?status:0,(isSuccess(status)?deferred.resolve:deferred.reject)({data:response,status:status,headers:headersGetter(headers),config:config,statusText:statusText})}function resolvePromiseWithResult(result){resolvePromise(result.data,result.status,shallowCopy(result.headers()),result.statusText)}function removePendingReq(){var idx=$http.pendingRequests.indexOf(config);idx!==-1&&$http.pendingRequests.splice(idx,1)}var cache,cachedResp,deferred=$q.defer(),promise=deferred.promise,reqHeaders=config.headers,url=buildUrl(config.url,config.paramSerializer(config.params));if($http.pendingRequests.push(config),promise.then(removePendingReq,removePendingReq),!config.cache&&!defaults.cache||config.cache===!1||"GET"!==config.method&&"JSONP"!==config.method||(cache=isObject(config.cache)?config.cache:isObject(defaults.cache)?defaults.cache:defaultCache),cache&&(cachedResp=cache.get(url),isDefined(cachedResp)?isPromiseLike(cachedResp)?cachedResp.then(resolvePromiseWithResult,resolvePromiseWithResult):isArray(cachedResp)?resolvePromise(cachedResp[1],cachedResp[0],shallowCopy(cachedResp[2]),cachedResp[3]):resolvePromise(cachedResp,200,{},"OK"):cache.put(url,promise)),isUndefined(cachedResp)){var xsrfValue=urlIsSameOrigin(config.url)?$$cookieReader()[config.xsrfCookieName||defaults.xsrfCookieName]:undefined;xsrfValue&&(reqHeaders[config.xsrfHeaderName||defaults.xsrfHeaderName]=xsrfValue),$httpBackend(config.method,url,reqData,done,reqHeaders,config.timeout,config.withCredentials,config.responseType)}return promise}function buildUrl(url,serializedParams){return serializedParams.length>0&&(url+=(url.indexOf("?")==-1?"?":"&")+serializedParams),url}var defaultCache=$cacheFactory("$http");defaults.paramSerializer=isString(defaults.paramSerializer)?$injector.get(defaults.paramSerializer):defaults.paramSerializer;var reversedInterceptors=[];return forEach(interceptorFactories,function(interceptorFactory){reversedInterceptors.unshift(isString(interceptorFactory)?$injector.get(interceptorFactory):$injector.invoke(interceptorFactory))}),$http.pendingRequests=[],createShortMethods("get","delete","head","jsonp"),createShortMethodsWithData("post","put","patch"),$http.defaults=defaults,$http}]}function $xhrFactoryProvider(){this.$get=function(){return function(){return new window.XMLHttpRequest}}}function $HttpBackendProvider(){this.$get=["$browser","$window","$document","$xhrFactory",function($browser,$window,$document,$xhrFactory){return createHttpBackend($browser,$xhrFactory,$browser.defer,$window.angular.callbacks,$document[0])}]}function createHttpBackend($browser,createXhr,$browserDefer,callbacks,rawDocument){function jsonpReq(url,callbackId,done){var script=rawDocument.createElement("script"),callback=null;return script.type="text/javascript",script.src=url,script.async=!0,callback=function(event){removeEventListenerFn(script,"load",callback),removeEventListenerFn(script,"error",callback),rawDocument.body.removeChild(script),script=null;var status=-1,text="unknown";event&&("load"!==event.type||callbacks[callbackId].called||(event={type:"error"}),text=event.type,status="error"===event.type?404:200),done&&done(status,text)},addEventListenerFn(script,"load",callback),addEventListenerFn(script,"error",callback),rawDocument.body.appendChild(script),callback}return function(method,url,post,callback,headers,timeout,withCredentials,responseType){function timeoutRequest(){jsonpDone&&jsonpDone(),xhr&&xhr.abort()}function completeRequest(callback,status,response,headersString,statusText){isDefined(timeoutId)&&$browserDefer.cancel(timeoutId),jsonpDone=xhr=null,callback(status,response,headersString,statusText),$browser.$$completeOutstandingRequest(noop)}if($browser.$$incOutstandingRequestCount(),url=url||$browser.url(),"jsonp"==lowercase(method)){var callbackId="_"+(callbacks.counter++).toString(36);callbacks[callbackId]=function(data){callbacks[callbackId].data=data,callbacks[callbackId].called=!0};var jsonpDone=jsonpReq(url.replace("JSON_CALLBACK","angular.callbacks."+callbackId),callbackId,function(status,text){completeRequest(callback,status,callbacks[callbackId].data,"",text),callbacks[callbackId]=noop})}else{var xhr=createXhr(method,url);xhr.open(method,url,!0),forEach(headers,function(value,key){isDefined(value)&&xhr.setRequestHeader(key,value)}),xhr.onload=function(){var statusText=xhr.statusText||"",response="response"in xhr?xhr.response:xhr.responseText,status=1223===xhr.status?204:xhr.status;0===status&&(status=response?200:"file"==urlResolve(url).protocol?404:0),completeRequest(callback,status,response,xhr.getAllResponseHeaders(),statusText)};var requestError=function(){completeRequest(callback,-1,null,null,"")};if(xhr.onerror=requestError,xhr.onabort=requestError,withCredentials&&(xhr.withCredentials=!0),responseType)try{xhr.responseType=responseType}catch(e){if("json"!==responseType)throw e}xhr.send(isUndefined(post)?null:post)}if(timeout>0)var timeoutId=$browserDefer(timeoutRequest,timeout);else isPromiseLike(timeout)&&timeout.then(timeoutRequest)}}function $InterpolateProvider(){var startSymbol="{{",endSymbol="}}";this.startSymbol=function(value){return value?(startSymbol=value,this):startSymbol},this.endSymbol=function(value){return value?(endSymbol=value,this):endSymbol},this.$get=["$parse","$exceptionHandler","$sce",function($parse,$exceptionHandler,$sce){function escape(ch){return"\\\\\\"+ch}function unescapeText(text){return text.replace(escapedStartRegexp,startSymbol).replace(escapedEndRegexp,endSymbol)}function stringify(value){if(null==value)return"";switch(typeof value){case"string":break;case"number":value=""+value;break;default:value=toJson(value)}return value}function $interpolate(text,mustHaveExpression,trustedContext,allOrNothing){function parseStringifyInterceptor(value){try{return value=getValue(value),allOrNothing&&!isDefined(value)?value:stringify(value)}catch(err){$exceptionHandler($interpolateMinErr.interr(text,err))}}allOrNothing=!!allOrNothing;for(var startIndex,endIndex,exp,index=0,expressions=[],parseFns=[],textLength=text.length,concat=[],expressionPositions=[];index<textLength;){if((startIndex=text.indexOf(startSymbol,index))==-1||(endIndex=text.indexOf(endSymbol,startIndex+startSymbolLength))==-1){index!==textLength&&concat.push(unescapeText(text.substring(index)));break}index!==startIndex&&concat.push(unescapeText(text.substring(index,startIndex))),exp=text.substring(startIndex+startSymbolLength,endIndex),expressions.push(exp),parseFns.push($parse(exp,parseStringifyInterceptor)),index=endIndex+endSymbolLength,expressionPositions.push(concat.length),concat.push("")}if(trustedContext&&concat.length>1&&$interpolateMinErr.throwNoconcat(text),!mustHaveExpression||expressions.length){var compute=function(values){for(var i=0,ii=expressions.length;i<ii;i++){if(allOrNothing&&isUndefined(values[i]))return;concat[expressionPositions[i]]=values[i]}return concat.join("")},getValue=function(value){return trustedContext?$sce.getTrusted(trustedContext,value):$sce.valueOf(value)};return extend(function(context){var i=0,ii=expressions.length,values=new Array(ii);try{for(;i<ii;i++)values[i]=parseFns[i](context);return compute(values)}catch(err){$exceptionHandler($interpolateMinErr.interr(text,err))}},{exp:text,expressions:expressions,$$watchDelegate:function(scope,listener){var lastValue;return scope.$watchGroup(parseFns,function(values,oldValues){var currValue=compute(values);isFunction(listener)&&listener.call(this,currValue,values!==oldValues?lastValue:currValue,scope),lastValue=currValue})}})}}var startSymbolLength=startSymbol.length,endSymbolLength=endSymbol.length,escapedStartRegexp=new RegExp(startSymbol.replace(/./g,escape),"g"),escapedEndRegexp=new RegExp(endSymbol.replace(/./g,escape),"g");return $interpolate.startSymbol=function(){return startSymbol},$interpolate.endSymbol=function(){return endSymbol},$interpolate}]}function $IntervalProvider(){this.$get=["$rootScope","$window","$q","$$q",function($rootScope,$window,$q,$$q){function interval(fn,delay,count,invokeApply){var hasParams=arguments.length>4,args=hasParams?sliceArgs(arguments,4):[],setInterval=$window.setInterval,clearInterval=$window.clearInterval,iteration=0,skipApply=isDefined(invokeApply)&&!invokeApply,deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise;return count=isDefined(count)?count:0,promise.then(null,null,hasParams?function(){fn.apply(null,args)}:fn),promise.$$intervalId=setInterval(function(){deferred.notify(iteration++),count>0&&iteration>=count&&(deferred.resolve(iteration),clearInterval(promise.$$intervalId),delete intervals[promise.$$intervalId]),skipApply||$rootScope.$apply()},delay),intervals[promise.$$intervalId]=deferred,promise}var intervals={};return interval.cancel=function(promise){return!!(promise&&promise.$$intervalId in intervals)&&(intervals[promise.$$intervalId].reject("canceled"),$window.clearInterval(promise.$$intervalId),delete intervals[promise.$$intervalId],!0)},interval}]}function encodePath(path){for(var segments=path.split("/"),i=segments.length;i--;)segments[i]=encodeUriSegment(segments[i]);return segments.join("/")}function parseAbsoluteUrl(absoluteUrl,locationObj){var parsedUrl=urlResolve(absoluteUrl);locationObj.$$protocol=parsedUrl.protocol,locationObj.$$host=parsedUrl.hostname,locationObj.$$port=toInt(parsedUrl.port)||DEFAULT_PORTS[parsedUrl.protocol]||null}function parseAppUrl(relativeUrl,locationObj){var prefixed="/"!==relativeUrl.charAt(0);prefixed&&(relativeUrl="/"+relativeUrl);var match=urlResolve(relativeUrl);locationObj.$$path=decodeURIComponent(prefixed&&"/"===match.pathname.charAt(0)?match.pathname.substring(1):match.pathname),locationObj.$$search=parseKeyValue(match.search),locationObj.$$hash=decodeURIComponent(match.hash),locationObj.$$path&&"/"!=locationObj.$$path.charAt(0)&&(locationObj.$$path="/"+locationObj.$$path)}function beginsWith(begin,whole){if(0===whole.indexOf(begin))return whole.substr(begin.length)}function stripHash(url){var index=url.indexOf("#");return index==-1?url:url.substr(0,index)}function trimEmptyHash(url){return url.replace(/(#.+)|#$/,"$1")}function stripFile(url){return url.substr(0,stripHash(url).lastIndexOf("/")+1)}function serverBase(url){return url.substring(0,url.indexOf("/",url.indexOf("//")+2))}function LocationHtml5Url(appBase,appBaseNoFile,basePrefix){this.$$html5=!0,basePrefix=basePrefix||"",parseAbsoluteUrl(appBase,this),this.$$parse=function(url){var pathUrl=beginsWith(appBaseNoFile,url);if(!isString(pathUrl))throw $locationMinErr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',url,appBaseNoFile);parseAppUrl(pathUrl,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBaseNoFile+this.$$url.substr(1)},this.$$parseLinkUrl=function(url,relHref){if(relHref&&"#"===relHref[0])return this.hash(relHref.slice(1)),!0;var appUrl,prevAppUrl,rewrittenUrl;return isDefined(appUrl=beginsWith(appBase,url))?(prevAppUrl=appUrl,rewrittenUrl=isDefined(appUrl=beginsWith(basePrefix,appUrl))?appBaseNoFile+(beginsWith("/",appUrl)||appUrl):appBase+prevAppUrl):isDefined(appUrl=beginsWith(appBaseNoFile,url))?rewrittenUrl=appBaseNoFile+appUrl:appBaseNoFile==url+"/"&&(rewrittenUrl=appBaseNoFile),rewrittenUrl&&this.$$parse(rewrittenUrl),!!rewrittenUrl}}function LocationHashbangUrl(appBase,appBaseNoFile,hashPrefix){parseAbsoluteUrl(appBase,this),this.$$parse=function(url){function removeWindowsDriveName(path,url,base){var firstPathSegmentMatch,windowsFilePathExp=/^\/[A-Z]:(\/.*)/;return 0===url.indexOf(base)&&(url=url.replace(base,"")),windowsFilePathExp.exec(url)?path:(firstPathSegmentMatch=windowsFilePathExp.exec(path),firstPathSegmentMatch?firstPathSegmentMatch[1]:path)}var withoutHashUrl,withoutBaseUrl=beginsWith(appBase,url)||beginsWith(appBaseNoFile,url);isUndefined(withoutBaseUrl)||"#"!==withoutBaseUrl.charAt(0)?this.$$html5?withoutHashUrl=withoutBaseUrl:(withoutHashUrl="",isUndefined(withoutBaseUrl)&&(appBase=url,this.replace())):(withoutHashUrl=beginsWith(hashPrefix,withoutBaseUrl),isUndefined(withoutHashUrl)&&(withoutHashUrl=withoutBaseUrl)),parseAppUrl(withoutHashUrl,this),this.$$path=removeWindowsDriveName(this.$$path,withoutHashUrl,appBase),this.$$compose()},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBase+(this.$$url?hashPrefix+this.$$url:"")},this.$$parseLinkUrl=function(url,relHref){return stripHash(appBase)==stripHash(url)&&(this.$$parse(url),!0)}}function LocationHashbangInHtml5Url(appBase,appBaseNoFile,hashPrefix){this.$$html5=!0,LocationHashbangUrl.apply(this,arguments),this.$$parseLinkUrl=function(url,relHref){if(relHref&&"#"===relHref[0])return this.hash(relHref.slice(1)),!0;var rewrittenUrl,appUrl;return appBase==stripHash(url)?rewrittenUrl=url:(appUrl=beginsWith(appBaseNoFile,url))?rewrittenUrl=appBase+hashPrefix+appUrl:appBaseNoFile===url+"/"&&(rewrittenUrl=appBaseNoFile),rewrittenUrl&&this.$$parse(rewrittenUrl),!!rewrittenUrl},this.$$compose=function(){var search=toKeyValue(this.$$search),hash=this.$$hash?"#"+encodeUriSegment(this.$$hash):"";this.$$url=encodePath(this.$$path)+(search?"?"+search:"")+hash,this.$$absUrl=appBase+hashPrefix+this.$$url}}function locationGetter(property){return function(){return this[property]}}function locationGetterSetter(property,preprocess){return function(value){return isUndefined(value)?this[property]:(this[property]=preprocess(value),this.$$compose(),this)}}function $LocationProvider(){var hashPrefix="",html5Mode={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(prefix){return isDefined(prefix)?(hashPrefix=prefix,this):hashPrefix},this.html5Mode=function(mode){return isBoolean(mode)?(html5Mode.enabled=mode,this):isObject(mode)?(isBoolean(mode.enabled)&&(html5Mode.enabled=mode.enabled),isBoolean(mode.requireBase)&&(html5Mode.requireBase=mode.requireBase),isBoolean(mode.rewriteLinks)&&(html5Mode.rewriteLinks=mode.rewriteLinks),this):html5Mode},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function($rootScope,$browser,$sniffer,$rootElement,$window){function setBrowserUrlWithFallback(url,replace,state){var oldUrl=$location.url(),oldState=$location.$$state;try{$browser.url(url,replace,state),$location.$$state=$browser.state()}catch(e){throw $location.url(oldUrl),$location.$$state=oldState,e}}function afterLocationChange(oldUrl,oldState){$rootScope.$broadcast("$locationChangeSuccess",$location.absUrl(),oldUrl,$location.$$state,oldState)}var $location,LocationMode,appBase,baseHref=$browser.baseHref(),initialUrl=$browser.url();if(html5Mode.enabled){if(!baseHref&&html5Mode.requireBase)throw $locationMinErr("nobase","$location in HTML5 mode requires a <base> tag to be present!");appBase=serverBase(initialUrl)+(baseHref||"/"),LocationMode=$sniffer.history?LocationHtml5Url:LocationHashbangInHtml5Url}else appBase=stripHash(initialUrl),LocationMode=LocationHashbangUrl;var appBaseNoFile=stripFile(appBase);$location=new LocationMode(appBase,appBaseNoFile,"#"+hashPrefix),$location.$$parseLinkUrl(initialUrl,initialUrl),$location.$$state=$browser.state();var IGNORE_URI_REGEXP=/^\s*(javascript|mailto):/i;$rootElement.on("click",function(event){if(html5Mode.rewriteLinks&&!event.ctrlKey&&!event.metaKey&&!event.shiftKey&&2!=event.which&&2!=event.button){for(var elm=jqLite(event.target);"a"!==nodeName_(elm[0]);)if(elm[0]===$rootElement[0]||!(elm=elm.parent())[0])return;var absHref=elm.prop("href"),relHref=elm.attr("href")||elm.attr("xlink:href");isObject(absHref)&&"[object SVGAnimatedString]"===absHref.toString()&&(absHref=urlResolve(absHref.animVal).href),IGNORE_URI_REGEXP.test(absHref)||!absHref||elm.attr("target")||event.isDefaultPrevented()||$location.$$parseLinkUrl(absHref,relHref)&&(event.preventDefault(),$location.absUrl()!=$browser.url()&&($rootScope.$apply(),$window.angular["ff-684208-preventDefault"]=!0))}}),trimEmptyHash($location.absUrl())!=trimEmptyHash(initialUrl)&&$browser.url($location.absUrl(),!0);var initializing=!0;return $browser.onUrlChange(function(newUrl,newState){return isUndefined(beginsWith(appBaseNoFile,newUrl))?void($window.location.href=newUrl):($rootScope.$evalAsync(function(){var defaultPrevented,oldUrl=$location.absUrl(),oldState=$location.$$state;newUrl=trimEmptyHash(newUrl),$location.$$parse(newUrl),$location.$$state=newState,defaultPrevented=$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl,newState,oldState).defaultPrevented,$location.absUrl()===newUrl&&(defaultPrevented?($location.$$parse(oldUrl),$location.$$state=oldState,setBrowserUrlWithFallback(oldUrl,!1,oldState)):(initializing=!1,afterLocationChange(oldUrl,oldState)))}),void($rootScope.$$phase||$rootScope.$digest()))}),$rootScope.$watch(function(){var oldUrl=trimEmptyHash($browser.url()),newUrl=trimEmptyHash($location.absUrl()),oldState=$browser.state(),currentReplace=$location.$$replace,urlOrStateChanged=oldUrl!==newUrl||$location.$$html5&&$sniffer.history&&oldState!==$location.$$state;(initializing||urlOrStateChanged)&&(initializing=!1,$rootScope.$evalAsync(function(){var newUrl=$location.absUrl(),defaultPrevented=$rootScope.$broadcast("$locationChangeStart",newUrl,oldUrl,$location.$$state,oldState).defaultPrevented;$location.absUrl()===newUrl&&(defaultPrevented?($location.$$parse(oldUrl),$location.$$state=oldState):(urlOrStateChanged&&setBrowserUrlWithFallback(newUrl,currentReplace,oldState===$location.$$state?null:$location.$$state),afterLocationChange(oldUrl,oldState)))})),$location.$$replace=!1}),$location}]}function $LogProvider(){var debug=!0,self=this;this.debugEnabled=function(flag){return isDefined(flag)?(debug=flag,this):debug},this.$get=["$window",function($window){function formatError(arg){return arg instanceof Error&&(arg.stack?arg=arg.message&&arg.stack.indexOf(arg.message)===-1?"Error: "+arg.message+"\n"+arg.stack:arg.stack:arg.sourceURL&&(arg=arg.message+"\n"+arg.sourceURL+":"+arg.line)),arg}function consoleLog(type){var console=$window.console||{},logFn=console[type]||console.log||noop,hasApply=!1;try{hasApply=!!logFn.apply}catch(e){}return hasApply?function(){var args=[];return forEach(arguments,function(arg){args.push(formatError(arg))}),logFn.apply(console,args)}:function(arg1,arg2){logFn(arg1,null==arg2?"":arg2)}}return{log:consoleLog("log"),info:consoleLog("info"),warn:consoleLog("warn"),error:consoleLog("error"),debug:function(){var fn=consoleLog("debug");return function(){debug&&fn.apply(self,arguments)}}()}}]}function ensureSafeMemberName(name,fullExpression){if("__defineGetter__"===name||"__defineSetter__"===name||"__lookupGetter__"===name||"__lookupSetter__"===name||"__proto__"===name)throw $parseMinErr("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",fullExpression);return name}function getStringValue(name,fullExpression){if(name+="",!isString(name))throw $parseMinErr("iseccst","Cannot convert object to primitive value! Expression: {0}",fullExpression);return name}function ensureSafeObject(obj,fullExpression){if(obj){if(obj.constructor===obj)throw $parseMinErr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj.window===obj)throw $parseMinErr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj.children&&(obj.nodeName||obj.prop&&obj.attr&&obj.find))throw $parseMinErr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj===Object)throw $parseMinErr("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",fullExpression)}return obj}function ensureSafeFunction(obj,fullExpression){if(obj){if(obj.constructor===obj)throw $parseMinErr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",fullExpression);if(obj===CALL||obj===APPLY||obj===BIND)throw $parseMinErr("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",fullExpression)}}function ensureSafeAssignContext(obj,fullExpression){if(obj&&(obj===(0).constructor||obj===(!1).constructor||obj==="".constructor||obj==={}.constructor||obj===[].constructor||obj===Function.constructor))throw $parseMinErr("isecaf","Assigning to a constructor is disallowed! Expression: {0}",fullExpression)}function ifDefined(v,d){return"undefined"!=typeof v?v:d}function plusFn(l,r){return"undefined"==typeof l?r:"undefined"==typeof r?l:l+r}function isStateless($filter,filterName){var fn=$filter(filterName);return!fn.$stateful}function findConstantAndWatchExpressions(ast,$filter){var allConstants,argsToWatch;switch(ast.type){case AST.Program:allConstants=!0,forEach(ast.body,function(expr){findConstantAndWatchExpressions(expr.expression,$filter),allConstants=allConstants&&expr.expression.constant}),
ast.constant=allConstants;break;case AST.Literal:ast.constant=!0,ast.toWatch=[];break;case AST.UnaryExpression:findConstantAndWatchExpressions(ast.argument,$filter),ast.constant=ast.argument.constant,ast.toWatch=ast.argument.toWatch;break;case AST.BinaryExpression:findConstantAndWatchExpressions(ast.left,$filter),findConstantAndWatchExpressions(ast.right,$filter),ast.constant=ast.left.constant&&ast.right.constant,ast.toWatch=ast.left.toWatch.concat(ast.right.toWatch);break;case AST.LogicalExpression:findConstantAndWatchExpressions(ast.left,$filter),findConstantAndWatchExpressions(ast.right,$filter),ast.constant=ast.left.constant&&ast.right.constant,ast.toWatch=ast.constant?[]:[ast];break;case AST.ConditionalExpression:findConstantAndWatchExpressions(ast.test,$filter),findConstantAndWatchExpressions(ast.alternate,$filter),findConstantAndWatchExpressions(ast.consequent,$filter),ast.constant=ast.test.constant&&ast.alternate.constant&&ast.consequent.constant,ast.toWatch=ast.constant?[]:[ast];break;case AST.Identifier:ast.constant=!1,ast.toWatch=[ast];break;case AST.MemberExpression:findConstantAndWatchExpressions(ast.object,$filter),ast.computed&&findConstantAndWatchExpressions(ast.property,$filter),ast.constant=ast.object.constant&&(!ast.computed||ast.property.constant),ast.toWatch=[ast];break;case AST.CallExpression:allConstants=!!ast.filter&&isStateless($filter,ast.callee.name),argsToWatch=[],forEach(ast.arguments,function(expr){findConstantAndWatchExpressions(expr,$filter),allConstants=allConstants&&expr.constant,expr.constant||argsToWatch.push.apply(argsToWatch,expr.toWatch)}),ast.constant=allConstants,ast.toWatch=ast.filter&&isStateless($filter,ast.callee.name)?argsToWatch:[ast];break;case AST.AssignmentExpression:findConstantAndWatchExpressions(ast.left,$filter),findConstantAndWatchExpressions(ast.right,$filter),ast.constant=ast.left.constant&&ast.right.constant,ast.toWatch=[ast];break;case AST.ArrayExpression:allConstants=!0,argsToWatch=[],forEach(ast.elements,function(expr){findConstantAndWatchExpressions(expr,$filter),allConstants=allConstants&&expr.constant,expr.constant||argsToWatch.push.apply(argsToWatch,expr.toWatch)}),ast.constant=allConstants,ast.toWatch=argsToWatch;break;case AST.ObjectExpression:allConstants=!0,argsToWatch=[],forEach(ast.properties,function(property){findConstantAndWatchExpressions(property.value,$filter),allConstants=allConstants&&property.value.constant,property.value.constant||argsToWatch.push.apply(argsToWatch,property.value.toWatch)}),ast.constant=allConstants,ast.toWatch=argsToWatch;break;case AST.ThisExpression:ast.constant=!1,ast.toWatch=[]}}function getInputs(body){if(1==body.length){var lastExpression=body[0].expression,candidate=lastExpression.toWatch;return 1!==candidate.length?candidate:candidate[0]!==lastExpression?candidate:undefined}}function isAssignable(ast){return ast.type===AST.Identifier||ast.type===AST.MemberExpression}function assignableAST(ast){if(1===ast.body.length&&isAssignable(ast.body[0].expression))return{type:AST.AssignmentExpression,left:ast.body[0].expression,right:{type:AST.NGValueParameter},operator:"="}}function isLiteral(ast){return 0===ast.body.length||1===ast.body.length&&(ast.body[0].expression.type===AST.Literal||ast.body[0].expression.type===AST.ArrayExpression||ast.body[0].expression.type===AST.ObjectExpression)}function isConstant(ast){return ast.constant}function ASTCompiler(astBuilder,$filter){this.astBuilder=astBuilder,this.$filter=$filter}function ASTInterpreter(astBuilder,$filter){this.astBuilder=astBuilder,this.$filter=$filter}function isPossiblyDangerousMemberName(name){return"constructor"==name}function getValueOf(value){return isFunction(value.valueOf)?value.valueOf():objectValueOf.call(value)}function $ParseProvider(){var cacheDefault=createMap(),cacheExpensive=createMap();this.$get=["$filter",function($filter){function $parse(exp,interceptorFn,expensiveChecks){var parsedExpression,oneTime,cacheKey;switch(expensiveChecks=expensiveChecks||runningChecksEnabled,typeof exp){case"string":exp=exp.trim(),cacheKey=exp;var cache=expensiveChecks?cacheExpensive:cacheDefault;if(parsedExpression=cache[cacheKey],!parsedExpression){":"===exp.charAt(0)&&":"===exp.charAt(1)&&(oneTime=!0,exp=exp.substring(2));var parseOptions=expensiveChecks?$parseOptionsExpensive:$parseOptions,lexer=new Lexer(parseOptions),parser=new Parser(lexer,$filter,parseOptions);parsedExpression=parser.parse(exp),parsedExpression.constant?parsedExpression.$$watchDelegate=constantWatchDelegate:oneTime?parsedExpression.$$watchDelegate=parsedExpression.literal?oneTimeLiteralWatchDelegate:oneTimeWatchDelegate:parsedExpression.inputs&&(parsedExpression.$$watchDelegate=inputsWatchDelegate),expensiveChecks&&(parsedExpression=expensiveChecksInterceptor(parsedExpression)),cache[cacheKey]=parsedExpression}return addInterceptor(parsedExpression,interceptorFn);case"function":return addInterceptor(exp,interceptorFn);default:return addInterceptor(noop,interceptorFn)}}function expensiveChecksInterceptor(fn){function expensiveCheckFn(scope,locals,assign,inputs){var expensiveCheckOldValue=runningChecksEnabled;runningChecksEnabled=!0;try{return fn(scope,locals,assign,inputs)}finally{runningChecksEnabled=expensiveCheckOldValue}}if(!fn)return fn;expensiveCheckFn.$$watchDelegate=fn.$$watchDelegate,expensiveCheckFn.assign=expensiveChecksInterceptor(fn.assign),expensiveCheckFn.constant=fn.constant,expensiveCheckFn.literal=fn.literal;for(var i=0;fn.inputs&&i<fn.inputs.length;++i)fn.inputs[i]=expensiveChecksInterceptor(fn.inputs[i]);return expensiveCheckFn.inputs=fn.inputs,expensiveCheckFn}function expressionInputDirtyCheck(newValue,oldValueOfValue){return null==newValue||null==oldValueOfValue?newValue===oldValueOfValue:("object"!=typeof newValue||(newValue=getValueOf(newValue),"object"!=typeof newValue))&&(newValue===oldValueOfValue||newValue!==newValue&&oldValueOfValue!==oldValueOfValue)}function inputsWatchDelegate(scope,listener,objectEquality,parsedExpression,prettyPrintExpression){var lastResult,inputExpressions=parsedExpression.inputs;if(1===inputExpressions.length){var oldInputValueOf=expressionInputDirtyCheck;return inputExpressions=inputExpressions[0],scope.$watch(function(scope){var newInputValue=inputExpressions(scope);return expressionInputDirtyCheck(newInputValue,oldInputValueOf)||(lastResult=parsedExpression(scope,undefined,undefined,[newInputValue]),oldInputValueOf=newInputValue&&getValueOf(newInputValue)),lastResult},listener,objectEquality,prettyPrintExpression)}for(var oldInputValueOfValues=[],oldInputValues=[],i=0,ii=inputExpressions.length;i<ii;i++)oldInputValueOfValues[i]=expressionInputDirtyCheck,oldInputValues[i]=null;return scope.$watch(function(scope){for(var changed=!1,i=0,ii=inputExpressions.length;i<ii;i++){var newInputValue=inputExpressions[i](scope);(changed||(changed=!expressionInputDirtyCheck(newInputValue,oldInputValueOfValues[i])))&&(oldInputValues[i]=newInputValue,oldInputValueOfValues[i]=newInputValue&&getValueOf(newInputValue))}return changed&&(lastResult=parsedExpression(scope,undefined,undefined,oldInputValues)),lastResult},listener,objectEquality,prettyPrintExpression)}function oneTimeWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch,lastValue;return unwatch=scope.$watch(function(scope){return parsedExpression(scope)},function(value,old,scope){lastValue=value,isFunction(listener)&&listener.apply(this,arguments),isDefined(value)&&scope.$$postDigest(function(){isDefined(lastValue)&&unwatch()})},objectEquality)}function oneTimeLiteralWatchDelegate(scope,listener,objectEquality,parsedExpression){function isAllDefined(value){var allDefined=!0;return forEach(value,function(val){isDefined(val)||(allDefined=!1)}),allDefined}var unwatch,lastValue;return unwatch=scope.$watch(function(scope){return parsedExpression(scope)},function(value,old,scope){lastValue=value,isFunction(listener)&&listener.call(this,value,old,scope),isAllDefined(value)&&scope.$$postDigest(function(){isAllDefined(lastValue)&&unwatch()})},objectEquality)}function constantWatchDelegate(scope,listener,objectEquality,parsedExpression){var unwatch;return unwatch=scope.$watch(function(scope){return parsedExpression(scope)},function(value,old,scope){isFunction(listener)&&listener.apply(this,arguments),unwatch()},objectEquality)}function addInterceptor(parsedExpression,interceptorFn){if(!interceptorFn)return parsedExpression;var watchDelegate=parsedExpression.$$watchDelegate,useInputs=!1,regularWatch=watchDelegate!==oneTimeLiteralWatchDelegate&&watchDelegate!==oneTimeWatchDelegate,fn=regularWatch?function(scope,locals,assign,inputs){var value=useInputs&&inputs?inputs[0]:parsedExpression(scope,locals,assign,inputs);return interceptorFn(value,scope,locals)}:function(scope,locals,assign,inputs){var value=parsedExpression(scope,locals,assign,inputs),result=interceptorFn(value,scope,locals);return isDefined(value)?result:value};return parsedExpression.$$watchDelegate&&parsedExpression.$$watchDelegate!==inputsWatchDelegate?fn.$$watchDelegate=parsedExpression.$$watchDelegate:interceptorFn.$stateful||(fn.$$watchDelegate=inputsWatchDelegate,useInputs=!parsedExpression.inputs,fn.inputs=parsedExpression.inputs?parsedExpression.inputs:[parsedExpression]),fn}var noUnsafeEval=csp().noUnsafeEval,$parseOptions={csp:noUnsafeEval,expensiveChecks:!1},$parseOptionsExpensive={csp:noUnsafeEval,expensiveChecks:!0},runningChecksEnabled=!1;return $parse.$$runningExpensiveChecks=function(){return runningChecksEnabled},$parse}]}function $QProvider(){this.$get=["$rootScope","$exceptionHandler",function($rootScope,$exceptionHandler){return qFactory(function(callback){$rootScope.$evalAsync(callback)},$exceptionHandler)}]}function $$QProvider(){this.$get=["$browser","$exceptionHandler",function($browser,$exceptionHandler){return qFactory(function(callback){$browser.defer(callback)},$exceptionHandler)}]}function qFactory(nextTick,exceptionHandler){function callOnce(self,resolveFn,rejectFn){function wrap(fn){return function(value){called||(called=!0,fn.call(self,value))}}var called=!1;return[wrap(resolveFn),wrap(rejectFn)]}function Promise(){this.$$state={status:0}}function simpleBind(context,fn){return function(value){fn.call(context,value)}}function processQueue(state){var fn,deferred,pending;pending=state.pending,state.processScheduled=!1,state.pending=undefined;for(var i=0,ii=pending.length;i<ii;++i){deferred=pending[i][0],fn=pending[i][state.status];try{isFunction(fn)?deferred.resolve(fn(state.value)):1===state.status?deferred.resolve(state.value):deferred.reject(state.value)}catch(e){deferred.reject(e),exceptionHandler(e)}}}function scheduleProcessQueue(state){!state.processScheduled&&state.pending&&(state.processScheduled=!0,nextTick(function(){processQueue(state)}))}function Deferred(){this.promise=new Promise,this.resolve=simpleBind(this,this.resolve),this.reject=simpleBind(this,this.reject),this.notify=simpleBind(this,this.notify)}function all(promises){var deferred=new Deferred,counter=0,results=isArray(promises)?[]:{};return forEach(promises,function(promise,key){counter++,when(promise).then(function(value){results.hasOwnProperty(key)||(results[key]=value,--counter||deferred.resolve(results))},function(reason){results.hasOwnProperty(key)||deferred.reject(reason)})}),0===counter&&deferred.resolve(results),deferred.promise}var $qMinErr=minErr("$q",TypeError),defer=function(){return new Deferred};extend(Promise.prototype,{then:function(onFulfilled,onRejected,progressBack){if(isUndefined(onFulfilled)&&isUndefined(onRejected)&&isUndefined(progressBack))return this;var result=new Deferred;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([result,onFulfilled,onRejected,progressBack]),this.$$state.status>0&&scheduleProcessQueue(this.$$state),result.promise},"catch":function(callback){return this.then(null,callback)},"finally":function(callback,progressBack){return this.then(function(value){return handleCallback(value,!0,callback)},function(error){return handleCallback(error,!1,callback)},progressBack)}}),extend(Deferred.prototype,{resolve:function(val){this.promise.$$state.status||(val===this.promise?this.$$reject($qMinErr("qcycle","Expected promise to be resolved with value other than itself '{0}'",val)):this.$$resolve(val))},$$resolve:function(val){var then,fns;fns=callOnce(this,this.$$resolve,this.$$reject);try{(isObject(val)||isFunction(val))&&(then=val&&val.then),isFunction(then)?(this.promise.$$state.status=-1,then.call(val,fns[0],fns[1],this.notify)):(this.promise.$$state.value=val,this.promise.$$state.status=1,scheduleProcessQueue(this.promise.$$state))}catch(e){fns[1](e),exceptionHandler(e)}},reject:function(reason){this.promise.$$state.status||this.$$reject(reason)},$$reject:function(reason){this.promise.$$state.value=reason,this.promise.$$state.status=2,scheduleProcessQueue(this.promise.$$state)},notify:function(progress){var callbacks=this.promise.$$state.pending;this.promise.$$state.status<=0&&callbacks&&callbacks.length&&nextTick(function(){for(var callback,result,i=0,ii=callbacks.length;i<ii;i++){result=callbacks[i][0],callback=callbacks[i][3];try{result.notify(isFunction(callback)?callback(progress):progress)}catch(e){exceptionHandler(e)}}})}});var reject=function(reason){var result=new Deferred;return result.reject(reason),result.promise},makePromise=function(value,resolved){var result=new Deferred;return resolved?result.resolve(value):result.reject(value),result.promise},handleCallback=function(value,isResolved,callback){var callbackOutput=null;try{isFunction(callback)&&(callbackOutput=callback())}catch(e){return makePromise(e,!1)}return isPromiseLike(callbackOutput)?callbackOutput.then(function(){return makePromise(value,isResolved)},function(error){return makePromise(error,!1)}):makePromise(value,isResolved)},when=function(value,callback,errback,progressBack){var result=new Deferred;return result.resolve(value),result.promise.then(callback,errback,progressBack)},resolve=when,$Q=function Q(resolver){function resolveFn(value){deferred.resolve(value)}function rejectFn(reason){deferred.reject(reason)}if(!isFunction(resolver))throw $qMinErr("norslvr","Expected resolverFn, got '{0}'",resolver);if(!(this instanceof Q))return new Q(resolver);var deferred=new Deferred;return resolver(resolveFn,rejectFn),deferred.promise};return $Q.defer=defer,$Q.reject=reject,$Q.when=when,$Q.resolve=resolve,$Q.all=all,$Q}function $$RAFProvider(){this.$get=["$window","$timeout",function($window,$timeout){var requestAnimationFrame=$window.requestAnimationFrame||$window.webkitRequestAnimationFrame,cancelAnimationFrame=$window.cancelAnimationFrame||$window.webkitCancelAnimationFrame||$window.webkitCancelRequestAnimationFrame,rafSupported=!!requestAnimationFrame,raf=rafSupported?function(fn){var id=requestAnimationFrame(fn);return function(){cancelAnimationFrame(id)}}:function(fn){var timer=$timeout(fn,16.66,!1);return function(){$timeout.cancel(timer)}};return raf.supported=rafSupported,raf}]}function $RootScopeProvider(){function createChildScopeClass(parent){function ChildScope(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=nextUid(),this.$$ChildScope=null}return ChildScope.prototype=parent,ChildScope}var TTL=10,$rootScopeMinErr=minErr("$rootScope"),lastDirtyWatch=null,applyAsyncId=null;this.digestTtl=function(value){return arguments.length&&(TTL=value),TTL},this.$get=["$injector","$exceptionHandler","$parse","$browser",function($injector,$exceptionHandler,$parse,$browser){function destroyChildScope($event){$event.currentScope.$$destroyed=!0}function cleanUpScope($scope){9===msie&&($scope.$$childHead&&cleanUpScope($scope.$$childHead),$scope.$$nextSibling&&cleanUpScope($scope.$$nextSibling)),$scope.$parent=$scope.$$nextSibling=$scope.$$prevSibling=$scope.$$childHead=$scope.$$childTail=$scope.$root=$scope.$$watchers=null}function Scope(){this.$id=nextUid(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function beginPhase(phase){if($rootScope.$$phase)throw $rootScopeMinErr("inprog","{0} already in progress",$rootScope.$$phase);$rootScope.$$phase=phase}function clearPhase(){$rootScope.$$phase=null}function incrementWatchersCount(current,count){do current.$$watchersCount+=count;while(current=current.$parent)}function decrementListenerCount(current,count,name){do current.$$listenerCount[name]-=count,0===current.$$listenerCount[name]&&delete current.$$listenerCount[name];while(current=current.$parent)}function initWatchVal(){}function flushApplyAsync(){for(;applyAsyncQueue.length;)try{applyAsyncQueue.shift()()}catch(e){$exceptionHandler(e)}applyAsyncId=null}function scheduleApplyAsync(){null===applyAsyncId&&(applyAsyncId=$browser.defer(function(){$rootScope.$apply(flushApplyAsync)}))}Scope.prototype={constructor:Scope,$new:function(isolate,parent){var child;return parent=parent||this,isolate?(child=new Scope,child.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=createChildScopeClass(this)),child=new this.$$ChildScope),child.$parent=parent,child.$$prevSibling=parent.$$childTail,parent.$$childHead?(parent.$$childTail.$$nextSibling=child,parent.$$childTail=child):parent.$$childHead=parent.$$childTail=child,(isolate||parent!=this)&&child.$on("$destroy",destroyChildScope),child},$watch:function(watchExp,listener,objectEquality,prettyPrintExpression){var get=$parse(watchExp);if(get.$$watchDelegate)return get.$$watchDelegate(this,listener,objectEquality,get,watchExp);var scope=this,array=scope.$$watchers,watcher={fn:listener,last:initWatchVal,get:get,exp:prettyPrintExpression||watchExp,eq:!!objectEquality};return lastDirtyWatch=null,isFunction(listener)||(watcher.fn=noop),array||(array=scope.$$watchers=[]),array.unshift(watcher),incrementWatchersCount(this,1),function(){arrayRemove(array,watcher)>=0&&incrementWatchersCount(scope,-1),lastDirtyWatch=null}},$watchGroup:function(watchExpressions,listener){function watchGroupAction(){changeReactionScheduled=!1,firstRun?(firstRun=!1,listener(newValues,newValues,self)):listener(newValues,oldValues,self)}var oldValues=new Array(watchExpressions.length),newValues=new Array(watchExpressions.length),deregisterFns=[],self=this,changeReactionScheduled=!1,firstRun=!0;if(!watchExpressions.length){var shouldCall=!0;return self.$evalAsync(function(){shouldCall&&listener(newValues,newValues,self)}),function(){shouldCall=!1}}return 1===watchExpressions.length?this.$watch(watchExpressions[0],function(value,oldValue,scope){newValues[0]=value,oldValues[0]=oldValue,listener(newValues,value===oldValue?newValues:oldValues,scope)}):(forEach(watchExpressions,function(expr,i){var unwatchFn=self.$watch(expr,function(value,oldValue){newValues[i]=value,oldValues[i]=oldValue,changeReactionScheduled||(changeReactionScheduled=!0,self.$evalAsync(watchGroupAction))});deregisterFns.push(unwatchFn)}),function(){for(;deregisterFns.length;)deregisterFns.shift()()})},$watchCollection:function(obj,listener){function $watchCollectionInterceptor(_value){newValue=_value;var newLength,key,bothNaN,newItem,oldItem;if(!isUndefined(newValue)){if(isObject(newValue))if(isArrayLike(newValue)){oldValue!==internalArray&&(oldValue=internalArray,oldLength=oldValue.length=0,changeDetected++),newLength=newValue.length,oldLength!==newLength&&(changeDetected++,oldValue.length=oldLength=newLength);for(var i=0;i<newLength;i++)oldItem=oldValue[i],newItem=newValue[i],bothNaN=oldItem!==oldItem&&newItem!==newItem,bothNaN||oldItem===newItem||(changeDetected++,oldValue[i]=newItem)}else{oldValue!==internalObject&&(oldValue=internalObject={},oldLength=0,changeDetected++),newLength=0;for(key in newValue)hasOwnProperty.call(newValue,key)&&(newLength++,newItem=newValue[key],oldItem=oldValue[key],key in oldValue?(bothNaN=oldItem!==oldItem&&newItem!==newItem,bothNaN||oldItem===newItem||(changeDetected++,oldValue[key]=newItem)):(oldLength++,oldValue[key]=newItem,changeDetected++));if(oldLength>newLength){changeDetected++;for(key in oldValue)hasOwnProperty.call(newValue,key)||(oldLength--,delete oldValue[key])}}else oldValue!==newValue&&(oldValue=newValue,changeDetected++);return changeDetected}}function $watchCollectionAction(){if(initRun?(initRun=!1,listener(newValue,newValue,self)):listener(newValue,veryOldValue,self),trackVeryOldValue)if(isObject(newValue))if(isArrayLike(newValue)){veryOldValue=new Array(newValue.length);for(var i=0;i<newValue.length;i++)veryOldValue[i]=newValue[i]}else{veryOldValue={};for(var key in newValue)hasOwnProperty.call(newValue,key)&&(veryOldValue[key]=newValue[key])}else veryOldValue=newValue}$watchCollectionInterceptor.$stateful=!0;var newValue,oldValue,veryOldValue,self=this,trackVeryOldValue=listener.length>1,changeDetected=0,changeDetector=$parse(obj,$watchCollectionInterceptor),internalArray=[],internalObject={},initRun=!0,oldLength=0;return this.$watch(changeDetector,$watchCollectionAction)},$digest:function(){var watch,value,last,fn,get,watchers,length,dirty,next,current,logIdx,asyncTask,ttl=TTL,target=this,watchLog=[];beginPhase("$digest"),$browser.$$checkUrlChange(),this===$rootScope&&null!==applyAsyncId&&($browser.defer.cancel(applyAsyncId),flushApplyAsync()),lastDirtyWatch=null;do{for(dirty=!1,current=target;asyncQueue.length;){try{asyncTask=asyncQueue.shift(),asyncTask.scope.$eval(asyncTask.expression,asyncTask.locals)}catch(e){$exceptionHandler(e)}lastDirtyWatch=null}traverseScopesLoop:do{if(watchers=current.$$watchers)for(length=watchers.length;length--;)try{if(watch=watchers[length])if(get=watch.get,(value=get(current))===(last=watch.last)||(watch.eq?equals(value,last):"number"==typeof value&&"number"==typeof last&&isNaN(value)&&isNaN(last))){if(watch===lastDirtyWatch){dirty=!1;break traverseScopesLoop}}else dirty=!0,lastDirtyWatch=watch,watch.last=watch.eq?copy(value,null):value,fn=watch.fn,fn(value,last===initWatchVal?value:last,current),ttl<5&&(logIdx=4-ttl,watchLog[logIdx]||(watchLog[logIdx]=[]),watchLog[logIdx].push({msg:isFunction(watch.exp)?"fn: "+(watch.exp.name||watch.exp.toString()):watch.exp,newVal:value,oldVal:last}))}catch(e){$exceptionHandler(e)}if(!(next=current.$$watchersCount&&current.$$childHead||current!==target&&current.$$nextSibling))for(;current!==target&&!(next=current.$$nextSibling);)current=current.$parent}while(current=next);if((dirty||asyncQueue.length)&&!ttl--)throw clearPhase(),$rootScopeMinErr("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",TTL,watchLog)}while(dirty||asyncQueue.length);for(clearPhase();postDigestQueue.length;)try{postDigestQueue.shift()()}catch(e){$exceptionHandler(e)}},$destroy:function(){if(!this.$$destroyed){var parent=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===$rootScope&&$browser.$$applicationDestroyed(),incrementWatchersCount(this,-this.$$watchersCount);for(var eventName in this.$$listenerCount)decrementListenerCount(this,this.$$listenerCount[eventName],eventName);parent&&parent.$$childHead==this&&(parent.$$childHead=this.$$nextSibling),parent&&parent.$$childTail==this&&(parent.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=noop,this.$on=this.$watch=this.$watchGroup=function(){return noop},this.$$listeners={},this.$$nextSibling=null,cleanUpScope(this)}},$eval:function(expr,locals){return $parse(expr)(this,locals)},$evalAsync:function(expr,locals){$rootScope.$$phase||asyncQueue.length||$browser.defer(function(){asyncQueue.length&&$rootScope.$digest()}),asyncQueue.push({scope:this,expression:$parse(expr),locals:locals})},$$postDigest:function(fn){postDigestQueue.push(fn)},$apply:function(expr){try{beginPhase("$apply");try{return this.$eval(expr)}finally{clearPhase()}}catch(e){$exceptionHandler(e)}finally{try{$rootScope.$digest()}catch(e){throw $exceptionHandler(e),e}}},$applyAsync:function(expr){function $applyAsyncExpression(){scope.$eval(expr)}var scope=this;expr&&applyAsyncQueue.push($applyAsyncExpression),expr=$parse(expr),scheduleApplyAsync()},$on:function(name,listener){var namedListeners=this.$$listeners[name];namedListeners||(this.$$listeners[name]=namedListeners=[]),namedListeners.push(listener);var current=this;do current.$$listenerCount[name]||(current.$$listenerCount[name]=0),current.$$listenerCount[name]++;while(current=current.$parent);var self=this;return function(){var indexOfListener=namedListeners.indexOf(listener);indexOfListener!==-1&&(namedListeners[indexOfListener]=null,decrementListenerCount(self,1,name))}},$emit:function(name,args){var namedListeners,i,length,empty=[],scope=this,stopPropagation=!1,event={name:name,targetScope:scope,stopPropagation:function(){stopPropagation=!0},preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1},listenerArgs=concat([event],arguments,1);do{for(namedListeners=scope.$$listeners[name]||empty,event.currentScope=scope,i=0,length=namedListeners.length;i<length;i++)if(namedListeners[i])try{namedListeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}else namedListeners.splice(i,1),i--,length--;if(stopPropagation)return event.currentScope=null,event;scope=scope.$parent}while(scope);return event.currentScope=null,event},$broadcast:function(name,args){var target=this,current=target,next=target,event={name:name,targetScope:target,preventDefault:function(){event.defaultPrevented=!0},defaultPrevented:!1};if(!target.$$listenerCount[name])return event;for(var listeners,i,length,listenerArgs=concat([event],arguments,1);current=next;){for(event.currentScope=current,listeners=current.$$listeners[name]||[],i=0,length=listeners.length;i<length;i++)if(listeners[i])try{listeners[i].apply(null,listenerArgs)}catch(e){$exceptionHandler(e)}else listeners.splice(i,1),i--,length--;if(!(next=current.$$listenerCount[name]&&current.$$childHead||current!==target&&current.$$nextSibling))for(;current!==target&&!(next=current.$$nextSibling);)current=current.$parent}return event.currentScope=null,event}};var $rootScope=new Scope,asyncQueue=$rootScope.$$asyncQueue=[],postDigestQueue=$rootScope.$$postDigestQueue=[],applyAsyncQueue=$rootScope.$$applyAsyncQueue=[];return $rootScope}]}function $$SanitizeUriProvider(){var aHrefSanitizationWhitelist=/^\s*(https?|ftp|mailto|tel|file):/,imgSrcSanitizationWhitelist=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(regexp){return isDefined(regexp)?(aHrefSanitizationWhitelist=regexp,this):aHrefSanitizationWhitelist},this.imgSrcSanitizationWhitelist=function(regexp){return isDefined(regexp)?(imgSrcSanitizationWhitelist=regexp,this):imgSrcSanitizationWhitelist},this.$get=function(){return function(uri,isImage){var normalizedVal,regex=isImage?imgSrcSanitizationWhitelist:aHrefSanitizationWhitelist;return normalizedVal=urlResolve(uri).href,""===normalizedVal||normalizedVal.match(regex)?uri:"unsafe:"+normalizedVal}}}function adjustMatcher(matcher){if("self"===matcher)return matcher;if(isString(matcher)){if(matcher.indexOf("***")>-1)throw $sceMinErr("iwcard","Illegal sequence *** in string matcher. String: {0}",matcher);return matcher=escapeForRegexp(matcher).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+matcher+"$")}if(isRegExp(matcher))return new RegExp("^"+matcher.source+"$");throw $sceMinErr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function adjustMatchers(matchers){var adjustedMatchers=[];return isDefined(matchers)&&forEach(matchers,function(matcher){adjustedMatchers.push(adjustMatcher(matcher))}),adjustedMatchers}function $SceDelegateProvider(){this.SCE_CONTEXTS=SCE_CONTEXTS;var resourceUrlWhitelist=["self"],resourceUrlBlacklist=[];this.resourceUrlWhitelist=function(value){return arguments.length&&(resourceUrlWhitelist=adjustMatchers(value)),resourceUrlWhitelist},this.resourceUrlBlacklist=function(value){return arguments.length&&(resourceUrlBlacklist=adjustMatchers(value)),resourceUrlBlacklist},this.$get=["$injector",function($injector){function matchUrl(matcher,parsedUrl){return"self"===matcher?urlIsSameOrigin(parsedUrl):!!matcher.exec(parsedUrl.href)}function isResourceUrlAllowedByPolicy(url){var i,n,parsedUrl=urlResolve(url.toString()),allowed=!1;for(i=0,n=resourceUrlWhitelist.length;i<n;i++)if(matchUrl(resourceUrlWhitelist[i],parsedUrl)){allowed=!0;break}if(allowed)for(i=0,n=resourceUrlBlacklist.length;i<n;i++)if(matchUrl(resourceUrlBlacklist[i],parsedUrl)){allowed=!1;break}return allowed}function generateHolderType(Base){var holderType=function(trustedValue){this.$$unwrapTrustedValue=function(){return trustedValue}};return Base&&(holderType.prototype=new Base),holderType.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},holderType.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},holderType}function trustAs(type,trustedValue){var Constructor=byType.hasOwnProperty(type)?byType[type]:null;if(!Constructor)throw $sceMinErr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",type,trustedValue);if(null===trustedValue||isUndefined(trustedValue)||""===trustedValue)return trustedValue;if("string"!=typeof trustedValue)throw $sceMinErr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",type);return new Constructor(trustedValue)}function valueOf(maybeTrusted){return maybeTrusted instanceof trustedValueHolderBase?maybeTrusted.$$unwrapTrustedValue():maybeTrusted}function getTrusted(type,maybeTrusted){if(null===maybeTrusted||isUndefined(maybeTrusted)||""===maybeTrusted)return maybeTrusted;var constructor=byType.hasOwnProperty(type)?byType[type]:null;if(constructor&&maybeTrusted instanceof constructor)return maybeTrusted.$$unwrapTrustedValue();if(type===SCE_CONTEXTS.RESOURCE_URL){if(isResourceUrlAllowedByPolicy(maybeTrusted))return maybeTrusted;throw $sceMinErr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",maybeTrusted.toString())}if(type===SCE_CONTEXTS.HTML)return htmlSanitizer(maybeTrusted);throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.")}var htmlSanitizer=function(html){throw $sceMinErr("unsafe","Attempting to use an unsafe value in a safe context.")};$injector.has("$sanitize")&&(htmlSanitizer=$injector.get("$sanitize"));var trustedValueHolderBase=generateHolderType(),byType={};return byType[SCE_CONTEXTS.HTML]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.CSS]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.URL]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.JS]=generateHolderType(trustedValueHolderBase),byType[SCE_CONTEXTS.RESOURCE_URL]=generateHolderType(byType[SCE_CONTEXTS.URL]),{trustAs:trustAs,getTrusted:getTrusted,valueOf:valueOf}}]}function $SceProvider(){var enabled=!0;this.enabled=function(value){return arguments.length&&(enabled=!!value),enabled},this.$get=["$parse","$sceDelegate",function($parse,$sceDelegate){if(enabled&&msie<8)throw $sceMinErr("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var sce=shallowCopy(SCE_CONTEXTS);sce.isEnabled=function(){return enabled},sce.trustAs=$sceDelegate.trustAs,sce.getTrusted=$sceDelegate.getTrusted,sce.valueOf=$sceDelegate.valueOf,enabled||(sce.trustAs=sce.getTrusted=function(type,value){return value},sce.valueOf=identity),sce.parseAs=function(type,expr){var parsed=$parse(expr);return parsed.literal&&parsed.constant?parsed:$parse(expr,function(value){
return sce.getTrusted(type,value)})};var parse=sce.parseAs,getTrusted=sce.getTrusted,trustAs=sce.trustAs;return forEach(SCE_CONTEXTS,function(enumValue,name){var lName=lowercase(name);sce[camelCase("parse_as_"+lName)]=function(expr){return parse(enumValue,expr)},sce[camelCase("get_trusted_"+lName)]=function(value){return getTrusted(enumValue,value)},sce[camelCase("trust_as_"+lName)]=function(value){return trustAs(enumValue,value)}}),sce}]}function $SnifferProvider(){this.$get=["$window","$document",function($window,$document){var vendorPrefix,match,eventSupport={},android=toInt((/android (\d+)/.exec(lowercase(($window.navigator||{}).userAgent))||[])[1]),boxee=/Boxee/i.test(($window.navigator||{}).userAgent),document=$document[0]||{},vendorRegex=/^(Moz|webkit|ms)(?=[A-Z])/,bodyStyle=document.body&&document.body.style,transitions=!1,animations=!1;if(bodyStyle){for(var prop in bodyStyle)if(match=vendorRegex.exec(prop)){vendorPrefix=match[0],vendorPrefix=vendorPrefix.substr(0,1).toUpperCase()+vendorPrefix.substr(1);break}vendorPrefix||(vendorPrefix="WebkitOpacity"in bodyStyle&&"webkit"),transitions=!!("transition"in bodyStyle||vendorPrefix+"Transition"in bodyStyle),animations=!!("animation"in bodyStyle||vendorPrefix+"Animation"in bodyStyle),!android||transitions&&animations||(transitions=isString(bodyStyle.webkitTransition),animations=isString(bodyStyle.webkitAnimation))}return{history:!(!$window.history||!$window.history.pushState||android<4||boxee),hasEvent:function(event){if("input"===event&&msie<=11)return!1;if(isUndefined(eventSupport[event])){var divElm=document.createElement("div");eventSupport[event]="on"+event in divElm}return eventSupport[event]},csp:csp(),vendorPrefix:vendorPrefix,transitions:transitions,animations:animations,android:android}}]}function $TemplateRequestProvider(){this.$get=["$templateCache","$http","$q","$sce",function($templateCache,$http,$q,$sce){function handleRequestFn(tpl,ignoreRequestError){function handleError(resp){if(!ignoreRequestError)throw $compileMinErr("tpload","Failed to load template: {0} (HTTP status: {1} {2})",tpl,resp.status,resp.statusText);return $q.reject(resp)}handleRequestFn.totalPendingRequests++,isString(tpl)&&!isUndefined($templateCache.get(tpl))||(tpl=$sce.getTrustedResourceUrl(tpl));var transformResponse=$http.defaults&&$http.defaults.transformResponse;isArray(transformResponse)?transformResponse=transformResponse.filter(function(transformer){return transformer!==defaultHttpResponseTransform}):transformResponse===defaultHttpResponseTransform&&(transformResponse=null);var httpOptions={cache:$templateCache,transformResponse:transformResponse};return $http.get(tpl,httpOptions)["finally"](function(){handleRequestFn.totalPendingRequests--}).then(function(response){return $templateCache.put(tpl,response.data),response.data},handleError)}return handleRequestFn.totalPendingRequests=0,handleRequestFn}]}function $$TestabilityProvider(){this.$get=["$rootScope","$browser","$location",function($rootScope,$browser,$location){var testability={};return testability.findBindings=function(element,expression,opt_exactMatch){var bindings=element.getElementsByClassName("ng-binding"),matches=[];return forEach(bindings,function(binding){var dataBinding=angular.element(binding).data("$binding");dataBinding&&forEach(dataBinding,function(bindingName){if(opt_exactMatch){var matcher=new RegExp("(^|\\s)"+escapeForRegexp(expression)+"(\\s|\\||$)");matcher.test(bindingName)&&matches.push(binding)}else bindingName.indexOf(expression)!=-1&&matches.push(binding)})}),matches},testability.findModels=function(element,expression,opt_exactMatch){for(var prefixes=["ng-","data-ng-","ng\\:"],p=0;p<prefixes.length;++p){var attributeEquals=opt_exactMatch?"=":"*=",selector="["+prefixes[p]+"model"+attributeEquals+'"'+expression+'"]',elements=element.querySelectorAll(selector);if(elements.length)return elements}},testability.getLocation=function(){return $location.url()},testability.setLocation=function(url){url!==$location.url()&&($location.url(url),$rootScope.$digest())},testability.whenStable=function(callback){$browser.notifyWhenNoOutstandingRequests(callback)},testability}]}function $TimeoutProvider(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function($rootScope,$browser,$q,$$q,$exceptionHandler){function timeout(fn,delay,invokeApply){isFunction(fn)||(invokeApply=delay,delay=fn,fn=noop);var timeoutId,args=sliceArgs(arguments,3),skipApply=isDefined(invokeApply)&&!invokeApply,deferred=(skipApply?$$q:$q).defer(),promise=deferred.promise;return timeoutId=$browser.defer(function(){try{deferred.resolve(fn.apply(null,args))}catch(e){deferred.reject(e),$exceptionHandler(e)}finally{delete deferreds[promise.$$timeoutId]}skipApply||$rootScope.$apply()},delay),promise.$$timeoutId=timeoutId,deferreds[timeoutId]=deferred,promise}var deferreds={};return timeout.cancel=function(promise){return!!(promise&&promise.$$timeoutId in deferreds)&&(deferreds[promise.$$timeoutId].reject("canceled"),delete deferreds[promise.$$timeoutId],$browser.defer.cancel(promise.$$timeoutId))},timeout}]}function urlResolve(url){var href=url;return msie&&(urlParsingNode.setAttribute("href",href),href=urlParsingNode.href),urlParsingNode.setAttribute("href",href),{href:urlParsingNode.href,protocol:urlParsingNode.protocol?urlParsingNode.protocol.replace(/:$/,""):"",host:urlParsingNode.host,search:urlParsingNode.search?urlParsingNode.search.replace(/^\?/,""):"",hash:urlParsingNode.hash?urlParsingNode.hash.replace(/^#/,""):"",hostname:urlParsingNode.hostname,port:urlParsingNode.port,pathname:"/"===urlParsingNode.pathname.charAt(0)?urlParsingNode.pathname:"/"+urlParsingNode.pathname}}function urlIsSameOrigin(requestUrl){var parsed=isString(requestUrl)?urlResolve(requestUrl):requestUrl;return parsed.protocol===originUrl.protocol&&parsed.host===originUrl.host}function $WindowProvider(){this.$get=valueFn(window)}function $$CookieReader($document){function safeDecodeURIComponent(str){try{return decodeURIComponent(str)}catch(e){return str}}var rawDocument=$document[0]||{},lastCookies={},lastCookieString="";return function(){var cookieArray,cookie,i,index,name,currentCookieString=rawDocument.cookie||"";if(currentCookieString!==lastCookieString)for(lastCookieString=currentCookieString,cookieArray=lastCookieString.split("; "),lastCookies={},i=0;i<cookieArray.length;i++)cookie=cookieArray[i],index=cookie.indexOf("="),index>0&&(name=safeDecodeURIComponent(cookie.substring(0,index)),isUndefined(lastCookies[name])&&(lastCookies[name]=safeDecodeURIComponent(cookie.substring(index+1))));return lastCookies}}function $$CookieReaderProvider(){this.$get=$$CookieReader}function $FilterProvider($provide){function register(name,factory){if(isObject(name)){var filters={};return forEach(name,function(filter,key){filters[key]=register(key,filter)}),filters}return $provide.factory(name+suffix,factory)}var suffix="Filter";this.register=register,this.$get=["$injector",function($injector){return function(name){return $injector.get(name+suffix)}}],register("currency",currencyFilter),register("date",dateFilter),register("filter",filterFilter),register("json",jsonFilter),register("limitTo",limitToFilter),register("lowercase",lowercaseFilter),register("number",numberFilter),register("orderBy",orderByFilter),register("uppercase",uppercaseFilter)}function filterFilter(){return function(array,expression,comparator){if(!isArrayLike(array)){if(null==array)return array;throw minErr("filter")("notarray","Expected array but received: {0}",array)}var predicateFn,matchAgainstAnyProp,expressionType=getTypeForFilter(expression);switch(expressionType){case"function":predicateFn=expression;break;case"boolean":case"null":case"number":case"string":matchAgainstAnyProp=!0;case"object":predicateFn=createPredicateFn(expression,comparator,matchAgainstAnyProp);break;default:return array}return Array.prototype.filter.call(array,predicateFn)}}function createPredicateFn(expression,comparator,matchAgainstAnyProp){var predicateFn,shouldMatchPrimitives=isObject(expression)&&"$"in expression;return comparator===!0?comparator=equals:isFunction(comparator)||(comparator=function(actual,expected){return!isUndefined(actual)&&(null===actual||null===expected?actual===expected:!(isObject(expected)||isObject(actual)&&!hasCustomToString(actual))&&(actual=lowercase(""+actual),expected=lowercase(""+expected),actual.indexOf(expected)!==-1))}),predicateFn=function(item){return shouldMatchPrimitives&&!isObject(item)?deepCompare(item,expression.$,comparator,!1):deepCompare(item,expression,comparator,matchAgainstAnyProp)}}function deepCompare(actual,expected,comparator,matchAgainstAnyProp,dontMatchWholeObject){var actualType=getTypeForFilter(actual),expectedType=getTypeForFilter(expected);if("string"===expectedType&&"!"===expected.charAt(0))return!deepCompare(actual,expected.substring(1),comparator,matchAgainstAnyProp);if(isArray(actual))return actual.some(function(item){return deepCompare(item,expected,comparator,matchAgainstAnyProp)});switch(actualType){case"object":var key;if(matchAgainstAnyProp){for(key in actual)if("$"!==key.charAt(0)&&deepCompare(actual[key],expected,comparator,!0))return!0;return!dontMatchWholeObject&&deepCompare(actual,expected,comparator,!1)}if("object"===expectedType){for(key in expected){var expectedVal=expected[key];if(!isFunction(expectedVal)&&!isUndefined(expectedVal)){var matchAnyProperty="$"===key,actualVal=matchAnyProperty?actual:actual[key];if(!deepCompare(actualVal,expectedVal,comparator,matchAnyProperty,matchAnyProperty))return!1}}return!0}return comparator(actual,expected);case"function":return!1;default:return comparator(actual,expected)}}function getTypeForFilter(val){return null===val?"null":typeof val}function currencyFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(amount,currencySymbol,fractionSize){return isUndefined(currencySymbol)&&(currencySymbol=formats.CURRENCY_SYM),isUndefined(fractionSize)&&(fractionSize=formats.PATTERNS[1].maxFrac),null==amount?amount:formatNumber(amount,formats.PATTERNS[1],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize).replace(/\u00A4/g,currencySymbol)}}function numberFilter($locale){var formats=$locale.NUMBER_FORMATS;return function(number,fractionSize){return null==number?number:formatNumber(number,formats.PATTERNS[0],formats.GROUP_SEP,formats.DECIMAL_SEP,fractionSize)}}function parse(numStr){var digits,numberOfIntegerDigits,i,j,zeros,exponent=0;for((numberOfIntegerDigits=numStr.indexOf(DECIMAL_SEP))>-1&&(numStr=numStr.replace(DECIMAL_SEP,"")),(i=numStr.search(/e/i))>0?(numberOfIntegerDigits<0&&(numberOfIntegerDigits=i),numberOfIntegerDigits+=+numStr.slice(i+1),numStr=numStr.substring(0,i)):numberOfIntegerDigits<0&&(numberOfIntegerDigits=numStr.length),i=0;numStr.charAt(i)==ZERO_CHAR;i++);if(i==(zeros=numStr.length))digits=[0],numberOfIntegerDigits=1;else{for(zeros--;numStr.charAt(zeros)==ZERO_CHAR;)zeros--;for(numberOfIntegerDigits-=i,digits=[],j=0;i<=zeros;i++,j++)digits[j]=+numStr.charAt(i)}return numberOfIntegerDigits>MAX_DIGITS&&(digits=digits.splice(0,MAX_DIGITS-1),exponent=numberOfIntegerDigits-1,numberOfIntegerDigits=1),{d:digits,e:exponent,i:numberOfIntegerDigits}}function roundNumber(parsedNumber,fractionSize,minFrac,maxFrac){var digits=parsedNumber.d,fractionLen=digits.length-parsedNumber.i;fractionSize=isUndefined(fractionSize)?Math.min(Math.max(minFrac,fractionLen),maxFrac):+fractionSize;var roundAt=fractionSize+parsedNumber.i,digit=digits[roundAt];if(roundAt>0)digits.splice(roundAt);else{parsedNumber.i=1,digits.length=roundAt=fractionSize+1;for(var i=0;i<roundAt;i++)digits[i]=0}for(digit>=5&&digits[roundAt-1]++;fractionLen<fractionSize;fractionLen++)digits.push(0);var carry=digits.reduceRight(function(carry,d,i,digits){return d+=carry,digits[i]=d%10,Math.floor(d/10)},0);carry&&(digits.unshift(carry),parsedNumber.i++)}function formatNumber(number,pattern,groupSep,decimalSep,fractionSize){if(!isString(number)&&!isNumber(number)||isNaN(number))return"";var parsedNumber,isInfinity=!isFinite(number),isZero=!1,numStr=Math.abs(number)+"",formattedText="";if(isInfinity)formattedText="∞";else{parsedNumber=parse(numStr),roundNumber(parsedNumber,fractionSize,pattern.minFrac,pattern.maxFrac);var digits=parsedNumber.d,integerLen=parsedNumber.i,exponent=parsedNumber.e,decimals=[];for(isZero=digits.reduce(function(isZero,d){return isZero&&!d},!0);integerLen<0;)digits.unshift(0),integerLen++;integerLen>0?decimals=digits.splice(integerLen,digits.length):(decimals=digits,digits=[0]);var groups=[];for(digits.length>=pattern.lgSize&&groups.unshift(digits.splice(-pattern.lgSize,digits.length).join(""));digits.length>pattern.gSize;)groups.unshift(digits.splice(-pattern.gSize,digits.length).join(""));digits.length&&groups.unshift(digits.join("")),formattedText=groups.join(groupSep),decimals.length&&(formattedText+=decimalSep+decimals.join("")),exponent&&(formattedText+="e+"+exponent)}return number<0&&!isZero?pattern.negPre+formattedText+pattern.negSuf:pattern.posPre+formattedText+pattern.posSuf}function padNumber(num,digits,trim){var neg="";for(num<0&&(neg="-",num=-num),num=""+num;num.length<digits;)num=ZERO_CHAR+num;return trim&&(num=num.substr(num.length-digits)),neg+num}function dateGetter(name,size,offset,trim){return offset=offset||0,function(date){var value=date["get"+name]();return(offset>0||value>-offset)&&(value+=offset),0===value&&offset==-12&&(value=12),padNumber(value,size,trim)}}function dateStrGetter(name,shortForm){return function(date,formats){var value=date["get"+name](),get=uppercase(shortForm?"SHORT"+name:name);return formats[get][value]}}function timeZoneGetter(date,formats,offset){var zone=-1*offset,paddedZone=zone>=0?"+":"";return paddedZone+=padNumber(Math[zone>0?"floor":"ceil"](zone/60),2)+padNumber(Math.abs(zone%60),2)}function getFirstThursdayOfYear(year){var dayOfWeekOnFirst=new Date(year,0,1).getDay();return new Date(year,0,(dayOfWeekOnFirst<=4?5:12)-dayOfWeekOnFirst)}function getThursdayThisWeek(datetime){return new Date(datetime.getFullYear(),datetime.getMonth(),datetime.getDate()+(4-datetime.getDay()))}function weekGetter(size){return function(date){var firstThurs=getFirstThursdayOfYear(date.getFullYear()),thisThurs=getThursdayThisWeek(date),diff=+thisThurs-+firstThurs,result=1+Math.round(diff/6048e5);return padNumber(result,size)}}function ampmGetter(date,formats){return date.getHours()<12?formats.AMPMS[0]:formats.AMPMS[1]}function eraGetter(date,formats){return date.getFullYear()<=0?formats.ERAS[0]:formats.ERAS[1]}function longEraGetter(date,formats){return date.getFullYear()<=0?formats.ERANAMES[0]:formats.ERANAMES[1]}function dateFilter($locale){function jsonStringToDate(string){var match;if(match=string.match(R_ISO8601_STR)){var date=new Date(0),tzHour=0,tzMin=0,dateSetter=match[8]?date.setUTCFullYear:date.setFullYear,timeSetter=match[8]?date.setUTCHours:date.setHours;match[9]&&(tzHour=toInt(match[9]+match[10]),tzMin=toInt(match[9]+match[11])),dateSetter.call(date,toInt(match[1]),toInt(match[2])-1,toInt(match[3]));var h=toInt(match[4]||0)-tzHour,m=toInt(match[5]||0)-tzMin,s=toInt(match[6]||0),ms=Math.round(1e3*parseFloat("0."+(match[7]||0)));return timeSetter.call(date,h,m,s,ms),date}return string}var R_ISO8601_STR=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(date,format,timezone){var fn,match,text="",parts=[];if(format=format||"mediumDate",format=$locale.DATETIME_FORMATS[format]||format,isString(date)&&(date=NUMBER_STRING.test(date)?toInt(date):jsonStringToDate(date)),isNumber(date)&&(date=new Date(date)),!isDate(date)||!isFinite(date.getTime()))return date;for(;format;)match=DATE_FORMATS_SPLIT.exec(format),match?(parts=concat(parts,match,1),format=parts.pop()):(parts.push(format),format=null);var dateTimezoneOffset=date.getTimezoneOffset();return timezone&&(dateTimezoneOffset=timezoneToOffset(timezone,dateTimezoneOffset),date=convertTimezoneToLocal(date,timezone,!0)),forEach(parts,function(value){fn=DATE_FORMATS[value],text+=fn?fn(date,$locale.DATETIME_FORMATS,dateTimezoneOffset):"''"===value?"'":value.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),text}}function jsonFilter(){return function(object,spacing){return isUndefined(spacing)&&(spacing=2),toJson(object,spacing)}}function limitToFilter(){return function(input,limit,begin){return limit=Math.abs(Number(limit))===1/0?Number(limit):toInt(limit),isNaN(limit)?input:(isNumber(input)&&(input=input.toString()),isArray(input)||isString(input)?(begin=!begin||isNaN(begin)?0:toInt(begin),begin=begin<0?Math.max(0,input.length+begin):begin,limit>=0?input.slice(begin,begin+limit):0===begin?input.slice(limit,input.length):input.slice(Math.max(0,begin+limit),begin)):input)}}function orderByFilter($parse){function processPredicates(sortPredicate,reverseOrder){return reverseOrder=reverseOrder?-1:1,sortPredicate.map(function(predicate){var descending=1,get=identity;if(isFunction(predicate))get=predicate;else if(isString(predicate)&&("+"!=predicate.charAt(0)&&"-"!=predicate.charAt(0)||(descending="-"==predicate.charAt(0)?-1:1,predicate=predicate.substring(1)),""!==predicate&&(get=$parse(predicate),get.constant))){var key=get();get=function(value){return value[key]}}return{get:get,descending:descending*reverseOrder}})}function isPrimitive(value){switch(typeof value){case"number":case"boolean":case"string":return!0;default:return!1}}function objectValue(value,index){return"function"==typeof value.valueOf&&(value=value.valueOf(),isPrimitive(value))?value:hasCustomToString(value)&&(value=value.toString(),isPrimitive(value))?value:index}function getPredicateValue(value,index){var type=typeof value;return null===value?(type="string",value="null"):"string"===type?value=value.toLowerCase():"object"===type&&(value=objectValue(value,index)),{value:value,type:type}}function compare(v1,v2){var result=0;return v1.type===v2.type?v1.value!==v2.value&&(result=v1.value<v2.value?-1:1):result=v1.type<v2.type?-1:1,result}return function(array,sortPredicate,reverseOrder){function getComparisonObject(value,index){return{value:value,predicateValues:predicates.map(function(predicate){return getPredicateValue(predicate.get(value),index)})}}function doComparison(v1,v2){for(var result=0,index=0,length=predicates.length;index<length&&!(result=compare(v1.predicateValues[index],v2.predicateValues[index])*predicates[index].descending);++index);return result}if(!isArrayLike(array))return array;isArray(sortPredicate)||(sortPredicate=[sortPredicate]),0===sortPredicate.length&&(sortPredicate=["+"]);var predicates=processPredicates(sortPredicate,reverseOrder);predicates.push({get:function(){return{}},descending:reverseOrder?-1:1});var compareValues=Array.prototype.map.call(array,getComparisonObject);return compareValues.sort(doComparison),array=compareValues.map(function(item){return item.value})}}function ngDirective(directive){return isFunction(directive)&&(directive={link:directive}),directive.restrict=directive.restrict||"AC",valueFn(directive)}function nullFormRenameControl(control,name){control.$name=name}function FormController(element,attrs,$scope,$animate,$interpolate){var form=this,controls=[];form.$error={},form.$$success={},form.$pending=undefined,form.$name=$interpolate(attrs.name||attrs.ngForm||"")($scope),form.$dirty=!1,form.$pristine=!0,form.$valid=!0,form.$invalid=!1,form.$submitted=!1,form.$$parentForm=nullFormCtrl,form.$rollbackViewValue=function(){forEach(controls,function(control){control.$rollbackViewValue()})},form.$commitViewValue=function(){forEach(controls,function(control){control.$commitViewValue()})},form.$addControl=function(control){assertNotHasOwnProperty(control.$name,"input"),controls.push(control),control.$name&&(form[control.$name]=control),control.$$parentForm=form},form.$$renameControl=function(control,newName){var oldName=control.$name;form[oldName]===control&&delete form[oldName],form[newName]=control,control.$name=newName},form.$removeControl=function(control){control.$name&&form[control.$name]===control&&delete form[control.$name],forEach(form.$pending,function(value,name){form.$setValidity(name,null,control)}),forEach(form.$error,function(value,name){form.$setValidity(name,null,control)}),forEach(form.$$success,function(value,name){form.$setValidity(name,null,control)}),arrayRemove(controls,control),control.$$parentForm=nullFormCtrl},addSetValidityMethod({ctrl:this,$element:element,set:function(object,property,controller){var list=object[property];if(list){var index=list.indexOf(controller);index===-1&&list.push(controller)}else object[property]=[controller]},unset:function(object,property,controller){var list=object[property];list&&(arrayRemove(list,controller),0===list.length&&delete object[property])},$animate:$animate}),form.$setDirty=function(){$animate.removeClass(element,PRISTINE_CLASS),$animate.addClass(element,DIRTY_CLASS),form.$dirty=!0,form.$pristine=!1,form.$$parentForm.$setDirty()},form.$setPristine=function(){$animate.setClass(element,PRISTINE_CLASS,DIRTY_CLASS+" "+SUBMITTED_CLASS),form.$dirty=!1,form.$pristine=!0,form.$submitted=!1,forEach(controls,function(control){control.$setPristine()})},form.$setUntouched=function(){forEach(controls,function(control){control.$setUntouched()})},form.$setSubmitted=function(){$animate.addClass(element,SUBMITTED_CLASS),form.$submitted=!0,form.$$parentForm.$setSubmitted()}}function stringBasedInputType(ctrl){ctrl.$formatters.push(function(value){return ctrl.$isEmpty(value)?value:value.toString()})}function textInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl)}function baseInputType(scope,element,attr,ctrl,$sniffer,$browser){var type=lowercase(element[0].type);if(!$sniffer.android){var composing=!1;element.on("compositionstart",function(data){composing=!0}),element.on("compositionend",function(){composing=!1,listener()})}var timeout,listener=function(ev){if(timeout&&($browser.defer.cancel(timeout),timeout=null),!composing){var value=element.val(),event=ev&&ev.type;"password"===type||attr.ngTrim&&"false"===attr.ngTrim||(value=trim(value)),(ctrl.$viewValue!==value||""===value&&ctrl.$$hasNativeValidators)&&ctrl.$setViewValue(value,event)}};if($sniffer.hasEvent("input"))element.on("input",listener);else{var deferListener=function(ev,input,origValue){timeout||(timeout=$browser.defer(function(){timeout=null,input&&input.value===origValue||listener(ev)}))};element.on("keydown",function(event){var key=event.keyCode;91===key||15<key&&key<19||37<=key&&key<=40||deferListener(event,this,this.value)}),$sniffer.hasEvent("paste")&&element.on("paste cut",deferListener)}element.on("change",listener),PARTIAL_VALIDATION_TYPES[type]&&ctrl.$$hasNativeValidators&&type===attr.type&&element.on(PARTIAL_VALIDATION_EVENTS,function(ev){if(!timeout){var validity=this[VALIDITY_STATE_PROPERTY],origBadInput=validity.badInput,origTypeMismatch=validity.typeMismatch;timeout=$browser.defer(function(){timeout=null,validity.badInput===origBadInput&&validity.typeMismatch===origTypeMismatch||listener(ev)})}}),ctrl.$render=function(){var value=ctrl.$isEmpty(ctrl.$viewValue)?"":ctrl.$viewValue;element.val()!==value&&element.val(value)}}function weekParser(isoWeek,existingDate){if(isDate(isoWeek))return isoWeek;if(isString(isoWeek)){WEEK_REGEXP.lastIndex=0;var parts=WEEK_REGEXP.exec(isoWeek);if(parts){var year=+parts[1],week=+parts[2],hours=0,minutes=0,seconds=0,milliseconds=0,firstThurs=getFirstThursdayOfYear(year),addDays=7*(week-1);return existingDate&&(hours=existingDate.getHours(),minutes=existingDate.getMinutes(),seconds=existingDate.getSeconds(),milliseconds=existingDate.getMilliseconds()),new Date(year,0,firstThurs.getDate()+addDays,hours,minutes,seconds,milliseconds)}}return NaN}function createDateParser(regexp,mapping){return function(iso,date){var parts,map;if(isDate(iso))return iso;if(isString(iso)){if('"'==iso.charAt(0)&&'"'==iso.charAt(iso.length-1)&&(iso=iso.substring(1,iso.length-1)),ISO_DATE_REGEXP.test(iso))return new Date(iso);if(regexp.lastIndex=0,parts=regexp.exec(iso))return parts.shift(),map=date?{yyyy:date.getFullYear(),MM:date.getMonth()+1,dd:date.getDate(),HH:date.getHours(),mm:date.getMinutes(),ss:date.getSeconds(),sss:date.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},forEach(parts,function(part,index){index<mapping.length&&(map[mapping[index]]=+part)}),new Date(map.yyyy,map.MM-1,map.dd,map.HH,map.mm,map.ss||0,1e3*map.sss||0)}return NaN}}function createDateInputType(type,regexp,parseDate,format){return function(scope,element,attr,ctrl,$sniffer,$browser,$filter){function isValidDate(value){return value&&!(value.getTime&&value.getTime()!==value.getTime())}function parseObservedDateValue(val){return isDefined(val)&&!isDate(val)?parseDate(val)||undefined:val}badInputChecker(scope,element,attr,ctrl),baseInputType(scope,element,attr,ctrl,$sniffer,$browser);var previousDate,timezone=ctrl&&ctrl.$options&&ctrl.$options.timezone;if(ctrl.$$parserName=type,ctrl.$parsers.push(function(value){if(ctrl.$isEmpty(value))return null;if(regexp.test(value)){var parsedDate=parseDate(value,previousDate);return timezone&&(parsedDate=convertTimezoneToLocal(parsedDate,timezone)),parsedDate}return undefined}),ctrl.$formatters.push(function(value){if(value&&!isDate(value))throw ngModelMinErr("datefmt","Expected `{0}` to be a date",value);return isValidDate(value)?(previousDate=value,previousDate&&timezone&&(previousDate=convertTimezoneToLocal(previousDate,timezone,!0)),$filter("date")(value,format,timezone)):(previousDate=null,"")}),isDefined(attr.min)||attr.ngMin){var minVal;ctrl.$validators.min=function(value){return!isValidDate(value)||isUndefined(minVal)||parseDate(value)>=minVal},attr.$observe("min",function(val){minVal=parseObservedDateValue(val),ctrl.$validate()})}if(isDefined(attr.max)||attr.ngMax){var maxVal;ctrl.$validators.max=function(value){return!isValidDate(value)||isUndefined(maxVal)||parseDate(value)<=maxVal},attr.$observe("max",function(val){maxVal=parseObservedDateValue(val),ctrl.$validate()})}}}function badInputChecker(scope,element,attr,ctrl){var node=element[0],nativeValidation=ctrl.$$hasNativeValidators=isObject(node.validity);nativeValidation&&ctrl.$parsers.push(function(value){var validity=element.prop(VALIDITY_STATE_PROPERTY)||{};return validity.badInput&&!validity.typeMismatch?undefined:value})}function numberInputType(scope,element,attr,ctrl,$sniffer,$browser){if(badInputChecker(scope,element,attr,ctrl),baseInputType(scope,element,attr,ctrl,$sniffer,$browser),ctrl.$$parserName="number",ctrl.$parsers.push(function(value){return ctrl.$isEmpty(value)?null:NUMBER_REGEXP.test(value)?parseFloat(value):undefined}),ctrl.$formatters.push(function(value){if(!ctrl.$isEmpty(value)){if(!isNumber(value))throw ngModelMinErr("numfmt","Expected `{0}` to be a number",value);value=value.toString()}return value}),isDefined(attr.min)||attr.ngMin){var minVal;ctrl.$validators.min=function(value){return ctrl.$isEmpty(value)||isUndefined(minVal)||value>=minVal},attr.$observe("min",function(val){isDefined(val)&&!isNumber(val)&&(val=parseFloat(val,10)),minVal=isNumber(val)&&!isNaN(val)?val:undefined,ctrl.$validate()})}if(isDefined(attr.max)||attr.ngMax){var maxVal;ctrl.$validators.max=function(value){return ctrl.$isEmpty(value)||isUndefined(maxVal)||value<=maxVal},attr.$observe("max",function(val){isDefined(val)&&!isNumber(val)&&(val=parseFloat(val,10)),maxVal=isNumber(val)&&!isNaN(val)?val:undefined,ctrl.$validate()})}}function urlInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl),ctrl.$$parserName="url",ctrl.$validators.url=function(modelValue,viewValue){var value=modelValue||viewValue;return ctrl.$isEmpty(value)||URL_REGEXP.test(value)}}function emailInputType(scope,element,attr,ctrl,$sniffer,$browser){baseInputType(scope,element,attr,ctrl,$sniffer,$browser),stringBasedInputType(ctrl),ctrl.$$parserName="email",ctrl.$validators.email=function(modelValue,viewValue){var value=modelValue||viewValue;return ctrl.$isEmpty(value)||EMAIL_REGEXP.test(value)}}function radioInputType(scope,element,attr,ctrl){isUndefined(attr.name)&&element.attr("name",nextUid());var listener=function(ev){element[0].checked&&ctrl.$setViewValue(attr.value,ev&&ev.type)};element.on("click",listener),ctrl.$render=function(){var value=attr.value;element[0].checked=value==ctrl.$viewValue},attr.$observe("value",ctrl.$render)}function parseConstantExpr($parse,context,name,expression,fallback){var parseFn;if(isDefined(expression)){if(parseFn=$parse(expression),!parseFn.constant)throw ngModelMinErr("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",name,expression);return parseFn(context)}return fallback}function checkboxInputType(scope,element,attr,ctrl,$sniffer,$browser,$filter,$parse){var trueValue=parseConstantExpr($parse,scope,"ngTrueValue",attr.ngTrueValue,!0),falseValue=parseConstantExpr($parse,scope,"ngFalseValue",attr.ngFalseValue,!1),listener=function(ev){ctrl.$setViewValue(element[0].checked,ev&&ev.type)};element.on("click",listener),ctrl.$render=function(){element[0].checked=ctrl.$viewValue},ctrl.$isEmpty=function(value){return value===!1},ctrl.$formatters.push(function(value){return equals(value,trueValue)}),ctrl.$parsers.push(function(value){return value?trueValue:falseValue})}function classDirective(name,selector){return name="ngClass"+name,["$animate",function($animate){function arrayDifference(tokens1,tokens2){var values=[];outer:for(var i=0;i<tokens1.length;i++){for(var token=tokens1[i],j=0;j<tokens2.length;j++)if(token==tokens2[j])continue outer;values.push(token)}return values}function arrayClasses(classVal){var classes=[];return isArray(classVal)?(forEach(classVal,function(v){classes=classes.concat(arrayClasses(v))}),classes):isString(classVal)?classVal.split(" "):isObject(classVal)?(forEach(classVal,function(v,k){v&&(classes=classes.concat(k.split(" ")))}),classes):classVal}return{restrict:"AC",link:function(scope,element,attr){function addClasses(classes){var newClasses=digestClassCounts(classes,1);attr.$addClass(newClasses)}function removeClasses(classes){var newClasses=digestClassCounts(classes,-1);attr.$removeClass(newClasses)}function digestClassCounts(classes,count){var classCounts=element.data("$classCounts")||createMap(),classesToUpdate=[];return forEach(classes,function(className){(count>0||classCounts[className])&&(classCounts[className]=(classCounts[className]||0)+count,classCounts[className]===+(count>0)&&classesToUpdate.push(className))}),element.data("$classCounts",classCounts),classesToUpdate.join(" ")}function updateClasses(oldClasses,newClasses){var toAdd=arrayDifference(newClasses,oldClasses),toRemove=arrayDifference(oldClasses,newClasses);toAdd=digestClassCounts(toAdd,1),toRemove=digestClassCounts(toRemove,-1),toAdd&&toAdd.length&&$animate.addClass(element,toAdd),toRemove&&toRemove.length&&$animate.removeClass(element,toRemove)}function ngClassWatchAction(newVal){if(selector===!0||scope.$index%2===selector){var newClasses=arrayClasses(newVal||[]);if(oldVal){if(!equals(newVal,oldVal)){var oldClasses=arrayClasses(oldVal);updateClasses(oldClasses,newClasses)}}else addClasses(newClasses)}oldVal=isArray(newVal)?newVal.map(function(v){return shallowCopy(v)}):shallowCopy(newVal)}var oldVal;scope.$watch(attr[name],ngClassWatchAction,!0),attr.$observe("class",function(value){ngClassWatchAction(scope.$eval(attr[name]))}),"ngClass"!==name&&scope.$watch("$index",function($index,old$index){var mod=1&$index;if(mod!==(1&old$index)){var classes=arrayClasses(scope.$eval(attr[name]));mod===selector?addClasses(classes):removeClasses(classes)}})}}}]}function addSetValidityMethod(context){function setValidity(validationErrorKey,state,controller){isUndefined(state)?createAndSet("$pending",validationErrorKey,controller):unsetAndCleanup("$pending",validationErrorKey,controller),isBoolean(state)?state?(unset(ctrl.$error,validationErrorKey,controller),
set(ctrl.$$success,validationErrorKey,controller)):(set(ctrl.$error,validationErrorKey,controller),unset(ctrl.$$success,validationErrorKey,controller)):(unset(ctrl.$error,validationErrorKey,controller),unset(ctrl.$$success,validationErrorKey,controller)),ctrl.$pending?(cachedToggleClass(PENDING_CLASS,!0),ctrl.$valid=ctrl.$invalid=undefined,toggleValidationCss("",null)):(cachedToggleClass(PENDING_CLASS,!1),ctrl.$valid=isObjectEmpty(ctrl.$error),ctrl.$invalid=!ctrl.$valid,toggleValidationCss("",ctrl.$valid));var combinedState;combinedState=ctrl.$pending&&ctrl.$pending[validationErrorKey]?undefined:!ctrl.$error[validationErrorKey]&&(!!ctrl.$$success[validationErrorKey]||null),toggleValidationCss(validationErrorKey,combinedState),ctrl.$$parentForm.$setValidity(validationErrorKey,combinedState,ctrl)}function createAndSet(name,value,controller){ctrl[name]||(ctrl[name]={}),set(ctrl[name],value,controller)}function unsetAndCleanup(name,value,controller){ctrl[name]&&unset(ctrl[name],value,controller),isObjectEmpty(ctrl[name])&&(ctrl[name]=undefined)}function cachedToggleClass(className,switchValue){switchValue&&!classCache[className]?($animate.addClass($element,className),classCache[className]=!0):!switchValue&&classCache[className]&&($animate.removeClass($element,className),classCache[className]=!1)}function toggleValidationCss(validationErrorKey,isValid){validationErrorKey=validationErrorKey?"-"+snake_case(validationErrorKey,"-"):"",cachedToggleClass(VALID_CLASS+validationErrorKey,isValid===!0),cachedToggleClass(INVALID_CLASS+validationErrorKey,isValid===!1)}var ctrl=context.ctrl,$element=context.$element,classCache={},set=context.set,unset=context.unset,$animate=context.$animate;classCache[INVALID_CLASS]=!(classCache[VALID_CLASS]=$element.hasClass(VALID_CLASS)),ctrl.$setValidity=setValidity}function isObjectEmpty(obj){if(obj)for(var prop in obj)if(obj.hasOwnProperty(prop))return!1;return!0}function chromeHack(optionElement){optionElement[0].hasAttribute("selected")&&(optionElement[0].selected=!0)}var REGEX_STRING_REGEXP=/^\/(.+)\/([a-z]*)$/,VALIDITY_STATE_PROPERTY="validity",lowercase=function(string){return isString(string)?string.toLowerCase():string},hasOwnProperty=Object.prototype.hasOwnProperty,uppercase=function(string){return isString(string)?string.toUpperCase():string},manualLowercase=function(s){return isString(s)?s.replace(/[A-Z]/g,function(ch){return String.fromCharCode(32|ch.charCodeAt(0))}):s},manualUppercase=function(s){return isString(s)?s.replace(/[a-z]/g,function(ch){return String.fromCharCode(ch.charCodeAt(0)&-33)}):s};"i"!=="I".toLowerCase()&&(lowercase=manualLowercase,uppercase=manualUppercase);var msie,jqLite,jQuery,angularModule,slice=[].slice,splice=[].splice,push=[].push,toString=Object.prototype.toString,getPrototypeOf=Object.getPrototypeOf,ngMinErr=minErr("ng"),angular=window.angular||(window.angular={}),uid=0;msie=document.documentMode,noop.$inject=[],identity.$inject=[];var skipDestroyOnNextJQueryCleanData,isArray=Array.isArray,TYPED_ARRAY_REGEXP=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,trim=function(value){return isString(value)?value.trim():value},escapeForRegexp=function(s){return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},csp=function(){function noUnsafeEval(){try{return new Function(""),!1}catch(e){return!0}}if(!isDefined(csp.rules)){var ngCspElement=document.querySelector("[ng-csp]")||document.querySelector("[data-ng-csp]");if(ngCspElement){var ngCspAttribute=ngCspElement.getAttribute("ng-csp")||ngCspElement.getAttribute("data-ng-csp");csp.rules={noUnsafeEval:!ngCspAttribute||ngCspAttribute.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!ngCspAttribute||ngCspAttribute.indexOf("no-inline-style")!==-1}}else csp.rules={noUnsafeEval:noUnsafeEval(),noInlineStyle:!1}}return csp.rules},jq=function(){if(isDefined(jq.name_))return jq.name_;var el,i,prefix,name,ii=ngAttrPrefixes.length;for(i=0;i<ii;++i)if(prefix=ngAttrPrefixes[i],el=document.querySelector("["+prefix.replace(":","\\:")+"jq]")){name=el.getAttribute(prefix+"jq");break}return jq.name_=name},ALL_COLONS=/:/g,ngAttrPrefixes=["ng-","data-ng-","ng:","x-ng-"],SNAKE_CASE_REGEXP=/[A-Z]/g,bindJQueryFired=!1,NODE_TYPE_ELEMENT=1,NODE_TYPE_ATTRIBUTE=2,NODE_TYPE_TEXT=3,NODE_TYPE_COMMENT=8,NODE_TYPE_DOCUMENT=9,NODE_TYPE_DOCUMENT_FRAGMENT=11,version={full:"1.4.12",major:1,minor:4,dot:12,codeName:"cultural-conservation"};JQLite.expando="ng339";var jqCache=JQLite.cache={},jqId=1,addEventListenerFn=function(element,type,fn){element.addEventListener(type,fn,!1)},removeEventListenerFn=function(element,type,fn){element.removeEventListener(type,fn,!1)};JQLite._data=function(node){return this.cache[node[this.expando]]||{}};var SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g,MOZ_HACK_REGEXP=/^moz([A-Z])/,MOUSE_EVENT_MAP={mouseleave:"mouseout",mouseenter:"mouseover"},jqLiteMinErr=minErr("jqLite"),SINGLE_TAG_REGEXP=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,HTML_REGEXP=/<|&#?\w+;/,TAG_NAME_REGEXP=/<([\w:-]+)/,XHTML_TAG_REGEXP=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wrapMap={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td;var jqLiteContains=Node.prototype.contains||function(arg){return!!(16&this.compareDocumentPosition(arg))},JQLitePrototype=JQLite.prototype={ready:function(fn){function trigger(){fired||(fired=!0,fn())}var fired=!1;"complete"===document.readyState?setTimeout(trigger):(this.on("DOMContentLoaded",trigger),JQLite(window).on("load",trigger))},toString:function(){var value=[];return forEach(this,function(e){value.push(""+e)}),"["+value.join(", ")+"]"},eq:function(index){return jqLite(index>=0?this[index]:this[this.length+index])},length:0,push:push,sort:[].sort,splice:[].splice},BOOLEAN_ATTR={};forEach("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(value){BOOLEAN_ATTR[lowercase(value)]=value});var BOOLEAN_ELEMENTS={};forEach("input,select,option,textarea,button,form,details".split(","),function(value){BOOLEAN_ELEMENTS[value]=!0});var ALIASED_ATTR={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};forEach({data:jqLiteData,removeData:jqLiteRemoveData,hasData:jqLiteHasData},function(fn,name){JQLite[name]=fn}),forEach({data:jqLiteData,inheritedData:jqLiteInheritedData,scope:function(element){return jqLite.data(element,"$scope")||jqLiteInheritedData(element.parentNode||element,["$isolateScope","$scope"])},isolateScope:function(element){return jqLite.data(element,"$isolateScope")||jqLite.data(element,"$isolateScopeNoTemplate")},controller:jqLiteController,injector:function(element){return jqLiteInheritedData(element,"$injector")},removeAttr:function(element,name){element.removeAttribute(name)},hasClass:jqLiteHasClass,css:function(element,name,value){return name=camelCase(name),isDefined(value)?void(element.style[name]=value):element.style[name]},attr:function(element,name,value){var nodeType=element.nodeType;if(nodeType!==NODE_TYPE_TEXT&&nodeType!==NODE_TYPE_ATTRIBUTE&&nodeType!==NODE_TYPE_COMMENT){var lowercasedName=lowercase(name);if(BOOLEAN_ATTR[lowercasedName]){if(!isDefined(value))return element[name]||(element.attributes.getNamedItem(name)||noop).specified?lowercasedName:undefined;value?(element[name]=!0,element.setAttribute(name,lowercasedName)):(element[name]=!1,element.removeAttribute(lowercasedName))}else if(isDefined(value))element.setAttribute(name,value);else if(element.getAttribute){var ret=element.getAttribute(name,2);return null===ret?undefined:ret}}},prop:function(element,name,value){return isDefined(value)?void(element[name]=value):element[name]},text:function(){function getText(element,value){if(isUndefined(value)){var nodeType=element.nodeType;return nodeType===NODE_TYPE_ELEMENT||nodeType===NODE_TYPE_TEXT?element.textContent:""}element.textContent=value}return getText.$dv="",getText}(),val:function(element,value){if(isUndefined(value)){if(element.multiple&&"select"===nodeName_(element)){var result=[];return forEach(element.options,function(option){option.selected&&result.push(option.value||option.text)}),0===result.length?null:result}return element.value}element.value=value},html:function(element,value){return isUndefined(value)?element.innerHTML:(jqLiteDealoc(element,!0),void(element.innerHTML=value))},empty:jqLiteEmpty},function(fn,name){JQLite.prototype[name]=function(arg1,arg2){var i,key,nodeCount=this.length;if(fn!==jqLiteEmpty&&isUndefined(2==fn.length&&fn!==jqLiteHasClass&&fn!==jqLiteController?arg1:arg2)){if(isObject(arg1)){for(i=0;i<nodeCount;i++)if(fn===jqLiteData)fn(this[i],arg1);else for(key in arg1)fn(this[i],key,arg1[key]);return this}for(var value=fn.$dv,jj=isUndefined(value)?Math.min(nodeCount,1):nodeCount,j=0;j<jj;j++){var nodeValue=fn(this[j],arg1,arg2);value=value?value+nodeValue:nodeValue}return value}for(i=0;i<nodeCount;i++)fn(this[i],arg1,arg2);return this}}),forEach({removeData:jqLiteRemoveData,on:function(element,type,fn,unsupported){if(isDefined(unsupported))throw jqLiteMinErr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(jqLiteAcceptsData(element)){var expandoStore=jqLiteExpandoStore(element,!0),events=expandoStore.events,handle=expandoStore.handle;handle||(handle=expandoStore.handle=createEventHandler(element,events));for(var types=type.indexOf(" ")>=0?type.split(" "):[type],i=types.length,addHandler=function(type,specialHandlerWrapper,noEventListener){var eventFns=events[type];eventFns||(eventFns=events[type]=[],eventFns.specialHandlerWrapper=specialHandlerWrapper,"$destroy"===type||noEventListener||addEventListenerFn(element,type,handle)),eventFns.push(fn)};i--;)type=types[i],MOUSE_EVENT_MAP[type]?(addHandler(MOUSE_EVENT_MAP[type],specialMouseHandlerWrapper),addHandler(type,undefined,!0)):addHandler(type)}},off:jqLiteOff,one:function(element,type,fn){element=jqLite(element),element.on(type,function onFn(){element.off(type,fn),element.off(type,onFn)}),element.on(type,fn)},replaceWith:function(element,replaceNode){var index,parent=element.parentNode;jqLiteDealoc(element),forEach(new JQLite(replaceNode),function(node){index?parent.insertBefore(node,index.nextSibling):parent.replaceChild(node,element),index=node})},children:function(element){var children=[];return forEach(element.childNodes,function(element){element.nodeType===NODE_TYPE_ELEMENT&&children.push(element)}),children},contents:function(element){return element.contentDocument||element.childNodes||[]},append:function(element,node){var nodeType=element.nodeType;if(nodeType===NODE_TYPE_ELEMENT||nodeType===NODE_TYPE_DOCUMENT_FRAGMENT){node=new JQLite(node);for(var i=0,ii=node.length;i<ii;i++){var child=node[i];element.appendChild(child)}}},prepend:function(element,node){if(element.nodeType===NODE_TYPE_ELEMENT){var index=element.firstChild;forEach(new JQLite(node),function(child){element.insertBefore(child,index)})}},wrap:function(element,wrapNode){jqLiteWrapNode(element,jqLite(wrapNode).eq(0).clone()[0])},remove:jqLiteRemove,detach:function(element){jqLiteRemove(element,!0)},after:function(element,newElement){var index=element,parent=element.parentNode;newElement=new JQLite(newElement);for(var i=0,ii=newElement.length;i<ii;i++){var node=newElement[i];parent.insertBefore(node,index.nextSibling),index=node}},addClass:jqLiteAddClass,removeClass:jqLiteRemoveClass,toggleClass:function(element,selector,condition){selector&&forEach(selector.split(" "),function(className){var classCondition=condition;isUndefined(classCondition)&&(classCondition=!jqLiteHasClass(element,className)),(classCondition?jqLiteAddClass:jqLiteRemoveClass)(element,className)})},parent:function(element){var parent=element.parentNode;return parent&&parent.nodeType!==NODE_TYPE_DOCUMENT_FRAGMENT?parent:null},next:function(element){return element.nextElementSibling},find:function(element,selector){return element.getElementsByTagName?element.getElementsByTagName(selector):[]},clone:jqLiteClone,triggerHandler:function(element,event,extraParameters){var dummyEvent,eventFnsCopy,handlerArgs,eventName=event.type||event,expandoStore=jqLiteExpandoStore(element),events=expandoStore&&expandoStore.events,eventFns=events&&events[eventName];eventFns&&(dummyEvent={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:noop,type:eventName,target:element},event.type&&(dummyEvent=extend(dummyEvent,event)),eventFnsCopy=shallowCopy(eventFns),handlerArgs=extraParameters?[dummyEvent].concat(extraParameters):[dummyEvent],forEach(eventFnsCopy,function(fn){dummyEvent.isImmediatePropagationStopped()||fn.apply(element,handlerArgs)}))}},function(fn,name){JQLite.prototype[name]=function(arg1,arg2,arg3){for(var value,i=0,ii=this.length;i<ii;i++)isUndefined(value)?(value=fn(this[i],arg1,arg2,arg3),isDefined(value)&&(value=jqLite(value))):jqLiteAddNodes(value,fn(this[i],arg1,arg2,arg3));return isDefined(value)?value:this},JQLite.prototype.bind=JQLite.prototype.on,JQLite.prototype.unbind=JQLite.prototype.off}),HashMap.prototype={put:function(key,value){this[hashKey(key,this.nextUid)]=value},get:function(key){return this[hashKey(key,this.nextUid)]},remove:function(key){var value=this[key=hashKey(key,this.nextUid)];return delete this[key],value}};var $$HashMapProvider=[function(){this.$get=[function(){return HashMap}]}],FN_ARGS=/^[^\(]*\(\s*([^\)]*)\)/m,FN_ARG_SPLIT=/,/,FN_ARG=/^\s*(_?)(\S+?)\1\s*$/,STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,$injectorMinErr=minErr("$injector");createInjector.$$annotate=annotate;var $animateMinErr=minErr("$animate"),ELEMENT_NODE=1,NG_ANIMATE_CLASSNAME="ng-animate",$$CoreAnimateJsProvider=function(){this.$get=function(){}},$$CoreAnimateQueueProvider=function(){var postDigestQueue=new HashMap,postDigestElements=[];this.$get=["$$AnimateRunner","$rootScope",function($$AnimateRunner,$rootScope){function updateData(data,classes,value){var changed=!1;return classes&&(classes=isString(classes)?classes.split(" "):isArray(classes)?classes:[],forEach(classes,function(className){className&&(changed=!0,data[className]=value)})),changed}function handleCSSClassChanges(){forEach(postDigestElements,function(element){var data=postDigestQueue.get(element);if(data){var existing=splitClasses(element.attr("class")),toAdd="",toRemove="";forEach(data,function(status,className){var hasClass=!!existing[className];status!==hasClass&&(status?toAdd+=(toAdd.length?" ":"")+className:toRemove+=(toRemove.length?" ":"")+className)}),forEach(element,function(elm){toAdd&&jqLiteAddClass(elm,toAdd),toRemove&&jqLiteRemoveClass(elm,toRemove)}),postDigestQueue.remove(element)}}),postDigestElements.length=0}function addRemoveClassesPostDigest(element,add,remove){var data=postDigestQueue.get(element)||{},classesAdded=updateData(data,add,!0),classesRemoved=updateData(data,remove,!1);(classesAdded||classesRemoved)&&(postDigestQueue.put(element,data),postDigestElements.push(element),1===postDigestElements.length&&$rootScope.$$postDigest(handleCSSClassChanges))}return{enabled:noop,on:noop,off:noop,pin:noop,push:function(element,event,options,domOperation){domOperation&&domOperation(),options=options||{},options.from&&element.css(options.from),options.to&&element.css(options.to),(options.addClass||options.removeClass)&&addRemoveClassesPostDigest(element,options.addClass,options.removeClass);var runner=new $$AnimateRunner;return runner.complete(),runner}}}]},$AnimateProvider=["$provide",function($provide){var provider=this;this.$$registeredAnimations=Object.create(null),this.register=function(name,factory){if(name&&"."!==name.charAt(0))throw $animateMinErr("notcsel","Expecting class selector starting with '.' got '{0}'.",name);var key=name+"-animation";provider.$$registeredAnimations[name.substr(1)]=key,$provide.factory(key,factory)},this.classNameFilter=function(expression){if(1===arguments.length&&(this.$$classNameFilter=expression instanceof RegExp?expression:null,this.$$classNameFilter)){var reservedRegex=new RegExp("(\\s+|\\/)"+NG_ANIMATE_CLASSNAME+"(\\s+|\\/)");if(reservedRegex.test(this.$$classNameFilter.toString()))throw $animateMinErr("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',NG_ANIMATE_CLASSNAME)}return this.$$classNameFilter},this.$get=["$$animateQueue",function($$animateQueue){function domInsert(element,parentElement,afterElement){if(afterElement){var afterNode=extractElementNode(afterElement);!afterNode||afterNode.parentNode||afterNode.previousElementSibling||(afterElement=null)}afterElement?afterElement.after(element):parentElement.prepend(element)}return{on:$$animateQueue.on,off:$$animateQueue.off,pin:$$animateQueue.pin,enabled:$$animateQueue.enabled,cancel:function(runner){runner.end&&runner.end()},enter:function(element,parent,after,options){return parent=parent&&jqLite(parent),after=after&&jqLite(after),parent=parent||after.parent(),domInsert(element,parent,after),$$animateQueue.push(element,"enter",prepareAnimateOptions(options))},move:function(element,parent,after,options){return parent=parent&&jqLite(parent),after=after&&jqLite(after),parent=parent||after.parent(),domInsert(element,parent,after),$$animateQueue.push(element,"move",prepareAnimateOptions(options))},leave:function(element,options){return $$animateQueue.push(element,"leave",prepareAnimateOptions(options),function(){element.remove()})},addClass:function(element,className,options){return options=prepareAnimateOptions(options),options.addClass=mergeClasses(options.addclass,className),$$animateQueue.push(element,"addClass",options)},removeClass:function(element,className,options){return options=prepareAnimateOptions(options),options.removeClass=mergeClasses(options.removeClass,className),$$animateQueue.push(element,"removeClass",options)},setClass:function(element,add,remove,options){return options=prepareAnimateOptions(options),options.addClass=mergeClasses(options.addClass,add),options.removeClass=mergeClasses(options.removeClass,remove),$$animateQueue.push(element,"setClass",options)},animate:function(element,from,to,className,options){return options=prepareAnimateOptions(options),options.from=options.from?extend(options.from,from):from,options.to=options.to?extend(options.to,to):to,className=className||"ng-inline-animate",options.tempClasses=mergeClasses(options.tempClasses,className),$$animateQueue.push(element,"animate",options)}}}]}],$$AnimateAsyncRunFactoryProvider=function(){this.$get=["$$rAF",function($$rAF){function waitForTick(fn){waitQueue.push(fn),waitQueue.length>1||$$rAF(function(){for(var i=0;i<waitQueue.length;i++)waitQueue[i]();waitQueue=[]})}var waitQueue=[];return function(){var passed=!1;return waitForTick(function(){passed=!0}),function(callback){passed?callback():waitForTick(callback)}}}]},$$AnimateRunnerFactoryProvider=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function($q,$sniffer,$$animateAsyncRun,$document,$timeout){function AnimateRunner(host){this.setHost(host);var rafTick=$$animateAsyncRun(),timeoutTick=function(fn){$timeout(fn,0,!1)};this._doneCallbacks=[],this._tick=function(fn){var doc=$document[0];doc&&doc.hidden?timeoutTick(fn):rafTick(fn)},this._state=0}var INITIAL_STATE=0,DONE_PENDING_STATE=1,DONE_COMPLETE_STATE=2;return AnimateRunner.chain=function(chain,callback){function next(){return index===chain.length?void callback(!0):void chain[index](function(response){return response===!1?void callback(!1):(index++,void next())})}var index=0;next()},AnimateRunner.all=function(runners,callback){function onProgress(response){status=status&&response,++count===runners.length&&callback(status)}var count=0,status=!0;forEach(runners,function(runner){runner.done(onProgress)})},AnimateRunner.prototype={setHost:function(host){this.host=host||{}},done:function(fn){this._state===DONE_COMPLETE_STATE?fn():this._doneCallbacks.push(fn)},progress:noop,getPromise:function(){if(!this.promise){var self=this;this.promise=$q(function(resolve,reject){self.done(function(status){status===!1?reject():resolve()})})}return this.promise},then:function(resolveHandler,rejectHandler){return this.getPromise().then(resolveHandler,rejectHandler)},"catch":function(handler){return this.getPromise()["catch"](handler)},"finally":function(handler){return this.getPromise()["finally"](handler)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(response){var self=this;self._state===INITIAL_STATE&&(self._state=DONE_PENDING_STATE,self._tick(function(){self._resolve(response)}))},_resolve:function(response){this._state!==DONE_COMPLETE_STATE&&(forEach(this._doneCallbacks,function(fn){fn(response)}),this._doneCallbacks.length=0,this._state=DONE_COMPLETE_STATE)}},AnimateRunner}]},$CoreAnimateCssProvider=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function($$rAF,$q,$$AnimateRunner){return function(element,initialOptions){function run(){return $$rAF(function(){applyAnimationContents(),closed||runner.complete(),closed=!0}),runner}function applyAnimationContents(){options.addClass&&(element.addClass(options.addClass),options.addClass=null),options.removeClass&&(element.removeClass(options.removeClass),options.removeClass=null),options.to&&(element.css(options.to),options.to=null)}var options=initialOptions||{};options.$$prepared||(options=copy(options)),options.cleanupStyles&&(options.from=options.to=null),options.from&&(element.css(options.from),options.from=null);var closed,runner=new $$AnimateRunner;return{start:run,end:run}}}]},$compileMinErr=minErr("$compile");$CompileProvider.$inject=["$provide","$$sanitizeUriProvider"];var PREFIX_REGEXP=/^((?:x|data)[\:\-_])/i,$controllerMinErr=minErr("$controller"),CNTRL_REG=/^(\S+)(\s+as\s+([\w$]+))?$/,$$ForceReflowProvider=function(){this.$get=["$document",function($document){return function(domNode){return domNode?!domNode.nodeType&&domNode instanceof jqLite&&(domNode=domNode[0]):domNode=$document[0].body,domNode.offsetWidth+1}}]},APPLICATION_JSON="application/json",CONTENT_TYPE_APPLICATION_JSON={"Content-Type":APPLICATION_JSON+";charset=utf-8"},JSON_START=/^\[|^\{(?!\{)/,JSON_ENDS={"[":/]$/,"{":/}$/},JSON_PROTECTION_PREFIX=/^\)\]\}',?\n/,$httpMinErr=minErr("$http"),$httpMinErrLegacyFn=function(method){return function(){throw $httpMinErr("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",method)}},$interpolateMinErr=angular.$interpolateMinErr=minErr("$interpolate");$interpolateMinErr.throwNoconcat=function(text){throw $interpolateMinErr("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",text)},$interpolateMinErr.interr=function(text,err){return $interpolateMinErr("interr","Can't interpolate: {0}\n{1}",text,err.toString())};var PATH_MATCH=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,DEFAULT_PORTS={http:80,https:443,ftp:21},$locationMinErr=minErr("$location"),locationPrototype={$$html5:!1,$$replace:!1,absUrl:locationGetter("$$absUrl"),url:function(url){if(isUndefined(url))return this.$$url;var match=PATH_MATCH.exec(url);return(match[1]||""===url)&&this.path(decodeURIComponent(match[1])),(match[2]||match[1]||""===url)&&this.search(match[3]||""),this.hash(match[5]||""),this},protocol:locationGetter("$$protocol"),host:locationGetter("$$host"),port:locationGetter("$$port"),path:locationGetterSetter("$$path",function(path){return path=null!==path?path.toString():"","/"==path.charAt(0)?path:"/"+path}),search:function(search,paramValue){switch(arguments.length){case 0:return this.$$search;case 1:if(isString(search)||isNumber(search))search=search.toString(),this.$$search=parseKeyValue(search);else{if(!isObject(search))throw $locationMinErr("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");search=copy(search,{}),forEach(search,function(value,key){null==value&&delete search[key]}),this.$$search=search}break;default:isUndefined(paramValue)||null===paramValue?delete this.$$search[search]:this.$$search[search]=paramValue}return this.$$compose(),this},hash:locationGetterSetter("$$hash",function(hash){return null!==hash?hash.toString():""}),replace:function(){return this.$$replace=!0,this}};forEach([LocationHashbangInHtml5Url,LocationHashbangUrl,LocationHtml5Url],function(Location){Location.prototype=Object.create(locationPrototype),Location.prototype.state=function(state){if(!arguments.length)return this.$$state;if(Location!==LocationHtml5Url||!this.$$html5)throw $locationMinErr("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=isUndefined(state)?null:state,this}});var $parseMinErr=minErr("$parse"),CALL=Function.prototype.call,APPLY=Function.prototype.apply,BIND=Function.prototype.bind,OPERATORS=createMap();forEach("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(operator){OPERATORS[operator]=!0});var ESCAPE={n:"\n",f:"\f",r:"\r",t:"\t",v:"\x0B","'":"'",'"':'"'},Lexer=function(options){this.options=options};Lexer.prototype={constructor:Lexer,lex:function(text){for(this.text=text,this.index=0,this.tokens=[];this.index<this.text.length;){var ch=this.text.charAt(this.index);if('"'===ch||"'"===ch)this.readString(ch);else if(this.isNumber(ch)||"."===ch&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(ch))this.readIdent();else if(this.is(ch,"(){}[].,;:?"))this.tokens.push({index:this.index,text:ch}),this.index++;else if(this.isWhitespace(ch))this.index++;else{var ch2=ch+this.peek(),ch3=ch2+this.peek(2),op1=OPERATORS[ch],op2=OPERATORS[ch2],op3=OPERATORS[ch3];if(op1||op2||op3){var token=op3?ch3:op2?ch2:ch;this.tokens.push({index:this.index,text:token,operator:!0}),this.index+=token.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(ch,chars){return chars.indexOf(ch)!==-1},peek:function(i){var num=i||1;return this.index+num<this.text.length&&this.text.charAt(this.index+num)},isNumber:function(ch){return"0"<=ch&&ch<="9"&&"string"==typeof ch},isWhitespace:function(ch){return" "===ch||"\r"===ch||"\t"===ch||"\n"===ch||"\x0B"===ch||" "===ch},isIdent:function(ch){return"a"<=ch&&ch<="z"||"A"<=ch&&ch<="Z"||"_"===ch||"$"===ch},isExpOperator:function(ch){return"-"===ch||"+"===ch||this.isNumber(ch)},throwError:function(error,start,end){end=end||this.index;var colStr=isDefined(start)?"s "+start+"-"+this.index+" ["+this.text.substring(start,end)+"]":" "+end;throw $parseMinErr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",error,colStr,this.text)},readNumber:function(){for(var number="",start=this.index;this.index<this.text.length;){var ch=lowercase(this.text.charAt(this.index));if("."==ch||this.isNumber(ch))number+=ch;else{var peekCh=this.peek();if("e"==ch&&this.isExpOperator(peekCh))number+=ch;else if(this.isExpOperator(ch)&&peekCh&&this.isNumber(peekCh)&&"e"==number.charAt(number.length-1))number+=ch;else{if(!this.isExpOperator(ch)||peekCh&&this.isNumber(peekCh)||"e"!=number.charAt(number.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:start,text:number,constant:!0,value:Number(number)})},readIdent:function(){for(var start=this.index;this.index<this.text.length;){var ch=this.text.charAt(this.index);if(!this.isIdent(ch)&&!this.isNumber(ch))break;this.index++}this.tokens.push({index:start,text:this.text.slice(start,this.index),identifier:!0})},readString:function(quote){var start=this.index;this.index++;for(var string="",rawString=quote,escape=!1;this.index<this.text.length;){var ch=this.text.charAt(this.index);if(rawString+=ch,escape){if("u"===ch){var hex=this.text.substring(this.index+1,this.index+5);hex.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+hex+"]"),this.index+=4,string+=String.fromCharCode(parseInt(hex,16))}else{var rep=ESCAPE[ch];string+=rep||ch}escape=!1}else if("\\"===ch)escape=!0;else{if(ch===quote)return this.index++,void this.tokens.push({index:start,text:rawString,constant:!0,value:string});string+=ch}this.index++}this.throwError("Unterminated quote",start)}};var AST=function(lexer,options){this.lexer=lexer,this.options=options};AST.Program="Program",AST.ExpressionStatement="ExpressionStatement",AST.AssignmentExpression="AssignmentExpression",AST.ConditionalExpression="ConditionalExpression",AST.LogicalExpression="LogicalExpression",AST.BinaryExpression="BinaryExpression",AST.UnaryExpression="UnaryExpression",AST.CallExpression="CallExpression",AST.MemberExpression="MemberExpression",AST.Identifier="Identifier",AST.Literal="Literal",AST.ArrayExpression="ArrayExpression",AST.Property="Property",AST.ObjectExpression="ObjectExpression",AST.ThisExpression="ThisExpression",AST.NGValueParameter="NGValueParameter",AST.prototype={ast:function(text){this.text=text,this.tokens=this.lexer.lex(text);var value=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),value},program:function(){for(var body=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&body.push(this.expressionStatement()),!this.expect(";"))return{type:AST.Program,body:body}},expressionStatement:function(){return{type:AST.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var token,left=this.expression();token=this.expect("|");)left=this.filter(left);return left},expression:function(){return this.assignment()},assignment:function(){var result=this.ternary();return this.expect("=")&&(result={type:AST.AssignmentExpression,left:result,right:this.assignment(),operator:"="}),result},ternary:function(){var alternate,consequent,test=this.logicalOR();return this.expect("?")&&(alternate=this.expression(),this.consume(":"))?(consequent=this.expression(),{type:AST.ConditionalExpression,test:test,alternate:alternate,consequent:consequent}):test},logicalOR:function(){for(var left=this.logicalAND();this.expect("||");)left={type:AST.LogicalExpression,operator:"||",left:left,right:this.logicalAND()};return left},logicalAND:function(){for(var left=this.equality();this.expect("&&");)left={type:AST.LogicalExpression,operator:"&&",left:left,right:this.equality()};return left},equality:function(){for(var token,left=this.relational();token=this.expect("==","!=","===","!==");)left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.relational()};return left},relational:function(){for(var token,left=this.additive();token=this.expect("<",">","<=",">=");)left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.additive()};return left},additive:function(){for(var token,left=this.multiplicative();token=this.expect("+","-");)left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.multiplicative()};return left},multiplicative:function(){for(var token,left=this.unary();token=this.expect("*","/","%");)left={type:AST.BinaryExpression,operator:token.text,left:left,right:this.unary()};return left},unary:function(){var token;return(token=this.expect("+","-","!"))?{type:AST.UnaryExpression,operator:token.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var primary;this.expect("(")?(primary=this.filterChain(),this.consume(")")):this.expect("[")?primary=this.arrayDeclaration():this.expect("{")?primary=this.object():this.constants.hasOwnProperty(this.peek().text)?primary=copy(this.constants[this.consume().text]):this.peek().identifier?primary=this.identifier():this.peek().constant?primary=this.constant():this.throwError("not a primary expression",this.peek());
for(var next;next=this.expect("(","[",".");)"("===next.text?(primary={type:AST.CallExpression,callee:primary,arguments:this.parseArguments()},this.consume(")")):"["===next.text?(primary={type:AST.MemberExpression,object:primary,property:this.expression(),computed:!0},this.consume("]")):"."===next.text?primary={type:AST.MemberExpression,object:primary,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return primary},filter:function(baseExpression){for(var args=[baseExpression],result={type:AST.CallExpression,callee:this.identifier(),arguments:args,filter:!0};this.expect(":");)args.push(this.expression());return result},parseArguments:function(){var args=[];if(")"!==this.peekToken().text)do args.push(this.expression());while(this.expect(","));return args},identifier:function(){var token=this.consume();return token.identifier||this.throwError("is not a valid identifier",token),{type:AST.Identifier,name:token.text}},constant:function(){return{type:AST.Literal,value:this.consume().value}},arrayDeclaration:function(){var elements=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;elements.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:AST.ArrayExpression,elements:elements}},object:function(){var property,properties=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;property={type:AST.Property,kind:"init"},this.peek().constant?property.key=this.constant():this.peek().identifier?property.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),property.value=this.expression(),properties.push(property)}while(this.expect(","));return this.consume("}"),{type:AST.ObjectExpression,properties:properties}},throwError:function(msg,token){throw $parseMinErr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",token.text,msg,token.index+1,this.text,this.text.substring(token.index))},consume:function(e1){if(0===this.tokens.length)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);var token=this.expect(e1);return token||this.throwError("is unexpected, expecting ["+e1+"]",this.peek()),token},peekToken:function(){if(0===this.tokens.length)throw $parseMinErr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e1,e2,e3,e4){return this.peekAhead(0,e1,e2,e3,e4)},peekAhead:function(i,e1,e2,e3,e4){if(this.tokens.length>i){var token=this.tokens[i],t=token.text;if(t===e1||t===e2||t===e3||t===e4||!e1&&!e2&&!e3&&!e4)return token}return!1},expect:function(e1,e2,e3,e4){var token=this.peek(e1,e2,e3,e4);return!!token&&(this.tokens.shift(),token)},constants:{"true":{type:AST.Literal,value:!0},"false":{type:AST.Literal,value:!1},"null":{type:AST.Literal,value:null},undefined:{type:AST.Literal,value:undefined},"this":{type:AST.ThisExpression}}},ASTCompiler.prototype={compile:function(expression,expensiveChecks){var self=this,ast=this.astBuilder.ast(expression);this.state={nextId:0,filters:{},expensiveChecks:expensiveChecks,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},findConstantAndWatchExpressions(ast,self.$filter);var assignable,extra="";if(this.stage="assign",assignable=assignableAST(ast)){this.state.computing="assign";var result=this.nextId();this.recurse(assignable,result),this.return_(result),extra="fn.assign="+this.generateFunction("assign","s,v,l")}var toWatch=getInputs(ast.body);self.stage="inputs",forEach(toWatch,function(watch,key){var fnKey="fn"+key;self.state[fnKey]={vars:[],body:[],own:{}},self.state.computing=fnKey;var intoId=self.nextId();self.recurse(watch,intoId),self.return_(intoId),self.state.inputs.push(fnKey),watch.watchId=key}),this.state.computing="fn",this.stage="main",this.recurse(ast);var fnString='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+extra+this.watchFns()+"return fn;",fn=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",fnString)(this.$filter,ensureSafeMemberName,ensureSafeObject,ensureSafeFunction,getStringValue,ensureSafeAssignContext,ifDefined,plusFn,expression);return this.state=this.stage=undefined,fn.literal=isLiteral(ast),fn.constant=isConstant(ast),fn},USE:"use",STRICT:"strict",watchFns:function(){var result=[],fns=this.state.inputs,self=this;return forEach(fns,function(name){result.push("var "+name+"="+self.generateFunction(name,"s"))}),fns.length&&result.push("fn.inputs=["+fns.join(",")+"];"),result.join("")},generateFunction:function(name,params){return"function("+params+"){"+this.varsPrefix(name)+this.body(name)+"};"},filterPrefix:function(){var parts=[],self=this;return forEach(this.state.filters,function(id,filter){parts.push(id+"=$filter("+self.escape(filter)+")")}),parts.length?"var "+parts.join(",")+";":""},varsPrefix:function(section){return this.state[section].vars.length?"var "+this.state[section].vars.join(",")+";":""},body:function(section){return this.state[section].body.join("")},recurse:function(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck){var left,right,args,expression,self=this;if(recursionFn=recursionFn||noop,!skipWatchIdCheck&&isDefined(ast.watchId))return intoId=intoId||this.nextId(),void this.if_("i",this.lazyAssign(intoId,this.computedMember("i",ast.watchId)),this.lazyRecurse(ast,intoId,nameId,recursionFn,create,!0));switch(ast.type){case AST.Program:forEach(ast.body,function(expression,pos){self.recurse(expression.expression,undefined,undefined,function(expr){right=expr}),pos!==ast.body.length-1?self.current().body.push(right,";"):self.return_(right)});break;case AST.Literal:expression=this.escape(ast.value),this.assign(intoId,expression),recursionFn(expression);break;case AST.UnaryExpression:this.recurse(ast.argument,undefined,undefined,function(expr){right=expr}),expression=ast.operator+"("+this.ifDefined(right,0)+")",this.assign(intoId,expression),recursionFn(expression);break;case AST.BinaryExpression:this.recurse(ast.left,undefined,undefined,function(expr){left=expr}),this.recurse(ast.right,undefined,undefined,function(expr){right=expr}),expression="+"===ast.operator?this.plus(left,right):"-"===ast.operator?this.ifDefined(left,0)+ast.operator+this.ifDefined(right,0):"("+left+")"+ast.operator+"("+right+")",this.assign(intoId,expression),recursionFn(expression);break;case AST.LogicalExpression:intoId=intoId||this.nextId(),self.recurse(ast.left,intoId),self.if_("&&"===ast.operator?intoId:self.not(intoId),self.lazyRecurse(ast.right,intoId)),recursionFn(intoId);break;case AST.ConditionalExpression:intoId=intoId||this.nextId(),self.recurse(ast.test,intoId),self.if_(intoId,self.lazyRecurse(ast.alternate,intoId),self.lazyRecurse(ast.consequent,intoId)),recursionFn(intoId);break;case AST.Identifier:intoId=intoId||this.nextId(),nameId&&(nameId.context="inputs"===self.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",ast.name)+"?l:s"),nameId.computed=!1,nameId.name=ast.name),ensureSafeMemberName(ast.name),self.if_("inputs"===self.stage||self.not(self.getHasOwnProperty("l",ast.name)),function(){self.if_("inputs"===self.stage||"s",function(){create&&1!==create&&self.if_(self.not(self.nonComputedMember("s",ast.name)),self.lazyAssign(self.nonComputedMember("s",ast.name),"{}")),self.assign(intoId,self.nonComputedMember("s",ast.name))})},intoId&&self.lazyAssign(intoId,self.nonComputedMember("l",ast.name))),(self.state.expensiveChecks||isPossiblyDangerousMemberName(ast.name))&&self.addEnsureSafeObject(intoId),recursionFn(intoId);break;case AST.MemberExpression:left=nameId&&(nameId.context=this.nextId())||this.nextId(),intoId=intoId||this.nextId(),self.recurse(ast.object,left,undefined,function(){self.if_(self.notNull(left),function(){create&&1!==create&&self.addEnsureSafeAssignContext(left),ast.computed?(right=self.nextId(),self.recurse(ast.property,right),self.getStringValue(right),self.addEnsureSafeMemberName(right),create&&1!==create&&self.if_(self.not(self.computedMember(left,right)),self.lazyAssign(self.computedMember(left,right),"{}")),expression=self.ensureSafeObject(self.computedMember(left,right)),self.assign(intoId,expression),nameId&&(nameId.computed=!0,nameId.name=right)):(ensureSafeMemberName(ast.property.name),create&&1!==create&&self.if_(self.not(self.nonComputedMember(left,ast.property.name)),self.lazyAssign(self.nonComputedMember(left,ast.property.name),"{}")),expression=self.nonComputedMember(left,ast.property.name),(self.state.expensiveChecks||isPossiblyDangerousMemberName(ast.property.name))&&(expression=self.ensureSafeObject(expression)),self.assign(intoId,expression),nameId&&(nameId.computed=!1,nameId.name=ast.property.name))},function(){self.assign(intoId,"undefined")}),recursionFn(intoId)},!!create);break;case AST.CallExpression:intoId=intoId||this.nextId(),ast.filter?(right=self.filter(ast.callee.name),args=[],forEach(ast.arguments,function(expr){var argument=self.nextId();self.recurse(expr,argument),args.push(argument)}),expression=right+"("+args.join(",")+")",self.assign(intoId,expression),recursionFn(intoId)):(right=self.nextId(),left={},args=[],self.recurse(ast.callee,right,left,function(){self.if_(self.notNull(right),function(){self.addEnsureSafeFunction(right),forEach(ast.arguments,function(expr){self.recurse(expr,self.nextId(),undefined,function(argument){args.push(self.ensureSafeObject(argument))})}),left.name?(self.state.expensiveChecks||self.addEnsureSafeObject(left.context),expression=self.member(left.context,left.name,left.computed)+"("+args.join(",")+")"):expression=right+"("+args.join(",")+")",expression=self.ensureSafeObject(expression),self.assign(intoId,expression)},function(){self.assign(intoId,"undefined")}),recursionFn(intoId)}));break;case AST.AssignmentExpression:if(right=this.nextId(),left={},!isAssignable(ast.left))throw $parseMinErr("lval","Trying to assign a value to a non l-value");this.recurse(ast.left,undefined,left,function(){self.if_(self.notNull(left.context),function(){self.recurse(ast.right,right),self.addEnsureSafeObject(self.member(left.context,left.name,left.computed)),self.addEnsureSafeAssignContext(left.context),expression=self.member(left.context,left.name,left.computed)+ast.operator+right,self.assign(intoId,expression),recursionFn(intoId||expression)})},1);break;case AST.ArrayExpression:args=[],forEach(ast.elements,function(expr){self.recurse(expr,self.nextId(),undefined,function(argument){args.push(argument)})}),expression="["+args.join(",")+"]",this.assign(intoId,expression),recursionFn(expression);break;case AST.ObjectExpression:args=[],forEach(ast.properties,function(property){self.recurse(property.value,self.nextId(),undefined,function(expr){args.push(self.escape(property.key.type===AST.Identifier?property.key.name:""+property.key.value)+":"+expr)})}),expression="{"+args.join(",")+"}",this.assign(intoId,expression),recursionFn(expression);break;case AST.ThisExpression:this.assign(intoId,"s"),recursionFn("s");break;case AST.NGValueParameter:this.assign(intoId,"v"),recursionFn("v")}},getHasOwnProperty:function(element,property){var key=element+"."+property,own=this.current().own;return own.hasOwnProperty(key)||(own[key]=this.nextId(!1,element+"&&("+this.escape(property)+" in "+element+")")),own[key]},assign:function(id,value){if(id)return this.current().body.push(id,"=",value,";"),id},filter:function(filterName){return this.state.filters.hasOwnProperty(filterName)||(this.state.filters[filterName]=this.nextId(!0)),this.state.filters[filterName]},ifDefined:function(id,defaultValue){return"ifDefined("+id+","+this.escape(defaultValue)+")"},plus:function(left,right){return"plus("+left+","+right+")"},return_:function(id){this.current().body.push("return ",id,";")},if_:function(test,alternate,consequent){if(test===!0)alternate();else{var body=this.current().body;body.push("if(",test,"){"),alternate(),body.push("}"),consequent&&(body.push("else{"),consequent(),body.push("}"))}},not:function(expression){return"!("+expression+")"},notNull:function(expression){return expression+"!=null"},nonComputedMember:function(left,right){return left+"."+right},computedMember:function(left,right){return left+"["+right+"]"},member:function(left,right,computed){return computed?this.computedMember(left,right):this.nonComputedMember(left,right)},addEnsureSafeObject:function(item){this.current().body.push(this.ensureSafeObject(item),";")},addEnsureSafeMemberName:function(item){this.current().body.push(this.ensureSafeMemberName(item),";")},addEnsureSafeFunction:function(item){this.current().body.push(this.ensureSafeFunction(item),";")},addEnsureSafeAssignContext:function(item){this.current().body.push(this.ensureSafeAssignContext(item),";")},ensureSafeObject:function(item){return"ensureSafeObject("+item+",text)"},ensureSafeMemberName:function(item){return"ensureSafeMemberName("+item+",text)"},ensureSafeFunction:function(item){return"ensureSafeFunction("+item+",text)"},getStringValue:function(item){this.assign(item,"getStringValue("+item+",text)")},ensureSafeAssignContext:function(item){return"ensureSafeAssignContext("+item+",text)"},lazyRecurse:function(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck){var self=this;return function(){self.recurse(ast,intoId,nameId,recursionFn,create,skipWatchIdCheck)}},lazyAssign:function(id,value){var self=this;return function(){self.assign(id,value)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(c){return"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)},escape:function(value){if(isString(value))return"'"+value.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(isNumber(value))return value.toString();if(value===!0)return"true";if(value===!1)return"false";if(null===value)return"null";if("undefined"==typeof value)return"undefined";throw $parseMinErr("esc","IMPOSSIBLE")},nextId:function(skip,init){var id="v"+this.state.nextId++;return skip||this.current().vars.push(id+(init?"="+init:"")),id},current:function(){return this.state[this.state.computing]}},ASTInterpreter.prototype={compile:function(expression,expensiveChecks){var self=this,ast=this.astBuilder.ast(expression);this.expression=expression,this.expensiveChecks=expensiveChecks,findConstantAndWatchExpressions(ast,self.$filter);var assignable,assign;(assignable=assignableAST(ast))&&(assign=this.recurse(assignable));var inputs,toWatch=getInputs(ast.body);toWatch&&(inputs=[],forEach(toWatch,function(watch,key){var input=self.recurse(watch);watch.input=input,inputs.push(input),watch.watchId=key}));var expressions=[];forEach(ast.body,function(expression){expressions.push(self.recurse(expression.expression))});var fn=0===ast.body.length?function(){}:1===ast.body.length?expressions[0]:function(scope,locals){var lastValue;return forEach(expressions,function(exp){lastValue=exp(scope,locals)}),lastValue};return assign&&(fn.assign=function(scope,value,locals){return assign(scope,locals,value)}),inputs&&(fn.inputs=inputs),fn.literal=isLiteral(ast),fn.constant=isConstant(ast),fn},recurse:function(ast,context,create){var left,right,args,self=this;if(ast.input)return this.inputs(ast.input,ast.watchId);switch(ast.type){case AST.Literal:return this.value(ast.value,context);case AST.UnaryExpression:return right=this.recurse(ast.argument),this["unary"+ast.operator](right,context);case AST.BinaryExpression:return left=this.recurse(ast.left),right=this.recurse(ast.right),this["binary"+ast.operator](left,right,context);case AST.LogicalExpression:return left=this.recurse(ast.left),right=this.recurse(ast.right),this["binary"+ast.operator](left,right,context);case AST.ConditionalExpression:return this["ternary?:"](this.recurse(ast.test),this.recurse(ast.alternate),this.recurse(ast.consequent),context);case AST.Identifier:return ensureSafeMemberName(ast.name,self.expression),self.identifier(ast.name,self.expensiveChecks||isPossiblyDangerousMemberName(ast.name),context,create,self.expression);case AST.MemberExpression:return left=this.recurse(ast.object,!1,!!create),ast.computed||(ensureSafeMemberName(ast.property.name,self.expression),right=ast.property.name),ast.computed&&(right=this.recurse(ast.property)),ast.computed?this.computedMember(left,right,context,create,self.expression):this.nonComputedMember(left,right,self.expensiveChecks,context,create,self.expression);case AST.CallExpression:return args=[],forEach(ast.arguments,function(expr){args.push(self.recurse(expr))}),ast.filter&&(right=this.$filter(ast.callee.name)),ast.filter||(right=this.recurse(ast.callee,!0)),ast.filter?function(scope,locals,assign,inputs){for(var values=[],i=0;i<args.length;++i)values.push(args[i](scope,locals,assign,inputs));var value=right.apply(undefined,values,inputs);return context?{context:undefined,name:undefined,value:value}:value}:function(scope,locals,assign,inputs){var value,rhs=right(scope,locals,assign,inputs);if(null!=rhs.value){ensureSafeObject(rhs.context,self.expression),ensureSafeFunction(rhs.value,self.expression);for(var values=[],i=0;i<args.length;++i)values.push(ensureSafeObject(args[i](scope,locals,assign,inputs),self.expression));value=ensureSafeObject(rhs.value.apply(rhs.context,values),self.expression)}return context?{value:value}:value};case AST.AssignmentExpression:return left=this.recurse(ast.left,!0,1),right=this.recurse(ast.right),function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs),rhs=right(scope,locals,assign,inputs);return ensureSafeObject(lhs.value,self.expression),ensureSafeAssignContext(lhs.context),lhs.context[lhs.name]=rhs,context?{value:rhs}:rhs};case AST.ArrayExpression:return args=[],forEach(ast.elements,function(expr){args.push(self.recurse(expr))}),function(scope,locals,assign,inputs){for(var value=[],i=0;i<args.length;++i)value.push(args[i](scope,locals,assign,inputs));return context?{value:value}:value};case AST.ObjectExpression:return args=[],forEach(ast.properties,function(property){args.push({key:property.key.type===AST.Identifier?property.key.name:""+property.key.value,value:self.recurse(property.value)})}),function(scope,locals,assign,inputs){for(var value={},i=0;i<args.length;++i)value[args[i].key]=args[i].value(scope,locals,assign,inputs);return context?{value:value}:value};case AST.ThisExpression:return function(scope){return context?{value:scope}:scope};case AST.NGValueParameter:return function(scope,locals,assign,inputs){return context?{value:assign}:assign}}},"unary+":function(argument,context){return function(scope,locals,assign,inputs){var arg=argument(scope,locals,assign,inputs);return arg=isDefined(arg)?+arg:0,context?{value:arg}:arg}},"unary-":function(argument,context){return function(scope,locals,assign,inputs){var arg=argument(scope,locals,assign,inputs);return arg=isDefined(arg)?-arg:0,context?{value:arg}:arg}},"unary!":function(argument,context){return function(scope,locals,assign,inputs){var arg=!argument(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary+":function(left,right,context){return function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs),rhs=right(scope,locals,assign,inputs),arg=plusFn(lhs,rhs);return context?{value:arg}:arg}},"binary-":function(left,right,context){return function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs),rhs=right(scope,locals,assign,inputs),arg=(isDefined(lhs)?lhs:0)-(isDefined(rhs)?rhs:0);return context?{value:arg}:arg}},"binary*":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)*right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary/":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)/right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary%":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)%right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary===":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)===right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary!==":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)!==right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary==":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)==right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary!=":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)!=right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary<":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)<right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary>":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)>right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary<=":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)<=right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary>=":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)>=right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary&&":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)&&right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"binary||":function(left,right,context){return function(scope,locals,assign,inputs){var arg=left(scope,locals,assign,inputs)||right(scope,locals,assign,inputs);return context?{value:arg}:arg}},"ternary?:":function(test,alternate,consequent,context){return function(scope,locals,assign,inputs){var arg=test(scope,locals,assign,inputs)?alternate(scope,locals,assign,inputs):consequent(scope,locals,assign,inputs);return context?{value:arg}:arg}},value:function(value,context){return function(){return context?{context:undefined,name:undefined,value:value}:value}},identifier:function(name,expensiveChecks,context,create,expression){return function(scope,locals,assign,inputs){var base=locals&&name in locals?locals:scope;create&&1!==create&&base&&!base[name]&&(base[name]={});var value=base?base[name]:undefined;return expensiveChecks&&ensureSafeObject(value,expression),context?{context:base,name:name,value:value}:value}},computedMember:function(left,right,context,create,expression){return function(scope,locals,assign,inputs){var rhs,value,lhs=left(scope,locals,assign,inputs);return null!=lhs&&(rhs=right(scope,locals,assign,inputs),rhs=getStringValue(rhs),ensureSafeMemberName(rhs,expression),create&&1!==create&&(ensureSafeAssignContext(lhs),lhs&&!lhs[rhs]&&(lhs[rhs]={})),value=lhs[rhs],ensureSafeObject(value,expression)),context?{context:lhs,name:rhs,value:value}:value}},nonComputedMember:function(left,right,expensiveChecks,context,create,expression){return function(scope,locals,assign,inputs){var lhs=left(scope,locals,assign,inputs);create&&1!==create&&(ensureSafeAssignContext(lhs),lhs&&!lhs[right]&&(lhs[right]={}));var value=null!=lhs?lhs[right]:undefined;return(expensiveChecks||isPossiblyDangerousMemberName(right))&&ensureSafeObject(value,expression),context?{context:lhs,name:right,value:value}:value}},inputs:function(input,watchId){return function(scope,value,locals,inputs){return inputs?inputs[watchId]:input(scope,value,locals)}}};var Parser=function(lexer,$filter,options){this.lexer=lexer,this.$filter=$filter,this.options=options,this.ast=new AST(this.lexer),this.astCompiler=options.csp?new ASTInterpreter(this.ast,$filter):new ASTCompiler(this.ast,$filter)};Parser.prototype={constructor:Parser,parse:function(text){return this.astCompiler.compile(text,this.options.expensiveChecks)}};var objectValueOf=Object.prototype.valueOf,$sceMinErr=minErr("$sce"),SCE_CONTEXTS={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},$compileMinErr=minErr("$compile"),urlParsingNode=document.createElement("a"),originUrl=urlResolve(window.location.href);$$CookieReader.$inject=["$document"],$FilterProvider.$inject=["$provide"];var MAX_DIGITS=22,DECIMAL_SEP=".",ZERO_CHAR="0";currencyFilter.$inject=["$locale"],numberFilter.$inject=["$locale"];var DATE_FORMATS={yyyy:dateGetter("FullYear",4),yy:dateGetter("FullYear",2,0,!0),y:dateGetter("FullYear",1),MMMM:dateStrGetter("Month"),MMM:dateStrGetter("Month",!0),MM:dateGetter("Month",2,1),M:dateGetter("Month",1,1),dd:dateGetter("Date",2),d:dateGetter("Date",1),HH:dateGetter("Hours",2),H:dateGetter("Hours",1),hh:dateGetter("Hours",2,-12),h:dateGetter("Hours",1,-12),mm:dateGetter("Minutes",2),m:dateGetter("Minutes",1),ss:dateGetter("Seconds",2),s:dateGetter("Seconds",1),sss:dateGetter("Milliseconds",3),EEEE:dateStrGetter("Day"),EEE:dateStrGetter("Day",!0),a:ampmGetter,Z:timeZoneGetter,ww:weekGetter(2),w:weekGetter(1),G:eraGetter,GG:eraGetter,GGG:eraGetter,GGGG:longEraGetter},DATE_FORMATS_SPLIT=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,NUMBER_STRING=/^\-?\d+$/;dateFilter.$inject=["$locale"];var lowercaseFilter=valueFn(lowercase),uppercaseFilter=valueFn(uppercase);orderByFilter.$inject=["$parse"];var htmlAnchorDirective=valueFn({restrict:"E",compile:function(element,attr){if(!attr.href&&!attr.xlinkHref)return function(scope,element){if("a"===element[0].nodeName.toLowerCase()){var href="[object SVGAnimatedString]"===toString.call(element.prop("href"))?"xlink:href":"href";element.on("click",function(event){element.attr(href)||event.preventDefault()})}}}}),ngAttributeAliasDirectives={};forEach(BOOLEAN_ATTR,function(propName,attrName){function defaultLinkFn(scope,element,attr){scope.$watch(attr[normalized],function(value){attr.$set(attrName,!!value)})}if("multiple"!=propName){var normalized=directiveNormalize("ng-"+attrName),linkFn=defaultLinkFn;"checked"===propName&&(linkFn=function(scope,element,attr){attr.ngModel!==attr[normalized]&&defaultLinkFn(scope,element,attr)}),ngAttributeAliasDirectives[normalized]=function(){return{restrict:"A",priority:100,link:linkFn}}}}),forEach(ALIASED_ATTR,function(htmlAttr,ngAttr){ngAttributeAliasDirectives[ngAttr]=function(){return{priority:100,link:function(scope,element,attr){if("ngPattern"===ngAttr&&"/"==attr.ngPattern.charAt(0)){var match=attr.ngPattern.match(REGEX_STRING_REGEXP);if(match)return void attr.$set("ngPattern",new RegExp(match[1],match[2]))}scope.$watch(attr[ngAttr],function(value){attr.$set(ngAttr,value)})}}}}),forEach(["src","srcset","href"],function(attrName){var normalized=directiveNormalize("ng-"+attrName);ngAttributeAliasDirectives[normalized]=function(){return{priority:99,link:function(scope,element,attr){var propName=attrName,name=attrName;"href"===attrName&&"[object SVGAnimatedString]"===toString.call(element.prop("href"))&&(name="xlinkHref",attr.$attr[name]="xlink:href",propName=null),attr.$observe(normalized,function(value){return value?(attr.$set(name,value),void(msie&&propName&&element.prop(propName,attr[name]))):void("href"===attrName&&attr.$set(name,null))})}}}});var nullFormCtrl={$addControl:noop,$$renameControl:nullFormRenameControl,$removeControl:noop,$setValidity:noop,$setDirty:noop,$setPristine:noop,$setSubmitted:noop},SUBMITTED_CLASS="ng-submitted";FormController.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var formDirectiveFactory=function(isNgForm){return["$timeout","$parse",function($timeout,$parse){function getSetter(expression){return""===expression?$parse('this[""]').assign:$parse(expression).assign||noop}var formDirective={name:"form",restrict:isNgForm?"EAC":"E",require:["form","^^?form"],controller:FormController,compile:function(formElement,attr){formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);var nameAttr=attr.name?"name":!(!isNgForm||!attr.ngForm)&&"ngForm";return{pre:function(scope,formElement,attr,ctrls){var controller=ctrls[0];if(!("action"in attr)){var handleFormSubmission=function(event){scope.$apply(function(){controller.$commitViewValue(),controller.$setSubmitted()}),event.preventDefault()};addEventListenerFn(formElement[0],"submit",handleFormSubmission),formElement.on("$destroy",function(){$timeout(function(){removeEventListenerFn(formElement[0],"submit",handleFormSubmission)},0,!1)})}var parentFormCtrl=ctrls[1]||controller.$$parentForm;parentFormCtrl.$addControl(controller);var setter=nameAttr?getSetter(controller.$name):noop;nameAttr&&(setter(scope,controller),attr.$observe(nameAttr,function(newValue){controller.$name!==newValue&&(setter(scope,undefined),controller.$$parentForm.$$renameControl(controller,newValue),(setter=getSetter(controller.$name))(scope,controller))})),formElement.on("$destroy",function(){controller.$$parentForm.$removeControl(controller),setter(scope,undefined),extend(controller,nullFormCtrl)})}}}};return formDirective}]},formDirective=formDirectiveFactory(),ngFormDirective=formDirectiveFactory(!0),ISO_DATE_REGEXP=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,URL_REGEXP=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,EMAIL_REGEXP=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,NUMBER_REGEXP=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,DATE_REGEXP=/^(\d{4})-(\d{2})-(\d{2})$/,DATETIMELOCAL_REGEXP=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,WEEK_REGEXP=/^(\d{4})-W(\d\d)$/,MONTH_REGEXP=/^(\d{4})-(\d\d)$/,TIME_REGEXP=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,PARTIAL_VALIDATION_EVENTS="keydown wheel mousedown",PARTIAL_VALIDATION_TYPES=createMap();forEach("date,datetime-local,month,time,week".split(","),function(type){PARTIAL_VALIDATION_TYPES[type]=!0});var inputType={text:textInputType,date:createDateInputType("date",DATE_REGEXP,createDateParser(DATE_REGEXP,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":createDateInputType("datetimelocal",DATETIMELOCAL_REGEXP,createDateParser(DATETIMELOCAL_REGEXP,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:createDateInputType("time",TIME_REGEXP,createDateParser(TIME_REGEXP,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:createDateInputType("week",WEEK_REGEXP,weekParser,"yyyy-Www"),month:createDateInputType("month",MONTH_REGEXP,createDateParser(MONTH_REGEXP,["yyyy","MM"]),"yyyy-MM"),number:numberInputType,url:urlInputType,email:emailInputType,radio:radioInputType,checkbox:checkboxInputType,hidden:noop,button:noop,submit:noop,reset:noop,file:noop},inputDirective=["$browser","$sniffer","$filter","$parse",function($browser,$sniffer,$filter,$parse){return{restrict:"E",require:["?ngModel"],link:{pre:function(scope,element,attr,ctrls){ctrls[0]&&(inputType[lowercase(attr.type)]||inputType.text)(scope,element,attr,ctrls[0],$sniffer,$browser,$filter,$parse)}}}}],CONSTANT_VALUE_REGEXP=/^(true|false|\d+)$/,ngValueDirective=function(){return{restrict:"A",priority:100,compile:function(tpl,tplAttr){return CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)?function(scope,elm,attr){attr.$set("value",scope.$eval(attr.ngValue))}:function(scope,elm,attr){scope.$watch(attr.ngValue,function(value){attr.$set("value",value)})}}}},ngBindDirective=["$compile",function($compile){return{restrict:"AC",compile:function(templateElement){return $compile.$$addBindingClass(templateElement),function(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBind),element=element[0],scope.$watch(attr.ngBind,function(value){element.textContent=isUndefined(value)?"":value})}}}}],ngBindTemplateDirective=["$interpolate","$compile",function($interpolate,$compile){return{compile:function(templateElement){return $compile.$$addBindingClass(templateElement),function(scope,element,attr){var interpolateFn=$interpolate(element.attr(attr.$attr.ngBindTemplate));
$compile.$$addBindingInfo(element,interpolateFn.expressions),element=element[0],attr.$observe("ngBindTemplate",function(value){element.textContent=isUndefined(value)?"":value})}}}}],ngBindHtmlDirective=["$sce","$parse","$compile",function($sce,$parse,$compile){return{restrict:"A",compile:function(tElement,tAttrs){var ngBindHtmlGetter=$parse(tAttrs.ngBindHtml),ngBindHtmlWatch=$parse(tAttrs.ngBindHtml,function(val){return $sce.valueOf(val)});return $compile.$$addBindingClass(tElement),function(scope,element,attr){$compile.$$addBindingInfo(element,attr.ngBindHtml),scope.$watch(ngBindHtmlWatch,function(){var value=ngBindHtmlGetter(scope);element.html($sce.getTrustedHtml(value)||"")})}}}}],ngChangeDirective=valueFn({restrict:"A",require:"ngModel",link:function(scope,element,attr,ctrl){ctrl.$viewChangeListeners.push(function(){scope.$eval(attr.ngChange)})}}),ngClassDirective=classDirective("",!0),ngClassOddDirective=classDirective("Odd",0),ngClassEvenDirective=classDirective("Even",1),ngCloakDirective=ngDirective({compile:function(element,attr){attr.$set("ngCloak",undefined),element.removeClass("ng-cloak")}}),ngControllerDirective=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ngEventDirectives={},forceAsyncEvents={blur:!0,focus:!0};forEach("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(eventName){var directiveName=directiveNormalize("ng-"+eventName);ngEventDirectives[directiveName]=["$parse","$rootScope",function($parse,$rootScope){return{restrict:"A",compile:function($element,attr){var fn=$parse(attr[directiveName],null,!0);return function(scope,element){element.on(eventName,function(event){var callback=function(){fn(scope,{$event:event})};forceAsyncEvents[eventName]&&$rootScope.$$phase?scope.$evalAsync(callback):scope.$apply(callback)})}}}}]});var ngIfDirective=["$animate",function($animate){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function($scope,$element,$attr,ctrl,$transclude){var block,childScope,previousElements;$scope.$watch($attr.ngIf,function(value){value?childScope||$transclude(function(clone,newScope){childScope=newScope,clone[clone.length++]=document.createComment(" end ngIf: "+$attr.ngIf+" "),block={clone:clone},$animate.enter(clone,$element.parent(),$element)}):(previousElements&&(previousElements.remove(),previousElements=null),childScope&&(childScope.$destroy(),childScope=null),block&&(previousElements=getBlockNodes(block.clone),$animate.leave(previousElements).then(function(){previousElements=null}),block=null))})}}}],ngIncludeDirective=["$templateRequest","$anchorScroll","$animate",function($templateRequest,$anchorScroll,$animate){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:angular.noop,compile:function(element,attr){var srcExp=attr.ngInclude||attr.src,onloadExp=attr.onload||"",autoScrollExp=attr.autoscroll;return function(scope,$element,$attr,ctrl,$transclude){var currentScope,previousElement,currentElement,changeCounter=0,cleanupLastIncludeContent=function(){previousElement&&(previousElement.remove(),previousElement=null),currentScope&&(currentScope.$destroy(),currentScope=null),currentElement&&($animate.leave(currentElement).then(function(){previousElement=null}),previousElement=currentElement,currentElement=null)};scope.$watch(srcExp,function(src){var afterAnimation=function(){!isDefined(autoScrollExp)||autoScrollExp&&!scope.$eval(autoScrollExp)||$anchorScroll()},thisChangeId=++changeCounter;src?($templateRequest(src,!0).then(function(response){if(!scope.$$destroyed&&thisChangeId===changeCounter){var newScope=scope.$new();ctrl.template=response;var clone=$transclude(newScope,function(clone){cleanupLastIncludeContent(),$animate.enter(clone,null,$element).then(afterAnimation)});currentScope=newScope,currentElement=clone,currentScope.$emit("$includeContentLoaded",src),scope.$eval(onloadExp)}},function(){scope.$$destroyed||thisChangeId===changeCounter&&(cleanupLastIncludeContent(),scope.$emit("$includeContentError",src))}),scope.$emit("$includeContentRequested",src)):(cleanupLastIncludeContent(),ctrl.template=null)})}}}}],ngIncludeFillContentDirective=["$compile",function($compile){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(scope,$element,$attr,ctrl){return/SVG/.test($element[0].toString())?($element.empty(),void $compile(jqLiteBuildFragment(ctrl.template,document).childNodes)(scope,function(clone){$element.append(clone)},{futureParentElement:$element})):($element.html(ctrl.template),void $compile($element.contents())(scope))}}}],ngInitDirective=ngDirective({priority:450,compile:function(){return{pre:function(scope,element,attrs){scope.$eval(attrs.ngInit)}}}}),ngListDirective=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(scope,element,attr,ctrl){var ngList=element.attr(attr.$attr.ngList)||", ",trimValues="false"!==attr.ngTrim,separator=trimValues?trim(ngList):ngList,parse=function(viewValue){if(!isUndefined(viewValue)){var list=[];return viewValue&&forEach(viewValue.split(separator),function(value){value&&list.push(trimValues?trim(value):value)}),list}};ctrl.$parsers.push(parse),ctrl.$formatters.push(function(value){return isArray(value)?value.join(ngList):undefined}),ctrl.$isEmpty=function(value){return!value||!value.length}}}},VALID_CLASS="ng-valid",INVALID_CLASS="ng-invalid",PRISTINE_CLASS="ng-pristine",DIRTY_CLASS="ng-dirty",UNTOUCHED_CLASS="ng-untouched",TOUCHED_CLASS="ng-touched",PENDING_CLASS="ng-pending",ngModelMinErr=minErr("ngModel"),NgModelController=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function($scope,$exceptionHandler,$attr,$element,$parse,$animate,$timeout,$rootScope,$q,$interpolate){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=undefined,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=undefined,this.$name=$interpolate($attr.name||"",!1)($scope),this.$$parentForm=nullFormCtrl;var parserValid,parsedNgModel=$parse($attr.ngModel),parsedNgModelAssign=parsedNgModel.assign,ngModelGet=parsedNgModel,ngModelSet=parsedNgModelAssign,pendingDebounce=null,ctrl=this;this.$$setOptions=function(options){if(ctrl.$options=options,options&&options.getterSetter){var invokeModelGetter=$parse($attr.ngModel+"()"),invokeModelSetter=$parse($attr.ngModel+"($$$p)");ngModelGet=function($scope){var modelValue=parsedNgModel($scope);return isFunction(modelValue)&&(modelValue=invokeModelGetter($scope)),modelValue},ngModelSet=function($scope,newValue){isFunction(parsedNgModel($scope))?invokeModelSetter($scope,{$$$p:ctrl.$modelValue}):parsedNgModelAssign($scope,ctrl.$modelValue)}}else if(!parsedNgModel.assign)throw ngModelMinErr("nonassign","Expression '{0}' is non-assignable. Element: {1}",$attr.ngModel,startingTag($element))},this.$render=noop,this.$isEmpty=function(value){return isUndefined(value)||""===value||null===value||value!==value};var currentValidationRunId=0;addSetValidityMethod({ctrl:this,$element:$element,set:function(object,property){object[property]=!0},unset:function(object,property){delete object[property]},$animate:$animate}),this.$setPristine=function(){ctrl.$dirty=!1,ctrl.$pristine=!0,$animate.removeClass($element,DIRTY_CLASS),$animate.addClass($element,PRISTINE_CLASS)},this.$setDirty=function(){ctrl.$dirty=!0,ctrl.$pristine=!1,$animate.removeClass($element,PRISTINE_CLASS),$animate.addClass($element,DIRTY_CLASS),ctrl.$$parentForm.$setDirty()},this.$setUntouched=function(){ctrl.$touched=!1,ctrl.$untouched=!0,$animate.setClass($element,UNTOUCHED_CLASS,TOUCHED_CLASS)},this.$setTouched=function(){ctrl.$touched=!0,ctrl.$untouched=!1,$animate.setClass($element,TOUCHED_CLASS,UNTOUCHED_CLASS)},this.$rollbackViewValue=function(){$timeout.cancel(pendingDebounce),ctrl.$viewValue=ctrl.$$lastCommittedViewValue,ctrl.$render()},this.$validate=function(){if(!isNumber(ctrl.$modelValue)||!isNaN(ctrl.$modelValue)){var viewValue=ctrl.$$lastCommittedViewValue,modelValue=ctrl.$$rawModelValue,prevValid=ctrl.$valid,prevModelValue=ctrl.$modelValue,allowInvalid=ctrl.$options&&ctrl.$options.allowInvalid;ctrl.$$runValidators(modelValue,viewValue,function(allValid){allowInvalid||prevValid===allValid||(ctrl.$modelValue=allValid?modelValue:undefined,ctrl.$modelValue!==prevModelValue&&ctrl.$$writeModelToScope())})}},this.$$runValidators=function(modelValue,viewValue,doneCallback){function processParseErrors(){var errorKey=ctrl.$$parserName||"parse";return isUndefined(parserValid)?(setValidity(errorKey,null),!0):(parserValid||(forEach(ctrl.$validators,function(v,name){setValidity(name,null)}),forEach(ctrl.$asyncValidators,function(v,name){setValidity(name,null)})),setValidity(errorKey,parserValid),parserValid)}function processSyncValidators(){var syncValidatorsValid=!0;return forEach(ctrl.$validators,function(validator,name){var result=validator(modelValue,viewValue);syncValidatorsValid=syncValidatorsValid&&result,setValidity(name,result)}),!!syncValidatorsValid||(forEach(ctrl.$asyncValidators,function(v,name){setValidity(name,null)}),!1)}function processAsyncValidators(){var validatorPromises=[],allValid=!0;forEach(ctrl.$asyncValidators,function(validator,name){var promise=validator(modelValue,viewValue);if(!isPromiseLike(promise))throw ngModelMinErr("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",promise);setValidity(name,undefined),validatorPromises.push(promise.then(function(){setValidity(name,!0)},function(error){allValid=!1,setValidity(name,!1)}))}),validatorPromises.length?$q.all(validatorPromises).then(function(){validationDone(allValid)},noop):validationDone(!0)}function setValidity(name,isValid){localValidationRunId===currentValidationRunId&&ctrl.$setValidity(name,isValid)}function validationDone(allValid){localValidationRunId===currentValidationRunId&&doneCallback(allValid)}currentValidationRunId++;var localValidationRunId=currentValidationRunId;return processParseErrors()&&processSyncValidators()?void processAsyncValidators():void validationDone(!1)},this.$commitViewValue=function(){var viewValue=ctrl.$viewValue;$timeout.cancel(pendingDebounce),(ctrl.$$lastCommittedViewValue!==viewValue||""===viewValue&&ctrl.$$hasNativeValidators)&&(ctrl.$$lastCommittedViewValue=viewValue,ctrl.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function writeToModelIfNeeded(){ctrl.$modelValue!==prevModelValue&&ctrl.$$writeModelToScope()}var viewValue=ctrl.$$lastCommittedViewValue,modelValue=viewValue;if(parserValid=!isUndefined(modelValue)||undefined)for(var i=0;i<ctrl.$parsers.length;i++)if(modelValue=ctrl.$parsers[i](modelValue),isUndefined(modelValue)){parserValid=!1;break}isNumber(ctrl.$modelValue)&&isNaN(ctrl.$modelValue)&&(ctrl.$modelValue=ngModelGet($scope));var prevModelValue=ctrl.$modelValue,allowInvalid=ctrl.$options&&ctrl.$options.allowInvalid;ctrl.$$rawModelValue=modelValue,allowInvalid&&(ctrl.$modelValue=modelValue,writeToModelIfNeeded()),ctrl.$$runValidators(modelValue,ctrl.$$lastCommittedViewValue,function(allValid){allowInvalid||(ctrl.$modelValue=allValid?modelValue:undefined,writeToModelIfNeeded())})},this.$$writeModelToScope=function(){ngModelSet($scope,ctrl.$modelValue),forEach(ctrl.$viewChangeListeners,function(listener){try{listener()}catch(e){$exceptionHandler(e)}})},this.$setViewValue=function(value,trigger){ctrl.$viewValue=value,ctrl.$options&&!ctrl.$options.updateOnDefault||ctrl.$$debounceViewValueCommit(trigger)},this.$$debounceViewValueCommit=function(trigger){var debounce,debounceDelay=0,options=ctrl.$options;options&&isDefined(options.debounce)&&(debounce=options.debounce,isNumber(debounce)?debounceDelay=debounce:isNumber(debounce[trigger])?debounceDelay=debounce[trigger]:isNumber(debounce["default"])&&(debounceDelay=debounce["default"])),$timeout.cancel(pendingDebounce),debounceDelay?pendingDebounce=$timeout(function(){ctrl.$commitViewValue()},debounceDelay):$rootScope.$$phase?ctrl.$commitViewValue():$scope.$apply(function(){ctrl.$commitViewValue()})},$scope.$watch(function(){var modelValue=ngModelGet($scope);if(modelValue!==ctrl.$modelValue&&(ctrl.$modelValue===ctrl.$modelValue||modelValue===modelValue)){ctrl.$modelValue=ctrl.$$rawModelValue=modelValue,parserValid=undefined;for(var formatters=ctrl.$formatters,idx=formatters.length,viewValue=modelValue;idx--;)viewValue=formatters[idx](viewValue);ctrl.$viewValue!==viewValue&&(ctrl.$viewValue=ctrl.$$lastCommittedViewValue=viewValue,ctrl.$render(),ctrl.$$runValidators(modelValue,viewValue,noop))}return modelValue})}],ngModelDirective=["$rootScope",function($rootScope){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:NgModelController,priority:1,compile:function(element){return element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS),{pre:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0],formCtrl=ctrls[1]||modelCtrl.$$parentForm;modelCtrl.$$setOptions(ctrls[2]&&ctrls[2].$options),formCtrl.$addControl(modelCtrl),attr.$observe("name",function(newValue){modelCtrl.$name!==newValue&&modelCtrl.$$parentForm.$$renameControl(modelCtrl,newValue)}),scope.$on("$destroy",function(){modelCtrl.$$parentForm.$removeControl(modelCtrl)})},post:function(scope,element,attr,ctrls){var modelCtrl=ctrls[0];modelCtrl.$options&&modelCtrl.$options.updateOn&&element.on(modelCtrl.$options.updateOn,function(ev){modelCtrl.$$debounceViewValueCommit(ev&&ev.type)}),element.on("blur",function(ev){modelCtrl.$touched||($rootScope.$$phase?scope.$evalAsync(modelCtrl.$setTouched):scope.$apply(modelCtrl.$setTouched))})}}}}}],DEFAULT_REGEXP=/(\s+|^)default(\s+|$)/,ngModelOptionsDirective=function(){return{restrict:"A",controller:["$scope","$attrs",function($scope,$attrs){var that=this;this.$options=copy($scope.$eval($attrs.ngModelOptions)),isDefined(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=trim(this.$options.updateOn.replace(DEFAULT_REGEXP,function(){return that.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ngNonBindableDirective=ngDirective({terminal:!0,priority:1e3}),ngOptionsMinErr=minErr("ngOptions"),NG_OPTIONS_REGEXP=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,ngOptionsDirective=["$compile","$parse",function($compile,$parse){function parseOptionsExpression(optionsExp,selectElement,scope){function Option(selectValue,viewValue,label,group,disabled){this.selectValue=selectValue,this.viewValue=viewValue,this.label=label,this.group=group,this.disabled=disabled}function getOptionValuesKeys(optionValues){var optionValuesKeys;if(!keyName&&isArrayLike(optionValues))optionValuesKeys=optionValues;else{optionValuesKeys=[];for(var itemKey in optionValues)optionValues.hasOwnProperty(itemKey)&&"$"!==itemKey.charAt(0)&&optionValuesKeys.push(itemKey)}return optionValuesKeys}var match=optionsExp.match(NG_OPTIONS_REGEXP);if(!match)throw ngOptionsMinErr("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",optionsExp,startingTag(selectElement));var valueName=match[5]||match[7],keyName=match[6],selectAs=/ as /.test(match[0])&&match[1],trackBy=match[9],valueFn=$parse(match[2]?match[1]:valueName),selectAsFn=selectAs&&$parse(selectAs),viewValueFn=selectAsFn||valueFn,trackByFn=trackBy&&$parse(trackBy),getTrackByValueFn=trackBy?function(value,locals){return trackByFn(scope,locals)}:function(value){return hashKey(value)},getTrackByValue=function(value,key){return getTrackByValueFn(value,getLocals(value,key))},displayFn=$parse(match[2]||match[1]),groupByFn=$parse(match[3]||""),disableWhenFn=$parse(match[4]||""),valuesFn=$parse(match[8]),locals={},getLocals=keyName?function(value,key){return locals[keyName]=key,locals[valueName]=value,locals}:function(value){return locals[valueName]=value,locals};return{trackBy:trackBy,getTrackByValue:getTrackByValue,getWatchables:$parse(valuesFn,function(optionValues){var watchedArray=[];optionValues=optionValues||[];for(var optionValuesKeys=getOptionValuesKeys(optionValues),optionValuesLength=optionValuesKeys.length,index=0;index<optionValuesLength;index++){var key=optionValues===optionValuesKeys?index:optionValuesKeys[index],locals=(optionValues[key],getLocals(optionValues[key],key)),selectValue=getTrackByValueFn(optionValues[key],locals);if(watchedArray.push(selectValue),match[2]||match[1]){var label=displayFn(scope,locals);watchedArray.push(label)}if(match[4]){var disableWhen=disableWhenFn(scope,locals);watchedArray.push(disableWhen)}}return watchedArray}),getOptions:function(){for(var optionItems=[],selectValueMap={},optionValues=valuesFn(scope)||[],optionValuesKeys=getOptionValuesKeys(optionValues),optionValuesLength=optionValuesKeys.length,index=0;index<optionValuesLength;index++){var key=optionValues===optionValuesKeys?index:optionValuesKeys[index],value=optionValues[key],locals=getLocals(value,key),viewValue=viewValueFn(scope,locals),selectValue=getTrackByValueFn(viewValue,locals),label=displayFn(scope,locals),group=groupByFn(scope,locals),disabled=disableWhenFn(scope,locals),optionItem=new Option(selectValue,viewValue,label,group,disabled);optionItems.push(optionItem),selectValueMap[selectValue]=optionItem}return{items:optionItems,selectValueMap:selectValueMap,getOptionFromViewValue:function(value){return selectValueMap[getTrackByValue(value)]},getViewValueFromOption:function(option){return trackBy?angular.copy(option.viewValue):option.viewValue}}}}}function ngOptionsPostLink(scope,selectElement,attr,ctrls){function updateOptionElement(option,element){option.element=element,element.disabled=option.disabled,option.label!==element.label&&(element.label=option.label,element.textContent=option.label),option.value!==element.value&&(element.value=option.selectValue)}function addOrReuseElement(parent,current,type,templateElement){var element;return current&&lowercase(current.nodeName)===type?element=current:(element=templateElement.cloneNode(!1),current?parent.insertBefore(element,current):parent.appendChild(element)),element}function removeExcessElements(current){for(var next;current;)next=current.nextSibling,jqLiteRemove(current),current=next}function skipEmptyAndUnknownOptions(current){var emptyOption_=emptyOption&&emptyOption[0],unknownOption_=unknownOption&&unknownOption[0];if(emptyOption_||unknownOption_)for(;current&&(current===emptyOption_||current===unknownOption_||current.nodeType===NODE_TYPE_COMMENT||"option"===nodeName_(current)&&""===current.value);)current=current.nextSibling;return current}function updateOptions(){var previousValue=options&&selectCtrl.readValue();options=ngOptions.getOptions();var groupMap={},currentElement=selectElement[0].firstChild;if(providedEmptyOption&&selectElement.prepend(emptyOption),currentElement=skipEmptyAndUnknownOptions(currentElement),options.items.forEach(function(option){var group,groupElement,optionElement;option.group?(group=groupMap[option.group],group||(groupElement=addOrReuseElement(selectElement[0],currentElement,"optgroup",optGroupTemplate),currentElement=groupElement.nextSibling,groupElement.label=option.group,group=groupMap[option.group]={groupElement:groupElement,currentOptionElement:groupElement.firstChild}),optionElement=addOrReuseElement(group.groupElement,group.currentOptionElement,"option",optionTemplate),updateOptionElement(option,optionElement),group.currentOptionElement=optionElement.nextSibling):(optionElement=addOrReuseElement(selectElement[0],currentElement,"option",optionTemplate),updateOptionElement(option,optionElement),currentElement=optionElement.nextSibling)}),Object.keys(groupMap).forEach(function(key){removeExcessElements(groupMap[key].currentOptionElement)}),removeExcessElements(currentElement),ngModelCtrl.$render(),!ngModelCtrl.$isEmpty(previousValue)){var nextValue=selectCtrl.readValue(),isNotPrimitive=ngOptions.trackBy||multiple;(isNotPrimitive?equals(previousValue,nextValue):previousValue===nextValue)||(ngModelCtrl.$setViewValue(nextValue),ngModelCtrl.$render())}}var ngModelCtrl=ctrls[1];if(ngModelCtrl){for(var emptyOption,selectCtrl=ctrls[0],multiple=attr.multiple,i=0,children=selectElement.children(),ii=children.length;i<ii;i++)if(""===children[i].value){emptyOption=children.eq(i);break}var providedEmptyOption=!!emptyOption,unknownOption=jqLite(optionTemplate.cloneNode(!1));unknownOption.val("?");var options,ngOptions=parseOptionsExpression(attr.ngOptions,selectElement,scope),renderEmptyOption=function(){providedEmptyOption||selectElement.prepend(emptyOption),selectElement.val(""),emptyOption.prop("selected",!0),emptyOption.attr("selected",!0)},removeEmptyOption=function(){providedEmptyOption||emptyOption.remove()},renderUnknownOption=function(){selectElement.prepend(unknownOption),selectElement.val("?"),unknownOption.prop("selected",!0),unknownOption.attr("selected",!0)},removeUnknownOption=function(){unknownOption.remove()};multiple?(ngModelCtrl.$isEmpty=function(value){return!value||0===value.length},selectCtrl.writeValue=function(value){options.items.forEach(function(option){option.element.selected=!1}),value&&value.forEach(function(item){var option=options.getOptionFromViewValue(item);option&&!option.disabled&&(option.element.selected=!0)})},selectCtrl.readValue=function(){var selectedValues=selectElement.val()||[],selections=[];return forEach(selectedValues,function(value){var option=options.selectValueMap[value];option&&!option.disabled&&selections.push(options.getViewValueFromOption(option))}),selections},ngOptions.trackBy&&scope.$watchCollection(function(){if(isArray(ngModelCtrl.$viewValue))return ngModelCtrl.$viewValue.map(function(value){return ngOptions.getTrackByValue(value)})},function(){ngModelCtrl.$render()})):(selectCtrl.writeValue=function(value){var option=options.getOptionFromViewValue(value);option&&!option.disabled?(selectElement[0].value!==option.selectValue&&(removeUnknownOption(),removeEmptyOption(),selectElement[0].value=option.selectValue,option.element.selected=!0),option.element.setAttribute("selected","selected")):null===value||providedEmptyOption?(removeUnknownOption(),renderEmptyOption()):(removeEmptyOption(),renderUnknownOption())},selectCtrl.readValue=function(){var selectedOption=options.selectValueMap[selectElement.val()];return selectedOption&&!selectedOption.disabled?(removeEmptyOption(),removeUnknownOption(),options.getViewValueFromOption(selectedOption)):null},ngOptions.trackBy&&scope.$watch(function(){return ngOptions.getTrackByValue(ngModelCtrl.$viewValue)},function(){ngModelCtrl.$render()})),providedEmptyOption?(emptyOption.remove(),$compile(emptyOption)(scope),emptyOption.removeClass("ng-scope")):emptyOption=jqLite(optionTemplate.cloneNode(!1)),updateOptions(),scope.$watchCollection(ngOptions.getWatchables,updateOptions)}}var optionTemplate=document.createElement("option"),optGroupTemplate=document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:{pre:function(scope,selectElement,attr,ctrls){ctrls[0].registerOption=noop},post:ngOptionsPostLink}}}],ngPluralizeDirective=["$locale","$interpolate","$log",function($locale,$interpolate,$log){var BRACE=/{}/g,IS_WHEN=/^when(Minus)?(.+)$/;return{link:function(scope,element,attr){function updateElementText(newText){element.text(newText||"")}var lastCount,numberExp=attr.count,whenExp=attr.$attr.when&&element.attr(attr.$attr.when),offset=attr.offset||0,whens=scope.$eval(whenExp)||{},whensExpFns={},startSymbol=$interpolate.startSymbol(),endSymbol=$interpolate.endSymbol(),braceReplacement=startSymbol+numberExp+"-"+offset+endSymbol,watchRemover=angular.noop;forEach(attr,function(expression,attributeName){var tmpMatch=IS_WHEN.exec(attributeName);if(tmpMatch){var whenKey=(tmpMatch[1]?"-":"")+lowercase(tmpMatch[2]);whens[whenKey]=element.attr(attr.$attr[attributeName])}}),forEach(whens,function(expression,key){whensExpFns[key]=$interpolate(expression.replace(BRACE,braceReplacement))}),scope.$watch(numberExp,function(newVal){var count=parseFloat(newVal),countIsNaN=isNaN(count);if(countIsNaN||count in whens||(count=$locale.pluralCat(count-offset)),count!==lastCount&&!(countIsNaN&&isNumber(lastCount)&&isNaN(lastCount))){watchRemover();var whenExpFn=whensExpFns[count];isUndefined(whenExpFn)?(null!=newVal&&$log.debug("ngPluralize: no rule defined for '"+count+"' in "+whenExp),watchRemover=noop,updateElementText()):watchRemover=scope.$watch(whenExpFn,updateElementText),lastCount=count}})}}}],ngRepeatDirective=["$parse","$animate",function($parse,$animate){var NG_REMOVED="$$NG_REMOVED",ngRepeatMinErr=minErr("ngRepeat"),updateScope=function(scope,index,valueIdentifier,value,keyIdentifier,key,arrayLength){scope[valueIdentifier]=value,keyIdentifier&&(scope[keyIdentifier]=key),scope.$index=index,scope.$first=0===index,scope.$last=index===arrayLength-1,scope.$middle=!(scope.$first||scope.$last),scope.$odd=!(scope.$even=0===(1&index))},getBlockStart=function(block){return block.clone[0]},getBlockEnd=function(block){return block.clone[block.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function($element,$attr){var expression=$attr.ngRepeat,ngRepeatEndComment=document.createComment(" end ngRepeat: "+expression+" "),match=expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!match)throw ngRepeatMinErr("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",expression);var lhs=match[1],rhs=match[2],aliasAs=match[3],trackByExp=match[4];if(match=lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!match)throw ngRepeatMinErr("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",lhs);var valueIdentifier=match[3]||match[1],keyIdentifier=match[2];if(aliasAs&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs)))throw ngRepeatMinErr("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",aliasAs);var trackByExpGetter,trackByIdExpFn,trackByIdArrayFn,trackByIdObjFn,hashFnLocals={$id:hashKey};return trackByExp?trackByExpGetter=$parse(trackByExp):(trackByIdArrayFn=function(key,value){return hashKey(value)},trackByIdObjFn=function(key){return key}),function($scope,$element,$attr,ctrl,$transclude){trackByExpGetter&&(trackByIdExpFn=function(key,value,index){return keyIdentifier&&(hashFnLocals[keyIdentifier]=key),hashFnLocals[valueIdentifier]=value,hashFnLocals.$index=index,trackByExpGetter($scope,hashFnLocals)});var lastBlockMap=createMap();$scope.$watchCollection(rhs,function(collection){var index,length,nextNode,collectionLength,key,value,trackById,trackByIdFn,collectionKeys,block,nextBlockOrder,elementsToRemove,previousNode=$element[0],nextBlockMap=createMap();if(aliasAs&&($scope[aliasAs]=collection),isArrayLike(collection))collectionKeys=collection,trackByIdFn=trackByIdExpFn||trackByIdArrayFn;else{trackByIdFn=trackByIdExpFn||trackByIdObjFn,collectionKeys=[];for(var itemKey in collection)hasOwnProperty.call(collection,itemKey)&&"$"!==itemKey.charAt(0)&&collectionKeys.push(itemKey)}for(collectionLength=collectionKeys.length,nextBlockOrder=new Array(collectionLength),index=0;index<collectionLength;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],trackById=trackByIdFn(key,value,index),lastBlockMap[trackById])block=lastBlockMap[trackById],delete lastBlockMap[trackById],nextBlockMap[trackById]=block,nextBlockOrder[index]=block;else{if(nextBlockMap[trackById])throw forEach(nextBlockOrder,function(block){block&&block.scope&&(lastBlockMap[block.id]=block)}),ngRepeatMinErr("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",expression,trackById,value);nextBlockOrder[index]={id:trackById,scope:undefined,clone:undefined},nextBlockMap[trackById]=!0}for(var blockKey in lastBlockMap){if(block=lastBlockMap[blockKey],elementsToRemove=getBlockNodes(block.clone),$animate.leave(elementsToRemove),elementsToRemove[0].parentNode)for(index=0,length=elementsToRemove.length;index<length;index++)elementsToRemove[index][NG_REMOVED]=!0;block.scope.$destroy()}for(index=0;index<collectionLength;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],block=nextBlockOrder[index],block.scope){nextNode=previousNode;do nextNode=nextNode.nextSibling;while(nextNode&&nextNode[NG_REMOVED]);getBlockStart(block)!=nextNode&&$animate.move(getBlockNodes(block.clone),null,previousNode),previousNode=getBlockEnd(block),updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength)}else $transclude(function(clone,scope){block.scope=scope;var endNode=ngRepeatEndComment.cloneNode(!1);clone[clone.length++]=endNode,$animate.enter(clone,null,previousNode),previousNode=endNode,block.clone=clone,nextBlockMap[block.id]=block,updateScope(block.scope,index,valueIdentifier,value,keyIdentifier,key,collectionLength)});lastBlockMap=nextBlockMap})}}}}],NG_HIDE_CLASS="ng-hide",NG_HIDE_IN_PROGRESS_CLASS="ng-hide-animate",ngShowDirective=["$animate",function($animate){return{restrict:"A",multiElement:!0,link:function(scope,element,attr){scope.$watch(attr.ngShow,function(value){$animate[value?"removeClass":"addClass"](element,NG_HIDE_CLASS,{tempClasses:NG_HIDE_IN_PROGRESS_CLASS})})}}}],ngHideDirective=["$animate",function($animate){return{restrict:"A",multiElement:!0,link:function(scope,element,attr){scope.$watch(attr.ngHide,function(value){$animate[value?"addClass":"removeClass"](element,NG_HIDE_CLASS,{tempClasses:NG_HIDE_IN_PROGRESS_CLASS})})}}}],ngStyleDirective=ngDirective(function(scope,element,attr){scope.$watch(attr.ngStyle,function(newStyles,oldStyles){oldStyles&&newStyles!==oldStyles&&forEach(oldStyles,function(val,style){element.css(style,"")}),newStyles&&element.css(newStyles)},!0)}),ngSwitchDirective=["$animate",function($animate){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(scope,element,attr,ngSwitchController){var watchExpr=attr.ngSwitch||attr.on,selectedTranscludes=[],selectedElements=[],previousLeaveAnimations=[],selectedScopes=[],spliceFactory=function(array,index){return function(){array.splice(index,1)}};scope.$watch(watchExpr,function(value){var i,ii;for(i=0,ii=previousLeaveAnimations.length;i<ii;++i)$animate.cancel(previousLeaveAnimations[i]);for(previousLeaveAnimations.length=0,i=0,ii=selectedScopes.length;i<ii;++i){var selected=getBlockNodes(selectedElements[i].clone);selectedScopes[i].$destroy();var promise=previousLeaveAnimations[i]=$animate.leave(selected);promise.then(spliceFactory(previousLeaveAnimations,i))}selectedElements.length=0,selectedScopes.length=0,(selectedTranscludes=ngSwitchController.cases["!"+value]||ngSwitchController.cases["?"])&&forEach(selectedTranscludes,function(selectedTransclude){selectedTransclude.transclude(function(caseElement,selectedScope){selectedScopes.push(selectedScope);var anchor=selectedTransclude.element;caseElement[caseElement.length++]=document.createComment(" end ngSwitchWhen: ");var block={clone:caseElement};selectedElements.push(block),$animate.enter(caseElement,anchor.parent(),anchor)})})})}}}],ngSwitchWhenDirective=ngDirective({transclude:"element",priority:1200,require:"^ngSwitch",
multiElement:!0,link:function(scope,element,attrs,ctrl,$transclude){ctrl.cases["!"+attrs.ngSwitchWhen]=ctrl.cases["!"+attrs.ngSwitchWhen]||[],ctrl.cases["!"+attrs.ngSwitchWhen].push({transclude:$transclude,element:element})}}),ngSwitchDefaultDirective=ngDirective({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(scope,element,attr,ctrl,$transclude){ctrl.cases["?"]=ctrl.cases["?"]||[],ctrl.cases["?"].push({transclude:$transclude,element:element})}}),ngTranscludeDirective=ngDirective({restrict:"EAC",link:function($scope,$element,$attrs,controller,$transclude){if(!$transclude)throw minErr("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",startingTag($element));$transclude(function(clone){$element.empty(),$element.append(clone)})}}),scriptDirective=["$templateCache",function($templateCache){return{restrict:"E",terminal:!0,compile:function(element,attr){if("text/ng-template"==attr.type){var templateUrl=attr.id,text=element[0].text;$templateCache.put(templateUrl,text)}}}}],noopNgModelController={$setViewValue:noop,$render:noop},SelectController=["$element","$scope","$attrs",function($element,$scope,$attrs){var self=this,optionsMap=new HashMap;self.ngModelCtrl=noopNgModelController,self.unknownOption=jqLite(document.createElement("option")),self.renderUnknownOption=function(val){var unknownVal="? "+hashKey(val)+" ?";self.unknownOption.val(unknownVal),$element.prepend(self.unknownOption),$element.val(unknownVal)},$scope.$on("$destroy",function(){self.renderUnknownOption=noop}),self.removeUnknownOption=function(){self.unknownOption.parent()&&self.unknownOption.remove()},self.readValue=function(){return self.removeUnknownOption(),$element.val()},self.writeValue=function(value){self.hasOption(value)?(self.removeUnknownOption(),$element.val(value),""===value&&self.emptyOption.prop("selected",!0)):null==value&&self.emptyOption?(self.removeUnknownOption(),$element.val("")):self.renderUnknownOption(value)},self.addOption=function(value,element){if(element[0].nodeType!==NODE_TYPE_COMMENT){assertNotHasOwnProperty(value,'"option value"'),""===value&&(self.emptyOption=element);var count=optionsMap.get(value)||0;optionsMap.put(value,count+1),self.ngModelCtrl.$render(),chromeHack(element)}},self.removeOption=function(value){var count=optionsMap.get(value);count&&(1===count?(optionsMap.remove(value),""===value&&(self.emptyOption=undefined)):optionsMap.put(value,count-1))},self.hasOption=function(value){return!!optionsMap.get(value)},self.registerOption=function(optionScope,optionElement,optionAttrs,interpolateValueFn,interpolateTextFn){if(interpolateValueFn){var oldVal;optionAttrs.$observe("value",function(newVal){isDefined(oldVal)&&self.removeOption(oldVal),oldVal=newVal,self.addOption(newVal,optionElement)})}else interpolateTextFn?optionScope.$watch(interpolateTextFn,function(newVal,oldVal){optionAttrs.$set("value",newVal),oldVal!==newVal&&self.removeOption(oldVal),self.addOption(newVal,optionElement)}):self.addOption(optionAttrs.value,optionElement);optionElement.on("$destroy",function(){self.removeOption(optionAttrs.value),self.ngModelCtrl.$render()})}}],selectDirective=function(){function selectPreLink(scope,element,attr,ctrls){var ngModelCtrl=ctrls[1];if(ngModelCtrl){var selectCtrl=ctrls[0];if(selectCtrl.ngModelCtrl=ngModelCtrl,element.on("change",function(){scope.$apply(function(){ngModelCtrl.$setViewValue(selectCtrl.readValue())})}),attr.multiple){selectCtrl.readValue=function(){var array=[];return forEach(element.find("option"),function(option){option.selected&&array.push(option.value)}),array},selectCtrl.writeValue=function(value){var items=new HashMap(value);forEach(element.find("option"),function(option){option.selected=isDefined(items.get(option.value))})};var lastView,lastViewRef=NaN;scope.$watch(function(){lastViewRef!==ngModelCtrl.$viewValue||equals(lastView,ngModelCtrl.$viewValue)||(lastView=shallowCopy(ngModelCtrl.$viewValue),ngModelCtrl.$render()),lastViewRef=ngModelCtrl.$viewValue}),ngModelCtrl.$isEmpty=function(value){return!value||0===value.length}}}}function selectPostLink(scope,element,attrs,ctrls){var ngModelCtrl=ctrls[1];if(ngModelCtrl){var selectCtrl=ctrls[0];ngModelCtrl.$render=function(){selectCtrl.writeValue(ngModelCtrl.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:SelectController,priority:1,link:{pre:selectPreLink,post:selectPostLink}}},optionDirective=["$interpolate",function($interpolate){return{restrict:"E",priority:100,compile:function(element,attr){if(isDefined(attr.value))var interpolateValueFn=$interpolate(attr.value,!0);else{var interpolateTextFn=$interpolate(element.text(),!0);interpolateTextFn||attr.$set("value",element.text())}return function(scope,element,attr){var selectCtrlName="$selectController",parent=element.parent(),selectCtrl=parent.data(selectCtrlName)||parent.parent().data(selectCtrlName);selectCtrl&&selectCtrl.registerOption(scope,element,attr,interpolateValueFn,interpolateTextFn)}}}}],styleDirective=valueFn({restrict:"E",terminal:!1}),requiredDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){ctrl&&(attr.required=!0,ctrl.$validators.required=function(modelValue,viewValue){return!attr.required||!ctrl.$isEmpty(viewValue)},attr.$observe("required",function(){ctrl.$validate()}))}}},patternDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(ctrl){var regexp,patternExp=attr.ngPattern||attr.pattern;attr.$observe("pattern",function(regex){if(isString(regex)&&regex.length>0&&(regex=new RegExp("^"+regex+"$")),regex&&!regex.test)throw minErr("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",patternExp,regex,startingTag(elm));regexp=regex||undefined,ctrl.$validate()}),ctrl.$validators.pattern=function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||isUndefined(regexp)||regexp.test(viewValue)}}}}},maxlengthDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(ctrl){var maxlength=-1;attr.$observe("maxlength",function(value){var intVal=toInt(value);maxlength=isNaN(intVal)?-1:intVal,ctrl.$validate()}),ctrl.$validators.maxlength=function(modelValue,viewValue){return maxlength<0||ctrl.$isEmpty(viewValue)||viewValue.length<=maxlength}}}}},minlengthDirective=function(){return{restrict:"A",require:"?ngModel",link:function(scope,elm,attr,ctrl){if(ctrl){var minlength=0;attr.$observe("minlength",function(value){minlength=toInt(value)||0,ctrl.$validate()}),ctrl.$validators.minlength=function(modelValue,viewValue){return ctrl.$isEmpty(viewValue)||viewValue.length>=minlength}}}}};return window.angular.bootstrap?void(window.console&&console.log("WARNING: Tried to load angular more than once.")):(bindJQuery(),publishExternalAPI(angular),angular.module("ngLocale",[],["$provide",function($provide){function getDecimals(n){n+="";var i=n.indexOf(".");return i==-1?0:n.length-i-1}function getVF(n,opt_precision){var v=opt_precision;undefined===v&&(v=Math.min(getDecimals(n),3));var base=Math.pow(10,v),f=(n*base|0)%base;return{v:v,f:f}}var PLURAL_CATEGORY={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};$provide.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(n,opt_precision){var i=0|n,vf=getVF(n,opt_precision);return 1==i&&0==vf.v?PLURAL_CATEGORY.ONE:PLURAL_CATEGORY.OTHER}})}]),void jqLite(document).ready(function(){angularInit(document,bootstrap)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@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;}</style>'),function(window,angular,undefined){function isValidDottedPath(path){return null!=path&&""!==path&&"hasOwnProperty"!==path&&MEMBER_NAME_REGEX.test("."+path)}function lookupDottedPath(obj,path){if(!isValidDottedPath(path))throw $resourceMinErr("badmember",'Dotted member path "@{0}" is invalid.',path);for(var keys=path.split("."),i=0,ii=keys.length;i<ii&&angular.isDefined(obj);i++){var key=keys[i];obj=null!==obj?obj[key]:undefined}return obj}function shallowClearAndCopy(src,dst){dst=dst||{},angular.forEach(dst,function(value,key){delete dst[key]});for(var key in src)!src.hasOwnProperty(key)||"$"===key.charAt(0)&&"$"===key.charAt(1)||(dst[key]=src[key]);return dst}var $resourceMinErr=angular.$$minErr("$resource"),MEMBER_NAME_REGEX=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;angular.module("ngResource",["ng"]).provider("$resource",function(){var PROTOCOL_AND_DOMAIN_REGEX=/^https?:\/\/[^\/]*/,provider=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",function($http,$log,$q){function encodeUriSegment(val){return encodeUriQuery(val,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}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={}}function resourceFactory(url,paramDefaults,actions,options){function extractParams(data,actionParams){var ids={};return actionParams=extend({},paramDefaults,actionParams),forEach(actionParams,function(value,key){isFunction(value)&&(value=value()),ids[key]=value&&value.charAt&&"@"==value.charAt(0)?lookupDottedPath(data,value.substr(1)):value}),ids}function defaultResponseInterceptor(response){return response.resource}function Resource(value){shallowClearAndCopy(value||{},this)}var route=new Route(url,options);return actions=extend({},provider.defaults.actions,actions),Resource.prototype.toJSON=function(){var data=extend({},this);return delete data.$promise,delete data.$resolved,data},forEach(actions,function(action,name){var hasBody=/^(POST|PUT|PATCH)$/i.test(action.method);Resource[name]=function(a1,a2,a3,a4){var data,success,error,params={};switch(arguments.length){case 4:error=a4,success=a3;case 3:case 2:if(!isFunction(a2)){params=a1,data=a2,success=a3;break}if(isFunction(a1)){success=a1,error=a2;break}success=a2,error=a3;case 1:isFunction(a1)?success=a1:hasBody?data=a1:params=a1;break;case 0:break;default:throw $resourceMinErr("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var isInstanceCall=this instanceof Resource,value=isInstanceCall?data:action.isArray?[]:new Resource(data),httpConfig={},responseInterceptor=action.interceptor&&action.interceptor.response||defaultResponseInterceptor,responseErrorInterceptor=action.interceptor&&action.interceptor.responseError||undefined;forEach(action,function(value,key){switch(key){default:httpConfig[key]=copy(value);break;case"params":case"isArray":case"interceptor":break;case"timeout":value&&!angular.isNumber(value)&&$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.\n If you need support for cancellable $resource actions, you should upgrade to version 1.5 or higher.")}}),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,promise=value.$promise;if(data){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);action.isArray?(value.length=0,forEach(data,function(item){"object"==typeof item?value.push(new Resource(item)):value.push(item)})):(shallowClearAndCopy(data,value),value.$promise=promise)}return value.$resolved=!0,response.resource=value,response},function(response){return value.$resolved=!0,(error||noop)(response),$q.reject(response)});return promise=promise.then(function(response){var value=responseInterceptor(response);return(success||noop)(value,response.headers),value},responseErrorInterceptor),isInstanceCall?promise:(value.$promise=promise,value.$resolved=!1,value)},Resource.prototype["$"+name]=function(params,success,error){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)},Resource}var noop=angular.noop,forEach=angular.forEach,extend=angular.extend,copy=angular.copy,isFunction=angular.isFunction;return Route.prototype={setUrlParams:function(config,params,actionUrl){var val,encodedVal,self=this,url=actionUrl||self.template,protocolAndDomain="",urlParams=self.urlParams={};forEach(url.split(/\W/),function(param){if("hasOwnProperty"===param)throw $resourceMinErr("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(param)&&param&&new RegExp("(^|[^\\\\]):"+param+"(\\W|$)").test(url)&&(urlParams[param]=!0)}),url=url.replace(/\\:/g,":"),url=url.replace(PROTOCOL_AND_DOMAIN_REGEX,function(match){return protocolAndDomain=match,""}),params=params||{},forEach(self.urlParams,function(_,urlParam){val=params.hasOwnProperty(urlParam)?params[urlParam]:self.defaults[urlParam],angular.isDefined(val)&&null!==val?(encodedVal=encodeUriSegment(val),url=url.replace(new RegExp(":"+urlParam+"(\\W|$)","g"),function(match,p1){return encodedVal+p1})):url=url.replace(new RegExp("(/?):"+urlParam+"(\\W|$)","g"),function(match,leadingSlashes,tail){return"/"==tail.charAt(0)?tail:leadingSlashes+tail})}),self.defaults.stripTrailingSlashes&&(url=url.replace(/\/+$/,"")||"/"),url=url.replace(/\/\.(?=\w+($|\?))/,"."),config.url=protocolAndDomain+url.replace(/\/\\\./,"/."),forEach(params,function(value,key){self.urlParams[key]||(config.params=config.params||{},config.params[key]=value)})}},resourceFactory}]})}(window,window.angular),function(window,angular,undefined){function jsonStringToDate(string){var match;if(match=string.match(R_ISO8061_STR)){var date=new Date(0),tzHour=0,tzMin=0;return 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)),date}return string}function toInt(str){return parseInt(str,10)}function padNumber(num,digits,trim){var neg="";for(num<0&&(neg="-",num=-num),num=""+num;num.length<digits;)num="0"+num;return trim&&(num=num.substr(num.length-digits)),neg+num}function createHttpBackendMock($rootScope,$timeout,$delegate,$browser){function createResponse(status,data,headers,statusText){return angular.isFunction(status)?status:function(){return angular.isNumber(status)?[status,data,headers,statusText]:[200,status,data,headers]}}function $httpBackend(method,url,data,callback,headers,timeout,withCredentials,responseType){function prettyPrint(data){return angular.isString(data)||angular.isFunction(data)||data instanceof RegExp?data:angular.toJson(data)}function wrapResponse(wrapped){function handleResponse(){var response=wrapped.response(method,url,data,headers);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}}return!$browser&&timeout&&(timeout.then?timeout.then(handleTimeout):$timeout(handleTimeout,timeout)),handleResponse}var xhr=new MockXhr,expectation=expectations[0],wasExpected=!1;if(expectation&&expectation.match(method,url)){if(!expectation.matchData(data))throw new Error("Expected "+expectation+" with different data\nEXPECTED: "+prettyPrint(expectation.data)+"\nGOT: "+data);if(!expectation.matchHeaders(headers))throw new Error("Expected "+expectation+" with different headers\nEXPECTED: "+prettyPrint(expectation.headers)+"\nGOT: "+prettyPrint(headers));if(expectations.shift(),expectation.response)return void responses.push(wrapResponse(expectation));wasExpected=!0}for(var definition,i=-1;definition=definitions[++i];)if(definition.match(method,url,data,headers||{})){if(definition.response)($browser?$browser.defer:responsesPush)(wrapResponse(definition));else{if(!definition.passThrough)throw new Error("No response defined !");$delegate(method,url,data,callback,headers,timeout,withCredentials,responseType)}return}throw wasExpected?new Error("No response defined !"):new Error("Unexpected request: "+method+" "+url+"\n"+(expectation?"Expected "+expectation:"No more request expected"))}function createShortMethods(prefix){angular.forEach(["GET","DELETE","JSONP","HEAD"],function(method){$httpBackend[prefix+method]=function(url,headers){return $httpBackend[prefix](method,url,undefined,headers)}}),angular.forEach(["PUT","POST","PATCH"],function(method){$httpBackend[prefix+method]=function(url,data,headers){return $httpBackend[prefix](method,url,data,headers)}})}var definitions=[],expectations=[],responses=[],responsesPush=angular.bind(responses,responses.push),copy=angular.copy;return $httpBackend.when=function(method,url,data,headers){var definition=new MockHttpExpectation(method,url,data,headers),chain={respond:function(status,data,headers,statusText){return definition.passThrough=undefined,definition.response=createResponse(status,data,headers,statusText),chain}};return $browser&&(chain.passThrough=function(){return definition.response=undefined,definition.passThrough=!0,chain}),definitions.push(definition),chain},createShortMethods("when"),$httpBackend.expect=function(method,url,data,headers){var expectation=new MockHttpExpectation(method,url,data,headers),chain={respond:function(status,data,headers,statusText){return expectation.response=createResponse(status,data,headers,statusText),chain}};return expectations.push(expectation),chain},createShortMethods("expect"),$httpBackend.flush=function(count,digest){if(digest!==!1&&$rootScope.$digest(),!responses.length)throw new Error("No pending request to flush !");if(angular.isDefined(count)&&null!==count)for(;count--;){if(!responses.length)throw new Error("No more pending request to flush !");responses.shift()()}else for(;responses.length;)responses.shift()();$httpBackend.verifyNoOutstandingExpectation(digest)},$httpBackend.verifyNoOutstandingExpectation=function(digest){if(digest!==!1&&$rootScope.$digest(),expectations.length)throw new Error("Unsatisfied requests: "+expectations.join(", "))},$httpBackend.verifyNoOutstandingRequest=function(){if(responses.length)throw new Error("Unflushed requests: "+responses.length)},$httpBackend.resetExpectations=function(){expectations.length=0,responses.length=0},$httpBackend}function MockHttpExpectation(method,url,data,headers){this.data=data,this.headers=headers,this.match=function(m,u,d,h){return method==m&&(!!this.matchUrl(u)&&(!(angular.isDefined(d)&&!this.matchData(d))&&!(angular.isDefined(h)&&!this.matchHeaders(h))))},this.matchUrl=function(u){return!url||(angular.isFunction(url.test)?url.test(u):angular.isFunction(url)?url(u):url==u)},this.matchHeaders=function(h){return!!angular.isUndefined(headers)||(angular.isFunction(headers)?headers(h):angular.equals(headers,h))},this.matchData=function(d){return!!angular.isUndefined(data)||(data&&angular.isFunction(data.test)?data.test(d):data&&angular.isFunction(data)?data(d):data&&!angular.isString(data)?angular.equals(angular.fromJson(angular.toJson(data)),angular.fromJson(d)):data==d)},this.toString=function(){return method+" "+url}}function MockXhr(){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){var header=this.$$respHeaders[name];return header?header:(name=angular.lowercase(name),(header=this.$$respHeaders[name])?header:(header=undefined,angular.forEach(this.$$respHeaders,function(headerVal,headerName){header||angular.lowercase(headerName)!=name||(header=headerVal)}),header))},this.getAllResponseHeaders=function(){var lines=[];return angular.forEach(this.$$respHeaders,function(value,key){lines.push(key+": "+value)}),lines.join("\n")},this.abort=angular.noop}angular.mock={},angular.mock.$BrowserProvider=function(){this.$get=function(){return new angular.mock.$Browser}},angular.mock.$Browser=function(){var self=this;this.isMock=!0,self.$$url="http://server/",self.$$lastUrl=self.$$url,self.pollFns=[],self.$$completeOutstandingRequest=angular.noop,self.$$incOutstandingRequestCount=angular.noop,self.onUrlChange=function(listener){return self.pollFns.push(function(){self.$$lastUrl===self.$$url&&self.$$state===self.$$lastState||(self.$$lastUrl=self.$$url,self.$$lastState=self.$$state,listener(self.$$url,self.$$state))}),listener},self.$$applicationDestroyed=angular.noop,self.$$checkUrlChange=angular.noop,self.deferredFns=[],self.deferredNextId=0,self.defer=function(fn,delay){return 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}),self.deferredNextId++},self.defer.now=0,self.defer.cancel=function(deferId){var fnIndex;return angular.forEach(self.deferredFns,function(fn,index){fn.id===deferId&&(fnIndex=index)}),!!angular.isDefined(fnIndex)&&(self.deferredFns.splice(fnIndex,1),!0)},self.defer.flush=function(delay){if(angular.isDefined(delay))self.defer.now+=delay;else{if(!self.deferredFns.length)throw new Error("No deferred tasks to be flushed");self.defer.now=self.deferredFns[self.deferredFns.length-1].time}for(;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={poll:function(){angular.forEach(this.pollFns,function(pollFn){pollFn()})},url:function(url,replace,state){return angular.isUndefined(state)&&(state=null),url?(this.$$url=url,this.$$state=angular.copy(state),this):this.$$url},state:function(){return this.$$state},notifyWhenNoOutstandingRequests:function(fn){fn()}},angular.mock.$ExceptionHandlerProvider=function(){var handler;this.mode=function(mode){switch(mode){case"log":case"rethrow":var errors=[];handler=function(e){if(1==arguments.length?errors.push(e):errors.push([].slice.call(arguments,0)),"rethrow"===mode)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")},angular.mock.$LogProvider=function(){function concat(array1,array2,index){return array1.concat(Array.prototype.slice.call(array2,index))}var debug=!0;this.debugEnabled=function(flag){return angular.isDefined(flag)?(debug=flag,this):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(){debug&&$log.debug.logs.push(concat([],arguments,0))}};return $log.reset=function(){$log.log.logs=[],$log.info.logs=[],$log.warn.logs=[],$log.error.logs=[],$log.debug.logs=[]},$log.assertEmpty=function(){var errors=[];if(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||""))})})}),errors.length)throw 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(""),new Error(errors.join("\n---------\n"))},$log.reset(),$log}},angular.mock.$IntervalProvider=function(){this.$get=["$browser","$rootScope","$q","$$q",function($browser,$rootScope,$q,$$q){var repeatFns=[],nextRepeatId=0,now=0,$interval=function(fn,delay,count,invokeApply){function tick(){if(deferred.notify(iteration++),count>0&&iteration>=count){var fnIndex;deferred.resolve(iteration),angular.forEach(repeatFns,function(fn,index){fn.id===promise.$$intervalId&&(fnIndex=index)}),angular.isDefined(fnIndex)&&repeatFns.splice(fnIndex,1)}skipApply?$browser.defer.flush():$rootScope.$apply()}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;return count=angular.isDefined(count)?count:0,promise.then(null,null,hasParams?function(){fn.apply(null,args)}:fn),promise.$$intervalId=nextRepeatId,repeatFns.push({nextTime:now+delay,delay:delay,fn:tick,id:nextRepeatId,deferred:deferred}),repeatFns.sort(function(a,b){return a.nextTime-b.nextTime}),nextRepeatId++,promise};return $interval.cancel=function(promise){if(!promise)return!1;var fnIndex;return angular.forEach(repeatFns,function(fn,index){fn.id===promise.$$intervalId&&(fnIndex=index)}),!!angular.isDefined(fnIndex)&&(repeatFns[fnIndex].deferred.reject("canceled"),repeatFns.splice(fnIndex,1),!0)},$interval.flush=function(millis){for(now+=millis;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},$interval}]};var R_ISO8061_STR=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;if(angular.mock.TzDate=function(offset,timestamp){var self=new Date(0);if(angular.isString(timestamp)){var tsStr=timestamp;if(self.origDate=jsonStringToDate(timestamp),timestamp=self.origDate.getTime(),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=60*localOffset*1e3-1e3*offset*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 60*offset},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()},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"});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"];return angular.forEach(unimplementedMethods,function(methodName){self[methodName]=function(){throw new Error("Method '"+methodName+"' is not implemented in the TzDate mock")}}),self},angular.mock.TzDate.prototype=Date.prototype,angular.mock.animate=angular.module("ngAnimateMock",["ng"]).config(["$provide",function($provide){$provide.factory("$$forceReflow",function(){function reflowFn(){reflowFn.totalReflows++}return reflowFn.totalReflows=0,reflowFn}),$provide.factory("$$animateAsyncRun",function(){var queue=[],queueFn=function(){return function(fn){queue.push(fn)}};return queueFn.flush=function(){if(0===queue.length)return!1;for(var i=0;i<queue.length;i++)queue[i]();return queue=[],!0},queueFn}),$provide.decorator("$$animateJs",["$delegate",function($delegate){var runners=[],animateJsConstructor=function(){var animator=$delegate.apply($delegate,arguments);return animator&&runners.push(animator),animator};return animateJsConstructor.$closeAndFlush=function(){runners.forEach(function(runner){runner.end()}),runners=[]},animateJsConstructor}]),$provide.decorator("$animateCss",["$delegate",function($delegate){var runners=[],animateCssConstructor=function(element,options){var animator=$delegate(element,options);return runners.push(animator),animator};return animateCssConstructor.$closeAndFlush=function(){runners.forEach(function(runner){runner.end()}),runners=[]},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,closeAndFlush:function(){this.flush(!0),$animateCss.$closeAndFlush(),$$animateJs.$closeAndFlush(),this.flush()},flush:function(hideErrors){$rootScope.$digest();var doNextRun,somethingFlushed=!1;do doNextRun=!1,$$rAF.queue.length&&($$rAF.flush(),doNextRun=somethingFlushed=!0),$$animateAsyncRun.flush()&&(doNextRun=somethingFlushed=!0);while(doNextRun);if(!somethingFlushed&&!hideErrors)throw new Error("No pending animations ready to be closed or flushed");
$rootScope.$digest()}};return angular.forEach(["animate","enter","leave","move","addClass","removeClass","setClass"],function(method){animate[method]=function(){return animate.queue.push({event:method,element:arguments[0],options:arguments[arguments.length-1],args:arguments}),$delegate[method].apply($delegate,arguments)}}),animate}])}]),angular.mock.dump=function(object){function serialize(object){var out;return angular.isElement(object)?(object=angular.element(object),out=angular.element("<div></div>"),angular.forEach(object,function(element){out.append(angular.element(element).clone())}),out=out.html()):angular.isArray(object)?(out=[],angular.forEach(object,function(o){out.push(serialize(o))}),out="[ "+out.join(", ")+" ]"):out=angular.isObject(object)?angular.isFunction(object.$eval)&&angular.isFunction(object.$apply)?serializeScope(object):object instanceof Error?object.stack||""+object.name+": "+object.message:angular.toJson(object,!0):String(object),out}function serializeScope(scope,offset){offset=offset||" ";var log=[offset+"Scope("+scope.$id+"): {"];for(var key in scope)Object.prototype.hasOwnProperty.call(scope,key)&&!key.match(/^(\$|this)/)&&log.push(" "+key+": "+angular.toJson(scope[key]));for(var child=scope.$$childHead;child;)log.push(serializeScope(child,offset+" ")),child=child.$$nextSibling;return log.push("}"),log.join("\n"+offset)}return serialize(object)},angular.mock.$HttpBackendProvider=function(){this.$get=["$rootScope","$timeout",createHttpBackendMock]},angular.mock.$TimeoutDecorator=["$delegate","$browser",function($delegate,$browser){function formatPendingTasksAsString(tasks){var result=[];return angular.forEach(tasks,function(task){result.push("{id: "+task.id+", time: "+task.time+"}")}),result.join(", ")}return $delegate.flush=function(delay){$browser.defer.flush(delay)},$delegate.verifyNoPendingTasks=function(){if($browser.deferredFns.length)throw new Error("Deferred tasks to flush ("+$browser.deferredFns.length+"): "+formatPendingTasksAsString($browser.deferredFns))},$delegate}],angular.mock.$RAFDecorator=["$delegate",function($delegate){var rafFn=function(fn){var index=rafFn.queue.length;return rafFn.queue.push(fn),function(){rafFn.queue.splice(index,1)}};return rafFn.queue=[],rafFn.supported=$delegate.supported,rafFn.flush=function(){if(0===rafFn.queue.length)throw new Error("No rAF callbacks present");for(var length=rafFn.queue.length,i=0;i<length;i++)rafFn.queue[i]();rafFn.queue=rafFn.queue.slice(i)},rafFn}],angular.mock.$RootElementProvider=function(){this.$get=function(){return angular.element("<div ng-app></div>")}},angular.mock.$ControllerDecorator=["$delegate",function($delegate){return function(expression,locals,later,ident){if(later&&"object"==typeof later){var create=$delegate(expression,locals,!0,ident);return angular.extend(create.instance,later),create()}return $delegate(expression,locals,later,ident)}}],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}).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)}]),angular.module("ngMockE2E",["ng"]).config(["$provide",function($provide){$provide.decorator("$httpBackend",angular.mock.e2e.$httpBackendDecorator)}]),angular.mock.e2e={},angular.mock.e2e.$httpBackendDecorator=["$rootScope","$timeout","$delegate","$browser",createHttpBackendMock],angular.mock.$RootScopeDecorator=["$delegate",function($delegate){function countChildScopes(){for(var currentScope,count=0,pendingChildHeads=[this.$$childHead];pendingChildHeads.length;)for(currentScope=pendingChildHeads.shift();currentScope;)count+=1,pendingChildHeads.push(currentScope.$$childHead),currentScope=currentScope.$$nextSibling;return count}function countWatchers(){for(var currentScope,count=this.$$watchers?this.$$watchers.length:0,pendingChildHeads=[this.$$childHead];pendingChildHeads.length;)for(currentScope=pendingChildHeads.shift();currentScope;)count+=currentScope.$$watchers?currentScope.$$watchers.length:0,pendingChildHeads.push(currentScope.$$childHead),currentScope=currentScope.$$nextSibling;return count}var $rootScopePrototype=Object.getPrototypeOf($delegate);return $rootScopePrototype.$countChildScopes=countChildScopes,$rootScopePrototype.$countWatchers=countWatchers,$delegate}],window.jasmine||window.mocha){var currentSpec=null,annotatedFunctions=[],isSpecRunning=function(){return!!currentSpec};angular.mock.$$annotate=angular.injector.$$annotate,angular.injector.$$annotate=function(fn){return"function"!=typeof fn||fn.$inject||annotatedFunctions.push(fn),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){module&&module.$$hashKey&&(module.$$hashKey=undefined)}),currentSpec.$injector=null,currentSpec.$modules=null,currentSpec=null,injector&&injector.get("$rootElement").off(),angular.forEach(angular.element.fragments,function(val,key){delete angular.element.fragments[key]}),MockXhr.$$lastInstance=null,angular.forEach(angular.callbacks,function(val,key){delete angular.callbacks[key]}),angular.callbacks.counter=0}),window.module=angular.mock.module=function(){function workFn(){if(currentSpec.$injector)throw new Error("Injector already created, can not register a module!");var modules=currentSpec.$modules||(currentSpec.$modules=[]);angular.forEach(moduleFns,function(module){angular.isObject(module)&&!angular.isArray(module)?modules.push(function($provide){angular.forEach(module,function(value,key){$provide.value(key,value)})}):modules.push(module)})}var moduleFns=Array.prototype.slice.call(arguments,0);return isSpecRunning()?workFn():workFn};var ErrorAddingDeclarationLocationStack=function(e,errorForStack){this.message=e.message,this.name=e.name,e.line&&(this.line=e.line),e.sourceId&&(this.sourceId=e.sourceId),e.stack&&errorForStack&&(this.stack=e.stack+"\n"+errorForStack.stack),e.stackArray&&(this.stackArray=e.stackArray)};ErrorAddingDeclarationLocationStack.prototype.toString=Error.prototype.toString,window.inject=angular.mock.inject=function(){function workFn(){var modules=currentSpec.$modules||[],strictDi=!!currentSpec.$injectorStrict;modules.unshift("ngMock"),modules.unshift("ng");var injector=currentSpec.$injector;injector||(strictDi&&angular.forEach(modules,function(moduleFn){"function"==typeof moduleFn&&angular.injector.$$annotate(moduleFn)}),injector=currentSpec.$injector=angular.injector(modules,strictDi),currentSpec.$injectorStrict=strictDi);for(var i=0,ii=blockFns.length;i<ii;i++){currentSpec.$injectorStrict&&injector.annotate(blockFns[i]);try{injector.invoke(blockFns[i]||angular.noop,this)}catch(e){if(e.stack&&errorForStack)throw new ErrorAddingDeclarationLocationStack(e,errorForStack);throw e}finally{errorForStack=null}}}var blockFns=Array.prototype.slice.call(arguments,0),errorForStack=new Error("Declaration Location");if(!errorForStack.stack)try{throw errorForStack}catch(e){}return isSpecRunning()?workFn.call(currentSpec):workFn},angular.mock.inject.strictDi=function(value){function workFn(){if(value!==currentSpec.$injectorStrict){if(currentSpec.$injector)throw new Error("Injector already created, can not modify strict annotations");currentSpec.$injectorStrict=value}}return value=!arguments.length||!!value,isSpecRunning()?workFn():workFn}}}(window,window.angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-popup.html","template/tooltip/tooltip-popup.html","template/tooltip/tooltip-template-popup.html","template/popover/popover-html.html","template/popover/popover-template.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$injector",function($animate,$injector){var $animateCss=$injector.has("$animateCss")?$injector.get("$animateCss"):null;return{link:function(scope,element,attrs){function expand(){element.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),$animateCss?$animateCss(element,{addClass:"in",easing:"ease",to:{height:element[0].scrollHeight+"px"}}).start()["finally"](expandDone):$animate.addClass(element,"in",{to:{height:element[0].scrollHeight+"px"}}).then(expandDone)}function expandDone(){element.removeClass("collapsing").addClass("collapse").css({height:"auto"})}function collapse(){return element.hasClass("collapse")||element.hasClass("in")?(element.css({height:element[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void($animateCss?$animateCss(element,{removeClass:"in",to:{height:"0"}}).start()["finally"](collapseDone):$animate.removeClass(element,"in",{to:{height:"0"}}).then(collapseDone))):collapseDone()}function collapseDone(){element.css({height:"0"}),element.removeClass("collapsing").addClass("collapse")}scope.$watch(attrs.uibCollapse,function(shouldCollapse){shouldCollapse?collapse():expand()})}}}]),angular.module("ui.bootstrap.collapse").value("$collapseSuppressWarning",!1).directive("collapse",["$animate","$injector","$log","$collapseSuppressWarning",function($animate,$injector,$log,$collapseSuppressWarning){var $animateCss=$injector.has("$animateCss")?$injector.get("$animateCss"):null;return{link:function(scope,element,attrs){function expand(){element.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),$animateCss?$animateCss(element,{easing:"ease",to:{height:element[0].scrollHeight+"px"}}).start().done(expandDone):$animate.animate(element,{},{height:element[0].scrollHeight+"px"}).then(expandDone)}function expandDone(){element.removeClass("collapsing").addClass("collapse in").css({height:"auto"})}function collapse(){return element.hasClass("collapse")||element.hasClass("in")?(element.css({height:element[0].scrollHeight+"px"}).removeClass("collapse in").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void($animateCss?$animateCss(element,{to:{height:"0"}}).start().done(collapseDone):$animate.animate(element,{},{height:"0"}).then(collapseDone))):collapseDone()}function collapseDone(){element.css({height:"0"}),element.removeClass("collapsing").addClass("collapse")}$collapseSuppressWarning||$log.warn("collapse is now deprecated. Use uib-collapse instead."),scope.$watch(attrs.collapse,function(shouldCollapse){shouldCollapse?collapse():expand()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function($scope,$attrs,accordionConfig){this.groups=[],this.closeOthers=function(openGroup){var closeOthers=angular.isDefined($attrs.closeOthers)?$scope.$eval($attrs.closeOthers):accordionConfig.closeOthers;closeOthers&&angular.forEach(this.groups,function(group){group!==openGroup&&(group.isOpen=!1)})},this.addGroup=function(groupScope){var that=this;this.groups.push(groupScope),groupScope.$on("$destroy",function(event){that.removeGroup(groupScope)})},this.removeGroup=function(group){var index=this.groups.indexOf(group);index!==-1&&this.groups.splice(index,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(element){this.heading=element}},link:function(scope,element,attrs,accordionCtrl){accordionCtrl.addGroup(scope),scope.openClass=attrs.openClass||"panel-open",scope.panelClass=attrs.panelClass,scope.$watch("isOpen",function(value){element.toggleClass(scope.openClass,!!value),value&&accordionCtrl.closeOthers(scope)}),scope.toggleOpen=function($event){scope.isDisabled||$event&&32!==$event.which||(scope.isOpen=!scope.isOpen)}}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(scope,element,attrs,accordionGroupCtrl,transclude){accordionGroupCtrl.setHeading(transclude(scope,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:["?^uibAccordionGroup","?^accordionGroup"],link:function(scope,element,attrs,controller){controller=controller[0]?controller[0]:controller[1],scope.$watch(function(){return controller[attrs.uibAccordionTransclude]},function(heading){heading&&(element.find("span").html(""),element.find("span").append(heading))})}}}),angular.module("ui.bootstrap.accordion").value("$accordionSuppressWarning",!1).controller("AccordionController",["$scope","$attrs","$controller","$log","$accordionSuppressWarning",function($scope,$attrs,$controller,$log,$accordionSuppressWarning){$accordionSuppressWarning||$log.warn("AccordionController is now deprecated. Use UibAccordionController instead."),angular.extend(this,$controller("UibAccordionController",{$scope:$scope,$attrs:$attrs}))}]).directive("accordion",["$log","$accordionSuppressWarning",function($log,$accordionSuppressWarning){return{restrict:"EA",controller:"AccordionController",controllerAs:"accordion",transclude:!0,replace:!1,templateUrl:function(element,attrs){return attrs.templateUrl||"template/accordion/accordion.html"},link:function(){$accordionSuppressWarning||$log.warn("accordion is now deprecated. Use uib-accordion instead.")}}}]).directive("accordionGroup",["$log","$accordionSuppressWarning",function($log,$accordionSuppressWarning){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(element){this.heading=element}},link:function(scope,element,attrs,accordionCtrl){$accordionSuppressWarning||$log.warn("accordion-group is now deprecated. Use uib-accordion-group instead."),accordionCtrl.addGroup(scope),scope.openClass=attrs.openClass||"panel-open",scope.panelClass=attrs.panelClass,scope.$watch("isOpen",function(value){element.toggleClass(scope.openClass,!!value),value&&accordionCtrl.closeOthers(scope)}),scope.toggleOpen=function($event){scope.isDisabled||$event&&32!==$event.which||(scope.isOpen=!scope.isOpen)}}}}]).directive("accordionHeading",["$log","$accordionSuppressWarning",function($log,$accordionSuppressWarning){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(scope,element,attr,accordionGroupCtrl,transclude){$accordionSuppressWarning||$log.warn("accordion-heading is now deprecated. Use uib-accordion-heading instead."),accordionGroupCtrl.setHeading(transclude(scope,angular.noop))}}}]).directive("accordionTransclude",["$log","$accordionSuppressWarning",function($log,$accordionSuppressWarning){return{require:"^accordionGroup",link:function(scope,element,attr,controller){$accordionSuppressWarning||$log.warn("accordion-transclude is now deprecated. Use uib-accordion-transclude instead."),scope.$watch(function(){return controller[attr.accordionTransclude]},function(heading){heading&&(element.find("span").html(""),element.find("span").append(heading))})}}}]),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function($scope,$attrs,$interpolate,$timeout){$scope.closeable=!!$attrs.close;var dismissOnTimeout=angular.isDefined($attrs.dismissOnTimeout)?$interpolate($attrs.dismissOnTimeout)($scope.$parent):null;dismissOnTimeout&&$timeout(function(){$scope.close()},parseInt(dismissOnTimeout,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(element,attrs){return attrs.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.alert").value("$alertSuppressWarning",!1).controller("AlertController",["$scope","$attrs","$controller","$log","$alertSuppressWarning",function($scope,$attrs,$controller,$log,$alertSuppressWarning){$alertSuppressWarning||$log.warn("AlertController is now deprecated. Use UibAlertController instead."),angular.extend(this,$controller("UibAlertController",{$scope:$scope,$attrs:$attrs}))}]).directive("alert",["$log","$alertSuppressWarning",function($log,$alertSuppressWarning){return{controller:"AlertController",controllerAs:"alert",templateUrl:function(element,attrs){return attrs.templateUrl||"template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"},link:function(){$alertSuppressWarning||$log.warn("alert is now deprecated. Use uib-alert instead.")}}}]),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(buttonConfig){this.activeClass=buttonConfig.activeClass||"active",this.toggleEvent=buttonConfig.toggleEvent||"click"}]).directive("uibBtnRadio",function(){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(scope,element,attrs,ctrls){var buttonsCtrl=ctrls[0],ngModelCtrl=ctrls[1];element.find("input").css({display:"none"}),ngModelCtrl.$render=function(){element.toggleClass(buttonsCtrl.activeClass,angular.equals(ngModelCtrl.$modelValue,scope.$eval(attrs.uibBtnRadio)))},element.on(buttonsCtrl.toggleEvent,function(){if(!attrs.disabled){var isActive=element.hasClass(buttonsCtrl.activeClass);isActive&&!angular.isDefined(attrs.uncheckable)||scope.$apply(function(){ngModelCtrl.$setViewValue(isActive?null:scope.$eval(attrs.uibBtnRadio)),ngModelCtrl.$render()})}})}}}).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(scope,element,attrs,ctrls){function getTrueValue(){return getCheckboxValue(attrs.btnCheckboxTrue,!0)}function getFalseValue(){return getCheckboxValue(attrs.btnCheckboxFalse,!1)}function getCheckboxValue(attribute,defaultValue){return angular.isDefined(attribute)?scope.$eval(attribute):defaultValue}var buttonsCtrl=ctrls[0],ngModelCtrl=ctrls[1];element.find("input").css({display:"none"}),ngModelCtrl.$render=function(){element.toggleClass(buttonsCtrl.activeClass,angular.equals(ngModelCtrl.$modelValue,getTrueValue()))},element.on(buttonsCtrl.toggleEvent,function(){attrs.disabled||scope.$apply(function(){ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass)?getFalseValue():getTrueValue()),ngModelCtrl.$render()})})}}}),angular.module("ui.bootstrap.buttons").value("$buttonsSuppressWarning",!1).controller("ButtonsController",["$controller","$log","$buttonsSuppressWarning",function($controller,$log,$buttonsSuppressWarning){$buttonsSuppressWarning||$log.warn("ButtonsController is now deprecated. Use UibButtonsController instead."),angular.extend(this,$controller("UibButtonsController"))}]).directive("btnRadio",["$log","$buttonsSuppressWarning",function($log,$buttonsSuppressWarning){return{require:["btnRadio","ngModel"],controller:"ButtonsController",controllerAs:"buttons",link:function(scope,element,attrs,ctrls){$buttonsSuppressWarning||$log.warn("btn-radio is now deprecated. Use uib-btn-radio instead.");var buttonsCtrl=ctrls[0],ngModelCtrl=ctrls[1];element.find("input").css({display:"none"}),ngModelCtrl.$render=function(){element.toggleClass(buttonsCtrl.activeClass,angular.equals(ngModelCtrl.$modelValue,scope.$eval(attrs.btnRadio)))},element.bind(buttonsCtrl.toggleEvent,function(){if(!attrs.disabled){var isActive=element.hasClass(buttonsCtrl.activeClass);isActive&&!angular.isDefined(attrs.uncheckable)||scope.$apply(function(){ngModelCtrl.$setViewValue(isActive?null:scope.$eval(attrs.btnRadio)),ngModelCtrl.$render()})}})}}}]).directive("btnCheckbox",["$document","$log","$buttonsSuppressWarning",function($document,$log,$buttonsSuppressWarning){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",controllerAs:"button",link:function(scope,element,attrs,ctrls){function getTrueValue(){return getCheckboxValue(attrs.btnCheckboxTrue,!0)}function getFalseValue(){return getCheckboxValue(attrs.btnCheckboxFalse,!1)}function getCheckboxValue(attributeValue,defaultValue){var val=scope.$eval(attributeValue);return angular.isDefined(val)?val:defaultValue}$buttonsSuppressWarning||$log.warn("btn-checkbox is now deprecated. Use uib-btn-checkbox instead.");var buttonsCtrl=ctrls[0],ngModelCtrl=ctrls[1];element.find("input").css({display:"none"}),ngModelCtrl.$render=function(){element.toggleClass(buttonsCtrl.activeClass,angular.equals(ngModelCtrl.$modelValue,getTrueValue()))},element.bind(buttonsCtrl.toggleEvent,function(){attrs.disabled||scope.$apply(function(){ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass)?getFalseValue():getTrueValue()),ngModelCtrl.$render()})}),element.on("keypress",function(e){attrs.disabled||32!==e.which||$document[0].activeElement!==element[0]||scope.$apply(function(){ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass)?getFalseValue():getTrueValue()),ngModelCtrl.$render()})})}}}]),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$animate",function($scope,$element,$interval,$animate){function goNext(slide,index,direction){destroyed||(angular.extend(slide,{direction:direction,active:!0}),angular.extend(self.currentSlide||{},{direction:direction,active:!1}),$animate.enabled()&&!$scope.noTransition&&!$scope.$currentTransition&&slide.$element&&self.slides.length>1&&(slide.$element.data(SLIDE_DIRECTION,slide.direction),self.currentSlide&&self.currentSlide.$element&&self.currentSlide.$element.data(SLIDE_DIRECTION,slide.direction),$scope.$currentTransition=!0,NEW_ANIMATE?$animate.on("addClass",slide.$element,function(element,phase){"close"===phase&&($scope.$currentTransition=null,$animate.off("addClass",element))}):slide.$element.one("$animate:close",function(){$scope.$currentTransition=null})),self.currentSlide=slide,currentIndex=index,restartTimer())}function getSlideByIndex(index){if(angular.isUndefined(slides[index].index))return slides[index];var i;slides.length;for(i=0;i<slides.length;++i)if(slides[i].index==index)return slides[i]}function restartTimer(){resetTimer();var interval=+$scope.interval;!isNaN(interval)&&interval>0&&(currentInterval=$interval(timerFn,interval))}function resetTimer(){currentInterval&&($interval.cancel(currentInterval),currentInterval=null)}function timerFn(){var interval=+$scope.interval;isPlaying&&!isNaN(interval)&&interval>0&&slides.length?$scope.next():$scope.pause()}function resetTransition(slides){slides.length||($scope.$currentTransition=null)}var currentInterval,isPlaying,self=this,slides=self.slides=$scope.slides=[],NEW_ANIMATE=angular.version.minor>=4,NO_TRANSITION="uib-noTransition",SLIDE_DIRECTION="uib-slideDirection",currentIndex=-1;self.currentSlide=null;var destroyed=!1;self.select=$scope.select=function(nextSlide,direction){var nextIndex=$scope.indexOfSlide(nextSlide);void 0===direction&&(direction=nextIndex>self.getCurrentIndex()?"next":"prev"),nextSlide&&nextSlide!==self.currentSlide&&!$scope.$currentTransition&&goNext(nextSlide,nextIndex,direction)},$scope.$on("$destroy",function(){destroyed=!0}),self.getCurrentIndex=function(){return self.currentSlide&&angular.isDefined(self.currentSlide.index)?+self.currentSlide.index:currentIndex},$scope.indexOfSlide=function(slide){return angular.isDefined(slide.index)?+slide.index:slides.indexOf(slide)},$scope.next=function(){var newIndex=(self.getCurrentIndex()+1)%slides.length;return 0===newIndex&&$scope.noWrap()?void $scope.pause():self.select(getSlideByIndex(newIndex),"next")},$scope.prev=function(){var newIndex=self.getCurrentIndex()-1<0?slides.length-1:self.getCurrentIndex()-1;return $scope.noWrap()&&newIndex===slides.length-1?void $scope.pause():self.select(getSlideByIndex(newIndex),"prev")},$scope.isActive=function(slide){return self.currentSlide===slide},$scope.$watch("interval",restartTimer),$scope.$watchCollection("slides",resetTransition),$scope.$on("$destroy",resetTimer),$scope.play=function(){isPlaying||(isPlaying=!0,restartTimer())},$scope.pause=function(){$scope.noPause||(isPlaying=!1,resetTimer())},self.addSlide=function(slide,element){slide.$element=element,slides.push(slide),1===slides.length||slide.active?(self.select(slides[slides.length-1]),1===slides.length&&$scope.play()):slide.active=!1},self.removeSlide=function(slide){angular.isDefined(slide.index)&&slides.sort(function(a,b){return+a.index>+b.index});var index=slides.indexOf(slide);slides.splice(index,1),slides.length>0&&slide.active?index>=slides.length?self.select(slides[index-1]):self.select(slides[index]):currentIndex>index&&currentIndex--,0===slides.length&&(self.currentSlide=null)},$scope.$watch("noTransition",function(noTransition){$element.data(NO_TRANSITION,noTransition)})}]).directive("uibCarousel",[function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(element,attrs){return attrs.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}]).directive("uibSlide",function(){return{require:"^uibCarousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(scope,element,attrs,carouselCtrl){carouselCtrl.addSlide(scope,element),scope.$on("$destroy",function(){carouselCtrl.removeSlide(scope)}),scope.$watch("active",function(active){active&&carouselCtrl.select(scope)})}}}).animation(".item",["$injector","$animate",function($injector,$animate){function removeClass(element,className,callback){element.removeClass(className),callback&&callback()}var NO_TRANSITION="uib-noTransition",SLIDE_DIRECTION="uib-slideDirection",$animateCss=null;return $injector.has("$animateCss")&&($animateCss=$injector.get("$animateCss")),{beforeAddClass:function(element,className,done){if("active"==className&&element.parent()&&element.parent().parent()&&!element.parent().parent().data(NO_TRANSITION)){var stopped=!1,direction=element.data(SLIDE_DIRECTION),directionClass="next"==direction?"left":"right",removeClassFn=removeClass.bind(this,element,directionClass+" "+direction,done);return element.addClass(direction),$animateCss?$animateCss(element,{addClass:directionClass}).start().done(removeClassFn):$animate.addClass(element,directionClass).then(function(){stopped||removeClassFn(),done()}),function(){stopped=!0}}done()},beforeRemoveClass:function(element,className,done){if("active"===className&&element.parent()&&element.parent().parent()&&!element.parent().parent().data(NO_TRANSITION)){var stopped=!1,direction=element.data(SLIDE_DIRECTION),directionClass="next"==direction?"left":"right",removeClassFn=removeClass.bind(this,element,directionClass,done);return $animateCss?$animateCss(element,{addClass:directionClass}).start().done(removeClassFn):$animate.addClass(element,directionClass).then(function(){stopped||removeClassFn(),done()}),function(){stopped=!0}}done()}}}]),angular.module("ui.bootstrap.carousel").value("$carouselSuppressWarning",!1).controller("CarouselController",["$scope","$element","$controller","$log","$carouselSuppressWarning",function($scope,$element,$controller,$log,$carouselSuppressWarning){$carouselSuppressWarning||$log.warn("CarouselController is now deprecated. Use UibCarouselController instead."),angular.extend(this,$controller("UibCarouselController",{$scope:$scope,$element:$element}))}]).directive("carousel",["$log","$carouselSuppressWarning",function($log,$carouselSuppressWarning){return{transclude:!0,replace:!0,controller:"CarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(element,attrs){return attrs.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"},link:function(){$carouselSuppressWarning||$log.warn("carousel is now deprecated. Use uib-carousel instead.")}}}]).directive("slide",["$log","$carouselSuppressWarning",function($log,$carouselSuppressWarning){return{require:"^carousel",transclude:!0,replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(scope,element,attrs,carouselCtrl){$carouselSuppressWarning||$log.warn("slide is now deprecated. Use uib-slide instead."),carouselCtrl.addSlide(scope,element),scope.$on("$destroy",function(){carouselCtrl.removeSlide(scope)}),scope.$watch("active",function(active){active&&carouselCtrl.select(scope)})}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function($log,$locale,orderByFilter){function createParser(format){var map=[],regex=format.split("");return angular.forEach(formatCodeToRegex,function(data,code){var index=format.indexOf(code);if(index>-1){format=format.split(""),regex[index]="("+data.regex+")",format[index]="$";for(var i=index+1,n=index+code.length;i<n;i++)regex[i]="",format[i]="$";format=format.join(""),map.push({index:index,apply:data.apply})}}),{regex:new RegExp("^"+regex.join("")+"$"),map:orderByFilter(map,"index")}}function isValid(year,month,date){return!(date<1)&&(1===month&&date>28?29===date&&(year%4===0&&year%100!==0||year%400===0):3!==month&&5!==month&&8!==month&&10!==month||date<31)}var localeId,formatCodeToRegex,SPECIAL_CHARACTERS_REGEXP=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){localeId=$locale.id,this.parsers={},formatCodeToRegex={yyyy:{regex:"\\d{4}",apply:function(value){this.year=+value}},yy:{regex:"\\d{2}",apply:function(value){this.year=+value+2e3}},y:{regex:"\\d{1,4}",apply:function(value){this.year=+value}},MMMM:{regex:$locale.DATETIME_FORMATS.MONTH.join("|"),apply:function(value){this.month=$locale.DATETIME_FORMATS.MONTH.indexOf(value);
}},MMM:{regex:$locale.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(value){this.month=$locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(value){this.month=value-1}},M:{regex:"[1-9]|1[0-2]",apply:function(value){this.month=value-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(value){this.date=+value}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(value){this.date=+value}},EEEE:{regex:$locale.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:$locale.DATETIME_FORMATS.SHORTDAY.join("|")},HH:{regex:"(?:0|1)[0-9]|2[0-3]",apply:function(value){this.hours=+value}},hh:{regex:"0[0-9]|1[0-2]",apply:function(value){this.hours=+value}},H:{regex:"1?[0-9]|2[0-3]",apply:function(value){this.hours=+value}},h:{regex:"[0-9]|1[0-2]",apply:function(value){this.hours=+value}},mm:{regex:"[0-5][0-9]",apply:function(value){this.minutes=+value}},m:{regex:"[0-9]|[1-5][0-9]",apply:function(value){this.minutes=+value}},sss:{regex:"[0-9][0-9][0-9]",apply:function(value){this.milliseconds=+value}},ss:{regex:"[0-5][0-9]",apply:function(value){this.seconds=+value}},s:{regex:"[0-9]|[1-5][0-9]",apply:function(value){this.seconds=+value}},a:{regex:$locale.DATETIME_FORMATS.AMPMS.join("|"),apply:function(value){12===this.hours&&(this.hours=0),"PM"===value&&(this.hours+=12)}}}},this.init(),this.parse=function(input,format,baseDate){if(!angular.isString(input)||!format)return input;format=$locale.DATETIME_FORMATS[format]||format,format=format.replace(SPECIAL_CHARACTERS_REGEXP,"\\$&"),$locale.id!==localeId&&this.init(),this.parsers[format]||(this.parsers[format]=createParser(format));var parser=this.parsers[format],regex=parser.regex,map=parser.map,results=input.match(regex);if(results&&results.length){var fields,dt;angular.isDate(baseDate)&&!isNaN(baseDate.getTime())?fields={year:baseDate.getFullYear(),month:baseDate.getMonth(),date:baseDate.getDate(),hours:baseDate.getHours(),minutes:baseDate.getMinutes(),seconds:baseDate.getSeconds(),milliseconds:baseDate.getMilliseconds()}:(baseDate&&$log.warn("dateparser:","baseDate is not a valid date"),fields={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var i=1,n=results.length;i<n;i++){var mapper=map[i-1];mapper.apply&&mapper.apply.call(fields,results[i])}return isValid(fields.year,fields.month,fields.date)&&(angular.isDate(baseDate)&&!isNaN(baseDate.getTime())?(dt=new Date(baseDate),dt.setFullYear(fields.year,fields.month,fields.date,fields.hours,fields.minutes,fields.seconds,fields.milliseconds||0)):dt=new Date(fields.year,fields.month,fields.date,fields.hours,fields.minutes,fields.seconds,fields.milliseconds||0)),dt}}}]),angular.module("ui.bootstrap.dateparser").value("$dateParserSuppressWarning",!1).service("dateParser",["$log","$dateParserSuppressWarning","uibDateParser",function($log,$dateParserSuppressWarning,uibDateParser){$dateParserSuppressWarning||$log.warn("dateParser is now deprecated. Use uibDateParser instead."),angular.extend(this,uibDateParser)}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function($document,$window){function getStyle(el,cssprop){return el.currentStyle?el.currentStyle[cssprop]:$window.getComputedStyle?$window.getComputedStyle(el)[cssprop]:el.style[cssprop]}function isStaticPositioned(element){return"static"===(getStyle(element,"position")||"static")}var parentOffsetEl=function(element){for(var docDomEl=$document[0],offsetParent=element.offsetParent||docDomEl;offsetParent&&offsetParent!==docDomEl&&isStaticPositioned(offsetParent);)offsetParent=offsetParent.offsetParent;return offsetParent||docDomEl};return{position:function(element){var elBCR=this.offset(element),offsetParentBCR={top:0,left:0},offsetParentEl=parentOffsetEl(element[0]);offsetParentEl!=$document[0]&&(offsetParentBCR=this.offset(angular.element(offsetParentEl)),offsetParentBCR.top+=offsetParentEl.clientTop-offsetParentEl.scrollTop,offsetParentBCR.left+=offsetParentEl.clientLeft-offsetParentEl.scrollLeft);var boundingClientRect=element[0].getBoundingClientRect();return{width:boundingClientRect.width||element.prop("offsetWidth"),height:boundingClientRect.height||element.prop("offsetHeight"),top:elBCR.top-offsetParentBCR.top,left:elBCR.left-offsetParentBCR.left}},offset:function(element){var boundingClientRect=element[0].getBoundingClientRect();return{width:boundingClientRect.width||element.prop("offsetWidth"),height:boundingClientRect.height||element.prop("offsetHeight"),top:boundingClientRect.top+($window.pageYOffset||$document[0].documentElement.scrollTop),left:boundingClientRect.left+($window.pageXOffset||$document[0].documentElement.scrollLeft)}},positionElements:function(hostEl,targetEl,positionStr,appendToBody){var hostElPos,targetElWidth,targetElHeight,targetElPos,positionStrParts=positionStr.split("-"),pos0=positionStrParts[0],pos1=positionStrParts[1]||"center";hostElPos=appendToBody?this.offset(hostEl):this.position(hostEl),targetElWidth=targetEl.prop("offsetWidth"),targetElHeight=targetEl.prop("offsetHeight");var shiftWidth={center:function(){return hostElPos.left+hostElPos.width/2-targetElWidth/2},left:function(){return hostElPos.left},right:function(){return hostElPos.left+hostElPos.width}},shiftHeight={center:function(){return hostElPos.top+hostElPos.height/2-targetElHeight/2},top:function(){return hostElPos.top},bottom:function(){return hostElPos.top+hostElPos.height}};switch(pos0){case"right":targetElPos={top:shiftHeight[pos1](),left:shiftWidth[pos0]()};break;case"left":targetElPos={top:shiftHeight[pos1](),left:hostElPos.left-targetElWidth};break;case"bottom":targetElPos={top:shiftHeight[pos0](),left:shiftWidth[pos1]()};break;default:targetElPos={top:hostElPos.top-targetElHeight,left:shiftWidth[pos1]()}}return targetElPos}}}]),angular.module("ui.bootstrap.position").value("$positionSuppressWarning",!1).service("$position",["$log","$positionSuppressWarning","$uibPosition",function($log,$positionSuppressWarning,$uibPosition){$positionSuppressWarning||$log.warn("$position is now deprecated. Use $uibPosition instead."),angular.extend(this,$uibPosition)}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null,shortcutPropagation:!1}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError",function($scope,$attrs,$parse,$interpolate,$log,dateFilter,datepickerConfig,$datepickerSuppressError){var self=this,ngModelCtrl={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(key,index){self[key]=angular.isDefined($attrs[key])?index<6?$interpolate($attrs[key])($scope.$parent):$scope.$parent.$eval($attrs[key]):datepickerConfig[key]}),angular.forEach(["minDate","maxDate"],function(key){$attrs[key]?$scope.$parent.$watch($parse($attrs[key]),function(value){self[key]=value?new Date(value):null,self.refreshView()}):self[key]=datepickerConfig[key]?new Date(datepickerConfig[key]):null}),angular.forEach(["minMode","maxMode"],function(key){$attrs[key]?$scope.$parent.$watch($parse($attrs[key]),function(value){self[key]=angular.isDefined(value)?value:$attrs[key],$scope[key]=self[key],("minMode"==key&&self.modes.indexOf($scope.datepickerMode)<self.modes.indexOf(self[key])||"maxMode"==key&&self.modes.indexOf($scope.datepickerMode)>self.modes.indexOf(self[key]))&&($scope.datepickerMode=self[key])}):(self[key]=datepickerConfig[key]||null,$scope[key]=self[key])}),$scope.datepickerMode=$scope.datepickerMode||datepickerConfig.datepickerMode,$scope.uniqueId="datepicker-"+$scope.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined($attrs.initDate)?(this.activeDate=$scope.$parent.$eval($attrs.initDate)||new Date,$scope.$parent.$watch($attrs.initDate,function(initDate){initDate&&(ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue)||ngModelCtrl.$invalid)&&(self.activeDate=initDate,self.refreshView())})):this.activeDate=new Date,$scope.isActive=function(dateObject){return 0===self.compare(dateObject.date,self.activeDate)&&($scope.activeDateId=dateObject.uid,!0)},this.init=function(ngModelCtrl_){ngModelCtrl=ngModelCtrl_,ngModelCtrl.$render=function(){self.render()}},this.render=function(){if(ngModelCtrl.$viewValue){var date=new Date(ngModelCtrl.$viewValue),isValid=!isNaN(date);isValid?this.activeDate=date:$datepickerSuppressError||$log.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var date=ngModelCtrl.$viewValue?new Date(ngModelCtrl.$viewValue):null;ngModelCtrl.$setValidity("dateDisabled",!date||this.element&&!this.isDisabled(date))}},this.createDateObject=function(date,format){var model=ngModelCtrl.$viewValue?new Date(ngModelCtrl.$viewValue):null;return{date:date,label:dateFilter(date,format),selected:model&&0===this.compare(date,model),disabled:this.isDisabled(date),current:0===this.compare(date,new Date),customClass:this.customClass(date)}},this.isDisabled=function(date){return this.minDate&&this.compare(date,this.minDate)<0||this.maxDate&&this.compare(date,this.maxDate)>0||$attrs.dateDisabled&&$scope.dateDisabled({date:date,mode:$scope.datepickerMode})},this.customClass=function(date){return $scope.customClass({date:date,mode:$scope.datepickerMode})},this.split=function(arr,size){for(var arrays=[];arr.length>0;)arrays.push(arr.splice(0,size));return arrays},$scope.select=function(date){if($scope.datepickerMode===self.minMode){var dt=ngModelCtrl.$viewValue?new Date(ngModelCtrl.$viewValue):new Date(0,0,0,0,0,0,0);dt.setFullYear(date.getFullYear(),date.getMonth(),date.getDate()),ngModelCtrl.$setViewValue(dt),ngModelCtrl.$render()}else self.activeDate=date,$scope.datepickerMode=self.modes[self.modes.indexOf($scope.datepickerMode)-1]},$scope.move=function(direction){var year=self.activeDate.getFullYear()+direction*(self.step.years||0),month=self.activeDate.getMonth()+direction*(self.step.months||0);self.activeDate.setFullYear(year,month,1),self.refreshView()},$scope.toggleMode=function(direction){direction=direction||1,$scope.datepickerMode===self.maxMode&&1===direction||$scope.datepickerMode===self.minMode&&direction===-1||($scope.datepickerMode=self.modes[self.modes.indexOf($scope.datepickerMode)+direction])},$scope.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var focusElement=function(){self.element[0].focus()};$scope.$on("uib:datepicker.focus",focusElement),$scope.keydown=function(evt){var key=$scope.keys[evt.which];if(key&&!evt.shiftKey&&!evt.altKey)if(evt.preventDefault(),self.shortcutPropagation||evt.stopPropagation(),"enter"===key||"space"===key){if(self.isDisabled(self.activeDate))return;$scope.select(self.activeDate)}else!evt.ctrlKey||"up"!==key&&"down"!==key?(self.handleKeyDown(key,evt),self.refreshView()):$scope.toggleMode("up"===key?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(scope,$element,dateFilter){function getDaysInMonth(year,month){return 1!==month||year%4!==0||year%100===0&&year%400!==0?DAYS_IN_MONTH[month]:29}function getISO8601WeekNumber(date){var checkDate=new Date(date);checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7));var time=checkDate.getTime();return checkDate.setMonth(0),checkDate.setDate(1),Math.floor(Math.round((time-checkDate)/864e5)/7)+1}var DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=$element,this.init=function(ctrl){angular.extend(ctrl,this),scope.showWeeks=ctrl.showWeeks,ctrl.refreshView()},this.getDates=function(startDate,n){for(var date,dates=new Array(n),current=new Date(startDate),i=0;i<n;)date=new Date(current),dates[i++]=date,current.setDate(current.getDate()+1);return dates},this._refreshView=function(){var year=this.activeDate.getFullYear(),month=this.activeDate.getMonth(),firstDayOfMonth=new Date(this.activeDate);firstDayOfMonth.setFullYear(year,month,1);var difference=this.startingDay-firstDayOfMonth.getDay(),numDisplayedFromPreviousMonth=difference>0?7-difference:-difference,firstDate=new Date(firstDayOfMonth);numDisplayedFromPreviousMonth>0&&firstDate.setDate(-numDisplayedFromPreviousMonth+1);for(var days=this.getDates(firstDate,42),i=0;i<42;i++)days[i]=angular.extend(this.createDateObject(days[i],this.formatDay),{secondary:days[i].getMonth()!==month,uid:scope.uniqueId+"-"+i});scope.labels=new Array(7);for(var j=0;j<7;j++)scope.labels[j]={abbr:dateFilter(days[j].date,this.formatDayHeader),full:dateFilter(days[j].date,"EEEE")};if(scope.title=dateFilter(this.activeDate,this.formatDayTitle),scope.rows=this.split(days,7),scope.showWeeks){scope.weekNumbers=[];for(var thursdayIndex=(11-this.startingDay)%7,numWeeks=scope.rows.length,curWeek=0;curWeek<numWeeks;curWeek++)scope.weekNumbers.push(getISO8601WeekNumber(scope.rows[curWeek][thursdayIndex].date))}},this.compare=function(date1,date2){return new Date(date1.getFullYear(),date1.getMonth(),date1.getDate())-new Date(date2.getFullYear(),date2.getMonth(),date2.getDate())},this.handleKeyDown=function(key,evt){var date=this.activeDate.getDate();if("left"===key)date-=1;else if("up"===key)date-=7;else if("right"===key)date+=1;else if("down"===key)date+=7;else if("pageup"===key||"pagedown"===key){var month=this.activeDate.getMonth()+("pageup"===key?-1:1);this.activeDate.setMonth(month,1),date=Math.min(getDaysInMonth(this.activeDate.getFullYear(),this.activeDate.getMonth()),date)}else"home"===key?date=1:"end"===key&&(date=getDaysInMonth(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(date)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(scope,$element,dateFilter){this.step={years:1},this.element=$element,this.init=function(ctrl){angular.extend(ctrl,this),ctrl.refreshView()},this._refreshView=function(){for(var date,months=new Array(12),year=this.activeDate.getFullYear(),i=0;i<12;i++)date=new Date(this.activeDate),date.setFullYear(year,i,1),months[i]=angular.extend(this.createDateObject(date,this.formatMonth),{uid:scope.uniqueId+"-"+i});scope.title=dateFilter(this.activeDate,this.formatMonthTitle),scope.rows=this.split(months,3)},this.compare=function(date1,date2){return new Date(date1.getFullYear(),date1.getMonth())-new Date(date2.getFullYear(),date2.getMonth())},this.handleKeyDown=function(key,evt){var date=this.activeDate.getMonth();if("left"===key)date-=1;else if("up"===key)date-=3;else if("right"===key)date+=1;else if("down"===key)date+=3;else if("pageup"===key||"pagedown"===key){var year=this.activeDate.getFullYear()+("pageup"===key?-1:1);this.activeDate.setFullYear(year)}else"home"===key?date=0:"end"===key&&(date=11);this.activeDate.setMonth(date)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(scope,$element,dateFilter){function getStartingYear(year){return parseInt((year-1)/range,10)*range+1}var range;this.element=$element,this.yearpickerInit=function(){range=this.yearRange,this.step={years:range}},this._refreshView=function(){for(var date,years=new Array(range),i=0,start=getStartingYear(this.activeDate.getFullYear());i<range;i++)date=new Date(this.activeDate),date.setFullYear(start+i,0,1),years[i]=angular.extend(this.createDateObject(date,this.formatYear),{uid:scope.uniqueId+"-"+i});scope.title=[years[0].label,years[range-1].label].join(" - "),scope.rows=this.split(years,5)},this.compare=function(date1,date2){return date1.getFullYear()-date2.getFullYear()},this.handleKeyDown=function(key,evt){var date=this.activeDate.getFullYear();"left"===key?date-=1:"up"===key?date-=5:"right"===key?date+=1:"down"===key?date+=5:"pageup"===key||"pagedown"===key?date+=("pageup"===key?-1:1)*this.step.years:"home"===key?date=getStartingYear(this.activeDate.getFullYear()):"end"===key&&(date=getStartingYear(this.activeDate.getFullYear())+range-1),this.activeDate.setFullYear(date)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(scope,element,attrs,ctrls){var datepickerCtrl=ctrls[0],ngModelCtrl=ctrls[1];datepickerCtrl.init(ngModelCtrl)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/datepicker/day.html"},require:["^?uibDatepicker","uibDaypicker","^?datepicker"],controller:"UibDaypickerController",link:function(scope,element,attrs,ctrls){var datepickerCtrl=ctrls[0]||ctrls[2],daypickerCtrl=ctrls[1];daypickerCtrl.init(datepickerCtrl)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/datepicker/month.html"},require:["^?uibDatepicker","uibMonthpicker","^?datepicker"],controller:"UibMonthpickerController",link:function(scope,element,attrs,ctrls){var datepickerCtrl=ctrls[0]||ctrls[2],monthpickerCtrl=ctrls[1];monthpickerCtrl.init(datepickerCtrl)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/datepicker/year.html"},require:["^?uibDatepicker","uibYearpicker","^?datepicker"],controller:"UibYearpickerController",link:function(scope,element,attrs,ctrls){var ctrl=ctrls[0]||ctrls[2];angular.extend(ctrl,ctrls[1]),ctrl.yearpickerInit(),ctrl.refreshView()}}}).constant("uibDatepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"template/datepicker/popup.html",datepickerTemplateUrl:"template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout",function(scope,element,attrs,$compile,$parse,$document,$rootScope,$position,dateFilter,dateParser,datepickerPopupConfig,$timeout){function cameltoDash(string){return string.replace(/([A-Z])/g,function($1){return"-"+$1.toLowerCase()})}function parseDate(viewValue){angular.isNumber(viewValue)&&(viewValue=new Date(viewValue));{if(!viewValue)return null;if(angular.isDate(viewValue)&&!isNaN(viewValue))return viewValue;if(angular.isString(viewValue)){var date=dateParser.parse(viewValue,dateFormat,scope.date);return isNaN(date)?void 0:date}}}function validator(modelValue,viewValue){var value=modelValue||viewValue;if(!attrs.ngRequired&&!value)return!0;if(angular.isNumber(value)&&(value=new Date(value)),value){if(angular.isDate(value)&&!isNaN(value))return!0;if(angular.isString(value)){var date=dateParser.parse(value,dateFormat);return!isNaN(date)}return!1}return!0}function documentClickBind(event){var popup=$popup[0],dpContainsTarget=element[0].contains(event.target),popupContainsTarget=void 0!==popup.contains&&popup.contains(event.target);!scope.isOpen||dpContainsTarget||popupContainsTarget||scope.$apply(function(){scope.isOpen=!1})}function inputKeydownBind(evt){27===evt.which&&scope.isOpen?(evt.preventDefault(),evt.stopPropagation(),scope.$apply(function(){scope.isOpen=!1}),element[0].focus()):40!==evt.which||scope.isOpen||(evt.preventDefault(),evt.stopPropagation(),scope.$apply(function(){scope.isOpen=!0}))}var dateFormat,closeOnDateSelection,appendToBody,onOpenFocus,datepickerPopupTemplateUrl,datepickerTemplateUrl,popupEl,datepickerEl,ngModel,$popup,cache={},isHtml5DateInput=!1;scope.watchData={},this.init=function(_ngModel_){if(ngModel=_ngModel_,closeOnDateSelection=angular.isDefined(attrs.closeOnDateSelection)?scope.$parent.$eval(attrs.closeOnDateSelection):datepickerPopupConfig.closeOnDateSelection,appendToBody=angular.isDefined(attrs.datepickerAppendToBody)?scope.$parent.$eval(attrs.datepickerAppendToBody):datepickerPopupConfig.appendToBody,onOpenFocus=angular.isDefined(attrs.onOpenFocus)?scope.$parent.$eval(attrs.onOpenFocus):datepickerPopupConfig.onOpenFocus,datepickerPopupTemplateUrl=angular.isDefined(attrs.datepickerPopupTemplateUrl)?attrs.datepickerPopupTemplateUrl:datepickerPopupConfig.datepickerPopupTemplateUrl,datepickerTemplateUrl=angular.isDefined(attrs.datepickerTemplateUrl)?attrs.datepickerTemplateUrl:datepickerPopupConfig.datepickerTemplateUrl,scope.showButtonBar=angular.isDefined(attrs.showButtonBar)?scope.$parent.$eval(attrs.showButtonBar):datepickerPopupConfig.showButtonBar,datepickerPopupConfig.html5Types[attrs.type]?(dateFormat=datepickerPopupConfig.html5Types[attrs.type],isHtml5DateInput=!0):(dateFormat=attrs.datepickerPopup||attrs.uibDatepickerPopup||datepickerPopupConfig.datepickerPopup,attrs.$observe("uibDatepickerPopup",function(value,oldValue){var newDateFormat=value||datepickerPopupConfig.datepickerPopup;if(newDateFormat!==dateFormat&&(dateFormat=newDateFormat,ngModel.$modelValue=null,!dateFormat))throw new Error("uibDatepickerPopup must have a date format specified.")})),!dateFormat)throw new Error("uibDatepickerPopup must have a date format specified.");if(isHtml5DateInput&&attrs.datepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");if(popupEl=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),popupEl.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":datepickerPopupTemplateUrl}),datepickerEl=angular.element(popupEl.children()[0]),datepickerEl.attr("template-url",datepickerTemplateUrl),isHtml5DateInput&&"month"===attrs.type&&(datepickerEl.attr("datepicker-mode",'"month"'),datepickerEl.attr("min-mode","month")),attrs.datepickerOptions){var options=scope.$parent.$eval(attrs.datepickerOptions);options&&options.initDate&&(scope.initDate=options.initDate,datepickerEl.attr("init-date","initDate"),delete options.initDate),angular.forEach(options,function(value,option){datepickerEl.attr(cameltoDash(option),value)})}angular.forEach(["minMode","maxMode","minDate","maxDate","datepickerMode","initDate","shortcutPropagation"],function(key){if(attrs[key]){var getAttribute=$parse(attrs[key]);if(scope.$parent.$watch(getAttribute,function(value){scope.watchData[key]=value,"minDate"!==key&&"maxDate"!==key||(cache[key]=new Date(value))}),datepickerEl.attr(cameltoDash(key),"watchData."+key),"datepickerMode"===key){var setAttribute=getAttribute.assign;scope.$watch("watchData."+key,function(value,oldvalue){angular.isFunction(setAttribute)&&value!==oldvalue&&setAttribute(scope.$parent,value)})}}}),attrs.dateDisabled&&datepickerEl.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),attrs.showWeeks&&datepickerEl.attr("show-weeks",attrs.showWeeks),attrs.customClass&&datepickerEl.attr("custom-class","customClass({ date: date, mode: mode })"),isHtml5DateInput?ngModel.$formatters.push(function(value){return scope.date=value,value}):(ngModel.$$parserName="date",ngModel.$validators.date=validator,ngModel.$parsers.unshift(parseDate),ngModel.$formatters.push(function(value){return scope.date=value,ngModel.$isEmpty(value)?value:dateFilter(value,dateFormat)})),ngModel.$viewChangeListeners.push(function(){scope.date=dateParser.parse(ngModel.$viewValue,dateFormat,scope.date)}),element.bind("keydown",inputKeydownBind),$popup=$compile(popupEl)(scope),popupEl.remove(),appendToBody?$document.find("body").append($popup):element.after($popup),scope.$on("$destroy",function(){scope.isOpen===!0&&($rootScope.$$phase||scope.$apply(function(){scope.isOpen=!1})),$popup.remove(),element.unbind("keydown",inputKeydownBind),$document.unbind("click",documentClickBind)})},scope.getText=function(key){return scope[key+"Text"]||datepickerPopupConfig[key+"Text"]},scope.isDisabled=function(date){return"today"===date&&(date=new Date),scope.watchData.minDate&&scope.compare(date,cache.minDate)<0||scope.watchData.maxDate&&scope.compare(date,cache.maxDate)>0},scope.compare=function(date1,date2){return new Date(date1.getFullYear(),date1.getMonth(),date1.getDate())-new Date(date2.getFullYear(),date2.getMonth(),date2.getDate())},scope.dateSelection=function(dt){angular.isDefined(dt)&&(scope.date=dt);var date=scope.date?dateFilter(scope.date,dateFormat):null;element.val(date),ngModel.$setViewValue(date),closeOnDateSelection&&(scope.isOpen=!1,element[0].focus())},scope.keydown=function(evt){27===evt.which&&(scope.isOpen=!1,element[0].focus())},scope.select=function(date){if("today"===date){var today=new Date;angular.isDate(scope.date)?(date=new Date(scope.date),date.setFullYear(today.getFullYear(),today.getMonth(),today.getDate())):date=new Date(today.setHours(0,0,0,0))}scope.dateSelection(date)},scope.close=function(){scope.isOpen=!1,element[0].focus()},scope.$watch("isOpen",function(value){value?(scope.position=appendToBody?$position.offset(element):$position.position(element),scope.position.top=scope.position.top+element.prop("offsetHeight"),$timeout(function(){onOpenFocus&&scope.$broadcast("uib:datepicker.focus"),$document.bind("click",documentClickBind)},0,!1)):$document.unbind("click",documentClickBind)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(scope,element,attrs,ctrls){var ngModel=ctrls[0],ctrl=ctrls[1];ctrl.init(ngModel)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.datepicker").value("$datepickerSuppressWarning",!1).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","$datepickerSuppressWarning",function($scope,$attrs,$parse,$interpolate,$log,dateFilter,datepickerConfig,$datepickerSuppressError,$datepickerSuppressWarning){$datepickerSuppressWarning||$log.warn("DatepickerController is now deprecated. Use UibDatepickerController instead.");var self=this,ngModelCtrl={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(key,index){self[key]=angular.isDefined($attrs[key])?index<6?$interpolate($attrs[key])($scope.$parent):$scope.$parent.$eval($attrs[key]):datepickerConfig[key]}),angular.forEach(["minDate","maxDate"],function(key){$attrs[key]?$scope.$parent.$watch($parse($attrs[key]),function(value){self[key]=value?new Date(value):null,self.refreshView()}):self[key]=datepickerConfig[key]?new Date(datepickerConfig[key]):null}),angular.forEach(["minMode","maxMode"],function(key){$attrs[key]?$scope.$parent.$watch($parse($attrs[key]),function(value){self[key]=angular.isDefined(value)?value:$attrs[key],$scope[key]=self[key],("minMode"==key&&self.modes.indexOf($scope.datepickerMode)<self.modes.indexOf(self[key])||"maxMode"==key&&self.modes.indexOf($scope.datepickerMode)>self.modes.indexOf(self[key]))&&($scope.datepickerMode=self[key])}):(self[key]=datepickerConfig[key]||null,$scope[key]=self[key])}),$scope.datepickerMode=$scope.datepickerMode||datepickerConfig.datepickerMode,$scope.uniqueId="datepicker-"+$scope.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined($attrs.initDate)?(this.activeDate=$scope.$parent.$eval($attrs.initDate)||new Date,$scope.$parent.$watch($attrs.initDate,function(initDate){initDate&&(ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue)||ngModelCtrl.$invalid)&&(self.activeDate=initDate,self.refreshView())})):this.activeDate=new Date,$scope.isActive=function(dateObject){return 0===self.compare(dateObject.date,self.activeDate)&&($scope.activeDateId=dateObject.uid,!0)},this.init=function(ngModelCtrl_){ngModelCtrl=ngModelCtrl_,ngModelCtrl.$render=function(){self.render()}},this.render=function(){if(ngModelCtrl.$viewValue){var date=new Date(ngModelCtrl.$viewValue),isValid=!isNaN(date);isValid?this.activeDate=date:$datepickerSuppressError||$log.error('Datepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var date=ngModelCtrl.$viewValue?new Date(ngModelCtrl.$viewValue):null;ngModelCtrl.$setValidity("dateDisabled",!date||this.element&&!this.isDisabled(date))}},this.createDateObject=function(date,format){var model=ngModelCtrl.$viewValue?new Date(ngModelCtrl.$viewValue):null;return{date:date,label:dateFilter(date,format),selected:model&&0===this.compare(date,model),disabled:this.isDisabled(date),current:0===this.compare(date,new Date),customClass:this.customClass(date)}},this.isDisabled=function(date){return this.minDate&&this.compare(date,this.minDate)<0||this.maxDate&&this.compare(date,this.maxDate)>0||$attrs.dateDisabled&&$scope.dateDisabled({date:date,mode:$scope.datepickerMode})},this.customClass=function(date){return $scope.customClass({date:date,mode:$scope.datepickerMode})},this.split=function(arr,size){for(var arrays=[];arr.length>0;)arrays.push(arr.splice(0,size));return arrays},this.fixTimeZone=function(date){var hours=date.getHours();date.setHours(23===hours?hours+2:0)},$scope.select=function(date){if($scope.datepickerMode===self.minMode){var dt=ngModelCtrl.$viewValue?new Date(ngModelCtrl.$viewValue):new Date(0,0,0,0,0,0,0);dt.setFullYear(date.getFullYear(),date.getMonth(),date.getDate()),ngModelCtrl.$setViewValue(dt),ngModelCtrl.$render()}else self.activeDate=date,$scope.datepickerMode=self.modes[self.modes.indexOf($scope.datepickerMode)-1]},$scope.move=function(direction){var year=self.activeDate.getFullYear()+direction*(self.step.years||0),month=self.activeDate.getMonth()+direction*(self.step.months||0);self.activeDate.setFullYear(year,month,1),self.refreshView()},$scope.toggleMode=function(direction){direction=direction||1,$scope.datepickerMode===self.maxMode&&1===direction||$scope.datepickerMode===self.minMode&&direction===-1||($scope.datepickerMode=self.modes[self.modes.indexOf($scope.datepickerMode)+direction])},$scope.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var focusElement=function(){self.element[0].focus()};$scope.$on("uib:datepicker.focus",focusElement),$scope.keydown=function(evt){var key=$scope.keys[evt.which];if(key&&!evt.shiftKey&&!evt.altKey)if(evt.preventDefault(),self.shortcutPropagation||evt.stopPropagation(),"enter"===key||"space"===key){if(self.isDisabled(self.activeDate))return;$scope.select(self.activeDate)}else!evt.ctrlKey||"up"!==key&&"down"!==key?(self.handleKeyDown(key,evt),self.refreshView()):$scope.toggleMode("up"===key?1:-1)}}]).directive("datepicker",["$log","$datepickerSuppressWarning",function($log,$datepickerSuppressWarning){return{replace:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["datepicker","^ngModel"],controller:"DatepickerController",controllerAs:"datepicker",link:function(scope,element,attrs,ctrls){
$datepickerSuppressWarning||$log.warn("datepicker is now deprecated. Use uib-datepicker instead.");var datepickerCtrl=ctrls[0],ngModelCtrl=ctrls[1];datepickerCtrl.init(ngModelCtrl)}}}]).directive("daypicker",["$log","$datepickerSuppressWarning",function($log,$datepickerSuppressWarning){return{replace:!0,templateUrl:"template/datepicker/day.html",require:["^datepicker","daypicker"],controller:"UibDaypickerController",link:function(scope,element,attrs,ctrls){$datepickerSuppressWarning||$log.warn("daypicker is now deprecated. Use uib-daypicker instead.");var datepickerCtrl=ctrls[0],daypickerCtrl=ctrls[1];daypickerCtrl.init(datepickerCtrl)}}}]).directive("monthpicker",["$log","$datepickerSuppressWarning",function($log,$datepickerSuppressWarning){return{replace:!0,templateUrl:"template/datepicker/month.html",require:["^datepicker","monthpicker"],controller:"UibMonthpickerController",link:function(scope,element,attrs,ctrls){$datepickerSuppressWarning||$log.warn("monthpicker is now deprecated. Use uib-monthpicker instead.");var datepickerCtrl=ctrls[0],monthpickerCtrl=ctrls[1];monthpickerCtrl.init(datepickerCtrl)}}}]).directive("yearpicker",["$log","$datepickerSuppressWarning",function($log,$datepickerSuppressWarning){return{replace:!0,templateUrl:"template/datepicker/year.html",require:["^datepicker","yearpicker"],controller:"UibYearpickerController",link:function(scope,element,attrs,ctrls){$datepickerSuppressWarning||$log.warn("yearpicker is now deprecated. Use uib-yearpicker instead.");var ctrl=ctrls[0];angular.extend(ctrl,ctrls[1]),ctrl.yearpickerInit(),ctrl.refreshView()}}}]).directive("datepickerPopup",["$log","$datepickerSuppressWarning",function($log,$datepickerSuppressWarning){return{require:["ngModel","datepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(scope,element,attrs,ctrls){$datepickerSuppressWarning||$log.warn("datepicker-popup is now deprecated. Use uib-datepicker-popup instead.");var ngModel=ctrls[0],ctrl=ctrls[1];ctrl.init(ngModel)}}}]).directive("datepickerPopupWrap",["$log","$datepickerSuppressWarning",function($log,$datepickerSuppressWarning){return{replace:!0,transclude:!0,templateUrl:function(element,attrs){return attrs.templateUrl||"template/datepicker/popup.html"},link:function(){$datepickerSuppressWarning||$log.warn("datepicker-popup-wrap is now deprecated. Use uib-datepicker-popup-wrap instead.")}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function($document,$rootScope){var openScope=null;this.open=function(dropdownScope){openScope||($document.bind("click",closeDropdown),$document.bind("keydown",keybindFilter)),openScope&&openScope!==dropdownScope&&(openScope.isOpen=!1),openScope=dropdownScope},this.close=function(dropdownScope){openScope===dropdownScope&&(openScope=null,$document.unbind("click",closeDropdown),$document.unbind("keydown",keybindFilter))};var closeDropdown=function(evt){if(openScope&&(!evt||"disabled"!==openScope.getAutoClose())){var toggleElement=openScope.getToggleElement();if(!(evt&&toggleElement&&toggleElement[0].contains(evt.target))){var dropdownElement=openScope.getDropdownElement();evt&&"outsideClick"===openScope.getAutoClose()&&dropdownElement&&dropdownElement[0].contains(evt.target)||(openScope.isOpen=!1,$rootScope.$$phase||openScope.$apply())}}},keybindFilter=function(evt){27===evt.which?(openScope.focusToggleElement(),closeDropdown()):openScope.isKeynavEnabled()&&/(38|40)/.test(evt.which)&&openScope.isOpen&&(evt.preventDefault(),evt.stopPropagation(),openScope.focusDropdownEntry(evt.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function($scope,$element,$attrs,$parse,dropdownConfig,uibDropdownService,$animate,$position,$document,$compile,$templateRequest){var templateScope,getIsOpen,self=this,scope=$scope.$new(),openClass=dropdownConfig.openClass,setIsOpen=angular.noop,toggleInvoker=$attrs.onToggle?$parse($attrs.onToggle):angular.noop,appendToBody=!1,keynavEnabled=!1;$element.addClass("dropdown"),this.init=function(){$attrs.isOpen&&(getIsOpen=$parse($attrs.isOpen),setIsOpen=getIsOpen.assign,$scope.$watch(getIsOpen,function(value){scope.isOpen=!!value})),appendToBody=angular.isDefined($attrs.dropdownAppendToBody),keynavEnabled=angular.isDefined($attrs.uibKeyboardNav),appendToBody&&self.dropdownMenu&&($document.find("body").append(self.dropdownMenu),$element.on("$destroy",function(){self.dropdownMenu.remove()}))},this.toggle=function(open){return scope.isOpen=arguments.length?!!open:!scope.isOpen},this.isOpen=function(){return scope.isOpen},scope.getToggleElement=function(){return self.toggleElement},scope.getAutoClose=function(){return $attrs.autoClose||"always"},scope.getElement=function(){return $element},scope.isKeynavEnabled=function(){return keynavEnabled},scope.focusDropdownEntry=function(keyCode){var elems=self.dropdownMenu?angular.element(self.dropdownMenu).find("a"):angular.element($element).find("ul").eq(0).find("a");switch(keyCode){case 40:angular.isNumber(self.selectedOption)?self.selectedOption=self.selectedOption===elems.length-1?self.selectedOption:self.selectedOption+1:self.selectedOption=0;break;case 38:angular.isNumber(self.selectedOption)?self.selectedOption=0===self.selectedOption?0:self.selectedOption-1:self.selectedOption=elems.length-1}elems[self.selectedOption].focus()},scope.getDropdownElement=function(){return self.dropdownMenu},scope.focusToggleElement=function(){self.toggleElement&&self.toggleElement[0].focus()},scope.$watch("isOpen",function(isOpen,wasOpen){if(appendToBody&&self.dropdownMenu){var pos=$position.positionElements($element,self.dropdownMenu,"bottom-left",!0),css={top:pos.top+"px",display:isOpen?"block":"none"},rightalign=self.dropdownMenu.hasClass("dropdown-menu-right");rightalign?(css.left="auto",css.right=window.innerWidth-(pos.left+$element.prop("offsetWidth"))+"px"):(css.left=pos.left+"px",css.right="auto"),self.dropdownMenu.css(css)}if($animate[isOpen?"addClass":"removeClass"]($element,openClass).then(function(){angular.isDefined(isOpen)&&isOpen!==wasOpen&&toggleInvoker($scope,{open:!!isOpen})}),isOpen)self.dropdownMenuTemplateUrl&&$templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent){templateScope=scope.$new(),$compile(tplContent.trim())(templateScope,function(dropdownElement){var newEl=dropdownElement;self.dropdownMenu.replaceWith(newEl),self.dropdownMenu=newEl})}),scope.focusToggleElement(),uibDropdownService.open(scope);else{if(self.dropdownMenuTemplateUrl){templateScope&&templateScope.$destroy();var newEl=angular.element('<ul class="dropdown-menu"></ul>');self.dropdownMenu.replaceWith(newEl),self.dropdownMenu=newEl}uibDropdownService.close(scope),self.selectedOption=null}angular.isFunction(setIsOpen)&&setIsOpen($scope,isOpen)}),$scope.$on("$locationChangeSuccess",function(){"disabled"!==scope.getAutoClose()&&(scope.isOpen=!1)});var offDestroy=$scope.$on("$destroy",function(){scope.$destroy()});scope.$on("$destroy",offDestroy)}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(scope,element,attrs,dropdownCtrl){dropdownCtrl.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"AC",require:"?^uibDropdown",link:function(scope,element,attrs,dropdownCtrl){if(dropdownCtrl&&!angular.isDefined(attrs.dropdownNested)){element.addClass("dropdown-menu");var tplUrl=attrs.templateUrl;tplUrl&&(dropdownCtrl.dropdownMenuTemplateUrl=tplUrl),dropdownCtrl.dropdownMenu||(dropdownCtrl.dropdownMenu=element)}}}}).directive("uibKeyboardNav",function(){return{restrict:"A",require:"?^uibDropdown",link:function(scope,element,attrs,dropdownCtrl){element.bind("keydown",function(e){if([38,40].indexOf(e.which)!==-1){e.preventDefault(),e.stopPropagation();var elems=dropdownCtrl.dropdownMenu.find("a");switch(e.which){case 40:angular.isNumber(dropdownCtrl.selectedOption)?dropdownCtrl.selectedOption=dropdownCtrl.selectedOption===elems.length-1?dropdownCtrl.selectedOption:dropdownCtrl.selectedOption+1:dropdownCtrl.selectedOption=0;break;case 38:angular.isNumber(dropdownCtrl.selectedOption)?dropdownCtrl.selectedOption=0===dropdownCtrl.selectedOption?0:dropdownCtrl.selectedOption-1:dropdownCtrl.selectedOption=elems.length-1}elems[dropdownCtrl.selectedOption].focus()}})}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(scope,element,attrs,dropdownCtrl){if(dropdownCtrl){element.addClass("dropdown-toggle"),dropdownCtrl.toggleElement=element;var toggleDropdown=function(event){event.preventDefault(),element.hasClass("disabled")||attrs.disabled||scope.$apply(function(){dropdownCtrl.toggle()})};element.bind("click",toggleDropdown),element.attr({"aria-haspopup":!0,"aria-expanded":!1}),scope.$watch(dropdownCtrl.isOpen,function(isOpen){element.attr("aria-expanded",!!isOpen)}),scope.$on("$destroy",function(){element.unbind("click",toggleDropdown)})}}}}),angular.module("ui.bootstrap.dropdown").value("$dropdownSuppressWarning",!1).service("dropdownService",["$log","$dropdownSuppressWarning","uibDropdownService",function($log,$dropdownSuppressWarning,uibDropdownService){$dropdownSuppressWarning||$log.warn("dropdownService is now deprecated. Use uibDropdownService instead."),angular.extend(this,uibDropdownService)}]).controller("DropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest","$log","$dropdownSuppressWarning",function($scope,$element,$attrs,$parse,dropdownConfig,uibDropdownService,$animate,$position,$document,$compile,$templateRequest,$log,$dropdownSuppressWarning){$dropdownSuppressWarning||$log.warn("DropdownController is now deprecated. Use UibDropdownController instead.");var templateScope,getIsOpen,self=this,scope=$scope.$new(),openClass=dropdownConfig.openClass,setIsOpen=angular.noop,toggleInvoker=$attrs.onToggle?$parse($attrs.onToggle):angular.noop,appendToBody=!1,keynavEnabled=!1;$element.addClass("dropdown"),this.init=function(){$attrs.isOpen&&(getIsOpen=$parse($attrs.isOpen),setIsOpen=getIsOpen.assign,$scope.$watch(getIsOpen,function(value){scope.isOpen=!!value})),appendToBody=angular.isDefined($attrs.dropdownAppendToBody),keynavEnabled=angular.isDefined($attrs.uibKeyboardNav),appendToBody&&self.dropdownMenu&&($document.find("body").append(self.dropdownMenu),$element.on("$destroy",function(){self.dropdownMenu.remove()}))},this.toggle=function(open){return scope.isOpen=arguments.length?!!open:!scope.isOpen},this.isOpen=function(){return scope.isOpen},scope.getToggleElement=function(){return self.toggleElement},scope.getAutoClose=function(){return $attrs.autoClose||"always"},scope.getElement=function(){return $element},scope.isKeynavEnabled=function(){return keynavEnabled},scope.focusDropdownEntry=function(keyCode){var elems=self.dropdownMenu?angular.element(self.dropdownMenu).find("a"):angular.element($element).find("ul").eq(0).find("a");switch(keyCode){case 40:angular.isNumber(self.selectedOption)?self.selectedOption=self.selectedOption===elems.length-1?self.selectedOption:self.selectedOption+1:self.selectedOption=0;break;case 38:angular.isNumber(self.selectedOption)?self.selectedOption=0===self.selectedOption?0:self.selectedOption-1:self.selectedOption=elems.length-1}elems[self.selectedOption].focus()},scope.getDropdownElement=function(){return self.dropdownMenu},scope.focusToggleElement=function(){self.toggleElement&&self.toggleElement[0].focus()},scope.$watch("isOpen",function(isOpen,wasOpen){if(appendToBody&&self.dropdownMenu){var pos=$position.positionElements($element,self.dropdownMenu,"bottom-left",!0),css={top:pos.top+"px",display:isOpen?"block":"none"},rightalign=self.dropdownMenu.hasClass("dropdown-menu-right");rightalign?(css.left="auto",css.right=window.innerWidth-(pos.left+$element.prop("offsetWidth"))+"px"):(css.left=pos.left+"px",css.right="auto"),self.dropdownMenu.css(css)}if($animate[isOpen?"addClass":"removeClass"]($element,openClass).then(function(){angular.isDefined(isOpen)&&isOpen!==wasOpen&&toggleInvoker($scope,{open:!!isOpen})}),isOpen)self.dropdownMenuTemplateUrl&&$templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent){templateScope=scope.$new(),$compile(tplContent.trim())(templateScope,function(dropdownElement){var newEl=dropdownElement;self.dropdownMenu.replaceWith(newEl),self.dropdownMenu=newEl})}),scope.focusToggleElement(),uibDropdownService.open(scope);else{if(self.dropdownMenuTemplateUrl){templateScope&&templateScope.$destroy();var newEl=angular.element('<ul class="dropdown-menu"></ul>');self.dropdownMenu.replaceWith(newEl),self.dropdownMenu=newEl}uibDropdownService.close(scope),self.selectedOption=null}angular.isFunction(setIsOpen)&&setIsOpen($scope,isOpen)}),$scope.$on("$locationChangeSuccess",function(){"disabled"!==scope.getAutoClose()&&(scope.isOpen=!1)});var offDestroy=$scope.$on("$destroy",function(){scope.$destroy()});scope.$on("$destroy",offDestroy)}]).directive("dropdown",["$log","$dropdownSuppressWarning",function($log,$dropdownSuppressWarning){return{controller:"DropdownController",link:function(scope,element,attrs,dropdownCtrl){$dropdownSuppressWarning||$log.warn("dropdown is now deprecated. Use uib-dropdown instead."),dropdownCtrl.init()}}}]).directive("dropdownMenu",["$log","$dropdownSuppressWarning",function($log,$dropdownSuppressWarning){return{restrict:"AC",require:"?^dropdown",link:function(scope,element,attrs,dropdownCtrl){if(dropdownCtrl&&!angular.isDefined(attrs.dropdownNested)){$dropdownSuppressWarning||$log.warn("dropdown-menu is now deprecated. Use uib-dropdown-menu instead."),element.addClass("dropdown-menu");var tplUrl=attrs.templateUrl;tplUrl&&(dropdownCtrl.dropdownMenuTemplateUrl=tplUrl),dropdownCtrl.dropdownMenu||(dropdownCtrl.dropdownMenu=element)}}}}]).directive("keyboardNav",["$log","$dropdownSuppressWarning",function($log,$dropdownSuppressWarning){return{restrict:"A",require:"?^dropdown",link:function(scope,element,attrs,dropdownCtrl){$dropdownSuppressWarning||$log.warn("keyboard-nav is now deprecated. Use uib-keyboard-nav instead."),element.bind("keydown",function(e){if([38,40].indexOf(e.which)!==-1){e.preventDefault(),e.stopPropagation();var elems=dropdownCtrl.dropdownMenu.find("a");switch(e.which){case 40:angular.isNumber(dropdownCtrl.selectedOption)?dropdownCtrl.selectedOption=dropdownCtrl.selectedOption===elems.length-1?dropdownCtrl.selectedOption:dropdownCtrl.selectedOption+1:dropdownCtrl.selectedOption=0;break;case 38:angular.isNumber(dropdownCtrl.selectedOption)?dropdownCtrl.selectedOption=0===dropdownCtrl.selectedOption?0:dropdownCtrl.selectedOption-1:dropdownCtrl.selectedOption=elems.length-1}elems[dropdownCtrl.selectedOption].focus()}})}}}]).directive("dropdownToggle",["$log","$dropdownSuppressWarning",function($log,$dropdownSuppressWarning){return{require:"?^dropdown",link:function(scope,element,attrs,dropdownCtrl){if($dropdownSuppressWarning||$log.warn("dropdown-toggle is now deprecated. Use uib-dropdown-toggle instead."),dropdownCtrl){element.addClass("dropdown-toggle"),dropdownCtrl.toggleElement=element;var toggleDropdown=function(event){event.preventDefault(),element.hasClass("disabled")||attrs.disabled||scope.$apply(function(){dropdownCtrl.toggle()})};element.bind("click",toggleDropdown),element.attr({"aria-haspopup":!0,"aria-expanded":!1}),scope.$watch(dropdownCtrl.isOpen,function(isOpen){element.attr("aria-expanded",!!isOpen)}),scope.$on("$destroy",function(){element.unbind("click",toggleDropdown)})}}}}]),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var stack=[];return{add:function(key,value){stack.push({key:key,value:value})},get:function(key){for(var i=0;i<stack.length;i++)if(key==stack[i].key)return stack[i]},keys:function(){for(var keys=[],i=0;i<stack.length;i++)keys.push(stack[i].key);return keys},top:function(){return stack[stack.length-1]},remove:function(key){for(var idx=-1,i=0;i<stack.length;i++)if(key==stack[i].key){idx=i;break}return stack.splice(idx,1)[0]},removeTop:function(){return stack.splice(stack.length-1,1)[0]},length:function(){return stack.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap"]).factory("$$multiMap",function(){return{createNew:function(){var map={};return{entries:function(){return Object.keys(map).map(function(key){return{key:key,value:map[key]}})},get:function(key){return map[key]},hasKey:function(key){return!!map[key]},keys:function(){return Object.keys(map)},put:function(key,value){map[key]||(map[key]=[]),map[key].push(value)},remove:function(key,value){var values=map[key];if(values){var idx=values.indexOf(value);idx!==-1&&values.splice(idx,1),values.length||delete map[key]}}}}}}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function($animate,$injector,$modalStack){function linkFn(scope,element,attrs){element.addClass("modal-backdrop"),attrs.modalInClass&&($animateCss?$animateCss(element,{addClass:attrs.modalInClass}).start():$animate.addClass(element,attrs.modalInClass),scope.$on($modalStack.NOW_CLOSING_EVENT,function(e,setIsAsync){var done=setIsAsync();$animateCss?$animateCss(element,{removeClass:attrs.modalInClass}).start().then(done):$animate.removeClass(element,attrs.modalInClass).then(done)}))}var $animateCss=null;return $injector.has("$animateCss")&&($animateCss=$injector.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(tElement,tAttrs){return tElement.addClass(tAttrs.backdropClass),linkFn}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animate","$injector",function($modalStack,$q,$animate,$injector){var $animateCss=null;return $injector.has("$animateCss")&&($animateCss=$injector.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(tElement,tAttrs){return tAttrs.templateUrl||"template/modal/window.html"},link:function(scope,element,attrs){element.addClass(attrs.windowClass||""),element.addClass(attrs.windowTopClass||""),scope.size=attrs.size,scope.close=function(evt){var modal=$modalStack.getTop();modal&&modal.value.backdrop&&"static"!==modal.value.backdrop&&evt.target===evt.currentTarget&&(evt.preventDefault(),evt.stopPropagation(),$modalStack.dismiss(modal.key,"backdrop click"))},element.on("click",scope.close),scope.$isRendered=!0;var modalRenderDeferObj=$q.defer();attrs.$observe("modalRender",function(value){"true"==value&&modalRenderDeferObj.resolve()}),modalRenderDeferObj.promise.then(function(){var animationPromise=null;attrs.modalInClass&&(animationPromise=$animateCss?$animateCss(element,{addClass:attrs.modalInClass}).start():$animate.addClass(element,attrs.modalInClass),scope.$on($modalStack.NOW_CLOSING_EVENT,function(e,setIsAsync){var done=setIsAsync();$animateCss?$animateCss(element,{removeClass:attrs.modalInClass}).start().then(done):$animate.removeClass(element,attrs.modalInClass).then(done)})),$q.when(animationPromise).then(function(){var inputWithAutofocus=element[0].querySelector("[autofocus]");inputWithAutofocus?inputWithAutofocus.focus():element[0].focus()});var modal=$modalStack.getTop();modal&&$modalStack.modalRendered(modal.key)})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(tElement,tAttrs){tAttrs.modalAnimation&&tElement.addClass(tAttrs.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function($scope,$element,$attrs,controller,$transclude){$transclude($scope.$parent,function(clone){$element.empty(),$element.append(clone)})}}}).factory("$uibModalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap",function($animate,$timeout,$document,$compile,$rootScope,$q,$injector,$$multiMap,$$stackedMap){function backdropIndex(){for(var topBackdropIndex=-1,opened=openedWindows.keys(),i=0;i<opened.length;i++)openedWindows.get(opened[i]).value.backdrop&&(topBackdropIndex=i);return topBackdropIndex}function removeModalWindow(modalInstance,elementToReceiveFocus){var body=$document.find("body").eq(0),modalWindow=openedWindows.get(modalInstance).value;openedWindows.remove(modalInstance),removeAfterAnimate(modalWindow.modalDomEl,modalWindow.modalScope,function(){var modalBodyClass=modalWindow.openedClass||OPENED_MODAL_CLASS;openedClasses.remove(modalBodyClass,modalInstance),body.toggleClass(modalBodyClass,openedClasses.hasKey(modalBodyClass)),toggleTopWindowClass(!0)}),checkRemoveBackdrop(),elementToReceiveFocus&&elementToReceiveFocus.focus?elementToReceiveFocus.focus():body.focus()}function toggleTopWindowClass(toggleSwitch){var modalWindow;openedWindows.length()>0&&(modalWindow=openedWindows.top().value,modalWindow.modalDomEl.toggleClass(modalWindow.windowTopClass||"",toggleSwitch))}function checkRemoveBackdrop(){if(backdropDomEl&&backdropIndex()==-1){var backdropScopeRef=backdropScope;removeAfterAnimate(backdropDomEl,backdropScope,function(){backdropScopeRef=null}),backdropDomEl=void 0,backdropScope=void 0}}function removeAfterAnimate(domEl,scope,done){function afterAnimating(){afterAnimating.done||(afterAnimating.done=!0,$animateCss?$animateCss(domEl,{event:"leave"}).start().then(function(){domEl.remove()}):$animate.leave(domEl),scope.$destroy(),done&&done())}var asyncDeferred,asyncPromise=null,setIsAsync=function(){return asyncDeferred||(asyncDeferred=$q.defer(),asyncPromise=asyncDeferred.promise),function(){asyncDeferred.resolve()}};return scope.$broadcast($modalStack.NOW_CLOSING_EVENT,setIsAsync),$q.when(asyncPromise).then(afterAnimating)}function broadcastClosing(modalWindow,resultOrReason,closing){return!modalWindow.value.modalScope.$broadcast("modal.closing",resultOrReason,closing).defaultPrevented}var $animateCss=null;$injector.has("$animateCss")&&($animateCss=$injector.get("$animateCss"));var backdropDomEl,backdropScope,focusableElementList,OPENED_MODAL_CLASS="modal-open",openedWindows=$$stackedMap.createNew(),openedClasses=$$multiMap.createNew(),$modalStack={NOW_CLOSING_EVENT:"modal.stack.now-closing"},focusIndex=0,tababbleSelector="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return $rootScope.$watch(backdropIndex,function(newBackdropIndex){backdropScope&&(backdropScope.index=newBackdropIndex)}),$document.bind("keydown",function(evt){if(evt.isDefaultPrevented())return evt;var modal=openedWindows.top();if(modal&&modal.value.keyboard)switch(evt.which){case 27:evt.preventDefault(),$rootScope.$apply(function(){$modalStack.dismiss(modal.key,"escape key press")});break;case 9:$modalStack.loadFocusElementList(modal);var focusChanged=!1;evt.shiftKey?$modalStack.isFocusInFirstItem(evt)&&(focusChanged=$modalStack.focusLastFocusableElement()):$modalStack.isFocusInLastItem(evt)&&(focusChanged=$modalStack.focusFirstFocusableElement()),focusChanged&&(evt.preventDefault(),evt.stopPropagation())}}),$modalStack.open=function(modalInstance,modal){var modalOpener=$document[0].activeElement,modalBodyClass=modal.openedClass||OPENED_MODAL_CLASS;toggleTopWindowClass(!1),openedWindows.add(modalInstance,{deferred:modal.deferred,renderDeferred:modal.renderDeferred,modalScope:modal.scope,backdrop:modal.backdrop,keyboard:modal.keyboard,openedClass:modal.openedClass,windowTopClass:modal.windowTopClass}),openedClasses.put(modalBodyClass,modalInstance);var body=$document.find("body").eq(0),currBackdropIndex=backdropIndex();if(currBackdropIndex>=0&&!backdropDomEl){backdropScope=$rootScope.$new(!0),backdropScope.index=currBackdropIndex;var angularBackgroundDomEl=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>');angularBackgroundDomEl.attr("backdrop-class",modal.backdropClass),modal.animation&&angularBackgroundDomEl.attr("modal-animation","true"),backdropDomEl=$compile(angularBackgroundDomEl)(backdropScope),body.append(backdropDomEl)}var angularDomEl=angular.element('<div uib-modal-window="modal-window"></div>');angularDomEl.attr({"template-url":modal.windowTemplateUrl,"window-class":modal.windowClass,"window-top-class":modal.windowTopClass,size:modal.size,index:openedWindows.length()-1,animate:"animate"}).html(modal.content),modal.animation&&angularDomEl.attr("modal-animation","true");var modalDomEl=$compile(angularDomEl)(modal.scope);openedWindows.top().value.modalDomEl=modalDomEl,openedWindows.top().value.modalOpener=modalOpener,body.append(modalDomEl),body.addClass(modalBodyClass),$modalStack.clearFocusListCache()},$modalStack.close=function(modalInstance,result){var modalWindow=openedWindows.get(modalInstance);return modalWindow&&broadcastClosing(modalWindow,result,!0)?(modalWindow.value.modalScope.$$uibDestructionScheduled=!0,modalWindow.value.deferred.resolve(result),removeModalWindow(modalInstance,modalWindow.value.modalOpener),!0):!modalWindow},$modalStack.dismiss=function(modalInstance,reason){var modalWindow=openedWindows.get(modalInstance);return modalWindow&&broadcastClosing(modalWindow,reason,!1)?(modalWindow.value.modalScope.$$uibDestructionScheduled=!0,modalWindow.value.deferred.reject(reason),removeModalWindow(modalInstance,modalWindow.value.modalOpener),!0):!modalWindow},$modalStack.dismissAll=function(reason){for(var topModal=this.getTop();topModal&&this.dismiss(topModal.key,reason);)topModal=this.getTop()},$modalStack.getTop=function(){return openedWindows.top()},$modalStack.modalRendered=function(modalInstance){var modalWindow=openedWindows.get(modalInstance);modalWindow&&modalWindow.value.renderDeferred.resolve()},$modalStack.focusFirstFocusableElement=function(){return focusableElementList.length>0&&(focusableElementList[0].focus(),!0)},$modalStack.focusLastFocusableElement=function(){return focusableElementList.length>0&&(focusableElementList[focusableElementList.length-1].focus(),!0)},$modalStack.isFocusInFirstItem=function(evt){return focusableElementList.length>0&&(evt.target||evt.srcElement)==focusableElementList[0]},$modalStack.isFocusInLastItem=function(evt){return focusableElementList.length>0&&(evt.target||evt.srcElement)==focusableElementList[focusableElementList.length-1]},$modalStack.clearFocusListCache=function(){focusableElementList=[],focusIndex=0},$modalStack.loadFocusElementList=function(modalWindow){if((void 0===focusableElementList||!focusableElementList.length)&&modalWindow){var modalDomE1=modalWindow.value.modalDomEl;modalDomE1&&modalDomE1.length&&(focusableElementList=modalDomE1[0].querySelectorAll(tababbleSelector))}},$modalStack}]).provider("$uibModal",function(){var $modalProvider={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$templateRequest","$controller","$uibModalStack","$modalSuppressWarning","$log",function($injector,$rootScope,$q,$templateRequest,$controller,$modalStack,$modalSuppressWarning,$log){function getTemplatePromise(options){return options.template?$q.when(options.template):$templateRequest(angular.isFunction(options.templateUrl)?options.templateUrl():options.templateUrl)}function getResolvePromises(resolves){var promisesArr=[];return angular.forEach(resolves,function(value){angular.isFunction(value)||angular.isArray(value)?promisesArr.push($q.when($injector.invoke(value))):angular.isString(value)?promisesArr.push($q.when($injector.get(value))):promisesArr.push($q.when(value))}),promisesArr}var $modal={},promiseChain=null;return $modal.getPromiseChain=function(){return promiseChain},$modal.open=function(modalOptions){function resolveWithTemplate(){return templateAndResolvePromise}var modalResultDeferred=$q.defer(),modalOpenedDeferred=$q.defer(),modalRenderDeferred=$q.defer(),modalInstance={result:modalResultDeferred.promise,opened:modalOpenedDeferred.promise,rendered:modalRenderDeferred.promise,close:function(result){return $modalStack.close(modalInstance,result)},dismiss:function(reason){return $modalStack.dismiss(modalInstance,reason)}};if(modalOptions=angular.extend({},$modalProvider.options,modalOptions),modalOptions.resolve=modalOptions.resolve||{},!modalOptions.template&&!modalOptions.templateUrl)throw new Error("One of template or templateUrl options is required.");var samePromise,templateAndResolvePromise=$q.all([getTemplatePromise(modalOptions)].concat(getResolvePromises(modalOptions.resolve)));return samePromise=promiseChain=$q.all([promiseChain]).then(resolveWithTemplate,resolveWithTemplate).then(function(tplAndVars){var modalScope=(modalOptions.scope||$rootScope).$new();modalScope.$close=modalInstance.close,modalScope.$dismiss=modalInstance.dismiss,modalScope.$on("$destroy",function(){modalScope.$$uibDestructionScheduled||modalScope.$dismiss("$uibUnscheduledDestruction")});var ctrlInstance,ctrlLocals={},resolveIter=1;modalOptions.controller&&(ctrlLocals.$scope=modalScope,ctrlLocals.$uibModalInstance=modalInstance,Object.defineProperty(ctrlLocals,"$modalInstance",{get:function(){return $modalSuppressWarning||$log.warn("$modalInstance is now deprecated. Use $uibModalInstance instead."),modalInstance}}),angular.forEach(modalOptions.resolve,function(value,key){ctrlLocals[key]=tplAndVars[resolveIter++]}),ctrlInstance=$controller(modalOptions.controller,ctrlLocals),modalOptions.controllerAs&&(modalOptions.bindToController&&angular.extend(ctrlInstance,modalScope),modalScope[modalOptions.controllerAs]=ctrlInstance)),$modalStack.open(modalInstance,{scope:modalScope,deferred:modalResultDeferred,renderDeferred:modalRenderDeferred,content:tplAndVars[0],animation:modalOptions.animation,backdrop:modalOptions.backdrop,keyboard:modalOptions.keyboard,backdropClass:modalOptions.backdropClass,windowTopClass:modalOptions.windowTopClass,windowClass:modalOptions.windowClass,windowTemplateUrl:modalOptions.windowTemplateUrl,size:modalOptions.size,openedClass:modalOptions.openedClass}),modalOpenedDeferred.resolve(!0)},function(reason){modalOpenedDeferred.reject(reason),modalResultDeferred.reject(reason)})["finally"](function(){promiseChain===samePromise&&(promiseChain=null)}),modalInstance},$modal}]};return $modalProvider}),angular.module("ui.bootstrap.modal").value("$modalSuppressWarning",!1).directive("modalBackdrop",["$animate","$injector","$modalStack","$log","$modalSuppressWarning",function($animate,$injector,$modalStack,$log,$modalSuppressWarning){function linkFn(scope,element,attrs){$modalSuppressWarning||$log.warn("modal-backdrop is now deprecated. Use uib-modal-backdrop instead."),element.addClass("modal-backdrop"),attrs.modalInClass&&($animateCss?$animateCss(element,{addClass:attrs.modalInClass}).start():$animate.addClass(element,attrs.modalInClass),scope.$on($modalStack.NOW_CLOSING_EVENT,function(e,setIsAsync){var done=setIsAsync();$animateCss?$animateCss(element,{removeClass:attrs.modalInClass}).start().then(done):$animate.removeClass(element,attrs.modalInClass).then(done)}))}var $animateCss=null;return $injector.has("$animateCss")&&($animateCss=$injector.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(tElement,tAttrs){return tElement.addClass(tAttrs.backdropClass),linkFn}}}]).directive("modalWindow",["$modalStack","$q","$animate","$injector","$log","$modalSuppressWarning",function($modalStack,$q,$animate,$injector,$log,$modalSuppressWarning){var $animateCss=null;return $injector.has("$animateCss")&&($animateCss=$injector.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(tElement,tAttrs){return tAttrs.templateUrl||"template/modal/window.html"},link:function(scope,element,attrs){$modalSuppressWarning||$log.warn("modal-window is now deprecated. Use uib-modal-window instead."),element.addClass(attrs.windowClass||""),element.addClass(attrs.windowTopClass||""),scope.size=attrs.size,scope.close=function(evt){var modal=$modalStack.getTop();modal&&modal.value.backdrop&&"static"!==modal.value.backdrop&&evt.target===evt.currentTarget&&(evt.preventDefault(),
evt.stopPropagation(),$modalStack.dismiss(modal.key,"backdrop click"))},element.on("click",scope.close),scope.$isRendered=!0;var modalRenderDeferObj=$q.defer();attrs.$observe("modalRender",function(value){"true"==value&&modalRenderDeferObj.resolve()}),modalRenderDeferObj.promise.then(function(){var animationPromise=null;attrs.modalInClass&&(animationPromise=$animateCss?$animateCss(element,{addClass:attrs.modalInClass}).start():$animate.addClass(element,attrs.modalInClass),scope.$on($modalStack.NOW_CLOSING_EVENT,function(e,setIsAsync){var done=setIsAsync();$animateCss?$animateCss(element,{removeClass:attrs.modalInClass}).start().then(done):$animate.removeClass(element,attrs.modalInClass).then(done)})),$q.when(animationPromise).then(function(){var inputWithAutofocus=element[0].querySelector("[autofocus]");inputWithAutofocus?inputWithAutofocus.focus():element[0].focus()});var modal=$modalStack.getTop();modal&&$modalStack.modalRendered(modal.key)})}}}]).directive("modalAnimationClass",["$log","$modalSuppressWarning",function($log,$modalSuppressWarning){return{compile:function(tElement,tAttrs){$modalSuppressWarning||$log.warn("modal-animation-class is now deprecated. Use uib-modal-animation-class instead."),tAttrs.modalAnimation&&tElement.addClass(tAttrs.modalAnimationClass)}}}]).directive("modalTransclude",["$log","$modalSuppressWarning",function($log,$modalSuppressWarning){return{link:function($scope,$element,$attrs,controller,$transclude){$modalSuppressWarning||$log.warn("modal-transclude is now deprecated. Use uib-modal-transclude instead."),$transclude($scope.$parent,function(clone){$element.empty(),$element.append(clone)})}}}]).service("$modalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap","$uibModalStack","$log","$modalSuppressWarning",function($animate,$timeout,$document,$compile,$rootScope,$q,$injector,$$multiMap,$$stackedMap,$uibModalStack,$log,$modalSuppressWarning){$modalSuppressWarning||$log.warn("$modalStack is now deprecated. Use $uibModalStack instead."),angular.extend(this,$uibModalStack)}]).provider("$modal",["$uibModalProvider",function($uibModalProvider){angular.extend(this,$uibModalProvider),this.$get=["$injector","$log","$modalSuppressWarning",function($injector,$log,$modalSuppressWarning){return $modalSuppressWarning||$log.warn("$modal is now deprecated. Use $uibModal instead."),$injector.invoke($uibModalProvider.$get)}]}]),angular.module("ui.bootstrap.pagination",[]).controller("UibPaginationController",["$scope","$attrs","$parse",function($scope,$attrs,$parse){var self=this,ngModelCtrl={$setViewValue:angular.noop},setNumPages=$attrs.numPages?$parse($attrs.numPages).assign:angular.noop;this.init=function(ngModelCtrl_,config){ngModelCtrl=ngModelCtrl_,this.config=config,ngModelCtrl.$render=function(){self.render()},$attrs.itemsPerPage?$scope.$parent.$watch($parse($attrs.itemsPerPage),function(value){self.itemsPerPage=parseInt(value,10),$scope.totalPages=self.calculateTotalPages()}):this.itemsPerPage=config.itemsPerPage,$scope.$watch("totalItems",function(){$scope.totalPages=self.calculateTotalPages()}),$scope.$watch("totalPages",function(value){setNumPages($scope.$parent,value),$scope.page>value?$scope.selectPage(value):ngModelCtrl.$render()})},this.calculateTotalPages=function(){var totalPages=this.itemsPerPage<1?1:Math.ceil($scope.totalItems/this.itemsPerPage);return Math.max(totalPages||0,1)},this.render=function(){$scope.page=parseInt(ngModelCtrl.$viewValue,10)||1},$scope.selectPage=function(page,evt){evt&&evt.preventDefault();var clickAllowed=!$scope.ngDisabled||!evt;clickAllowed&&$scope.page!==page&&page>0&&page<=$scope.totalPages&&(evt&&evt.target&&evt.target.blur(),ngModelCtrl.$setViewValue(page),ngModelCtrl.$render())},$scope.getText=function(key){return $scope[key+"Text"]||self.config[key+"Text"]},$scope.noPrevious=function(){return 1===$scope.page},$scope.noNext=function(){return $scope.page===$scope.totalPages}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("uibPagination",["$parse","uibPaginationConfig",function($parse,paginationConfig){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(element,attrs){return attrs.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(scope,element,attrs,ctrls){function makePage(number,text,isActive){return{number:number,text:text,active:isActive}}function getPages(currentPage,totalPages){var pages=[],startPage=1,endPage=totalPages,isMaxSized=angular.isDefined(maxSize)&&maxSize<totalPages;isMaxSized&&(rotate?(startPage=Math.max(currentPage-Math.floor(maxSize/2),1),endPage=startPage+maxSize-1,endPage>totalPages&&(endPage=totalPages,startPage=endPage-maxSize+1)):(startPage=(Math.ceil(currentPage/maxSize)-1)*maxSize+1,endPage=Math.min(startPage+maxSize-1,totalPages)));for(var number=startPage;number<=endPage;number++){var page=makePage(number,number,number===currentPage);pages.push(page)}if(isMaxSized&&!rotate){if(startPage>1){var previousPageSet=makePage(startPage-1,"...",!1);pages.unshift(previousPageSet)}if(endPage<totalPages){var nextPageSet=makePage(endPage+1,"...",!1);pages.push(nextPageSet)}}return pages}var paginationCtrl=ctrls[0],ngModelCtrl=ctrls[1];if(ngModelCtrl){var maxSize=angular.isDefined(attrs.maxSize)?scope.$parent.$eval(attrs.maxSize):paginationConfig.maxSize,rotate=angular.isDefined(attrs.rotate)?scope.$parent.$eval(attrs.rotate):paginationConfig.rotate;scope.boundaryLinks=angular.isDefined(attrs.boundaryLinks)?scope.$parent.$eval(attrs.boundaryLinks):paginationConfig.boundaryLinks,scope.directionLinks=angular.isDefined(attrs.directionLinks)?scope.$parent.$eval(attrs.directionLinks):paginationConfig.directionLinks,paginationCtrl.init(ngModelCtrl,paginationConfig),attrs.maxSize&&scope.$parent.$watch($parse(attrs.maxSize),function(value){maxSize=parseInt(value,10),paginationCtrl.render()});var originalRender=paginationCtrl.render;paginationCtrl.render=function(){originalRender(),scope.page>0&&scope.page<=scope.totalPages&&(scope.pages=getPages(scope.page,scope.totalPages))}}}}}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(pagerConfig){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(element,attrs){return attrs.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(scope,element,attrs,ctrls){var paginationCtrl=ctrls[0],ngModelCtrl=ctrls[1];ngModelCtrl&&(scope.align=angular.isDefined(attrs.align)?scope.$parent.$eval(attrs.align):pagerConfig.align,paginationCtrl.init(ngModelCtrl,pagerConfig))}}}]),angular.module("ui.bootstrap.pagination").value("$paginationSuppressWarning",!1).controller("PaginationController",["$scope","$attrs","$parse","$log","$paginationSuppressWarning",function($scope,$attrs,$parse,$log,$paginationSuppressWarning){$paginationSuppressWarning||$log.warn("PaginationController is now deprecated. Use UibPaginationController instead.");var self=this,ngModelCtrl={$setViewValue:angular.noop},setNumPages=$attrs.numPages?$parse($attrs.numPages).assign:angular.noop;this.init=function(ngModelCtrl_,config){ngModelCtrl=ngModelCtrl_,this.config=config,ngModelCtrl.$render=function(){self.render()},$attrs.itemsPerPage?$scope.$parent.$watch($parse($attrs.itemsPerPage),function(value){self.itemsPerPage=parseInt(value,10),$scope.totalPages=self.calculateTotalPages()}):this.itemsPerPage=config.itemsPerPage,$scope.$watch("totalItems",function(){$scope.totalPages=self.calculateTotalPages()}),$scope.$watch("totalPages",function(value){setNumPages($scope.$parent,value),$scope.page>value?$scope.selectPage(value):ngModelCtrl.$render()})},this.calculateTotalPages=function(){var totalPages=this.itemsPerPage<1?1:Math.ceil($scope.totalItems/this.itemsPerPage);return Math.max(totalPages||0,1)},this.render=function(){$scope.page=parseInt(ngModelCtrl.$viewValue,10)||1},$scope.selectPage=function(page,evt){evt&&evt.preventDefault();var clickAllowed=!$scope.ngDisabled||!evt;clickAllowed&&$scope.page!==page&&page>0&&page<=$scope.totalPages&&(evt&&evt.target&&evt.target.blur(),ngModelCtrl.$setViewValue(page),ngModelCtrl.$render())},$scope.getText=function(key){return $scope[key+"Text"]||self.config[key+"Text"]},$scope.noPrevious=function(){return 1===$scope.page},$scope.noNext=function(){return $scope.page===$scope.totalPages}}]).directive("pagination",["$parse","uibPaginationConfig","$log","$paginationSuppressWarning",function($parse,paginationConfig,$log,$paginationSuppressWarning){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["pagination","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(element,attrs){return attrs.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(scope,element,attrs,ctrls){function makePage(number,text,isActive){return{number:number,text:text,active:isActive}}function getPages(currentPage,totalPages){var pages=[],startPage=1,endPage=totalPages,isMaxSized=angular.isDefined(maxSize)&&maxSize<totalPages;isMaxSized&&(rotate?(startPage=Math.max(currentPage-Math.floor(maxSize/2),1),endPage=startPage+maxSize-1,endPage>totalPages&&(endPage=totalPages,startPage=endPage-maxSize+1)):(startPage=(Math.ceil(currentPage/maxSize)-1)*maxSize+1,endPage=Math.min(startPage+maxSize-1,totalPages)));for(var number=startPage;number<=endPage;number++){var page=makePage(number,number,number===currentPage);pages.push(page)}if(isMaxSized&&!rotate){if(startPage>1){var previousPageSet=makePage(startPage-1,"...",!1);pages.unshift(previousPageSet)}if(endPage<totalPages){var nextPageSet=makePage(endPage+1,"...",!1);pages.push(nextPageSet)}}return pages}$paginationSuppressWarning||$log.warn("pagination is now deprecated. Use uib-pagination instead.");var paginationCtrl=ctrls[0],ngModelCtrl=ctrls[1];if(ngModelCtrl){var maxSize=angular.isDefined(attrs.maxSize)?scope.$parent.$eval(attrs.maxSize):paginationConfig.maxSize,rotate=angular.isDefined(attrs.rotate)?scope.$parent.$eval(attrs.rotate):paginationConfig.rotate;scope.boundaryLinks=angular.isDefined(attrs.boundaryLinks)?scope.$parent.$eval(attrs.boundaryLinks):paginationConfig.boundaryLinks,scope.directionLinks=angular.isDefined(attrs.directionLinks)?scope.$parent.$eval(attrs.directionLinks):paginationConfig.directionLinks,paginationCtrl.init(ngModelCtrl,paginationConfig),attrs.maxSize&&scope.$parent.$watch($parse(attrs.maxSize),function(value){maxSize=parseInt(value,10),paginationCtrl.render()});var originalRender=paginationCtrl.render;paginationCtrl.render=function(){originalRender(),scope.page>0&&scope.page<=scope.totalPages&&(scope.pages=getPages(scope.page,scope.totalPages))}}}}}]).directive("pager",["uibPagerConfig","$log","$paginationSuppressWarning",function(pagerConfig,$log,$paginationSuppressWarning){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["pager","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(element,attrs){return attrs.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(scope,element,attrs,ctrls){$paginationSuppressWarning||$log.warn("pager is now deprecated. Use uib-pager instead.");var paginationCtrl=ctrls[0],ngModelCtrl=ctrls[1];ngModelCtrl&&(scope.align=angular.isDefined(attrs.align)?scope.$parent.$eval(attrs.align):pagerConfig.align,paginationCtrl.init(ngModelCtrl,pagerConfig))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function snake_case(name){var regexp=/[A-Z]/g,separator="-";return name.replace(regexp,function(letter,pos){return(pos?separator:"")+letter.toLowerCase()})}var defaultOptions={placement:"top",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},triggerMap={mouseenter:"mouseleave",click:"click",focus:"blur",none:""},globalOptions={};this.options=function(value){angular.extend(globalOptions,value)},this.setTriggers=function(triggers){angular.extend(triggerMap,triggers)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function($window,$compile,$timeout,$document,$position,$interpolate,$rootScope,$parse,$$stackedMap){var openedTooltips=$$stackedMap.createNew();return $document.on("keypress",function(e){if(27===e.which){var last=openedTooltips.top();last&&(last.value.close(),openedTooltips.removeTop(),last=null)}}),function(ttType,prefix,defaultTriggerShow,options){function getTriggers(trigger){var show=(trigger||options.trigger||defaultTriggerShow).split(" "),hide=show.map(function(trigger){return triggerMap[trigger]||trigger});return{show:show,hide:hide}}options=angular.extend({},defaultOptions,globalOptions,options);var directiveName=snake_case(ttType),startSym=$interpolate.startSymbol(),endSym=$interpolate.endSymbol(),template="<div "+directiveName+'-popup title="'+startSym+"title"+endSym+'" '+(options.useContentExp?'content-exp="contentExp()" ':'content="'+startSym+"content"+endSym+'" ')+'placement="'+startSym+"placement"+endSym+'" popup-class="'+startSym+"popupClass"+endSym+'" animation="animation" is-open="isOpen"origin-scope="origScope" style="visibility: hidden; display: block; top: -9999px; left: -9999px;"></div>';return{compile:function(tElem,tAttrs){var tooltipLinker=$compile(template);return function(scope,element,attrs,tooltipCtrl){function toggleTooltipBind(){ttScope.isOpen?hideTooltipBind():showTooltipBind()}function showTooltipBind(){hasEnableExp&&!scope.$eval(attrs[prefix+"Enable"])||(cancelHide(),prepareTooltip(),ttScope.popupDelay?showTimeout||(showTimeout=$timeout(show,ttScope.popupDelay,!1)):show())}function hideTooltipBind(){cancelShow(),ttScope.popupCloseDelay?hideTimeout||(hideTimeout=$timeout(hide,ttScope.popupCloseDelay,!1)):hide()}function show(){return cancelShow(),cancelHide(),ttScope.content?(createTooltip(),void ttScope.$evalAsync(function(){ttScope.isOpen=!0,assignIsOpen(!0),positionTooltip()})):angular.noop}function cancelShow(){showTimeout&&($timeout.cancel(showTimeout),showTimeout=null),positionTimeout&&($timeout.cancel(positionTimeout),positionTimeout=null)}function hide(){cancelShow(),cancelHide(),ttScope&&ttScope.$evalAsync(function(){ttScope.isOpen=!1,assignIsOpen(!1),ttScope.animation?transitionTimeout||(transitionTimeout=$timeout(removeTooltip,150,!1)):removeTooltip()})}function cancelHide(){hideTimeout&&($timeout.cancel(hideTimeout),hideTimeout=null),transitionTimeout&&($timeout.cancel(transitionTimeout),transitionTimeout=null)}function createTooltip(){tooltip||(tooltipLinkedScope=ttScope.$new(),tooltip=tooltipLinker(tooltipLinkedScope,function(tooltip){appendToBody?$document.find("body").append(tooltip):element.after(tooltip)}),prepObservers())}function removeTooltip(){unregisterObservers(),transitionTimeout=null,tooltip&&(tooltip.remove(),tooltip=null),tooltipLinkedScope&&(tooltipLinkedScope.$destroy(),tooltipLinkedScope=null)}function prepareTooltip(){ttScope.title=attrs[prefix+"Title"],contentParse?ttScope.content=contentParse(scope):ttScope.content=attrs[ttType],ttScope.popupClass=attrs[prefix+"Class"],ttScope.placement=angular.isDefined(attrs[prefix+"Placement"])?attrs[prefix+"Placement"]:options.placement;var delay=parseInt(attrs[prefix+"PopupDelay"],10),closeDelay=parseInt(attrs[prefix+"PopupCloseDelay"],10);ttScope.popupDelay=isNaN(delay)?options.popupDelay:delay,ttScope.popupCloseDelay=isNaN(closeDelay)?options.popupCloseDelay:closeDelay}function assignIsOpen(isOpen){isOpenParse&&angular.isFunction(isOpenParse.assign)&&isOpenParse.assign(scope,isOpen)}function prepObservers(){observers.length=0,contentParse?(observers.push(scope.$watch(contentParse,function(val){ttScope.content=val,!val&&ttScope.isOpen&&hide()})),observers.push(tooltipLinkedScope.$watch(function(){repositionScheduled||(repositionScheduled=!0,tooltipLinkedScope.$$postDigest(function(){repositionScheduled=!1,ttScope&&ttScope.isOpen&&positionTooltip()}))}))):observers.push(attrs.$observe(ttType,function(val){ttScope.content=val,!val&&ttScope.isOpen?hide():positionTooltip()})),observers.push(attrs.$observe(prefix+"Title",function(val){ttScope.title=val,ttScope.isOpen&&positionTooltip()})),observers.push(attrs.$observe(prefix+"Placement",function(val){ttScope.placement=val?val:options.placement,ttScope.isOpen&&positionTooltip()}))}function unregisterObservers(){observers.length&&(angular.forEach(observers,function(observer){observer()}),observers.length=0)}function prepTriggers(){var val=attrs[prefix+"Trigger"];unregisterTriggers(),triggers=getTriggers(val),"none"!==triggers.show&&triggers.show.forEach(function(trigger,idx){trigger===triggers.hide[idx]?element[0].addEventListener(trigger,toggleTooltipBind):trigger&&(element[0].addEventListener(trigger,showTooltipBind),triggers.hide[idx].split(" ").forEach(function(trigger){element[0].addEventListener(trigger,hideTooltipBind)})),element.on("keypress",function(e){27===e.which&&hideTooltipBind()})})}var tooltip,tooltipLinkedScope,transitionTimeout,showTimeout,hideTimeout,positionTimeout,appendToBody=!!angular.isDefined(options.appendToBody)&&options.appendToBody,triggers=getTriggers(void 0),hasEnableExp=angular.isDefined(attrs[prefix+"Enable"]),ttScope=scope.$new(!0),repositionScheduled=!1,isOpenParse=!!angular.isDefined(attrs[prefix+"IsOpen"])&&$parse(attrs[prefix+"IsOpen"]),contentParse=!!options.useContentExp&&$parse(attrs[ttType]),observers=[],positionTooltip=function(){tooltip&&tooltip.html()&&(positionTimeout||(positionTimeout=$timeout(function(){tooltip.css({top:0,left:0});var ttCss=$position.positionElements(element,tooltip,ttScope.placement,appendToBody);ttCss.top+="px",ttCss.left+="px",ttCss.visibility="visible",tooltip.css(ttCss),positionTimeout=null},0,!1)))};ttScope.origScope=scope,ttScope.isOpen=!1,openedTooltips.add(ttScope,{close:hide}),ttScope.contentExp=function(){return ttScope.content},attrs.$observe("disabled",function(val){val&&cancelShow(),val&&ttScope.isOpen&&hide()}),isOpenParse&&scope.$watch(isOpenParse,function(val){ttScope&&!val===ttScope.isOpen&&toggleTooltipBind()});var unregisterTriggers=function(){triggers.show.forEach(function(trigger){element.unbind(trigger,showTooltipBind)}),triggers.hide.forEach(function(trigger){trigger.split(" ").forEach(function(hideTrigger){element[0].removeEventListener(hideTrigger,hideTooltipBind)})})};prepTriggers();var animation=scope.$eval(attrs[prefix+"Animation"]);ttScope.animation=angular.isDefined(animation)?!!animation:options.animation;var appendToBodyVal=scope.$eval(attrs[prefix+"AppendToBody"]);appendToBody=angular.isDefined(appendToBodyVal)?appendToBodyVal:appendToBody,appendToBody&&scope.$on("$locationChangeSuccess",function(){ttScope.isOpen&&hide()}),scope.$on("$destroy",function(){cancelShow(),cancelHide(),unregisterTriggers(),removeTooltip(),openedTooltips.remove(ttScope),ttScope=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function($animate,$sce,$compile,$templateRequest){return{link:function(scope,elem,attrs){var currentScope,previousElement,currentElement,origScope=scope.$eval(attrs.tooltipTemplateTranscludeScope),changeCounter=0,cleanupLastIncludeContent=function(){previousElement&&(previousElement.remove(),previousElement=null),currentScope&&(currentScope.$destroy(),currentScope=null),currentElement&&($animate.leave(currentElement).then(function(){previousElement=null}),previousElement=currentElement,currentElement=null)};scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude),function(src){var thisChangeId=++changeCounter;src?($templateRequest(src,!0).then(function(response){if(thisChangeId===changeCounter){var newScope=origScope.$new(),template=response,clone=$compile(template)(newScope,function(clone){cleanupLastIncludeContent(),$animate.enter(clone,elem)});currentScope=newScope,currentElement=clone,currentScope.$emit("$includeContentLoaded",src)}},function(){thisChangeId===changeCounter&&(cleanupLastIncludeContent(),scope.$emit("$includeContentError",src))}),scope.$emit("$includeContentRequested",src)):cleanupLastIncludeContent()}),scope.$on("$destroy",cleanupLastIncludeContent)}}}]).directive("uibTooltipClasses",function(){return{restrict:"A",link:function(scope,element,attrs){scope.placement&&element.addClass(scope.placement),scope.popupClass&&element.addClass(scope.popupClass),scope.animation()&&element.addClass(attrs.tooltipAnimationClass)}}}).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(scope,element){element.addClass("tooltip")}}}).directive("uibTooltip",["$uibTooltip",function($uibTooltip){return $uibTooltip("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(scope,element){element.addClass("tooltip")}}}).directive("uibTooltipTemplate",["$uibTooltip",function($uibTooltip){return $uibTooltip("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(scope,element){element.addClass("tooltip")}}}).directive("uibTooltipHtml",["$uibTooltip",function($uibTooltip){return $uibTooltip("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.tooltip").value("$tooltipSuppressWarning",!1).provider("$tooltip",["$uibTooltipProvider",function($uibTooltipProvider){angular.extend(this,$uibTooltipProvider),this.$get=["$log","$tooltipSuppressWarning","$injector",function($log,$tooltipSuppressWarning,$injector){return $tooltipSuppressWarning||$log.warn("$tooltip is now deprecated. Use $uibTooltip instead."),$injector.invoke($uibTooltipProvider.$get)}]}]).directive("tooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest","$log","$tooltipSuppressWarning",function($animate,$sce,$compile,$templateRequest,$log,$tooltipSuppressWarning){return{link:function(scope,elem,attrs){$tooltipSuppressWarning||$log.warn("tooltip-template-transclude is now deprecated. Use uib-tooltip-template-transclude instead.");var currentScope,previousElement,currentElement,origScope=scope.$eval(attrs.tooltipTemplateTranscludeScope),changeCounter=0,cleanupLastIncludeContent=function(){previousElement&&(previousElement.remove(),previousElement=null),currentScope&&(currentScope.$destroy(),currentScope=null),currentElement&&($animate.leave(currentElement).then(function(){previousElement=null}),previousElement=currentElement,currentElement=null)};scope.$watch($sce.parseAsResourceUrl(attrs.tooltipTemplateTransclude),function(src){var thisChangeId=++changeCounter;src?($templateRequest(src,!0).then(function(response){if(thisChangeId===changeCounter){var newScope=origScope.$new(),template=response,clone=$compile(template)(newScope,function(clone){cleanupLastIncludeContent(),$animate.enter(clone,elem)});currentScope=newScope,currentElement=clone,currentScope.$emit("$includeContentLoaded",src)}},function(){thisChangeId===changeCounter&&(cleanupLastIncludeContent(),scope.$emit("$includeContentError",src))}),scope.$emit("$includeContentRequested",src)):cleanupLastIncludeContent()}),scope.$on("$destroy",cleanupLastIncludeContent)}}}]).directive("tooltipClasses",["$log","$tooltipSuppressWarning",function($log,$tooltipSuppressWarning){return{restrict:"A",link:function(scope,element,attrs){$tooltipSuppressWarning||$log.warn("tooltip-classes is now deprecated. Use uib-tooltip-classes instead."),scope.placement&&element.addClass(scope.placement),scope.popupClass&&element.addClass(scope.popupClass),scope.animation()&&element.addClass(attrs.tooltipAnimationClass)}}}]).directive("tooltipPopup",["$log","$tooltipSuppressWarning",function($log,$tooltipSuppressWarning){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(scope,element){$tooltipSuppressWarning||$log.warn("tooltip-popup is now deprecated. Use uib-tooltip-popup instead."),element.addClass("tooltip")}}}]).directive("tooltip",["$tooltip",function($tooltip){return $tooltip("tooltip","tooltip","mouseenter")}]).directive("tooltipTemplatePopup",["$log","$tooltipSuppressWarning",function($log,$tooltipSuppressWarning){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(scope,element){$tooltipSuppressWarning||$log.warn("tooltip-template-popup is now deprecated. Use uib-tooltip-template-popup instead."),element.addClass("tooltip")}}}]).directive("tooltipTemplate",["$tooltip",function($tooltip){return $tooltip("tooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlPopup",["$log","$tooltipSuppressWarning",function($log,$tooltipSuppressWarning){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(scope,element){$tooltipSuppressWarning||$log.warn("tooltip-html-popup is now deprecated. Use uib-tooltip-html-popup instead."),element.addClass("tooltip")}}}]).directive("tooltipHtml",["$tooltip",function($tooltip){return $tooltip("tooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(scope,element){element.addClass("popover")}}}).directive("uibPopoverTemplate",["$uibTooltip",function($uibTooltip){return $uibTooltip("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(scope,element){element.addClass("popover")}}}).directive("uibPopoverHtml",["$uibTooltip",function($uibTooltip){return $uibTooltip("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(scope,element){element.addClass("popover")}}}).directive("uibPopover",["$uibTooltip",function($uibTooltip){return $uibTooltip("uibPopover","popover","click")}]),angular.module("ui.bootstrap.popover").value("$popoverSuppressWarning",!1).directive("popoverTemplatePopup",["$log","$popoverSuppressWarning",function($log,$popoverSuppressWarning){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(scope,element){$popoverSuppressWarning||$log.warn("popover-template-popup is now deprecated. Use uib-popover-template-popup instead."),element.addClass("popover")}}}]).directive("popoverTemplate",["$tooltip",function($tooltip){return $tooltip("popoverTemplate","popover","click",{useContentExp:!0})}]).directive("popoverHtmlPopup",["$log","$popoverSuppressWarning",function($log,$popoverSuppressWarning){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(scope,element){$popoverSuppressWarning||$log.warn("popover-html-popup is now deprecated. Use uib-popover-html-popup instead."),element.addClass("popover")}}}]).directive("popoverHtml",["$tooltip",function($tooltip){return $tooltip("popoverHtml","popover","click",{useContentExp:!0})}]).directive("popoverPopup",["$log","$popoverSuppressWarning",function($log,$popoverSuppressWarning){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(scope,element){$popoverSuppressWarning||$log.warn("popover-popup is now deprecated. Use uib-popover-popup instead."),element.addClass("popover")}}}]).directive("popover",["$tooltip",function($tooltip){return $tooltip("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function($scope,$attrs,progressConfig){var self=this,animate=angular.isDefined($attrs.animate)?$scope.$parent.$eval($attrs.animate):progressConfig.animate;this.bars=[],$scope.max=angular.isDefined($scope.max)?$scope.max:progressConfig.max,this.addBar=function(bar,element,attrs){animate||element.css({transition:"none"}),this.bars.push(bar),bar.max=$scope.max,bar.title=attrs&&angular.isDefined(attrs.title)?attrs.title:"progressbar",bar.$watch("value",function(value){bar.recalculatePercentage()}),bar.recalculatePercentage=function(){var totalPercentage=self.bars.reduce(function(total,bar){return bar.percent=+(100*bar.value/bar.max).toFixed(2),total+bar.percent},0);totalPercentage>100&&(bar.percent-=totalPercentage-100)},bar.$on("$destroy",function(){element=null,self.removeBar(bar)})},this.removeBar=function(bar){this.bars.splice(this.bars.indexOf(bar),1),this.bars.forEach(function(bar){bar.recalculatePercentage()})},$scope.$watch("max",function(max){self.bars.forEach(function(bar){bar.max=$scope.max,bar.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(scope,element,attrs,progressCtrl){progressCtrl.addBar(scope,element,attrs)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(scope,element,attrs,progressCtrl){progressCtrl.addBar(scope,angular.element(element.children()[0]),{title:attrs.title})}}}),angular.module("ui.bootstrap.progressbar").value("$progressSuppressWarning",!1).controller("ProgressController",["$scope","$attrs","uibProgressConfig","$log","$progressSuppressWarning",function($scope,$attrs,progressConfig,$log,$progressSuppressWarning){$progressSuppressWarning||$log.warn("ProgressController is now deprecated. Use UibProgressController instead.");var self=this,animate=angular.isDefined($attrs.animate)?$scope.$parent.$eval($attrs.animate):progressConfig.animate;this.bars=[],$scope.max=angular.isDefined($scope.max)?$scope.max:progressConfig.max,this.addBar=function(bar,element,attrs){animate||element.css({transition:"none"}),this.bars.push(bar),bar.max=$scope.max,bar.title=attrs&&angular.isDefined(attrs.title)?attrs.title:"progressbar",bar.$watch("value",function(value){bar.recalculatePercentage();
}),bar.recalculatePercentage=function(){bar.percent=+(100*bar.value/bar.max).toFixed(2);var totalPercentage=self.bars.reduce(function(total,bar){return total+bar.percent},0);totalPercentage>100&&(bar.percent-=totalPercentage-100)},bar.$on("$destroy",function(){element=null,self.removeBar(bar)})},this.removeBar=function(bar){this.bars.splice(this.bars.indexOf(bar),1)},$scope.$watch("max",function(max){self.bars.forEach(function(bar){bar.max=$scope.max,bar.recalculatePercentage()})})}]).directive("progress",["$log","$progressSuppressWarning",function($log,$progressSuppressWarning){return{replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{max:"=?",title:"@?"},templateUrl:"template/progressbar/progress.html",link:function(){$progressSuppressWarning||$log.warn("progress is now deprecated. Use uib-progress instead.")}}}]).directive("bar",["$log","$progressSuppressWarning",function($log,$progressSuppressWarning){return{replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(scope,element,attrs,progressCtrl){$progressSuppressWarning||$log.warn("bar is now deprecated. Use uib-bar instead."),progressCtrl.addBar(scope,element)}}}]).directive("progressbar",["$log","$progressSuppressWarning",function($log,$progressSuppressWarning){return{replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(scope,element,attrs,progressCtrl){$progressSuppressWarning||$log.warn("progressbar is now deprecated. Use uib-progressbar instead."),progressCtrl.addBar(scope,angular.element(element.children()[0]),{title:attrs.title})}}}]),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function($scope,$attrs,ratingConfig){var ngModelCtrl={$setViewValue:angular.noop};this.init=function(ngModelCtrl_){ngModelCtrl=ngModelCtrl_,ngModelCtrl.$render=this.render,ngModelCtrl.$formatters.push(function(value){return angular.isNumber(value)&&value<<0!==value&&(value=Math.round(value)),value}),this.stateOn=angular.isDefined($attrs.stateOn)?$scope.$parent.$eval($attrs.stateOn):ratingConfig.stateOn,this.stateOff=angular.isDefined($attrs.stateOff)?$scope.$parent.$eval($attrs.stateOff):ratingConfig.stateOff;var tmpTitles=angular.isDefined($attrs.titles)?$scope.$parent.$eval($attrs.titles):ratingConfig.titles;this.titles=angular.isArray(tmpTitles)&&tmpTitles.length>0?tmpTitles:ratingConfig.titles;var ratingStates=angular.isDefined($attrs.ratingStates)?$scope.$parent.$eval($attrs.ratingStates):new Array(angular.isDefined($attrs.max)?$scope.$parent.$eval($attrs.max):ratingConfig.max);$scope.range=this.buildTemplateObjects(ratingStates)},this.buildTemplateObjects=function(states){for(var i=0,n=states.length;i<n;i++)states[i]=angular.extend({index:i},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(i)},states[i]);return states},this.getTitle=function(index){return index>=this.titles.length?index+1:this.titles[index]},$scope.rate=function(value){!$scope.readonly&&value>=0&&value<=$scope.range.length&&(ngModelCtrl.$setViewValue(ngModelCtrl.$viewValue===value?0:value),ngModelCtrl.$render())},$scope.enter=function(value){$scope.readonly||($scope.value=value),$scope.onHover({value:value})},$scope.reset=function(){$scope.value=ngModelCtrl.$viewValue,$scope.onLeave()},$scope.onKeydown=function(evt){/(37|38|39|40)/.test(evt.which)&&(evt.preventDefault(),evt.stopPropagation(),$scope.rate($scope.value+(38===evt.which||39===evt.which?1:-1)))},this.render=function(){$scope.value=ngModelCtrl.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(scope,element,attrs,ctrls){var ratingCtrl=ctrls[0],ngModelCtrl=ctrls[1];ratingCtrl.init(ngModelCtrl)}}}),angular.module("ui.bootstrap.rating").value("$ratingSuppressWarning",!1).controller("RatingController",["$scope","$attrs","$controller","$log","$ratingSuppressWarning",function($scope,$attrs,$controller,$log,$ratingSuppressWarning){$ratingSuppressWarning||$log.warn("RatingController is now deprecated. Use UibRatingController instead."),angular.extend(this,$controller("UibRatingController",{$scope:$scope,$attrs:$attrs}))}]).directive("rating",["$log","$ratingSuppressWarning",function($log,$ratingSuppressWarning){return{require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(scope,element,attrs,ctrls){$ratingSuppressWarning||$log.warn("rating is now deprecated. Use uib-rating instead.");var ratingCtrl=ctrls[0],ngModelCtrl=ctrls[1];ratingCtrl.init(ngModelCtrl)}}}]),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function($scope){var ctrl=this,tabs=ctrl.tabs=$scope.tabs=[];ctrl.select=function(selectedTab){angular.forEach(tabs,function(tab){tab.active&&tab!==selectedTab&&(tab.active=!1,tab.onDeselect(),selectedTab.selectCalled=!1)}),selectedTab.active=!0,selectedTab.selectCalled||(selectedTab.onSelect(),selectedTab.selectCalled=!0)},ctrl.addTab=function(tab){tabs.push(tab),1===tabs.length&&tab.active!==!1?tab.active=!0:tab.active?ctrl.select(tab):tab.active=!1},ctrl.removeTab=function(tab){var index=tabs.indexOf(tab);if(tab.active&&tabs.length>1&&!destroyed){var newActiveIndex=index==tabs.length-1?index-1:index+1;ctrl.select(tabs[newActiveIndex])}tabs.splice(index,1)};var destroyed;$scope.$on("$destroy",function(){destroyed=!0})}]).directive("uibTabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"template/tabs/tabset.html",link:function(scope,element,attrs){scope.vertical=!!angular.isDefined(attrs.vertical)&&scope.$parent.$eval(attrs.vertical),scope.justified=!!angular.isDefined(attrs.justified)&&scope.$parent.$eval(attrs.justified)}}}).directive("uibTab",["$parse",function($parse){return{require:"^uibTabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(scope,elm,attrs,tabsetCtrl,transclude){scope.$watch("active",function(active){active&&tabsetCtrl.select(scope)}),scope.disabled=!1,attrs.disable&&scope.$parent.$watch($parse(attrs.disable),function(value){scope.disabled=!!value}),scope.select=function(){scope.disabled||(scope.active=!0)},tabsetCtrl.addTab(scope),scope.$on("$destroy",function(){tabsetCtrl.removeTab(scope)}),scope.$transcludeFn=transclude}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:["?^uibTab","?^tab"],link:function(scope,elm){scope.$watch("headingElement",function(heading){heading&&(elm.html(""),elm.append(heading))})}}}).directive("uibTabContentTransclude",function(){function isTabHeading(node){return node.tagName&&(node.hasAttribute("tab-heading")||node.hasAttribute("data-tab-heading")||node.hasAttribute("x-tab-heading")||node.hasAttribute("uib-tab-heading")||node.hasAttribute("data-uib-tab-heading")||node.hasAttribute("x-uib-tab-heading")||"tab-heading"===node.tagName.toLowerCase()||"data-tab-heading"===node.tagName.toLowerCase()||"x-tab-heading"===node.tagName.toLowerCase()||"uib-tab-heading"===node.tagName.toLowerCase()||"data-uib-tab-heading"===node.tagName.toLowerCase()||"x-uib-tab-heading"===node.tagName.toLowerCase())}return{restrict:"A",require:["?^uibTabset","?^tabset"],link:function(scope,elm,attrs){var tab=scope.$eval(attrs.uibTabContentTransclude);tab.$transcludeFn(tab.$parent,function(contents){angular.forEach(contents,function(node){isTabHeading(node)?tab.headingElement=node:elm.append(node)})})}}}),angular.module("ui.bootstrap.tabs").value("$tabsSuppressWarning",!1).controller("TabsetController",["$scope","$controller","$log","$tabsSuppressWarning",function($scope,$controller,$log,$tabsSuppressWarning){$tabsSuppressWarning||$log.warn("TabsetController is now deprecated. Use UibTabsetController instead."),angular.extend(this,$controller("UibTabsetController",{$scope:$scope}))}]).directive("tabset",["$log","$tabsSuppressWarning",function($log,$tabsSuppressWarning){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(scope,element,attrs){$tabsSuppressWarning||$log.warn("tabset is now deprecated. Use uib-tabset instead."),scope.vertical=!!angular.isDefined(attrs.vertical)&&scope.$parent.$eval(attrs.vertical),scope.justified=!!angular.isDefined(attrs.justified)&&scope.$parent.$eval(attrs.justified)}}}]).directive("tab",["$parse","$log","$tabsSuppressWarning",function($parse,$log,$tabsSuppressWarning){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(scope,elm,attrs,tabsetCtrl,transclude){$tabsSuppressWarning||$log.warn("tab is now deprecated. Use uib-tab instead."),scope.$watch("active",function(active){active&&tabsetCtrl.select(scope)}),scope.disabled=!1,attrs.disable&&scope.$parent.$watch($parse(attrs.disable),function(value){scope.disabled=!!value}),scope.select=function(){scope.disabled||(scope.active=!0)},tabsetCtrl.addTab(scope),scope.$on("$destroy",function(){tabsetCtrl.removeTab(scope)}),scope.$transcludeFn=transclude}}}]).directive("tabHeadingTransclude",["$log","$tabsSuppressWarning",function($log,$tabsSuppressWarning){return{restrict:"A",require:"^tab",link:function(scope,elm){$tabsSuppressWarning||$log.warn("tab-heading-transclude is now deprecated. Use uib-tab-heading-transclude instead."),scope.$watch("headingElement",function(heading){heading&&(elm.html(""),elm.append(heading))})}}}]).directive("tabContentTransclude",["$log","$tabsSuppressWarning",function($log,$tabsSuppressWarning){function isTabHeading(node){return node.tagName&&(node.hasAttribute("tab-heading")||node.hasAttribute("data-tab-heading")||node.hasAttribute("x-tab-heading")||"tab-heading"===node.tagName.toLowerCase()||"data-tab-heading"===node.tagName.toLowerCase()||"x-tab-heading"===node.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(scope,elm,attrs){$tabsSuppressWarning||$log.warn("tab-content-transclude is now deprecated. Use uib-tab-content-transclude instead.");var tab=scope.$eval(attrs.tabContentTransclude);tab.$transcludeFn(tab.$parent,function(contents){angular.forEach(contents,function(node){isTabHeading(node)?tab.headingElement=node:elm.append(node)})})}}}]),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function($scope,$element,$attrs,$parse,$log,$locale,timepickerConfig){function getHoursFromTemplate(){var hours=parseInt($scope.hours,10),valid=$scope.showMeridian?hours>0&&hours<13:hours>=0&&hours<24;if(valid)return $scope.showMeridian&&(12===hours&&(hours=0),$scope.meridian===meridians[1]&&(hours+=12)),hours}function getMinutesFromTemplate(){var minutes=parseInt($scope.minutes,10);return minutes>=0&&minutes<60?minutes:void 0}function pad(value){return angular.isDefined(value)&&value.toString().length<2?"0"+value:value.toString()}function refresh(keyboardChange){makeValid(),ngModelCtrl.$setViewValue(new Date(selected)),updateTemplate(keyboardChange)}function makeValid(){ngModelCtrl.$setValidity("time",!0),$scope.invalidHours=!1,$scope.invalidMinutes=!1}function updateTemplate(keyboardChange){var hours=selected.getHours(),minutes=selected.getMinutes();$scope.showMeridian&&(hours=0===hours||12===hours?12:hours%12),$scope.hours="h"===keyboardChange?hours:pad(hours),"m"!==keyboardChange&&($scope.minutes=pad(minutes)),$scope.meridian=selected.getHours()<12?meridians[0]:meridians[1]}function addMinutes(date,minutes){var dt=new Date(date.getTime()+6e4*minutes),newDate=new Date(date);return newDate.setHours(dt.getHours(),dt.getMinutes()),newDate}function addMinutesToSelected(minutes){selected=addMinutes(selected,minutes),refresh()}var selected=new Date,ngModelCtrl={$setViewValue:angular.noop},meridians=angular.isDefined($attrs.meridians)?$scope.$parent.$eval($attrs.meridians):timepickerConfig.meridians||$locale.DATETIME_FORMATS.AMPMS;$scope.tabindex=angular.isDefined($attrs.tabindex)?$attrs.tabindex:0,$element.removeAttr("tabindex"),this.init=function(ngModelCtrl_,inputs){ngModelCtrl=ngModelCtrl_,ngModelCtrl.$render=this.render,ngModelCtrl.$formatters.unshift(function(modelValue){return modelValue?new Date(modelValue):null});var hoursInputEl=inputs.eq(0),minutesInputEl=inputs.eq(1),mousewheel=angular.isDefined($attrs.mousewheel)?$scope.$parent.$eval($attrs.mousewheel):timepickerConfig.mousewheel;mousewheel&&this.setupMousewheelEvents(hoursInputEl,minutesInputEl);var arrowkeys=angular.isDefined($attrs.arrowkeys)?$scope.$parent.$eval($attrs.arrowkeys):timepickerConfig.arrowkeys;arrowkeys&&this.setupArrowkeyEvents(hoursInputEl,minutesInputEl),$scope.readonlyInput=angular.isDefined($attrs.readonlyInput)?$scope.$parent.$eval($attrs.readonlyInput):timepickerConfig.readonlyInput,this.setupInputEvents(hoursInputEl,minutesInputEl)};var hourStep=timepickerConfig.hourStep;$attrs.hourStep&&$scope.$parent.$watch($parse($attrs.hourStep),function(value){hourStep=parseInt(value,10)});var minuteStep=timepickerConfig.minuteStep;$attrs.minuteStep&&$scope.$parent.$watch($parse($attrs.minuteStep),function(value){minuteStep=parseInt(value,10)});var min;$scope.$parent.$watch($parse($attrs.min),function(value){var dt=new Date(value);min=isNaN(dt)?void 0:dt});var max;$scope.$parent.$watch($parse($attrs.max),function(value){var dt=new Date(value);max=isNaN(dt)?void 0:dt}),$scope.noIncrementHours=function(){var incrementedSelected=addMinutes(selected,60*hourStep);return incrementedSelected>max||incrementedSelected<selected&&incrementedSelected<min},$scope.noDecrementHours=function(){var decrementedSelected=addMinutes(selected,60*-hourStep);return decrementedSelected<min||decrementedSelected>selected&&decrementedSelected>max},$scope.noIncrementMinutes=function(){var incrementedSelected=addMinutes(selected,minuteStep);return incrementedSelected>max||incrementedSelected<selected&&incrementedSelected<min},$scope.noDecrementMinutes=function(){var decrementedSelected=addMinutes(selected,-minuteStep);return decrementedSelected<min||decrementedSelected>selected&&decrementedSelected>max},$scope.noToggleMeridian=function(){return selected.getHours()<13?addMinutes(selected,720)>max:addMinutes(selected,-720)<min},$scope.showMeridian=timepickerConfig.showMeridian,$attrs.showMeridian&&$scope.$parent.$watch($parse($attrs.showMeridian),function(value){if($scope.showMeridian=!!value,ngModelCtrl.$error.time){var hours=getHoursFromTemplate(),minutes=getMinutesFromTemplate();angular.isDefined(hours)&&angular.isDefined(minutes)&&(selected.setHours(hours),refresh())}else updateTemplate()}),this.setupMousewheelEvents=function(hoursInputEl,minutesInputEl){var isScrollingUp=function(e){e.originalEvent&&(e=e.originalEvent);var delta=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||delta>0};hoursInputEl.bind("mousewheel wheel",function(e){$scope.$apply(isScrollingUp(e)?$scope.incrementHours():$scope.decrementHours()),e.preventDefault()}),minutesInputEl.bind("mousewheel wheel",function(e){$scope.$apply(isScrollingUp(e)?$scope.incrementMinutes():$scope.decrementMinutes()),e.preventDefault()})},this.setupArrowkeyEvents=function(hoursInputEl,minutesInputEl){hoursInputEl.bind("keydown",function(e){38===e.which?(e.preventDefault(),$scope.incrementHours(),$scope.$apply()):40===e.which&&(e.preventDefault(),$scope.decrementHours(),$scope.$apply())}),minutesInputEl.bind("keydown",function(e){38===e.which?(e.preventDefault(),$scope.incrementMinutes(),$scope.$apply()):40===e.which&&(e.preventDefault(),$scope.decrementMinutes(),$scope.$apply())})},this.setupInputEvents=function(hoursInputEl,minutesInputEl){if($scope.readonlyInput)return $scope.updateHours=angular.noop,void($scope.updateMinutes=angular.noop);var invalidate=function(invalidHours,invalidMinutes){ngModelCtrl.$setViewValue(null),ngModelCtrl.$setValidity("time",!1),angular.isDefined(invalidHours)&&($scope.invalidHours=invalidHours),angular.isDefined(invalidMinutes)&&($scope.invalidMinutes=invalidMinutes)};$scope.updateHours=function(){var hours=getHoursFromTemplate(),minutes=getMinutesFromTemplate();angular.isDefined(hours)&&angular.isDefined(minutes)?(selected.setHours(hours),selected<min||selected>max?invalidate(!0):refresh("h")):invalidate(!0)},hoursInputEl.bind("blur",function(e){!$scope.invalidHours&&$scope.hours<10&&$scope.$apply(function(){$scope.hours=pad($scope.hours)})}),$scope.updateMinutes=function(){var minutes=getMinutesFromTemplate(),hours=getHoursFromTemplate();angular.isDefined(minutes)&&angular.isDefined(hours)?(selected.setMinutes(minutes),selected<min||selected>max?invalidate(void 0,!0):refresh("m")):invalidate(void 0,!0)},minutesInputEl.bind("blur",function(e){!$scope.invalidMinutes&&$scope.minutes<10&&$scope.$apply(function(){$scope.minutes=pad($scope.minutes)})})},this.render=function(){var date=ngModelCtrl.$viewValue;isNaN(date)?(ngModelCtrl.$setValidity("time",!1),$log.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(date&&(selected=date),selected<min||selected>max?(ngModelCtrl.$setValidity("time",!1),$scope.invalidHours=!0,$scope.invalidMinutes=!0):makeValid(),updateTemplate())},$scope.showSpinners=angular.isDefined($attrs.showSpinners)?$scope.$parent.$eval($attrs.showSpinners):timepickerConfig.showSpinners,$scope.incrementHours=function(){$scope.noIncrementHours()||addMinutesToSelected(60*hourStep)},$scope.decrementHours=function(){$scope.noDecrementHours()||addMinutesToSelected(60*-hourStep)},$scope.incrementMinutes=function(){$scope.noIncrementMinutes()||addMinutesToSelected(minuteStep)},$scope.decrementMinutes=function(){$scope.noDecrementMinutes()||addMinutesToSelected(-minuteStep)},$scope.toggleMeridian=function(){$scope.noToggleMeridian()||addMinutesToSelected(720*(selected.getHours()<12?1:-1))}}]).directive("uibTimepicker",function(){return{restrict:"EA",require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(element,attrs){return attrs.templateUrl||"template/timepicker/timepicker.html"},link:function(scope,element,attrs,ctrls){var timepickerCtrl=ctrls[0],ngModelCtrl=ctrls[1];ngModelCtrl&&timepickerCtrl.init(ngModelCtrl,element.find("input"))}}}),angular.module("ui.bootstrap.timepicker").value("$timepickerSuppressWarning",!1).controller("TimepickerController",["$scope","$element","$attrs","$controller","$log","$timepickerSuppressWarning",function($scope,$element,$attrs,$controller,$log,$timepickerSuppressWarning){$timepickerSuppressWarning||$log.warn("TimepickerController is now deprecated. Use UibTimepickerController instead."),angular.extend(this,$controller("UibTimepickerController",{$scope:$scope,$element:$element,$attrs:$attrs}))}]).directive("timepicker",["$log","$timepickerSuppressWarning",function($log,$timepickerSuppressWarning){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(element,attrs){return attrs.templateUrl||"template/timepicker/timepicker.html"},link:function(scope,element,attrs,ctrls){$timepickerSuppressWarning||$log.warn("timepicker is now deprecated. Use uib-timepicker instead.");var timepickerCtrl=ctrls[0],ngModelCtrl=ctrls[1];ngModelCtrl&&timepickerCtrl.init(ngModelCtrl,element.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function($parse){var TYPEAHEAD_REGEXP=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(input){var match=input.match(TYPEAHEAD_REGEXP);if(!match)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+input+'".');return{itemName:match[3],source:$parse(match[4]),viewMapper:$parse(match[2]||match[1]),modelMapper:$parse(match[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","uibTypeaheadParser",function(originalScope,element,attrs,$compile,$parse,$q,$timeout,$document,$window,$rootScope,$position,typeaheadParser){function fireRecalculating(){scope.moveInProgress||(scope.moveInProgress=!0,scope.$digest()),timeoutEventPromise&&$timeout.cancel(timeoutEventPromise),timeoutEventPromise=$timeout(function(){scope.matches.length&&recalculatePosition(),scope.moveInProgress=!1},eventDebounceTime)}function recalculatePosition(){scope.position=appendToBody?$position.offset(element):$position.position(element),scope.position.top+=element.prop("offsetHeight")}var modelCtrl,ngModelOptions,HOT_KEYS=[9,13,27,38,40],eventDebounceTime=200,minLength=originalScope.$eval(attrs.typeaheadMinLength);minLength||0===minLength||(minLength=1);var hasFocus,selected,waitTime=originalScope.$eval(attrs.typeaheadWaitMs)||0,isEditable=originalScope.$eval(attrs.typeaheadEditable)!==!1,isLoadingSetter=$parse(attrs.typeaheadLoading).assign||angular.noop,onSelectCallback=$parse(attrs.typeaheadOnSelect),isSelectOnBlur=!!angular.isDefined(attrs.typeaheadSelectOnBlur)&&originalScope.$eval(attrs.typeaheadSelectOnBlur),isNoResultsSetter=$parse(attrs.typeaheadNoResults).assign||angular.noop,inputFormatter=attrs.typeaheadInputFormatter?$parse(attrs.typeaheadInputFormatter):void 0,appendToBody=!!attrs.typeaheadAppendToBody&&originalScope.$eval(attrs.typeaheadAppendToBody),appendToElementId=attrs.typeaheadAppendToElementId||!1,focusFirst=originalScope.$eval(attrs.typeaheadFocusFirst)!==!1,selectOnExact=!!attrs.typeaheadSelectOnExact&&originalScope.$eval(attrs.typeaheadSelectOnExact),parsedModel=$parse(attrs.ngModel),invokeModelSetter=$parse(attrs.ngModel+"($$$p)"),$setModelValue=function(scope,newValue){return angular.isFunction(parsedModel(originalScope))&&ngModelOptions&&ngModelOptions.$options&&ngModelOptions.$options.getterSetter?invokeModelSetter(scope,{$$$p:newValue}):parsedModel.assign(scope,newValue)},parserResult=typeaheadParser.parse(attrs.uibTypeahead),scope=originalScope.$new(),offDestroy=originalScope.$on("$destroy",function(){scope.$destroy()});scope.$on("$destroy",offDestroy);var popupId="typeahead-"+scope.$id+"-"+Math.floor(1e4*Math.random());element.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":popupId});var popUpEl=angular.element("<div uib-typeahead-popup></div>");popUpEl.attr({id:popupId,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(attrs.typeaheadTemplateUrl)&&popUpEl.attr("template-url",attrs.typeaheadTemplateUrl),angular.isDefined(attrs.typeaheadPopupTemplateUrl)&&popUpEl.attr("popup-template-url",attrs.typeaheadPopupTemplateUrl);var resetMatches=function(){scope.matches=[],scope.activeIdx=-1,element.attr("aria-expanded",!1)},getMatchId=function(index){return popupId+"-option-"+index};scope.$watch("activeIdx",function(index){index<0?element.removeAttr("aria-activedescendant"):element.attr("aria-activedescendant",getMatchId(index))});var inputIsExactMatch=function(inputValue,index){return!!(scope.matches.length>index&&inputValue)&&inputValue.toUpperCase()===scope.matches[index].label.toUpperCase()},getMatchesAsync=function(inputValue){var locals={$viewValue:inputValue};isLoadingSetter(originalScope,!0),isNoResultsSetter(originalScope,!1),$q.when(parserResult.source(originalScope,locals)).then(function(matches){var onCurrentRequest=inputValue===modelCtrl.$viewValue;if(onCurrentRequest&&hasFocus)if(matches&&matches.length>0){scope.activeIdx=focusFirst?0:-1,isNoResultsSetter(originalScope,!1),scope.matches.length=0;for(var i=0;i<matches.length;i++)locals[parserResult.itemName]=matches[i],scope.matches.push({id:getMatchId(i),label:parserResult.viewMapper(scope,locals),model:matches[i]});scope.query=inputValue,recalculatePosition(),element.attr("aria-expanded",!0),selectOnExact&&1===scope.matches.length&&inputIsExactMatch(inputValue,0)&&scope.select(0)}else resetMatches(),isNoResultsSetter(originalScope,!0);onCurrentRequest&&isLoadingSetter(originalScope,!1)},function(){resetMatches(),isLoadingSetter(originalScope,!1),isNoResultsSetter(originalScope,!0)})};appendToBody&&(angular.element($window).bind("resize",fireRecalculating),$document.find("body").bind("scroll",fireRecalculating));var timeoutEventPromise;scope.moveInProgress=!1,scope.query=void 0;var timeoutPromise,scheduleSearchWithTimeout=function(inputValue){timeoutPromise=$timeout(function(){getMatchesAsync(inputValue)},waitTime)},cancelPreviousTimeout=function(){timeoutPromise&&$timeout.cancel(timeoutPromise)};resetMatches(),scope.select=function(activeIdx){var model,item,locals={};selected=!0,locals[parserResult.itemName]=item=scope.matches[activeIdx].model,model=parserResult.modelMapper(originalScope,locals),$setModelValue(originalScope,model),modelCtrl.$setValidity("editable",!0),modelCtrl.$setValidity("parse",!0),onSelectCallback(originalScope,{$item:item,$model:model,$label:parserResult.viewMapper(originalScope,locals)}),resetMatches(),scope.$eval(attrs.typeaheadFocusOnSelect)!==!1&&$timeout(function(){element[0].focus()},0,!1)},element.bind("keydown",function(evt){if(0!==scope.matches.length&&HOT_KEYS.indexOf(evt.which)!==-1){if(scope.activeIdx===-1&&(9===evt.which||13===evt.which))return resetMatches(),void scope.$digest();evt.preventDefault(),40===evt.which?(scope.activeIdx=(scope.activeIdx+1)%scope.matches.length,scope.$digest()):38===evt.which?(scope.activeIdx=(scope.activeIdx>0?scope.activeIdx:scope.matches.length)-1,scope.$digest()):13===evt.which||9===evt.which?scope.$apply(function(){scope.select(scope.activeIdx)}):27===evt.which&&(evt.stopPropagation(),resetMatches(),scope.$digest())}}),element.bind("blur",function(){isSelectOnBlur&&scope.matches.length&&scope.activeIdx!==-1&&!selected&&(selected=!0,scope.$apply(function(){scope.select(scope.activeIdx)})),hasFocus=!1,selected=!1});var dismissClickHandler=function(evt){element[0]!==evt.target&&3!==evt.which&&0!==scope.matches.length&&(resetMatches(),$rootScope.$$phase||scope.$digest())};$document.bind("click",dismissClickHandler),originalScope.$on("$destroy",function(){$document.unbind("click",dismissClickHandler),(appendToBody||appendToElementId)&&$popup.remove(),appendToBody&&(angular.element($window).unbind("resize",fireRecalculating),$document.find("body").unbind("scroll",fireRecalculating)),popUpEl.remove()});var $popup=$compile(popUpEl)(scope);appendToBody?$document.find("body").append($popup):appendToElementId!==!1?angular.element($document[0].getElementById(appendToElementId)).append($popup):element.after($popup),this.init=function(_modelCtrl,_ngModelOptions){modelCtrl=_modelCtrl,ngModelOptions=_ngModelOptions,modelCtrl.$parsers.unshift(function(inputValue){return hasFocus=!0,0===minLength||inputValue&&inputValue.length>=minLength?waitTime>0?(cancelPreviousTimeout(),scheduleSearchWithTimeout(inputValue)):getMatchesAsync(inputValue):(isLoadingSetter(originalScope,!1),cancelPreviousTimeout(),resetMatches()),isEditable?inputValue:inputValue?void modelCtrl.$setValidity("editable",!1):(modelCtrl.$setValidity("editable",!0),null)}),modelCtrl.$formatters.push(function(modelValue){var candidateViewValue,emptyViewValue,locals={};return isEditable||modelCtrl.$setValidity("editable",!0),inputFormatter?(locals.$model=modelValue,inputFormatter(originalScope,locals)):(locals[parserResult.itemName]=modelValue,candidateViewValue=parserResult.viewMapper(originalScope,locals),locals[parserResult.itemName]=void 0,emptyViewValue=parserResult.viewMapper(originalScope,locals),candidateViewValue!==emptyViewValue?candidateViewValue:modelValue)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(originalScope,element,attrs,ctrls){ctrls[2].init(ctrls[0],ctrls[1])}}}).directive("uibTypeaheadPopup",function(){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(element,attrs){return attrs.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(scope,element,attrs){scope.templateUrl=attrs.templateUrl,scope.isOpen=function(){return scope.matches.length>0},scope.isActive=function(matchIdx){return scope.active==matchIdx},scope.selectActive=function(matchIdx){scope.active=matchIdx},scope.selectMatch=function(activeIdx){scope.select({activeIdx:activeIdx})}}}}).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function($templateRequest,$compile,$parse){return{scope:{index:"=",match:"=",query:"="},link:function(scope,element,attrs){var tplUrl=$parse(attrs.templateUrl)(scope.$parent)||"template/typeahead/typeahead-match.html";$templateRequest(tplUrl).then(function(tplContent){$compile(tplContent.trim())(scope,function(clonedElement){element.replaceWith(clonedElement)})})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function($sce,$injector,$log){function escapeRegexp(queryToEscape){return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function containsHtml(matchItem){return/<.*>/g.test(matchItem)}var isSanitizePresent;return isSanitizePresent=$injector.has("$sanitize"),function(matchItem,query){return!isSanitizePresent&&containsHtml(matchItem)&&$log.warn("Unsafe use of typeahead please use ngSanitize"),matchItem=query?(""+matchItem).replace(new RegExp(escapeRegexp(query),"gi"),"<strong>$&</strong>"):matchItem,isSanitizePresent||(matchItem=$sce.trustAsHtml(matchItem)),matchItem}}]),angular.module("ui.bootstrap.typeahead").value("$typeaheadSuppressWarning",!1).service("typeaheadParser",["$parse","uibTypeaheadParser","$log","$typeaheadSuppressWarning",function($parse,uibTypeaheadParser,$log,$typeaheadSuppressWarning){return $typeaheadSuppressWarning||$log.warn("typeaheadParser is now deprecated. Use uibTypeaheadParser instead."),uibTypeaheadParser}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","typeaheadParser","$log","$typeaheadSuppressWarning",function($compile,$parse,$q,$timeout,$document,$window,$rootScope,$position,typeaheadParser,$log,$typeaheadSuppressWarning){var HOT_KEYS=[9,13,27,38,40],eventDebounceTime=200;return{require:["ngModel","^?ngModelOptions"],link:function(originalScope,element,attrs,ctrls){function fireRecalculating(){scope.moveInProgress||(scope.moveInProgress=!0,scope.$digest()),timeoutEventPromise&&$timeout.cancel(timeoutEventPromise),timeoutEventPromise=$timeout(function(){scope.matches.length&&recalculatePosition(),scope.moveInProgress=!1},eventDebounceTime)}function recalculatePosition(){scope.position=appendToBody?$position.offset(element):$position.position(element),scope.position.top+=element.prop("offsetHeight")}$typeaheadSuppressWarning||$log.warn("typeahead is now deprecated. Use uib-typeahead instead.");var modelCtrl=ctrls[0],ngModelOptions=ctrls[1],minLength=originalScope.$eval(attrs.typeaheadMinLength);minLength||0===minLength||(minLength=1);var hasFocus,selected,waitTime=originalScope.$eval(attrs.typeaheadWaitMs)||0,isEditable=originalScope.$eval(attrs.typeaheadEditable)!==!1,isLoadingSetter=$parse(attrs.typeaheadLoading).assign||angular.noop,onSelectCallback=$parse(attrs.typeaheadOnSelect),isSelectOnBlur=!!angular.isDefined(attrs.typeaheadSelectOnBlur)&&originalScope.$eval(attrs.typeaheadSelectOnBlur),isNoResultsSetter=$parse(attrs.typeaheadNoResults).assign||angular.noop,inputFormatter=attrs.typeaheadInputFormatter?$parse(attrs.typeaheadInputFormatter):void 0,appendToBody=!!attrs.typeaheadAppendToBody&&originalScope.$eval(attrs.typeaheadAppendToBody),appendToElementId=attrs.typeaheadAppendToElementId||!1,focusFirst=originalScope.$eval(attrs.typeaheadFocusFirst)!==!1,selectOnExact=!!attrs.typeaheadSelectOnExact&&originalScope.$eval(attrs.typeaheadSelectOnExact),parsedModel=$parse(attrs.ngModel),invokeModelSetter=$parse(attrs.ngModel+"($$$p)"),$setModelValue=function(scope,newValue){
return angular.isFunction(parsedModel(originalScope))&&ngModelOptions&&ngModelOptions.$options&&ngModelOptions.$options.getterSetter?invokeModelSetter(scope,{$$$p:newValue}):parsedModel.assign(scope,newValue)},parserResult=typeaheadParser.parse(attrs.typeahead),scope=originalScope.$new(),offDestroy=originalScope.$on("$destroy",function(){scope.$destroy()});scope.$on("$destroy",offDestroy);var popupId="typeahead-"+scope.$id+"-"+Math.floor(1e4*Math.random());element.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":popupId});var popUpEl=angular.element("<div typeahead-popup></div>");popUpEl.attr({id:popupId,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(attrs.typeaheadTemplateUrl)&&popUpEl.attr("template-url",attrs.typeaheadTemplateUrl),angular.isDefined(attrs.typeaheadPopupTemplateUrl)&&popUpEl.attr("popup-template-url",attrs.typeaheadPopupTemplateUrl);var resetMatches=function(){scope.matches=[],scope.activeIdx=-1,element.attr("aria-expanded",!1)},getMatchId=function(index){return popupId+"-option-"+index};scope.$watch("activeIdx",function(index){index<0?element.removeAttr("aria-activedescendant"):element.attr("aria-activedescendant",getMatchId(index))});var inputIsExactMatch=function(inputValue,index){return!!(scope.matches.length>index&&inputValue)&&inputValue.toUpperCase()===scope.matches[index].label.toUpperCase()},getMatchesAsync=function(inputValue){var locals={$viewValue:inputValue};isLoadingSetter(originalScope,!0),isNoResultsSetter(originalScope,!1),$q.when(parserResult.source(originalScope,locals)).then(function(matches){var onCurrentRequest=inputValue===modelCtrl.$viewValue;if(onCurrentRequest&&hasFocus)if(matches&&matches.length>0){scope.activeIdx=focusFirst?0:-1,isNoResultsSetter(originalScope,!1),scope.matches.length=0;for(var i=0;i<matches.length;i++)locals[parserResult.itemName]=matches[i],scope.matches.push({id:getMatchId(i),label:parserResult.viewMapper(scope,locals),model:matches[i]});scope.query=inputValue,recalculatePosition(),element.attr("aria-expanded",!0),selectOnExact&&1===scope.matches.length&&inputIsExactMatch(inputValue,0)&&scope.select(0)}else resetMatches(),isNoResultsSetter(originalScope,!0);onCurrentRequest&&isLoadingSetter(originalScope,!1)},function(){resetMatches(),isLoadingSetter(originalScope,!1),isNoResultsSetter(originalScope,!0)})};appendToBody&&(angular.element($window).bind("resize",fireRecalculating),$document.find("body").bind("scroll",fireRecalculating));var timeoutEventPromise;scope.moveInProgress=!1,resetMatches(),scope.query=void 0;var timeoutPromise,scheduleSearchWithTimeout=function(inputValue){timeoutPromise=$timeout(function(){getMatchesAsync(inputValue)},waitTime)},cancelPreviousTimeout=function(){timeoutPromise&&$timeout.cancel(timeoutPromise)};modelCtrl.$parsers.unshift(function(inputValue){return hasFocus=!0,0===minLength||inputValue&&inputValue.length>=minLength?waitTime>0?(cancelPreviousTimeout(),scheduleSearchWithTimeout(inputValue)):getMatchesAsync(inputValue):(isLoadingSetter(originalScope,!1),cancelPreviousTimeout(),resetMatches()),isEditable?inputValue:inputValue?void modelCtrl.$setValidity("editable",!1):(modelCtrl.$setValidity("editable",!0),null)}),modelCtrl.$formatters.push(function(modelValue){var candidateViewValue,emptyViewValue,locals={};return isEditable||modelCtrl.$setValidity("editable",!0),inputFormatter?(locals.$model=modelValue,inputFormatter(originalScope,locals)):(locals[parserResult.itemName]=modelValue,candidateViewValue=parserResult.viewMapper(originalScope,locals),locals[parserResult.itemName]=void 0,emptyViewValue=parserResult.viewMapper(originalScope,locals),candidateViewValue!==emptyViewValue?candidateViewValue:modelValue)}),scope.select=function(activeIdx){var model,item,locals={};selected=!0,locals[parserResult.itemName]=item=scope.matches[activeIdx].model,model=parserResult.modelMapper(originalScope,locals),$setModelValue(originalScope,model),modelCtrl.$setValidity("editable",!0),modelCtrl.$setValidity("parse",!0),onSelectCallback(originalScope,{$item:item,$model:model,$label:parserResult.viewMapper(originalScope,locals)}),resetMatches(),scope.$eval(attrs.typeaheadFocusOnSelect)!==!1&&$timeout(function(){element[0].focus()},0,!1)},element.bind("keydown",function(evt){if(0!==scope.matches.length&&HOT_KEYS.indexOf(evt.which)!==-1){if(scope.activeIdx===-1&&(9===evt.which||13===evt.which))return resetMatches(),void scope.$digest();evt.preventDefault(),40===evt.which?(scope.activeIdx=(scope.activeIdx+1)%scope.matches.length,scope.$digest()):38===evt.which?(scope.activeIdx=(scope.activeIdx>0?scope.activeIdx:scope.matches.length)-1,scope.$digest()):13===evt.which||9===evt.which?scope.$apply(function(){scope.select(scope.activeIdx)}):27===evt.which&&(evt.stopPropagation(),resetMatches(),scope.$digest())}}),element.bind("blur",function(){isSelectOnBlur&&scope.matches.length&&scope.activeIdx!==-1&&!selected&&(selected=!0,scope.$apply(function(){scope.select(scope.activeIdx)})),hasFocus=!1,selected=!1});var dismissClickHandler=function(evt){element[0]!==evt.target&&3!==evt.which&&0!==scope.matches.length&&(resetMatches(),$rootScope.$$phase||scope.$digest())};$document.bind("click",dismissClickHandler),originalScope.$on("$destroy",function(){$document.unbind("click",dismissClickHandler),(appendToBody||appendToElementId)&&$popup.remove(),appendToBody&&(angular.element($window).unbind("resize",fireRecalculating),$document.find("body").unbind("scroll",fireRecalculating)),popUpEl.remove()});var $popup=$compile(popUpEl)(scope);appendToBody?$document.find("body").append($popup):appendToElementId!==!1?angular.element($document[0].getElementById(appendToElementId)).append($popup):element.after($popup)}}}]).directive("typeaheadPopup",["$typeaheadSuppressWarning","$log",function($typeaheadSuppressWarning,$log){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(element,attrs){return attrs.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(scope,element,attrs){$typeaheadSuppressWarning||$log.warn("typeahead-popup is now deprecated. Use uib-typeahead-popup instead."),scope.templateUrl=attrs.templateUrl,scope.isOpen=function(){return scope.matches.length>0},scope.isActive=function(matchIdx){return scope.active==matchIdx},scope.selectActive=function(matchIdx){scope.active=matchIdx},scope.selectMatch=function(activeIdx){scope.select({activeIdx:activeIdx})}}}}]).directive("typeaheadMatch",["$templateRequest","$compile","$parse","$typeaheadSuppressWarning","$log",function($templateRequest,$compile,$parse,$typeaheadSuppressWarning,$log){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(scope,element,attrs){$typeaheadSuppressWarning||$log.warn("typeahead-match is now deprecated. Use uib-typeahead-match instead.");var tplUrl=$parse(attrs.templateUrl)(scope.$parent)||"template/typeahead/typeahead-match.html";$templateRequest(tplUrl).then(function(tplContent){$compile(tplContent.trim())(scope,function(clonedElement){element.replaceWith(clonedElement)})})}}}]).filter("typeaheadHighlight",["$sce","$injector","$log","$typeaheadSuppressWarning",function($sce,$injector,$log,$typeaheadSuppressWarning){function escapeRegexp(queryToEscape){return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function containsHtml(matchItem){return/<.*>/g.test(matchItem)}var isSanitizePresent;return isSanitizePresent=$injector.has("$sanitize"),function(matchItem,query){return $typeaheadSuppressWarning||$log.warn("typeaheadHighlight is now deprecated. Use uibTypeaheadHighlight instead."),!isSanitizePresent&&containsHtml(matchItem)&&$log.warn("Unsafe use of typeahead please use ngSanitize"),matchItem=query?(""+matchItem).replace(new RegExp(escapeRegexp(query),"gi"),"<strong>$&</strong>"):matchItem,isSanitizePresent||(matchItem=$sce.trustAsHtml(matchItem)),matchItem}}]),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/accordion/accordion-group.html",'<div class="panel {{panelClass || \'panel-default\'}}">\n <div class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div class="panel-collapse collapse" uib-collapse="!isOpen">\n\t <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/accordion/accordion.html",'<div class="panel-group" ng-transclude></div>')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <div class="carousel-inner" ng-transclude></div>\n <a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n </a>\n <a role="button" href class="right carousel-control" ng-click="next()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n </a>\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n </ol>\n</div>')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/datepicker/datepicker.html",'<div ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default btn-sm" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/datepicker/popup.html",'<ul class="dropdown-menu" dropdown-nested ng-if="isOpen" style="display: block" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n\t<li ng-transclude></li>\n\t<li ng-if="showButtonBar" style="padding:10px 9px 2px">\n\t\t<span class="btn-group pull-left">\n\t\t\t<button type="button" class="btn btn-sm btn-info" ng-click="select(\'today\')" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n\t\t\t<button type="button" class="btn btn-sm btn-danger" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n\t\t</span>\n\t\t<button type="button" class="btn btn-sm btn-success pull-right" ng-click="close()">{{ getText(\'close\') }}</button>\n\t</li>\n</ul>\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="3"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1" style="width:100%;"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row track by dt.date" class="text-center" role="gridcell" id="{{::dt.uid}}" ng-class="::dt.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default" ng-class="{\'btn-info\': dt.selected, active: isActive(dt)}" ng-click="select(dt.date)" ng-disabled="dt.disabled" tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/modal/backdrop.html",'<div uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog" ng-class="size ? \'modal-\' + size : \'\'"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/tooltip/tooltip-html-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/tooltip/tooltip-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/tooltip/tooltip-template-popup.html",'<div\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("template/popover/popover-html.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/popover/popover-html.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("template/popover/popover-template.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/popover/popover-template.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/popover/popover.html",'<div tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>\n')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" style="min-width: 0;" ng-transclude></div>\n</div>\n')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}" aria-valuetext="{{r.title}}"></i>\n</span>\n')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}">\n <a href ng-click="select()" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/timepicker/timepicker.html",'<table>\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group" ng-class="{\'has-error\': invalidHours}">\n <input style="width:50px;" type="text" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">\n </td>\n <td>:</td>\n <td class="form-group" ng-class="{\'has-error\': invalidMinutes}">\n <input style="width:50px;" type="text" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}">\n </td>\n <td ng-show="showMeridian"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/typeahead/typeahead-match.html",'<a href tabindex="-1" ng-bind-html="match.label | uibTypeaheadHighlight:query"></a>\n')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function($templateCache){$templateCache.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),function(){var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj};angular.module("ui.scroll",[]).directive("uiScrollViewport",function(){return{restrict:"A",controller:["$log","$scope","$element",function(console,scope,element){var self=this;self.container=element,self.viewport=element,angular.forEach(element.children(),function(child){"tbody"===child.tagName.toLowerCase()&&(self.viewport=angular.element(child))})}]}}).directive("uiScroll",["$log","$injector","$rootScope","$timeout","$q","$parse",function(console,$injector,$rootScope,$timeout,$q,$parse){function _insertElement(newElement,previousElement){return previousElement.after(newElement),[]}function removeElement(wrapper){return wrapper.element.remove(),wrapper.scope.$destroy(),[]}function _insertElementAnimated(newElement,previousElement){if(!$animate)return _insertElement(newElement,previousElement);if(isAngularVersionLessThen1_3){var _ret=function(){var deferred=$q.defer();return $animate.enter(newElement,null,previousElement,function(){return deferred.resolve()}),{v:[deferred.promise]}}();if("object"===("undefined"==typeof _ret?"undefined":_typeof(_ret)))return _ret.v}return[$animate.enter(newElement,null,previousElement)]}function removeElementAnimated(wrapper){if(!$animate)return removeElement(wrapper);if(isAngularVersionLessThen1_3){var _ret2=function(){var deferred=$q.defer();return $animate.leave(wrapper.element,function(){return wrapper.scope.$destroy(),deferred.resolve()}),{v:[deferred.promise]}}();if("object"===("undefined"==typeof _ret2?"undefined":_typeof(_ret2)))return _ret2.v}return[$animate.leave(wrapper.element).then(function(){return wrapper.scope.$destroy()})]}function Buffer(bufferSize){var buffer=Object.create(Array.prototype);return angular.extend(buffer,{size:bufferSize,reset:function(startIndex){buffer.remove(0,buffer.length),buffer.eof=!1,buffer.bof=!1,buffer.first=startIndex,buffer.next=startIndex,buffer.minIndex=startIndex,buffer.maxIndex=startIndex,buffer.minIndexUser=null,buffer.maxIndexUser=null},append:function(items){items.forEach(function(item){++buffer.next,buffer.insert("append",item)}),buffer.maxIndex=buffer.eof?buffer.next-1:Math.max(buffer.next-1,buffer.maxIndex)},prepend:function(items){items.reverse().forEach(function(item){--buffer.first,buffer.insert("prepend",item)}),buffer.minIndex=buffer.bof?buffer.minIndex=buffer.first:Math.min(buffer.first,buffer.minIndex)},insert:function(operation,item){var wrapper={item:item};if(operation%1===0)wrapper.op="insert",buffer.splice(operation,0,wrapper);else switch(wrapper.op=operation,operation){case"append":buffer.push(wrapper);break;case"prepend":buffer.unshift(wrapper)}},remove:function(arg1,arg2){if(angular.isNumber(arg1)){for(var i=arg1;i<arg2;i++)removeElement(buffer[i]);return buffer.splice(arg1,arg2-arg1)}return buffer.splice(buffer.indexOf(arg1),1),removeElementAnimated(arg1)},effectiveHeight:function(elements){if(!elements.length)return 0;var top=Number.MAX_VALUE,bottom=Number.MIN_VALUE;return elements.forEach(function(wrapper){wrapper.element[0].offsetParent&&(top=Math.min(top,wrapper.element.offset().top),bottom=Math.max(bottom,wrapper.element.offset().top+wrapper.element.outerHeight(!0)))}),Math.max(0,bottom-top)}}),buffer}function Viewport(buffer,element,viewportController,attrs){function Cache(){var cache=Object.create(Array.prototype);return angular.extend(cache,{add:function(item){var existedItem=cache.find(function(i){return i.index===item.scope.$index});return existedItem?void(existedItem.height=item.element.outerHeight()):void cache.push({index:item.scope.$index,height:item.element.outerHeight()
})},clear:function(){cache.length=0}}),cache}function Padding(template){var result=void 0;switch(template.tagName){case"dl":throw new Error("ui-scroll directive does not support <"+template.tagName+"> as a repeating tag: "+template.outerHTML);case"tr":var table=angular.element("<table><tr><td><div></div></td></tr></table>");result=table.find("tr");break;case"li":result=angular.element("<li></li>");break;default:result=angular.element("<div></div>")}return result.cache=new Cache,result}function bufferPadding(){return viewport.outerHeight()*Math.max(PADDING_MIN,+attrs.padding||PADDING_DEFAULT)}var PADDING_MIN=.3,PADDING_DEFAULT=.5,topPadding=void 0,bottomPadding=void 0,viewport=viewportController&&viewportController.viewport?viewportController.viewport:angular.element(window),container=viewportController&&viewportController.container?viewportController.container:void 0;return viewport.css({"overflow-y":"auto",display:"block"}),angular.extend(viewport,{createPaddingElements:function(template){topPadding=new Padding(template),bottomPadding=new Padding(template),element.before(topPadding),element.after(bottomPadding)},applyContainerStyle:function(){container&&container!==viewport&&viewport.css("height",window.getComputedStyle(container[0]).height)},bottomDataPos:function(){var scrollHeight=viewport[0].scrollHeight;return scrollHeight=null!=scrollHeight?scrollHeight:viewport[0].document.documentElement.scrollHeight,scrollHeight-bottomPadding.height()},topDataPos:function(){return topPadding.height()},bottomVisiblePos:function(){return viewport.scrollTop()+viewport.outerHeight()},topVisiblePos:function(){return viewport.scrollTop()},insertElement:function(e,sibling){return _insertElement(e,sibling||topPadding)},insertElementAnimated:function(e,sibling){return _insertElementAnimated(e,sibling||topPadding)},shouldLoadBottom:function(){return!buffer.eof&&viewport.bottomDataPos()<viewport.bottomVisiblePos()+bufferPadding()},clipBottom:function(){for(var overage=0,overageHeight=0,itemHeight=0,emptySpaceHeight=viewport.bottomDataPos()-viewport.bottomVisiblePos()-bufferPadding(),i=buffer.length-1;i>=0&&(itemHeight=buffer[i].element.outerHeight(!0),!(overageHeight+itemHeight>emptySpaceHeight));i--)bottomPadding.cache.add(buffer[i]),overageHeight+=itemHeight,overage++;overage>0&&(buffer.eof=!1,buffer.remove(buffer.length-overage,buffer.length),buffer.next-=overage,viewport.adjustPadding())},shouldLoadTop:function(){return!buffer.bof&&viewport.topDataPos()>viewport.topVisiblePos()-bufferPadding()},clipTop:function(){for(var overage=0,overageHeight=0,itemHeight=0,emptySpaceHeight=viewport.topVisiblePos()-viewport.topDataPos()-bufferPadding(),i=0;i<buffer.length&&(itemHeight=buffer[i].element.outerHeight(!0),!(overageHeight+itemHeight>emptySpaceHeight));i++)topPadding.cache.add(buffer[i]),overageHeight+=itemHeight,overage++;overage>0&&(topPadding.height(topPadding.height()+overageHeight),buffer.bof=!1,buffer.remove(0,overage),buffer.first+=overage)},adjustPadding:function(){if(buffer.length){var topPaddingHeight=topPadding.cache.reduce(function(summ,item){return summ+(item.index<buffer.first?item.height:0)},0),bottomPaddingHeight=bottomPadding.cache.reduce(function(summ,item){return summ+(item.index>=buffer.next?item.height:0)},0),visibleItemsHeight=buffer.reduce(function(summ,item){return summ+item.element.outerHeight(!0)},0),averageItemHeight=(visibleItemsHeight+topPaddingHeight+bottomPaddingHeight)/(buffer.maxIndex-buffer.minIndex+1),adjustTopPadding=null!==buffer.minIndexUser&&buffer.minIndex>buffer.minIndexUser,adjustBottomPadding=null!==buffer.maxIndexUser&&buffer.maxIndex<buffer.maxIndexUser,topPaddingHeightAdd=adjustTopPadding?(buffer.minIndex-buffer.minIndexUser)*averageItemHeight:0,bottomPaddingHeightAdd=adjustBottomPadding?(buffer.maxIndexUser-buffer.maxIndex)*averageItemHeight:0;topPadding.height(topPaddingHeight+topPaddingHeightAdd),bottomPadding.height(bottomPaddingHeight+bottomPaddingHeightAdd)}},adjustScrollTopAfterMinIndexSet:function(topPaddingHeightOld){if(null!==buffer.minIndexUser&&buffer.minIndex>buffer.minIndexUser){var diff=topPadding.height()-topPaddingHeightOld;viewport.scrollTop(viewport.scrollTop()+diff)}},adjustScrollTopAfterPrepend:function(updates){if(updates.prepended.length){var height=buffer.effectiveHeight(updates.prepended),paddingHeight=topPadding.height()-height;paddingHeight>=0?topPadding.height(paddingHeight):(topPadding.height(0),viewport.scrollTop(viewport.scrollTop()-paddingHeight))}},resetTopPadding:function(){topPadding.height(0),topPadding.cache.clear()},resetBottomPadding:function(){bottomPadding.height(0),bottomPadding.cache.clear()}}),viewport}function Adapter($attr,viewport,buffer,adjustBuffer){function createValueInjector(attribute){var expression=$attr[attribute],scope=viewportScope,assign=void 0;if(expression){var match=expression.match(/^(\S+)(?:\s+on\s+(\w(?:\w|\d)*))?$/);if(!match)throw new Error("Expected injection expression in form of 'target' or 'target on controller' but got '"+expression+"'");var target=match[1],controllerName=match[2];if(controllerName){var candidate=viewport;for(scope=void 0;candidate.length;){var controller=candidate.attr("ng-controller");if(controller===controllerName){scope=candidate.scope();break}candidate=candidate.parent()}if(!scope)throw new Error("Failed to locate target controller '"+controllerName+"' to inject '"+target+"'")}assign=$parse(target).assign}return function(value){self!==value&&(self[attribute]=value),assign&&assign(scope,value)}}function applyUpdate(wrapper,newItems){if(angular.isArray(newItems)){var keepIt=void 0,pos=buffer.indexOf(wrapper)+1;newItems.reverse().forEach(function(newItem){newItem===wrapper.item?(keepIt=!0,pos--):buffer.insert(pos,newItem)}),keepIt||(wrapper.op="remove")}}var viewportScope=viewport.scope()||$rootScope,disabled=!1,self=this;createValueInjector("adapter")(self);var topVisibleInjector=createValueInjector("topVisible"),topVisibleElementInjector=createValueInjector("topVisibleElement"),topVisibleScopeInjector=createValueInjector("topVisibleScope"),isLoadingInjector=createValueInjector("isLoading");Object.defineProperty(this,"disabled",{get:function(){return disabled},set:function(value){return(disabled=value)?null:adjustBuffer()}}),this.isLoading=!1,this.isBOF=function(){return buffer.bof},this.isEOF=function(){return buffer.eof},this.applyUpdates=function(arg1,arg2){if(angular.isFunction(arg1))buffer.slice(0).forEach(function(wrapper){applyUpdate(wrapper,arg1(wrapper.item,wrapper.scope,wrapper.element))});else{if(arg1%1!==0)throw new Error("applyUpdates - "+arg1+" is not a valid index");var index=arg1-buffer.first;index>=0&&index<buffer.length&&applyUpdate(buffer[index],arg2)}adjustBuffer()},this.append=function(newItems){buffer.append(newItems),adjustBuffer()},this.prepend=function(newItems){buffer.prepend(newItems),adjustBuffer()},this.loading=function(value){isLoadingInjector(value)},this.calculateProperties=function(){for(var item=void 0,itemHeight=void 0,itemTop=void 0,isNewRow=void 0,rowTop=void 0,topHeight=0,i=0;i<buffer.length;i++){if(item=buffer[i],itemTop=item.element.offset().top,isNewRow=rowTop!==itemTop,rowTop=itemTop,isNewRow&&(itemHeight=item.element.outerHeight(!0)),!(isNewRow&&viewport.topDataPos()+topHeight+itemHeight<=viewport.topVisiblePos())){isNewRow&&(topVisibleInjector(item.item),topVisibleElementInjector(item.element),topVisibleScopeInjector(item.scope));break}topHeight+=itemHeight}}}function link($scope,element,$attr,controllers,linker){function defineProperty(datasource,propName,propUserName){var descriptor=Object.getOwnPropertyDescriptor(datasource,propName);descriptor&&(descriptor.set||descriptor.get)||Object.defineProperty(datasource,propName,{set:function(value){indexStore[propName]=value,$timeout(function(){if(buffer[propUserName]=value,!pending.length){var topPaddingHeightOld=viewport.topDataPos();viewport.adjustPadding(),"minIndex"===propName&&viewport.adjustScrollTopAfterMinIndexSet(topPaddingHeightOld)}})},get:function(){return indexStore[propName]}})}function isInvalid(rid){return rid&&rid!==ridActual||$scope.$$destroyed}function bindEvents(){viewport.bind("resize",resizeAndScrollHandler),viewport.bind("scroll",resizeAndScrollHandler)}function unbindEvents(){viewport.unbind("resize",resizeAndScrollHandler),viewport.unbind("scroll",resizeAndScrollHandler)}function reload(){viewport.resetTopPadding(),viewport.resetBottomPadding(),arguments.length&&(startIndex=arguments[0]),buffer.reset(startIndex),adjustBuffer()}function isElementVisible(wrapper){return wrapper.element.height()&&wrapper.element[0].offsetParent}function visibilityWatcher(wrapper){isElementVisible(wrapper)&&(buffer.forEach(function(item){angular.isFunction(item.unregisterVisibilityWatcher)&&(item.unregisterVisibilityWatcher(),delete item.unregisterVisibilityWatcher)}),adjustBuffer())}function insertWrapperContent(wrapper,insertAfter){createElement(wrapper,insertAfter,viewport.insertElement),isElementVisible(wrapper)||(wrapper.unregisterVisibilityWatcher=wrapper.scope.$watch(function(){return visibilityWatcher(wrapper)})),wrapper.element.addClass("ng-hide")}function createElement(wrapper,insertAfter,insertElement){var promises=void 0,sibling=insertAfter>0?buffer[insertAfter-1].element:void 0;return linker(function(clone,scope){promises=insertElement(clone,sibling),wrapper.element=clone,wrapper.scope=scope,scope[itemName]=wrapper.item}),adapter.transform&&adapter.transform(wrapper.scope,wrapper.element),promises}function updateDOM(){var promises=[],toBePrepended=[],toBeRemoved=[],inserted=[];return buffer.forEach(function(wrapper,i){switch(wrapper.op){case"prepend":toBePrepended.unshift(wrapper);break;case"append":insertWrapperContent(wrapper,i),wrapper.op="none",inserted.push(wrapper);break;case"insert":promises=promises.concat(createElement(wrapper,i,viewport.insertElementAnimated)),wrapper.op="none",inserted.push(wrapper);break;case"remove":toBeRemoved.push(wrapper)}}),toBeRemoved.forEach(function(wrapper){return promises=promises.concat(buffer.remove(wrapper))}),toBePrepended.length&&toBePrepended.forEach(function(wrapper){insertWrapperContent(wrapper),wrapper.op="none"}),buffer.forEach(function(item,i){return item.scope.$index=buffer.first+i}),{prepended:toBePrepended,removed:toBeRemoved,inserted:inserted,animated:promises}}function updatePaddings(rid,updates){updates.animated.length?$q.all(updates.animated).then(function(){viewport.adjustPadding(),adjustBuffer(rid)}):viewport.adjustPadding()}function enqueueFetch(rid,updates){viewport.shouldLoadBottom()?(!updates||buffer.effectiveHeight(updates.inserted)>0)&&1===pending.push(!0)&&(fetch(rid),adapter.loading(!0)):viewport.shouldLoadTop()&&(!updates||buffer.effectiveHeight(updates.prepended)>0||pending[0])&&1===pending.push(!1)&&(fetch(rid),adapter.loading(!0))}function adjustBuffer(rid){rid||(pending=[],rid=++ridActual);var updates=updateDOM();$timeout(function(){updates.inserted.forEach(function(w){return w.element.removeClass("ng-hide")}),updates.prepended.forEach(function(w){return w.element.removeClass("ng-hide")}),isInvalid(rid)||(updatePaddings(rid,updates),enqueueFetch(rid),pending.length||adapter.calculateProperties())})}function adjustBufferAfterFetch(rid){var updates=updateDOM();$timeout(function(){updates.inserted.forEach(function(w){return w.element.removeClass("ng-hide")}),updates.prepended.forEach(function(w){return w.element.removeClass("ng-hide")}),viewport.adjustScrollTopAfterPrepend(updates),isInvalid(rid)||(updatePaddings(rid,updates),enqueueFetch(rid,updates),pending.shift(),pending.length?fetch(rid):(adapter.loading(!1),bindEvents(),adapter.calculateProperties()))})}function fetch(rid){pending[0]?buffer.length&&!viewport.shouldLoadBottom()?adjustBufferAfterFetch(rid):fetchNext(function(result){isInvalid(rid)||(result.length<bufferSize&&(buffer.eof=!0),result.length>0&&(viewport.clipTop(),buffer.append(result)),adjustBufferAfterFetch(rid))}):buffer.length&&!viewport.shouldLoadTop()?adjustBufferAfterFetch(rid):fetchPrevious(function(result){isInvalid(rid)||(result.length<bufferSize&&(buffer.bof=!0),result.length>0&&(buffer.length&&viewport.clipBottom(),buffer.prepend(result)),adjustBufferAfterFetch(rid))})}function resizeAndScrollHandler(){$rootScope.$$phase||adapter.isLoading||adapter.disabled||(enqueueFetch(ridActual),pending.length?unbindEvents():(adapter.calculateProperties(),$scope.$apply()))}function wheelHandler(event){if(!adapter.disabled){var scrollTop=viewport[0].scrollTop,yMax=viewport[0].scrollHeight-viewport[0].clientHeight;(0===scrollTop&&!buffer.bof||scrollTop===yMax&&!buffer.eof)&&event.preventDefault()}}var match=$attr.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);if(!match)throw new Error("Expected uiScroll in form of '_item_ in _datasource_' but got '"+$attr.uiScroll+"'");var datasource=null,itemName=match[1],datasourceName=match[2],bufferSize=Math.max(3,+$attr.bufferSize||10),viewportController=controllers[0],startIndex=parseInt($attr.startIndex,10);startIndex=isNaN(startIndex)?1:startIndex;var ridActual=0,pending=[],buffer=new Buffer(bufferSize),viewport=new Viewport(buffer,element,viewportController,$attr),adapter=new Adapter($attr,viewport,buffer,adjustBuffer);viewportController&&(viewportController.adapter=adapter);var isDatasourceValid=function(){return angular.isObject(datasource)&&angular.isFunction(datasource.get)};if(datasource=$parse(datasourceName)($scope),!isDatasourceValid()&&(datasource=$injector.get(datasourceName),!isDatasourceValid()))throw new Error(datasourceName+" is not a valid datasource");var indexStore={};defineProperty(datasource,"minIndex","minIndexUser"),defineProperty(datasource,"maxIndex","maxIndexUser");var fetchNext=2!==datasource.get.length?function(success){return datasource.get(buffer.next,bufferSize,success)}:function(success){datasource.get({index:buffer.next,append:buffer.length?buffer[buffer.length-1].item:void 0,count:bufferSize},success)},fetchPrevious=2!==datasource.get.length?function(success){return datasource.get(buffer.first-bufferSize,bufferSize,success)}:function(success){datasource.get({index:buffer.first-bufferSize,prepend:buffer.length?buffer[0].item:void 0,count:bufferSize},success)};adapter.reload=reload,linker(function(clone,scope){viewport.createPaddingElements(clone[0]),scope.$destroy(),clone.remove()}),$scope.$on("$destroy",function(){unbindEvents(),viewport.unbind("mousewheel",wheelHandler)}),viewport.bind("mousewheel",wheelHandler),$timeout(function(){viewport.applyContainerStyle(),reload()})}var $animate=$injector.has&&$injector.has("$animate")?$injector.get("$animate"):null,isAngularVersionLessThen1_3=1===angular.version.major&&angular.version.minor<3;return{require:["?^^uiScrollViewport"],restrict:"A",transclude:"element",priority:1e3,terminal:!0,link:link}}])}(),function(){angular.module("ui.scrollpoint",[]).directive("uiScrollpoint",["$window","$timeout",function($window,$timeout){function getWindowScrollTop(){if(angular.isDefined($window.pageYOffset))return $window.pageYOffset;var iebody=document.compatMode&&"BackCompat"!==document.compatMode?document.documentElement:document.body;return iebody.scrollTop}function getWindowScrollHeight(){return $window.document.body.scrollHeight-$window.innerHeight}function getWindowHeight(contentHeight){return contentHeight?$window.document.body.clientHeight:$window.innerHeight}return{require:["uiScrollpoint","^?uiScrollpointTarget"],controller:function(){function parseScrollpoint(scrollpoint){var def={shift:0,absolute:!1,percent:!1};if(scrollpoint&&angular.isString(scrollpoint))if(def.percent="%"==scrollpoint.charAt(scrollpoint.length-1),def.percent&&(scrollpoint=scrollpoint.substr(0,scrollpoint.length-1)),"-"===scrollpoint.charAt(0))def.absolute=def.percent,def.shift=-parseFloat(scrollpoint.substr(1));else if("+"===scrollpoint.charAt(0))def.absolute=def.percent,def.shift=parseFloat(scrollpoint.substr(1));else{var parsed=parseFloat(scrollpoint);!isNaN(parsed)&&isFinite(parsed)&&(def.absolute=!0,def.shift=parsed)}else if(angular.isNumber(scrollpoint))return parseScrollpoint(scrollpoint.toString());return def}var self=this;this.$element=void 0,this.$target=void 0,this.hasTarget=!1,this.hit=void 0,this.edges={top:{top:!0}},this.hitEdge=void 0,this.default_edge={absolute:!1,percent:!1,shift:0},this.posCache={},this.ready=!1,this.enabled=!0,this.scrollpointClass="ui-scrollpoint",this.actions=void 0,this.addEdge=function(view_edge,element_edge){if(angular.isString(view_edge))if(angular.isUndefined(element_edge)&&(element_edge=!0),"view"==view_edge)this.addEdge("top","bottom"),this.addEdge("bottom","top");else{var edge,parsedEdge;if(angular.isObject(element_edge))for(edge in element_edge)element_edge[edge]===!0?element_edge[edge]=!0:element_edge[edge]=parseScrollpoint(element_edge[edge]);else"top"==element_edge||"bottom"==element_edge?(edge=element_edge,parsedEdge=parseScrollpoint(),element_edge={},element_edge[edge]=parsedEdge):element_edge===!0?(element_edge={},element_edge[view_edge]=!0):(parsedEdge=parseScrollpoint(element_edge),element_edge={},element_edge[view_edge]=parsedEdge);this.edges[view_edge]=element_edge}},this.addAction=function(action){action&&angular.isFunction(action)&&(angular.isUndefined(this.actions)?this.actions=[action]:this.actions.indexOf(action)==-1&&this.actions.push(action))},this.setScrollpoint=function(scrollpoint){this.default_edge=parseScrollpoint(scrollpoint)},this.setClass=function(_class){_class||(_class="ui-scrollpoint"),this.scrollpointClass=_class},this.setEdges=function(edges){if(angular.isString(edges))this.edges={},this.addEdge(edges);else if(angular.isArray(edges)){this.edges={};for(var i=0;i<edges.length;i++)this.addEdge(edges[i])}else if(angular.isObject(edges)){this.edges={};for(var edge in edges)this.addEdge(edge,edges[edge])}else this.edges={},this.addEdge("top")},this.setElement=function(element){this.$element=element},this.setTarget=function(target){target?(this.$target=target,this.hasTarget=!0):(this.$target=angular.element($window),this.hasTarget=!1)},this.getEdge=function(scroll_edge,element_edge){if(scroll_edge&&element_edge){if(this.edges[scroll_edge]&&this.edges[scroll_edge][element_edge]&&this.edges[scroll_edge][element_edge]!==!0)return this.edges[scroll_edge][element_edge]}else if(scroll_edge&&!element_edge){if(this.edges[scroll_edge])return this.edges[scroll_edge];return}return this.default_edge},this.checkOffset=function(scroll_edge,elem_edge,edge){var offset;edge||(edge=this.default_edge);var scroll_bottom="bottom"==scroll_edge,elem_top="top"==elem_edge,elem_bottom="bottom"==elem_edge,scrollOffset=this.getScrollOffset();scroll_bottom&&(scrollOffset+=this.getTargetHeight());var checkOffset;return edge.absolute?(checkOffset=edge.percent?edge.shift/100*this.getTargetScrollHeight():edge.shift,scroll_bottom&&(checkOffset=this.getTargetContentHeight()-checkOffset,this.hasTarget&&(checkOffset+=this.getTargetHeight()))):(elem_top?checkOffset=this.getElementTop():elem_bottom&&(checkOffset=this.getElementBottom()),checkOffset+=edge.shift),offset=scrollOffset-checkOffset,scroll_bottom&&(offset*=-1),offset},this.scrollEdgeHit=function(){var offset,edgeHit,absEdges,absEdgeHits,edge,scroll_edge,element_edge;absEdges=0,absEdgeHits={};for(scroll_edge in this.edges)for(element_edge in this.edges[scroll_edge]){edge=this.getEdge(scroll_edge,element_edge);var edge_offset=this.checkOffset(scroll_edge,element_edge,edge);edge.absolute?(angular.isUndefined(absEdgeHits)&&(absEdgeHits={}),angular.isUndefined(absEdgeHits[scroll_edge])&&(absEdgeHits[scroll_edge]={}),absEdgeHits[scroll_edge][element_edge]=edge_offset,absEdges++):(angular.isUndefined(offset)||edge_offset>offset)&&(offset=edge_offset,edgeHit={scroll:scroll_edge,element:element_edge})}if(absEdges&&!edgeHit){var allPass=!0;offset=void 0;for(scroll_edge in absEdgeHits)for(element_edge in absEdgeHits[scroll_edge])absEdges>1&&absEdgeHits[scroll_edge][element_edge]<0?allPass=!1:(angular.isUndefined(offset)||absEdgeHits[scroll_edge][element_edge]>offset)&&(offset=absEdgeHits[scroll_edge][element_edge],edgeHit={scroll:scroll_edge,element:element_edge});allPass||(edgeHit=void 0,offset=void 0)}return this.hitEdge=offset>=0?edgeHit:void 0,offset},this.getScrollOffset=function(){return this.hasTarget?this.$target[0].scrollTop:getWindowScrollTop()},this.getTargetHeight=function(){return this.hasTarget?this.$target[0].offsetHeight:getWindowHeight()},this.getTargetContentHeight=function(){return this.hasTarget?this.$target[0].scrollHeight-this.$target[0].clientHeight:getWindowHeight(!0)},this.getTargetScrollHeight=function(){return this.hasTarget?this.$target[0].scrollHeight-this.$target[0].clientHeight:getWindowScrollHeight()},this.getElementTop=function(current){if(!current&&angular.isDefined(this.posCache.top))return this.posCache.top;var bounds=this.$element[0].getBoundingClientRect(),top=bounds.top+this.getScrollOffset();if(this.hasTarget){var targetBounds=this.$target[0].getBoundingClientRect();top-=targetBounds.top}return top},this.getElementBottom=function(current){return this.getElementTop(current)+this.$element[0].offsetHeight},this.cachePosition=function(){this.posCache.top=this.getElementTop(!0)},this.onScroll=function(){if(self.ready&&self.enabled){var edgeHit=self.scrollEdgeHit(),fireActions=!1;if(edgeHit>=0?self.hit||(self.$element.hasClass(self.scrollpointClass)||self.$element.addClass(self.scrollpointClass),fireActions=!0,self.hit=!0):((self.hit||angular.isUndefined(self.hit))&&(self.$element.hasClass(self.scrollpointClass)&&self.$element.removeClass(self.scrollpointClass),fireActions=!0,self.hit=!1),self.cachePosition()),fireActions&&self.actions)for(var i=0;i<self.actions.length;i++)self.actions[i](edgeHit,self.$element,self.hitEdge?self.hitEdge.scroll:void 0,self.hitEdge?self.hitEdge.element:void 0)}},this.reset=function(){$timeout(function(){self.$element.removeClass(self.scrollpointClass),self.hit=void 0,self.hitEdge=void 0,self.cachePosition(),self.onScroll()})}},link:function(scope,elm,attrs,Ctrl){function resetTarget(){uiScrollpoint.$target.on("scroll",uiScrollpoint.onScroll),scope.$on("$destroy",function(){uiScrollpoint.$target.off("scroll",uiScrollpoint.onScroll)})}var uiScrollpoint=Ctrl[0],uiScrollpointTarget=Ctrl[1],absoluteParent=!1;uiScrollpoint.setElement(elm),uiScrollpoint.setTarget(uiScrollpointTarget?uiScrollpointTarget.$element:null),attrs.$observe("uiScrollpoint",function(scrollpoint){uiScrollpoint.setScrollpoint(scrollpoint),uiScrollpoint.reset()}),attrs.$observe("uiScrollpointEnabled",function(scrollpointEnabled){scrollpointEnabled=scope.$eval(scrollpointEnabled),scrollpointEnabled!=uiScrollpoint.enabled&&uiScrollpoint.reset(),uiScrollpoint.enabled=scrollpointEnabled}),attrs.$observe("uiScrollpointAbsolute",function(scrollpointAbsolute){scrollpointAbsolute=scope.$eval(scrollpointAbsolute),scrollpointAbsolute!=absoluteParent&&(uiScrollpoint.$target&&uiScrollpoint.$target.off("scroll",uiScrollpoint.onScroll),uiScrollpoint.setTarget(!scrollpointAbsolute&&uiScrollpointTarget?uiScrollpointTarget.$element:null),resetTarget(),uiScrollpoint.reset()),absoluteParent=scrollpointAbsolute}),attrs.$observe("uiScrollpointAction",function(uiScrollpointAction){var action=scope.$eval(uiScrollpointAction);action&&angular.isFunction(action)&&uiScrollpoint.addAction(action)}),attrs.$observe("uiScrollpointClass",function(scrollpointClass){elm.removeClass(uiScrollpoint.scrollpointClass),uiScrollpoint.setClass(scrollpointClass),uiScrollpoint.reset()}),attrs.$observe("uiScrollpointEdge",function(scrollpointEdge){if(scrollpointEdge){var allowedKeywords=["top","bottom","view"];allowedKeywords.indexOf(scrollpointEdge)==-1&&(scrollpointEdge=scope.$eval(scrollpointEdge)),uiScrollpoint.setEdges(scrollpointEdge),uiScrollpoint.reset()}}),resetTarget(),elm.ready(function(){uiScrollpoint.ready=!0,uiScrollpoint.onScroll()}),scope.$on("scrollpointShouldReset",uiScrollpoint.reset)}}}]).directive("uiScrollpointTarget",[function(){return{controller:["$element",function($element){this.$element=$element}]}}])}(),function(){angular.module("ui.event",[]).directive("uiEvent",["$parse",function($parse){return function($scope,elm,attrs){var events=$scope.$eval(attrs.uiEvent);angular.forEach(events,function(uiEvent,eventName){var fn=$parse(uiEvent);elm.bind(eventName,function(evt){var params=Array.prototype.slice.call(arguments);params=params.splice(1),fn($scope,{$event:evt,$params:params}),$scope.$$phase||$scope.$apply()})})}}])}(),function(){angular.module("ui.mask",[]).value("uiMaskConfig",{maskDefinitions:{9:/\d/,A:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},clearOnBlur:!0,clearOnBlurPlaceholder:!1,escChar:"\\",eventsToHandle:["input","keyup","click","focus"],addDefaultPlaceholder:!0,allowInvalidValue:!1}).provider("uiMask.Config",function(){var options={};this.maskDefinitions=function(maskDefinitions){return options.maskDefinitions=maskDefinitions},this.clearOnBlur=function(clearOnBlur){return options.clearOnBlur=clearOnBlur},this.clearOnBlurPlaceholder=function(clearOnBlurPlaceholder){return options.clearOnBlurPlaceholder=clearOnBlurPlaceholder},this.eventsToHandle=function(eventsToHandle){return options.eventsToHandle=eventsToHandle},this.addDefaultPlaceholder=function(addDefaultPlaceholder){return options.addDefaultPlaceholder=addDefaultPlaceholder},this.allowInvalidValue=function(allowInvalidValue){return options.allowInvalidValue=allowInvalidValue},this.$get=["uiMaskConfig",function(uiMaskConfig){var tempOptions=uiMaskConfig;for(var prop in options)angular.isObject(options[prop])&&!angular.isArray(options[prop])?angular.extend(tempOptions[prop],options[prop]):tempOptions[prop]=options[prop];return tempOptions}]}).directive("uiMask",["uiMask.Config",function(maskConfig){function isFocused(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)}return{priority:100,require:"ngModel",restrict:"A",compile:function(){var options=angular.copy(maskConfig);return function(scope,iElement,iAttrs,controller){function initialize(maskAttr){return angular.isDefined(maskAttr)?(processRawMask(maskAttr),maskProcessed?(initializeElement(),bindEventListeners(),!0):uninitialize()):uninitialize()}function initPlaceholder(placeholderAttr){placeholderAttr&&(maskPlaceholder=placeholderAttr,!maskProcessed||0===iElement.val().length&&angular.isDefined(iAttrs.placeholder)||iElement.val(maskValue(unmaskValue(iElement.val()))))}function initPlaceholderChar(){return initialize(iAttrs.uiMask)}function formatter(fromModelValue){return maskProcessed?(value=unmaskValue(fromModelValue||""),isValid=validateValue(value),controller.$setValidity("mask",isValid),value.length&&(isValid||linkOptions.allowInvalidValue)?maskValue(value):void 0):fromModelValue}function parser(fromViewValue){return maskProcessed?(value=unmaskValue(fromViewValue||""),isValid=validateValue(value),controller.$viewValue=value.length?maskValue(value):"",controller.$setValidity("mask",isValid),isValid||linkOptions.allowInvalidValue?modelViewValue?controller.$viewValue:value:void 0):fromViewValue}function uninitialize(){return maskProcessed=!1,unbindEventListeners(),angular.isDefined(originalPlaceholder)?iElement.attr("placeholder",originalPlaceholder):iElement.removeAttr("placeholder"),angular.isDefined(originalMaxlength)?iElement.attr("maxlength",originalMaxlength):iElement.removeAttr("maxlength"),iElement.val(controller.$modelValue),controller.$viewValue=controller.$modelValue,!1}function initializeElement(){value=oldValueUnmasked=unmaskValue(controller.$modelValue||""),valueMasked=oldValue=maskValue(value),isValid=validateValue(value),iAttrs.maxlength&&iElement.attr("maxlength",2*maskCaretMap[maskCaretMap.length-1]),!originalPlaceholder&&linkOptions.addDefaultPlaceholder&&iElement.attr("placeholder",maskPlaceholder);for(var viewValue=controller.$modelValue,idx=controller.$formatters.length;idx--;)viewValue=controller.$formatters[idx](viewValue);controller.$viewValue=viewValue||"",controller.$render()}function bindEventListeners(){eventsBound||(iElement.bind("blur",blurHandler),iElement.bind("mousedown mouseup",mouseDownUpHandler),iElement.bind("keydown",keydownHandler),iElement.bind(linkOptions.eventsToHandle.join(" "),eventHandler),eventsBound=!0)}function unbindEventListeners(){eventsBound&&(iElement.unbind("blur",blurHandler),iElement.unbind("mousedown",mouseDownUpHandler),iElement.unbind("mouseup",mouseDownUpHandler),iElement.unbind("keydown",keydownHandler),iElement.unbind("input",eventHandler),iElement.unbind("keyup",eventHandler),iElement.unbind("click",eventHandler),iElement.unbind("focus",eventHandler),eventsBound=!1)}function validateValue(value){return!value.length||value.length>=minRequiredLength}function unmaskValue(value){var valueOffset,valueDelta,valueUnmasked="",input=iElement[0],maskPatternsCopy=maskPatterns.slice(),selectionStart=oldCaretPosition,selectionEnd=selectionStart+getSelectionLength(input),tempValue="";return value=value.toString(),valueOffset=0,valueDelta=value.length-maskPlaceholder.length,angular.forEach(maskComponents,function(component){var position=component.position;position>=selectionStart&&position<selectionEnd||(position>=selectionStart&&(position+=valueDelta),value.substring(position,position+component.value.length)===component.value&&(tempValue+=value.slice(valueOffset,position),valueOffset=position+component.value.length))}),value=tempValue+value.slice(valueOffset),angular.forEach(value.split(""),function(chr){maskPatternsCopy.length&&maskPatternsCopy[0].test(chr)&&(valueUnmasked+=chr,maskPatternsCopy.shift())}),valueUnmasked}function maskValue(unmaskedValue){var valueMasked="",maskCaretMapCopy=maskCaretMap.slice();return angular.forEach(maskPlaceholder.split(""),function(chr,i){unmaskedValue.length&&i===maskCaretMapCopy[0]?(valueMasked+=unmaskedValue.charAt(0)||"_",unmaskedValue=unmaskedValue.substr(1),maskCaretMapCopy.shift()):valueMasked+=chr}),valueMasked}function getPlaceholderChar(i){var defaultPlaceholderChar,placeholder=angular.isDefined(iAttrs.uiMaskPlaceholder)?iAttrs.uiMaskPlaceholder:iAttrs.placeholder;return angular.isDefined(placeholder)&&placeholder[i]?placeholder[i]:(defaultPlaceholderChar=angular.isDefined(iAttrs.uiMaskPlaceholderChar)&&iAttrs.uiMaskPlaceholderChar?iAttrs.uiMaskPlaceholderChar:"_","space"===defaultPlaceholderChar.toLowerCase()?" ":defaultPlaceholderChar[0])}function getMaskComponents(){var maskPlaceholderCopy,components,maskPlaceholderChars=maskPlaceholder.split("");maskCaretMap&&!isNaN(maskCaretMap[0])&&angular.forEach(maskCaretMap,function(value){maskPlaceholderChars[value]="_"}),maskPlaceholderCopy=maskPlaceholderChars.join(""),components=maskPlaceholderCopy.replace(/[_]+/g,"_").split("_"),components=components.filter(function(s){return""!==s});var offset=0;return components.map(function(c){var componentPosition=maskPlaceholderCopy.indexOf(c,offset);return offset=componentPosition+1,{value:c,position:componentPosition}})}function processRawMask(mask){var characterCount=0;if(maskCaretMap=[],maskPatterns=[],maskPlaceholder="",angular.isString(mask)){minRequiredLength=0;var isOptional=!1,numberOfOptionalCharacters=0,splitMask=mask.split(""),inEscape=!1;angular.forEach(splitMask,function(chr,i){inEscape?(inEscape=!1,maskPlaceholder+=chr,characterCount++):linkOptions.escChar===chr?inEscape=!0:linkOptions.maskDefinitions[chr]?(maskCaretMap.push(characterCount),maskPlaceholder+=getPlaceholderChar(i-numberOfOptionalCharacters),maskPatterns.push(linkOptions.maskDefinitions[chr]),characterCount++,isOptional||minRequiredLength++,isOptional=!1):"?"===chr?(isOptional=!0,numberOfOptionalCharacters++):(maskPlaceholder+=chr,characterCount++)})}maskCaretMap.push(maskCaretMap.slice().pop()+1),maskComponents=getMaskComponents(),maskProcessed=maskCaretMap.length>1}function blurHandler(){if((linkOptions.clearOnBlur||linkOptions.clearOnBlurPlaceholder&&0===value.length&&iAttrs.placeholder)&&(oldCaretPosition=0,oldSelectionLength=0,isValid&&0!==value.length||(valueMasked="",
iElement.val(""),scope.$apply(function(){controller.$pristine||controller.$setViewValue("")}))),value!==prevValue){var currentVal=iElement.val(),isTemporarilyEmpty=""===value&&currentVal&&angular.isDefined(iAttrs.uiMaskPlaceholderChar)&&"space"===iAttrs.uiMaskPlaceholderChar;isTemporarilyEmpty&&iElement.val(""),triggerChangeEvent(iElement[0]),isTemporarilyEmpty&&iElement.val(currentVal)}prevValue=value}function triggerChangeEvent(element){var change;if(angular.isFunction(window.Event)&&!element.fireEvent)try{change=new Event("change",{view:window,bubbles:!0,cancelable:!1})}catch(ex){change=document.createEvent("HTMLEvents"),change.initEvent("change",!1,!0)}finally{element.dispatchEvent(change)}else"createEvent"in document?(change=document.createEvent("HTMLEvents"),change.initEvent("change",!1,!0),element.dispatchEvent(change)):element.fireEvent&&element.fireEvent("onchange")}function mouseDownUpHandler(e){"mousedown"===e.type?iElement.bind("mouseout",mouseoutHandler):iElement.unbind("mouseout",mouseoutHandler)}function mouseoutHandler(){oldSelectionLength=getSelectionLength(this),iElement.unbind("mouseout",mouseoutHandler)}function keydownHandler(e){var isKeyBackspace=8===e.which,caretPos=getCaretPosition(this)-1||0,isCtrlZ=90===e.which&&e.ctrlKey;if(isKeyBackspace){for(;caretPos>=0;){if(isValidCaretPosition(caretPos)){setCaretPosition(this,caretPos+1);break}caretPos--}preventBackspace=caretPos===-1}isCtrlZ&&(iElement.val(""),e.preventDefault())}function eventHandler(e){e=e||{};var eventWhich=e.which,eventType=e.type;if(16!==eventWhich&&91!==eventWhich){var valMasked,val=iElement.val(),valOld=oldValue,valAltered=!1,valUnmasked=unmaskValue(val),valUnmaskedOld=oldValueUnmasked,caretPos=getCaretPosition(this)||0,caretPosOld=oldCaretPosition||0,caretPosDelta=caretPos-caretPosOld,caretPosMin=maskCaretMap[0],caretPosMax=maskCaretMap[valUnmasked.length]||maskCaretMap.slice().shift(),selectionLenOld=oldSelectionLength||0,isSelected=getSelectionLength(this)>0,wasSelected=selectionLenOld>0,isAddition=val.length>valOld.length||selectionLenOld&&val.length>valOld.length-selectionLenOld,isDeletion=val.length<valOld.length||selectionLenOld&&val.length===valOld.length-selectionLenOld,isSelection=eventWhich>=37&&eventWhich<=40&&e.shiftKey,isKeyLeftArrow=37===eventWhich,isKeyBackspace=8===eventWhich||"keyup"!==eventType&&isDeletion&&caretPosDelta===-1,isKeyDelete=46===eventWhich||"keyup"!==eventType&&isDeletion&&0===caretPosDelta&&!wasSelected,caretBumpBack=(isKeyLeftArrow||isKeyBackspace||"click"===eventType)&&caretPos>caretPosMin;if(oldSelectionLength=getSelectionLength(this),!isSelection&&(!isSelected||"click"!==eventType&&"keyup"!==eventType&&"focus"!==eventType)){if(isKeyBackspace&&preventBackspace)return iElement.val(maskPlaceholder),scope.$apply(function(){controller.$setViewValue("")}),void setCaretPosition(this,caretPosOld);if("input"===eventType&&isDeletion&&!wasSelected&&valUnmasked===valUnmaskedOld){for(;isKeyBackspace&&caretPos>caretPosMin&&!isValidCaretPosition(caretPos);)caretPos--;for(;isKeyDelete&&caretPos<caretPosMax&&maskCaretMap.indexOf(caretPos)===-1;)caretPos++;var charIndex=maskCaretMap.indexOf(caretPos);valUnmasked=valUnmasked.substring(0,charIndex)+valUnmasked.substring(charIndex+1),valUnmasked!==valUnmaskedOld&&(valAltered=!0)}for(valMasked=maskValue(valUnmasked),oldValue=valMasked,oldValueUnmasked=valUnmasked,!valAltered&&val.length>valMasked.length&&(valAltered=!0),iElement.val(valMasked),valAltered&&scope.$apply(function(){controller.$setViewValue(valMasked)}),isAddition&&caretPos<=caretPosMin&&(caretPos=caretPosMin+1),caretBumpBack&&caretPos--,caretPos=caretPos>caretPosMax?caretPosMax:caretPos<caretPosMin?caretPosMin:caretPos;!isValidCaretPosition(caretPos)&&caretPos>caretPosMin&&caretPos<caretPosMax;)caretPos+=caretBumpBack?-1:1;(caretBumpBack&&caretPos<caretPosMax||isAddition&&!isValidCaretPosition(caretPosOld))&&caretPos++,oldCaretPosition=caretPos,setCaretPosition(this,caretPos)}}}function isValidCaretPosition(pos){return maskCaretMap.indexOf(pos)>-1}function getCaretPosition(input){if(!input)return 0;if(void 0!==input.selectionStart)return input.selectionStart;if(document.selection&&isFocused(iElement[0])){input.focus();var selection=document.selection.createRange();return selection.moveStart("character",input.value?-input.value.length:0),selection.text.length}return 0}function setCaretPosition(input,pos){if(!input)return 0;if(0!==input.offsetWidth&&0!==input.offsetHeight)if(input.setSelectionRange)isFocused(iElement[0])&&(input.focus(),input.setSelectionRange(pos,pos));else if(input.createTextRange){var range=input.createTextRange();range.collapse(!0),range.moveEnd("character",pos),range.moveStart("character",pos),range.select()}}function getSelectionLength(input){return input?void 0!==input.selectionStart?input.selectionEnd-input.selectionStart:window.getSelection?window.getSelection().toString().length:document.selection?document.selection.createRange().text.length:0:0}var maskCaretMap,maskPatterns,maskPlaceholder,maskComponents,minRequiredLength,value,valueMasked,isValid,oldValue,oldValueUnmasked,oldCaretPosition,oldSelectionLength,preventBackspace,maskProcessed=!1,eventsBound=!1,originalPlaceholder=iAttrs.placeholder,originalMaxlength=iAttrs.maxlength,originalIsEmpty=controller.$isEmpty;controller.$isEmpty=function(value){return originalIsEmpty(maskProcessed?unmaskValue(value||""):value)};var modelViewValue=!1;iAttrs.$observe("modelViewValue",function(val){"true"===val&&(modelViewValue=!0)}),iAttrs.$observe("allowInvalidValue",function(val){linkOptions.allowInvalidValue=""===val||!!val,formatter(controller.$modelValue)});var linkOptions={};iAttrs.uiOptions?(linkOptions=scope.$eval("["+iAttrs.uiOptions+"]"),linkOptions=angular.isObject(linkOptions[0])?function(original,current){for(var i in original)Object.prototype.hasOwnProperty.call(original,i)&&(void 0===current[i]?current[i]=angular.copy(original[i]):angular.isObject(current[i])&&!angular.isArray(current[i])&&(current[i]=angular.extend({},original[i],current[i])));return current}(options,linkOptions[0]):options):linkOptions=options,iAttrs.$observe("uiMask",initialize),angular.isDefined(iAttrs.uiMaskPlaceholder)?iAttrs.$observe("uiMaskPlaceholder",initPlaceholder):iAttrs.$observe("placeholder",initPlaceholder),angular.isDefined(iAttrs.uiMaskPlaceholderChar)&&iAttrs.$observe("uiMaskPlaceholderChar",initPlaceholderChar),controller.$formatters.unshift(formatter),controller.$parsers.unshift(parser);var prevValue=iElement.val();iElement.bind("mousedown mouseup",mouseDownUpHandler),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement){if(null===this)throw new TypeError;var t=Object(this),len=t.length>>>0;if(0===len)return-1;var n=0;if(arguments.length>1&&(n=Number(arguments[1]),n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len)return-1;for(var k=n>=0?n:Math.max(len-Math.abs(n),0);k<len;k++)if(k in t&&t[k]===searchElement)return k;return-1})}}}}])}(),function(){angular.module("ui.validate",[]).directive("uiValidate",["$$uiValidateApplyWatch","$$uiValidateApplyWatchCollection",function($$uiValidateApplyWatch,$$uiValidateApplyWatchCollection){return{restrict:"A",require:"ngModel",link:function(scope,elm,attrs,ctrl){var validateFn,validateExpr=scope.$eval(attrs.uiValidate);validateExpr&&(angular.isString(validateExpr)&&(validateExpr={validator:validateExpr}),angular.forEach(validateExpr,function(exprssn,key){validateFn=function(modelValue,viewValue){var expression=scope.$eval(exprssn,{$value:modelValue,$modelValue:modelValue,$viewValue:viewValue,$name:ctrl.$name});return angular.isObject(expression)&&angular.isFunction(expression.then)?(expression.then(function(){ctrl.$setValidity(key,!0)},function(){ctrl.$setValidity(key,!1)}),!0):!!expression},ctrl.$validators[key]=validateFn}),attrs.uiValidateWatch&&$$uiValidateApplyWatch(scope,ctrl,scope.$eval(attrs.uiValidateWatch),attrs.uiValidateWatchObjectEquality),attrs.uiValidateWatchCollection&&$$uiValidateApplyWatchCollection(scope,ctrl,scope.$eval(attrs.uiValidateWatchCollection)))}}}]).directive("uiValidateAsync",["$$uiValidateApplyWatch","$$uiValidateApplyWatchCollection","$timeout","$q",function($$uiValidateApplyWatch,$$uiValidateApplyWatchCollection,$timeout,$q){return{restrict:"A",require:"ngModel",link:function(scope,elm,attrs,ctrl){var validateFn,validateExpr=scope.$eval(attrs.uiValidateAsync);validateExpr&&(angular.isString(validateExpr)&&(validateExpr={validatorAsync:validateExpr}),angular.forEach(validateExpr,function(exprssn,key){validateFn=function(modelValue,viewValue){var expression=scope.$eval(exprssn,{$value:modelValue,$modelValue:modelValue,$viewValue:viewValue,$name:ctrl.$name});return angular.isObject(expression)&&angular.isFunction(expression.then)?expression:$q(function(resolve,reject){setTimeout(function(){expression?resolve():reject()},0)})},ctrl.$asyncValidators[key]=validateFn}),attrs.uiValidateWatch&&$$uiValidateApplyWatch(scope,ctrl,scope.$eval(attrs.uiValidateWatch),attrs.uiValidateWatchObjectEquality),attrs.uiValidateWatchCollection&&$$uiValidateApplyWatchCollection(scope,ctrl,scope.$eval(attrs.uiValidateWatchCollection)))}}}]).service("$$uiValidateApplyWatch",function(){return function(scope,ctrl,watch,objectEquality){var watchCallback=function(){ctrl.$validate()};angular.isString(watch)?scope.$watch(watch,watchCallback,objectEquality):angular.isArray(watch)?angular.forEach(watch,function(expression){scope.$watch(expression,watchCallback,objectEquality)}):angular.isObject(watch)&&angular.forEach(watch,function(expression){angular.isString(expression)&&scope.$watch(expression,watchCallback,objectEquality),angular.isArray(expression)&&angular.forEach(expression,function(intExpression){scope.$watch(intExpression,watchCallback,objectEquality)})})}}).service("$$uiValidateApplyWatchCollection",function(){return function(scope,ctrl,watch){var watchCallback=function(){ctrl.$validate()};angular.isString(watch)?scope.$watchCollection(watch,watchCallback):angular.isArray(watch)?angular.forEach(watch,function(expression){scope.$watchCollection(expression,watchCallback)}):angular.isObject(watch)&&angular.forEach(watch,function(expression){angular.isString(expression)&&scope.$watchCollection(expression,watchCallback),angular.isArray(expression)&&angular.forEach(expression,function(intExpression){scope.$watchCollection(intExpression,watchCallback)})})}})}(),function(){angular.module("ui.indeterminate",[]).directive("uiIndeterminate",[function(){return{compile:function(tElm,tAttrs){return tAttrs.type&&"checkbox"===tAttrs.type.toLowerCase()?function($scope,elm,attrs){$scope.$watch(attrs.uiIndeterminate,function(newVal){elm[0].indeterminate=!!newVal})}:angular.noop}}}])}(),function(){function uiUploader($log){function addFiles(files){for(var i=0;i<files.length;i++)self.files.push(files[i])}function getFiles(){return self.files}function startUpload(options){self.options=options;for(var headers=options.headers||{},i=0;i<self.files.length&&self.activeUploads!=self.options.concurrency;i++)self.files[i].active||ajaxUpload(self.files[i],self.options.url,self.options.data,headers)}function removeFile(file){self.files.splice(self.files.indexOf(file),1)}function removeAll(){self.files.splice(0,self.files.length)}function getHumanSize(bytes){var sizes=["n/a","bytes","KiB","MiB","GiB","TB","PB","EiB","ZiB","YiB"],i=0===bytes?0:+Math.floor(Math.log(bytes)/Math.log(1024));return(bytes/Math.pow(1024,i)).toFixed(i?1:0)+" "+sizes[isNaN(bytes)?0:i+1]}function ajaxUpload(file,url,data,headers){var xhr,formData,prop,key="file";if(data=data||{},self.activeUploads+=1,file.active=!0,xhr=new window.XMLHttpRequest,data.withCredentials===!0&&(xhr.withCredentials=!0),formData=new window.FormData,xhr.open("POST",url),headers)for(var headerKey in headers)headers.hasOwnProperty(headerKey)&&xhr.setRequestHeader(headerKey,headers[headerKey]);if(xhr.upload.onloadstart=function(){},xhr.upload.onprogress=function(event){event.lengthComputable&&(file.loaded=event.loaded,file.humanSize=getHumanSize(event.loaded),angular.isFunction(self.options.onProgress)&&self.options.onProgress(file))},xhr.onload=function(){self.activeUploads-=1,self.uploadedFiles+=1,startUpload(self.options),angular.isFunction(self.options.onCompleted)&&self.options.onCompleted(file,xhr.responseText,xhr.status),self.uploadedFiles===self.files.length&&(self.uploadedFiles=0,angular.isFunction(self.options.onCompletedAll)&&self.options.onCompletedAll(self.files))},xhr.onerror=function(e){angular.isFunction(self.options.onError)&&self.options.onError(e)},data)for(prop in data)data.hasOwnProperty(prop)&&formData.append(prop,data[prop]);return formData.append(key,file,file.name),xhr.send(formData),xhr}var self=this;return self.files=[],self.options={},self.activeUploads=0,self.uploadedFiles=0,$log.info("uiUploader loaded"),{addFiles:addFiles,getFiles:getFiles,files:self.files,startUpload:startUpload,removeFile:removeFile,removeAll:removeAll}}angular.module("ui.uploader",[]).service("uiUploader",uiUploader),uiUploader.$inject=["$log"]}(),angular.module("ui.utils",["ui.scroll","ui.scrollpoint","ui.event","ui.mask","ui.validate","ui.indeterminate","ui.uploader"]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(window,angular,undefined){function inherit(parent,extra){return extend(new(extend(function(){},{prototype:parent})),extra)}function merge(dst){return forEach(arguments,function(obj){obj!==dst&&forEach(obj,function(value,key){dst.hasOwnProperty(key)||(dst[key]=value)})}),dst}function ancestors(first,second){var path=[];for(var n in first.path){if(first.path[n]!==second.path[n])break;path.push(first.path[n])}return path}function objectKeys(object){if(Object.keys)return Object.keys(object);var result=[];return forEach(object,function(val,key){result.push(key)}),result}function indexOf(array,value){if(Array.prototype.indexOf)return array.indexOf(value,Number(arguments[2])||0);var len=array.length>>>0,from=Number(arguments[2])||0;for(from=from<0?Math.ceil(from):Math.floor(from),from<0&&(from+=len);from<len;from++)if(from in array&&array[from]===value)return from;return-1}function inheritParams(currentParams,newParams,$current,$to){var parentParams,parents=ancestors($current,$to),inherited={},inheritList=[];for(var i in parents)if(parents[i]&&parents[i].params&&(parentParams=objectKeys(parents[i].params),parentParams.length))for(var j in parentParams)indexOf(inheritList,parentParams[j])>=0||(inheritList.push(parentParams[j]),inherited[parentParams[j]]=currentParams[parentParams[j]]);return extend({},inherited,newParams)}function equalForKeys(a,b,keys){if(!keys){keys=[];for(var n in a)keys.push(n)}for(var i=0;i<keys.length;i++){var k=keys[i];if(a[k]!=b[k])return!1}return!0}function filterByKeys(keys,values){var filtered={};return forEach(keys,function(name){filtered[name]=values[name]}),filtered}function pick(obj){var copy={},keys=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));return forEach(keys,function(key){key in obj&&(copy[key]=obj[key])}),copy}function omit(obj){var copy={},keys=Array.prototype.concat.apply(Array.prototype,Array.prototype.slice.call(arguments,1));for(var key in obj)indexOf(keys,key)==-1&&(copy[key]=obj[key]);return copy}function filter(collection,callback){var array=isArray(collection),result=array?[]:{};return forEach(collection,function(val,i){callback(val,i)&&(result[array?result.length:i]=val)}),result}function map(collection,callback){var result=isArray(collection)?[]:{};return forEach(collection,function(val,i){result[i]=callback(val,i)}),result}function $Resolve($q,$injector){var VISIT_IN_PROGRESS=1,VISIT_DONE=2,NOTHING={},NO_DEPENDENCIES=[],NO_LOCALS=NOTHING,NO_PARENT=extend($q.when(NOTHING),{$$promises:NOTHING,$$values:NOTHING});this.study=function(invocables){function visit(value,key){if(visited[key]!==VISIT_DONE){if(cycle.push(key),visited[key]===VISIT_IN_PROGRESS)throw cycle.splice(0,indexOf(cycle,key)),new Error("Cyclic dependency: "+cycle.join(" -> "));if(visited[key]=VISIT_IN_PROGRESS,isString(value))plan.push(key,[function(){return $injector.get(value)}],NO_DEPENDENCIES);else{var params=$injector.annotate(value);forEach(params,function(param){param!==key&&invocables.hasOwnProperty(param)&&visit(invocables[param],param)}),plan.push(key,value,params)}cycle.pop(),visited[key]=VISIT_DONE}}function isResolve(value){return isObject(value)&&value.then&&value.$$promises}if(!isObject(invocables))throw new Error("'invocables' must be an object");var invocableKeys=objectKeys(invocables||{}),plan=[],cycle=[],visited={};return forEach(invocables,visit),invocables=cycle=visited=null,function(locals,parent,self){function done(){--wait||(merged||merge(values,parent.$$values),result.$$values=values,result.$$promises=result.$$promises||!0,delete result.$$inheritedValues,resolution.resolve(values))}function fail(reason){result.$$failure=reason,resolution.reject(reason)}function invoke(key,invocable,params){function onfailure(reason){invocation.reject(reason),fail(reason)}function proceed(){if(!isDefined(result.$$failure))try{invocation.resolve($injector.invoke(invocable,self,values)),invocation.promise.then(function(result){values[key]=result,done()},onfailure)}catch(e){onfailure(e)}}var invocation=$q.defer(),waitParams=0;forEach(params,function(dep){promises.hasOwnProperty(dep)&&!locals.hasOwnProperty(dep)&&(waitParams++,promises[dep].then(function(result){values[dep]=result,--waitParams||proceed()},onfailure))}),waitParams||proceed(),promises[key]=invocation.promise}if(isResolve(locals)&&self===undefined&&(self=parent,parent=locals,locals=null),locals){if(!isObject(locals))throw new Error("'locals' must be an object")}else locals=NO_LOCALS;if(parent){if(!isResolve(parent))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else parent=NO_PARENT;var resolution=$q.defer(),result=resolution.promise,promises=result.$$promises={},values=extend({},locals),wait=1+plan.length/3,merged=!1;if(isDefined(parent.$$failure))return fail(parent.$$failure),result;parent.$$inheritedValues&&merge(values,omit(parent.$$inheritedValues,invocableKeys)),extend(promises,parent.$$promises),parent.$$values?(merged=merge(values,omit(parent.$$values,invocableKeys)),result.$$inheritedValues=omit(parent.$$values,invocableKeys),done()):(parent.$$inheritedValues&&(result.$$inheritedValues=omit(parent.$$inheritedValues,invocableKeys)),parent.then(done,fail));for(var i=0,ii=plan.length;i<ii;i+=3)locals.hasOwnProperty(plan[i])?done():invoke(plan[i],plan[i+1],plan[i+2]);return result}},this.resolve=function(invocables,locals,parent,self){return this.study(invocables)(locals,parent,self)}}function $TemplateFactory($http,$templateCache,$injector){this.fromConfig=function(config,params,locals){return isDefined(config.template)?this.fromString(config.template,params):isDefined(config.templateUrl)?this.fromUrl(config.templateUrl,params):isDefined(config.templateProvider)?this.fromProvider(config.templateProvider,params,locals):null},this.fromString=function(template,params){return isFunction(template)?template(params):template},this.fromUrl=function(url,params){return isFunction(url)&&(url=url(params)),null==url?null:$http.get(url,{cache:$templateCache,headers:{Accept:"text/html"}}).then(function(response){return response.data})},this.fromProvider=function(provider,params,locals){return $injector.invoke(provider,null,locals||{params:params})}}function UrlMatcher(pattern,config,parentMatcher){function addParameter(id,type,config,location){if(paramNames.push(id),parentParams[id])return parentParams[id];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(id))throw new Error("Invalid parameter name '"+id+"' in pattern '"+pattern+"'");if(params[id])throw new Error("Duplicate parameter name '"+id+"' in pattern '"+pattern+"'");return params[id]=new $$UMFP.Param(id,type,config,location),params[id]}function quoteRegExp(string,pattern,squash,optional){var surroundPattern=["",""],result=string.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!pattern)return result;switch(squash){case!1:surroundPattern=["(",")"+(optional?"?":"")];break;case!0:result=result.replace(/\/$/,""),surroundPattern=["(?:/(",")|/)?"];break;default:surroundPattern=["("+squash+"|",")?"]}return result+surroundPattern[0]+pattern+surroundPattern[1]}function matchDetails(m,isSearch){var id,regexp,segment,type,cfg;return id=m[2]||m[3],cfg=config.params[id],segment=pattern.substring(last,m.index),regexp=isSearch?m[4]:m[4]||("*"==m[1]?".*":null),regexp&&(type=$$UMFP.type(regexp)||inherit($$UMFP.type("string"),{pattern:new RegExp(regexp,config.caseInsensitive?"i":undefined)})),{id:id,regexp:regexp,segment:segment,type:type,cfg:cfg}}config=extend({params:{}},isObject(config)?config:{});var m,placeholder=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,searchPlaceholder=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,compiled="^",last=0,segments=this.segments=[],parentParams=parentMatcher?parentMatcher.params:{},params=this.params=parentMatcher?parentMatcher.params.$$new():new $$UMFP.ParamSet,paramNames=[];this.source=pattern;for(var p,param,segment;(m=placeholder.exec(pattern))&&(p=matchDetails(m,!1),!(p.segment.indexOf("?")>=0));)param=addParameter(p.id,p.type,p.cfg,"path"),compiled+=quoteRegExp(p.segment,param.type.pattern.source,param.squash,param.isOptional),segments.push(p.segment),last=placeholder.lastIndex;segment=pattern.substring(last);var i=segment.indexOf("?");if(i>=0){var search=this.sourceSearch=segment.substring(i);if(segment=segment.substring(0,i),this.sourcePath=pattern.substring(0,last+i),search.length>0)for(last=0;m=searchPlaceholder.exec(search);)p=matchDetails(m,!0),param=addParameter(p.id,p.type,p.cfg,"search"),last=placeholder.lastIndex}else this.sourcePath=pattern,this.sourceSearch="";compiled+=quoteRegExp(segment)+(config.strict===!1?"/?":"")+"$",segments.push(segment),this.regexp=new RegExp(compiled,config.caseInsensitive?"i":undefined),this.prefix=segments[0],this.$$paramNames=paramNames}function Type(config){extend(this,config)}function $UrlMatcherFactory(){function valToString(val){return null!=val?val.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):val}function valFromString(val){return null!=val?val.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):val}function getDefaultConfig(){return{strict:isStrictMode,caseInsensitive:isCaseInsensitive}}function isInjectable(value){return isFunction(value)||isArray(value)&&isFunction(value[value.length-1])}function flushTypeQueue(){for(;typeQueue.length;){var type=typeQueue.shift();if(type.pattern)throw new Error("You cannot override a type's .pattern at runtime.");angular.extend($types[type.name],injector.invoke(type.def))}}function ParamSet(params){extend(this,params||{})}$$UMFP=this;var injector,isCaseInsensitive=!1,isStrictMode=!0,defaultSquashPolicy=!1,$types={},enqueue=!0,typeQueue=[],defaultTypes={string:{encode:valToString,decode:valFromString,is:function(val){return null==val||!isDefined(val)||"string"==typeof val},pattern:/[^\/]*/},"int":{encode:valToString,decode:function(val){return parseInt(val,10)},is:function(val){return isDefined(val)&&this.decode(val.toString())===val},pattern:/\d+/},bool:{encode:function(val){return val?1:0},decode:function(val){return 0!==parseInt(val,10)},is:function(val){return val===!0||val===!1},pattern:/0|1/},date:{encode:function(val){return this.is(val)?[val.getFullYear(),("0"+(val.getMonth()+1)).slice(-2),("0"+val.getDate()).slice(-2)].join("-"):undefined},decode:function(val){if(this.is(val))return val;var match=this.capture.exec(val);return match?new Date(match[1],match[2]-1,match[3]):undefined},is:function(val){return val instanceof Date&&!isNaN(val.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:angular.toJson,decode:angular.fromJson,is:angular.isObject,equals:angular.equals,pattern:/[^\/]*/},any:{encode:angular.identity,decode:angular.identity,equals:angular.equals,pattern:/.*/}};$UrlMatcherFactory.$$getDefaultValue=function(config){if(!isInjectable(config.value))return config.value;if(!injector)throw new Error("Injectable functions cannot be called at configuration time");return injector.invoke(config.value)},this.caseInsensitive=function(value){return isDefined(value)&&(isCaseInsensitive=value),isCaseInsensitive},this.strictMode=function(value){return isDefined(value)&&(isStrictMode=value),isStrictMode},this.defaultSquashPolicy=function(value){if(!isDefined(value))return defaultSquashPolicy;if(value!==!0&&value!==!1&&!isString(value))throw new Error("Invalid squash policy: "+value+". Valid policies: false, true, arbitrary-string");return defaultSquashPolicy=value,value},this.compile=function(pattern,config){return new UrlMatcher(pattern,extend(getDefaultConfig(),config))},this.isMatcher=function(o){if(!isObject(o))return!1;var result=!0;return forEach(UrlMatcher.prototype,function(val,name){isFunction(val)&&(result=result&&isDefined(o[name])&&isFunction(o[name]))}),result},this.type=function(name,definition,definitionFn){if(!isDefined(definition))return $types[name];if($types.hasOwnProperty(name))throw new Error("A type named '"+name+"' has already been defined.");return $types[name]=new Type(extend({name:name},definition)),definitionFn&&(typeQueue.push({name:name,def:definitionFn}),enqueue||flushTypeQueue()),this},forEach(defaultTypes,function(type,name){$types[name]=new Type(extend({name:name},type))}),$types=inherit($types,{}),this.$get=["$injector",function($injector){return injector=$injector,enqueue=!1,flushTypeQueue(),forEach(defaultTypes,function(type,name){$types[name]||($types[name]=new Type(type))}),this}],this.Param=function(id,type,config,location){function unwrapShorthand(config){var keys=isObject(config)?objectKeys(config):[],isShorthand=indexOf(keys,"value")===-1&&indexOf(keys,"type")===-1&&indexOf(keys,"squash")===-1&&indexOf(keys,"array")===-1;return isShorthand&&(config={value:config}),config.$$fn=isInjectable(config.value)?config.value:function(){return config.value},config}function getType(config,urlType,location){if(config.type&&urlType)throw new Error("Param '"+id+"' has two type configurations.");return urlType?urlType:config.type?angular.isString(config.type)?$types[config.type]:config.type instanceof Type?config.type:new Type(config.type):"config"===location?$types.any:$types.string}function getArrayMode(){var arrayDefaults={array:"search"===location&&"auto"},arrayParamNomenclature=id.match(/\[\]$/)?{array:!0}:{};return extend(arrayDefaults,arrayParamNomenclature,config).array}function getSquashPolicy(config,isOptional){var squash=config.squash;if(!isOptional||squash===!1)return!1;if(!isDefined(squash)||null==squash)return defaultSquashPolicy;if(squash===!0||isString(squash))return squash;throw new Error("Invalid squash policy: '"+squash+"'. Valid policies: false, true, or arbitrary string")}function getReplace(config,arrayMode,isOptional,squash){var replace,configuredKeys,defaultPolicy=[{from:"",to:isOptional||arrayMode?undefined:""},{from:null,to:isOptional||arrayMode?undefined:""}];return replace=isArray(config.replace)?config.replace:[],isString(squash)&&replace.push({from:squash,to:undefined}),configuredKeys=map(replace,function(item){return item.from}),filter(defaultPolicy,function(item){return indexOf(configuredKeys,item.from)===-1}).concat(replace)}function $$getDefaultValue(){if(!injector)throw new Error("Injectable functions cannot be called at configuration time");var defaultValue=injector.invoke(config.$$fn);if(null!==defaultValue&&defaultValue!==undefined&&!self.type.is(defaultValue))throw new Error("Default value ("+defaultValue+") for parameter '"+self.id+"' is not an instance of Type ("+self.type.name+")");return defaultValue}function $value(value){function hasReplaceVal(val){return function(obj){return obj.from===val}}function $replace(value){var replacement=map(filter(self.replace,hasReplaceVal(value)),function(obj){return obj.to});return replacement.length?replacement[0]:value}return value=$replace(value),isDefined(value)?self.type.$normalize(value):$$getDefaultValue()}function toString(){return"{Param:"+id+" "+type+" squash: '"+squash+"' optional: "+isOptional+"}"}var self=this;config=unwrapShorthand(config),type=getType(config,type,location);var arrayMode=getArrayMode();type=arrayMode?type.$asArray(arrayMode,"search"===location):type,"string"!==type.name||arrayMode||"path"!==location||config.value!==undefined||(config.value="");var isOptional=config.value!==undefined,squash=getSquashPolicy(config,isOptional),replace=getReplace(config,arrayMode,isOptional,squash);extend(this,{id:id,type:type,location:location,array:arrayMode,squash:squash,replace:replace,isOptional:isOptional,value:$value,dynamic:undefined,config:config,toString:toString})},ParamSet.prototype={$$new:function(){return inherit(this,extend(new ParamSet,{$$parent:this}))},$$keys:function(){for(var keys=[],chain=[],parent=this,ignore=objectKeys(ParamSet.prototype);parent;)chain.push(parent),parent=parent.$$parent;return chain.reverse(),forEach(chain,function(paramset){forEach(objectKeys(paramset),function(key){indexOf(keys,key)===-1&&indexOf(ignore,key)===-1&&keys.push(key)})}),keys},$$values:function(paramValues){var values={},self=this;return forEach(self.$$keys(),function(key){values[key]=self[key].value(paramValues&&paramValues[key])}),values},$$equals:function(paramValues1,paramValues2){var equal=!0,self=this;return forEach(self.$$keys(),function(key){var left=paramValues1&&paramValues1[key],right=paramValues2&&paramValues2[key];self[key].type.equals(left,right)||(equal=!1)}),equal},$$validates:function(paramValues){var i,param,rawVal,normalized,encoded,keys=this.$$keys();for(i=0;i<keys.length&&(param=this[keys[i]],rawVal=paramValues[keys[i]],rawVal!==undefined&&null!==rawVal||!param.isOptional);i++){if(normalized=param.type.$normalize(rawVal),!param.type.is(normalized))return!1;if(encoded=param.type.encode(normalized),angular.isString(encoded)&&!param.type.pattern.exec(encoded))return!1}return!0},$$parent:undefined},this.ParamSet=ParamSet}function $UrlRouterProvider($locationProvider,$urlMatcherFactory){function regExpPrefix(re){var prefix=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(re.source);return null!=prefix?prefix[1].replace(/\\(.)/g,"$1"):""}function interpolate(pattern,match){return pattern.replace(/\$(\$|\d{1,2})/,function(m,what){return match["$"===what?0:Number(what)]})}function handleIfMatch($injector,handler,match){if(!match)return!1;var result=$injector.invoke(handler,handler,{$match:match});return!isDefined(result)||result}function $get($location,$rootScope,$injector,$browser,$sniffer){function appendBasePath(url,isHtml5,absolute){return"/"===baseHref?url:isHtml5?baseHref.slice(0,-1)+url:absolute?baseHref.slice(1)+url:url}function update(evt){function check(rule){var handled=rule($injector,$location);return!!handled&&(isString(handled)&&$location.replace().url(handled),!0)}if(!evt||!evt.defaultPrevented){lastPushedUrl&&$location.url()===lastPushedUrl;lastPushedUrl=undefined;var i,n=rules.length;for(i=0;i<n;i++)if(check(rules[i]))return;otherwise&&check(otherwise)}}function listen(){return listener=listener||$rootScope.$on("$locationChangeSuccess",update)}var lastPushedUrl,baseHref=$browser.baseHref(),location=$location.url();return interceptDeferred||listen(),{sync:function(){update()},listen:function(){return listen()},update:function(read){return read?void(location=$location.url()):void($location.url()!==location&&($location.url(location),$location.replace()))},push:function(urlMatcher,params,options){var url=urlMatcher.format(params||{});null!==url&&params&&params["#"]&&(url+="#"+params["#"]),$location.url(url),
lastPushedUrl=options&&options.$$avoidResync?$location.url():undefined,options&&options.replace&&$location.replace()},href:function(urlMatcher,params,options){if(!urlMatcher.validates(params))return null;var isHtml5=$locationProvider.html5Mode();angular.isObject(isHtml5)&&(isHtml5=isHtml5.enabled),isHtml5=isHtml5&&$sniffer.history;var url=urlMatcher.format(params);if(options=options||{},isHtml5||null===url||(url="#"+$locationProvider.hashPrefix()+url),null!==url&&params&&params["#"]&&(url+="#"+params["#"]),url=appendBasePath(url,isHtml5,options.absolute),!options.absolute||!url)return url;var slash=!isHtml5&&url?"/":"",port=$location.port();return port=80===port||443===port?"":":"+port,[$location.protocol(),"://",$location.host(),port,slash,url].join("")}}}var listener,rules=[],otherwise=null,interceptDeferred=!1;this.rule=function(rule){if(!isFunction(rule))throw new Error("'rule' must be a function");return rules.push(rule),this},this.otherwise=function(rule){if(isString(rule)){var redirect=rule;rule=function(){return redirect}}else if(!isFunction(rule))throw new Error("'rule' must be a function");return otherwise=rule,this},this.when=function(what,handler){var redirect,handlerIsString=isString(handler);if(isString(what)&&(what=$urlMatcherFactory.compile(what)),!handlerIsString&&!isFunction(handler)&&!isArray(handler))throw new Error("invalid 'handler' in when()");var strategies={matcher:function(what,handler){return handlerIsString&&(redirect=$urlMatcherFactory.compile(handler),handler=["$match",function($match){return redirect.format($match)}]),extend(function($injector,$location){return handleIfMatch($injector,handler,what.exec($location.path(),$location.search()))},{prefix:isString(what.prefix)?what.prefix:""})},regex:function(what,handler){if(what.global||what.sticky)throw new Error("when() RegExp must not be global or sticky");return handlerIsString&&(redirect=handler,handler=["$match",function($match){return interpolate(redirect,$match)}]),extend(function($injector,$location){return handleIfMatch($injector,handler,what.exec($location.path()))},{prefix:regExpPrefix(what)})}},check={matcher:$urlMatcherFactory.isMatcher(what),regex:what instanceof RegExp};for(var n in check)if(check[n])return this.rule(strategies[n](what,handler));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(defer){defer===undefined&&(defer=!0),interceptDeferred=defer},this.$get=$get,$get.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function $StateProvider($urlRouterProvider,$urlMatcherFactory){function isRelative(stateName){return 0===stateName.indexOf(".")||0===stateName.indexOf("^")}function findState(stateOrName,base){if(!stateOrName)return undefined;var isStr=isString(stateOrName),name=isStr?stateOrName:stateOrName.name,path=isRelative(name);if(path){if(!base)throw new Error("No reference point given for path '"+name+"'");base=findState(base);for(var rel=name.split("."),i=0,pathLength=rel.length,current=base;i<pathLength;i++)if(""!==rel[i]||0!==i){if("^"!==rel[i])break;if(!current.parent)throw new Error("Path '"+name+"' not valid for state '"+base.name+"'");current=current.parent}else current=base;rel=rel.slice(i).join("."),name=current.name+(current.name&&rel?".":"")+rel}var state=states[name];return!state||!isStr&&(isStr||state!==stateOrName&&state.self!==stateOrName)?undefined:state}function queueState(parentName,state){queue[parentName]||(queue[parentName]=[]),queue[parentName].push(state)}function flushQueuedChildren(parentName){for(var queued=queue[parentName]||[];queued.length;)registerState(queued.shift())}function registerState(state){state=inherit(state,{self:state,resolve:state.resolve||{},toString:function(){return this.name}});var name=state.name;if(!isString(name)||name.indexOf("@")>=0)throw new Error("State must have a valid name");if(states.hasOwnProperty(name))throw new Error("State '"+name+"' is already defined");var parentName=name.indexOf(".")!==-1?name.substring(0,name.lastIndexOf(".")):isString(state.parent)?state.parent:isObject(state.parent)&&isString(state.parent.name)?state.parent.name:"";if(parentName&&!states[parentName])return queueState(parentName,state.self);for(var key in stateBuilder)isFunction(stateBuilder[key])&&(state[key]=stateBuilder[key](state,stateBuilder.$delegates[key]));return states[name]=state,!state[abstractKey]&&state.url&&$urlRouterProvider.when(state.url,["$match","$stateParams",function($match,$stateParams){$state.$current.navigable==state&&equalForKeys($match,$stateParams)||$state.transitionTo(state,$match,{inherit:!0,location:!1})}]),flushQueuedChildren(name),state}function isGlob(text){return text.indexOf("*")>-1}function doesStateMatchGlob(glob){for(var globSegments=glob.split("."),segments=$state.$current.name.split("."),i=0,l=globSegments.length;i<l;i++)"*"===globSegments[i]&&(segments[i]="*");return"**"===globSegments[0]&&(segments=segments.slice(indexOf(segments,globSegments[1])),segments.unshift("**")),"**"===globSegments[globSegments.length-1]&&(segments.splice(indexOf(segments,globSegments[globSegments.length-2])+1,Number.MAX_VALUE),segments.push("**")),globSegments.length==segments.length&&segments.join("")===globSegments.join("")}function decorator(name,func){return isString(name)&&!isDefined(func)?stateBuilder[name]:isFunction(func)&&isString(name)?(stateBuilder[name]&&!stateBuilder.$delegates[name]&&(stateBuilder.$delegates[name]=stateBuilder[name]),stateBuilder[name]=func,this):this}function state(name,definition){return isObject(name)?definition=name:definition.name=name,registerState(definition),this}function $get($rootScope,$q,$view,$injector,$resolve,$stateParams,$urlRouter,$location,$urlMatcherFactory){function handleRedirect(redirect,state,params,options){var evt=$rootScope.$broadcast("$stateNotFound",redirect,state,params);if(evt.defaultPrevented)return $urlRouter.update(),TransitionAborted;if(!evt.retry)return null;if(options.$retry)return $urlRouter.update(),TransitionFailed;var retryTransition=$state.transition=$q.when(evt.retry);return retryTransition.then(function(){return retryTransition!==$state.transition?TransitionSuperseded:(redirect.options.$retry=!0,$state.transitionTo(redirect.to,redirect.toParams,redirect.options))},function(){return TransitionAborted}),$urlRouter.update(),retryTransition}function resolveState(state,params,paramsAreFiltered,inherited,dst,options){function resolveViews(){var viewsPromises=[];return forEach(state.views,function(view,name){var injectables=view.resolve&&view.resolve!==state.resolve?view.resolve:{};injectables.$template=[function(){return $view.load(name,{view:view,locals:dst.globals,params:$stateParams,notify:options.notify})||""}],viewsPromises.push($resolve.resolve(injectables,dst.globals,dst.resolve,state).then(function(result){if(isFunction(view.controllerProvider)||isArray(view.controllerProvider)){var injectLocals=angular.extend({},injectables,dst.globals);result.$$controller=$injector.invoke(view.controllerProvider,null,injectLocals)}else result.$$controller=view.controller;result.$$state=state,result.$$controllerAs=view.controllerAs,dst[name]=result}))}),$q.all(viewsPromises).then(function(){return dst.globals})}var $stateParams=paramsAreFiltered?params:filterByKeys(state.params.$$keys(),params),locals={$stateParams:$stateParams};dst.resolve=$resolve.resolve(state.resolve,locals,dst.resolve,state);var promises=[dst.resolve.then(function(globals){dst.globals=globals})];return inherited&&promises.push(inherited),$q.all(promises).then(resolveViews).then(function(values){return dst})}var TransitionSuperseded=$q.reject(new Error("transition superseded")),TransitionPrevented=$q.reject(new Error("transition prevented")),TransitionAborted=$q.reject(new Error("transition aborted")),TransitionFailed=$q.reject(new Error("transition failed"));return root.locals={resolve:null,globals:{$stateParams:{}}},$state={params:{},current:root.self,$current:root,transition:null},$state.reload=function(state){return $state.transitionTo($state.current,$stateParams,{reload:state||!0,inherit:!1,notify:!0})},$state.go=function(to,params,options){return $state.transitionTo(to,params,extend({inherit:!0,relative:$state.$current},options))},$state.transitionTo=function(to,toParams,options){toParams=toParams||{},options=extend({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},options||{});var evt,from=$state.$current,fromParams=$state.params,fromPath=from.path,toState=findState(to,options.relative),hash=toParams["#"];if(!isDefined(toState)){var redirect={to:to,toParams:toParams,options:options},redirectResult=handleRedirect(redirect,from.self,fromParams,options);if(redirectResult)return redirectResult;if(to=redirect.to,toParams=redirect.toParams,options=redirect.options,toState=findState(to,options.relative),!isDefined(toState)){if(!options.relative)throw new Error("No such state '"+to+"'");throw new Error("Could not resolve '"+to+"' from state '"+options.relative+"'")}}if(toState[abstractKey])throw new Error("Cannot transition to abstract state '"+to+"'");if(options.inherit&&(toParams=inheritParams($stateParams,toParams||{},$state.$current,toState)),!toState.params.$$validates(toParams))return TransitionFailed;toParams=toState.params.$$values(toParams),to=toState;var toPath=to.path,keep=0,state=toPath[keep],locals=root.locals,toLocals=[];if(options.reload){if(isString(options.reload)||isObject(options.reload)){if(isObject(options.reload)&&!options.reload.name)throw new Error("Invalid reload state object");var reloadState=options.reload===!0?fromPath[0]:findState(options.reload);if(options.reload&&!reloadState)throw new Error("No such reload state '"+(isString(options.reload)?options.reload:options.reload.name)+"'");for(;state&&state===fromPath[keep]&&state!==reloadState;)locals=toLocals[keep]=state.locals,keep++,state=toPath[keep]}}else for(;state&&state===fromPath[keep]&&state.ownParams.$$equals(toParams,fromParams);)locals=toLocals[keep]=state.locals,keep++,state=toPath[keep];if(shouldSkipReload(to,toParams,from,fromParams,locals,options))return hash&&(toParams["#"]=hash),$state.params=toParams,copy($state.params,$stateParams),copy(filterByKeys(to.params.$$keys(),$stateParams),to.locals.globals.$stateParams),options.location&&to.navigable&&to.navigable.url&&($urlRouter.push(to.navigable.url,toParams,{$$avoidResync:!0,replace:"replace"===options.location}),$urlRouter.update(!0)),$state.transition=null,$q.when($state.current);if(toParams=filterByKeys(to.params.$$keys(),toParams||{}),hash&&(toParams["#"]=hash),options.notify&&$rootScope.$broadcast("$stateChangeStart",to.self,toParams,from.self,fromParams,options).defaultPrevented)return $rootScope.$broadcast("$stateChangeCancel",to.self,toParams,from.self,fromParams),null==$state.transition&&$urlRouter.update(),TransitionPrevented;for(var resolved=$q.when(locals),l=keep;l<toPath.length;l++,state=toPath[l])locals=toLocals[l]=inherit(locals),resolved=resolveState(state,toParams,state===to,resolved,locals,options);var transition=$state.transition=resolved.then(function(){var l,entering,exiting;if($state.transition!==transition)return TransitionSuperseded;for(l=fromPath.length-1;l>=keep;l--)exiting=fromPath[l],exiting.self.onExit&&$injector.invoke(exiting.self.onExit,exiting.self,exiting.locals.globals),exiting.locals=null;for(l=keep;l<toPath.length;l++)entering=toPath[l],entering.locals=toLocals[l],entering.self.onEnter&&$injector.invoke(entering.self.onEnter,entering.self,entering.locals.globals);return $state.transition!==transition?TransitionSuperseded:($state.$current=to,$state.current=to.self,$state.params=toParams,copy($state.params,$stateParams),$state.transition=null,options.location&&to.navigable&&$urlRouter.push(to.navigable.url,to.navigable.locals.globals.$stateParams,{$$avoidResync:!0,replace:"replace"===options.location}),options.notify&&$rootScope.$broadcast("$stateChangeSuccess",to.self,toParams,from.self,fromParams),$urlRouter.update(!0),$state.current)},function(error){return $state.transition!==transition?TransitionSuperseded:($state.transition=null,evt=$rootScope.$broadcast("$stateChangeError",to.self,toParams,from.self,fromParams,error),evt.defaultPrevented||$urlRouter.update(),$q.reject(error))});return transition},$state.is=function(stateOrName,params,options){options=extend({relative:$state.$current},options||{});var state=findState(stateOrName,options.relative);return isDefined(state)?$state.$current===state&&(!params||equalForKeys(state.params.$$values(params),$stateParams)):undefined},$state.includes=function(stateOrName,params,options){if(options=extend({relative:$state.$current},options||{}),isString(stateOrName)&&isGlob(stateOrName)){if(!doesStateMatchGlob(stateOrName))return!1;stateOrName=$state.$current.name}var state=findState(stateOrName,options.relative);return isDefined(state)?!!isDefined($state.$current.includes[state.name])&&(!params||equalForKeys(state.params.$$values(params),$stateParams,objectKeys(params))):undefined},$state.href=function(stateOrName,params,options){options=extend({lossy:!0,inherit:!0,absolute:!1,relative:$state.$current},options||{});var state=findState(stateOrName,options.relative);if(!isDefined(state))return null;options.inherit&&(params=inheritParams($stateParams,params||{},$state.$current,state));var nav=state&&options.lossy?state.navigable:state;return nav&&nav.url!==undefined&&null!==nav.url?$urlRouter.href(nav.url,filterByKeys(state.params.$$keys().concat("#"),params||{}),{absolute:options.absolute}):null},$state.get=function(stateOrName,context){if(0===arguments.length)return map(objectKeys(states),function(name){return states[name].self});var state=findState(stateOrName,context||$state.$current);return state&&state.self?state.self:null},$state}function shouldSkipReload(to,toParams,from,fromParams,locals,options){function nonSearchParamsEqual(fromAndToState,fromParams,toParams){function notSearchParam(key){return"search"!=fromAndToState.params[key].location}var nonQueryParamKeys=fromAndToState.params.$$keys().filter(notSearchParam),nonQueryParams=pick.apply({},[fromAndToState.params].concat(nonQueryParamKeys)),nonQueryParamSet=new $$UMFP.ParamSet(nonQueryParams);return nonQueryParamSet.$$equals(fromParams,toParams)}if(!options.reload&&to===from&&(locals===from.locals||to.self.reloadOnSearch===!1&&nonSearchParamsEqual(from,fromParams,toParams)))return!0}var root,$state,states={},queue={},abstractKey="abstract",stateBuilder={parent:function(state){if(isDefined(state.parent)&&state.parent)return findState(state.parent);var compositeName=/^(.+)\.[^.]+$/.exec(state.name);return compositeName?findState(compositeName[1]):root},data:function(state){return state.parent&&state.parent.data&&(state.data=state.self.data=inherit(state.parent.data,state.data)),state.data},url:function(state){var url=state.url,config={params:state.params||{}};if(isString(url))return"^"==url.charAt(0)?$urlMatcherFactory.compile(url.substring(1),config):(state.parent.navigable||root).url.concat(url,config);if(!url||$urlMatcherFactory.isMatcher(url))return url;throw new Error("Invalid url '"+url+"' in state '"+state+"'")},navigable:function(state){return state.url?state:state.parent?state.parent.navigable:null},ownParams:function(state){var params=state.url&&state.url.params||new $$UMFP.ParamSet;return forEach(state.params||{},function(config,id){params[id]||(params[id]=new $$UMFP.Param(id,null,config,"config"))}),params},params:function(state){var ownParams=pick(state.ownParams,state.ownParams.$$keys());return state.parent&&state.parent.params?extend(state.parent.params.$$new(),ownParams):new $$UMFP.ParamSet},views:function(state){var views={};return forEach(isDefined(state.views)?state.views:{"":state},function(view,name){name.indexOf("@")<0&&(name+="@"+state.parent.name),views[name]=view}),views},path:function(state){return state.parent?state.parent.path.concat(state):[]},includes:function(state){var includes=state.parent?extend({},state.parent.includes):{};return includes[state.name]=!0,includes},$delegates:{}};root=registerState({name:"",url:"^",views:null,"abstract":!0}),root.navigable=null,this.decorator=decorator,this.state=state,this.$get=$get,$get.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$urlRouter","$location","$urlMatcherFactory"]}function $ViewProvider(){function $get($rootScope,$templateFactory){return{load:function(name,options){var result,defaults={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return options=extend(defaults,options),options.view&&(result=$templateFactory.fromConfig(options.view,options.params,options.locals)),result}}}this.$get=$get,$get.$inject=["$rootScope","$templateFactory"]}function $ViewScrollProvider(){var useAnchorScroll=!1;this.useAnchorScroll=function(){useAnchorScroll=!0},this.$get=["$anchorScroll","$timeout",function($anchorScroll,$timeout){return useAnchorScroll?$anchorScroll:function($element){return $timeout(function(){$element[0].scrollIntoView()},0,!1)}}]}function $ViewDirective($state,$injector,$uiViewScroll,$interpolate){function getService(){return $injector.has?function(service){return $injector.has(service)?$injector.get(service):null}:function(service){try{return $injector.get(service)}catch(e){return null}}}function getRenderer(attrs,scope){function animEnabled(element){return 1===ngMajorVer&&ngMinorVer>=4?!!$animate.enabled(element):1===ngMajorVer&&ngMinorVer>=2?!!$animate.enabled():!!$animator}var statics={enter:function(element,target,cb){target.after(element),cb()},leave:function(element,cb){element.remove(),cb()}};if(attrs.noanimation)return statics;if($animate)return{enter:function(element,target,cb){animEnabled(element)?angular.version.minor>2?$animate.enter(element,null,target).then(cb):$animate.enter(element,null,target,cb):statics.enter(element,target,cb)},leave:function(element,cb){animEnabled(element)?angular.version.minor>2?$animate.leave(element).then(cb):$animate.leave(element,cb):statics.leave(element,cb)}};if($animator){var animate=$animator&&$animator(scope,attrs);return{enter:function(element,target,cb){animate.enter(element,null,target),cb()},leave:function(element,cb){animate.leave(element),cb()}}}return statics}var service=getService(),$animator=service("$animator"),$animate=service("$animate"),directive={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(tElement,tAttrs,$transclude){return function(scope,$element,attrs){function cleanupLastView(){function cleanOld(){_previousEl&&_previousEl.remove(),_currentScope&&_currentScope.$destroy()}var _previousEl=previousEl,_currentScope=currentScope;_currentScope&&(_currentScope._willBeDestroyed=!0),currentEl?(renderer.leave(currentEl,function(){cleanOld(),previousEl=null}),previousEl=currentEl):(cleanOld(),previousEl=null),currentEl=null,currentScope=null}function updateView(firstTime){var newScope,name=getUiViewName(scope,attrs,$element,$interpolate),previousLocals=name&&$state.$current&&$state.$current.locals[name];if((firstTime||previousLocals!==latestLocals)&&!scope._willBeDestroyed){newScope=scope.$new(),latestLocals=$state.$current.locals[name],newScope.$emit("$viewContentLoading",name);var clone=$transclude(newScope,function(clone){renderer.enter(clone,$element,function(){currentScope&&currentScope.$emit("$viewContentAnimationEnded"),(angular.isDefined(autoScrollExp)&&!autoScrollExp||scope.$eval(autoScrollExp))&&$uiViewScroll(clone)}),cleanupLastView()});currentEl=clone,currentScope=newScope,currentScope.$emit("$viewContentLoaded",name),currentScope.$eval(onloadExp)}}var previousEl,currentEl,currentScope,latestLocals,onloadExp=attrs.onload||"",autoScrollExp=attrs.autoscroll,renderer=getRenderer(attrs,scope);scope.$on("$stateChangeSuccess",function(){updateView(!1)}),updateView(!0)}}};return directive}function $ViewDirectiveFill($compile,$controller,$state,$interpolate){return{restrict:"ECA",priority:-400,compile:function(tElement){var initial=tElement.html();return function(scope,$element,attrs){var current=$state.$current,name=getUiViewName(scope,attrs,$element,$interpolate),locals=current&&current.locals[name];if(locals){$element.data("$uiView",{name:name,state:locals.$$state}),$element.html(locals.$template?locals.$template:initial);var link=$compile($element.contents());if(locals.$$controller){locals.$scope=scope,locals.$element=$element;var controller=$controller(locals.$$controller,locals);locals.$$controllerAs&&(scope[locals.$$controllerAs]=controller),$element.data("$ngControllerController",controller),$element.children().data("$ngControllerController",controller)}link(scope)}}}}}function getUiViewName(scope,attrs,element,$interpolate){var name=$interpolate(attrs.uiView||attrs.name||"")(scope),inherited=element.inheritedData("$uiView");return name.indexOf("@")>=0?name:name+"@"+(inherited?inherited.state.name:"")}function parseStateRef(ref,current){var parsed,preparsed=ref.match(/^\s*({[^}]*})\s*$/);if(preparsed&&(ref=current+"("+preparsed[1]+")"),parsed=ref.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!parsed||4!==parsed.length)throw new Error("Invalid state ref '"+ref+"'");return{state:parsed[1],paramExpr:parsed[3]||null}}function stateContext(el){var stateData=el.parent().inheritedData("$uiView");if(stateData&&stateData.state&&stateData.state.name)return stateData.state}function getTypeInfo(el){var isSvg="[object SVGAnimatedString]"===Object.prototype.toString.call(el.prop("href")),isForm="FORM"===el[0].nodeName;return{attr:isForm?"action":isSvg?"xlink:href":"href",isAnchor:"A"===el.prop("tagName").toUpperCase(),clickable:!isForm}}function clickHook(el,$state,$timeout,type,current){return function(e){var button=e.which||e.button,target=current();if(!(button>1||e.ctrlKey||e.metaKey||e.shiftKey||el.attr("target"))){var transition=$timeout(function(){$state.go(target.state,target.params,target.options)});e.preventDefault();var ignorePreventDefaultCount=type.isAnchor&&!target.href?1:0;e.preventDefault=function(){ignorePreventDefaultCount--<=0&&$timeout.cancel(transition)}}}}function defaultOpts(el,$state){return{relative:stateContext(el)||$state.$current,inherit:!0}}function $StateRefDirective($state,$timeout){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(scope,element,attrs,uiSrefActive){var ref=parseStateRef(attrs.uiSref,$state.current.name),def={state:ref.state,href:null,params:null},type=getTypeInfo(element),active=uiSrefActive[1]||uiSrefActive[0];def.options=extend(defaultOpts(element,$state),attrs.uiSrefOpts?scope.$eval(attrs.uiSrefOpts):{});var update=function(val){val&&(def.params=angular.copy(val)),def.href=$state.href(ref.state,def.params,def.options),active&&active.$$addStateInfo(ref.state,def.params),null!==def.href&&attrs.$set(type.attr,def.href)};ref.paramExpr&&(scope.$watch(ref.paramExpr,function(val){val!==def.params&&update(val)},!0),def.params=angular.copy(scope.$eval(ref.paramExpr))),update(),type.clickable&&element.bind("click",clickHook(element,$state,$timeout,type,function(){return def}))}}}function $StateRefDynamicDirective($state,$timeout){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(scope,element,attrs,uiSrefActive){function runStateRefLink(group){def.state=group[0],def.params=group[1],def.options=group[2],def.href=$state.href(def.state,def.params,def.options),active&&active.$$addStateInfo(def.state,def.params),def.href&&attrs.$set(type.attr,def.href)}var type=getTypeInfo(element),active=uiSrefActive[1]||uiSrefActive[0],group=[attrs.uiState,attrs.uiStateParams||null,attrs.uiStateOpts||null],watch="["+group.map(function(val){return val||"null"}).join(", ")+"]",def={state:null,params:null,options:null,href:null};scope.$watch(watch,runStateRefLink,!0),runStateRefLink(scope.$eval(watch)),type.clickable&&element.bind("click",clickHook(element,$state,$timeout,type,function(){return def}))}}}function $StateRefActiveDirective($state,$stateParams,$interpolate){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function($scope,$element,$attrs,$timeout){function addState(stateName,stateParams,activeClass){var state=$state.get(stateName,stateContext($element)),stateHash=createStateHash(stateName,stateParams);states.push({state:state||{name:stateName},params:stateParams,hash:stateHash}),activeClasses[stateHash]=activeClass}function createStateHash(state,params){if(!isString(state))throw new Error("state should be a string");return isObject(params)?state+toJson(params):(params=$scope.$eval(params),isObject(params)?state+toJson(params):state)}function update(){for(var i=0;i<states.length;i++)anyMatch(states[i].state,states[i].params)?addClass($element,activeClasses[states[i].hash]):removeClass($element,activeClasses[states[i].hash]),exactMatch(states[i].state,states[i].params)?addClass($element,activeEqClass):removeClass($element,activeEqClass)}function addClass(el,className){$timeout(function(){el.addClass(className)})}function removeClass(el,className){el.removeClass(className)}function anyMatch(state,params){return $state.includes(state.name,params)}function exactMatch(state,params){return $state.is(state.name,params)}var activeEqClass,uiSrefActive,states=[],activeClasses={};activeEqClass=$interpolate($attrs.uiSrefActiveEq||"",!1)($scope);try{uiSrefActive=$scope.$eval($attrs.uiSrefActive)}catch(e){}uiSrefActive=uiSrefActive||$interpolate($attrs.uiSrefActive||"",!1)($scope),isObject(uiSrefActive)&&forEach(uiSrefActive,function(stateOrName,activeClass){if(isString(stateOrName)){var ref=parseStateRef(stateOrName,$state.current.name);addState(ref.state,$scope.$eval(ref.paramExpr),activeClass)}}),this.$$addStateInfo=function(newState,newParams){isObject(uiSrefActive)&&states.length>0||(addState(newState,newParams,uiSrefActive),update())},$scope.$on("$stateChangeSuccess",update),update()}]}}function $IsStateFilter($state){var isFilter=function(state,params){return $state.is(state,params)};return isFilter.$stateful=!0,isFilter}function $IncludedByStateFilter($state){var includesFilter=function(state,params,options){return $state.includes(state,params,options)};return includesFilter.$stateful=!0,includesFilter}var isDefined=angular.isDefined,isFunction=angular.isFunction,isString=angular.isString,isObject=angular.isObject,isArray=angular.isArray,forEach=angular.forEach,extend=angular.extend,copy=angular.copy,toJson=angular.toJson;angular.module("ui.router.util",["ng"]),angular.module("ui.router.router",["ui.router.util"]),angular.module("ui.router.state",["ui.router.router","ui.router.util"]),angular.module("ui.router",["ui.router.state"]),angular.module("ui.router.compat",["ui.router"]),$Resolve.$inject=["$q","$injector"],angular.module("ui.router.util").service("$resolve",$Resolve),$TemplateFactory.$inject=["$http","$templateCache","$injector"],angular.module("ui.router.util").service("$templateFactory",$TemplateFactory);var $$UMFP;UrlMatcher.prototype.concat=function(pattern,config){var defaultConfig={caseInsensitive:$$UMFP.caseInsensitive(),strict:$$UMFP.strictMode(),squash:$$UMFP.defaultSquashPolicy()};return new UrlMatcher(this.sourcePath+pattern+this.sourceSearch,extend(defaultConfig,config),this)},UrlMatcher.prototype.toString=function(){return this.source},UrlMatcher.prototype.exec=function(path,searchParams){function decodePathArray(string){function reverseString(str){return str.split("").reverse().join("")}function unquoteDashes(str){return str.replace(/\\-/g,"-")}var split=reverseString(string).split(/-(?!\\)/),allReversed=map(split,reverseString);return map(allReversed,unquoteDashes).reverse()}var m=this.regexp.exec(path);if(!m)return null;searchParams=searchParams||{};var i,j,paramName,paramNames=this.parameters(),nTotal=paramNames.length,nPath=this.segments.length-1,values={};if(nPath!==m.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var param,paramVal;for(i=0;i<nPath;i++){for(paramName=paramNames[i],param=this.params[paramName],paramVal=m[i+1],j=0;j<param.replace.length;j++)param.replace[j].from===paramVal&&(paramVal=param.replace[j].to);paramVal&&param.array===!0&&(paramVal=decodePathArray(paramVal)),isDefined(paramVal)&&(paramVal=param.type.decode(paramVal)),values[paramName]=param.value(paramVal)}for(;i<nTotal;i++){for(paramName=paramNames[i],values[paramName]=this.params[paramName].value(searchParams[paramName]),param=this.params[paramName],paramVal=searchParams[paramName],j=0;j<param.replace.length;j++)param.replace[j].from===paramVal&&(paramVal=param.replace[j].to);isDefined(paramVal)&&(paramVal=param.type.decode(paramVal)),values[paramName]=param.value(paramVal)}return values},UrlMatcher.prototype.parameters=function(param){return isDefined(param)?this.params[param]||null:this.$$paramNames},UrlMatcher.prototype.validates=function(params){return this.params.$$validates(params)},UrlMatcher.prototype.format=function(values){function encodeDashes(str){return encodeURIComponent(str).replace(/-/g,function(c){return"%5C%"+c.charCodeAt(0).toString(16).toUpperCase()})}values=values||{};var segments=this.segments,params=this.parameters(),paramset=this.params;if(!this.validates(values))return null;var i,search=!1,nPath=segments.length-1,nTotal=params.length,result=segments[0];for(i=0;i<nTotal;i++){var isPathParam=i<nPath,name=params[i],param=paramset[name],value=param.value(values[name]),isDefaultValue=param.isOptional&&param.type.equals(param.value(),value),squash=!!isDefaultValue&&param.squash,encoded=param.type.encode(value);if(isPathParam){var nextSegment=segments[i+1],isFinalPathParam=i+1===nPath;if(squash===!1)null!=encoded&&(result+=isArray(encoded)?map(encoded,encodeDashes).join("-"):encodeURIComponent(encoded)),result+=nextSegment;else if(squash===!0){var capture=result.match(/\/$/)?/\/?(.*)/:/(.*)/;result+=nextSegment.match(capture)[1]}else isString(squash)&&(result+=squash+nextSegment);isFinalPathParam&&param.squash===!0&&"/"===result.slice(-1)&&(result=result.slice(0,-1))}else{if(null==encoded||isDefaultValue&&squash!==!1)continue;if(isArray(encoded)||(encoded=[encoded]),0===encoded.length)continue;encoded=map(encoded,encodeURIComponent).join("&"+name+"="),result+=(search?"&":"?")+(name+"="+encoded),search=!0}}return result},Type.prototype.is=function(val,key){return!0},Type.prototype.encode=function(val,key){return val},Type.prototype.decode=function(val,key){return val},Type.prototype.equals=function(a,b){return a==b},Type.prototype.$subPattern=function(){var sub=this.pattern.toString();return sub.substr(1,sub.length-2)},Type.prototype.pattern=/.*/,Type.prototype.toString=function(){return"{Type:"+this.name+"}"},Type.prototype.$normalize=function(val){return this.is(val)?val:this.decode(val)},Type.prototype.$asArray=function(mode,isSearch){function ArrayType(type,mode){function bindTo(type,callbackName){return function(){return type[callbackName].apply(type,arguments)}}function arrayWrap(val){return isArray(val)?val:isDefined(val)?[val]:[]}function arrayUnwrap(val){switch(val.length){case 0:return undefined;case 1:return"auto"===mode?val[0]:val;default:return val}}function falsey(val){return!val}function arrayHandler(callback,allTruthyMode){return function(val){if(isArray(val)&&0===val.length)return val;val=arrayWrap(val);var result=map(val,callback);return allTruthyMode===!0?0===filter(result,falsey).length:arrayUnwrap(result)}}function arrayEqualsHandler(callback){return function(val1,val2){var left=arrayWrap(val1),right=arrayWrap(val2);if(left.length!==right.length)return!1;for(var i=0;i<left.length;i++)if(!callback(left[i],right[i]))return!1;return!0}}this.encode=arrayHandler(bindTo(type,"encode")),this.decode=arrayHandler(bindTo(type,"decode")),this.is=arrayHandler(bindTo(type,"is"),!0),this.equals=arrayEqualsHandler(bindTo(type,"equals")),this.pattern=type.pattern,this.$normalize=arrayHandler(bindTo(type,"$normalize")),this.name=type.name,this.$arrayMode=mode}if(!mode)return this;if("auto"===mode&&!isSearch)throw new Error("'auto' array mode is for query parameters only");
return new ArrayType(this,mode)},angular.module("ui.router.util").provider("$urlMatcherFactory",$UrlMatcherFactory),angular.module("ui.router.util").run(["$urlMatcherFactory",function($urlMatcherFactory){}]),$UrlRouterProvider.$inject=["$locationProvider","$urlMatcherFactoryProvider"],angular.module("ui.router.router").provider("$urlRouter",$UrlRouterProvider),$StateProvider.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],angular.module("ui.router.state").factory("$stateParams",function(){return{}}).provider("$state",$StateProvider),$ViewProvider.$inject=[],angular.module("ui.router.state").provider("$view",$ViewProvider),angular.module("ui.router.state").provider("$uiViewScroll",$ViewScrollProvider);var ngMajorVer=angular.version.major,ngMinorVer=angular.version.minor;$ViewDirective.$inject=["$state","$injector","$uiViewScroll","$interpolate"],$ViewDirectiveFill.$inject=["$compile","$controller","$state","$interpolate"],angular.module("ui.router.state").directive("uiView",$ViewDirective),angular.module("ui.router.state").directive("uiView",$ViewDirectiveFill),$StateRefDirective.$inject=["$state","$timeout"],$StateRefDynamicDirective.$inject=["$state","$timeout"],$StateRefActiveDirective.$inject=["$state","$stateParams","$interpolate"],angular.module("ui.router.state").directive("uiSref",$StateRefDirective).directive("uiSrefActive",$StateRefActiveDirective).directive("uiSrefActiveEq",$StateRefActiveDirective).directive("uiState",$StateRefDynamicDirective),$IsStateFilter.$inject=["$state"],$IncludedByStateFilter.$inject=["$state"],angular.module("ui.router.state").filter("isState",$IsStateFilter).filter("includedByState",$IncludedByStateFilter)}(window,window.angular),!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=function(orig){return function(header,value){if("__setXHR_"===header){var val=value(this);val instanceof Function&&val(this)}else orig.apply(this,arguments)}}(window.XMLHttpRequest.prototype.setRequestHeader));var ngFileUpload=angular.module("ngFileUpload",[]);ngFileUpload.version="12.0.4",ngFileUpload.service("UploadBase",["$http","$q","$timeout",function($http,$q,$timeout){function sendHttp(config){function notifyProgress(e){deferred.notify&&deferred.notify(e),promise.progressFunc&&$timeout(function(){promise.progressFunc(e)})}function getNotifyEvent(n){return null!=config._start&&resumeSupported?{loaded:n.loaded+config._start,total:config._file&&config._file.size||n.total,type:n.type,config:config,lengthComputable:!0,target:n.target}:n}function uploadWithAngular(){$http(config).then(function(r){resumeSupported&&config._chunkSize&&!config._finished&&config._file?(notifyProgress({loaded:config._end,total:config._file&&config._file.size,config:config,type:"progress"}),upload.upload(config,!0)):(config._finished&&delete config._finished,deferred.resolve(r))},function(e){deferred.reject(e)},function(n){deferred.notify(n)})}config.method=config.method||"POST",config.headers=config.headers||{};var deferred=config._deferred=config._deferred||$q.defer(),promise=deferred.promise;return config.disableProgress||(config.headers.__setXHR_=function(){return function(xhr){xhr&&xhr.upload&&xhr.upload.addEventListener&&(config.__XHR=xhr,config.xhrFn&&config.xhrFn(xhr),xhr.upload.addEventListener("progress",function(e){e.config=config,notifyProgress(getNotifyEvent(e))},!1),xhr.upload.addEventListener("load",function(e){e.lengthComputable&&(e.config=config,notifyProgress(getNotifyEvent(e)))},!1))}}),resumeSupported?config._chunkSize&&config._end&&!config._finished?(config._start=config._end,config._end+=config._chunkSize,uploadWithAngular()):config.resumeSizeUrl?$http.get(config.resumeSizeUrl).then(function(resp){config.resumeSizeResponseReader?config._start=config.resumeSizeResponseReader(resp.data):config._start=parseInt((null==resp.data.size?resp.data:resp.data.size).toString()),config._chunkSize&&(config._end=config._start+config._chunkSize),uploadWithAngular()},function(e){throw e}):config.resumeSize?config.resumeSize().then(function(size){config._start=size,uploadWithAngular()},function(e){throw e}):(config._chunkSize&&(config._start=0,config._end=config._start+config._chunkSize),uploadWithAngular()):uploadWithAngular(),promise.success=function(fn){return promise.then(function(response){fn(response.data,response.status,response.headers,config)}),promise},promise.error=function(fn){return promise.then(null,function(response){fn(response.data,response.status,response.headers,config)}),promise},promise.progress=function(fn){return promise.progressFunc=fn,promise.then(null,null,function(n){fn(n)}),promise},promise.abort=promise.pause=function(){return config.__XHR&&$timeout(function(){config.__XHR.abort()}),promise},promise.xhr=function(fn){return config.xhrFn=function(origXhrFn){return function(){origXhrFn&&origXhrFn.apply(promise,arguments),fn.apply(promise,arguments)}}(config.xhrFn),promise},upload.promisesCount++,promise["finally"](function(){upload.promisesCount--}),promise}function copy(obj){var clone={};for(var key in obj)obj.hasOwnProperty(key)&&(clone[key]=obj[key]);return clone}var upload=this;upload.promisesCount=0,this.isResumeSupported=function(){return window.Blob&&window.Blob.prototype.slice};var resumeSupported=this.isResumeSupported();this.isUploadInProgress=function(){return upload.promisesCount>0},this.rename=function(file,name){return file.ngfName=name,file},this.jsonBlob=function(val){null==val||angular.isString(val)||(val=JSON.stringify(val));var blob=new window.Blob([val],{type:"application/json"});return blob._ngfBlob=!0,blob},this.json=function(val){return angular.toJson(val)},this.isFile=function(file){return null!=file&&(file instanceof window.Blob||file.flashId&&file.name&&file.size)},this.upload=function(config,internal){function toResumeFile(file,formData){if(file._ngfBlob)return file;if(config._file=config._file||file,null!=config._start&&resumeSupported){config._end&&config._end>=file.size&&(config._finished=!0,config._end=file.size);var slice=file.slice(config._start,config._end||file.size);return slice.name=file.name,slice.ngfName=file.ngfName,config._chunkSize&&(formData.append("_chunkSize",config._chunkSize),formData.append("_currentChunkSize",config._end-config._start),formData.append("_chunkNumber",Math.floor(config._start/config._chunkSize)),formData.append("_totalSize",config._file.size)),slice}return file}function addFieldToFormData(formData,val,key){if(void 0!==val)if(angular.isDate(val)&&(val=val.toISOString()),angular.isString(val))formData.append(key,val);else if(upload.isFile(val)){var file=toResumeFile(val,formData),split=key.split(",");split[1]&&(file.ngfName=split[1].replace(/^\s+|\s+$/g,""),key=split[0]),config._fileKey=config._fileKey||key,formData.append(key,file,file.ngfName||file.name)}else if(angular.isObject(val)){if(val.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+key;val.$$ngfCircularDetection=!0;try{for(var k in val)if(val.hasOwnProperty(k)&&"$$ngfCircularDetection"!==k){var objectKey=null==config.objectKey?"[i]":config.objectKey;val.length&&parseInt(k)>-1&&(objectKey=null==config.arrayKey?objectKey:config.arrayKey),addFieldToFormData(formData,val[k],key+objectKey.replace(/[ik]/g,k))}}finally{delete val.$$ngfCircularDetection}}else formData.append(key,val)}function digestConfig(){config._chunkSize=upload.translateScalars(config.resumeChunkSize),config._chunkSize=config._chunkSize?parseInt(config._chunkSize.toString()):null,config.headers=config.headers||{},config.headers["Content-Type"]=void 0,config.transformRequest=config.transformRequest?angular.isArray(config.transformRequest)?config.transformRequest:[config.transformRequest]:[],config.transformRequest.push(function(data){var key,formData=new window.FormData;data=data||config.fields||{},config.file&&(data.file=config.file);for(key in data)if(data.hasOwnProperty(key)){var val=data[key];config.formDataAppender?config.formDataAppender(formData,key,val):addFieldToFormData(formData,val,key)}return formData})}return internal||(config=copy(config)),config._isDigested||(config._isDigested=!0,digestConfig()),sendHttp(config)},this.http=function(config){return config=copy(config),config.transformRequest=config.transformRequest||function(data){return window.ArrayBuffer&&data instanceof window.ArrayBuffer||data instanceof window.Blob?data:$http.defaults.transformRequest[0].apply(this,arguments)},config._chunkSize=upload.translateScalars(config.resumeChunkSize),config._chunkSize=config._chunkSize?parseInt(config._chunkSize.toString()):null,sendHttp(config)},this.translateScalars=function(str){if(angular.isString(str)){if(str.search(/kb/i)===str.length-2)return parseFloat(1024*str.substring(0,str.length-2));if(str.search(/mb/i)===str.length-2)return parseFloat(1048576*str.substring(0,str.length-2));if(str.search(/gb/i)===str.length-2)return parseFloat(1073741824*str.substring(0,str.length-2));if(str.search(/b/i)===str.length-1)return parseFloat(str.substring(0,str.length-1));if(str.search(/s/i)===str.length-1)return parseFloat(str.substring(0,str.length-1));if(str.search(/m/i)===str.length-1)return parseFloat(60*str.substring(0,str.length-1));if(str.search(/h/i)===str.length-1)return parseFloat(3600*str.substring(0,str.length-1))}return str},this.urlToBlob=function(url){var defer=$q.defer();return $http({url:url,method:"get",responseType:"arraybuffer"}).then(function(resp){var arrayBufferView=new Uint8Array(resp.data),type=resp.headers("content-type")||"image/WebP",blob=new window.Blob([arrayBufferView],{type:type});defer.resolve(blob)},function(e){defer.reject(e)}),defer.promise},this.setDefaults=function(defaults){this.defaults=defaults||{}},this.defaults={},this.version=ngFileUpload.version}]),ngFileUpload.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function($parse,$timeout,$compile,$q,UploadExif){function applyExifRotations(files,attr,scope){var promises=[upload.emptyPromise()];return angular.forEach(files,function(f,i){0===f.type.indexOf("image/jpeg")&&upload.attrGetter("ngfFixOrientation",attr,scope,{$file:f})&&promises.push(upload.happyPromise(upload.applyExifRotation(f),f).then(function(fixedFile){files.splice(i,1,fixedFile)}))}),$q.all(promises)}function resize(files,attr,scope){var resizeVal=upload.attrGetter("ngfResize",attr,scope);if(!resizeVal||!upload.isResizeSupported()||!files.length)return upload.emptyPromise();if(!(resizeVal instanceof Function))return resizeWithParams(resizeVal,files,attr,scope);var defer=$q.defer();resizeVal(files).then(function(p){resizeWithParams(p,files,attr,scope).then(function(r){defer.resolve(r)},function(e){defer.reject(e)})},function(e){defer.reject(e)})}function resizeWithParams(param,files,attr,scope){function handleFile(f,i){if(0===f.type.indexOf("image")){if(param.pattern&&!upload.validatePattern(f,param.pattern))return;var promise=upload.resize(f,param.width,param.height,param.quality,param.type,param.ratio,param.centerCrop,function(width,height){return upload.attrGetter("ngfResizeIf",attr,scope,{$width:width,$height:height,$file:f})},param.restoreExif!==!1);promises.push(promise),promise.then(function(resizedFile){files.splice(i,1,resizedFile)},function(e){f.$error="resize",f.$errorParam=(e?(e.message?e.message:e)+": ":"")+(f&&f.name)})}}for(var promises=[upload.emptyPromise()],i=0;i<files.length;i++)handleFile(files[i],i);return $q.all(promises)}var upload=UploadExif;return upload.getAttrWithDefaults=function(attr,name){if(null!=attr[name])return attr[name];var def=upload.defaults[name];return null==def?def:angular.isString(def)?def:JSON.stringify(def)},upload.attrGetter=function(name,attr,scope,params){var attrVal=this.getAttrWithDefaults(attr,name);if(!scope)return attrVal;try{return params?$parse(attrVal)(scope,params):$parse(attrVal)(scope)}catch(e){if(name.search(/min|max|pattern/i))return attrVal;throw e}},upload.shouldUpdateOn=function(type,attr,scope){var modelOptions=upload.attrGetter("ngModelOptions",attr,scope);return!modelOptions||!modelOptions.updateOn||modelOptions.updateOn.split(" ").indexOf(type)>-1},upload.emptyPromise=function(){var d=$q.defer(),args=arguments;return $timeout(function(){d.resolve.apply(d,args)}),d.promise},upload.rejectPromise=function(){var d=$q.defer(),args=arguments;return $timeout(function(){d.reject.apply(d,args)}),d.promise},upload.happyPromise=function(promise,data){var d=$q.defer();return promise.then(function(result){d.resolve(result)},function(error){$timeout(function(){throw error}),d.resolve(data)}),d.promise},upload.updateModel=function(ngModel,attr,scope,fileChange,files,evt,noDelay){function update(files,invalidFiles,newFiles,dupFiles,isSingleModel){attr.$$ngfPrevValidFiles=files,attr.$$ngfPrevInvalidFiles=invalidFiles;var file=files&&files.length?files[0]:null,invalidFile=invalidFiles&&invalidFiles.length?invalidFiles[0]:null;ngModel&&(upload.applyModelValidation(ngModel,files),ngModel.$setViewValue(isSingleModel?file:files)),fileChange&&$parse(fileChange)(scope,{$files:files,$file:file,$newFiles:newFiles,$duplicateFiles:dupFiles,$invalidFiles:invalidFiles,$invalidFile:invalidFile,$event:evt});var invalidModel=upload.attrGetter("ngfModelInvalid",attr);invalidModel&&$timeout(function(){$parse(invalidModel).assign(scope,isSingleModel?invalidFile:invalidFiles)}),$timeout(function(){})}function removeDuplicates(){function equals(f1,f2){return f1.name===f2.name&&(f1.$ngfOrigSize||f1.size)===(f2.$ngfOrigSize||f2.size)&&f1.type===f2.type}function isInPrevFiles(f){var j;for(j=0;j<prevValidFiles.length;j++)if(equals(f,prevValidFiles[j]))return!0;for(j=0;j<prevInvalidFiles.length;j++)if(equals(f,prevInvalidFiles[j]))return!0;return!1}if(files){allNewFiles=[],dupFiles=[];for(var i=0;i<files.length;i++)isInPrevFiles(files[i])?dupFiles.push(files[i]):allNewFiles.push(files[i])}}function toArray(v){return angular.isArray(v)?v:[v]}function separateInvalids(){valids=[],invalids=[],angular.forEach(allNewFiles,function(file){file.$error?invalids.push(file):valids.push(file)})}function resizeAndUpdate(){function updateModel(){$timeout(function(){update(keep?prevValidFiles.concat(valids):valids,keep?prevInvalidFiles.concat(invalids):invalids,files,dupFiles,isSingleModel)},options&&options.debounce?options.debounce.change||options.debounce:0)}resize(validateAfterResize?allNewFiles:valids,attr,scope).then(function(){validateAfterResize?upload.validate(allNewFiles,prevValidFiles.length,ngModel,attr,scope).then(function(){separateInvalids(),updateModel()}):updateModel()},function(e){throw"Could not resize files "+e})}var allNewFiles,prevValidFiles,prevInvalidFiles,dupFiles=[],invalids=[],valids=[];prevValidFiles=attr.$$ngfPrevValidFiles||[],prevInvalidFiles=attr.$$ngfPrevInvalidFiles||[],ngModel&&ngModel.$modelValue&&(prevValidFiles=toArray(ngModel.$modelValue));var keep=upload.attrGetter("ngfKeep",attr,scope);allNewFiles=(files||[]).slice(0),"distinct"!==keep&&upload.attrGetter("ngfKeepDistinct",attr,scope)!==!0||removeDuplicates(attr,scope);var isSingleModel=!keep&&!upload.attrGetter("ngfMultiple",attr,scope)&&!upload.attrGetter("multiple",attr);if(!keep||allNewFiles.length){upload.attrGetter("ngfBeforeModelChange",attr,scope,{$files:files,$file:files&&files.length?files[0]:null,$newFiles:allNewFiles,$duplicateFiles:dupFiles,$event:evt});var validateAfterResize=upload.attrGetter("ngfValidateAfterResize",attr,scope),options=upload.attrGetter("ngModelOptions",attr,scope);upload.validate(allNewFiles,prevValidFiles.length,ngModel,attr,scope).then(function(){noDelay?update(allNewFiles,[],files,dupFiles,isSingleModel):(options&&options.allowInvalid||validateAfterResize?valids=allNewFiles:separateInvalids(),upload.attrGetter("ngfFixOrientation",attr,scope)&&upload.isExifSupported()?applyExifRotations(valids,attr,scope).then(function(){resizeAndUpdate()}):resizeAndUpdate())})}},upload}]),ngFileUpload.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function($parse,$timeout,$compile,Upload){function isDelayedClickSupported(ua){var m=ua.match(/Android[^\d]*(\d+)\.(\d+)/);if(m&&m.length>2){var v=Upload.defaults.androidFixMinorVersion||4;return parseInt(m[1])<4||parseInt(m[1])===v&&parseInt(m[2])<v}return ua.indexOf("Chrome")===-1&&/.*Windows.*Safari.*/.test(ua)}function linkFileSelect(scope,elem,attr,ngModel,$parse,$timeout,$compile,upload){function isInputTypeFile(){return"input"===elem[0].tagName.toLowerCase()&&attr.type&&"file"===attr.type.toLowerCase()}function fileChangeAttr(){return attrGetter("ngfChange")||attrGetter("ngfSelect")}function changeFn(evt){if(upload.shouldUpdateOn("change",attr,scope)){for(var fileList=evt.__files_||evt.target&&evt.target.files,files=[],i=0;i<fileList.length;i++)files.push(fileList[i]);upload.updateModel(ngModel,attr,scope,fileChangeAttr(),files.length?files:null,evt)}}function bindAttrToFileInput(fileElem){if(elem!==fileElem)for(var i=0;i<elem[0].attributes.length;i++){var attribute=elem[0].attributes[i];"type"!==attribute.name&&"class"!==attribute.name&&"style"!==attribute.name&&(null!=attribute.value&&""!==attribute.value||("required"===attribute.name&&(attribute.value="required"),"multiple"===attribute.name&&(attribute.value="multiple")),fileElem.attr(attribute.name,"id"===attribute.name?"ngf-"+attribute.value:attribute.value))}}function createFileInput(){if(isInputTypeFile())return elem;var fileElem=angular.element('<input type="file">');bindAttrToFileInput(fileElem);var label=angular.element("<label>upload</label>");return label.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),generatedElems.push({el:elem,ref:label}),document.body.appendChild(label.append(fileElem)[0]),fileElem}function clickHandler(evt){if(elem.attr("disabled"))return!1;if(!attrGetter("ngfSelectDisabled",scope)){var r=handleTouch(evt);if(null!=r)return r;resetModel(evt);try{isInputTypeFile()||document.body.contains(fileElem[0])||(generatedElems.push({el:elem,ref:fileElem.parent()}),document.body.appendChild(fileElem.parent()[0]),fileElem.bind("change",changeFn))}catch(e){}return isDelayedClickSupported(navigator.userAgent)?setTimeout(function(){fileElem[0].click()},0):fileElem[0].click(),!1}}function handleTouch(evt){var touches=evt.changedTouches||evt.originalEvent&&evt.originalEvent.changedTouches;if("touchstart"===evt.type)return initialTouchStartY=touches?touches[0].clientY:0,!0;if(evt.stopPropagation(),evt.preventDefault(),"touchend"===evt.type){var currentLocation=touches?touches[0].clientY:0;if(Math.abs(currentLocation-initialTouchStartY)>20)return!1}}function resetModel(evt){upload.shouldUpdateOn("click",attr,scope)&&fileElem.val()&&(fileElem.val(null),upload.updateModel(ngModel,attr,scope,fileChangeAttr(),null,evt,!0))}function ie10SameFileSelectFix(evt){if(fileElem&&!fileElem.attr("__ngf_ie10_Fix_")){if(!fileElem[0].parentNode)return void(fileElem=null);evt.preventDefault(),evt.stopPropagation(),fileElem.unbind("click");var clone=fileElem.clone();return fileElem.replaceWith(clone),fileElem=clone,fileElem.attr("__ngf_ie10_Fix_","true"),fileElem.bind("change",changeFn),fileElem.bind("click",ie10SameFileSelectFix),fileElem[0].click(),!1}fileElem.removeAttr("__ngf_ie10_Fix_")}var attrGetter=function(name,scope){return upload.attrGetter(name,attr,scope)};upload.registerModelChangeValidator(ngModel,attr,scope);var unwatches=[];unwatches.push(scope.$watch(attrGetter("ngfMultiple"),function(){fileElem.attr("multiple",attrGetter("ngfMultiple",scope))})),unwatches.push(scope.$watch(attrGetter("ngfCapture"),function(){fileElem.attr("capture",attrGetter("ngfCapture",scope))})),unwatches.push(scope.$watch(attrGetter("ngfAccept"),function(){fileElem.attr("accept",attrGetter("ngfAccept",scope))})),attr.$observe("accept",function(){fileElem.attr("accept",attrGetter("accept"))}),unwatches.push(function(){attr.$$observers&&delete attr.$$observers.accept});var initialTouchStartY=0,fileElem=elem;isInputTypeFile()||(fileElem=createFileInput()),fileElem.bind("change",changeFn),isInputTypeFile()?elem.bind("click",resetModel):elem.bind("click touchstart touchend",clickHandler),navigator.appVersion.indexOf("MSIE 10")!==-1&&fileElem.bind("click",ie10SameFileSelectFix),ngModel&&ngModel.$formatters.push(function(val){return null!=val&&0!==val.length||fileElem.val()&&fileElem.val(null),val}),scope.$on("$destroy",function(){isInputTypeFile()||fileElem.parent().remove(),angular.forEach(unwatches,function(unwatch){unwatch()})}),$timeout(function(){for(var i=0;i<generatedElems.length;i++){var g=generatedElems[i];document.body.contains(g.el[0])||(generatedElems.splice(i,1),g.ref.remove())}}),window.FileAPI&&window.FileAPI.ngfFixIE&&window.FileAPI.ngfFixIE(elem,fileElem,changeFn)}var generatedElems=[];return{restrict:"AEC",require:"?ngModel",link:function(scope,elem,attr,ngModel){linkFileSelect(scope,elem,attr,ngModel,$parse,$timeout,$compile,Upload)}}}]),function(){function getTagType(el){return"img"===el.tagName.toLowerCase()?"image":"audio"===el.tagName.toLowerCase()?"audio":"video"===el.tagName.toLowerCase()?"video":/./}function linkFileDirective(Upload,$timeout,scope,elem,attr,directiveName,resizeParams,isBackground){function constructDataUrl(file){var disallowObjectUrl=Upload.attrGetter("ngfNoObjectUrl",attr,scope);Upload.dataUrl(file,disallowObjectUrl)["finally"](function(){$timeout(function(){var src=(disallowObjectUrl?file.$ngfDataUrl:file.$ngfBlobUrl)||file.$ngfDataUrl;isBackground?elem.css("background-image","url('"+(src||"")+"')"):elem.attr("src",src),src?elem.removeClass("ng-hide"):elem.addClass("ng-hide")})})}$timeout(function(){var unwatch=scope.$watch(attr[directiveName],function(file){var size=resizeParams;if("ngfThumbnail"===directiveName&&(size||(size={width:elem[0].clientWidth,height:elem[0].clientHeight}),0===size.width&&window.getComputedStyle)){var style=getComputedStyle(elem[0]);size={width:parseInt(style.width.slice(0,-2)),height:parseInt(style.height.slice(0,-2))}}return angular.isString(file)?(elem.removeClass("ng-hide"),isBackground?elem.css("background-image","url('"+file+"')"):elem.attr("src",file)):void(!file||!file.type||0!==file.type.search(getTagType(elem[0]))||isBackground&&0!==file.type.indexOf("image")?elem.addClass("ng-hide"):size&&Upload.isResizeSupported()?Upload.resize(file,size.width,size.height,size.quality).then(function(f){constructDataUrl(f)},function(e){throw e}):constructDataUrl(file))});scope.$on("$destroy",function(){unwatch()})})}ngFileUpload.service("UploadDataUrl",["UploadBase","$timeout","$q",function(UploadBase,$timeout,$q){var upload=UploadBase;return upload.base64DataUrl=function(file){if(angular.isArray(file)){var d=$q.defer(),count=0;return angular.forEach(file,function(f){upload.dataUrl(f,!0)["finally"](function(){if(count++,count===file.length){var urls=[];angular.forEach(file,function(ff){urls.push(ff.$ngfDataUrl)}),d.resolve(urls,file)}})}),d.promise}return upload.dataUrl(file,!0)},upload.dataUrl=function(file,disallowObjectUrl){if(!file)return upload.emptyPromise(file,file);if(disallowObjectUrl&&null!=file.$ngfDataUrl||!disallowObjectUrl&&null!=file.$ngfBlobUrl)return upload.emptyPromise(disallowObjectUrl?file.$ngfDataUrl:file.$ngfBlobUrl,file);var p=disallowObjectUrl?file.$$ngfDataUrlPromise:file.$$ngfBlobUrlPromise;if(p)return p;var deferred=$q.defer();return $timeout(function(){if(window.FileReader&&file&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 8")===-1||file.size<2e4)&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 9")===-1||file.size<4e6)){var URL=window.URL||window.webkitURL;if(URL&&URL.createObjectURL&&!disallowObjectUrl){var url;try{url=URL.createObjectURL(file)}catch(e){return void $timeout(function(){file.$ngfBlobUrl="",deferred.reject()})}$timeout(function(){if(file.$ngfBlobUrl=url,url){deferred.resolve(url,file),upload.blobUrls=upload.blobUrls||[],upload.blobUrlsTotalSize=upload.blobUrlsTotalSize||0,upload.blobUrls.push({url:url,size:file.size}),upload.blobUrlsTotalSize+=file.size||0;for(var maxMemory=upload.defaults.blobUrlsMaxMemory||268435456,maxLength=upload.defaults.blobUrlsMaxQueueSize||200;(upload.blobUrlsTotalSize>maxMemory||upload.blobUrls.length>maxLength)&&upload.blobUrls.length>1;){var obj=upload.blobUrls.splice(0,1)[0];URL.revokeObjectURL(obj.url),upload.blobUrlsTotalSize-=obj.size}}})}else{var fileReader=new FileReader;fileReader.onload=function(e){$timeout(function(){file.$ngfDataUrl=e.target.result,deferred.resolve(e.target.result,file),$timeout(function(){delete file.$ngfDataUrl},1e3)})},fileReader.onerror=function(){$timeout(function(){file.$ngfDataUrl="",deferred.reject()})},fileReader.readAsDataURL(file)}}else $timeout(function(){file[disallowObjectUrl?"$ngfDataUrl":"$ngfBlobUrl"]="",deferred.reject()})}),p=disallowObjectUrl?file.$$ngfDataUrlPromise=deferred.promise:file.$$ngfBlobUrlPromise=deferred.promise,p["finally"](function(){delete file[disallowObjectUrl?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),p},upload}]),ngFileUpload.directive("ngfSrc",["Upload","$timeout",function(Upload,$timeout){return{restrict:"AE",link:function(scope,elem,attr){linkFileDirective(Upload,$timeout,scope,elem,attr,"ngfSrc",Upload.attrGetter("ngfResize",attr,scope),!1)}}}]),ngFileUpload.directive("ngfBackground",["Upload","$timeout",function(Upload,$timeout){return{restrict:"AE",link:function(scope,elem,attr){linkFileDirective(Upload,$timeout,scope,elem,attr,"ngfBackground",Upload.attrGetter("ngfResize",attr,scope),!0)}}}]),ngFileUpload.directive("ngfThumbnail",["Upload","$timeout",function(Upload,$timeout){return{restrict:"AE",link:function(scope,elem,attr){var size=Upload.attrGetter("ngfSize",attr,scope);linkFileDirective(Upload,$timeout,scope,elem,attr,"ngfThumbnail",size,Upload.attrGetter("ngfAsBackground",attr,scope))}}}]),ngFileUpload.config(["$compileProvider",function($compileProvider){$compileProvider.imgSrcSanitizationWhitelist&&$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|local|file|data|blob):/),$compileProvider.aHrefSanitizationWhitelist&&$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|local|file|data|blob):/)}]),ngFileUpload.filter("ngfDataUrl",["UploadDataUrl","$sce",function(UploadDataUrl,$sce){return function(file,disallowObjectUrl,trustedUrl){if(angular.isString(file))return $sce.trustAsResourceUrl(file);var src=file&&((disallowObjectUrl?file.$ngfDataUrl:file.$ngfBlobUrl)||file.$ngfDataUrl);return file&&!src?(!file.$ngfDataUrlFilterInProgress&&angular.isObject(file)&&(file.$ngfDataUrlFilterInProgress=!0,UploadDataUrl.dataUrl(file,disallowObjectUrl)),""):(file&&delete file.$ngfDataUrlFilterInProgress,(file&&src?trustedUrl?$sce.trustAsResourceUrl(src):src:file)||"")}}])}(),ngFileUpload.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(UploadDataUrl,$q,$timeout){function globStringToRegex(str){var regexp="",excludes=[];if(str.length>2&&"/"===str[0]&&"/"===str[str.length-1])regexp=str.substring(1,str.length-1);else{var split=str.split(",");if(split.length>1)for(var i=0;i<split.length;i++){var r=globStringToRegex(split[i]);r.regexp?(regexp+="("+r.regexp+")",i<split.length-1&&(regexp+="|")):excludes=excludes.concat(r.excludes)}else 0===str.indexOf("!")?excludes.push("^((?!"+globStringToRegex(str.substring(1)).regexp+").)*$"):(0===str.indexOf(".")&&(str="*"+str),regexp="^"+str.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$",regexp=regexp.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:regexp,excludes:excludes}}function markModelAsDirty(ngModel,files){null==files||ngModel.$dirty||(ngModel.$setDirty?ngModel.$setDirty():ngModel.$dirty=!0)}var upload=UploadDataUrl;return upload.validatePattern=function(file,val){if(!val)return!0;var pattern=globStringToRegex(val),valid=!0;if(pattern.regexp&&pattern.regexp.length){var regexp=new RegExp(pattern.regexp,"i");valid=null!=file.type&&regexp.test(file.type)||null!=file.name&&regexp.test(file.name)}for(var len=pattern.excludes.length;len--;){var exclude=new RegExp(pattern.excludes[len],"i");valid=valid&&(null==file.type||exclude.test(file.type))&&(null==file.name||exclude.test(file.name))}return valid},upload.ratioToFloat=function(val){var r=val.toString(),xIndex=r.search(/[x:]/i);return r=xIndex>-1?parseFloat(r.substring(0,xIndex))/parseFloat(r.substring(xIndex+1)):parseFloat(r)},upload.registerModelChangeValidator=function(ngModel,attr,scope){ngModel&&ngModel.$formatters.push(function(files){ngModel.$dirty&&(files&&!angular.isArray(files)&&(files=[files]),upload.validate(files,0,ngModel,attr,scope).then(function(){upload.applyModelValidation(ngModel,files)}))})},upload.applyModelValidation=function(ngModel,files){markModelAsDirty(ngModel,files),angular.forEach(ngModel.$ngfValidations,function(validation){ngModel.$setValidity(validation.name,validation.valid)})},upload.getValidationAttr=function(attr,scope,name,validationName,file){var dName="ngf"+name[0].toUpperCase()+name.substr(1),val=upload.attrGetter(dName,attr,scope,{$file:file});if(null==val&&(val=upload.attrGetter("ngfValidate",attr,scope,{$file:file}))){var split=(validationName||name).split(".");val=val[split[0]],split.length>1&&(val=val&&val[split[1]])}return val},upload.validate=function(files,prevLength,ngModel,attr,scope){function validateSync(name,validationName,fn){if(files){for(var i=files.length,valid=null;i--;){var file=files[i];if(file){var val=upload.getValidationAttr(attr,scope,name,validationName,file);null!=val&&(fn(file,val,i)||(file.$error=name,(file.$errorMessages=file.$errorMessages||{})[name]=!0,file.$errorParam=val,files.splice(i,1),valid=!1))}}null!==valid&&ngModel.$ngfValidations.push({name:name,valid:valid})}}function validateAsync(name,validationName,type,asyncFn,fn){function resolveResult(defer,file,val){null!=val?asyncFn(file,val).then(function(d){fn(d,val)?defer.resolve():(file.$error=name,(file.$errorMessages=file.$errorMessages||{})[name]=!0,file.$errorParam=val,defer.reject())},function(){attrGetter("ngfValidateForce",{$file:file})?(file.$error=name,(file.$errorMessages=file.$errorMessages||{})[name]=!0,file.$errorParam=val,defer.reject()):defer.resolve()}):defer.resolve()}var promises=[upload.emptyPromise()];if(files)return files=void 0===files.length?[files]:files,angular.forEach(files,function(file){var defer=$q.defer();return promises.push(defer.promise),!type||null!=file.type&&0===file.type.search(type)?void("dimensions"===name&&null!=upload.attrGetter("ngfDimensions",attr)?upload.imageDimensions(file).then(function(d){resolveResult(defer,file,attrGetter("ngfDimensions",{$file:file,$width:d.width,$height:d.height}))},function(){defer.reject()}):"duration"===name&&null!=upload.attrGetter("ngfDuration",attr)?upload.mediaDuration(file).then(function(d){resolveResult(defer,file,attrGetter("ngfDuration",{$file:file,$duration:d}))},function(){defer.reject()}):resolveResult(defer,file,upload.getValidationAttr(attr,scope,name,validationName,file))):void defer.resolve()}),$q.all(promises).then(function(){ngModel.$ngfValidations.push({name:name,valid:!0})},function(){ngModel.$ngfValidations.push({name:name,valid:!1})})}ngModel=ngModel||{},ngModel.$ngfValidations=ngModel.$ngfValidations||[],angular.forEach(ngModel.$ngfValidations,function(v){v.valid=!0});var attrGetter=function(name,params){return upload.attrGetter(name,attr,scope,params)};if(null==files||0===files.length)return upload.emptyPromise(ngModel);files=void 0===files.length?[files]:files.slice(0),validateSync("maxFiles",null,function(file,val,i){return prevLength+i<val}),validateSync("pattern",null,upload.validatePattern),validateSync("minSize","size.min",function(file,val){return file.size+.1>=upload.translateScalars(val)}),validateSync("maxSize","size.max",function(file,val){return file.size-.1<=upload.translateScalars(val)});var totalSize=0;if(validateSync("maxTotalSize",null,function(file,val){
return totalSize+=file.size,!(totalSize>upload.translateScalars(val))||(files.splice(0,files.length),!1)}),validateSync("validateFn",null,function(file,r){return r===!0||null===r||""===r}),!files.length)return upload.emptyPromise(ngModel,ngModel.$ngfValidations);var deffer=$q.defer(),promises=[];return promises.push(upload.happyPromise(validateAsync("maxHeight","height.max",/image/,this.imageDimensions,function(d,val){return d.height<=val}))),promises.push(upload.happyPromise(validateAsync("minHeight","height.min",/image/,this.imageDimensions,function(d,val){return d.height>=val}))),promises.push(upload.happyPromise(validateAsync("maxWidth","width.max",/image/,this.imageDimensions,function(d,val){return d.width<=val}))),promises.push(upload.happyPromise(validateAsync("minWidth","width.min",/image/,this.imageDimensions,function(d,val){return d.width>=val}))),promises.push(upload.happyPromise(validateAsync("dimensions",null,/image/,function(file,val){return upload.emptyPromise(val)},function(r){return r}))),promises.push(upload.happyPromise(validateAsync("ratio",null,/image/,this.imageDimensions,function(d,val){for(var split=val.toString().split(","),valid=!1,i=0;i<split.length;i++)Math.abs(d.width/d.height-upload.ratioToFloat(split[i]))<1e-4&&(valid=!0);return valid}))),promises.push(upload.happyPromise(validateAsync("maxRatio","ratio.max",/image/,this.imageDimensions,function(d,val){return d.width/d.height-upload.ratioToFloat(val)<1e-4}))),promises.push(upload.happyPromise(validateAsync("minRatio","ratio.min",/image/,this.imageDimensions,function(d,val){return d.width/d.height-upload.ratioToFloat(val)>-1e-4}))),promises.push(upload.happyPromise(validateAsync("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(d,val){return d<=upload.translateScalars(val)}))),promises.push(upload.happyPromise(validateAsync("minDuration","duration.min",/audio|video/,this.mediaDuration,function(d,val){return d>=upload.translateScalars(val)}))),promises.push(upload.happyPromise(validateAsync("duration",null,/audio|video/,function(file,val){return upload.emptyPromise(val)},function(r){return r}))),promises.push(upload.happyPromise(validateAsync("validateAsyncFn",null,null,function(file,val){return val},function(r){return r===!0||null===r||""===r}))),$q.all(promises).then(function(){deffer.resolve(ngModel,ngModel.$ngfValidations)})},upload.imageDimensions=function(file){if(file.$ngfWidth&&file.$ngfHeight){var d=$q.defer();return $timeout(function(){d.resolve({width:file.$ngfWidth,height:file.$ngfHeight})}),d.promise}if(file.$ngfDimensionPromise)return file.$ngfDimensionPromise;var deferred=$q.defer();return $timeout(function(){return 0!==file.type.indexOf("image")?void deferred.reject("not image"):void upload.dataUrl(file).then(function(dataUrl){function success(){var width=img[0].clientWidth,height=img[0].clientHeight;img.remove(),file.$ngfWidth=width,file.$ngfHeight=height,deferred.resolve({width:width,height:height})}function error(){img.remove(),deferred.reject("load error")}function checkLoadError(){$timeout(function(){img[0].parentNode&&(img[0].clientWidth?success():count>10?error():checkLoadError())},1e3)}var img=angular.element("<img>").attr("src",dataUrl).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");img.on("load",success),img.on("error",error);var count=0;checkLoadError(),angular.element(document.getElementsByTagName("body")[0]).append(img)},function(){deferred.reject("load error")})}),file.$ngfDimensionPromise=deferred.promise,file.$ngfDimensionPromise["finally"](function(){delete file.$ngfDimensionPromise}),file.$ngfDimensionPromise},upload.mediaDuration=function(file){if(file.$ngfDuration){var d=$q.defer();return $timeout(function(){d.resolve(file.$ngfDuration)}),d.promise}if(file.$ngfDurationPromise)return file.$ngfDurationPromise;var deferred=$q.defer();return $timeout(function(){return 0!==file.type.indexOf("audio")&&0!==file.type.indexOf("video")?void deferred.reject("not media"):void upload.dataUrl(file).then(function(dataUrl){function success(){var duration=el[0].duration;file.$ngfDuration=duration,el.remove(),deferred.resolve(duration)}function error(){el.remove(),deferred.reject("load error")}function checkLoadError(){$timeout(function(){el[0].parentNode&&(el[0].duration?success():count>10?error():checkLoadError())},1e3)}var el=angular.element(0===file.type.indexOf("audio")?"<audio>":"<video>").attr("src",dataUrl).css("visibility","none").css("position","fixed");el.on("loadedmetadata",success),el.on("error",error);var count=0;checkLoadError(),angular.element(document.body).append(el)},function(){deferred.reject("load error")})}),file.$ngfDurationPromise=deferred.promise,file.$ngfDurationPromise["finally"](function(){delete file.$ngfDurationPromise}),file.$ngfDurationPromise},upload}]),ngFileUpload.service("UploadResize",["UploadValidate","$q",function(UploadValidate,$q){var upload=UploadValidate,calculateAspectRatioFit=function(srcWidth,srcHeight,maxWidth,maxHeight,centerCrop){var ratio=centerCrop?Math.max(maxWidth/srcWidth,maxHeight/srcHeight):Math.min(maxWidth/srcWidth,maxHeight/srcHeight);return{width:srcWidth*ratio,height:srcHeight*ratio,marginX:srcWidth*ratio-maxWidth,marginY:srcHeight*ratio-maxHeight}},resize=function(imagen,width,height,quality,type,ratio,centerCrop,resizeIf){var deferred=$q.defer(),canvasElement=document.createElement("canvas"),imageElement=document.createElement("img");return imageElement.onload=function(){if(null!=resizeIf&&resizeIf(imageElement.width,imageElement.height)===!1)return void deferred.reject("resizeIf");try{if(ratio){var ratioFloat=upload.ratioToFloat(ratio),imgRatio=imageElement.width/imageElement.height;imgRatio<ratioFloat?(width=imageElement.width,height=width/ratioFloat):(height=imageElement.height,width=height*ratioFloat)}width||(width=imageElement.width),height||(height=imageElement.height);var dimensions=calculateAspectRatioFit(imageElement.width,imageElement.height,width,height,centerCrop);canvasElement.width=Math.min(dimensions.width,width),canvasElement.height=Math.min(dimensions.height,height);var context=canvasElement.getContext("2d");context.drawImage(imageElement,Math.min(0,-dimensions.marginX/2),Math.min(0,-dimensions.marginY/2),dimensions.width,dimensions.height),deferred.resolve(canvasElement.toDataURL(type||"image/WebP",quality||.934))}catch(e){deferred.reject(e)}},imageElement.onerror=function(){deferred.reject()},imageElement.src=imagen,deferred.promise};return upload.dataUrltoBlob=function(dataurl,name,origSize){for(var arr=dataurl.split(","),mime=arr[0].match(/:(.*?);/)[1],bstr=atob(arr[1]),n=bstr.length,u8arr=new Uint8Array(n);n--;)u8arr[n]=bstr.charCodeAt(n);var blob=new window.Blob([u8arr],{type:mime});return blob.name=name,blob.$ngfOrigSize=origSize,blob},upload.isResizeSupported=function(){var elem=document.createElement("canvas");return window.atob&&elem.getContext&&elem.getContext("2d")&&window.Blob},upload.isResizeSupported()&&Object.defineProperty(window.Blob.prototype,"name",{get:function(){return this.$ngfName},set:function(v){this.$ngfName=v},configurable:!0}),upload.resize=function(file,width,height,quality,type,ratio,centerCrop,resizeIf,restoreExif){if(0!==file.type.indexOf("image"))return upload.emptyPromise(file);var deferred=$q.defer();return upload.dataUrl(file,!0).then(function(url){resize(url,width,height,quality,type||file.type,ratio,centerCrop,resizeIf).then(function(dataUrl){if("image/jpeg"===file.type&&restoreExif)try{dataUrl=upload.restoreExif(url,dataUrl)}catch(e){setTimeout(function(){throw e},1)}try{var blob=upload.dataUrltoBlob(dataUrl,file.name,file.size);deferred.resolve(blob)}catch(e){deferred.reject(e)}},function(r){"resizeIf"===r&&deferred.resolve(file),deferred.reject(r)})},function(e){deferred.reject(e)}),deferred.promise},upload}]),function(){function linkDrop(scope,elem,attr,ngModel,$parse,$timeout,$location,upload,$http,$q){function isDisabled(){return elem.attr("disabled")||attrGetter("ngfDropDisabled",scope)}function updateModel(files,evt){upload.updateModel(ngModel,attr,scope,attrGetter("ngfChange")||attrGetter("ngfDrop"),files,evt)}function extractFilesFromHtml(updateOn,html){if(!upload.shouldUpdateOn(updateOn,attr,scope)||!html)return upload.rejectPromise([]);var urls=[];html.replace(/<(img src|img [^>]* src) *=\"([^\"]*)\"/gi,function(m,n,src){urls.push(src)});var promises=[],files=[];if(urls.length){angular.forEach(urls,function(url){promises.push(upload.urlToBlob(url).then(function(blob){files.push(blob)}))});var defer=$q.defer();return $q.all(promises).then(function(){defer.resolve(files)},function(e){defer.reject(e)}),defer.promise}return upload.emptyPromise()}function calculateDragOverClass(scope,attr,evt,callback){var obj=attrGetter("ngfDragOverClass",scope,{$event:evt}),dClass="dragover";if(angular.isString(obj))dClass=obj;else if(obj&&(obj.delay&&(dragOverDelay=obj.delay),obj.accept||obj.reject)){var items=evt.dataTransfer.items;if(null!=items&&items.length)for(var pattern=obj.pattern||attrGetter("ngfPattern",scope,{$event:evt}),len=items.length;len--;){if(!upload.validatePattern(items[len],pattern)){dClass=obj.reject;break}dClass=obj.accept}else dClass=obj.accept}callback(dClass)}function extractFiles(items,fileList,allowDir,multiple){function traverseFileTree(entry,path){var defer=$q.defer();if(null!=entry)if(entry.isDirectory){var promises=[upload.emptyPromise()];if(includeDir){var file={type:"directory"};file.name=file.path=(path||"")+entry.name+entry.name,files.push(file)}var dirReader=entry.createReader(),entries=[],readEntries=function(){dirReader.readEntries(function(results){try{results.length?(entries=entries.concat(Array.prototype.slice.call(results||[],0)),readEntries()):(angular.forEach(entries.slice(0),function(e){files.length<=maxFiles&&totalSize<=maxTotalSize&&promises.push(traverseFileTree(e,(path?path:"")+entry.name+"/"))}),$q.all(promises).then(function(){defer.resolve()},function(e){defer.reject(e)}))}catch(e){defer.reject(e)}},function(e){defer.reject(e)})};readEntries()}else entry.file(function(file){try{file.path=(path?path:"")+file.name,includeDir&&(file=upload.rename(file,file.path)),files.push(file),totalSize+=file.size,defer.resolve()}catch(e){defer.reject(e)}},function(e){defer.reject(e)});return defer.promise}var maxFiles=upload.getValidationAttr(attr,scope,"maxFiles")||Number.MAX_VALUE,maxTotalSize=upload.getValidationAttr(attr,scope,"maxTotalSize")||Number.MAX_VALUE,includeDir=attrGetter("ngfIncludeDir",scope),files=[],totalSize=0,promises=[upload.emptyPromise()];if(items&&items.length>0&&"file"!==$location.protocol())for(var i=0;i<items.length;i++){if(items[i].webkitGetAsEntry&&items[i].webkitGetAsEntry()&&items[i].webkitGetAsEntry().isDirectory){var entry=items[i].webkitGetAsEntry();if(entry.isDirectory&&!allowDir)continue;null!=entry&&promises.push(traverseFileTree(entry))}else{var f=items[i].getAsFile();null!=f&&(files.push(f),totalSize+=f.size)}if(files.length>maxFiles||totalSize>maxTotalSize||!multiple&&files.length>0)break}else if(null!=fileList)for(var j=0;j<fileList.length;j++){var file=fileList.item(j);if((file.type||file.size>0)&&(files.push(file),totalSize+=file.size),files.length>maxFiles||totalSize>maxTotalSize||!multiple&&files.length>0)break}var defer=$q.defer();return $q.all(promises).then(function(){if(multiple||includeDir||!files.length)defer.resolve(files);else{for(var i=0;files[i]&&"directory"===files[i].type;)i++;defer.resolve([files[i]])}},function(e){defer.reject(e)}),defer.promise}var available=dropAvailable(),attrGetter=function(name,scope,params){return upload.attrGetter(name,attr,scope,params)};if(attrGetter("dropAvailable")&&$timeout(function(){scope[attrGetter("dropAvailable")]?scope[attrGetter("dropAvailable")].value=available:scope[attrGetter("dropAvailable")]=available}),!available)return void(attrGetter("ngfHideOnDropNotAvailable",scope)===!0&&elem.css("display","none"));null==attrGetter("ngfSelect")&&upload.registerModelChangeValidator(ngModel,attr,scope);var actualDragOverClass,leaveTimeout=null,stopPropagation=$parse(attrGetter("ngfStopPropagation")),dragOverDelay=1;elem[0].addEventListener("dragover",function(evt){if(!isDisabled()&&upload.shouldUpdateOn("drop",attr,scope)){if(evt.preventDefault(),stopPropagation(scope)&&evt.stopPropagation(),navigator.userAgent.indexOf("Chrome")>-1){var b=evt.dataTransfer.effectAllowed;evt.dataTransfer.dropEffect="move"===b||"linkMove"===b?"move":"copy"}$timeout.cancel(leaveTimeout),actualDragOverClass||(actualDragOverClass="C",calculateDragOverClass(scope,attr,evt,function(clazz){actualDragOverClass=clazz,elem.addClass(actualDragOverClass),attrGetter("ngfDrag",scope,{$isDragging:!0,$class:actualDragOverClass,$event:evt})}))}},!1),elem[0].addEventListener("dragenter",function(evt){!isDisabled()&&upload.shouldUpdateOn("drop",attr,scope)&&(evt.preventDefault(),stopPropagation(scope)&&evt.stopPropagation())},!1),elem[0].addEventListener("dragleave",function(evt){!isDisabled()&&upload.shouldUpdateOn("drop",attr,scope)&&(evt.preventDefault(),stopPropagation(scope)&&evt.stopPropagation(),leaveTimeout=$timeout(function(){actualDragOverClass&&elem.removeClass(actualDragOverClass),actualDragOverClass=null,attrGetter("ngfDrag",scope,{$isDragging:!1,$event:evt})},dragOverDelay||100))},!1),elem[0].addEventListener("drop",function(evt){if(!isDisabled()&&upload.shouldUpdateOn("drop",attr,scope)){evt.preventDefault(),stopPropagation(scope)&&evt.stopPropagation(),actualDragOverClass&&elem.removeClass(actualDragOverClass),actualDragOverClass=null;var html,items=evt.dataTransfer.items;try{html=evt.dataTransfer&&evt.dataTransfer.getData&&evt.dataTransfer.getData("text/html")}catch(e){}extractFiles(items,evt.dataTransfer.files,attrGetter("ngfAllowDir",scope)!==!1,attrGetter("multiple")||attrGetter("ngfMultiple",scope)).then(function(files){files.length?updateModel(files,evt):extractFilesFromHtml("dropUrl",html).then(function(files){updateModel(files,evt)})})}},!1),elem[0].addEventListener("paste",function(evt){if(navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&attrGetter("ngfEnableFirefoxPaste",scope)&&evt.preventDefault(),!isDisabled()&&upload.shouldUpdateOn("paste",attr,scope)){var files=[],clipboard=evt.clipboardData||evt.originalEvent.clipboardData;if(clipboard&&clipboard.items)for(var k=0;k<clipboard.items.length;k++)clipboard.items[k].type.indexOf("image")!==-1&&files.push(clipboard.items[k].getAsFile());files.length?updateModel(files,evt):extractFilesFromHtml("pasteUrl",clipboard).then(function(files){updateModel(files,evt)})}},!1),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&attrGetter("ngfEnableFirefoxPaste",scope)&&(elem.attr("contenteditable",!0),elem.on("keypress",function(e){e.metaKey||e.ctrlKey||e.preventDefault()}))}function dropAvailable(){var div=document.createElement("div");return"draggable"in div&&"ondrop"in div&&!/Edge\/12./i.test(navigator.userAgent)}ngFileUpload.directive("ngfDrop",["$parse","$timeout","$location","Upload","$http","$q",function($parse,$timeout,$location,Upload,$http,$q){return{restrict:"AEC",require:"?ngModel",link:function(scope,elem,attr,ngModel){linkDrop(scope,elem,attr,ngModel,$parse,$timeout,$location,Upload,$http,$q)}}}]),ngFileUpload.directive("ngfNoFileDrop",function(){return function(scope,elem){dropAvailable()&&elem.css("display","none")}}),ngFileUpload.directive("ngfDropAvailable",["$parse","$timeout","Upload",function($parse,$timeout,Upload){return function(scope,elem,attr){if(dropAvailable()){var model=$parse(Upload.attrGetter("ngfDropAvailable",attr));$timeout(function(){model(scope),model.assign&&model.assign(scope,!0)})}}}])}(),ngFileUpload.service("UploadExif",["UploadResize","$q",function(UploadResize,$q){function applyTransform(ctx,orientation,width,height){switch(orientation){case 2:return ctx.transform(-1,0,0,1,width,0);case 3:return ctx.transform(-1,0,0,-1,width,height);case 4:return ctx.transform(1,0,0,-1,0,height);case 5:return ctx.transform(0,1,1,0,0,0);case 6:return ctx.transform(0,1,-1,0,height,0);case 7:return ctx.transform(0,-1,-1,0,height,width);case 8:return ctx.transform(0,-1,1,0,0,width)}}function arrayBufferToBase64(buffer){for(var binary="",bytes=new Uint8Array(buffer),len=bytes.byteLength,i=0;i<len;i++)binary+=String.fromCharCode(bytes[i]);return window.btoa(binary)}var upload=UploadResize;return upload.isExifSupported=function(){return window.FileReader&&(new FileReader).readAsArrayBuffer&&upload.isResizeSupported()},upload.readOrientation=function(file){var defer=$q.defer(),reader=new FileReader,slicedFile=file.slice?file.slice(0,65536):file;return reader.readAsArrayBuffer(slicedFile),reader.onerror=function(e){return defer.reject(e)},reader.onload=function(e){var result={orientation:1},view=new DataView(this.result);if(65496!==view.getUint16(0,!1))return defer.resolve(result);for(var length=view.byteLength,offset=2;offset<length;){var marker=view.getUint16(offset,!1);if(offset+=2,65505===marker){if(1165519206!==view.getUint32(offset+=2,!1))return defer.resolve(result);var little=18761===view.getUint16(offset+=6,!1);offset+=view.getUint32(offset+4,little);var tags=view.getUint16(offset,little);offset+=2;for(var i=0;i<tags;i++)if(274===view.getUint16(offset+12*i,little)){var orientation=view.getUint16(offset+12*i+8,little);return orientation>=2&&orientation<=8&&(view.setUint16(offset+12*i+8,1,little),result.fixedArrayBuffer=e.target.result),result.orientation=orientation,defer.resolve(result)}}else{if(65280!==(65280&marker))break;offset+=view.getUint16(offset,!1)}}return defer.resolve(result)},defer.promise},upload.applyExifRotation=function(file){if(0!==file.type.indexOf("image/jpeg"))return upload.emptyPromise(file);var deferred=$q.defer();return upload.readOrientation(file).then(function(result){return result.orientation<2||result.orientation>8?deferred.resolve(file):void upload.dataUrl(file,!0).then(function(url){var canvas=document.createElement("canvas"),img=document.createElement("img");img.onload=function(){try{canvas.width=result.orientation>4?img.height:img.width,canvas.height=result.orientation>4?img.width:img.height;var ctx=canvas.getContext("2d");applyTransform(ctx,result.orientation,img.width,img.height),ctx.drawImage(img,0,0);var dataUrl=canvas.toDataURL(file.type||"image/WebP",.934);dataUrl=upload.restoreExif(arrayBufferToBase64(result.fixedArrayBuffer),dataUrl);var blob=upload.dataUrltoBlob(dataUrl,file.name);deferred.resolve(blob)}catch(e){return deferred.reject(e)}},img.onerror=function(){deferred.reject()},img.src=url},function(e){deferred.reject(e)})},function(e){deferred.reject(e)}),deferred.promise},upload.restoreExif=function(orig,resized){var ExifRestorer={};return ExifRestorer.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ExifRestorer.encode64=function(input){var chr1,chr2,enc1,enc2,enc3,output="",chr3="",enc4="",i=0;do chr1=input[i++],chr2=input[i++],chr3=input[i++],enc1=chr1>>2,enc2=(3&chr1)<<4|chr2>>4,enc3=(15&chr2)<<2|chr3>>6,enc4=63&chr3,isNaN(chr2)?enc3=enc4=64:isNaN(chr3)&&(enc4=64),output=output+this.KEY_STR.charAt(enc1)+this.KEY_STR.charAt(enc2)+this.KEY_STR.charAt(enc3)+this.KEY_STR.charAt(enc4),chr1=chr2=chr3="",enc1=enc2=enc3=enc4="";while(i<input.length);return output},ExifRestorer.restore=function(origFileBase64,resizedFileBase64){origFileBase64.match("data:image/jpeg;base64,")&&(origFileBase64=origFileBase64.replace("data:image/jpeg;base64,",""));var rawImage=this.decode64(origFileBase64),segments=this.slice2Segments(rawImage),image=this.exifManipulation(resizedFileBase64,segments);return"data:image/jpeg;base64,"+this.encode64(image)},ExifRestorer.exifManipulation=function(resizedFileBase64,segments){var exifArray=this.getExifArray(segments),newImageArray=this.insertExif(resizedFileBase64,exifArray);return new Uint8Array(newImageArray)},ExifRestorer.getExifArray=function(segments){for(var seg,x=0;x<segments.length;x++)if(seg=segments[x],255===seg[0]&225===seg[1])return seg;return[]},ExifRestorer.insertExif=function(resizedFileBase64,exifArray){var imageData=resizedFileBase64.replace("data:image/jpeg;base64,",""),buf=this.decode64(imageData),separatePoint=buf.indexOf(255,3),mae=buf.slice(0,separatePoint),ato=buf.slice(separatePoint),array=mae;return array=array.concat(exifArray),array=array.concat(ato)},ExifRestorer.slice2Segments=function(rawImageArray){for(var head=0,segments=[];;){if(255===rawImageArray[head]&218===rawImageArray[head+1])break;if(255===rawImageArray[head]&216===rawImageArray[head+1])head+=2;else{var length=256*rawImageArray[head+2]+rawImageArray[head+3],endPoint=head+length+2,seg=rawImageArray.slice(head,endPoint);segments.push(seg),head=endPoint}if(head>rawImageArray.length)break}return segments},ExifRestorer.decode64=function(input){var chr1,chr2,enc1,enc2,enc3,chr3="",enc4="",i=0,buf=[],base64test=/[^A-Za-z0-9\+\/\=]/g;base64test.exec(input)&&console.log("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, NaNExpect errors in decoding."),input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do enc1=this.KEY_STR.indexOf(input.charAt(i++)),enc2=this.KEY_STR.indexOf(input.charAt(i++)),enc3=this.KEY_STR.indexOf(input.charAt(i++)),enc4=this.KEY_STR.indexOf(input.charAt(i++)),chr1=enc1<<2|enc2>>4,chr2=(15&enc2)<<4|enc3>>2,chr3=(3&enc3)<<6|enc4,buf.push(chr1),64!==enc3&&buf.push(chr2),64!==enc4&&buf.push(chr3),chr1=chr2=chr3="",enc1=enc2=enc3=enc4="";while(i<input.length);return buf},ExifRestorer.restore(orig,resized)},upload}]),function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.Raven=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){function RavenConfigError(message){this.name="RavenConfigError",this.message=message}RavenConfigError.prototype=new Error,RavenConfigError.prototype.constructor=RavenConfigError,module.exports=RavenConfigError},{}],2:[function(_dereq_,module,exports){var wrapMethod=function(console,level,callback){var originalConsoleLevel=console[level],originalConsole=console;if(level in console){var sentryLevel="warn"===level?"warning":level;console[level]=function(){var args=[].slice.call(arguments),msg=""+args.join(" "),data={level:sentryLevel,logger:"console",extra:{arguments:args}};callback&&callback(msg,data),originalConsoleLevel&&Function.prototype.apply.call(originalConsoleLevel,originalConsole,args)}}};module.exports={wrapMethod:wrapMethod}},{}],3:[function(_dereq_,module,exports){function now(){return+new Date}function Raven(){this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument="undefined"!=typeof document,this._lastCapturedException=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=window.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=now(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._breadcrumbLimit=20,this._lastCapturedEvent=null,this._keypressTimeout,this._location=window.location,this._lastHref=this._location&&this._location.href;for(var method in this._originalConsole)this._originalConsoleMethods[method]=this._originalConsole[method]}var TraceKit=_dereq_(6),RavenConfigError=_dereq_(1),utils=_dereq_(5),isFunction=utils.isFunction,isUndefined=utils.isUndefined,isError=utils.isError,isEmptyObject=utils.isEmptyObject,hasKey=utils.hasKey,joinRegExp=utils.joinRegExp,each=utils.each,objectMerge=utils.objectMerge,truncate=utils.truncate,urlencode=utils.urlencode,uuid4=utils.uuid4,htmlTreeAsString=utils.htmlTreeAsString,parseUrl=utils.parseUrl,isString=utils.isString,wrapConsoleMethod=_dereq_(2).wrapMethod,dsnKeys="source protocol user pass host port path".split(" "),dsnPattern=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;Raven.prototype={VERSION:"3.2.1",debug:!1,TraceKit:TraceKit,config:function(dsn,options){var self=this;if(this._globalServer)return this._logDebug("error","Error: Raven has already been configured"),this;if(!dsn)return this;options&&each(options,function(key,value){"tags"===key||"extra"===key?self._globalContext[key]=value:self._globalOptions[key]=value});var uri=this._parseDSN(dsn),lastSlash=uri.path.lastIndexOf("/"),path=uri.path.substr(1,lastSlash);return this._dsn=dsn,this._globalOptions.ignoreErrors.push(/^Script error\.?$/),this._globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this._globalOptions.ignoreErrors=joinRegExp(this._globalOptions.ignoreErrors),this._globalOptions.ignoreUrls=!!this._globalOptions.ignoreUrls.length&&joinRegExp(this._globalOptions.ignoreUrls),this._globalOptions.whitelistUrls=!!this._globalOptions.whitelistUrls.length&&joinRegExp(this._globalOptions.whitelistUrls),this._globalOptions.includePaths=joinRegExp(this._globalOptions.includePaths),this._globalKey=uri.user,this._globalSecret=uri.pass&&uri.pass.substr(1),this._globalProject=uri.path.substr(lastSlash+1),this._globalServer=this._getGlobalServer(uri),this._globalEndpoint=this._globalServer+"/"+path+"api/"+this._globalProject+"/store/",TraceKit.collectWindowErrors=!!this._globalOptions.collectWindowErrors,this},install:function(){var self=this;return this.isSetup()&&!this._isRavenInstalled&&(TraceKit.report.subscribe(function(){self._handleOnErrorStackInfo.apply(self,arguments)}),this._wrapBuiltIns(),this._drainPlugins(),this._isRavenInstalled=!0),Error.stackTraceLimit=this._globalOptions.stackTraceLimit,this},context:function(options,func,args){return isFunction(options)&&(args=func||[],func=options,options=void 0),this.wrap(options,func).apply(this,args)},wrap:function(options,func,_before){function wrapped(){var args=[],i=arguments.length,deep=!options||options&&options.deep!==!1;for(_before&&isFunction(_before)&&_before.apply(this,arguments);i--;)args[i]=deep?self.wrap(options,arguments[i]):arguments[i];try{return func.apply(this,args)}catch(e){throw self._ignoreNextOnError(),self.captureException(e,options),e}}var self=this;if(isUndefined(func)&&!isFunction(options))return options;if(isFunction(options)&&(func=options,options=void 0),!isFunction(func))return func;try{if(func.__raven__)return func}catch(e){return func}if(func.__raven_wrapper__)return func.__raven_wrapper__;for(var property in func)hasKey(func,property)&&(wrapped[property]=func[property]);return wrapped.prototype=func.prototype,func.__raven_wrapper__=wrapped,wrapped.__raven__=!0,wrapped.__inner__=func,wrapped},uninstall:function(){return TraceKit.report.uninstall(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(ex,options){if(!isError(ex))return this.captureMessage(ex,options);this._lastCapturedException=ex;try{var stack=TraceKit.computeStackTrace(ex);this._handleStackInfo(stack,options)}catch(ex1){if(ex!==ex1)throw ex1}return this},captureMessage:function(msg,options){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(msg))return this._send(objectMerge({message:msg+""},options)),this},captureBreadcrumb:function(obj){var crumb=objectMerge({timestamp:now()/1e3},obj);this._breadcrumbs.push(crumb),this._breadcrumbs.length>this._breadcrumbLimit&&this._breadcrumbs.shift()},addPlugin:function(plugin){var pluginArgs=Array.prototype.slice.call(arguments,1);return this._plugins.push([plugin,pluginArgs]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(user){return this._globalContext.user=user,this},setExtraContext:function(extra){return this._mergeContext("extra",extra),this},setTagsContext:function(tags){return this._mergeContext("tags",tags),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(JSON.stringify(this._globalContext))},setRelease:function(release){return this._globalOptions.release=release,this},setDataCallback:function(callback){var original=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=isFunction(callback)?function(data){return callback(data,original)}:callback,this},setShouldSendCallback:function(callback){var original=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=isFunction(callback)?function(data){return callback(data,original)}:callback,this},setTransport:function(transport){return this._globalOptions.transport=transport,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var RavenConfig=window.RavenConfig;RavenConfig&&this.config(RavenConfig.dsn,RavenConfig.config).install()},showReportDialog:function(options){if(window.document){options=options||{};var lastEventId=options.eventId||this.lastEventId();if(!lastEventId)throw new RavenConfigError("Missing eventId");var dsn=options.dsn||this._dsn;if(!dsn)throw new RavenConfigError("Missing DSN");var encode=encodeURIComponent,qs="";qs+="?eventId="+encode(lastEventId),qs+="&dsn="+encode(dsn);var user=options.user||this._globalContext.user;user&&(user.name&&(qs+="&name="+encode(user.name)),user.email&&(qs+="&email="+encode(user.email)));var globalServer=this._getGlobalServer(this._parseDSN(dsn)),script=document.createElement("script");script.async=!0,script.src=globalServer+"/api/embed/error-page/"+qs,(document.head||document.body).appendChild(script)}},_ignoreNextOnError:function(){var self=this;this._ignoreOnError+=1,setTimeout(function(){self._ignoreOnError-=1})},_triggerEvent:function(eventType,options){var evt,key;if(this._hasDocument){options=options||{},eventType="raven"+eventType.substr(0,1).toUpperCase()+eventType.substr(1),document.createEvent?(evt=document.createEvent("HTMLEvents"),evt.initEvent(eventType,!0,!0)):(evt=document.createEventObject(),evt.eventType=eventType);for(key in options)hasKey(options,key)&&(evt[key]=options[key]);if(document.createEvent)document.dispatchEvent(evt);else try{document.fireEvent("on"+evt.eventType.toLowerCase(),evt)}catch(e){}}},_breadcrumbEventHandler:function(evtName){var self=this;return function(evt){if(self._keypressTimeout=null,self._lastCapturedEvent!==evt){self._lastCapturedEvent=evt;var target,elem=evt.target;try{target=htmlTreeAsString(elem)}catch(e){target="<unknown>"}self.captureBreadcrumb({category:"ui."+evtName,message:target})}}},_keypressEventHandler:function(){var self=this,debounceDuration=1e3;return function(evt){var target=evt.target,tagName=target&&target.tagName;if(tagName&&("INPUT"===tagName||"TEXTAREA"===tagName)){var timeout=self._keypressTimeout;timeout||self._breadcrumbEventHandler("input")(evt),clearTimeout(timeout),self._keypressTimeout=setTimeout(function(){self._keypressTimeout=null},debounceDuration)}}},_captureUrlChange:function(from,to){var parsedLoc=parseUrl(this._location.href),parsedTo=parseUrl(to),parsedFrom=parseUrl(from);this._lastHref=to,parsedLoc.protocol===parsedTo.protocol&&parsedLoc.host===parsedTo.host&&(to=parsedTo.relative),
parsedLoc.protocol===parsedFrom.protocol&&parsedLoc.host===parsedFrom.host&&(from=parsedFrom.relative),this.captureBreadcrumb({category:"navigation",data:{to:to,from:from}})},_wrapBuiltIns:function(){function fill(obj,name,replacement,noUndo){var orig=obj[name];obj[name]=replacement(orig),noUndo||self._wrappedBuiltIns.push([obj,name,orig])}function wrapTimeFn(orig){return function(fn,t){for(var args=new Array(arguments.length),i=0;i<args.length;++i)args[i]=arguments[i];var originalCallback=args[0];return isFunction(originalCallback)&&(args[0]=self.wrap(originalCallback)),orig.apply?orig.apply(this,args):orig(args[0],args[1])}}function wrapEventTarget(global){var proto=window[global]&&window[global].prototype;proto&&proto.hasOwnProperty&&proto.hasOwnProperty("addEventListener")&&(fill(proto,"addEventListener",function(orig){return function(evtName,fn,capture,secure){try{fn&&fn.handleEvent&&(fn.handleEvent=self.wrap(fn.handleEvent))}catch(err){}var before;return"EventTarget"!==global&&"Node"!==global||("click"===evtName?before=self._breadcrumbEventHandler(evtName):"keypress"===evtName&&(before=self._keypressEventHandler())),orig.call(this,evtName,self.wrap(fn,void 0,before),capture,secure)}}),fill(proto,"removeEventListener",function(orig){return function(evt,fn,capture,secure){return fn=fn&&(fn.__raven_wrapper__?fn.__raven_wrapper__:fn),orig.call(this,evt,fn,capture,secure)}}))}function wrapProp(prop,xhr){prop in xhr&&isFunction(xhr[prop])&&fill(xhr,prop,function(orig){return self.wrap(orig)},!0)}var self=this;fill(window,"setTimeout",wrapTimeFn),fill(window,"setInterval",wrapTimeFn),window.requestAnimationFrame&&fill(window,"requestAnimationFrame",function(orig){return function(cb){return orig(self.wrap(cb))}}),this._hasDocument&&(document.addEventListener?(document.addEventListener("click",self._breadcrumbEventHandler("click"),!1),document.addEventListener("keypress",self._keypressEventHandler(),!1)):(document.attachEvent("onclick",self._breadcrumbEventHandler("click")),document.attachEvent("onkeypress",self._keypressEventHandler())));for(var eventTargets=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],i=0;i<eventTargets.length;i++)wrapEventTarget(eventTargets[i]);if("XMLHttpRequest"in window){var xhrproto=XMLHttpRequest.prototype;fill(xhrproto,"open",function(origOpen){return function(method,url){return isString(url)&&url.indexOf(self._globalKey)===-1&&(this.__raven_xhr={method:method,url:url,status_code:null}),origOpen.apply(this,arguments)}}),fill(xhrproto,"send",function(origSend){return function(data){function onreadystatechangeHandler(){if(xhr.__raven_xhr&&(1===xhr.readyState||4===xhr.readyState)){try{xhr.__raven_xhr.status_code=xhr.status}catch(e){}self.captureBreadcrumb({type:"http",category:"xhr",data:xhr.__raven_xhr})}}for(var xhr=this,props=["onload","onerror","onprogress"],j=0;j<props.length;j++)wrapProp(props[j],xhr);return"onreadystatechange"in xhr&&isFunction(xhr.onreadystatechange)?fill(xhr,"onreadystatechange",function(orig){return self.wrap(orig,void 0,onreadystatechangeHandler)},!0):xhr.onreadystatechange=onreadystatechangeHandler,origSend.apply(this,arguments)}})}var chrome=window.chrome,isChromePackagedApp=chrome&&chrome.app&&chrome.app.runtime,hasPushState=!isChromePackagedApp&&window.history&&history.pushState;if(hasPushState){var oldOnPopState=window.onpopstate;window.onpopstate=function(){var currentHref=self._location.href;if(self._captureUrlChange(self._lastHref,currentHref),oldOnPopState)return oldOnPopState.apply(this,arguments)},fill(history,"pushState",function(origPushState){return function(){var url=arguments.length>2?arguments[2]:void 0;return url&&self._captureUrlChange(self._lastHref,url+""),origPushState.apply(this,arguments)}})}var consoleMethodCallback=function(msg,data){self.captureBreadcrumb({message:msg,level:data.level,category:"console"})};"console"in window&&console.log&&each(["debug","info","warn","error","log"],function(_,level){wrapConsoleMethod(console,level,consoleMethodCallback)});var $=window.jQuery||window.$;$&&$.fn&&$.fn.ready&&fill($.fn,"ready",function(orig){return function(fn){return orig.call(this,self.wrap(fn))}})},_restoreBuiltIns:function(){for(var builtin;this._wrappedBuiltIns.length;){builtin=this._wrappedBuiltIns.shift();var obj=builtin[0],name=builtin[1],orig=builtin[2];obj[name]=orig}},_drainPlugins:function(){var self=this;each(this._plugins,function(_,plugin){var installer=plugin[0],args=plugin[1];installer.apply(self,[self].concat(args))})},_parseDSN:function(str){var m=dsnPattern.exec(str),dsn={},i=7;try{for(;i--;)dsn[dsnKeys[i]]=m[i]||""}catch(e){throw new RavenConfigError("Invalid DSN: "+str)}if(dsn.pass&&!this._globalOptions.allowSecretKey)throw new RavenConfigError("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return dsn},_getGlobalServer:function(uri){var globalServer="//"+uri.host+(uri.port?":"+uri.port:"");return uri.protocol&&(globalServer=uri.protocol+":"+globalServer),globalServer},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(stackInfo,options){var self=this,frames=[];stackInfo.stack&&stackInfo.stack.length&&each(stackInfo.stack,function(i,stack){var frame=self._normalizeFrame(stack);frame&&frames.push(frame)}),this._triggerEvent("handle",{stackInfo:stackInfo,options:options}),this._processException(stackInfo.name,stackInfo.message,stackInfo.url,stackInfo.lineno,frames.slice(0,this._globalOptions.stackTraceLimit),options)},_normalizeFrame:function(frame){if(frame.url){var normalized={filename:frame.url,lineno:frame.line,colno:frame.column,"function":frame.func||"?"};return normalized.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(normalized.filename)||/(Raven|TraceKit)\./.test(normalized["function"])||/raven\.(min\.)?js$/.test(normalized.filename)),normalized}},_processException:function(type,message,fileurl,lineno,frames,options){var stacktrace;if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(message))&&(message+="",frames&&frames.length?(fileurl=frames[0].filename||fileurl,frames.reverse(),stacktrace={frames:frames}):fileurl&&(stacktrace={frames:[{filename:fileurl,lineno:lineno,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(fileurl))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(fileurl)))){var data=objectMerge({exception:{values:[{type:type,value:message,stacktrace:stacktrace}]},culprit:fileurl},options);this._send(data)}},_trimPacket:function(data){var max=this._globalOptions.maxMessageLength;if(data.message&&(data.message=truncate(data.message,max)),data.exception){var exception=data.exception.values[0];exception.value=truncate(exception.value,max)}return data},_getHttpData:function(){if(this._hasDocument&&document.location&&document.location.href){var httpData={headers:{"User-Agent":navigator.userAgent}};return httpData.url=document.location.href,document.referrer&&(httpData.headers.Referer=document.referrer),httpData}},_send:function(data){var self=this,globalOptions=this._globalOptions,baseData={project:this._globalProject,logger:globalOptions.logger,platform:"javascript"},httpData=this._getHttpData();if(httpData&&(baseData.request=httpData),data=objectMerge(baseData,data),data.tags=objectMerge(objectMerge({},this._globalContext.tags),data.tags),data.extra=objectMerge(objectMerge({},this._globalContext.extra),data.extra),data.extra["session:duration"]=now()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(data.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),isEmptyObject(data.tags)&&delete data.tags,this._globalContext.user&&(data.user=this._globalContext.user),globalOptions.release&&(data.release=globalOptions.release),globalOptions.serverName&&(data.server_name=globalOptions.serverName),isFunction(globalOptions.dataCallback)&&(data=globalOptions.dataCallback(data)||data),data&&!isEmptyObject(data)&&(!isFunction(globalOptions.shouldSendCallback)||globalOptions.shouldSendCallback(data))&&(this._lastEventId=data.event_id||(data.event_id=uuid4()),data=this._trimPacket(data),this._logDebug("debug","Raven about to send:",data),this.isSetup())){var auth={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(auth.sentry_secret=this._globalSecret);var exception=data.exception&&data.exception.values[0];this.captureBreadcrumb({category:"sentry",message:exception?(exception.type?exception.type+": ":"")+exception.message:data.message,event_id:data.event_id,level:data.level||"error"});var url=this._globalEndpoint;(globalOptions.transport||this._makeRequest).call(this,{url:url,auth:auth,data:data,options:globalOptions,onSuccess:function(){self._triggerEvent("success",{data:data,src:url})},onError:function(){self._triggerEvent("failure",{data:data,src:url})}})}},_makeRequest:function(opts){function handler(){200===request.status?opts.onSuccess&&opts.onSuccess():opts.onError&&opts.onError()}var request=new XMLHttpRequest,hasCORS="withCredentials"in request||"undefined"!=typeof XDomainRequest;if(hasCORS){var url=opts.url;"withCredentials"in request?request.onreadystatechange=function(){4===request.readyState&&handler()}:(request=new XDomainRequest,url=url.replace(/^https?:/,""),request.onload=handler),request.open("POST",url+"?"+urlencode(opts.auth)),request.send(JSON.stringify(opts.data))}},_logDebug:function(level){this._originalConsoleMethods[level]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[level],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(key,context){isUndefined(context)?delete this._globalContext[key]:this._globalContext[key]=objectMerge(this._globalContext[key]||{},context)}},Raven.prototype.setUser=Raven.prototype.setUserContext,Raven.prototype.setReleaseContext=Raven.prototype.setRelease,module.exports=Raven},{1:1,2:2,5:5,6:6}],4:[function(_dereq_,module,exports){var RavenConstructor=_dereq_(3),_Raven=window.Raven,Raven=new RavenConstructor;Raven.noConflict=function(){return window.Raven=_Raven,Raven},Raven.afterLoad(),module.exports=Raven},{3:3}],5:[function(_dereq_,module,exports){function isUndefined(what){return void 0===what}function isFunction(what){return"function"==typeof what}function isString(what){return"[object String]"===objectPrototype.toString.call(what)}function isObject(what){return"object"==typeof what&&null!==what}function isEmptyObject(what){for(var _ in what)return!1;return!0}function isError(what){var toString=objectPrototype.toString.call(what);return isObject(what)&&"[object Error]"===toString||"[object Exception]"===toString||what instanceof Error}function each(obj,callback){var i,j;if(isUndefined(obj.length))for(i in obj)hasKey(obj,i)&&callback.call(null,i,obj[i]);else if(j=obj.length)for(i=0;i<j;i++)callback.call(null,i,obj[i])}function objectMerge(obj1,obj2){return obj2?(each(obj2,function(key,value){obj1[key]=value}),obj1):obj1}function truncate(str,max){return!max||str.length<=max?str:str.substr(0,max)+"…"}function hasKey(object,key){return objectPrototype.hasOwnProperty.call(object,key)}function joinRegExp(patterns){for(var pattern,sources=[],i=0,len=patterns.length;i<len;i++)pattern=patterns[i],isString(pattern)?sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):pattern&&pattern.source&&sources.push(pattern.source);return new RegExp(sources.join("|"),"i")}function urlencode(o){var pairs=[];return each(o,function(key,value){pairs.push(encodeURIComponent(key)+"="+encodeURIComponent(value))}),pairs.join("&")}function parseUrl(url){var match=url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!match)return{};var query=match[6]||"",fragment=match[8]||"";return{protocol:match[2],host:match[4],path:match[5],relative:match[5]+query+fragment}}function uuid4(){var crypto=window.crypto||window.msCrypto;if(!isUndefined(crypto)&&crypto.getRandomValues){var arr=new Uint16Array(8);crypto.getRandomValues(arr),arr[3]=4095&arr[3]|16384,arr[4]=16383&arr[4]|32768;var pad=function(num){for(var v=num.toString(16);v.length<4;)v="0"+v;return v};return pad(arr[0])+pad(arr[1])+pad(arr[2])+pad(arr[3])+pad(arr[4])+pad(arr[5])+pad(arr[6])+pad(arr[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=16*Math.random()|0,v="x"===c?r:3&r|8;return v.toString(16)})}function htmlTreeAsString(elem){for(var nextStr,MAX_TRAVERSE_HEIGHT=5,MAX_OUTPUT_LEN=80,out=[],height=0,len=0,separator=" > ",sepLength=separator.length;elem&&height++<MAX_TRAVERSE_HEIGHT&&(nextStr=htmlElementAsString(elem),!("html"===nextStr||height>1&&len+out.length*sepLength+nextStr.length>=MAX_OUTPUT_LEN));)out.push(nextStr),len+=nextStr.length,elem=elem.parentNode;return out.reverse().join(separator)}function htmlElementAsString(elem){var className,classes,key,attr,i,out=[];if(!elem||!elem.tagName)return"";if(out.push(elem.tagName.toLowerCase()),elem.id&&out.push("#"+elem.id),className=elem.className,className&&isString(className))for(classes=className.split(" "),i=0;i<classes.length;i++)out.push("."+classes[i]);var attrWhitelist=["type","name","title","alt"];for(i=0;i<attrWhitelist.length;i++)key=attrWhitelist[i],attr=elem.getAttribute(key),attr&&out.push("["+key+'="'+attr+'"]');return out.join("")}var objectPrototype=Object.prototype;module.exports={isUndefined:isUndefined,isFunction:isFunction,isString:isString,isObject:isObject,isEmptyObject:isEmptyObject,isError:isError,each:each,objectMerge:objectMerge,truncate:truncate,hasKey:hasKey,joinRegExp:joinRegExp,urlencode:urlencode,uuid4:uuid4,htmlTreeAsString:htmlTreeAsString,htmlElementAsString:htmlElementAsString,parseUrl:parseUrl}},{}],6:[function(_dereq_,module,exports){function getLocationHref(){return"undefined"==typeof document?"":document.location.href}var utils=_dereq_(5),hasKey=utils.hasKey,isString=utils.isString,isUndefined=utils.isUndefined,TraceKit={collectWindowErrors:!0,debug:!1},_slice=[].slice,UNKNOWN_FUNCTION="?",ERROR_TYPES_RE=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;TraceKit.report=function(){function subscribe(handler){installGlobalHandler(),handlers.push(handler)}function unsubscribe(handler){for(var i=handlers.length-1;i>=0;--i)handlers[i]===handler&&handlers.splice(i,1)}function unsubscribeAll(){uninstallGlobalHandler(),handlers=[]}function notifyHandlers(stack,isWindowError){var exception=null;if(!isWindowError||TraceKit.collectWindowErrors){for(var i in handlers)if(hasKey(handlers,i))try{handlers[i].apply(null,[stack].concat(_slice.call(arguments,2)))}catch(inner){exception=inner}if(exception)throw exception}}function traceKitWindowOnError(message,url,lineNo,colNo,ex){var stack=null;if(lastExceptionStack)TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack,url,lineNo,message),processLastException();else if(ex)stack=TraceKit.computeStackTrace(ex),notifyHandlers(stack,!0);else{var groups,location={url:url,line:lineNo,column:colNo},name=void 0,msg=message;if(isString(message)){var groups=message.match(ERROR_TYPES_RE);groups&&(name=groups[1],msg=groups[2])}location.func=UNKNOWN_FUNCTION,stack={name:name,message:msg,url:getLocationHref(),stack:[location]},notifyHandlers(stack,!0)}return!!_oldOnerrorHandler&&_oldOnerrorHandler.apply(this,arguments)}function installGlobalHandler(){_onErrorHandlerInstalled||(_oldOnerrorHandler=window.onerror,window.onerror=traceKitWindowOnError,_onErrorHandlerInstalled=!0)}function uninstallGlobalHandler(){_onErrorHandlerInstalled&&(window.onerror=_oldOnerrorHandler,_onErrorHandlerInstalled=!1,_oldOnerrorHandler=void 0)}function processLastException(){var _lastExceptionStack=lastExceptionStack,_lastArgs=lastArgs;lastArgs=null,lastExceptionStack=null,lastException=null,notifyHandlers.apply(null,[_lastExceptionStack,!1].concat(_lastArgs))}function report(ex,rethrow){var args=_slice.call(arguments,1);if(lastExceptionStack){if(lastException===ex)return;processLastException()}var stack=TraceKit.computeStackTrace(ex);if(lastExceptionStack=stack,lastException=ex,lastArgs=args,window.setTimeout(function(){lastException===ex&&processLastException()},stack.incomplete?2e3:0),rethrow!==!1)throw ex}var _oldOnerrorHandler,_onErrorHandlerInstalled,handlers=[],lastArgs=null,lastException=null,lastExceptionStack=null;return report.subscribe=subscribe,report.unsubscribe=unsubscribe,report.uninstall=unsubscribeAll,report}(),TraceKit.computeStackTrace=function(){function computeStackTraceFromStackProp(ex){if(!isUndefined(ex.stack)&&ex.stack){for(var parts,element,chrome=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gecko=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,winjs=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,lines=ex.stack.split("\n"),stack=[],i=(/^(.*) is undefined$/.exec(ex.message),0),j=lines.length;i<j;++i){if(parts=chrome.exec(lines[i])){var isNative=parts[2]&&parts[2].indexOf("native")!==-1;element={url:isNative?null:parts[2],func:parts[1]||UNKNOWN_FUNCTION,args:isNative?[parts[2]]:[],line:parts[3]?+parts[3]:null,column:parts[4]?+parts[4]:null}}else if(parts=winjs.exec(lines[i]))element={url:parts[2],func:parts[1]||UNKNOWN_FUNCTION,args:[],line:+parts[3],column:parts[4]?+parts[4]:null};else{if(!(parts=gecko.exec(lines[i])))continue;element={url:parts[3],func:parts[1]||UNKNOWN_FUNCTION,args:parts[2]?parts[2].split(","):[],line:parts[4]?+parts[4]:null,column:parts[5]?+parts[5]:null}}!element.func&&element.line&&(element.func=UNKNOWN_FUNCTION),stack.push(element)}return stack.length?(stack[0].column||isUndefined(ex.columnNumber)||(stack[0].column=ex.columnNumber+1),{name:ex.name,message:ex.message,url:getLocationHref(),stack:stack}):null}}function computeStackTraceFromStacktraceProp(ex){var stacktrace=ex.stacktrace;if(!isUndefined(ex.stacktrace)&&ex.stacktrace){for(var parts,opera10Regex=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,opera11Regex=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,lines=stacktrace.split("\n"),stack=[],line=0;line<lines.length;line+=2){var element=null;(parts=opera10Regex.exec(lines[line]))?element={url:parts[2],line:+parts[1],column:null,func:parts[3],args:[]}:(parts=opera11Regex.exec(lines[line]))&&(element={url:parts[6],line:+parts[1],column:+parts[2],func:parts[3]||parts[4],args:parts[5]?parts[5].split(","):[]}),element&&(!element.func&&element.line&&(element.func=UNKNOWN_FUNCTION),stack.push(element))}return stack.length?{name:ex.name,message:ex.message,url:getLocationHref(),stack:stack}:null}}function computeStackTraceFromOperaMultiLineMessage(ex){var lines=ex.message.split("\n");if(lines.length<4)return null;for(var parts,lineRE1=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,lineRE2=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,lineRE3=/^\s*Line (\d+) of function script\s*$/i,stack=[],line=(document.getElementsByTagName("script"),2);line<lines.length;line+=2){var item=null;if(parts=lineRE1.exec(lines[line]))item={url:parts[2],func:parts[3],args:[],line:+parts[1],column:null};else if(parts=lineRE2.exec(lines[line])){item={url:parts[3],func:parts[4],args:[],line:+parts[1],column:null};+parts[1]}else if(parts=lineRE3.exec(lines[line])){var url=window.location.href.replace(/#.*$/,"");item={url:url,func:"",args:[],line:parts[1],column:null}}item&&(item.func||(item.func=UNKNOWN_FUNCTION),stack.push(item))}return stack.length?{name:ex.name,message:lines[0],url:getLocationHref(),stack:stack}:null}function augmentStackTraceWithInitialElement(stackInfo,url,lineNo,message){var initial={url:url,line:lineNo};if(initial.url&&initial.line){if(stackInfo.incomplete=!1,initial.func||(initial.func=UNKNOWN_FUNCTION),stackInfo.stack.length>0&&stackInfo.stack[0].url===initial.url){if(stackInfo.stack[0].line===initial.line)return!1;if(!stackInfo.stack[0].line&&stackInfo.stack[0].func===initial.func)return stackInfo.stack[0].line=initial.line,!1}return stackInfo.stack.unshift(initial),stackInfo.partial=!0,!0}return stackInfo.incomplete=!0,!1}function computeStackTraceByWalkingCallerChain(ex,depth){for(var parts,item,functionName=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,stack=[],funcs={},recursion=!1,curr=computeStackTraceByWalkingCallerChain.caller;curr&&!recursion;curr=curr.caller)if(curr!==computeStackTrace&&curr!==TraceKit.report){if(item={url:null,func:UNKNOWN_FUNCTION,line:null,column:null},curr.name?item.func=curr.name:(parts=functionName.exec(curr.toString()))&&(item.func=parts[1]),"undefined"==typeof item.func)try{item.func=parts.input.substring(0,parts.input.indexOf("{"))}catch(e){}funcs[""+curr]?recursion=!0:funcs[""+curr]=!0,stack.push(item)}depth&&stack.splice(0,depth);var result={name:ex.name,message:ex.message,url:getLocationHref(),stack:stack};return augmentStackTraceWithInitialElement(result,ex.sourceURL||ex.fileName,ex.line||ex.lineNumber,ex.message||ex.description),result}function computeStackTrace(ex,depth){var stack=null;depth=null==depth?0:+depth;try{if(stack=computeStackTraceFromStacktraceProp(ex))return stack}catch(e){if(TraceKit.debug)throw e}try{if(stack=computeStackTraceFromStackProp(ex))return stack}catch(e){if(TraceKit.debug)throw e}try{if(stack=computeStackTraceFromOperaMultiLineMessage(ex))return stack}catch(e){if(TraceKit.debug)throw e}try{if(stack=computeStackTraceByWalkingCallerChain(ex,depth+1))return stack}catch(e){if(TraceKit.debug)throw e}return{name:ex.name,message:ex.message,url:getLocationHref()}}return computeStackTrace.augmentStackTraceWithInitialElement=augmentStackTraceWithInitialElement,computeStackTrace.computeStackTraceFromStackProp=computeStackTraceFromStackProp,computeStackTrace}(),module.exports=TraceKit},{5:5}]},{},[4])(4)}),function(global,angular,undefined){function $RavenProvider(){this.development=function(config){return _development=config||_development,this},this.$get=["$window","$log",function($window,$log){var service={VERSION:$window.Raven?$window.Raven.VERSION:"development",TraceKit:$window.Raven?$window.Raven.TraceKit:"development",captureException:function(exception,cause){_development?$log.error("Raven: Exception ",exception,cause):$window.Raven.captureException(exception,cause)},captureMessage:function(message,data){_development?$log.error("Raven: Message ",message,data):$window.Raven.captureMessage(message,data)},setUser:function(user){_development?$log.info("Raven: User ",user):$window.Raven.setUser?$window.Raven.setUser(user):$window.Raven.setUserContext&&$window.Raven.setUserContext(user)},setUserContext:function(user){_development?$log.info("Raven: User ",user):$window.Raven.setUserContext?$window.Raven.setUserContext(user):$window.Raven.setUser&&$window.Raven.setUser(user)},lastException:function(){_development?$log.error("Raven: Last Exception"):$window.Raven.lastException()},context:function(options,func,args){var RavenService=this;return angular.isFunction(options)&&(args=func||[],func=options,options=undefined),RavenService.wrap(options,func).apply(RavenService,args)},wrap:function(options,func){function wrapped(){for(var args=[],i=arguments.length;i--;)args[i]=RavenService.wrap(options,arguments[i]);try{return func.apply(this,args)}catch(e){RavenService.captureException(e,options)}}var RavenService=this;if(angular.isUndefined(func)&&!angular.isFunction(options))return options;if(angular.isFunction(options)&&(func=options,options=undefined),!angular.isFunction(func))return func;if(func.__raven__)return func;for(var property in func)func.hasOwnProperty(property)&&(wrapped[property]=func[property]);return wrapped.__raven__=!0,wrapped}};return service}]}function $ExceptionHandlerDecorator($delegate,Raven){function $ExceptionHandler(exception,cause){exception instanceof Error?Raven.captureException(exception,cause):Raven.captureMessage(exception,{exception:exception,cause:cause}),$delegate(exception,cause)}return $ExceptionHandler}var _development=null;angular.module("ngRaven",[]).provider("$raven",$RavenProvider).provider("Raven",$RavenProvider).config(["$provide",function($provide){$provide.decorator("$exceptionHandler",["$delegate","$raven",$ExceptionHandlerDecorator])}]),angular.module("angular-raven",["ngRaven"])}(this,angular),function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){function visible(element){for(var visibility=element.css("visibility");"inherit"===visibility;)element=element.parent(),visibility=element.css("visibility");return"hidden"!==visibility}function datepicker_getZindex(elem){for(var position,value;elem.length&&elem[0]!==document;){if(position=elem.css("position"),("absolute"===position||"relative"===position||"fixed"===position)&&(value=parseInt(elem.css("zIndex"),10),!isNaN(value)&&0!==value))return value;elem=elem.parent()}return 0}function Datepicker(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.regional.en=$.extend(!0,{},this.regional[""]),this.regional["en-US"]=$.extend(!0,{},this.regional.en),this.dpDiv=datepicker_bindHover($("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function datepicker_bindHover(dpDiv){var selector="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return dpDiv.on("mouseout",selector,function(){$(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&$(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&$(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",selector,datepicker_handleMouseover)}function datepicker_handleMouseover(){$.datepicker._isDisabledDatepicker(datepicker_instActive.inline?datepicker_instActive.dpDiv.parent()[0]:datepicker_instActive.input[0])||($(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),$(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&$(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&$(this).addClass("ui-datepicker-next-hover"))}function datepicker_extendRemove(target,props){$.extend(target,props);for(var name in props)null==props[name]&&(target[name]=props[name]);return target}function spinnerModifer(fn){return function(){var previous=this.element.val();fn.apply(this,arguments),this._refresh(),previous!==this.element.val()&&this._trigger("change")}}$.ui=$.ui||{};var widgetUuid=($.ui.version="1.12.0",0),widgetSlice=Array.prototype.slice;$.cleanData=function(orig){return function(elems){var events,elem,i;for(i=0;null!=(elem=elems[i]);i++)try{events=$._data(elem,"events"),events&&events.remove&&$(elem).triggerHandler("remove")}catch(e){}orig(elems)}}($.cleanData),$.widget=function(name,base,prototype){var existingConstructor,constructor,basePrototype,proxiedPrototype={},namespace=name.split(".")[0];name=name.split(".")[1];var fullName=namespace+"-"+name;return prototype||(prototype=base,base=$.Widget),$.isArray(prototype)&&(prototype=$.extend.apply(null,[{}].concat(prototype))),$.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName)},$[namespace]=$[namespace]||{},existingConstructor=$[namespace][name],constructor=$[namespace][name]=function(options,element){return this._createWidget?void(arguments.length&&this._createWidget(options,element)):new constructor(options,element)},$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]}),basePrototype=new base,basePrototype.options=$.widget.extend({},basePrototype.options),$.each(prototype,function(prop,value){return $.isFunction(value)?void(proxiedPrototype[prop]=function(){function _super(){return base.prototype[prop].apply(this,arguments)}function _superApply(args){return base.prototype[prop].apply(this,args)}return function(){var returnValue,__super=this._super,__superApply=this._superApply;return this._super=_super,this._superApply=_superApply,returnValue=value.apply(this,arguments),this._super=__super,this._superApply=__superApply,returnValue}}()):void(proxiedPrototype[prop]=value)}),constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?basePrototype.widgetEventPrefix||name:name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName}),existingConstructor?($.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto)}),delete existingConstructor._childConstructors):base._childConstructors.push(constructor),$.widget.bridge(name,constructor),constructor},$.widget.extend=function(target){for(var key,value,input=widgetSlice.call(arguments,1),inputIndex=0,inputLength=input.length;inputIndex<inputLength;inputIndex++)for(key in input[inputIndex])value=input[inputIndex][key],input[inputIndex].hasOwnProperty(key)&&void 0!==value&&($.isPlainObject(value)?target[key]=$.isPlainObject(target[key])?$.widget.extend({},target[key],value):$.widget.extend({},value):target[key]=value);return target},$.widget.bridge=function(name,object){var fullName=object.prototype.widgetFullName||name;$.fn[name]=function(options){var isMethodCall="string"==typeof options,args=widgetSlice.call(arguments,1),returnValue=this;return isMethodCall?this.each(function(){var methodValue,instance=$.data(this,fullName);return"instance"===options?(returnValue=instance,!1):instance?$.isFunction(instance[options])&&"_"!==options.charAt(0)?(methodValue=instance[options].apply(instance,args),
methodValue!==instance&&void 0!==methodValue?(returnValue=methodValue&&methodValue.jquery?returnValue.pushStack(methodValue.get()):methodValue,!1):void 0):$.error("no such method '"+options+"' for "+name+" widget instance"):$.error("cannot call methods on "+name+" prior to initialization; attempted to call method '"+options+"'")}):(args.length&&(options=$.widget.extend.apply(null,[options].concat(args))),this.each(function(){var instance=$.data(this,fullName);instance?(instance.option(options||{}),instance._init&&instance._init()):$.data(this,fullName,new object(options,this))})),returnValue}},$.Widget=function(){},$.Widget._childConstructors=[],$.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0],this.element=$(element),this.uuid=widgetUuid++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=$(),this.hoverable=$(),this.focusable=$(),this.classesElementLookup={},element!==this&&($.data(element,this.widgetFullName,this),this._on(!0,this.element,{remove:function(event){event.target===element&&this.destroy()}}),this.document=$(element.style?element.ownerDocument:element.document||element),this.window=$(this.document[0].defaultView||this.document[0].parentWindow)),this.options=$.widget.extend({},this.options,this._getCreateOptions(),options),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){var that=this;this._destroy(),$.each(this.classesElementLookup,function(key,value){that._removeClass(value,key)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:$.noop,widget:function(){return this.element},option:function(key,value){var parts,curOption,i,options=key;if(0===arguments.length)return $.widget.extend({},this.options);if("string"==typeof key)if(options={},parts=key.split("."),key=parts.shift(),parts.length){for(curOption=options[key]=$.widget.extend({},this.options[key]),i=0;i<parts.length-1;i++)curOption[parts[i]]=curOption[parts[i]]||{},curOption=curOption[parts[i]];if(key=parts.pop(),1===arguments.length)return void 0===curOption[key]?null:curOption[key];curOption[key]=value}else{if(1===arguments.length)return void 0===this.options[key]?null:this.options[key];options[key]=value}return this._setOptions(options),this},_setOptions:function(options){var key;for(key in options)this._setOption(key,options[key]);return this},_setOption:function(key,value){return"classes"===key&&this._setOptionClasses(value),this.options[key]=value,"disabled"===key&&this._setOptionDisabled(value),this},_setOptionClasses:function(value){var classKey,elements,currentElements;for(classKey in value)currentElements=this.classesElementLookup[classKey],value[classKey]!==this.options.classes[classKey]&&currentElements&&currentElements.length&&(elements=$(currentElements.get()),this._removeClass(currentElements,classKey),elements.addClass(this._classes({element:elements,keys:classKey,classes:value,add:!0})))},_setOptionDisabled:function(value){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!value),value&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(options){function processClassString(classes,checkOption){var current,i;for(i=0;i<classes.length;i++)current=that.classesElementLookup[classes[i]]||$(),current=$(options.add?$.unique(current.get().concat(options.element.get())):current.not(options.element).get()),that.classesElementLookup[classes[i]]=current,full.push(classes[i]),checkOption&&options.classes[classes[i]]&&full.push(options.classes[classes[i]])}var full=[],that=this;return options=$.extend({element:this.element,classes:this.options.classes||{}},options),options.keys&&processClassString(options.keys.match(/\S+/g)||[],!0),options.extra&&processClassString(options.extra.match(/\S+/g)||[]),full.join(" ")},_removeClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,!1)},_addClass:function(element,keys,extra){return this._toggleClass(element,keys,extra,!0)},_toggleClass:function(element,keys,extra,add){add="boolean"==typeof add?add:extra;var shift="string"==typeof element||null===element,options={extra:shift?keys:extra,keys:shift?element:keys,element:shift?this.element:element,add:add};return options.element.toggleClass(this._classes(options),add),this},_on:function(suppressDisabledCheck,element,handlers){var delegateElement,instance=this;"boolean"!=typeof suppressDisabledCheck&&(handlers=element,element=suppressDisabledCheck,suppressDisabledCheck=!1),handlers?(element=delegateElement=$(element),this.bindings=this.bindings.add(element)):(handlers=element,element=this.element,delegateElement=this.widget()),$.each(handlers,function(event,handler){function handlerProxy(){if(suppressDisabledCheck||instance.options.disabled!==!0&&!$(this).hasClass("ui-state-disabled"))return("string"==typeof handler?instance[handler]:handler).apply(instance,arguments)}"string"!=typeof handler&&(handlerProxy.guid=handler.guid=handler.guid||handlerProxy.guid||$.guid++);var match=event.match(/^([\w:-]*)\s*(.*)$/),eventName=match[1]+instance.eventNamespace,selector=match[2];selector?delegateElement.on(eventName,selector,handlerProxy):element.on(eventName,handlerProxy)})},_off:function(element,eventName){eventName=(eventName||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,element.off(eventName).off(eventName),this.bindings=$(this.bindings.not(element).get()),this.focusable=$(this.focusable.not(element).get()),this.hoverable=$(this.hoverable.not(element).get())},_delay:function(handler,delay){function handlerProxy(){return("string"==typeof handler?instance[handler]:handler).apply(instance,arguments)}var instance=this;return setTimeout(handlerProxy,delay||0)},_hoverable:function(element){this.hoverable=this.hoverable.add(element),this._on(element,{mouseenter:function(event){this._addClass($(event.currentTarget),null,"ui-state-hover")},mouseleave:function(event){this._removeClass($(event.currentTarget),null,"ui-state-hover")}})},_focusable:function(element){this.focusable=this.focusable.add(element),this._on(element,{focusin:function(event){this._addClass($(event.currentTarget),null,"ui-state-focus")},focusout:function(event){this._removeClass($(event.currentTarget),null,"ui-state-focus")}})},_trigger:function(type,event,data){var prop,orig,callback=this.options[type];if(data=data||{},event=$.Event(event),event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase(),event.target=this.element[0],orig=event.originalEvent)for(prop in orig)prop in event||(event[prop]=orig[prop]);return this.element.trigger(event,data),!($.isFunction(callback)&&callback.apply(this.element[0],[event].concat(data))===!1||event.isDefaultPrevented())}},$.each({show:"fadeIn",hide:"fadeOut"},function(method,defaultEffect){$.Widget.prototype["_"+method]=function(element,options,callback){"string"==typeof options&&(options={effect:options});var hasOptions,effectName=options?options===!0||"number"==typeof options?defaultEffect:options.effect||defaultEffect:method;options=options||{},"number"==typeof options&&(options={duration:options}),hasOptions=!$.isEmptyObject(options),options.complete=callback,options.delay&&element.delay(options.delay),hasOptions&&$.effects&&$.effects.effect[effectName]?element[method](options):effectName!==method&&element[effectName]?element[effectName](options.duration,options.easing,callback):element.queue(function(next){$(this)[method](),callback&&callback.call(element[0]),next()})}});$.widget;!function(){function getOffsets(offsets,width,height){return[parseFloat(offsets[0])*(rpercent.test(offsets[0])?width/100:1),parseFloat(offsets[1])*(rpercent.test(offsets[1])?height/100:1)]}function parseCss(element,property){return parseInt($.css(element,property),10)||0}function getDimensions(elem){var raw=elem[0];return 9===raw.nodeType?{width:elem.width(),height:elem.height(),offset:{top:0,left:0}}:$.isWindow(raw)?{width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}}:raw.preventDefault?{width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}}:{width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()}}var cachedScrollbarWidth,supportsOffsetFractions,max=Math.max,abs=Math.abs,round=Math.round,rhorizontal=/left|center|right/,rvertical=/top|center|bottom/,roffset=/[\+\-]\d+(\.[\d]+)?%?/,rposition=/^\w+/,rpercent=/%$/,_position=$.fn.position;supportsOffsetFractions=function(){var element=$("<div>").css("position","absolute").appendTo("body").offset({top:1.5,left:1.5}),support=1.5===element.offset().top;return element.remove(),supportsOffsetFractions=function(){return support},support},$.position={scrollbarWidth:function(){if(void 0!==cachedScrollbarWidth)return cachedScrollbarWidth;var w1,w2,div=$("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),innerDiv=div.children()[0];return $("body").append(div),w1=innerDiv.offsetWidth,div.css("overflow","scroll"),w2=innerDiv.offsetWidth,w1===w2&&(w2=div[0].clientWidth),div.remove(),cachedScrollbarWidth=w1-w2},getScrollInfo:function(within){var overflowX=within.isWindow||within.isDocument?"":within.element.css("overflow-x"),overflowY=within.isWindow||within.isDocument?"":within.element.css("overflow-y"),hasOverflowX="scroll"===overflowX||"auto"===overflowX&&within.width<within.element[0].scrollWidth,hasOverflowY="scroll"===overflowY||"auto"===overflowY&&within.height<within.element[0].scrollHeight;return{width:hasOverflowY?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0}},getWithinInfo:function(element){var withinElement=$(element||window),isWindow=$.isWindow(withinElement[0]),isDocument=!!withinElement[0]&&9===withinElement[0].nodeType,hasOffset=!isWindow&&!isDocument;return{element:withinElement,isWindow:isWindow,isDocument:isDocument,offset:hasOffset?$(element).offset():{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()}}},$.fn.position=function(options){if(!options||!options.of)return _position.apply(this,arguments);options=$.extend({},options);var atOffset,targetWidth,targetHeight,targetOffset,basePosition,dimensions,target=$(options.of),within=$.position.getWithinInfo(options.within),scrollInfo=$.position.getScrollInfo(within),collision=(options.collision||"flip").split(" "),offsets={};return dimensions=getDimensions(target),target[0].preventDefault&&(options.at="left top"),targetWidth=dimensions.width,targetHeight=dimensions.height,targetOffset=dimensions.offset,basePosition=$.extend({},targetOffset),$.each(["my","at"],function(){var horizontalOffset,verticalOffset,pos=(options[this]||"").split(" ");1===pos.length&&(pos=rhorizontal.test(pos[0])?pos.concat(["center"]):rvertical.test(pos[0])?["center"].concat(pos):["center","center"]),pos[0]=rhorizontal.test(pos[0])?pos[0]:"center",pos[1]=rvertical.test(pos[1])?pos[1]:"center",horizontalOffset=roffset.exec(pos[0]),verticalOffset=roffset.exec(pos[1]),offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0],options[this]=[rposition.exec(pos[0])[0],rposition.exec(pos[1])[0]]}),1===collision.length&&(collision[1]=collision[0]),"right"===options.at[0]?basePosition.left+=targetWidth:"center"===options.at[0]&&(basePosition.left+=targetWidth/2),"bottom"===options.at[1]?basePosition.top+=targetHeight:"center"===options.at[1]&&(basePosition.top+=targetHeight/2),atOffset=getOffsets(offsets.at,targetWidth,targetHeight),basePosition.left+=atOffset[0],basePosition.top+=atOffset[1],this.each(function(){var collisionPosition,using,elem=$(this),elemWidth=elem.outerWidth(),elemHeight=elem.outerHeight(),marginLeft=parseCss(this,"marginLeft"),marginTop=parseCss(this,"marginTop"),collisionWidth=elemWidth+marginLeft+parseCss(this,"marginRight")+scrollInfo.width,collisionHeight=elemHeight+marginTop+parseCss(this,"marginBottom")+scrollInfo.height,position=$.extend({},basePosition),myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());"right"===options.my[0]?position.left-=elemWidth:"center"===options.my[0]&&(position.left-=elemWidth/2),"bottom"===options.my[1]?position.top-=elemHeight:"center"===options.my[1]&&(position.top-=elemHeight/2),position.left+=myOffset[0],position.top+=myOffset[1],supportsOffsetFractions()||(position.left=round(position.left),position.top=round(position.top)),collisionPosition={marginLeft:marginLeft,marginTop:marginTop},$.each(["left","top"],function(i,dir){$.ui.position[collision[i]]&&$.ui.position[collision[i]][dir](position,{targetWidth:targetWidth,targetHeight:targetHeight,elemWidth:elemWidth,elemHeight:elemHeight,collisionPosition:collisionPosition,collisionWidth:collisionWidth,collisionHeight:collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within:within,elem:elem})}),options.using&&(using=function(props){var left=targetOffset.left-position.left,right=left+targetWidth-elemWidth,top=targetOffset.top-position.top,bottom=top+targetHeight-elemHeight,feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?"left":left>0?"right":"center",vertical:bottom<0?"top":top>0?"bottom":"middle"};targetWidth<elemWidth&&abs(left+right)<targetWidth&&(feedback.horizontal="center"),targetHeight<elemHeight&&abs(top+bottom)<targetHeight&&(feedback.vertical="middle"),max(abs(left),abs(right))>max(abs(top),abs(bottom))?feedback.important="horizontal":feedback.important="vertical",options.using.call(this,props,feedback)}),elem.offset($.extend(position,{using:using}))})},$.ui.position={fit:{left:function(position,data){var newOverRight,within=data.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset;data.collisionWidth>outerWidth?overLeft>0&&overRight<=0?(newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset,position.left+=overLeft-newOverRight):overRight>0&&overLeft<=0?position.left=withinOffset:overLeft>overRight?position.left=withinOffset+outerWidth-data.collisionWidth:position.left=withinOffset:overLeft>0?position.left+=overLeft:overRight>0?position.left-=overRight:position.left=max(position.left-collisionPosLeft,position.left)},top:function(position,data){var newOverBottom,within=data.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;data.collisionHeight>outerHeight?overTop>0&&overBottom<=0?(newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset,position.top+=overTop-newOverBottom):overBottom>0&&overTop<=0?position.top=withinOffset:overTop>overBottom?position.top=withinOffset+outerHeight-data.collisionHeight:position.top=withinOffset:overTop>0?position.top+=overTop:overBottom>0?position.top-=overBottom:position.top=max(position.top-collisionPosTop,position.top)}},flip:{left:function(position,data){var newOverRight,newOverLeft,within=data.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,myOffset="left"===data.my[0]?-data.elemWidth:"right"===data.my[0]?data.elemWidth:0,atOffset="left"===data.at[0]?data.targetWidth:"right"===data.at[0]?-data.targetWidth:0,offset=-2*data.offset[0];overLeft<0?(newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset,(newOverRight<0||newOverRight<abs(overLeft))&&(position.left+=myOffset+atOffset+offset)):overRight>0&&(newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft,(newOverLeft>0||abs(newOverLeft)<overRight)&&(position.left+=myOffset+atOffset+offset))},top:function(position,data){var newOverTop,newOverBottom,within=data.within,withinOffset=within.offset.top+within.scrollTop,outerHeight=within.height,offsetTop=within.isWindow?within.scrollTop:within.offset.top,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=collisionPosTop-offsetTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop,top="top"===data.my[1],myOffset=top?-data.elemHeight:"bottom"===data.my[1]?data.elemHeight:0,atOffset="top"===data.at[1]?data.targetHeight:"bottom"===data.at[1]?-data.targetHeight:0,offset=-2*data.offset[1];overTop<0?(newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-withinOffset,(newOverBottom<0||newOverBottom<abs(overTop))&&(position.top+=myOffset+atOffset+offset)):overBottom>0&&(newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop,(newOverTop>0||abs(newOverTop)<overBottom)&&(position.top+=myOffset+atOffset+offset))}},flipfit:{left:function(){$.ui.position.flip.left.apply(this,arguments),$.ui.position.fit.left.apply(this,arguments)},top:function(){$.ui.position.flip.top.apply(this,arguments),$.ui.position.fit.top.apply(this,arguments)}}}}();var dataSpace=($.ui.position,$.extend($.expr[":"],{data:$.expr.createPseudo?$.expr.createPseudo(function(dataName){return function(elem){return!!$.data(elem,dataName)}}):function(elem,i,match){return!!$.data(elem,match[3])}}),$.fn.extend({disableSelection:function(){var eventType="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(eventType+".ui-disableSelection",function(event){event.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),"ui-effects-"),dataSpaceStyle="ui-effects-style",dataSpaceAnimated="ui-effects-animated",jQuery=$;$.effects={effect:{}},function(jQuery,undefined){function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};return null==value?allowEmpty||!prop.def?null:prop.def:(value=type.floor?~~value:parseFloat(value),isNaN(value)?prop.def:type.mod?(value+type.mod)%type.mod:0>value?0:type.max<value?type.max:value)}function stringParse(string){var inst=color(),rgba=inst._rgba=[];return string=string.toLowerCase(),each(stringParsers,function(i,parser){var parsed,match=parser.re.exec(string),values=match&&parser.parse(match),spaceName=parser.space||"rgba";if(values)return parsed=inst[spaceName](values),inst[spaces[spaceName].cache]=parsed[spaces[spaceName].cache],rgba=inst._rgba=parsed._rgba,!1}),rgba.length?("0,0,0,0"===rgba.join()&&jQuery.extend(rgba,colors.transparent),inst):colors[string]}function hue2rgb(p,q,h){return h=(h+1)%1,6*h<1?p+(q-p)*h*6:2*h<1?q:3*h<2?p+(q-p)*(2/3-h)*6:p}var colors,stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",rplusequals=/^([\-+])=\s*(\d+\.?\d*)/,stringParsers=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[2.55*execResult[1],2.55*execResult[2],2.55*execResult[3],execResult[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(execResult){return[execResult[1],execResult[2]/100,execResult[3]/100,execResult[4]]}}],color=jQuery.Color=function(color,green,blue,alpha){return new jQuery.Color.fn.parse(color,green,blue,alpha)},spaces={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"}}}},propTypes={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},support=color.support={},supportElem=jQuery("<p>")[0],each=jQuery.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)",support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1,each(spaces,function(spaceName,space){space.cache="_"+spaceName,space.props.alpha={idx:3,type:"percent",def:1}}),color.fn=jQuery.extend(color.prototype,{parse:function(red,green,blue,alpha){if(red===undefined)return this._rgba=[null,null,null,null],this;(red.jquery||red.nodeType)&&(red=jQuery(red).css(green),green=undefined);var inst=this,type=jQuery.type(red),rgba=this._rgba=[];return green!==undefined&&(red=[red,green,blue,alpha],type="array"),"string"===type?this.parse(stringParse(red)||colors._default):"array"===type?(each(spaces.rgba.props,function(key,prop){rgba[prop.idx]=clamp(red[prop.idx],prop)}),this):"object"===type?(red instanceof color?each(spaces,function(spaceName,space){red[space.cache]&&(inst[space.cache]=red[space.cache].slice())}):each(spaces,function(spaceName,space){var cache=space.cache;each(space.props,function(key,prop){if(!inst[cache]&&space.to){if("alpha"===key||null==red[key])return;inst[cache]=space.to(inst._rgba)}inst[cache][prop.idx]=clamp(red[key],prop,!0)}),inst[cache]&&jQuery.inArray(null,inst[cache].slice(0,3))<0&&(inst[cache][3]=1,space.from&&(inst._rgba=space.from(inst[cache])))}),this):void 0},is:function(compare){var is=color(compare),same=!0,inst=this;return each(spaces,function(_,space){var localCache,isCache=is[space.cache];return isCache&&(localCache=inst[space.cache]||space.to&&space.to(inst._rgba)||[],each(space.props,function(_,prop){if(null!=isCache[prop.idx])return same=isCache[prop.idx]===localCache[prop.idx]})),same}),same},_space:function(){var used=[],inst=this;return each(spaces,function(spaceName,space){inst[space.cache]&&used.push(spaceName)}),used.pop()},transition:function(other,distance){var end=color(other),spaceName=end._space(),space=spaces[spaceName],startColor=0===this.alpha()?color("transparent"):this,start=startColor[space.cache]||space.to(startColor._rgba),result=start.slice();return end=end[space.cache],each(space.props,function(key,prop){var index=prop.idx,startValue=start[index],endValue=end[index],type=propTypes[prop.type]||{};null!==endValue&&(null===startValue?result[index]=endValue:(type.mod&&(endValue-startValue>type.mod/2?startValue+=type.mod:startValue-endValue>type.mod/2&&(startValue-=type.mod)),result[index]=clamp((endValue-startValue)*distance+startValue,prop)))}),this[spaceName](result)},blend:function(opaque){if(1===this._rgba[3])return this;var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v}))},toRgbaString:function(){var prefix="rgba(",rgba=jQuery.map(this._rgba,function(v,i){return null==v?i>2?1:0:v});return 1===rgba[3]&&(rgba.pop(),prefix="rgb("),prefix+rgba.join()+")"},toHslaString:function(){var prefix="hsla(",hsla=jQuery.map(this.hsla(),function(v,i){return null==v&&(v=i>2?1:0),i&&i<3&&(v=Math.round(100*v)+"%"),v});return 1===hsla[3]&&(hsla.pop(),prefix="hsl("),prefix+hsla.join()+")"},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();return includeAlpha&&rgba.push(~~(255*alpha)),"#"+jQuery.map(rgba,function(v){return v=(v||0).toString(16),1===v.length?"0"+v:v}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),color.fn.parse.prototype=color.fn,spaces.hsla.to=function(rgba){if(null==rgba[0]||null==rgba[1]||null==rgba[2])return[null,null,null,rgba[3]];var h,s,r=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r,g,b),min=Math.min(r,g,b),diff=max-min,add=max+min,l=.5*add;return h=min===max?0:r===max?60*(g-b)/diff+360:g===max?60*(b-r)/diff+120:60*(r-g)/diff+240,s=0===diff?0:l<=.5?diff/add:diff/(2-add),[Math.round(h)%360,s,l,null==a?1:a]},spaces.hsla.from=function(hsla){if(null==hsla[0]||null==hsla[1]||null==hsla[2])return[null,null,null,hsla[3]];var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=l<=.5?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(255*hue2rgb(p,q,h+1/3)),Math.round(255*hue2rgb(p,q,h)),Math.round(255*hue2rgb(p,q,h-1/3)),a]},each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]&&(this[cache]=to(this._rgba)),value===undefined)return this[cache].slice();var ret,type=jQuery.type(value),arr="array"===type||"object"===type?value:arguments,local=this[cache].slice();return each(props,function(key,prop){var val=arr["object"===type?key:prop.idx];null==val&&(val=local[prop.idx]),local[prop.idx]=clamp(val,prop)}),from?(ret=color(from(local)),ret[cache]=local,ret):color(local)},each(props,function(key,prop){color.fn[key]||(color.fn[key]=function(value){var match,vtype=jQuery.type(value),fn="alpha"===key?this._hsla?"hsla":"rgba":spaceName,local=this[fn](),cur=local[prop.idx];return"undefined"===vtype?cur:("function"===vtype&&(value=value.call(this,cur),vtype=jQuery.type(value)),null==value&&prop.empty?this:("string"===vtype&&(match=rplusequals.exec(value),match&&(value=cur+parseFloat(match[2])*("+"===match[1]?1:-1))),local[prop.idx]=value,this[fn](local)))})})}),color.hook=function(hook){var hooks=hook.split(" ");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor="";if("transparent"!==value&&("string"!==jQuery.type(value)||(parsed=stringParse(value)))){if(value=color(parsed||value),!support.rgba&&1!==value._rgba[3]){for(curElem="backgroundColor"===hook?elem.parentNode:elem;(""===backgroundColor||"transparent"===backgroundColor)&&curElem&&curElem.style;)try{backgroundColor=jQuery.css(curElem,"backgroundColor"),curElem=curElem.parentNode}catch(e){}value=value.blend(backgroundColor&&"transparent"!==backgroundColor?backgroundColor:"_default")}value=value.toRgbaString()}try{elem.style[hook]=value}catch(e){}}},jQuery.fx.step[hook]=function(fx){fx.colorInit||(fx.start=color(fx.elem,hook),fx.end=color(fx.end),fx.colorInit=!0),jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos))}})},color.hook(stepHooks),jQuery.cssHooks.borderColor={expand:function(value){var expanded={};return each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value}),expanded}},colors=jQuery.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"}}(jQuery),function(){function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]])for(len=style.length;len--;)key=style[len],"string"==typeof style[key]&&(styles[$.camelCase(key)]=style[key]);else for(key in style)"string"==typeof style[key]&&(styles[key]=style[key]);return styles}function styleDifference(oldStyle,newStyle){var name,value,diff={};for(name in newStyle)value=newStyle[name],oldStyle[name]!==value&&(shorthandStyles[name]||!$.fx.step[name]&&isNaN(parseFloat(value))||(diff[name]=value));return diff}var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){("none"!==fx.end&&!fx.setAttr||1===fx.pos&&!fx.setAttr)&&(jQuery.style(fx.elem,prop,fx.end),fx.setAttr=!0)}}),$.fn.addBack||($.fn.addBack=function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}),$.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var applyClassChange,animated=$(this),baseClass=animated.attr("class")||"",allAnimations=o.children?animated.find("*").addBack():animated;allAnimations=allAnimations.map(function(){var el=$(this);return{el:el,start:getElementStyles(this)}}),applyClassChange=function(){$.each(classAnimationActions,function(i,action){value[action]&&animated[action+"Class"](value[action])})},applyClassChange(),allAnimations=allAnimations.map(function(){return this.end=getElementStyles(this.el[0]),this.diff=styleDifference(this.start,this.end),this}),animated.attr("class",baseClass),allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:!1,complete:function(){dfd.resolve(styleInfo)}});return this.el.animate(this.diff,opts),dfd.promise()}),$.when.apply($,allAnimations.get()).done(function(){applyClassChange(),$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"")})}),o.complete.call(animated[0])})})},$.fn.extend({addClass:function(orig){return function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments)}}($.fn.addClass),removeClass:function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments)}}($.fn.removeClass),toggleClass:function(orig){return function(classNames,force,speed,easing,callback){return"boolean"==typeof force||void 0===force?speed?$.effects.animateClass.call(this,force?{add:classNames}:{remove:classNames},speed,easing,callback):orig.apply(this,arguments):$.effects.animateClass.call(this,{toggle:classNames},force,speed,easing)}}($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback)}})}(),function(){function _normalizeArguments(effect,options,speed,callback){return $.isPlainObject(effect)&&(options=effect,effect=effect.effect),effect={effect:effect},null==options&&(options={}),$.isFunction(options)&&(callback=options,speed=null,options={}),("number"==typeof options||$.fx.speeds[options])&&(callback=speed,speed=options,options={}),$.isFunction(speed)&&(callback=speed,speed=null),options&&$.extend(effect,options),speed=speed||options.duration,effect.duration=$.fx.off?0:"number"==typeof speed?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default,effect.complete=callback||options.complete,effect}function standardAnimationOption(option){return!(option&&"number"!=typeof option&&!$.fx.speeds[option])||("string"==typeof option&&!$.effects.effect[option]||(!!$.isFunction(option)||"object"==typeof option&&!option.effect));
}function parseClip(str,element){var outerWidth=element.outerWidth(),outerHeight=element.outerHeight(),clipRegex=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,values=clipRegex.exec(str)||["",0,outerWidth,outerHeight,0];return{top:parseFloat(values[1])||0,right:"auto"===values[2]?outerWidth:parseFloat(values[2]),bottom:"auto"===values[3]?outerHeight:parseFloat(values[3]),left:parseFloat(values[4])||0}}$.expr&&$.expr.filters&&$.expr.filters.animated&&($.expr.filters.animated=function(orig){return function(elem){return!!$(elem).data(dataSpaceAnimated)||orig(elem)}}($.expr.filters.animated)),$.uiBackCompat!==!1&&$.extend($.effects,{save:function(element,set){for(var i=0,length=set.length;i<length;i++)null!==set[i]&&element.data(dataSpace+set[i],element[0].style[set[i]])},restore:function(element,set){for(var val,i=0,length=set.length;i<length;i++)null!==set[i]&&(val=element.data(dataSpace+set[i]),element.css(set[i],val))},setMode:function(el,mode){return"toggle"===mode&&(mode=el.is(":hidden")?"show":"hide"),mode},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper"))return element.parent();var props={width:element.outerWidth(!0),height:element.outerHeight(!0),"float":element.css("float")},wrapper=$("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id}catch(e){active=document.body}return element.wrap(wrapper),(element[0]===active||$.contains(element[0],active))&&$(active).trigger("focus"),wrapper=element.parent(),"static"===element.css("position")?(wrapper.css({position:"relative"}),element.css({position:"relative"})):($.extend(props,{position:element.css("position"),zIndex:element.css("z-index")}),$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos),isNaN(parseInt(props[pos],10))&&(props[pos]="auto")}),element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),element.css(size),wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;return element.parent().is(".ui-effects-wrapper")&&(element.parent().replaceWith(element),(element[0]===active||$.contains(element[0],active))&&$(active).trigger("focus")),element}}),$.extend($.effects,{version:"1.12.0",define:function(name,mode,effect){return effect||(effect=mode,mode="effect"),$.effects.effect[name]=effect,$.effects.effect[name].mode=mode,effect},scaledDimensions:function(element,percent,direction){if(0===percent)return{height:0,width:0,outerHeight:0,outerWidth:0};var x="horizontal"!==direction?(percent||100)/100:1,y="vertical"!==direction?(percent||100)/100:1;return{height:element.height()*y,width:element.width()*x,outerHeight:element.outerHeight()*y,outerWidth:element.outerWidth()*x}},clipToBox:function(animation){return{width:animation.clip.right-animation.clip.left,height:animation.clip.bottom-animation.clip.top,left:animation.clip.left,top:animation.clip.top}},unshift:function(element,queueLength,count){var queue=element.queue();queueLength>1&&queue.splice.apply(queue,[1,0].concat(queue.splice(queueLength,count))),element.dequeue()},saveStyle:function(element){element.data(dataSpaceStyle,element[0].style.cssText)},restoreStyle:function(element){element[0].style.cssText=element.data(dataSpaceStyle)||"",element.removeData(dataSpaceStyle)},mode:function(element,mode){var hidden=element.is(":hidden");return"toggle"===mode&&(mode=hidden?"show":"hide"),(hidden?"hide"===mode:"show"===mode)&&(mode="none"),mode},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case"left":x=0;break;case"center":x=.5;break;case"right":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createPlaceholder:function(element){var placeholder,cssPosition=element.css("position"),position=element.position();return element.css({marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()),/^(static|relative)/.test(cssPosition)&&(cssPosition="absolute",placeholder=$("<"+element[0].nodeName+">").insertAfter(element).css({display:/^(inline|ruby)/.test(element.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight"),"float":element.css("float")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()).addClass("ui-effects-placeholder"),element.data(dataSpace+"placeholder",placeholder)),element.css({position:cssPosition,left:position.left,top:position.top}),placeholder},removePlaceholder:function(element){var dataKey=dataSpace+"placeholder",placeholder=element.data(dataKey);placeholder&&(placeholder.remove(),element.removeData(dataKey))},cleanUp:function(element){$.effects.restoreStyle(element),$.effects.removePlaceholder(element)},setTransition:function(element,list,factor,value){return value=value||{},$.each(list,function(i,x){var unit=element.cssUnit(x);unit[0]>0&&(value[x]=unit[0]*factor+unit[1])}),value}}),$.fn.extend({effect:function(){function run(next){function cleanup(){elem.removeData(dataSpaceAnimated),$.effects.cleanUp(elem),"hide"===args.mode&&elem.hide(),done()}function done(){$.isFunction(complete)&&complete.call(elem[0]),$.isFunction(next)&&next()}var elem=$(this);args.mode=modes.shift(),$.uiBackCompat===!1||defaultMode?"none"===args.mode?(elem[mode](),done()):effectMethod.call(elem[0],args,cleanup):(elem.is(":hidden")?"hide"===mode:"show"===mode)?(elem[mode](),done()):effectMethod.call(elem[0],args,done)}var args=_normalizeArguments.apply(this,arguments),effectMethod=$.effects.effect[args.effect],defaultMode=effectMethod.mode,queue=args.queue,queueName=queue||"fx",complete=args.complete,mode=args.mode,modes=[],prefilter=function(next){var el=$(this),normalizedMode=$.effects.mode(el,mode)||defaultMode;el.data(dataSpaceAnimated,!0),modes.push(normalizedMode),defaultMode&&("show"===normalizedMode||normalizedMode===defaultMode&&"hide"===normalizedMode)&&el.show(),defaultMode&&"none"===normalizedMode||$.effects.saveStyle(el),$.isFunction(next)&&next()};return $.fx.off||!effectMethod?mode?this[mode](args.duration,complete):this.each(function(){complete&&complete.call(this)}):queue===!1?this.each(prefilter).each(run):this.queue(queueName,prefilter).queue(queueName,run)},show:function(orig){return function(option){if(standardAnimationOption(option))return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="show",this.effect.call(this,args)}}($.fn.show),hide:function(orig){return function(option){if(standardAnimationOption(option))return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="hide",this.effect.call(this,args)}}($.fn.hide),toggle:function(orig){return function(option){if(standardAnimationOption(option)||"boolean"==typeof option)return orig.apply(this,arguments);var args=_normalizeArguments.apply(this,arguments);return args.mode="toggle",this.effect.call(this,args)}}($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];return $.each(["em","px","%","pt"],function(i,unit){style.indexOf(unit)>0&&(val=[parseFloat(style),unit])}),val},cssClip:function(clipObj){return clipObj?this.css("clip","rect("+clipObj.top+"px "+clipObj.right+"px "+clipObj.bottom+"px "+clipObj.left+"px)"):parseClip(this.css("clip"),this)},transfer:function(options,done){var element=$(this),target=$(options.to),targetFixed="fixed"===target.css("position"),body=$("body"),fixTop=targetFixed?body.scrollTop():0,fixLeft=targetFixed?body.scrollLeft():0,endPosition=target.offset(),animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()},startPosition=element.offset(),transfer=$("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(options.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:element.innerHeight(),width:element.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,options.duration,options.easing,function(){transfer.remove(),$.isFunction(done)&&done()})}}),$.fx.step.clip=function(fx){fx.clipInit||(fx.start=$(fx.elem).cssClip(),"string"==typeof fx.end&&(fx.end=parseClip(fx.end,fx.elem)),fx.clipInit=!0),$(fx.elem).cssClip({top:fx.pos*(fx.end.top-fx.start.top)+fx.start.top,right:fx.pos*(fx.end.right-fx.start.right)+fx.start.right,bottom:fx.pos*(fx.end.bottom-fx.start.bottom)+fx.start.bottom,left:fx.pos*(fx.end.left-fx.start.left)+fx.start.left})}}(),function(){var baseEasings={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2)}}),$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2)},Circ:function(p){return 1-Math.sqrt(1-p*p)},Elastic:function(p){return 0===p||1===p?p:-Math.pow(2,8*(p-1))*Math.sin((80*(p-1)-7.5)*Math.PI/15)},Back:function(p){return p*p*(3*p-2)},Bounce:function(p){for(var pow2,bounce=4;p<((pow2=Math.pow(2,--bounce))-1)/11;);return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((3*pow2-2)/22-p,2)}}),$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn,$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p)},$.easing["easeInOut"+name]=function(p){return p<.5?easeIn(2*p)/2:1-easeIn(p*-2+2)/2}})}();var effect,effect=$.effects;$.effects.define("blind","hide",function(options,done){var map={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},element=$(this),direction=options.direction||"up",start=element.cssClip(),animate={clip:$.extend({},start)},placeholder=$.effects.createPlaceholder(element);animate.clip[map[direction][0]]=animate.clip[map[direction][1]],"show"===options.mode&&(element.cssClip(animate.clip),placeholder&&placeholder.css($.effects.clipToBox(animate)),animate.clip=start),placeholder&&placeholder.animate($.effects.clipToBox(animate),options.duration,options.easing),element.animate(animate,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("bounce",function(options,done){var upAnim,downAnim,refValue,element=$(this),mode=options.mode,hide="hide"===mode,show="show"===mode,direction=options.direction||"up",distance=options.distance,times=options.times||5,anims=2*times+(show||hide?1:0),speed=options.duration/anims,easing=options.easing,ref="up"===direction||"down"===direction?"top":"left",motion="up"===direction||"left"===direction,i=0,queuelen=element.queue().length;for($.effects.createPlaceholder(element),refValue=element.css(ref),distance||(distance=element["top"===ref?"outerHeight":"outerWidth"]()/3),show&&(downAnim={opacity:1},downAnim[ref]=refValue,element.css("opacity",0).css(ref,motion?2*-distance:2*distance).animate(downAnim,speed,easing)),hide&&(distance/=Math.pow(2,times-1)),downAnim={},downAnim[ref]=refValue;i<times;i++)upAnim={},upAnim[ref]=(motion?"-=":"+=")+distance,element.animate(upAnim,speed,easing).animate(downAnim,speed,easing),distance=hide?2*distance:distance/2;hide&&(upAnim={opacity:0},upAnim[ref]=(motion?"-=":"+=")+distance,element.animate(upAnim,speed,easing)),element.queue(done),$.effects.unshift(element,queuelen,anims+1)}),$.effects.define("clip","hide",function(options,done){var start,animate={},element=$(this),direction=options.direction||"vertical",both="both"===direction,horizontal=both||"horizontal"===direction,vertical=both||"vertical"===direction;start=element.cssClip(),animate.clip={top:vertical?(start.bottom-start.top)/2:start.top,right:horizontal?(start.right-start.left)/2:start.right,bottom:vertical?(start.bottom-start.top)/2:start.bottom,left:horizontal?(start.right-start.left)/2:start.left},$.effects.createPlaceholder(element),"show"===options.mode&&(element.cssClip(animate.clip),animate.clip=start),element.animate(animate,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("drop","hide",function(options,done){var distance,element=$(this),mode=options.mode,show="show"===mode,direction=options.direction||"left",ref="up"===direction||"down"===direction?"top":"left",motion="up"===direction||"left"===direction?"-=":"+=",oppositeMotion="+="===motion?"-=":"+=",animation={opacity:0};$.effects.createPlaceholder(element),distance=options.distance||element["top"===ref?"outerHeight":"outerWidth"](!0)/2,animation[ref]=motion+distance,show&&(element.css(animation),animation[ref]=oppositeMotion+distance,animation.opacity=1),element.animate(animation,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("explode","hide",function(options,done){function childComplete(){pieces.push(this),pieces.length===rows*cells&&animComplete()}function animComplete(){element.css({visibility:"visible"}),$(pieces).remove(),done()}var i,j,left,top,mx,my,rows=options.pieces?Math.round(Math.sqrt(options.pieces)):3,cells=rows,element=$(this),mode=options.mode,show="show"===mode,offset=element.show().css("visibility","hidden").offset(),width=Math.ceil(element.outerWidth()/cells),height=Math.ceil(element.outerHeight()/rows),pieces=[];for(i=0;i<rows;i++)for(top=offset.top+i*height,my=i-(rows-1)/2,j=0;j<cells;j++)left=offset.left+j*width,mx=j-(cells-1)/2,element.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*width,top:-i*height}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width,height:height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},options.duration||500,options.easing,childComplete)}),$.effects.define("fade","toggle",function(options,done){var show="show"===options.mode;$(this).css("opacity",show?0:1).animate({opacity:show?1:0},{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("fold","hide",function(options,done){var element=$(this),mode=options.mode,show="show"===mode,hide="hide"===mode,size=options.size||15,percent=/([0-9]+)%/.exec(size),horizFirst=!!options.horizFirst,ref=horizFirst?["right","bottom"]:["bottom","right"],duration=options.duration/2,placeholder=$.effects.createPlaceholder(element),start=element.cssClip(),animation1={clip:$.extend({},start)},animation2={clip:$.extend({},start)},distance=[start[ref[0]],start[ref[1]]],queuelen=element.queue().length;percent&&(size=parseInt(percent[1],10)/100*distance[hide?0:1]),animation1.clip[ref[0]]=size,animation2.clip[ref[0]]=size,animation2.clip[ref[1]]=0,show&&(element.cssClip(animation2.clip),placeholder&&placeholder.css($.effects.clipToBox(animation2)),animation2.clip=start),element.queue(function(next){placeholder&&placeholder.animate($.effects.clipToBox(animation1),duration,options.easing).animate($.effects.clipToBox(animation2),duration,options.easing),next()}).animate(animation1,duration,options.easing).animate(animation2,duration,options.easing).queue(done),$.effects.unshift(element,queuelen,4)}),$.effects.define("highlight","show",function(options,done){var element=$(this),animation={backgroundColor:element.css("backgroundColor")};"hide"===options.mode&&(animation.opacity=0),$.effects.saveStyle(element),element.css({backgroundImage:"none",backgroundColor:options.color||"#ffff99"}).animate(animation,{queue:!1,duration:options.duration,easing:options.easing,complete:done})}),$.effects.define("size",function(options,done){var baseline,factor,temp,element=$(this),cProps=["fontSize"],vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],mode=options.mode,restore="effect"!==mode,scale=options.scale||"both",origin=options.origin||["middle","center"],position=element.css("position"),pos=element.position(),original=$.effects.scaledDimensions(element),from=options.from||original,to=options.to||$.effects.scaledDimensions(element,0);$.effects.createPlaceholder(element),"show"===mode&&(temp=from,from=to,to=temp),factor={from:{y:from.height/original.height,x:from.width/original.width},to:{y:to.height/original.height,x:to.width/original.width}},"box"!==scale&&"both"!==scale||(factor.from.y!==factor.to.y&&(from=$.effects.setTransition(element,vProps,factor.from.y,from),to=$.effects.setTransition(element,vProps,factor.to.y,to)),factor.from.x!==factor.to.x&&(from=$.effects.setTransition(element,hProps,factor.from.x,from),to=$.effects.setTransition(element,hProps,factor.to.x,to))),"content"!==scale&&"both"!==scale||factor.from.y!==factor.to.y&&(from=$.effects.setTransition(element,cProps,factor.from.y,from),to=$.effects.setTransition(element,cProps,factor.to.y,to)),origin&&(baseline=$.effects.getBaseline(origin,original),from.top=(original.outerHeight-from.outerHeight)*baseline.y+pos.top,from.left=(original.outerWidth-from.outerWidth)*baseline.x+pos.left,to.top=(original.outerHeight-to.outerHeight)*baseline.y+pos.top,to.left=(original.outerWidth-to.outerWidth)*baseline.x+pos.left),element.css(from),"content"!==scale&&"both"!==scale||(vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps),hProps=hProps.concat(["marginLeft","marginRight"]),element.find("*[width]").each(function(){var child=$(this),childOriginal=$.effects.scaledDimensions(child),childFrom={height:childOriginal.height*factor.from.y,width:childOriginal.width*factor.from.x,outerHeight:childOriginal.outerHeight*factor.from.y,outerWidth:childOriginal.outerWidth*factor.from.x},childTo={height:childOriginal.height*factor.to.y,width:childOriginal.width*factor.to.x,outerHeight:childOriginal.height*factor.to.y,outerWidth:childOriginal.width*factor.to.x};factor.from.y!==factor.to.y&&(childFrom=$.effects.setTransition(child,vProps,factor.from.y,childFrom),childTo=$.effects.setTransition(child,vProps,factor.to.y,childTo)),factor.from.x!==factor.to.x&&(childFrom=$.effects.setTransition(child,hProps,factor.from.x,childFrom),childTo=$.effects.setTransition(child,hProps,factor.to.x,childTo)),restore&&$.effects.saveStyle(child),child.css(childFrom),child.animate(childTo,options.duration,options.easing,function(){restore&&$.effects.restoreStyle(child)})})),element.animate(to,{queue:!1,duration:options.duration,easing:options.easing,complete:function(){var offset=element.offset();0===to.opacity&&element.css("opacity",from.opacity),restore||(element.css("position","static"===position?"relative":position).offset(offset),$.effects.saveStyle(element)),done()}})}),$.effects.define("scale",function(options,done){var el=$(this),mode=options.mode,percent=parseInt(options.percent,10)||(0===parseInt(options.percent,10)?0:"effect"!==mode?0:100),newOptions=$.extend(!0,{from:$.effects.scaledDimensions(el),to:$.effects.scaledDimensions(el,percent,options.direction||"both"),origin:options.origin||["middle","center"]},options);options.fade&&(newOptions.from.opacity=1,newOptions.to.opacity=0),$.effects.effect.size.call(this,newOptions,done)}),$.effects.define("puff","hide",function(options,done){var newOptions=$.extend(!0,{},options,{fade:!0,percent:parseInt(options.percent,10)||150});$.effects.effect.scale.call(this,newOptions,done)}),$.effects.define("pulsate","show",function(options,done){var element=$(this),mode=options.mode,show="show"===mode,hide="hide"===mode,showhide=show||hide,anims=2*(options.times||5)+(showhide?1:0),duration=options.duration/anims,animateTo=0,i=1,queuelen=element.queue().length;for(!show&&element.is(":visible")||(element.css("opacity",0).show(),animateTo=1);i<anims;i++)element.animate({opacity:animateTo},duration,options.easing),animateTo=1-animateTo;element.animate({opacity:animateTo},duration,options.easing),element.queue(done),$.effects.unshift(element,queuelen,anims+1)}),$.effects.define("shake",function(options,done){var i=1,element=$(this),direction=options.direction||"left",distance=options.distance||20,times=options.times||3,anims=2*times+1,speed=Math.round(options.duration/anims),ref="up"===direction||"down"===direction?"top":"left",positiveMotion="up"===direction||"left"===direction,animation={},animation1={},animation2={},queuelen=element.queue().length;for($.effects.createPlaceholder(element),animation[ref]=(positiveMotion?"-=":"+=")+distance,animation1[ref]=(positiveMotion?"+=":"-=")+2*distance,animation2[ref]=(positiveMotion?"-=":"+=")+2*distance,element.animate(animation,speed,options.easing);i<times;i++)element.animate(animation1,speed,options.easing).animate(animation2,speed,options.easing);element.animate(animation1,speed,options.easing).animate(animation,speed/2,options.easing).queue(done),$.effects.unshift(element,queuelen,anims+1)}),$.effects.define("slide","show",function(options,done){var startClip,startRef,element=$(this),map={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},mode=options.mode,direction=options.direction||"left",ref="up"===direction||"down"===direction?"top":"left",positiveMotion="up"===direction||"left"===direction,distance=options.distance||element["top"===ref?"outerHeight":"outerWidth"](!0),animation={};$.effects.createPlaceholder(element),startClip=element.cssClip(),startRef=element.position()[ref],animation[ref]=(positiveMotion?-1:1)*distance+startRef,animation.clip=element.cssClip(),animation.clip[map[direction][1]]=animation.clip[map[direction][0]],"show"===mode&&(element.cssClip(animation.clip),element.css(ref,animation[ref]),animation.clip=startClip,animation[ref]=startRef),element.animate(animation,{queue:!1,duration:options.duration,easing:options.easing,complete:done})});$.uiBackCompat!==!1&&(effect=$.effects.define("transfer",function(options,done){$(this).transfer(options,done)}));$.ui.focusable=function(element,hasTabindex){var map,mapName,img,focusableIfVisible,fieldset,nodeName=element.nodeName.toLowerCase();return"area"===nodeName?(map=element.parentNode,mapName=map.name,!(!element.href||!mapName||"map"!==map.nodeName.toLowerCase())&&(img=$("img[usemap='#"+mapName+"']"),img.length>0&&img.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(nodeName)?(focusableIfVisible=!element.disabled,focusableIfVisible&&(fieldset=$(element).closest("fieldset")[0],fieldset&&(focusableIfVisible=!fieldset.disabled))):focusableIfVisible="a"===nodeName?element.href||hasTabindex:hasTabindex,focusableIfVisible&&$(element).is(":visible")&&visible($(element)))},$.extend($.expr[":"],{focusable:function(element){return $.ui.focusable(element,null!=$.attr(element,"tabindex"))}});$.ui.focusable,$.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):$(this[0].form)},$.ui.formResetMixin={_formResetHandler:function(){var form=$(this);setTimeout(function(){var instances=form.data("ui-form-reset-instances");$.each(instances,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var instances=this.form.data("ui-form-reset-instances")||[];instances.length||this.form.on("reset.ui-form-reset",this._formResetHandler),instances.push(this),this.form.data("ui-form-reset-instances",instances)}},_unbindFormResetHandler:function(){if(this.form.length){var instances=this.form.data("ui-form-reset-instances");instances.splice($.inArray(this,instances),1),instances.length?this.form.data("ui-form-reset-instances",instances):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===$.fn.jquery.substring(0,3)&&($.each(["Width","Height"],function(i,name){function reduce(elem,size,border,margin){return $.each(side,function(){size-=parseFloat($.css(elem,"padding"+this))||0,border&&(size-=parseFloat($.css(elem,"border"+this+"Width"))||0),margin&&(size-=parseFloat($.css(elem,"margin"+this))||0)}),size}var side="Width"===name?["Left","Right"]:["Top","Bottom"],type=name.toLowerCase(),orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};$.fn["inner"+name]=function(size){return void 0===size?orig["inner"+name].call(this):this.each(function(){$(this).css(type,reduce(this,size)+"px")})},$.fn["outer"+name]=function(size,margin){return"number"!=typeof size?orig["outer"+name].call(this,size):this.each(function(){$(this).css(type,reduce(this,size,!0,margin)+"px")})}}),$.fn.addBack=function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))});$.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},$.ui.escapeSelector=function(){var selectorEscape=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(selector){return selector.replace(selectorEscape,"\\$1")}}(),$.fn.labels=function(){var ancestor,selector,id,labels,ancestors;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(labels=this.eq(0).parents("label"),id=this.attr("id"),id&&(ancestor=this.eq(0).parents().last(),ancestors=ancestor.add(ancestor.length?ancestor.siblings():this.siblings()),selector="label[for='"+$.ui.escapeSelector(id)+"']",labels=labels.add(ancestors.find(selector).addBack(selector))),this.pushStack(labels))},$.fn.scrollParent=function(includeHidden){var position=this.css("position"),excludeStaticParent="absolute"===position,overflowRegex=includeHidden?/(auto|scroll|hidden)/:/(auto|scroll)/,scrollParent=this.parents().filter(function(){var parent=$(this);return(!excludeStaticParent||"static"!==parent.css("position"))&&overflowRegex.test(parent.css("overflow")+parent.css("overflow-y")+parent.css("overflow-x"))}).eq(0);return"fixed"!==position&&scrollParent.length?scrollParent:$(this[0].ownerDocument||document)},$.extend($.expr[":"],{tabbable:function(element){var tabIndex=$.attr(element,"tabindex"),hasTabindex=null!=tabIndex;return(!hasTabindex||tabIndex>=0)&&$.ui.focusable(element,hasTabindex)}}),$.fn.extend({uniqueId:function(){var uuid=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++uuid)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&$(this).removeAttr("id")})}}),$.widget("ui.accordion",{version:"1.12.0",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var options=this.options;this.prevShow=this.prevHide=$(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),options.collapsible||options.active!==!1&&null!=options.active||(options.active=0),this._processPanels(),options.active<0&&(options.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():$()}},_createIcons:function(){var icon,children,icons=this.options.icons;icons&&(icon=$("<span>"),this._addClass(icon,"ui-accordion-header-icon","ui-icon "+icons.header),icon.prependTo(this.headers),children=this.active.children(".ui-accordion-header-icon"),this._removeClass(children,icons.header)._addClass(children,null,icons.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var contents;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),contents=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&contents.css("height","")},_setOption:function(key,value){return"active"===key?void this._activate(value):("event"===key&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(value)),this._super(key,value),"collapsible"!==key||value||this.options.active!==!1||this._activate(0),void("icons"===key&&(this._destroyIcons(),value&&this._createIcons())))},_setOptionDisabled:function(value){this._super(value),this.element.attr("aria-disabled",value),this._toggleClass(null,"ui-state-disabled",!!value),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!value)},_keydown:function(event){if(!event.altKey&&!event.ctrlKey){var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=!1;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;case keyCode.HOME:toFocus=this.headers[0];break;case keyCode.END:toFocus=this.headers[length-1]}toFocus&&($(event.target).attr("tabIndex",-1),$(toFocus).attr("tabIndex",0),$(toFocus).trigger("focus"),event.preventDefault())}},_panelKeyDown:function(event){event.keyCode===$.ui.keyCode.UP&&event.ctrlKey&&$(event.currentTarget).prev().trigger("focus")},refresh:function(){var options=this.options;this._processPanels(),options.active===!1&&options.collapsible===!0||!this.headers.length?(options.active=!1,this.active=$()):options.active===!1?this._activate(0):this.active.length&&!$.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(options.active=!1,this.active=$()):this._activate(Math.max(0,options.active-1)):options.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var prevHeaders=this.headers,prevPanels=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),prevPanels&&(this._off(prevHeaders.not(this.headers)),this._off(prevPanels.not(this.panels)))},_refresh:function(){var maxHeight,options=this.options,heightStyle=options.heightStyle,parent=this.element.parent();this.active=this._findActive(options.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var header=$(this),headerId=header.uniqueId().attr("id"),panel=header.next(),panelId=panel.uniqueId().attr("id");header.attr("aria-controls",panelId),panel.attr("aria-labelledby",headerId)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(options.event),"fill"===heightStyle?(maxHeight=parent.height(),this.element.siblings(":visible").each(function(){
var elem=$(this),position=elem.css("position");"absolute"!==position&&"fixed"!==position&&(maxHeight-=elem.outerHeight(!0))}),this.headers.each(function(){maxHeight-=$(this).outerHeight(!0)}),this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")):"auto"===heightStyle&&(maxHeight=0,this.headers.next().each(function(){var isVisible=$(this).is(":visible");isVisible||$(this).show(),maxHeight=Math.max(maxHeight,$(this).css("height","").height()),isVisible||$(this).hide()}).height(maxHeight))},_activate:function(index){var active=this._findActive(index)[0];active!==this.active[0]&&(active=active||this.active[0],this._eventHandler({target:active,currentTarget:active,preventDefault:$.noop}))},_findActive:function(selector){return"number"==typeof selector?this.headers.eq(selector):$()},_setupEvents:function(event){var events={keydown:"_keydown"};event&&$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,events),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(event){var activeChildren,clickedChildren,options=this.options,active=this.active,clicked=$(event.currentTarget),clickedIsActive=clicked[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():clicked.next(),toHide=active.next(),eventData={oldHeader:active,oldPanel:toHide,newHeader:collapsing?$():clicked,newPanel:toShow};event.preventDefault(),clickedIsActive&&!options.collapsible||this._trigger("beforeActivate",event,eventData)===!1||(options.active=!collapsing&&this.headers.index(clicked),this.active=clickedIsActive?$():clicked,this._toggle(eventData),this._removeClass(active,"ui-accordion-header-active","ui-state-active"),options.icons&&(activeChildren=active.children(".ui-accordion-header-icon"),this._removeClass(activeChildren,null,options.icons.activeHeader)._addClass(activeChildren,null,options.icons.header)),clickedIsActive||(this._removeClass(clicked,"ui-accordion-header-collapsed")._addClass(clicked,"ui-accordion-header-active","ui-state-active"),options.icons&&(clickedChildren=clicked.children(".ui-accordion-header-icon"),this._removeClass(clickedChildren,null,options.icons.header)._addClass(clickedChildren,null,options.icons.activeHeader)),this._addClass(clicked.next(),"ui-accordion-content-active")))},_toggle:function(data){var toShow=data.newPanel,toHide=this.prevShow.length?this.prevShow:data.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=toShow,this.prevHide=toHide,this.options.animate?this._animate(toShow,toHide,data):(toHide.hide(),toShow.show(),this._toggleComplete(data)),toHide.attr({"aria-hidden":"true"}),toHide.prev().attr({"aria-selected":"false","aria-expanded":"false"}),toShow.length&&toHide.length?toHide.prev().attr({tabIndex:-1,"aria-expanded":"false"}):toShow.length&&this.headers.filter(function(){return 0===parseInt($(this).attr("tabIndex"),10)}).attr("tabIndex",-1),toShow.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(toShow,toHide,data){var total,easing,duration,that=this,adjust=0,boxSizing=toShow.css("box-sizing"),down=toShow.length&&(!toHide.length||toShow.index()<toHide.index()),animate=this.options.animate||{},options=down&&animate.down||animate,complete=function(){that._toggleComplete(data)};return"number"==typeof options&&(duration=options),"string"==typeof options&&(easing=options),easing=easing||options.easing||animate.easing,duration=duration||options.duration||animate.duration,toHide.length?toShow.length?(total=toShow.show().outerHeight(),toHide.animate(this.hideProps,{duration:duration,easing:easing,step:function(now,fx){fx.now=Math.round(now)}}),void toShow.hide().animate(this.showProps,{duration:duration,easing:easing,complete:complete,step:function(now,fx){fx.now=Math.round(now),"height"!==fx.prop?"content-box"===boxSizing&&(adjust+=fx.now):"content"!==that.options.heightStyle&&(fx.now=Math.round(total-toHide.outerHeight()-adjust),adjust=0)}})):toHide.animate(this.hideProps,duration,easing,complete):toShow.animate(this.showProps,duration,easing,complete)},_toggleComplete:function(data){var toHide=data.oldPanel,prev=toHide.prev();this._removeClass(toHide,"ui-accordion-content-active"),this._removeClass(prev,"ui-accordion-header-active")._addClass(prev,"ui-accordion-header-collapsed"),toHide.length&&(toHide.parent()[0].className=toHide.parent()[0].className),this._trigger("activate",null,data)}}),$.ui.safeActiveElement=function(document){var activeElement;try{activeElement=document.activeElement}catch(error){activeElement=document.body}return activeElement||(activeElement=document.body),activeElement.nodeName||(activeElement=document.body),activeElement},$.widget("ui.menu",{version:"1.12.0",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(event){event.preventDefault()},"click .ui-menu-item":function(event){var target=$(event.target),active=$($.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&target.not(".ui-state-disabled").length&&(this.select(event),event.isPropagationStopped()||(this.mouseHandled=!0),target.has(".ui-menu").length?this.expand(event):!this.element.is(":focus")&&active.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(event){if(!this.previousFilter){var actualTarget=$(event.target).closest(".ui-menu-item"),target=$(event.currentTarget);actualTarget[0]===target[0]&&(this._removeClass(target.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(event,target))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.find(this.options.items).eq(0);keepActiveItem||this.focus(event,item)},blur:function(event){this._delay(function(){var notContained=!$.contains(this.element[0],$.ui.safeActiveElement(this.document[0]));notContained&&this.collapseAll(event)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(event){this._closeOnDocumentClick(event)&&this.collapseAll(event),this.mouseHandled=!1}})},_destroy:function(){var items=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),submenus=items.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),submenus.children().each(function(){var elem=$(this);elem.data("ui-menu-submenu-caret")&&elem.remove()})},_keydown:function(event){var match,prev,character,skip,preventDefault=!0;switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move("first","first",event);break;case $.ui.keyCode.END:this._move("last","last",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(event);break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=!1,prev=this.previousFilter||"",character=String.fromCharCode(event.keyCode),skip=!1,clearTimeout(this.filterTimer),character===prev?skip=!0:character=prev+character,match=this._filterMenuItems(character),match=skip&&match.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):match,match.length||(character=String.fromCharCode(event.keyCode),match=this._filterMenuItems(character)),match.length?(this.focus(event,match),this.previousFilter=character,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}preventDefault&&event.preventDefault()},_activate:function(event){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(event):this.select(event))},refresh:function(){var menus,items,newSubmenus,newItems,newWrappers,that=this,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),newSubmenus=submenus.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$(this),item=menu.prev(),submenuCaret=$("<span>").data("ui-menu-submenu-caret",!0);that._addClass(submenuCaret,"ui-menu-icon","ui-icon "+icon),item.attr("aria-haspopup","true").prepend(submenuCaret),menu.attr("aria-labelledby",item.attr("id"))}),this._addClass(newSubmenus,"ui-menu","ui-widget ui-widget-content ui-front"),menus=submenus.add(this.element),items=menus.find(this.options.items),items.not(".ui-menu-item").each(function(){var item=$(this);that._isDivider(item)&&that._addClass(item,"ui-menu-divider","ui-widget-content")}),newItems=items.not(".ui-menu-item, .ui-menu-divider"),newWrappers=newItems.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(newItems,"ui-menu-item")._addClass(newWrappers,"ui-menu-item-wrapper"),items.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!$.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(key,value){if("icons"===key){var icons=this.element.find(".ui-menu-icon");this._removeClass(icons,null,this.options.icons.submenu)._addClass(icons,null,value.submenu)}this._super(key,value)},_setOptionDisabled:function(value){this._super(value),this.element.attr("aria-disabled",String(value)),this._toggleClass(null,"ui-state-disabled",!!value)},focus:function(event,item){var nested,focused,activeParent;this.blur(event,event&&"focus"===event.type),this._scrollIntoView(item),this.active=item.first(),focused=this.active.children(".ui-menu-item-wrapper"),this._addClass(focused,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",focused.attr("id")),activeParent=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(activeParent,null,"ui-state-active"),event&&"keydown"===event.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),nested=item.children(".ui-menu"),nested.length&&event&&/^mouse/.test(event.type)&&this._startOpening(nested),this.activeMenu=item.parent(),this._trigger("focus",event,{item:item})},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;this._hasScroll()&&(borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0,paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0,offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop,scroll=this.activeMenu.scrollTop(),elementHeight=this.activeMenu.height(),itemHeight=item.outerHeight(),offset<0?this.activeMenu.scrollTop(scroll+offset):offset+itemHeight>elementHeight&&this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight))},blur:function(event,fromFocus){fromFocus||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",event,{item:this.active}),this.active=null)},_startOpening:function(submenu){clearTimeout(this.timer),"true"===submenu.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(submenu)},this.delay))},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden","true"),submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position)},collapseAll:function(event,all){clearTimeout(this.timer),this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(".ui-menu"));currentMenu.length||(currentMenu=this.element),this._close(currentMenu),this.blur(event),this._removeClass(currentMenu.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=currentMenu},this.delay)},_close:function(startMenu){startMenu||(startMenu=this.active?this.active.parent():this.element),startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(event){return!$(event.target).closest(".ui-menu").length},_isDivider:function(item){return!/[^\-\u2014\u2013\s]/.test(item.text())},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);newItem&&newItem.length&&(this._close(),this.focus(event,newItem))},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();newItem&&newItem.length&&(this._open(newItem.parent()),this._delay(function(){this.focus(event,newItem)}))},next:function(event){this._move("next","first",event)},previous:function(event){this._move("prev","last",event)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(direction,filter,event){var next;this.active&&(next="first"===direction||"last"===direction?this.active["first"===direction?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[direction+"All"](".ui-menu-item").eq(0)),next&&next.length&&this.active||(next=this.activeMenu.find(this.options.items)[filter]()),this.focus(event,next)},nextPage:function(event){var item,base,height;return this.active?void(this.isLastItem()||(this._hasScroll()?(base=this.active.offset().top,height=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return item=$(this),item.offset().top-base-height<0}),this.focus(event,item)):this.focus(event,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(event)},previousPage:function(event){var item,base,height;return this.active?void(this.isFirstItem()||(this._hasScroll()?(base=this.active.offset().top,height=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return item=$(this),item.offset().top-base+height>0}),this.focus(event,item)):this.focus(event,this.activeMenu.find(this.options.items).first()))):void this.next(event)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(event){this.active=this.active||$(event.target).closest(".ui-menu-item");var ui={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(event,!0),this._trigger("select",event,ui)},_filterMenuItems:function(character){var escapedCharacter=character.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),regex=new RegExp("^"+escapedCharacter,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return regex.test($.trim($(this).children(".ui-menu-item-wrapper").text()))})}});$.widget("ui.autocomplete",{version:"1.12.0",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea="textarea"===nodeName,isInput="input"===nodeName;this.isMultiLine=isTextarea||!isInput&&this._isContentEditable(this.element),this.valueMethod=this.element[isTextarea||isInput?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly"))return suppressKeyPress=!0,suppressInput=!0,void(suppressKeyPressRepeat=!0);suppressKeyPress=!1,suppressInput=!1,suppressKeyPressRepeat=!1;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=!0,this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=!0,this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=!0,this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=!0,this._keyEvent("next",event);break;case keyCode.ENTER:this.menu.active&&(suppressKeyPress=!0,event.preventDefault(),this.menu.select(event));break;case keyCode.TAB:this.menu.active&&this.menu.select(event);break;case keyCode.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(event),event.preventDefault());break;default:suppressKeyPressRepeat=!0,this._searchTimeout(event)}},keypress:function(event){if(suppressKeyPress)return suppressKeyPress=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||event.preventDefault());if(!suppressKeyPressRepeat){var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event)}}},input:function(event){return suppressInput?(suppressInput=!1,void event.preventDefault()):void this._searchTimeout(event)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(event){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(event),void this._change(event))}}),this._initSource(),this.menu=$("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(event){event.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==$.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(event,ui){var label,item;return this.isNewMenu&&(this.isNewMenu=!1,event.originalEvent&&/^mouse/.test(event.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){$(event.target).trigger(event.originalEvent)})):(item=ui.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",event,{item:item})&&event.originalEvent&&/^key/.test(event.originalEvent.type)&&this._value(item.value),label=ui.item.attr("aria-label")||item.value,void(label&&$.trim(label).length&&(this.liveRegion.children().hide(),$("<div>").text(label).appendTo(this.liveRegion))))},menuselect:function(event,ui){var item=ui.item.data("ui-autocomplete-item"),previous=this.previous;this.element[0]!==$.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=previous,this._delay(function(){this.previous=previous,this.selectedItem=item})),!1!==this._trigger("select",event,{item:item})&&this._value(item.value),this.term=this._value(),this.close(event),this.selectedItem=item}}),this.liveRegion=$("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(key,value){this._super(key,value),"source"===key&&this._initSource(),"appendTo"===key&&this.menu.element.appendTo(this._appendTo()),"disabled"===key&&value&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(event){var menuElement=this.menu.element[0];return event.target===this.element[0]||event.target===menuElement||$.contains(menuElement,event.target)},_closeOnClickOutside:function(event){this._isEventTargetInWidget(event)||this.close()},_appendTo:function(){var element=this.options.appendTo;return element&&(element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)),element&&element[0]||(element=this.element.closest(".ui-front, dialog")),element.length||(element=this.document[0].body),element},_initSource:function(){var array,url,that=this;$.isArray(this.options.source)?(array=this.options.source,this.source=function(request,response){response($.ui.autocomplete.filter(array,request.term))}):"string"==typeof this.options.source?(url=this.options.source,this.source=function(request,response){that.xhr&&that.xhr.abort(),that.xhr=$.ajax({url:url,data:request,dataType:"json",success:function(data){response(data)},error:function(){response([])}})}):this.source=this.options.source},_searchTimeout:function(event){clearTimeout(this.searching),this.searching=this._delay(function(){var equalValues=this.term===this._value(),menuVisible=this.menu.element.is(":visible"),modifierKey=event.altKey||event.ctrlKey||event.metaKey||event.shiftKey;equalValues&&(!equalValues||menuVisible||modifierKey)||(this.selectedItem=null,this.search(null,event))},this.options.delay)},search:function(value,event){return value=null!=value?value:this._value(),this.term=this._value(),value.length<this.options.minLength?this.close(event):this._trigger("search",event)!==!1?this._search(value):void 0},_search:function(value){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:value},this._response())},_response:function(){var index=++this.requestIndex;return $.proxy(function(content){index===this.requestIndex&&this.__response(content),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(content){content&&(content=this._normalize(content)),this._trigger("response",null,{content:content}),!this.options.disabled&&content&&content.length&&!this.cancelSearch?(this._suggest(content),this._trigger("open")):this._close()},close:function(event){this.cancelSearch=!0,this._close(event)},_close:function(event){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",event))},_change:function(event){this.previous!==this._value()&&this._trigger("change",event,{item:this.selectedItem})},_normalize:function(items){return items.length&&items[0].label&&items[0].value?items:$.map(items,function(item){return"string"==typeof item?{label:item,value:item}:$.extend({},item,{label:item.label||item.value,value:item.value||item.label})})},_suggest:function(items){var ul=this.menu.element.empty();this._renderMenu(ul,items),this.isNewMenu=!0,this.menu.refresh(),ul.show(),this._resizeMenu(),ul.position($.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var ul=this.menu.element;ul.outerWidth(Math.max(ul.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(ul,items){var that=this;$.each(items,function(index,item){that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-autocomplete-item",item)},_renderItem:function(ul,item){return $("<li>").append($("<div>").text(item.label)).appendTo(ul)},_move:function(direction,event){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(direction)||this.menu.isLastItem()&&/^next/.test(direction)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[direction](event):void this.search(null,event)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(keyEvent,event){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(keyEvent,event),event.preventDefault())},_isContentEditable:function(element){if(!element.length)return!1;var editable=element.prop("contentEditable");return"inherit"===editable?this._isContentEditable(element.parent()):"true"===editable}}),$.extend($.ui.autocomplete,{escapeRegex:function(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(array,term){var matcher=new RegExp($.ui.autocomplete.escapeRegex(term),"i");return $.grep(array,function(value){return matcher.test(value.label||value.value||value)})}}),$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(amount){return amount+(amount>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(content){var message;this._superApply(arguments),this.options.disabled||this.cancelSearch||(message=content&&content.length?this.options.messages.results(content.length):this.options.messages.noResults,this.liveRegion.children().hide(),$("<div>").text(message).appendTo(this.liveRegion))}});var controlgroupCornerRegex=($.ui.autocomplete,/ui-corner-([a-z]){2,6}/g);$.widget("ui.controlgroup",{version:"1.12.0",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var that=this,childWidgets=[];$.each(this.options.items,function(widget,selector){var labels,options={};if(selector)return"controlgroupLabel"===widget?(labels=that.element.find(selector),labels.each(function(){var element=$(this);element.children(".ui-controlgroup-label-contents").length||element.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),that._addClass(labels,null,"ui-widget ui-widget-content ui-state-default"),void(childWidgets=childWidgets.concat(labels.get()))):void($.fn[widget]&&(that["_"+widget+"Options"]&&(options=that["_"+widget+"Options"]("middle")),that.element.find(selector).each(function(){var element=$(this),instance=element[widget]("instance"),instanceOptions=$.widget.extend({},options);if("button"!==widget||!element.parent(".ui-spinner").length){instance||(instance=element[widget]()[widget]("instance")),instance&&(instanceOptions.classes=that._resolveClassesValues(instanceOptions.classes,instance)),element[widget](instanceOptions);var widgetElement=element[widget]("widget");$.data(widgetElement[0],"ui-controlgroup-data",instance?instance:element[widget]("instance")),childWidgets.push(widgetElement[0])}})))}),this.childWidgets=$($.unique(childWidgets)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(method){this.childWidgets.each(function(){var element=$(this),data=element.data("ui-controlgroup-data");data&&data[method]&&data[method]()})},_updateCornerClass:function(element,position){var remove="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",add=this._buildSimpleOptions(position,"label").classes.label;this._removeClass(element,null,remove),this._addClass(element,null,add)},_buildSimpleOptions:function(position,key){var direction="vertical"===this.options.direction,result={classes:{}};return result.classes[key]={middle:"",first:"ui-corner-"+(direction?"top":"left"),last:"ui-corner-"+(direction?"bottom":"right"),only:"ui-corner-all"}[position],result},_spinnerOptions:function(position){var options=this._buildSimpleOptions(position,"ui-spinner");return options.classes["ui-spinner-up"]="",options.classes["ui-spinner-down"]="",options},_buttonOptions:function(position){return this._buildSimpleOptions(position,"ui-button")},_checkboxradioOptions:function(position){return this._buildSimpleOptions(position,"ui-checkboxradio-label")},_selectmenuOptions:function(position){var direction="vertical"===this.options.direction;return{width:!!direction&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(direction?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(direction?"top":"left")},last:{"ui-selectmenu-button-open":direction?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(direction?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[position]}},_resolveClassesValues:function(classes,instance){var result={};return $.each(classes,function(key){var current=instance.options.classes[key]||"";current=current.replace(controlgroupCornerRegex,"").trim(),result[key]=(current+" "+classes[key]).replace(/\s+/g," ")}),result},_setOption:function(key,value){return"direction"===key&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(key,value),"disabled"===key?void this._callChildMethod(value?"disable":"enable"):void this.refresh()},refresh:function(){var children,that=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),children=this.childWidgets,this.options.onlyVisible&&(children=children.filter(":visible")),children.length&&($.each(["first","last"],function(index,value){var instance=children[value]().data("ui-controlgroup-data");if(instance&&that["_"+instance.widgetName+"Options"]){var options=that["_"+instance.widgetName+"Options"](1===children.length?"only":value);options.classes=that._resolveClassesValues(options.classes,instance),instance.element[instance.widgetName](options)}else that._updateCornerClass(children[value](),value)}),this._callChildMethod("refresh"))}});$.widget("ui.checkboxradio",[$.ui.formResetMixin,{version:"1.12.0",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var disabled,labels,that=this,options=this._super()||{};return this._readType(),labels=this.element.labels(),this.label=$(labels[labels.length-1]),this.label.length||$.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element).each(function(){that.originalLabel+=3===this.nodeType?$(this).text():this.outerHTML}),this.originalLabel&&(options.label=this.originalLabel),disabled=this.element[0].disabled,null!=disabled&&(options.disabled=disabled),options},_create:function(){var checked=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),checked&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),
this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var nodeName=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===nodeName&&/radio|checkbox/.test(this.type)||$.error("Can't create checkboxradio on element.nodeName="+nodeName+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var group,name=this.element[0].name,nameSelector="input[name='"+$.ui.escapeSelector(name)+"']";return name?(group=this.form.length?$(this.form[0].elements).filter(nameSelector):$(nameSelector).filter(function(){return 0===$(this).form().length}),group.not(this.element)):$([])},_toggleClasses:function(){var checked=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",checked),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",checked)._toggleClass(this.icon,null,"ui-icon-blank",!checked),"radio"===this.type&&this._getRadioGroup().each(function(){var instance=$(this).checkboxradio("instance");instance&&instance._removeClass(instance.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(key,value){if("label"!==key||value)return this._super(key,value),"disabled"===key?(this._toggleClass(this.label,null,"ui-state-disabled",value),void(this.element[0].disabled=value)):void this.refresh()},_updateIcon:function(checked){var toAdd="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=$("<span>"),this.iconSpace=$("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(toAdd+=checked?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,checked?"ui-icon-blank":"ui-icon-check")):toAdd+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",toAdd),checked||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){this.label.contents().not(this.element.add(this.icon).add(this.iconSpace)).remove(),this.label.append(this.options.label)},refresh:function(){var checked=this.element[0].checked,isDisabled=this.element[0].disabled;this._updateIcon(checked),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",checked),null!==this.options.label&&this._updateLabel(),isDisabled!==this.options.disabled&&this._setOptions({disabled:isDisabled})}}]);$.ui.checkboxradio;$.widget("ui.button",{version:"1.12.0",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var disabled,options=this._super()||{};return this.isInput=this.element.is("input"),disabled=this.element[0].disabled,null!=disabled&&(options.disabled=disabled),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(options.label=this.originalLabel),options},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(event){event.keyCode===$.ui.keyCode.SPACE&&(event.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(option,value){var icon="iconPosition"!==option,position=icon?this.options.iconPosition:value,displayBlock="top"===position||"bottom"===position;this.icon?icon&&this._removeClass(this.icon,null,this.options.icon):(this.icon=$("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),icon&&this._addClass(this.icon,null,value),this._attachIcon(position),displayBlock?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=$("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(position))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(iconPosition){this.icon[/^(?:end|bottom)/.test(iconPosition)?"before":"after"](this.iconSpace)},_attachIcon:function(iconPosition){this.element[/^(?:end|bottom)/.test(iconPosition)?"append":"prepend"](this.icon)},_setOptions:function(options){var newShowLabel=void 0===options.showLabel?this.options.showLabel:options.showLabel,newIcon=void 0===options.icon?this.options.icon:options.icon;newShowLabel||newIcon||(options.showLabel=!0),this._super(options)},_setOption:function(key,value){"icon"===key&&(value?this._updateIcon(key,value):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===key&&this._updateIcon(key,value),"showLabel"===key&&(this._toggleClass("ui-button-icon-only",null,!value),this._updateTooltip()),"label"===key&&(this.isInput?this.element.val(value):(this.element.html(value),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(key,value),"disabled"===key&&(this._toggleClass(null,"ui-state-disabled",value),this.element[0].disabled=value,value&&this.element.blur())},refresh:function(){var isDisabled=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");isDisabled!==this.options.disabled&&this._setOptions({disabled:isDisabled}),this._updateTooltip()}}),$.uiBackCompat!==!1&&($.widget("ui.button",$.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(key,value){return"text"===key?void this._super("showLabel",value):("showLabel"===key&&(this.options.text=value),"icon"===key&&(this.options.icons.primary=value),"icons"===key&&(value.primary?(this._super("icon",value.primary),this._super("iconPosition","beginning")):value.secondary&&(this._super("icon",value.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),$.fn.button=function(orig){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?orig.apply(this,arguments):($.ui.checkboxradio||$.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}($.fn.button),$.fn.buttonset=function(){return $.ui.controlgroup||$.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});$.ui.button;$.extend($.ui,{datepicker:{version:"1.12.0"}});var datepicker_instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(settings){return datepicker_extendRemove(this._defaults,settings||{}),this},_attachDatepicker:function(target,settings){var nodeName,inline,inst;nodeName=target.nodeName.toLowerCase(),inline="div"===nodeName||"span"===nodeName,target.id||(this.uuid+=1,target.id="dp"+this.uuid),inst=this._newInst($(target),inline),inst.settings=$.extend({},settings||{}),"input"===nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(target,inline){var id=target[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:inline?datepicker_bindHover($("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]),inst.trigger=$([]),input.hasClass(this.markerClassName)||(this._attachments(input,inst),input.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(inst),$.data(target,"datepicker",inst),inst.settings.disabled&&this._disableDatepicker(target))},_attachments:function(input,inst){var showOn,buttonText,buttonImage,appendText=this._get(inst,"appendText"),isRTL=this._get(inst,"isRTL");inst.append&&inst.append.remove(),appendText&&(inst.append=$("<span class='"+this._appendClass+"'>"+appendText+"</span>"),input[isRTL?"before":"after"](inst.append)),input.off("focus",this._showDatepicker),inst.trigger&&inst.trigger.remove(),showOn=this._get(inst,"showOn"),"focus"!==showOn&&"both"!==showOn||input.on("focus",this._showDatepicker),"button"!==showOn&&"both"!==showOn||(buttonText=this._get(inst,"buttonText"),buttonImage=this._get(inst,"buttonImage"),inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button type='button'></button>").addClass(this._triggerClass).html(buttonImage?$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText}):buttonText)),input[isRTL?"before":"after"](inst.trigger),inst.trigger.on("click",function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput===input[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!==input[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(input[0])):$.datepicker._showDatepicker(input[0]),!1}))},_autoSize:function(inst){if(this._get(inst,"autoSize")&&!inst.inline){var findMax,max,maxI,i,date=new Date(2009,11,20),dateFormat=this._get(inst,"dateFormat");dateFormat.match(/[DM]/)&&(findMax=function(names){for(max=0,maxI=0,i=0;i<names.length;i++)names[i].length>max&&(max=names[i].length,maxI=i);return maxI},date.setMonth(findMax(this._get(inst,dateFormat.match(/MM/)?"monthNames":"monthNamesShort"))),date.setDate(findMax(this._get(inst,dateFormat.match(/DD/)?"dayNames":"dayNamesShort"))+20-date.getDay())),inst.input.attr("size",this._formatDate(inst,date).length)}},_inlineDatepicker:function(target,inst){var divSpan=$(target);divSpan.hasClass(this.markerClassName)||(divSpan.addClass(this.markerClassName).append(inst.dpDiv),$.data(target,"datepicker",inst),this._setDate(inst,this._getDefaultDate(inst),!0),this._updateDatepicker(inst),this._updateAlternate(inst),inst.settings.disabled&&this._disableDatepicker(target),inst.dpDiv.css("display","block"))},_dialogDatepicker:function(input,date,onSelect,settings,pos){var id,browserWidth,browserHeight,scrollX,scrollY,inst=this._dialogInst;return inst||(this.uuid+=1,id="dp"+this.uuid,this._dialogInput=$("<input type='text' id='"+id+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),$("body").append(this._dialogInput),inst=this._dialogInst=this._newInst(this._dialogInput,!1),inst.settings={},$.data(this._dialogInput[0],"datepicker",inst)),datepicker_extendRemove(inst.settings,settings||{}),date=date&&date.constructor===Date?this._formatDate(inst,date):date,this._dialogInput.val(date),this._pos=pos?pos.length?pos:[pos.pageX,pos.pageY]:null,this._pos||(browserWidth=document.documentElement.clientWidth,browserHeight=document.documentElement.clientHeight,scrollX=document.documentElement.scrollLeft||document.body.scrollLeft,scrollY=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[browserWidth/2-100+scrollX,browserHeight/2-150+scrollY]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),inst.settings.onSelect=onSelect,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],"datepicker",inst),this},_destroyDatepicker:function(target){var nodeName,$target=$(target),inst=$.data(target,"datepicker");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),$.removeData(target,"datepicker"),"input"===nodeName?(inst.append.remove(),inst.trigger.remove(),$target.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==nodeName&&"span"!==nodeName||$target.removeClass(this.markerClassName).empty(),datepicker_instActive===inst&&(datepicker_instActive=null))},_enableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),"input"===nodeName?(target.disabled=!1,inst.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==nodeName&&"span"!==nodeName||(inline=$target.children("."+this._inlineClass),inline.children().removeClass("ui-state-disabled"),inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=$.map(this._disabledInputs,function(value){return value===target?null:value}))},_disableDatepicker:function(target){var nodeName,inline,$target=$(target),inst=$.data(target,"datepicker");$target.hasClass(this.markerClassName)&&(nodeName=target.nodeName.toLowerCase(),"input"===nodeName?(target.disabled=!0,inst.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==nodeName&&"span"!==nodeName||(inline=$target.children("."+this._inlineClass),inline.children().addClass("ui-state-disabled"),inline.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=$.map(this._disabledInputs,function(value){return value===target?null:value}),this._disabledInputs[this._disabledInputs.length]=target)},_isDisabledDatepicker:function(target){if(!target)return!1;for(var i=0;i<this._disabledInputs.length;i++)if(this._disabledInputs[i]===target)return!0;return!1},_getInst:function(target){try{return $.data(target,"datepicker")}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var settings,date,minDate,maxDate,inst=this._getInst(target);return 2===arguments.length&&"string"==typeof name?"defaults"===name?$.extend({},$.datepicker._defaults):inst?"all"===name?$.extend({},inst.settings):this._get(inst,name):null:(settings=name||{},"string"==typeof name&&(settings={},settings[name]=value),void(inst&&(this._curInst===inst&&this._hideDatepicker(),date=this._getDateDatepicker(target,!0),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),datepicker_extendRemove(inst.settings,settings),null!==minDate&&void 0!==settings.dateFormat&&void 0===settings.minDate&&(inst.settings.minDate=this._formatDate(inst,minDate)),null!==maxDate&&void 0!==settings.dateFormat&&void 0===settings.maxDate&&(inst.settings.maxDate=this._formatDate(inst,maxDate)),"disabled"in settings&&(settings.disabled?this._disableDatepicker(target):this._enableDatepicker(target)),this._attachments($(target),inst),this._autoSize(inst),this._setDate(inst,date),this._updateAlternate(inst),this._updateDatepicker(inst))))},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);inst&&this._updateDatepicker(inst)},_setDateDatepicker:function(target,date){var inst=this._getInst(target);inst&&(this._setDate(inst,date),this._updateDatepicker(inst),this._updateAlternate(inst))},_getDateDatepicker:function(target,noDefault){var inst=this._getInst(target);return inst&&!inst.inline&&this._setDateFromField(inst,noDefault),inst?this._getDate(inst):null},_doKeyDown:function(event){var onSelect,dateStr,sel,inst=$.datepicker._getInst(event.target),handled=!0,isRTL=inst.dpDiv.is(".ui-datepicker-rtl");if(inst._keyEvent=!0,$.datepicker._datepickerShowing)switch(event.keyCode){case 9:$.datepicker._hideDatepicker(),handled=!1;break;case 13:return sel=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",inst.dpDiv),sel[0]&&$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0]),onSelect=$.datepicker._get(inst,"onSelect"),onSelect?(dateStr=$.datepicker._formatDate(inst),onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst])):$.datepicker._hideDatepicker(),!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(event.target,event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(event.target,event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths"),"M");break;case 35:(event.ctrlKey||event.metaKey)&&$.datepicker._clearDate(event.target),handled=event.ctrlKey||event.metaKey;break;case 36:(event.ctrlKey||event.metaKey)&&$.datepicker._gotoToday(event.target),handled=event.ctrlKey||event.metaKey;break;case 37:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,isRTL?1:-1,"D"),handled=event.ctrlKey||event.metaKey,event.originalEvent.altKey&&$.datepicker._adjustDate(event.target,event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths"),"M");break;case 38:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,-7,"D"),handled=event.ctrlKey||event.metaKey;break;case 39:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,isRTL?-1:1,"D"),handled=event.ctrlKey||event.metaKey,event.originalEvent.altKey&&$.datepicker._adjustDate(event.target,event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths"),"M");break;case 40:(event.ctrlKey||event.metaKey)&&$.datepicker._adjustDate(event.target,7,"D"),handled=event.ctrlKey||event.metaKey;break;default:handled=!1}else 36===event.keyCode&&event.ctrlKey?$.datepicker._showDatepicker(this):handled=!1;handled&&(event.preventDefault(),event.stopPropagation())},_doKeyPress:function(event){var chars,chr,inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput"))return chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat")),chr=String.fromCharCode(null==event.charCode?event.keyCode:event.charCode),event.ctrlKey||event.metaKey||chr<" "||!chars||chars.indexOf(chr)>-1},_doKeyUp:function(event){var date,inst=$.datepicker._getInst(event.target);if(inst.input.val()!==inst.lastVal)try{date=$.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),inst.input?inst.input.val():null,$.datepicker._getFormatConfig(inst)),date&&($.datepicker._setDateFromField(inst),$.datepicker._updateAlternate(inst),$.datepicker._updateDatepicker(inst))}catch(err){}return!0},_showDatepicker:function(input){if(input=input.target||input,"input"!==input.nodeName.toLowerCase()&&(input=$("input",input.parentNode)[0]),!$.datepicker._isDisabledDatepicker(input)&&$.datepicker._lastInput!==input){var inst,beforeShow,beforeShowSettings,isFixed,offset,showAnim,duration;inst=$.datepicker._getInst(input),$.datepicker._curInst&&$.datepicker._curInst!==inst&&($.datepicker._curInst.dpDiv.stop(!0,!0),inst&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0])),beforeShow=$.datepicker._get(inst,"beforeShow"),beforeShowSettings=beforeShow?beforeShow.apply(input,[input,inst]):{},beforeShowSettings!==!1&&(datepicker_extendRemove(inst.settings,beforeShowSettings),inst.lastVal=null,$.datepicker._lastInput=input,$.datepicker._setDateFromField(inst),$.datepicker._inDialog&&(input.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(input),$.datepicker._pos[1]+=input.offsetHeight),isFixed=!1,$(input).parents().each(function(){return isFixed|="fixed"===$(this).css("position"),!isFixed}),offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]},$.datepicker._pos=null,inst.dpDiv.empty(),inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(inst),offset=$.datepicker._checkOffset(inst,offset,isFixed),inst.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":isFixed?"fixed":"absolute",display:"none",left:offset.left+"px",top:offset.top+"px"}),inst.inline||(showAnim=$.datepicker._get(inst,"showAnim"),duration=$.datepicker._get(inst,"duration"),inst.dpDiv.css("z-index",datepicker_getZindex($(input))+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects.effect[showAnim]?inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration):inst.dpDiv[showAnim||"show"](showAnim?duration:null),$.datepicker._shouldFocusInput(inst)&&inst.input.trigger("focus"),$.datepicker._curInst=inst))}},_updateDatepicker:function(inst){this.maxRows=4,datepicker_instActive=inst,inst.dpDiv.empty().append(this._generateHTML(inst)),this._attachHandlers(inst);var origyearshtml,numMonths=this._getNumberOfMonths(inst),cols=numMonths[1],width=17,activeCell=inst.dpDiv.find("."+this._dayOverClass+" a");activeCell.length>0&&datepicker_handleMouseover.apply(activeCell.get(0)),inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),cols>1&&inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",width*cols+"em"),inst.dpDiv[(1!==numMonths[0]||1!==numMonths[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),inst===$.datepicker._curInst&&$.datepicker._datepickerShowing&&$.datepicker._shouldFocusInput(inst)&&inst.input.trigger("focus"),inst.yearshtml&&(origyearshtml=inst.yearshtml,setTimeout(function(){origyearshtml===inst.yearshtml&&inst.yearshtml&&inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml),origyearshtml=inst.yearshtml=null},0))},_shouldFocusInput:function(inst){return inst.input&&inst.input.is(":visible")&&!inst.input.is(":disabled")&&!inst.input.is(":focus")},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth(),dpHeight=inst.dpDiv.outerHeight(),inputWidth=inst.input?inst.input.outerWidth():0,inputHeight=inst.input?inst.input.outerHeight():0,viewWidth=document.documentElement.clientWidth+(isFixed?0:$(document).scrollLeft()),viewHeight=document.documentElement.clientHeight+(isFixed?0:$(document).scrollTop());return offset.left-=this._get(inst,"isRTL")?dpWidth-inputWidth:0,offset.left-=isFixed&&offset.left===inst.input.offset().left?$(document).scrollLeft():0,offset.top-=isFixed&&offset.top===inst.input.offset().top+inputHeight?$(document).scrollTop():0,offset.left-=Math.min(offset.left,offset.left+dpWidth>viewWidth&&viewWidth>dpWidth?Math.abs(offset.left+dpWidth-viewWidth):0),offset.top-=Math.min(offset.top,offset.top+dpHeight>viewHeight&&viewHeight>dpHeight?Math.abs(dpHeight+inputHeight):0),offset},_findPos:function(obj){for(var position,inst=this._getInst(obj),isRTL=this._get(inst,"isRTL");obj&&("hidden"===obj.type||1!==obj.nodeType||$.expr.filters.hidden(obj));)obj=obj[isRTL?"previousSibling":"nextSibling"];return position=$(obj).offset(),[position.left,position.top]},_hideDatepicker:function(input){var showAnim,duration,postProcess,onClose,inst=this._curInst;!inst||input&&inst!==$.data(input,"datepicker")||this._datepickerShowing&&(showAnim=this._get(inst,"showAnim"),duration=this._get(inst,"duration"),postProcess=function(){$.datepicker._tidyDialog(inst)},$.effects&&($.effects.effect[showAnim]||$.effects[showAnim])?inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess):inst.dpDiv["slideDown"===showAnim?"slideUp":"fadeIn"===showAnim?"fadeOut":"hide"](showAnim?duration:null,postProcess),showAnim||postProcess(),this._datepickerShowing=!1,onClose=this._get(inst,"onClose"),onClose&&onClose.apply(inst.input?inst.input[0]:null,[inst.input?inst.input.val():"",inst]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(event){if($.datepicker._curInst){var $target=$(event.target),inst=$.datepicker._getInst($target[0]);($target[0].id===$.datepicker._mainDivId||0!==$target.parents("#"+$.datepicker._mainDivId).length||$target.hasClass($.datepicker.markerClassName)||$target.closest("."+$.datepicker._triggerClass).length||!$.datepicker._datepickerShowing||$.datepicker._inDialog&&$.blockUI)&&(!$target.hasClass($.datepicker.markerClassName)||$.datepicker._curInst===inst)||$.datepicker._hideDatepicker()}},_adjustDate:function(id,offset,period){var target=$(id),inst=this._getInst(target[0]);this._isDisabledDatepicker(target[0])||(this._adjustInstDate(inst,offset+("M"===period?this._get(inst,"showCurrentAtPos"):0),period),this._updateDatepicker(inst))},_gotoToday:function(id){var date,target=$(id),inst=this._getInst(target[0]);this._get(inst,"gotoCurrent")&&inst.currentDay?(inst.selectedDay=inst.currentDay,inst.drawMonth=inst.selectedMonth=inst.currentMonth,inst.drawYear=inst.selectedYear=inst.currentYear):(date=new Date,inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear()),this._notifyChange(inst),this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id),inst=this._getInst(target[0]);inst["selected"+("M"===period?"Month":"Year")]=inst["draw"+("M"===period?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10),this._notifyChange(inst),this._adjustDate(target)},_selectDay:function(id,month,year,td){var inst,target=$(id);$(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])||(inst=this._getInst(target[0]),inst.selectedDay=inst.currentDay=$("a",td).html(),inst.selectedMonth=inst.currentMonth=month,inst.selectedYear=inst.currentYear=year,this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear)))},_clearDate:function(id){var target=$(id);this._selectDate(target,"")},_selectDate:function(id,dateStr){var onSelect,target=$(id),inst=this._getInst(target[0]);dateStr=null!=dateStr?dateStr:this._formatDate(inst),inst.input&&inst.input.val(dateStr),this._updateAlternate(inst),onSelect=this._get(inst,"onSelect"),onSelect?onSelect.apply(inst.input?inst.input[0]:null,[dateStr,inst]):inst.input&&inst.input.trigger("change"),inst.inline?this._updateDatepicker(inst):(this._hideDatepicker(),this._lastInput=inst.input[0],"object"!=typeof inst.input[0]&&inst.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(inst){var altFormat,date,dateStr,altField=this._get(inst,"altField");altField&&(altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat"),date=this._getDate(inst),dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst)),$(altField).val(dateStr))},noWeekends:function(date){var day=date.getDay();return[day>0&&day<6,""]},iso8601Week:function(date){var time,checkDate=new Date(date.getTime());return checkDate.setDate(checkDate.getDate()+4-(checkDate.getDay()||7)),time=checkDate.getTime(),checkDate.setMonth(0),checkDate.setDate(1),Math.floor(Math.round((time-checkDate)/864e5)/7)+1},parseDate:function(format,value,settings){if(null==format||null==value)throw"Invalid arguments";if(value="object"==typeof value?value.toString():value+"",""===value)return null;var iFormat,dim,extra,date,iValue=0,shortYearCutoffTemp=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff,shortYearCutoff="string"!=typeof shortYearCutoffTemp?shortYearCutoffTemp:(new Date).getFullYear()%100+parseInt(shortYearCutoffTemp,10),dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,year=-1,month=-1,day=-1,doy=-1,literal=!1,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches},getNumber=function(match){var isDoubled=lookAhead(match),size="@"===match?14:"!"===match?20:"y"===match&&isDoubled?4:"o"===match?3:2,minSize="y"===match?size:1,digits=new RegExp("^\\d{"+minSize+","+size+"}"),num=value.substring(iValue).match(digits);if(!num)throw"Missing number at position "+iValue;return iValue+=num[0].length,parseInt(num[0],10)},getName=function(match,shortNames,longNames){var index=-1,names=$.map(lookAhead(match)?longNames:shortNames,function(v,k){return[[k,v]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if($.each(names,function(i,pair){var name=pair[1];if(value.substr(iValue,name.length).toLowerCase()===name.toLowerCase())return index=pair[0],iValue+=name.length,!1}),index!==-1)return index+1;throw"Unknown name at position "+iValue},checkLiteral=function(){if(value.charAt(iValue)!==format.charAt(iFormat))throw"Unexpected literal at position "+iValue;iValue++};for(iFormat=0;iFormat<format.length;iFormat++)if(literal)"'"!==format.charAt(iFormat)||lookAhead("'")?checkLiteral():literal=!1;else switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":date=new Date(getNumber("@")),year=date.getFullYear(),month=date.getMonth()+1,day=date.getDate();break;case"!":date=new Date((getNumber("!")-this._ticksTo1970)/1e4),year=date.getFullYear(),month=date.getMonth()+1,day=date.getDate();break;case"'":lookAhead("'")?checkLiteral():literal=!0;break;default:checkLiteral()}if(iValue<value.length&&(extra=value.substr(iValue),!/^\s+/.test(extra)))throw"Extra/unparsed characters found in date: "+extra;if(year===-1?year=(new Date).getFullYear():year<100&&(year+=(new Date).getFullYear()-(new Date).getFullYear()%100+(year<=shortYearCutoff?0:-100)),doy>-1)for(month=1,day=doy;;){if(dim=this._getDaysInMonth(year,month-1),day<=dim)break;month++,day-=dim}if(date=this._daylightSavingAdjust(new Date(year,month-1,day)),
date.getFullYear()!==year||date.getMonth()+1!==month||date.getDate()!==day)throw"Invalid date";return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(format,date,settings){if(!date)return"";var iFormat,dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort,dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames,monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort,monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches},formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match))for(;num.length<len;)num="0"+num;return num},formatName=function(match,value,shortNames,longNames){return lookAhead(match)?longNames[value]:shortNames[value]},output="",literal=!1;if(date)for(iFormat=0;iFormat<format.length;iFormat++)if(literal)"'"!==format.charAt(iFormat)||lookAhead("'")?output+=format.charAt(iFormat):literal=!1;else switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":output+=formatNumber("o",Math.round((new Date(date.getFullYear(),date.getMonth(),date.getDate()).getTime()-new Date(date.getFullYear(),0,0).getTime())/864e5),3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=lookAhead("y")?date.getFullYear():(date.getFullYear()%100<10?"0":"")+date.getFullYear()%100;break;case"@":output+=date.getTime();break;case"!":output+=1e4*date.getTime()+this._ticksTo1970;break;case"'":lookAhead("'")?output+="'":literal=!0;break;default:output+=format.charAt(iFormat)}return output},_possibleChars:function(format){var iFormat,chars="",literal=!1,lookAhead=function(match){var matches=iFormat+1<format.length&&format.charAt(iFormat+1)===match;return matches&&iFormat++,matches};for(iFormat=0;iFormat<format.length;iFormat++)if(literal)"'"!==format.charAt(iFormat)||lookAhead("'")?chars+=format.charAt(iFormat):literal=!1;else switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":lookAhead("'")?chars+="'":literal=!0;break;default:chars+=format.charAt(iFormat)}return chars},_get:function(inst,name){return void 0!==inst.settings[name]?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst,noDefault){if(inst.input.val()!==inst.lastVal){var dateFormat=this._get(inst,"dateFormat"),dates=inst.lastVal=inst.input?inst.input.val():null,defaultDate=this._getDefaultDate(inst),date=defaultDate,settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){dates=noDefault?"":dates}inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear(),inst.currentDay=dates?date.getDate():0,inst.currentMonth=dates?date.getMonth():0,inst.currentYear=dates?date.getFullYear():0,this._adjustInstDate(inst)}},_getDefaultDate:function(inst){return this._restrictMinMax(inst,this._determineDate(inst,this._get(inst,"defaultDate"),new Date))},_determineDate:function(inst,date,defaultDate){var offsetNumeric=function(offset){var date=new Date;return date.setDate(date.getDate()+offset),date},offsetString=function(offset){try{return $.datepicker.parseDate($.datepicker._get(inst,"dateFormat"),offset,$.datepicker._getFormatConfig(inst))}catch(e){}for(var date=(offset.toLowerCase().match(/^c/)?$.datepicker._getDate(inst):null)||new Date,year=date.getFullYear(),month=date.getMonth(),day=date.getDate(),pattern=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,matches=pattern.exec(offset);matches;){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=7*parseInt(matches[1],10);break;case"m":case"M":month+=parseInt(matches[1],10),day=Math.min(day,$.datepicker._getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10),day=Math.min(day,$.datepicker._getDaysInMonth(year,month))}matches=pattern.exec(offset)}return new Date(year,month,day)},newDate=null==date||""===date?defaultDate:"string"==typeof date?offsetString(date):"number"==typeof date?isNaN(date)?defaultDate:offsetNumeric(date):new Date(date.getTime());return newDate=newDate&&"Invalid Date"===newDate.toString()?defaultDate:newDate,newDate&&(newDate.setHours(0),newDate.setMinutes(0),newDate.setSeconds(0),newDate.setMilliseconds(0)),this._daylightSavingAdjust(newDate)},_daylightSavingAdjust:function(date){return date?(date.setHours(date.getHours()>12?date.getHours()+2:0),date):null},_setDate:function(inst,date,noChange){var clear=!date,origMonth=inst.selectedMonth,origYear=inst.selectedYear,newDate=this._restrictMinMax(inst,this._determineDate(inst,date,new Date));inst.selectedDay=inst.currentDay=newDate.getDate(),inst.drawMonth=inst.selectedMonth=inst.currentMonth=newDate.getMonth(),inst.drawYear=inst.selectedYear=inst.currentYear=newDate.getFullYear(),origMonth===inst.selectedMonth&&origYear===inst.selectedYear||noChange||this._notifyChange(inst),this._adjustInstDate(inst),inst.input&&inst.input.val(clear?"":this._formatDate(inst))},_getDate:function(inst){var startDate=!inst.currentYear||inst.input&&""===inst.input.val()?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return startDate},_attachHandlers:function(inst){var stepMonths=this._get(inst,"stepMonths"),id="#"+inst.id.replace(/\\\\/g,"\\");inst.dpDiv.find("[data-handler]").map(function(){var handler={prev:function(){$.datepicker._adjustDate(id,-stepMonths,"M")},next:function(){$.datepicker._adjustDate(id,+stepMonths,"M")},hide:function(){$.datepicker._hideDatepicker()},today:function(){$.datepicker._gotoToday(id)},selectDay:function(){return $.datepicker._selectDay(id,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return $.datepicker._selectMonthYear(id,this,"M"),!1},selectYear:function(){return $.datepicker._selectMonthYear(id,this,"Y"),!1}};$(this).on(this.getAttribute("data-event"),handler[this.getAttribute("data-handler")])})},_generateHTML:function(inst){var maxDraw,prevText,prev,nextText,next,currentText,gotoDate,controls,buttonPanel,firstDay,showWeek,dayNames,dayNamesMin,monthNames,monthNamesShort,beforeShowDay,showOtherMonths,selectOtherMonths,defaultDate,html,dow,row,group,col,selectedDate,cornerClass,calender,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow,tbody,daySettings,otherMonth,unselectable,tempDate=new Date,today=this._daylightSavingAdjust(new Date(tempDate.getFullYear(),tempDate.getMonth(),tempDate.getDate())),isRTL=this._get(inst,"isRTL"),showButtonPanel=this._get(inst,"showButtonPanel"),hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext"),navigationAsDateFormat=this._get(inst,"navigationAsDateFormat"),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,"showCurrentAtPos"),stepMonths=this._get(inst,"stepMonths"),isMultiMonth=1!==numMonths[0]||1!==numMonths[1],currentDate=this._daylightSavingAdjust(inst.currentDay?new Date(inst.currentYear,inst.currentMonth,inst.currentDay):new Date(9999,9,9)),minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear;if(drawMonth<0&&(drawMonth+=12,drawYear--),maxDate)for(maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[0]*numMonths[1]+1,maxDate.getDate())),maxDraw=minDate&&maxDraw<minDate?minDate:maxDraw;this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw;)drawMonth--,drawMonth<0&&(drawMonth=11,drawYear--);for(inst.drawMonth=drawMonth,inst.drawYear=drawYear,prevText=this._get(inst,"prevText"),prevText=navigationAsDateFormat?this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)):prevText,prev=this._canAdjustMonth(inst,-1,drawYear,drawMonth)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>":hideIfNoPrevNext?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+prevText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"e":"w")+"'>"+prevText+"</span></a>",nextText=this._get(inst,"nextText"),nextText=navigationAsDateFormat?this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)):nextText,next=this._canAdjustMonth(inst,1,drawYear,drawMonth)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>":hideIfNoPrevNext?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+nextText+"'><span class='ui-icon ui-icon-circle-triangle-"+(isRTL?"w":"e")+"'>"+nextText+"</span></a>",currentText=this._get(inst,"currentText"),gotoDate=this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today,currentText=navigationAsDateFormat?this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)):currentText,controls=inst.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(inst,"closeText")+"</button>",buttonPanel=showButtonPanel?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"",firstDay=parseInt(this._get(inst,"firstDay"),10),firstDay=isNaN(firstDay)?0:firstDay,showWeek=this._get(inst,"showWeek"),dayNames=this._get(inst,"dayNames"),dayNamesMin=this._get(inst,"dayNamesMin"),monthNames=this._get(inst,"monthNames"),monthNamesShort=this._get(inst,"monthNamesShort"),beforeShowDay=this._get(inst,"beforeShowDay"),showOtherMonths=this._get(inst,"showOtherMonths"),selectOtherMonths=this._get(inst,"selectOtherMonths"),defaultDate=this._getDefaultDate(inst),html="",row=0;row<numMonths[0];row++){for(group="",this.maxRows=4,col=0;col<numMonths[1];col++){if(selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay)),cornerClass=" ui-corner-all",calender="",isMultiMonth){if(calender+="<div class='ui-datepicker-group",numMonths[1]>1)switch(col){case 0:calender+=" ui-datepicker-group-first",cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+=" ui-datepicker-group-last",cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+=" ui-datepicker-group-middle",cornerClass=""}calender+="'>"}for(calender+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+cornerClass+"'>"+(/all|left/.test(cornerClass)&&0===row?isRTL?next:prev:"")+(/all|right/.test(cornerClass)&&0===row?isRTL?prev:next:"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+"</div><table class='ui-datepicker-calendar'><thead><tr>",thead=showWeek?"<th class='ui-datepicker-week-col'>"+this._get(inst,"weekHeader")+"</th>":"",dow=0;dow<7;dow++)day=(dow+firstDay)%7,thead+="<th scope='col'"+((dow+firstDay+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+dayNames[day]+"'>"+dayNamesMin[day]+"</span></th>";for(calender+=thead+"</tr></thead><tbody>",daysInMonth=this._getDaysInMonth(drawYear,drawMonth),drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth&&(inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)),leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7,curRows=Math.ceil((leadDays+daysInMonth)/7),numRows=isMultiMonth&&this.maxRows>curRows?this.maxRows:curRows,this.maxRows=numRows,printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays)),dRow=0;dRow<numRows;dRow++){for(calender+="<tr>",tbody=showWeek?"<td class='ui-datepicker-week-col'>"+this._get(inst,"calculateWeek")(printDate)+"</td>":"",dow=0;dow<7;dow++)daySettings=beforeShowDay?beforeShowDay.apply(inst.input?inst.input[0]:null,[printDate]):[!0,""],otherMonth=printDate.getMonth()!==drawMonth,unselectable=otherMonth&&!selectOtherMonths||!daySettings[0]||minDate&&printDate<minDate||maxDate&&printDate>maxDate,tbody+="<td class='"+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+(printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent||defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime()?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()===currentDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()===today.getTime()?" ui-datepicker-today":""))+"'"+(otherMonth&&!showOtherMonths||!daySettings[2]?"":" title='"+daySettings[2].replace(/'/g,"&#39;")+"'")+(unselectable?"":" data-handler='selectDay' data-event='click' data-month='"+printDate.getMonth()+"' data-year='"+printDate.getFullYear()+"'")+">"+(otherMonth&&!showOtherMonths?"&#xa0;":unselectable?"<span class='ui-state-default'>"+printDate.getDate()+"</span>":"<a class='ui-state-default"+(printDate.getTime()===today.getTime()?" ui-state-highlight":"")+(printDate.getTime()===currentDate.getTime()?" ui-state-active":"")+(otherMonth?" ui-priority-secondary":"")+"' href='#'>"+printDate.getDate()+"</a>")+"</td>",printDate.setDate(printDate.getDate()+1),printDate=this._daylightSavingAdjust(printDate);calender+=tbody+"</tr>"}drawMonth++,drawMonth>11&&(drawMonth=0,drawYear++),calender+="</tbody></table>"+(isMultiMonth?"</div>"+(numMonths[0]>0&&col===numMonths[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),group+=calender}html+=group}return html+=buttonPanel,inst._keyEvent=!1,html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,secondary,monthNames,monthNamesShort){var inMinYear,inMaxYear,month,years,thisYear,determineYear,year,endYear,changeMonth=this._get(inst,"changeMonth"),changeYear=this._get(inst,"changeYear"),showMonthAfterYear=this._get(inst,"showMonthAfterYear"),html="<div class='ui-datepicker-title'>",monthHtml="";if(secondary||!changeMonth)monthHtml+="<span class='ui-datepicker-month'>"+monthNames[drawMonth]+"</span>";else{for(inMinYear=minDate&&minDate.getFullYear()===drawYear,inMaxYear=maxDate&&maxDate.getFullYear()===drawYear,monthHtml+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",month=0;month<12;month++)(!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())&&(monthHtml+="<option value='"+month+"'"+(month===drawMonth?" selected='selected'":"")+">"+monthNamesShort[month]+"</option>");monthHtml+="</select>"}if(showMonthAfterYear||(html+=monthHtml+(!secondary&&changeMonth&&changeYear?"":"&#xa0;")),!inst.yearshtml)if(inst.yearshtml="",secondary||!changeYear)html+="<span class='ui-datepicker-year'>"+drawYear+"</span>";else{for(years=this._get(inst,"yearRange").split(":"),thisYear=(new Date).getFullYear(),determineYear=function(value){var year=value.match(/c[+\-].*/)?drawYear+parseInt(value.substring(1),10):value.match(/[+\-].*/)?thisYear+parseInt(value,10):parseInt(value,10);return isNaN(year)?thisYear:year},year=determineYear(years[0]),endYear=Math.max(year,determineYear(years[1]||"")),year=minDate?Math.max(year,minDate.getFullYear()):year,endYear=maxDate?Math.min(endYear,maxDate.getFullYear()):endYear,inst.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";year<=endYear;year++)inst.yearshtml+="<option value='"+year+"'"+(year===drawYear?" selected='selected'":"")+">"+year+"</option>";inst.yearshtml+="</select>",html+=inst.yearshtml,inst.yearshtml=null}return html+=this._get(inst,"yearSuffix"),showMonthAfterYear&&(html+=(!secondary&&changeMonth&&changeYear?"":"&#xa0;")+monthHtml),html+="</div>"},_adjustInstDate:function(inst,offset,period){var year=inst.selectedYear+("Y"===period?offset:0),month=inst.selectedMonth+("M"===period?offset:0),day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+("D"===period?offset:0),date=this._restrictMinMax(inst,this._daylightSavingAdjust(new Date(year,month,day)));inst.selectedDay=date.getDate(),inst.drawMonth=inst.selectedMonth=date.getMonth(),inst.drawYear=inst.selectedYear=date.getFullYear(),"M"!==period&&"Y"!==period||this._notifyChange(inst)},_restrictMinMax:function(inst,date){var minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),newDate=minDate&&date<minDate?minDate:date;return maxDate&&newDate>maxDate?maxDate:newDate},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");onChange&&onChange.apply(inst.input?inst.input[0]:null,[inst.selectedYear,inst.selectedMonth+1,inst])},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return null==numMonths?[1,1]:"number"==typeof numMonths?[1,numMonths]:numMonths},_getMinMaxDate:function(inst,minMax){return this._determineDate(inst,this._get(inst,minMax+"Date"),null)},_getDaysInMonth:function(year,month){return 32-this._daylightSavingAdjust(new Date(year,month,32)).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst),date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[0]*numMonths[1]),1));return offset<0&&date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth())),this._isInRange(inst,date)},_isInRange:function(inst,date){var yearSplit,currentYear,minDate=this._getMinMaxDate(inst,"min"),maxDate=this._getMinMaxDate(inst,"max"),minYear=null,maxYear=null,years=this._get(inst,"yearRange");return years&&(yearSplit=years.split(":"),currentYear=(new Date).getFullYear(),minYear=parseInt(yearSplit[0],10),maxYear=parseInt(yearSplit[1],10),yearSplit[0].match(/[+\-].*/)&&(minYear+=currentYear),yearSplit[1].match(/[+\-].*/)&&(maxYear+=currentYear)),(!minDate||date.getTime()>=minDate.getTime())&&(!maxDate||date.getTime()<=maxDate.getTime())&&(!minYear||date.getFullYear()>=minYear)&&(!maxYear||date.getFullYear()<=maxYear)},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");return shortYearCutoff="string"!=typeof shortYearCutoff?shortYearCutoff:(new Date).getFullYear()%100+parseInt(shortYearCutoff,10),{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){day||(inst.currentDay=inst.selectedDay,inst.currentMonth=inst.selectedMonth,inst.currentYear=inst.selectedYear);var date=day?"object"==typeof day?day:this._daylightSavingAdjust(new Date(year,month,day)):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}}),$.fn.datepicker=function(options){if(!this.length)return this;$.datepicker.initialized||($(document).on("mousedown",$.datepicker._checkExternalClick),$.datepicker.initialized=!0),0===$("#"+$.datepicker._mainDivId).length&&$("body").append($.datepicker.dpDiv);var otherArgs=Array.prototype.slice.call(arguments,1);return"string"!=typeof options||"isDisabled"!==options&&"getDate"!==options&&"widget"!==options?"option"===options&&2===arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs)):this.each(function(){"string"==typeof options?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)}):$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.12.0";var mouseHandled=($.datepicker,$.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),!1);$(document).on("mouseup",function(){mouseHandled=!1});$.widget("ui.mouse",{version:"1.12.0",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var that=this;this.element.on("mousedown."+this.widgetName,function(event){return that._mouseDown(event)}).on("click."+this.widgetName,function(event){if(!0===$.data(event.target,that.widgetName+".preventClickEvent"))return $.removeData(event.target,that.widgetName+".preventClickEvent"),event.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(event){if(!mouseHandled){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(event),this._mouseDownEvent=event;var that=this,btnIsLeft=1===event.which,elIsCancel=!("string"!=typeof this.options.cancel||!event.target.nodeName)&&$(event.target).closest(this.options.cancel).length;return!(btnIsLeft&&!elIsCancel&&this._mouseCapture(event))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){that.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(event)&&this._mouseDelayMet(event)&&(this._mouseStarted=this._mouseStart(event)!==!1,!this._mouseStarted)?(event.preventDefault(),!0):(!0===$.data(event.target,this.widgetName+".preventClickEvent")&&$.removeData(event.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(event){return that._mouseMove(event)},this._mouseUpDelegate=function(event){return that._mouseUp(event)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),event.preventDefault(),mouseHandled=!0,!0))}},_mouseMove:function(event){if(this._mouseMoved){if($.ui.ie&&(!document.documentMode||document.documentMode<9)&&!event.button)return this._mouseUp(event);if(!event.which)if(event.originalEvent.altKey||event.originalEvent.ctrlKey||event.originalEvent.metaKey||event.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(event)}return(event.which||event.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(event),event.preventDefault()):(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,event)!==!1,this._mouseStarted?this._mouseDrag(event):this._mouseUp(event)),!this._mouseStarted)},_mouseUp:function(event){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,event.target===this._mouseDownEvent.target&&$.data(event.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(event)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,mouseHandled=!1,event.preventDefault()},_mouseDistanceMet:function(event){return Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),$.ui.plugin={add:function(module,option,set){var i,proto=$.ui[module].prototype;for(i in set)proto.plugins[i]=proto.plugins[i]||[],proto.plugins[i].push([option,set[i]])},call:function(instance,name,args,allowDisconnected){var i,set=instance.plugins[name];if(set&&(allowDisconnected||instance.element[0].parentNode&&11!==instance.element[0].parentNode.nodeType))for(i=0;i<set.length;i++)instance.options[set[i][0]]&&set[i][1].apply(instance.element,args)}},$.ui.safeBlur=function(element){element&&"body"!==element.nodeName.toLowerCase()&&$(element).trigger("blur")};$.widget("ui.draggable",$.ui.mouse,{version:"1.12.0",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(key,value){this._super(key,value),"handle"===key&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(event){var o=this.options;return this._blurActiveElement(event),!(this.helper||o.disabled||$(event.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(event),!!this.handle&&(this._blockFrames(o.iframeFix===!0?"iframe":o.iframeFix),!0))},_blockFrames:function(selector){this.iframeBlocks=this.document.find(selector).map(function(){var iframe=$(this);return $("<div>").css("position","absolute").appendTo(iframe.parent()).outerWidth(iframe.outerWidth()).outerHeight(iframe.outerHeight()).offset(iframe.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(event){var activeElement=$.ui.safeActiveElement(this.document[0]),target=$(event.target);this._getHandle(event)&&target.closest(activeElement).length||$.ui.safeBlur(activeElement)},_mouseStart:function(event){var o=this.options;return this.helper=this._createHelper(event),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),$.ui.ddmanager&&($.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===$(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(event),this.originalPosition=this.position=this._generatePosition(event,!1),this.originalPageX=event.pageX,this.originalPageY=event.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this._setContainment(),this._trigger("start",event)===!1?(this._clear(),!1):(this._cacheHelperProportions(),$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event),this._mouseDrag(event,!0),$.ui.ddmanager&&$.ui.ddmanager.dragStart(this,event),!0)},_refreshOffsets:function(event){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:event.pageX-this.offset.left,top:event.pageY-this.offset.top}},_mouseDrag:function(event,noPropagation){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(event,!0),this.positionAbs=this._convertPositionTo("absolute"),!noPropagation){var ui=this._uiHash();if(this._trigger("drag",event,ui)===!1)return this._mouseUp(new $.Event("mouseup",event)),!1;this.position=ui.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",$.ui.ddmanager&&$.ui.ddmanager.drag(this,event),!1},_mouseStop:function(event){var that=this,dropped=!1;return $.ui.ddmanager&&!this.options.dropBehaviour&&(dropped=$.ui.ddmanager.drop(this,event)),this.dropped&&(dropped=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!dropped||"valid"===this.options.revert&&dropped||this.options.revert===!0||$.isFunction(this.options.revert)&&this.options.revert.call(this.element,dropped)?$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){that._trigger("stop",event)!==!1&&that._clear()}):this._trigger("stop",event)!==!1&&this._clear(),!1},_mouseUp:function(event){return this._unblockFrames(),$.ui.ddmanager&&$.ui.ddmanager.dragStop(this,event),this.handleElement.is(event.target)&&this.element.trigger("focus"),$.ui.mouse.prototype._mouseUp.call(this,event)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new $.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(event){return!this.options.handle||!!$(event.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(event){var o=this.options,helperIsFunction=$.isFunction(o.helper),helper=helperIsFunction?$(o.helper.apply(this.element[0],[event])):"clone"===o.helper?this.element.clone().removeAttr("id"):this.element;return helper.parents("body").length||helper.appendTo("parent"===o.appendTo?this.element[0].parentNode:o.appendTo),helperIsFunction&&helper[0]===this.element[0]&&this._setPositionRelative(),helper[0]===this.element[0]||/(fixed|absolute)/.test(helper.css("position"))||helper.css("position","absolute"),helper},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(obj){"string"==typeof obj&&(obj=obj.split(" ")),$.isArray(obj)&&(obj={left:+obj[0],top:+obj[1]||0}),"left"in obj&&(this.offset.click.left=obj.left+this.margins.left),"right"in obj&&(this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left),"top"in obj&&(this.offset.click.top=obj.top+this.margins.top),"bottom"in obj&&(this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top)},_isRootNode:function(element){return/(html|body)/i.test(element.tagName)||element===this.document[0]},_getParentOffset:function(){var po=this.offsetParent.offset(),document=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(po.left+=this.scrollParent.scrollLeft(),po.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(po={top:0,left:0}),{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var p=this.element.position(),scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+(scrollIsRootNode?0:this.scrollParent.scrollTop()),left:p.left-(parseInt(this.helper.css("left"),10)||0)+(scrollIsRootNode?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,
right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var isUserScrollable,c,ce,o=this.options,document=this.document[0];return this.relativeContainer=null,o.containment?"window"===o.containment?void(this.containment=[$(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,$(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,$(window).scrollLeft()+$(window).width()-this.helperProportions.width-this.margins.left,$(window).scrollTop()+($(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===o.containment?void(this.containment=[0,0,$(document).width()-this.helperProportions.width-this.margins.left,($(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):o.containment.constructor===Array?void(this.containment=o.containment):("parent"===o.containment&&(o.containment=this.helper[0].parentNode),c=$(o.containment),ce=c[0],void(ce&&(isUserScrollable=/(scroll|auto)/.test(c.css("overflow")),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(isUserScrollable?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(isUserScrollable?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c))):void(this.containment=null)},_convertPositionTo:function(d,pos){pos||(pos=this.position);var mod="absolute"===d?1:-1,scrollIsRootNode=this._isRootNode(this.scrollParent[0]);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-("fixed"===this.cssPosition?-this.offset.scroll.top:scrollIsRootNode?0:this.offset.scroll.top)*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-("fixed"===this.cssPosition?-this.offset.scroll.left:scrollIsRootNode?0:this.offset.scroll.left)*mod}},_generatePosition:function(event,constrainPosition){var containment,co,top,left,o=this.options,scrollIsRootNode=this._isRootNode(this.scrollParent[0]),pageX=event.pageX,pageY=event.pageY;return scrollIsRootNode&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),constrainPosition&&(this.containment&&(this.relativeContainer?(co=this.relativeContainer.offset(),containment=[this.containment[0]+co.left,this.containment[1]+co.top,this.containment[2]+co.left,this.containment[3]+co.top]):containment=this.containment,event.pageX-this.offset.click.left<containment[0]&&(pageX=containment[0]+this.offset.click.left),event.pageY-this.offset.click.top<containment[1]&&(pageY=containment[1]+this.offset.click.top),event.pageX-this.offset.click.left>containment[2]&&(pageX=containment[2]+this.offset.click.left),event.pageY-this.offset.click.top>containment[3]&&(pageY=containment[3]+this.offset.click.top)),o.grid&&(top=o.grid[1]?this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,pageY=containment?top-this.offset.click.top>=containment[1]||top-this.offset.click.top>containment[3]?top:top-this.offset.click.top>=containment[1]?top-o.grid[1]:top+o.grid[1]:top,left=o.grid[0]?this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,pageX=containment?left-this.offset.click.left>=containment[0]||left-this.offset.click.left>containment[2]?left:left-this.offset.click.left>=containment[0]?left-o.grid[0]:left+o.grid[0]:left),"y"===o.axis&&(pageX=this.originalPageX),"x"===o.axis&&(pageY=this.originalPageY)),{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:scrollIsRootNode?0:this.offset.scroll.top),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:scrollIsRootNode?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(type,event,ui){return ui=ui||this._uiHash(),$.ui.plugin.call(this,type,[event,ui,this],!0),/^(drag|start|stop)/.test(type)&&(this.positionAbs=this._convertPositionTo("absolute"),ui.offset=this.positionAbs),$.Widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),$.ui.plugin.add("draggable","connectToSortable",{start:function(event,ui,draggable){var uiSortable=$.extend({},ui,{item:draggable.element});draggable.sortables=[],$(draggable.options.connectToSortable).each(function(){var sortable=$(this).sortable("instance");sortable&&!sortable.options.disabled&&(draggable.sortables.push(sortable),sortable.refreshPositions(),sortable._trigger("activate",event,uiSortable))})},stop:function(event,ui,draggable){var uiSortable=$.extend({},ui,{item:draggable.element});draggable.cancelHelperRemoval=!1,$.each(draggable.sortables,function(){var sortable=this;sortable.isOver?(sortable.isOver=0,draggable.cancelHelperRemoval=!0,sortable.cancelHelperRemoval=!1,sortable._storedCSS={position:sortable.placeholder.css("position"),top:sortable.placeholder.css("top"),left:sortable.placeholder.css("left")},sortable._mouseStop(event),sortable.options.helper=sortable.options._helper):(sortable.cancelHelperRemoval=!0,sortable._trigger("deactivate",event,uiSortable))})},drag:function(event,ui,draggable){$.each(draggable.sortables,function(){var innermostIntersecting=!1,sortable=this;sortable.positionAbs=draggable.positionAbs,sortable.helperProportions=draggable.helperProportions,sortable.offset.click=draggable.offset.click,sortable._intersectsWith(sortable.containerCache)&&(innermostIntersecting=!0,$.each(draggable.sortables,function(){return this.positionAbs=draggable.positionAbs,this.helperProportions=draggable.helperProportions,this.offset.click=draggable.offset.click,this!==sortable&&this._intersectsWith(this.containerCache)&&$.contains(sortable.element[0],this.element[0])&&(innermostIntersecting=!1),innermostIntersecting})),innermostIntersecting?(sortable.isOver||(sortable.isOver=1,draggable._parent=ui.helper.parent(),sortable.currentItem=ui.helper.appendTo(sortable.element).data("ui-sortable-item",!0),sortable.options._helper=sortable.options.helper,sortable.options.helper=function(){return ui.helper[0]},event.target=sortable.currentItem[0],sortable._mouseCapture(event,!0),sortable._mouseStart(event,!0,!0),sortable.offset.click.top=draggable.offset.click.top,sortable.offset.click.left=draggable.offset.click.left,sortable.offset.parent.left-=draggable.offset.parent.left-sortable.offset.parent.left,sortable.offset.parent.top-=draggable.offset.parent.top-sortable.offset.parent.top,draggable._trigger("toSortable",event),draggable.dropped=sortable.element,$.each(draggable.sortables,function(){this.refreshPositions()}),draggable.currentItem=draggable.element,sortable.fromOutside=draggable),sortable.currentItem&&(sortable._mouseDrag(event),ui.position=sortable.position)):sortable.isOver&&(sortable.isOver=0,sortable.cancelHelperRemoval=!0,sortable.options._revert=sortable.options.revert,sortable.options.revert=!1,sortable._trigger("out",event,sortable._uiHash(sortable)),sortable._mouseStop(event,!0),sortable.options.revert=sortable.options._revert,sortable.options.helper=sortable.options._helper,sortable.placeholder&&sortable.placeholder.remove(),ui.helper.appendTo(draggable._parent),draggable._refreshOffsets(event),ui.position=draggable._generatePosition(event,!0),draggable._trigger("fromSortable",event),draggable.dropped=!1,$.each(draggable.sortables,function(){this.refreshPositions()}))})}}),$.ui.plugin.add("draggable","cursor",{start:function(event,ui,instance){var t=$("body"),o=instance.options;t.css("cursor")&&(o._cursor=t.css("cursor")),t.css("cursor",o.cursor)},stop:function(event,ui,instance){var o=instance.options;o._cursor&&$("body").css("cursor",o._cursor)}}),$.ui.plugin.add("draggable","opacity",{start:function(event,ui,instance){var t=$(ui.helper),o=instance.options;t.css("opacity")&&(o._opacity=t.css("opacity")),t.css("opacity",o.opacity)},stop:function(event,ui,instance){var o=instance.options;o._opacity&&$(ui.helper).css("opacity",o._opacity)}}),$.ui.plugin.add("draggable","scroll",{start:function(event,ui,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(event,ui,i){var o=i.options,scrolled=!1,scrollParent=i.scrollParentNotHidden[0],document=i.document[0];scrollParent!==document&&"HTML"!==scrollParent.tagName?(o.axis&&"x"===o.axis||(i.overflowOffset.top+scrollParent.offsetHeight-event.pageY<o.scrollSensitivity?scrollParent.scrollTop=scrolled=scrollParent.scrollTop+o.scrollSpeed:event.pageY-i.overflowOffset.top<o.scrollSensitivity&&(scrollParent.scrollTop=scrolled=scrollParent.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(i.overflowOffset.left+scrollParent.offsetWidth-event.pageX<o.scrollSensitivity?scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft+o.scrollSpeed:event.pageX-i.overflowOffset.left<o.scrollSensitivity&&(scrollParent.scrollLeft=scrolled=scrollParent.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(event.pageY-$(document).scrollTop()<o.scrollSensitivity?scrolled=$(document).scrollTop($(document).scrollTop()-o.scrollSpeed):$(window).height()-(event.pageY-$(document).scrollTop())<o.scrollSensitivity&&(scrolled=$(document).scrollTop($(document).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(event.pageX-$(document).scrollLeft()<o.scrollSensitivity?scrolled=$(document).scrollLeft($(document).scrollLeft()-o.scrollSpeed):$(window).width()-(event.pageX-$(document).scrollLeft())<o.scrollSensitivity&&(scrolled=$(document).scrollLeft($(document).scrollLeft()+o.scrollSpeed)))),scrolled!==!1&&$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(i,event)}}),$.ui.plugin.add("draggable","snap",{start:function(event,ui,i){var o=i.options;i.snapElements=[],$(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each(function(){var $t=$(this),$o=$t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:$t.outerWidth(),height:$t.outerHeight(),top:$o.top,left:$o.left})})},drag:function(event,ui,inst){var ts,bs,ls,rs,l,r,t,b,i,first,o=inst.options,d=o.snapTolerance,x1=ui.offset.left,x2=x1+inst.helperProportions.width,y1=ui.offset.top,y2=y1+inst.helperProportions.height;for(i=inst.snapElements.length-1;i>=0;i--)l=inst.snapElements[i].left-inst.margins.left,r=l+inst.snapElements[i].width,t=inst.snapElements[i].top-inst.margins.top,b=t+inst.snapElements[i].height,x2<l-d||x1>r+d||y2<t-d||y1>b+d||!$.contains(inst.snapElements[i].item.ownerDocument,inst.snapElements[i].item)?(inst.snapElements[i].snapping&&inst.options.snap.release&&inst.options.snap.release.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})),inst.snapElements[i].snapping=!1):("inner"!==o.snapMode&&(ts=Math.abs(t-y2)<=d,bs=Math.abs(b-y1)<=d,ls=Math.abs(l-x2)<=d,rs=Math.abs(r-x1)<=d,ts&&(ui.position.top=inst._convertPositionTo("relative",{top:t-inst.helperProportions.height,left:0}).top),bs&&(ui.position.top=inst._convertPositionTo("relative",{top:b,left:0}).top),ls&&(ui.position.left=inst._convertPositionTo("relative",{top:0,left:l-inst.helperProportions.width}).left),rs&&(ui.position.left=inst._convertPositionTo("relative",{top:0,left:r}).left)),first=ts||bs||ls||rs,"outer"!==o.snapMode&&(ts=Math.abs(t-y1)<=d,bs=Math.abs(b-y2)<=d,ls=Math.abs(l-x1)<=d,rs=Math.abs(r-x2)<=d,ts&&(ui.position.top=inst._convertPositionTo("relative",{top:t,left:0}).top),bs&&(ui.position.top=inst._convertPositionTo("relative",{top:b-inst.helperProportions.height,left:0}).top),ls&&(ui.position.left=inst._convertPositionTo("relative",{top:0,left:l}).left),rs&&(ui.position.left=inst._convertPositionTo("relative",{top:0,left:r-inst.helperProportions.width}).left)),!inst.snapElements[i].snapping&&(ts||bs||ls||rs||first)&&inst.options.snap.snap&&inst.options.snap.snap.call(inst.element,event,$.extend(inst._uiHash(),{snapItem:inst.snapElements[i].item})),inst.snapElements[i].snapping=ts||bs||ls||rs||first)}}),$.ui.plugin.add("draggable","stack",{start:function(event,ui,instance){var min,o=instance.options,group=$.makeArray($(o.stack)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||0)-(parseInt($(b).css("zIndex"),10)||0)});group.length&&(min=parseInt($(group[0]).css("zIndex"),10)||0,$(group).each(function(i){$(this).css("zIndex",min+i)}),this.css("zIndex",min+group.length))}}),$.ui.plugin.add("draggable","zIndex",{start:function(event,ui,instance){var t=$(ui.helper),o=instance.options;t.css("zIndex")&&(o._zIndex=t.css("zIndex")),t.css("zIndex",o.zIndex)},stop:function(event,ui,instance){var o=instance.options;o._zIndex&&$(ui.helper).css("zIndex",o._zIndex)}});$.ui.draggable;$.widget("ui.resizable",$.ui.mouse,{version:"1.12.0",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(value){return parseFloat(value)||0},_isNumber:function(value){return!isNaN(parseFloat(value))},_hasScroll:function(el,a){if("hidden"===$(el).css("overflow"))return!1;var scroll=a&&"left"===a?"scrollLeft":"scrollTop",has=!1;return el[scroll]>0||(el[scroll]=1,has=el[scroll]>0,el[scroll]=0,has)},_create:function(){var margins,o=this.options,that=this;this._addClass("ui-resizable"),$.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap($("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,margins={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(margins),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(margins),this._proportionallyResize()),this._setupHandles(),o.autoHide&&$(this.element).on("mouseenter",function(){o.disabled||(that._removeClass("ui-resizable-autohide"),that._handles.show())}).on("mouseleave",function(){o.disabled||that.resizing||(that._addClass("ui-resizable-autohide"),that._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var wrapper,_destroy=function(exp){$(exp).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(_destroy(this.element),wrapper=this.element,this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")}).insertAfter(wrapper),wrapper.remove()),this.originalElement.css("resize",this.originalResizeStyle),_destroy(this.originalElement),this},_setOption:function(key,value){switch(this._super(key,value),key){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var handle,i,n,hname,axis,o=this.options,that=this;if(this.handles=o.handles||($(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=$(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},i=0;i<n.length;i++)handle=$.trim(n[i]),hname="ui-resizable-"+handle,axis=$("<div>"),this._addClass(axis,"ui-resizable-handle "+hname),axis.css({zIndex:o.zIndex}),this.handles[handle]=".ui-resizable-"+handle,this.element.append(axis);this._renderAxis=function(target){var i,axis,padPos,padWrapper;target=target||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=$(this.handles[i]),this._on(this.handles[i],{mousedown:that._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(axis=$(this.handles[i],this.element),padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth(),padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),target.css(padPos,padWrapper),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){that.resizing||(this.className&&(axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),that.axis=axis&&axis[1]?axis[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(event){var i,handle,capture=!1;for(i in this.handles)handle=$(this.handles[i])[0],(handle===event.target||$.contains(handle,event.target))&&(capture=!0);return!this.options.disabled&&capture},_mouseStart:function(event){var curleft,curtop,cursor,o=this.options,el=this.element;return this.resizing=!0,this._renderProxy(),curleft=this._num(this.helper.css("left")),curtop=this._num(this.helper.css("top")),o.containment&&(curleft+=$(o.containment).scrollLeft()||0,curtop+=$(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:curleft,top:curtop},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:el.width(),height:el.height()},this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()},this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()},this.originalPosition={left:curleft,top:curtop},this.originalMousePosition={left:event.pageX,top:event.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,cursor=$(".ui-resizable-"+this.axis).css("cursor"),$("body").css("cursor","auto"===cursor?this.axis+"-resize":cursor),this._addClass("ui-resizable-resizing"),this._propagate("start",event),!0},_mouseDrag:function(event){var data,props,smp=this.originalMousePosition,a=this.axis,dx=event.pageX-smp.left||0,dy=event.pageY-smp.top||0,trigger=this._change[a];return this._updatePrevProperties(),!!trigger&&(data=trigger.apply(this,[event,dx,dy]),this._updateVirtualBoundaries(event.shiftKey),(this._aspectRatio||event.shiftKey)&&(data=this._updateRatio(data,event)),data=this._respectSize(data,event),this._updateCache(data),this._propagate("resize",event),props=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),$.isEmptyObject(props)||(this._updatePrevProperties(),this._trigger("resize",event,this.ui()),this._applyChanges()),!1)},_mouseStop:function(event){this.resizing=!1;var pr,ista,soffseth,soffsetw,s,left,top,o=this.options,that=this;return this._helper&&(pr=this._proportionallyResizeElements,ista=pr.length&&/textarea/i.test(pr[0].nodeName),soffseth=ista&&this._hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,s={width:that.helper.width()-soffsetw,height:that.helper.height()-soffseth},left=parseFloat(that.element.css("left"))+(that.position.left-that.originalPosition.left)||null,top=parseFloat(that.element.css("top"))+(that.position.top-that.originalPosition.top)||null,o.animate||this.element.css($.extend(s,{top:top,left:left})),that.helper.height(that.size.height),that.helper.width(that.size.width),this._helper&&!o.animate&&this._proportionallyResize()),$("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",event),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var props={};return this.position.top!==this.prevPosition.top&&(props.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(props.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(props.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(props.height=this.size.height+"px"),this.helper.css(props),props},_updateVirtualBoundaries:function(forceAspectRatio){var pMinWidth,pMaxWidth,pMinHeight,pMaxHeight,b,o=this.options;b={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||forceAspectRatio)&&(pMinWidth=b.minHeight*this.aspectRatio,pMinHeight=b.minWidth/this.aspectRatio,pMaxWidth=b.maxHeight*this.aspectRatio,pMaxHeight=b.maxWidth/this.aspectRatio,pMinWidth>b.minWidth&&(b.minWidth=pMinWidth),pMinHeight>b.minHeight&&(b.minHeight=pMinHeight),pMaxWidth<b.maxWidth&&(b.maxWidth=pMaxWidth),pMaxHeight<b.maxHeight&&(b.maxHeight=pMaxHeight)),this._vBoundaries=b},_updateCache:function(data){this.offset=this.helper.offset(),this._isNumber(data.left)&&(this.position.left=data.left),this._isNumber(data.top)&&(this.position.top=data.top),this._isNumber(data.height)&&(this.size.height=data.height),this._isNumber(data.width)&&(this.size.width=data.width)},_updateRatio:function(data){var cpos=this.position,csize=this.size,a=this.axis;return this._isNumber(data.height)?data.width=data.height*this.aspectRatio:this._isNumber(data.width)&&(data.height=data.width/this.aspectRatio),"sw"===a&&(data.left=cpos.left+(csize.width-data.width),data.top=null),"nw"===a&&(data.top=cpos.top+(csize.height-data.height),data.left=cpos.left+(csize.width-data.width)),data},_respectSize:function(data){var o=this._vBoundaries,a=this.axis,ismaxw=this._isNumber(data.width)&&o.maxWidth&&o.maxWidth<data.width,ismaxh=this._isNumber(data.height)&&o.maxHeight&&o.maxHeight<data.height,isminw=this._isNumber(data.width)&&o.minWidth&&o.minWidth>data.width,isminh=this._isNumber(data.height)&&o.minHeight&&o.minHeight>data.height,dw=this.originalPosition.left+this.originalSize.width,dh=this.originalPosition.top+this.originalSize.height,cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);return isminw&&(data.width=o.minWidth),isminh&&(data.height=o.minHeight),ismaxw&&(data.width=o.maxWidth),ismaxh&&(data.height=o.maxHeight),isminw&&cw&&(data.left=dw-o.minWidth),ismaxw&&cw&&(data.left=dw-o.maxWidth),isminh&&ch&&(data.top=dh-o.minHeight),ismaxh&&ch&&(data.top=dh-o.maxHeight),data.width||data.height||data.left||!data.top?data.width||data.height||data.top||!data.left||(data.left=null):data.top=null,data},_getPaddingPlusBorderDimensions:function(element){for(var i=0,widths=[],borders=[element.css("borderTopWidth"),element.css("borderRightWidth"),element.css("borderBottomWidth"),element.css("borderLeftWidth")],paddings=[element.css("paddingTop"),element.css("paddingRight"),element.css("paddingBottom"),element.css("paddingLeft")];i<4;i++)widths[i]=parseFloat(borders[i])||0,widths[i]+=parseFloat(paddings[i])||0;return{height:widths[0]+widths[2],width:widths[1]+widths[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var prel,i=0,element=this.helper||this.element;i<this._proportionallyResizeElements.length;i++)prel=this._proportionallyResizeElements[i],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(prel)),prel.css({height:element.height()-this.outerDimensions.height||0,width:element.width()-this.outerDimensions.width||0})},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset(),this._helper?(this.helper=this.helper||$("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++o.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(event,dx){return{width:this.originalSize.width+dx}},w:function(event,dx){var cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]),"resize"!==n&&this._trigger(n,event,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),$.ui.plugin.add("resizable","animate",{stop:function(event){var that=$(this).resizable("instance"),o=that.options,pr=that._proportionallyResizeElements,ista=pr.length&&/textarea/i.test(pr[0].nodeName),soffseth=ista&&that._hasScroll(pr[0],"left")?0:that.sizeDiff.height,soffsetw=ista?0:that.sizeDiff.width,style={width:that.size.width-soffsetw,height:that.size.height-soffseth},left=parseFloat(that.element.css("left"))+(that.position.left-that.originalPosition.left)||null,top=parseFloat(that.element.css("top"))+(that.position.top-that.originalPosition.top)||null;that.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseFloat(that.element.css("width")),height:parseFloat(that.element.css("height")),top:parseFloat(that.element.css("top")),left:parseFloat(that.element.css("left"))};pr&&pr.length&&$(pr[0]).css({width:data.width,height:data.height}),that._updateCache(data),that._propagate("resize",event)}})}}),$.ui.plugin.add("resizable","containment",{start:function(){var element,p,co,ch,cw,width,height,that=$(this).resizable("instance"),o=that.options,el=that.element,oc=o.containment,ce=oc instanceof $?oc.get(0):/parent/.test(oc)?el.parent().get(0):oc;ce&&(that.containerElement=$(ce),/document/.test(oc)||oc===document?(that.containerOffset={left:0,top:0},that.containerPosition={left:0,top:0},that.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}):(element=$(ce),p=[],$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=that._num(element.css("padding"+name))}),that.containerOffset=element.offset(),that.containerPosition=element.position(),that.containerSize={height:element.innerHeight()-p[3],width:element.innerWidth()-p[1]},co=that.containerOffset,ch=that.containerSize.height,cw=that.containerSize.width,width=that._hasScroll(ce,"left")?ce.scrollWidth:cw,height=that._hasScroll(ce)?ce.scrollHeight:ch,that.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}))},resize:function(event){var woset,hoset,isParent,isOffsetRelative,that=$(this).resizable("instance"),o=that.options,co=that.containerOffset,cp=that.position,pRatio=that._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=that.containerElement,continueResize=!0;ce[0]!==document&&/static/.test(ce.css("position"))&&(cop=co),cp.left<(that._helper?co.left:0)&&(that.size.width=that.size.width+(that._helper?that.position.left-co.left:that.position.left-cop.left),pRatio&&(that.size.height=that.size.width/that.aspectRatio,continueResize=!1),that.position.left=o.helper?co.left:0),cp.top<(that._helper?co.top:0)&&(that.size.height=that.size.height+(that._helper?that.position.top-co.top:that.position.top),pRatio&&(that.size.width=that.size.height*that.aspectRatio,continueResize=!1),that.position.top=that._helper?co.top:0),isParent=that.containerElement.get(0)===that.element.parent().get(0),isOffsetRelative=/relative|absolute/.test(that.containerElement.css("position")),isParent&&isOffsetRelative?(that.offset.left=that.parentData.left+that.position.left,that.offset.top=that.parentData.top+that.position.top):(that.offset.left=that.element.offset().left,that.offset.top=that.element.offset().top),woset=Math.abs(that.sizeDiff.width+(that._helper?that.offset.left-cop.left:that.offset.left-co.left)),hoset=Math.abs(that.sizeDiff.height+(that._helper?that.offset.top-cop.top:that.offset.top-co.top)),woset+that.size.width>=that.parentData.width&&(that.size.width=that.parentData.width-woset,pRatio&&(that.size.height=that.size.width/that.aspectRatio,continueResize=!1)),hoset+that.size.height>=that.parentData.height&&(that.size.height=that.parentData.height-hoset,pRatio&&(that.size.width=that.size.height*that.aspectRatio,continueResize=!1)),continueResize||(that.position.left=that.prevPosition.left,that.position.top=that.prevPosition.top,that.size.width=that.prevSize.width,that.size.height=that.prevSize.height)},stop:function(){var that=$(this).resizable("instance"),o=that.options,co=that.containerOffset,cop=that.containerPosition,ce=that.containerElement,helper=$(that.helper),ho=helper.offset(),w=helper.outerWidth()-that.sizeDiff.width,h=helper.outerHeight()-that.sizeDiff.height;that._helper&&!o.animate&&/relative/.test(ce.css("position"))&&$(this).css({left:ho.left-cop.left-co.left,width:w,height:h}),that._helper&&!o.animate&&/static/.test(ce.css("position"))&&$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}),$.ui.plugin.add("resizable","alsoResize",{start:function(){var that=$(this).resizable("instance"),o=that.options;$(o.alsoResize).each(function(){var el=$(this);el.data("ui-resizable-alsoresize",{width:parseFloat(el.width()),height:parseFloat(el.height()),left:parseFloat(el.css("left")),top:parseFloat(el.css("top"))})})},resize:function(event,ui){var that=$(this).resizable("instance"),o=that.options,os=that.originalSize,op=that.originalPosition,delta={
height:that.size.height-os.height||0,width:that.size.width-os.width||0,top:that.position.top-op.top||0,left:that.position.left-op.left||0};$(o.alsoResize).each(function(){var el=$(this),start=$(this).data("ui-resizable-alsoresize"),style={},css=el.parents(ui.originalElement[0]).length?["width","height"]:["width","height","top","left"];$.each(css,function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);sum&&sum>=0&&(style[prop]=sum||null)}),el.css(style)})},stop:function(){$(this).removeData("ui-resizable-alsoresize")}}),$.ui.plugin.add("resizable","ghost",{start:function(){var that=$(this).resizable("instance"),cs=that.size;that.ghost=that.originalElement.clone(),that.ghost.css({opacity:.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}),that._addClass(that.ghost,"ui-resizable-ghost"),$.uiBackCompat!==!1&&"string"==typeof that.options.ghost&&that.ghost.addClass(this.options.ghost),that.ghost.appendTo(that.helper)},resize:function(){var that=$(this).resizable("instance");that.ghost&&that.ghost.css({position:"relative",height:that.size.height,width:that.size.width})},stop:function(){var that=$(this).resizable("instance");that.ghost&&that.helper&&that.helper.get(0).removeChild(that.ghost.get(0))}}),$.ui.plugin.add("resizable","grid",{resize:function(){var outerDimensions,that=$(this).resizable("instance"),o=that.options,cs=that.size,os=that.originalSize,op=that.originalPosition,a=that.axis,grid="number"==typeof o.grid?[o.grid,o.grid]:o.grid,gridX=grid[0]||1,gridY=grid[1]||1,ox=Math.round((cs.width-os.width)/gridX)*gridX,oy=Math.round((cs.height-os.height)/gridY)*gridY,newWidth=os.width+ox,newHeight=os.height+oy,isMaxWidth=o.maxWidth&&o.maxWidth<newWidth,isMaxHeight=o.maxHeight&&o.maxHeight<newHeight,isMinWidth=o.minWidth&&o.minWidth>newWidth,isMinHeight=o.minHeight&&o.minHeight>newHeight;o.grid=grid,isMinWidth&&(newWidth+=gridX),isMinHeight&&(newHeight+=gridY),isMaxWidth&&(newWidth-=gridX),isMaxHeight&&(newHeight-=gridY),/^(se|s|e)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight):/^(ne)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight,that.position.top=op.top-oy):/^(sw)$/.test(a)?(that.size.width=newWidth,that.size.height=newHeight,that.position.left=op.left-ox):((newHeight-gridY<=0||newWidth-gridX<=0)&&(outerDimensions=that._getPaddingPlusBorderDimensions(this)),newHeight-gridY>0?(that.size.height=newHeight,that.position.top=op.top-oy):(newHeight=gridY-outerDimensions.height,that.size.height=newHeight,that.position.top=op.top+os.height-newHeight),newWidth-gridX>0?(that.size.width=newWidth,that.position.left=op.left-ox):(newWidth=gridX-outerDimensions.width,that.size.width=newWidth,that.position.left=op.left+os.width-newWidth))}});$.ui.resizable;$.widget("ui.dialog",{version:"1.12.0",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(pos){var topOffset=$(this).css(pos).offset().top;topOffset<0&&$(this).css("top",pos.top-topOffset)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&$.fn.draggable&&this._makeDraggable(),this.options.resizable&&$.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var element=this.options.appendTo;return element&&(element.jquery||element.nodeType)?$(element):this.document.find(element||"body").eq(0)},_destroy:function(){var next,originalPosition=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),next=originalPosition.parent.children().eq(originalPosition.index),next.length&&next[0]!==this.element[0]?next.before(this.element):originalPosition.parent.append(this.element)},widget:function(){return this.uiDialog},disable:$.noop,enable:$.noop,close:function(event){var that=this;this._isOpen&&this._trigger("beforeClose",event)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||$.ui.safeBlur($.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){that._trigger("close",event)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(event,silent){var moved=!1,zIndices=this.uiDialog.siblings(".ui-front:visible").map(function(){return+$(this).css("z-index")}).get(),zIndexMax=Math.max.apply(null,zIndices);return zIndexMax>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",zIndexMax+1),moved=!0),moved&&!silent&&this._trigger("focus",event),moved},open:function(){var that=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=$($.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){that._focusTabbable(),that._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var hasFocus=this._focusedElement;hasFocus||(hasFocus=this.element.find("[autofocus]")),hasFocus.length||(hasFocus=this.element.find(":tabbable")),hasFocus.length||(hasFocus=this.uiDialogButtonPane.find(":tabbable")),hasFocus.length||(hasFocus=this.uiDialogTitlebarClose.filter(":tabbable")),hasFocus.length||(hasFocus=this.uiDialog),hasFocus.eq(0).trigger("focus")},_keepFocus:function(event){function checkFocus(){var activeElement=$.ui.safeActiveElement(this.document[0]),isActive=this.uiDialog[0]===activeElement||$.contains(this.uiDialog[0],activeElement);isActive||this._focusTabbable()}event.preventDefault(),checkFocus.call(this),this._delay(checkFocus)},_createWrapper:function(){this.uiDialog=$("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(event){if(this.options.closeOnEscape&&!event.isDefaultPrevented()&&event.keyCode&&event.keyCode===$.ui.keyCode.ESCAPE)return event.preventDefault(),void this.close(event);if(event.keyCode===$.ui.keyCode.TAB&&!event.isDefaultPrevented()){var tabbables=this.uiDialog.find(":tabbable"),first=tabbables.filter(":first"),last=tabbables.filter(":last");event.target!==last[0]&&event.target!==this.uiDialog[0]||event.shiftKey?event.target!==first[0]&&event.target!==this.uiDialog[0]||!event.shiftKey||(this._delay(function(){last.trigger("focus")}),event.preventDefault()):(this._delay(function(){first.trigger("focus")}),event.preventDefault())}},mousedown:function(event){this._moveToTop(event)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var uiDialogTitle;this.uiDialogTitlebar=$("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(event){$(event.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=$("<button type='button'></button>").button({label:$("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(event){event.preventDefault(),this.close(event)}}),uiDialogTitle=$("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(uiDialogTitle,"ui-dialog-title"),this._title(uiDialogTitle),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":uiDialogTitle.attr("id")})},_title:function(title){this.options.title?title.text(this.options.title):title.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=$("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=$("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var that=this,buttons=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),$.isEmptyObject(buttons)||$.isArray(buttons)&&!buttons.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):($.each(buttons,function(name,props){var click,buttonOptions;props=$.isFunction(props)?{click:props,text:name}:props,props=$.extend({type:"button"},props),click=props.click,buttonOptions={icon:props.icon,iconPosition:props.iconPosition,showLabel:props.showLabel},delete props.click,delete props.icon,delete props.iconPosition,delete props.showLabel,$("<button></button>",props).button(buttonOptions).appendTo(that.uiButtonSet).on("click",function(){click.apply(that.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function filteredUi(ui){return{position:ui.position,offset:ui.offset}}var that=this,options=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(event,ui){that._addClass($(this),"ui-dialog-dragging"),that._blockFrames(),that._trigger("dragStart",event,filteredUi(ui))},drag:function(event,ui){that._trigger("drag",event,filteredUi(ui))},stop:function(event,ui){var left=ui.offset.left-that.document.scrollLeft(),top=ui.offset.top-that.document.scrollTop();options.position={my:"left top",at:"left"+(left>=0?"+":"")+left+" top"+(top>=0?"+":"")+top,of:that.window},that._removeClass($(this),"ui-dialog-dragging"),that._unblockFrames(),that._trigger("dragStop",event,filteredUi(ui))}})},_makeResizable:function(){function filteredUi(ui){return{originalPosition:ui.originalPosition,originalSize:ui.originalSize,position:ui.position,size:ui.size}}var that=this,options=this.options,handles=options.resizable,position=this.uiDialog.css("position"),resizeHandles="string"==typeof handles?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:this._minHeight(),handles:resizeHandles,start:function(event,ui){that._addClass($(this),"ui-dialog-resizing"),that._blockFrames(),that._trigger("resizeStart",event,filteredUi(ui))},resize:function(event,ui){that._trigger("resize",event,filteredUi(ui))},stop:function(event,ui){var offset=that.uiDialog.offset(),left=offset.left-that.document.scrollLeft(),top=offset.top-that.document.scrollTop();options.height=that.uiDialog.height(),options.width=that.uiDialog.width(),options.position={my:"left top",at:"left"+(left>=0?"+":"")+left+" top"+(top>=0?"+":"")+top,of:that.window},that._removeClass($(this),"ui-dialog-resizing"),that._unblockFrames(),that._trigger("resizeStop",event,filteredUi(ui))}}).css("position",position)},_trackFocus:function(){this._on(this.widget(),{focusin:function(event){this._makeFocusTarget(),this._focusedElement=$(event.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var instances=this._trackingInstances(),exists=$.inArray(this,instances);exists!==-1&&instances.splice(exists,1)},_trackingInstances:function(){var instances=this.document.data("ui-dialog-instances");return instances||(instances=[],this.document.data("ui-dialog-instances",instances)),instances},_minHeight:function(){var options=this.options;return"auto"===options.height?options.minHeight:Math.min(options.minHeight,options.height)},_position:function(){var isVisible=this.uiDialog.is(":visible");isVisible||this.uiDialog.show(),this.uiDialog.position(this.options.position),isVisible||this.uiDialog.hide()},_setOptions:function(options){var that=this,resize=!1,resizableOptions={};$.each(options,function(key,value){that._setOption(key,value),key in that.sizeRelatedOptions&&(resize=!0),key in that.resizableRelatedOptions&&(resizableOptions[key]=value)}),resize&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",resizableOptions)},_setOption:function(key,value){var isDraggable,isResizable,uiDialog=this.uiDialog;"disabled"!==key&&(this._super(key,value),"appendTo"===key&&this.uiDialog.appendTo(this._appendTo()),"buttons"===key&&this._createButtons(),"closeText"===key&&this.uiDialogTitlebarClose.button({label:$("<a>").text(""+this.options.closeText).html()}),"draggable"===key&&(isDraggable=uiDialog.is(":data(ui-draggable)"),isDraggable&&!value&&uiDialog.draggable("destroy"),!isDraggable&&value&&this._makeDraggable()),"position"===key&&this._position(),"resizable"===key&&(isResizable=uiDialog.is(":data(ui-resizable)"),isResizable&&!value&&uiDialog.resizable("destroy"),isResizable&&"string"==typeof value&&uiDialog.resizable("option","handles",value),isResizable||value===!1||this._makeResizable()),"title"===key&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var nonContentHeight,minContentHeight,maxContentHeight,options=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),options.minWidth>options.width&&(options.width=options.minWidth),nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).outerHeight(),minContentHeight=Math.max(0,options.minHeight-nonContentHeight),maxContentHeight="number"==typeof options.maxHeight?Math.max(0,options.maxHeight-nonContentHeight):"none","auto"===options.height?this.element.css({minHeight:minContentHeight,maxHeight:maxContentHeight,height:"auto"}):this.element.height(Math.max(0,options.height-nonContentHeight)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var iframe=$(this);return $("<div>").css({position:"absolute",width:iframe.outerWidth(),height:iframe.outerHeight()}).appendTo(iframe.parent()).offset(iframe.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(event){return!!$(event.target).closest(".ui-dialog").length||!!$(event.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var isOpening=!0;this._delay(function(){isOpening=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(event){isOpening||this._allowInteraction(event)||(event.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=$("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var overlays=this.document.data("ui-dialog-overlays")-1;overlays?this.document.data("ui-dialog-overlays",overlays):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),$.uiBackCompat!==!1&&$.widget("ui.dialog",$.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(key,value){"dialogClass"===key&&this.uiDialog.removeClass(this.options.dialogClass).addClass(value),this._superApply(arguments)}});$.ui.dialog;$.widget("ui.droppable",{version:"1.12.0",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var proportions,o=this.options,accept=o.accept;this.isover=!1,this.isout=!0,this.accept=$.isFunction(accept)?accept:function(d){return d.is(accept)},this.proportions=function(){return arguments.length?void(proportions=arguments[0]):proportions?proportions:proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(o.scope),o.addClasses&&this._addClass("ui-droppable")},_addToManager:function(scope){$.ui.ddmanager.droppables[scope]=$.ui.ddmanager.droppables[scope]||[],$.ui.ddmanager.droppables[scope].push(this)},_splice:function(drop){for(var i=0;i<drop.length;i++)drop[i]===this&&drop.splice(i,1)},_destroy:function(){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop)},_setOption:function(key,value){if("accept"===key)this.accept=$.isFunction(value)?value:function(d){return d.is(value)};else if("scope"===key){var drop=$.ui.ddmanager.droppables[this.options.scope];this._splice(drop),this._addToManager(value)}this._super(key,value)},_activate:function(event){var draggable=$.ui.ddmanager.current;this._addActiveClass(),draggable&&this._trigger("activate",event,this.ui(draggable))},_deactivate:function(event){var draggable=$.ui.ddmanager.current;this._removeActiveClass(),draggable&&this._trigger("deactivate",event,this.ui(draggable))},_over:function(event){var draggable=$.ui.ddmanager.current;draggable&&(draggable.currentItem||draggable.element)[0]!==this.element[0]&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this._addHoverClass(),this._trigger("over",event,this.ui(draggable)))},_out:function(event){var draggable=$.ui.ddmanager.current;draggable&&(draggable.currentItem||draggable.element)[0]!==this.element[0]&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this._removeHoverClass(),this._trigger("out",event,this.ui(draggable)))},_drop:function(event,custom){var draggable=custom||$.ui.ddmanager.current,childrenIntersection=!1;return!(!draggable||(draggable.currentItem||draggable.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var inst=$(this).droppable("instance");if(inst.options.greedy&&!inst.options.disabled&&inst.options.scope===draggable.options.scope&&inst.accept.call(inst.element[0],draggable.currentItem||draggable.element)&&intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance,event))return childrenIntersection=!0,!1}),!childrenIntersection&&(!!this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",event,this.ui(draggable)),this.element)))},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var intersect=$.ui.intersect=function(){function isOverAxis(x,reference,size){return x>=reference&&x<reference+size}return function(draggable,droppable,toleranceMode,event){if(!droppable.offset)return!1;var x1=(draggable.positionAbs||draggable.position.absolute).left+draggable.margins.left,y1=(draggable.positionAbs||draggable.position.absolute).top+draggable.margins.top,x2=x1+draggable.helperProportions.width,y2=y1+draggable.helperProportions.height,l=droppable.offset.left,t=droppable.offset.top,r=l+droppable.proportions().width,b=t+droppable.proportions().height;switch(toleranceMode){case"fit":return l<=x1&&x2<=r&&t<=y1&&y2<=b;case"intersect":return l<x1+draggable.helperProportions.width/2&&x2-draggable.helperProportions.width/2<r&&t<y1+draggable.helperProportions.height/2&&y2-draggable.helperProportions.height/2<b;case"pointer":return isOverAxis(event.pageY,t,droppable.proportions().height)&&isOverAxis(event.pageX,l,droppable.proportions().width);case"touch":return(y1>=t&&y1<=b||y2>=t&&y2<=b||y1<t&&y2>b)&&(x1>=l&&x1<=r||x2>=l&&x2<=r||x1<l&&x2>r);default:return!1}}}();$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var i,j,m=$.ui.ddmanager.droppables[t.options.scope]||[],type=event?event.type:null,list=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();droppablesLoop:for(i=0;i<m.length;i++)if(!(m[i].options.disabled||t&&!m[i].accept.call(m[i].element[0],t.currentItem||t.element))){for(j=0;j<list.length;j++)if(list[j]===m[i].element[0]){m[i].proportions().height=0;continue droppablesLoop}m[i].visible="none"!==m[i].element.css("display"),m[i].visible&&("mousedown"===type&&m[i]._activate.call(m[i],event),m[i].offset=m[i].element.offset(),m[i].proportions({width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight}))}},drop:function(draggable,event){var dropped=!1;return $.each(($.ui.ddmanager.droppables[draggable.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&intersect(draggable,this,this.options.tolerance,event)&&(dropped=this._drop.call(this,event)||dropped),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],draggable.currentItem||draggable.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,event)))}),dropped},dragStart:function(draggable,event){draggable.element.parentsUntil("body").on("scroll.droppable",function(){draggable.options.refreshPositions||$.ui.ddmanager.prepareOffsets(draggable,event)})},drag:function(draggable,event){draggable.options.refreshPositions&&$.ui.ddmanager.prepareOffsets(draggable,event),$.each($.ui.ddmanager.droppables[draggable.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var parentInstance,scope,parent,intersects=intersect(draggable,this,this.options.tolerance,event),c=!intersects&&this.isover?"isout":intersects&&!this.isover?"isover":null;c&&(this.options.greedy&&(scope=this.options.scope,parent=this.element.parents(":data(ui-droppable)").filter(function(){return $(this).droppable("instance").options.scope===scope}),parent.length&&(parentInstance=$(parent[0]).droppable("instance"),parentInstance.greedyChild="isover"===c)),parentInstance&&"isover"===c&&(parentInstance.isover=!1,parentInstance.isout=!0,parentInstance._out.call(parentInstance,event)),this[c]=!0,this["isout"===c?"isover":"isout"]=!1,this["isover"===c?"_over":"_out"].call(this,event),parentInstance&&"isout"===c&&(parentInstance.isout=!1,parentInstance.isover=!0,parentInstance._over.call(parentInstance,event)))}})},dragStop:function(draggable,event){draggable.element.parentsUntil("body").off("scroll.droppable"),draggable.options.refreshPositions||$.ui.ddmanager.prepareOffsets(draggable,event)}},$.uiBackCompat!==!1&&$.widget("ui.droppable",$.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});$.ui.droppable,$.widget("ui.progressbar",{version:"1.12.0",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=$("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(newValue){return void 0===newValue?this.options.value:(this.options.value=this._constrainedValue(newValue),void this._refreshValue())},_constrainedValue:function(newValue){return void 0===newValue&&(newValue=this.options.value),this.indeterminate=newValue===!1,"number"!=typeof newValue&&(newValue=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,newValue))},_setOptions:function(options){var value=options.value;delete options.value,this._super(options),this.options.value=this._constrainedValue(value),this._refreshValue()},_setOption:function(key,value){"max"===key&&(value=Math.max(this.min,value)),this._super(key,value)},_setOptionDisabled:function(value){this._super(value),this.element.attr("aria-disabled",value),this._toggleClass(null,"ui-state-disabled",!!value)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var value=this.options.value,percentage=this._percentage();this.valueDiv.toggle(this.indeterminate||value>this.min).width(percentage.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,value===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=$("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":value}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==value&&(this.oldValue=value,this._trigger("change")),value===this.options.max&&this._trigger("complete")}}),$.widget("ui.selectable",$.ui.mouse,{version:"1.12.0",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var that=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){that.elementPos=$(that.element[0]).offset(),that.selectees=$(that.options.filter,that.element[0]),that._addClass(that.selectees,"ui-selectee"),that.selectees.each(function(){var $this=$(this),selecteeOffset=$this.offset(),pos={left:selecteeOffset.left-that.elementPos.left,top:selecteeOffset.top-that.elementPos.top};$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:!1,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=$("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(event){var that=this,options=this.options;this.opos=[event.pageX,event.pageY],this.elementPos=$(this.element[0]).offset(),this.options.disabled||(this.selectees=$(options.filter,this.element[0]),this._trigger("start",event),$(options.appendTo).append(this.helper),this.helper.css({left:event.pageX,top:event.pageY,width:0,height:0}),options.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=!0,event.metaKey||event.ctrlKey||(that._removeClass(selectee.$element,"ui-selected"),selectee.selected=!1,that._addClass(selectee.$element,"ui-unselecting"),selectee.unselecting=!0,that._trigger("unselecting",event,{unselecting:selectee.element}))}),$(event.target).parents().addBack().each(function(){var doSelect,selectee=$.data(this,"selectable-item");if(selectee)return doSelect=!event.metaKey&&!event.ctrlKey||!selectee.$element.hasClass("ui-selected"),that._removeClass(selectee.$element,doSelect?"ui-unselecting":"ui-selected")._addClass(selectee.$element,doSelect?"ui-selecting":"ui-unselecting"),selectee.unselecting=!doSelect,selectee.selecting=doSelect,selectee.selected=doSelect,doSelect?that._trigger("selecting",event,{selecting:selectee.element}):that._trigger("unselecting",event,{unselecting:selectee.element}),!1}))},_mouseDrag:function(event){if(this.dragged=!0,!this.options.disabled){var tmp,that=this,options=this.options,x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;return x1>x2&&(tmp=x2,x2=x1,x1=tmp),y1>y2&&(tmp=y2,y2=y1,y1=tmp),this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1}),this.selectees.each(function(){var selectee=$.data(this,"selectable-item"),hit=!1,offset={};selectee&&selectee.element!==that.element[0]&&(offset.left=selectee.left+that.elementPos.left,offset.right=selectee.right+that.elementPos.left,offset.top=selectee.top+that.elementPos.top,offset.bottom=selectee.bottom+that.elementPos.top,"touch"===options.tolerance?hit=!(offset.left>x2||offset.right<x1||offset.top>y2||offset.bottom<y1):"fit"===options.tolerance&&(hit=offset.left>x1&&offset.right<x2&&offset.top>y1&&offset.bottom<y2),hit?(selectee.selected&&(that._removeClass(selectee.$element,"ui-selected"),selectee.selected=!1),selectee.unselecting&&(that._removeClass(selectee.$element,"ui-unselecting"),selectee.unselecting=!1),selectee.selecting||(that._addClass(selectee.$element,"ui-selecting"),selectee.selecting=!0,that._trigger("selecting",event,{selecting:selectee.element}))):(selectee.selecting&&((event.metaKey||event.ctrlKey)&&selectee.startselected?(that._removeClass(selectee.$element,"ui-selecting"),selectee.selecting=!1,that._addClass(selectee.$element,"ui-selected"),selectee.selected=!0):(that._removeClass(selectee.$element,"ui-selecting"),selectee.selecting=!1,selectee.startselected&&(that._addClass(selectee.$element,"ui-unselecting"),selectee.unselecting=!0),that._trigger("unselecting",event,{unselecting:selectee.element}))),selectee.selected&&(event.metaKey||event.ctrlKey||selectee.startselected||(that._removeClass(selectee.$element,"ui-selected"),selectee.selected=!1,that._addClass(selectee.$element,"ui-unselecting"),selectee.unselecting=!0,that._trigger("unselecting",event,{unselecting:selectee.element})))))}),!1}},_mouseStop:function(event){var that=this;return this.dragged=!1,$(".ui-unselecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");that._removeClass(selectee.$element,"ui-unselecting"),selectee.unselecting=!1,selectee.startselected=!1,that._trigger("unselected",event,{unselected:selectee.element})}),$(".ui-selecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");
that._removeClass(selectee.$element,"ui-selecting")._addClass(selectee.$element,"ui-selected"),selectee.selecting=!1,selectee.selected=!0,selectee.startselected=!0,that._trigger("selected",event,{selected:selectee.element})}),this._trigger("stop",event),this.helper.remove(),!1}}),$.widget("ui.selectmenu",[$.ui.formResetMixin,{version:"1.12.0",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var selectmenuId=this.element.uniqueId().attr("id");this.ids={element:selectmenuId,button:selectmenuId+"-button",menu:selectmenuId+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=$()},_drawButton:function(){var icon,that=this,item=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(event){this.button.focus(),event.preventDefault()}}),this.element.hide(),this.button=$("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),icon=$("<span>").appendTo(this.button),this._addClass(icon,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(item).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){that._rendered||that._refreshMenu()})},_drawMenu:function(){var that=this;this.menu=$("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=$("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(event,ui){event.preventDefault(),that._setSelection(),that._select(ui.item.data("ui-selectmenu-item"),event)},focus:function(event,ui){var item=ui.item.data("ui-selectmenu-item");null!=that.focusIndex&&item.index!==that.focusIndex&&(that._trigger("focus",event,{item:item}),that.isOpen||that._select(item,event)),that.focusIndex=item.index,that.button.attr("aria-activedescendant",that.menuItems.eq(item.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var item,options=this.element.find("option");this.menu.empty(),this._parseOptions(options),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,options.length&&(item=this._getSelectedItem(),this.menuInstance.focus(null,item),this._setAria(item.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(event){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",event)))},_position:function(){this.menuWrap.position($.extend({of:this.button},this.options.position))},close:function(event){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",event))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(item){var buttonItem=$("<span>");return this._setText(buttonItem,item.label),this._addClass(buttonItem,"ui-selectmenu-text"),buttonItem},_renderMenu:function(ul,items){var that=this,currentOptgroup="";$.each(items,function(index,item){var li;item.optgroup!==currentOptgroup&&(li=$("<li>",{text:item.optgroup}),that._addClass(li,"ui-selectmenu-optgroup","ui-menu-divider"+(item.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),li.appendTo(ul),currentOptgroup=item.optgroup),that._renderItemData(ul,item)})},_renderItemData:function(ul,item){return this._renderItem(ul,item).data("ui-selectmenu-item",item)},_renderItem:function(ul,item){var li=$("<li>"),wrapper=$("<div>",{title:item.element.attr("title")});return item.disabled&&this._addClass(li,null,"ui-state-disabled"),this._setText(wrapper,item.label),li.append(wrapper).appendTo(ul)},_setText:function(element,value){value?element.text(value):element.html("&#160;")},_move:function(direction,event){var item,next,filter=".ui-menu-item";this.isOpen?item=this.menuItems.eq(this.focusIndex).parent("li"):(item=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),filter+=":not(.ui-state-disabled)"),next="first"===direction||"last"===direction?item["first"===direction?"prevAll":"nextAll"](filter).eq(-1):item[direction+"All"](filter).eq(0),next.length&&this.menuInstance.focus(event,next)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(event){this[this.isOpen?"close":"open"](event)},_setSelection:function(){var selection;this.range&&(window.getSelection?(selection=window.getSelection(),selection.removeAllRanges(),selection.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(event){this.isOpen&&($(event.target).closest(".ui-selectmenu-menu, #"+$.ui.escapeSelector(this.ids.button)).length||this.close(event))}},_buttonEvents:{mousedown:function(){var selection;window.getSelection?(selection=window.getSelection(),selection.rangeCount&&(this.range=selection.getRangeAt(0))):this.range=document.selection.createRange()},click:function(event){this._setSelection(),this._toggle(event)},keydown:function(event){var preventDefault=!0;switch(event.keyCode){case $.ui.keyCode.TAB:case $.ui.keyCode.ESCAPE:this.close(event),preventDefault=!1;break;case $.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(event);break;case $.ui.keyCode.UP:event.altKey?this._toggle(event):this._move("prev",event);break;case $.ui.keyCode.DOWN:event.altKey?this._toggle(event):this._move("next",event);break;case $.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(event):this._toggle(event);break;case $.ui.keyCode.LEFT:this._move("prev",event);break;case $.ui.keyCode.RIGHT:this._move("next",event);break;case $.ui.keyCode.HOME:case $.ui.keyCode.PAGE_UP:this._move("first",event);break;case $.ui.keyCode.END:case $.ui.keyCode.PAGE_DOWN:this._move("last",event);break;default:this.menu.trigger(event),preventDefault=!1}preventDefault&&event.preventDefault()}},_selectFocusedItem:function(event){var item=this.menuItems.eq(this.focusIndex).parent("li");item.hasClass("ui-state-disabled")||this._select(item.data("ui-selectmenu-item"),event)},_select:function(item,event){var oldIndex=this.element[0].selectedIndex;this.element[0].selectedIndex=item.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(item)),this._setAria(item),this._trigger("select",event,{item:item}),item.index!==oldIndex&&this._trigger("change",event,{item:item}),this.close(event)},_setAria:function(item){var id=this.menuItems.eq(item.index).attr("id");this.button.attr({"aria-labelledby":id,"aria-activedescendant":id}),this.menu.attr("aria-activedescendant",id)},_setOption:function(key,value){if("icons"===key){var icon=this.button.find("span.ui-icon");this._removeClass(icon,null,this.options.icons.button)._addClass(icon,null,value.button)}this._super(key,value),"appendTo"===key&&this.menuWrap.appendTo(this._appendTo()),"width"===key&&this._resizeButton()},_setOptionDisabled:function(value){this._super(value),this.menuInstance.option("disabled",value),this.button.attr("aria-disabled",value),this._toggleClass(this.button,null,"ui-state-disabled",value),this.element.prop("disabled",value),value?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var element=this.options.appendTo;return element&&(element=element.jquery||element.nodeType?$(element):this.document.find(element).eq(0)),element&&element[0]||(element=this.element.closest(".ui-front, dialog")),element.length||(element=this.document[0].body),element},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var width=this.options.width;return width===!1?void this.button.css("width",""):(null===width&&(width=this.element.show().outerWidth(),this.element.hide()),void this.button.outerWidth(width))},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var options=this._super();return options.disabled=this.element.prop("disabled"),options},_parseOptions:function(options){var that=this,data=[];options.each(function(index,item){data.push(that._parseOption($(item),index))}),this.items=data},_parseOption:function(option,index){var optgroup=option.parent("optgroup");return{element:option,index:index,value:option.val(),label:option.text(),optgroup:optgroup.attr("label")||"",disabled:optgroup.prop("disabled")||option.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),$.widget("ui.slider",$.ui.mouse,{version:"1.12.0",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var i,handleCount,options=this.options,existingHandles=this.element.find(".ui-slider-handle"),handle="<span tabindex='0'></span>",handles=[];for(handleCount=options.values&&options.values.length||1,existingHandles.length>handleCount&&(existingHandles.slice(handleCount).remove(),existingHandles=existingHandles.slice(0,handleCount)),i=existingHandles.length;i<handleCount;i++)handles.push(handle);this.handles=existingHandles.add($(handles.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(i){$(this).data("ui-slider-handle-index",i)})},_createRange:function(){var options=this.options;options.range?(options.range===!0&&(options.values?options.values.length&&2!==options.values.length?options.values=[options.values[0],options.values[0]]:$.isArray(options.values)&&(options.values=options.values.slice(0)):options.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=$("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==options.range&&"max"!==options.range||this._addClass(this.range,"ui-slider-range-"+options.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(event){var position,normValue,distance,closestHandle,index,allowed,offset,mouseOverHandle,that=this,o=this.options;return!o.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position),distance=this._valueMax()-this._valueMin()+1,this.handles.each(function(i){var thisDistance=Math.abs(normValue-that.values(i));(distance>thisDistance||distance===thisDistance&&(i===that._lastChangedValue||that.values(i)===o.min))&&(distance=thisDistance,closestHandle=$(this),index=i)}),allowed=this._start(event,index),allowed!==!1&&(this._mouseSliding=!0,this._handleIndex=index,this._addClass(closestHandle,null,"ui-state-active"),closestHandle.trigger("focus"),offset=closestHandle.offset(),mouseOverHandle=!$(event.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-closestHandle.width()/2,top:event.pageY-offset.top-closestHandle.height()/2-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(event,index,normValue),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);return this._slide(event,this._handleIndex,normValue),!1},_mouseStop:function(event){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(event,this._handleIndex),this._change(event,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;return"horizontal"===this.orientation?(pixelTotal=this.elementSize.width,pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(pixelTotal=this.elementSize.height,pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),percentMouse=pixelMouse/pixelTotal,percentMouse>1&&(percentMouse=1),percentMouse<0&&(percentMouse=0),"vertical"===this.orientation&&(percentMouse=1-percentMouse),valueTotal=this._valueMax()-this._valueMin(),valueMouse=this._valueMin()+percentMouse*valueTotal,this._trimAlignValue(valueMouse)},_uiHash:function(index,value,values){var uiHash={handle:this.handles[index],handleIndex:index,value:void 0!==value?value:this.value()};return this._hasMultipleValues()&&(uiHash.value=void 0!==value?value:this.values(index),uiHash.values=values||this.values()),uiHash},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(event,index){return this._trigger("start",event,this._uiHash(index))},_slide:function(event,index,newVal){var allowed,otherVal,currentValue=this.value(),newValues=this.values();this._hasMultipleValues()&&(otherVal=this.values(index?0:1),currentValue=this.values(index),2===this.options.values.length&&this.options.range===!0&&(newVal=0===index?Math.min(otherVal,newVal):Math.max(otherVal,newVal)),newValues[index]=newVal),newVal!==currentValue&&(allowed=this._trigger("slide",event,this._uiHash(index,newVal,newValues)),allowed!==!1&&(this._hasMultipleValues()?this.values(index,newVal):this.value(newVal)))},_stop:function(event,index){this._trigger("stop",event,this._uiHash(index))},_change:function(event,index){this._keySliding||this._mouseSliding||(this._lastChangedValue=index,this._trigger("change",event,this._uiHash(index)))},value:function(newValue){return arguments.length?(this.options.value=this._trimAlignValue(newValue),this._refreshValue(),void this._change(null,0)):this._value()},values:function(index,newValue){var vals,newValues,i;if(arguments.length>1)return this.options.values[index]=this._trimAlignValue(newValue),this._refreshValue(),void this._change(null,index);if(!arguments.length)return this._values();if(!$.isArray(arguments[0]))return this._hasMultipleValues()?this._values(index):this.value();for(vals=this.options.values,newValues=arguments[0],i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(newValues[i]),this._change(null,i);this._refreshValue()},_setOption:function(key,value){var i,valsLength=0;switch("range"===key&&this.options.range===!0&&("min"===value?(this.options.value=this._values(0),this.options.values=null):"max"===value&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),$.isArray(this.options.values)&&(valsLength=this.options.values.length),this._super(key,value),key){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(value),this.handles.css("horizontal"===value?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=valsLength-1;i>=0;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(value){this._super(value),this._toggleClass(null,"ui-state-disabled",!!value)},_value:function(){var val=this.options.value;return val=this._trimAlignValue(val)},_values:function(index){var val,vals,i;if(arguments.length)return val=this.options.values[index],val=this._trimAlignValue(val);if(this._hasMultipleValues()){for(vals=this.options.values.slice(),i=0;i<vals.length;i+=1)vals[i]=this._trimAlignValue(vals[i]);return vals}return[]},_trimAlignValue:function(val){if(val<=this._valueMin())return this._valueMin();if(val>=this._valueMax())return this._valueMax();var step=this.options.step>0?this.options.step:1,valModStep=(val-this._valueMin())%step,alignValue=val-valModStep;return 2*Math.abs(valModStep)>=step&&(alignValue+=valModStep>0?step:-step),parseFloat(alignValue.toFixed(5))},_calculateNewMax:function(){var max=this.options.max,min=this._valueMin(),step=this.options.step,aboveMin=Math.round((max-min)/step)*step;max=aboveMin+min,max>this.options.max&&(max-=step),this.max=parseFloat(max.toFixed(this._precision()))},_precision:function(){var precision=this._precisionOf(this.options.step);return null!==this.options.min&&(precision=Math.max(precision,this._precisionOf(this.options.min))),precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return decimal===-1?0:str.length-decimal-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(orientation){"vertical"===orientation&&this.range.css({width:"",left:""}),"horizontal"===orientation&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var lastValPercent,valPercent,value,valueMin,valueMax,oRange=this.options.range,o=this.options,that=this,animate=!this._animateOff&&o.animate,_set={};this._hasMultipleValues()?this.handles.each(function(i){valPercent=(that.values(i)-that._valueMin())/(that._valueMax()-that._valueMin())*100,_set["horizontal"===that.orientation?"left":"bottom"]=valPercent+"%",$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate),that.options.range===!0&&("horizontal"===that.orientation?(0===i&&that.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate),1===i&&that.range[animate?"animate":"css"]({width:valPercent-lastValPercent+"%"},{queue:!1,duration:o.animate})):(0===i&&that.range.stop(1,1)[animate?"animate":"css"]({bottom:valPercent+"%"},o.animate),1===i&&that.range[animate?"animate":"css"]({height:valPercent-lastValPercent+"%"},{queue:!1,duration:o.animate}))),lastValPercent=valPercent}):(value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0,_set["horizontal"===this.orientation?"left":"bottom"]=valPercent+"%",this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate),"min"===oRange&&"horizontal"===this.orientation&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate),"max"===oRange&&"horizontal"===this.orientation&&this.range.stop(1,1)[animate?"animate":"css"]({width:100-valPercent+"%"},o.animate),"min"===oRange&&"vertical"===this.orientation&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate),"max"===oRange&&"vertical"===this.orientation&&this.range.stop(1,1)[animate?"animate":"css"]({height:100-valPercent+"%"},o.animate))},_handleEvents:{keydown:function(event){var allowed,curVal,newVal,step,index=$(event.target).data("ui-slider-handle-index");switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(event.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass($(event.target),null,"ui-state-active"),allowed=this._start(event,index),allowed===!1))return}switch(step=this.options.step,curVal=newVal=this._hasMultipleValues()?this.values(index):this.value(),event.keyCode){case $.ui.keyCode.HOME:newVal=this._valueMin();break;case $.ui.keyCode.END:newVal=this._valueMax();break;case $.ui.keyCode.PAGE_UP:newVal=this._trimAlignValue(curVal+(this._valueMax()-this._valueMin())/this.numPages);break;case $.ui.keyCode.PAGE_DOWN:newVal=this._trimAlignValue(curVal-(this._valueMax()-this._valueMin())/this.numPages);break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===this._valueMax())return;newVal=this._trimAlignValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===this._valueMin())return;newVal=this._trimAlignValue(curVal-step)}this._slide(event,index,newVal)},keyup:function(event){var index=$(event.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(event,index),this._change(event,index),this._removeClass($(event.target),null,"ui-state-active"))}}}),$.widget("ui.sortable",$.ui.mouse,{version:"1.12.0",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(x,reference,size){return x>=reference&&x<reference+size},_isFloating:function(item){return/left|right/.test(item.css("float"))||/inline|table-cell/.test(item.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(key,value){this._super(key,value),"handle"===key&&this._setHandleClassName()},_setHandleClassName:function(){var that=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),$.each(this.items,function(){that._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--)this.items[i].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(event,overrideHandle){var currentItem=null,validHandle=!1,that=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(event),$(event.target).parents().each(function(){if($.data(this,that.widgetName+"-item")===that)return currentItem=$(this),!1}),$.data(event.target,that.widgetName+"-item")===that&&(currentItem=$(event.target)),!!currentItem&&(!(this.options.handle&&!overrideHandle&&($(this.options.handle,currentItem).find("*").addBack().each(function(){this===event.target&&(validHandle=!0)}),!validHandle))&&(this.currentItem=currentItem,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(event,overrideHandle,noActivation){var i,body,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(event),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(event),this.originalPageX=event.pageX,this.originalPageY=event.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(body=this.document.find("body"),this.storedCursor=body.css("cursor"),body.css("cursor",o.cursor),this.storedStylesheet=$("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(body)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",event,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!noActivation)for(i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("activate",event,this._uiHash(this));return $.ui.ddmanager&&($.ui.ddmanager.current=this),$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(event),!0},_mouseDrag:function(event){var i,item,itemElement,intersection,o=this.options,scrolled=!1;for(this.position=this._generatePosition(event),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-event.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed:event.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-event.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed:event.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(event.pageY-this.document.scrollTop()<o.scrollSensitivity?scrolled=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(event.pageY-this.document.scrollTop())<o.scrollSensitivity&&(scrolled=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),event.pageX-this.document.scrollLeft()<o.scrollSensitivity?scrolled=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(event.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(scrolled=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),scrolled!==!1&&$.ui.ddmanager&&!o.dropBehaviour&&$.ui.ddmanager.prepareOffsets(this,event)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item),intersection&&item.instance===this.currentContainer&&!(itemElement===this.currentItem[0]||this.placeholder[1===intersection?"next":"prev"]()[0]===itemElement||$.contains(this.placeholder[0],itemElement)||"semi-dynamic"===this.options.type&&$.contains(this.element[0],itemElement))){if(this.direction=1===intersection?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(item))break;this._rearrange(event,item),this._trigger("change",event,this._uiHash());break}return this._contactContainers(event),$.ui.ddmanager&&$.ui.ddmanager.drag(this,event),this._trigger("sort",event,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(event,noPropagation){if(event){if($.ui.ddmanager&&!this.options.dropBehaviour&&$.ui.ddmanager.drop(this,event),this.options.revert){var that=this,cur=this.placeholder.offset(),axis=this.options.axis,animation={};axis&&"x"!==axis||(animation.left=cur.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),axis&&"y"!==axis||(animation.top=cur.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,$(this.helper).animate(animation,parseInt(this.options.revert,10)||500,function(){that._clear(event)})}else this._clear(event,noPropagation);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("deactivate",null,this._uiHash(this)),this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",null,this._uiHash(this)),this.containers[i].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),$.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?$(this.domPosition.prev).after(this.currentItem):$(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected),str=[];return o=o||{},$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||/(.+)[\-=_](.+)/);res&&str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]))}),!str.length&&o.key&&str.push(o.key+"="),str.join("&");
},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected),ret=[];return o=o||{},items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"")}),ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height,l=item.left,r=l+item.width,t=item.top,b=t+item.height,dyClick=this.offset.click.top,dxClick=this.offset.click.left,isOverElementHeight="x"===this.options.axis||y1+dyClick>t&&y1+dyClick<b,isOverElementWidth="y"===this.options.axis||x1+dxClick>l&&x1+dxClick<r,isOverElement=isOverElementHeight&&isOverElementWidth;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"]?isOverElement:l<x1+this.helperProportions.width/2&&x2-this.helperProportions.width/2<r&&t<y1+this.helperProportions.height/2&&y2-this.helperProportions.height/2<b},_intersectsWithPointer:function(item){var verticalDirection,horizontalDirection,isOverElementHeight="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth;return!!isOverElement&&(verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection(),this.floating?"right"===horizontalDirection||"down"===verticalDirection?2:1:verticalDirection&&("down"===verticalDirection?2:1))},_intersectsWithSides:function(item){var isOverBottomHalf=this._isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+item.height/2,item.height),isOverRightHalf=this._isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+item.width/2,item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();return this.floating&&horizontalDirection?"right"===horizontalDirection&&isOverRightHalf||"left"===horizontalDirection&&!isOverRightHalf:verticalDirection&&("down"===verticalDirection&&isOverBottomHalf||"up"===verticalDirection&&!isOverBottomHalf)},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return 0!==delta&&(delta>0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return 0!==delta&&(delta>0?"right":"left")},refresh:function(event){return this._refreshItems(event),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var options=this.options;return options.connectWith.constructor===String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){function addItems(){items.push(this)}var i,j,cur,inst,items=[],queries=[],connectWith=this._connectWith();if(connectWith&&connected)for(i=connectWith.length-1;i>=0;i--)for(cur=$(connectWith[i],this.document[0]),j=cur.length-1;j>=0;j--)inst=$.data(cur[j],this.widgetFullName),inst&&inst!==this&&!inst.options.disabled&&queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),inst]);for(queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=queries.length-1;i>=0;i--)queries[i][0].each(addItems);return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=$.grep(this.items,function(item){for(var j=0;j<list.length;j++)if(list[j]===item.item[0])return!1;return!0})},_refreshItems:function(event){this.items=[],this.containers=[this];var i,j,cur,inst,targetData,_queries,item,queriesLength,items=this.items,queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]],connectWith=this._connectWith();if(connectWith&&this.ready)for(i=connectWith.length-1;i>=0;i--)for(cur=$(connectWith[i],this.document[0]),j=cur.length-1;j>=0;j--)inst=$.data(cur[j],this.widgetFullName),inst&&inst!==this&&!inst.options.disabled&&(queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]),this.containers.push(inst));for(i=queries.length-1;i>=0;i--)for(targetData=queries[i][1],_queries=queries[i][0],j=0,queriesLength=_queries.length;j<queriesLength;j++)item=$(_queries[j]),item.data(this.widgetName+"-item",targetData),items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0})},refreshPositions:function(fast){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,item,t,p;for(i=this.items.length-1;i>=0;i--)item=this.items[i],item.instance!==this.currentContainer&&this.currentContainer&&item.item[0]!==this.currentItem[0]||(t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item,fast||(item.width=t.outerWidth(),item.height=t.outerHeight()),p=t.offset(),item.left=p.left,item.top=p.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)p=this.containers[i].element.offset(),this.containers[i].containerCache.left=p.left,this.containers[i].containerCache.top=p.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(that){that=that||this;var className,o=that.options;o.placeholder&&o.placeholder.constructor!==String||(className=o.placeholder,o.placeholder={element:function(){var nodeName=that.currentItem[0].nodeName.toLowerCase(),element=$("<"+nodeName+">",that.document[0]);return that._addClass(element,"ui-sortable-placeholder",className||that.currentItem[0].className)._removeClass(element,"ui-sortable-helper"),"tbody"===nodeName?that._createTrPlaceholder(that.currentItem.find("tr").eq(0),$("<tr>",that.document[0]).appendTo(element)):"tr"===nodeName?that._createTrPlaceholder(that.currentItem,element):"img"===nodeName&&element.attr("src",that.currentItem.attr("src")),className||element.css("visibility","hidden"),element},update:function(container,p){className&&!o.forcePlaceholderSize||(p.height()||p.height(that.currentItem.innerHeight()-parseInt(that.currentItem.css("paddingTop")||0,10)-parseInt(that.currentItem.css("paddingBottom")||0,10)),p.width()||p.width(that.currentItem.innerWidth()-parseInt(that.currentItem.css("paddingLeft")||0,10)-parseInt(that.currentItem.css("paddingRight")||0,10)))}}),that.placeholder=$(o.placeholder.element.call(that.element,that.currentItem)),that.currentItem.after(that.placeholder),o.placeholder.update(that,that.placeholder)},_createTrPlaceholder:function(sourceTr,targetTr){var that=this;sourceTr.children().each(function(){$("<td>&#160;</td>",that.document[0]).attr("colspan",$(this).attr("colspan")||1).appendTo(targetTr)})},_contactContainers:function(event){var i,j,dist,itemWithLeastDistance,posProperty,sizeProperty,cur,nearBottom,floating,axis,innermostContainer=null,innermostIndex=null;for(i=this.containers.length-1;i>=0;i--)if(!$.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(innermostContainer&&$.contains(this.containers[i].element[0],innermostContainer.element[0]))continue;innermostContainer=this.containers[i],innermostIndex=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",event,this._uiHash(this)),this.containers[i].containerCache.over=0);if(innermostContainer)if(1===this.containers.length)this.containers[innermostIndex].containerCache.over||(this.containers[innermostIndex]._trigger("over",event,this._uiHash(this)),this.containers[innermostIndex].containerCache.over=1);else{for(dist=1e4,itemWithLeastDistance=null,floating=innermostContainer.floating||this._isFloating(this.currentItem),posProperty=floating?"left":"top",sizeProperty=floating?"width":"height",axis=floating?"pageX":"pageY",j=this.items.length-1;j>=0;j--)$.contains(this.containers[innermostIndex].element[0],this.items[j].item[0])&&this.items[j].item[0]!==this.currentItem[0]&&(cur=this.items[j].item.offset()[posProperty],nearBottom=!1,event[axis]-cur>this.items[j][sizeProperty]/2&&(nearBottom=!0),Math.abs(event[axis]-cur)<dist&&(dist=Math.abs(event[axis]-cur),itemWithLeastDistance=this.items[j],this.direction=nearBottom?"up":"down"));if(!itemWithLeastDistance&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[innermostIndex])return void(this.currentContainer.containerCache.over||(this.containers[innermostIndex]._trigger("over",event,this._uiHash()),this.currentContainer.containerCache.over=1));itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,!0):this._rearrange(event,null,this.containers[innermostIndex].element,!0),this._trigger("change",event,this._uiHash()),this.containers[innermostIndex]._trigger("change",event,this._uiHash(this)),this.currentContainer=this.containers[innermostIndex],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[innermostIndex]._trigger("over",event,this._uiHash(this)),this.containers[innermostIndex].containerCache.over=1}},_createHelper:function(event){var o=this.options,helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):"clone"===o.helper?this.currentItem.clone():this.currentItem;return helper.parents("body").length||$("parent"!==o.appendTo?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0]),helper[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),helper[0].style.width&&!o.forceHelperSize||helper.width(this.currentItem.width()),helper[0].style.height&&!o.forceHelperSize||helper.height(this.currentItem.height()),helper},_adjustOffsetFromHelper:function(obj){"string"==typeof obj&&(obj=obj.split(" ")),$.isArray(obj)&&(obj={left:+obj[0],top:+obj[1]||0}),"left"in obj&&(this.offset.click.left=obj.left+this.margins.left),"right"in obj&&(this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left),"top"in obj&&(this.offset.click.top=obj.top+this.margins.top),"bottom"in obj&&(this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])&&(po.left+=this.scrollParent.scrollLeft(),po.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&$.ui.ie)&&(po={top:0,left:0}),{top:po.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:po.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var p=this.currentItem.position();return{top:p.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:p.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var ce,co,over,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(ce=$(o.containment)[0],co=$(o.containment).offset(),over="hidden"!==$(ce).css("overflow"),this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(over?Math.max(ce.scrollWidth,ce.offsetWidth):ce.offsetWidth)-(parseInt($(ce).css("borderLeftWidth"),10)||0)-(parseInt($(ce).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,co.top+(over?Math.max(ce.scrollHeight,ce.offsetHeight):ce.offsetHeight)-(parseInt($(ce).css("borderTopWidth"),10)||0)-(parseInt($(ce).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(d,pos){pos||(pos=this.position);var mod="absolute"===d?1:-1,scroll="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return{top:pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop())*mod,left:pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())*mod}},_generatePosition:function(event){var top,left,o=this.options,pageX=event.pageX,pageY=event.pageY,scroll="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&$.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,scrollIsRootNode=/(html|body)/i.test(scroll[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(event.pageX-this.offset.click.left<this.containment[0]&&(pageX=this.containment[0]+this.offset.click.left),event.pageY-this.offset.click.top<this.containment[1]&&(pageY=this.containment[1]+this.offset.click.top),event.pageX-this.offset.click.left>this.containment[2]&&(pageX=this.containment[2]+this.offset.click.left),event.pageY-this.offset.click.top>this.containment[3]&&(pageY=this.containment[3]+this.offset.click.top)),o.grid&&(top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1],pageY=this.containment?top-this.offset.click.top>=this.containment[1]&&top-this.offset.click.top<=this.containment[3]?top:top-this.offset.click.top>=this.containment[1]?top-o.grid[1]:top+o.grid[1]:top,left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0],pageX=this.containment?left-this.offset.click.left>=this.containment[0]&&left-this.offset.click.left<=this.containment[2]?left:left-this.offset.click.left>=this.containment[0]?left-o.grid[0]:left+o.grid[0]:left)),{top:pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():scrollIsRootNode?0:scroll.scrollTop()),left:pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?i.item[0]:i.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var counter=this.counter;this._delay(function(){counter===this.counter&&this.refreshPositions(!hardRefresh)})},_clear:function(event,noPropagation){function delayEvent(type,instance,container){return function(event){container._trigger(type,event,instance._uiHash(instance))}}this.reverting=!1;var i,delayedTriggers=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!noPropagation&&delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||noPropagation||delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())}),this!==this.currentContainer&&(noPropagation||(delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())}),delayedTriggers.push(function(c){return function(event){c._trigger("receive",event,this._uiHash(this))}}.call(this,this.currentContainer)),delayedTriggers.push(function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)noPropagation||delayedTriggers.push(delayEvent("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(delayedTriggers.push(delayEvent("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,noPropagation||this._trigger("beforeStop",event,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!noPropagation){for(i=0;i<delayedTriggers.length;i++)delayedTriggers[i].call(this,event);this._trigger("stop",event,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){$.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(_inst){var inst=_inst||this;return{helper:inst.helper,placeholder:inst.placeholder||$([]),position:inst.position,originalPosition:inst.originalPosition,offset:inst.positionAbs,item:inst.currentItem,sender:_inst?_inst.element:null}}});$.widget("ui.spinner",{version:"1.12.0",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var options=this._super(),element=this.element;return $.each(["min","max","step"],function(i,option){var value=element.attr(option);null!=value&&value.length&&(options[option]=value)}),options},_events:{keydown:function(event){this._start(event)&&this._keydown(event)&&event.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(event){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",event)))},mousewheel:function(event,delta){if(delta){if(!this.spinning&&!this._start(event))return!1;this._spin((delta>0?1:-1)*this.options.step,event),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(event)},100),event.preventDefault()}},"mousedown .ui-spinner-button":function(event){function checkFocus(){var isActive=this.element[0]===$.ui.safeActiveElement(this.document[0]);isActive||(this.element.trigger("focus"),this.previous=previous,this._delay(function(){this.previous=previous}))}var previous;previous=this.element[0]===$.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),event.preventDefault(),checkFocus.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,checkFocus.call(this)}),this._start(event)!==!1&&this._repeat(null,$(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(event){if($(event.currentTarget).hasClass("ui-state-active"))return this._start(event)!==!1&&void this._repeat(null,$(event.currentTarget).hasClass("ui-spinner-up")?1:-1,event)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(event){var options=this.options,keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.UP:return this._repeat(null,1,event),!0;case keyCode.DOWN:return this._repeat(null,-1,event),!0;case keyCode.PAGE_UP:return this._repeat(null,options.page,event),!0;case keyCode.PAGE_DOWN:return this._repeat(null,-options.page,event),!0}return!1},_start:function(event){return!(!this.spinning&&this._trigger("start",event)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(i,steps,event){i=i||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,steps,event)},i),this._spin(steps*this.options.step,event)},_spin:function(step,event){var value=this.value()||0;this.counter||(this.counter=1),value=this._adjustValue(value+step*this._increment(this.counter)),this.spinning&&this._trigger("spin",event,{value:value})===!1||(this._value(value),this.counter++)},_increment:function(i){var incremental=this.options.incremental;return incremental?$.isFunction(incremental)?incremental(i):Math.floor(i*i*i/5e4-i*i/500+17*i/200+1):1},_precision:function(){var precision=this._precisionOf(this.options.step);return null!==this.options.min&&(precision=Math.max(precision,this._precisionOf(this.options.min))),precision},_precisionOf:function(num){var str=num.toString(),decimal=str.indexOf(".");return decimal===-1?0:str.length-decimal-1},_adjustValue:function(value){var base,aboveMin,options=this.options;return base=null!==options.min?options.min:0,aboveMin=value-base,aboveMin=Math.round(aboveMin/options.step)*options.step,value=base+aboveMin,value=parseFloat(value.toFixed(this._precision())),null!==options.max&&value>options.max?options.max:null!==options.min&&value<options.min?options.min:value},_stop:function(event){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",event))},_setOption:function(key,value){var prevValue,first,last;return"culture"===key||"numberFormat"===key?(prevValue=this._parse(this.element.val()),this.options[key]=value,void this.element.val(this._format(prevValue))):("max"!==key&&"min"!==key&&"step"!==key||"string"==typeof value&&(value=this._parse(value)),"icons"===key&&(first=this.buttons.first().find(".ui-icon"),this._removeClass(first,null,this.options.icons.up),this._addClass(first,null,value.up),last=this.buttons.last().find(".ui-icon"),this._removeClass(last,null,this.options.icons.down),this._addClass(last,null,value.down)),void this._super(key,value))},_setOptionDisabled:function(value){this._super(value),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!value),this.element.prop("disabled",!!value),this.buttons.button(value?"disable":"enable")},_setOptions:spinnerModifer(function(options){this._super(options)}),_parse:function(val){return"string"==typeof val&&""!==val&&(val=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(val,10,this.options.culture):+val),""===val||isNaN(val)?null:val},_format:function(value){return""===value?"":window.Globalize&&this.options.numberFormat?Globalize.format(value,this.options.numberFormat,this.options.culture):value},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var value=this.value();return null!==value&&value===this._adjustValue(value)},_value:function(value,allowAny){var parsed;""!==value&&(parsed=this._parse(value),null!==parsed&&(allowAny||(parsed=this._adjustValue(parsed)),value=this._format(parsed))),this.element.val(value),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:spinnerModifer(function(steps){this._stepUp(steps)}),_stepUp:function(steps){this._start()&&(this._spin((steps||1)*this.options.step),this._stop())},stepDown:spinnerModifer(function(steps){this._stepDown(steps)}),_stepDown:function(steps){this._start()&&(this._spin((steps||1)*-this.options.step),this._stop())},pageUp:spinnerModifer(function(pages){this._stepUp((pages||1)*this.options.page)}),pageDown:spinnerModifer(function(pages){this._stepDown((pages||1)*this.options.page)}),value:function(newVal){return arguments.length?void spinnerModifer(this._value).call(this,newVal):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),$.uiBackCompat!==!1&&$.widget("ui.spinner",$.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});$.ui.spinner;$.widget("ui.tabs",{version:"1.12.0",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var rhash=/#.*$/;return function(anchor){var anchorUrl,locationUrl;anchorUrl=anchor.href.replace(rhash,""),locationUrl=location.href.replace(rhash,"");try{anchorUrl=decodeURIComponent(anchorUrl)}catch(error){}try{locationUrl=decodeURIComponent(locationUrl)}catch(error){}return anchor.hash.length>1&&anchorUrl===locationUrl}}(),_create:function(){var that=this,options=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,options.collapsible),this._processTabs(),options.active=this._initialActive(),$.isArray(options.disabled)&&(options.disabled=$.unique(options.disabled.concat($.map(this.tabs.filter(".ui-state-disabled"),function(li){return that.tabs.index(li)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(options.active):this.active=$(),this._refresh(),this.active.length&&this.load(options.active)},_initialActive:function(){var active=this.options.active,collapsible=this.options.collapsible,locationHash=location.hash.substring(1);return null===active&&(locationHash&&this.tabs.each(function(i,tab){if($(tab).attr("aria-controls")===locationHash)return active=i,!1}),null===active&&(active=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==active&&active!==-1||(active=!!this.tabs.length&&0)),active!==!1&&(active=this.tabs.index(this.tabs.eq(active)),active===-1&&(active=!collapsible&&0)),!collapsible&&active===!1&&this.anchors.length&&(active=0),active},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):$()}},_tabKeydown:function(event){var focusedTab=$($.ui.safeActiveElement(this.document[0])).closest("li"),selectedIndex=this.tabs.index(focusedTab),goingForward=!0;if(!this._handlePageNav(event)){switch(event.keyCode){case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:selectedIndex++;break;case $.ui.keyCode.UP:case $.ui.keyCode.LEFT:goingForward=!1,selectedIndex--;break;case $.ui.keyCode.END:selectedIndex=this.anchors.length-1;break;case $.ui.keyCode.HOME:selectedIndex=0;break;case $.ui.keyCode.SPACE:return event.preventDefault(),clearTimeout(this.activating),void this._activate(selectedIndex);case $.ui.keyCode.ENTER:return event.preventDefault(),clearTimeout(this.activating),void this._activate(selectedIndex!==this.options.active&&selectedIndex);default:return}event.preventDefault(),clearTimeout(this.activating),selectedIndex=this._focusNextTab(selectedIndex,goingForward),event.ctrlKey||event.metaKey||(focusedTab.attr("aria-selected","false"),this.tabs.eq(selectedIndex).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",selectedIndex)},this.delay))}},_panelKeydown:function(event){this._handlePageNav(event)||event.ctrlKey&&event.keyCode===$.ui.keyCode.UP&&(event.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(event){return event.altKey&&event.keyCode===$.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):event.altKey&&event.keyCode===$.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(index,goingForward){function constrain(){return index>lastTabIndex&&(index=0),index<0&&(index=lastTabIndex),index}for(var lastTabIndex=this.tabs.length-1;$.inArray(constrain(),this.options.disabled)!==-1;)index=goingForward?index+1:index-1;return index},_focusNextTab:function(index,goingForward){return index=this._findNextTab(index,goingForward),this.tabs.eq(index).trigger("focus"),index},_setOption:function(key,value){return"active"===key?void this._activate(value):(this._super(key,value),"collapsible"===key&&(this._toggleClass("ui-tabs-collapsible",null,value),value||this.options.active!==!1||this._activate(0)),"event"===key&&this._setupEvents(value),void("heightStyle"===key&&this._setupHeightStyle(value)))},_sanitizeSelector:function(hash){return hash?hash.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var options=this.options,lis=this.tablist.children(":has(a[href])");options.disabled=$.map(lis.filter(".ui-state-disabled"),function(tab){return lis.index(tab)}),this._processTabs(),options.active!==!1&&this.anchors.length?this.active.length&&!$.contains(this.tablist[0],this.active[0])?this.tabs.length===options.disabled.length?(options.active=!1,
this.active=$()):this._activate(this._findNextTab(Math.max(0,options.active-1),!1)):options.active=this.tabs.index(this.active):(options.active=!1,this.active=$()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var that=this,prevTabs=this.tabs,prevAnchors=this.anchors,prevPanels=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(event){$(this).is(".ui-state-disabled")&&event.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){$(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return $("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=$(),this.anchors.each(function(i,anchor){var selector,panel,panelId,anchorId=$(anchor).uniqueId().attr("id"),tab=$(anchor).closest("li"),originalAriaControls=tab.attr("aria-controls");that._isLocal(anchor)?(selector=anchor.hash,panelId=selector.substring(1),panel=that.element.find(that._sanitizeSelector(selector))):(panelId=tab.attr("aria-controls")||$({}).uniqueId()[0].id,selector="#"+panelId,panel=that.element.find(selector),panel.length||(panel=that._createPanel(panelId),panel.insertAfter(that.panels[i-1]||that.tablist)),panel.attr("aria-live","polite")),panel.length&&(that.panels=that.panels.add(panel)),originalAriaControls&&tab.data("ui-tabs-aria-controls",originalAriaControls),tab.attr({"aria-controls":panelId,"aria-labelledby":anchorId}),panel.attr("aria-labelledby",anchorId)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),prevTabs&&(this._off(prevTabs.not(this.tabs)),this._off(prevAnchors.not(this.anchors)),this._off(prevPanels.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(id){return $("<div>").attr("id",id).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(disabled){var currentItem,li,i;for($.isArray(disabled)&&(disabled.length?disabled.length===this.anchors.length&&(disabled=!0):disabled=!1),i=0;li=this.tabs[i];i++)currentItem=$(li),disabled===!0||$.inArray(i,disabled)!==-1?(currentItem.attr("aria-disabled","true"),this._addClass(currentItem,null,"ui-state-disabled")):(currentItem.removeAttr("aria-disabled"),this._removeClass(currentItem,null,"ui-state-disabled"));this.options.disabled=disabled,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,disabled===!0)},_setupEvents:function(event){var events={};event&&$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(event){event.preventDefault()}}),this._on(this.anchors,events),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(heightStyle){var maxHeight,parent=this.element.parent();"fill"===heightStyle?(maxHeight=parent.height(),maxHeight-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");"absolute"!==position&&"fixed"!==position&&(maxHeight-=elem.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){maxHeight-=$(this).outerHeight(!0)}),this.panels.each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()))}).css("overflow","auto")):"auto"===heightStyle&&(maxHeight=0,this.panels.each(function(){maxHeight=Math.max(maxHeight,$(this).height("").height())}).height(maxHeight))},_eventHandler:function(event){var options=this.options,active=this.active,anchor=$(event.currentTarget),tab=anchor.closest("li"),clickedIsActive=tab[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():this._getPanelForTab(tab),toHide=active.length?this._getPanelForTab(active):$(),eventData={oldTab:active,oldPanel:toHide,newTab:collapsing?$():tab,newPanel:toShow};event.preventDefault(),tab.hasClass("ui-state-disabled")||tab.hasClass("ui-tabs-loading")||this.running||clickedIsActive&&!options.collapsible||this._trigger("beforeActivate",event,eventData)===!1||(options.active=!collapsing&&this.tabs.index(tab),this.active=clickedIsActive?$():tab,this.xhr&&this.xhr.abort(),toHide.length||toShow.length||$.error("jQuery UI Tabs: Mismatching fragment identifier."),toShow.length&&this.load(this.tabs.index(tab),event),this._toggle(event,eventData))},_toggle:function(event,eventData){function complete(){that.running=!1,that._trigger("activate",event,eventData)}function show(){that._addClass(eventData.newTab.closest("li"),"ui-tabs-active","ui-state-active"),toShow.length&&that.options.show?that._show(toShow,that.options.show,complete):(toShow.show(),complete())}var that=this,toShow=eventData.newPanel,toHide=eventData.oldPanel;this.running=!0,toHide.length&&this.options.hide?this._hide(toHide,this.options.hide,function(){that._removeClass(eventData.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),show()}):(this._removeClass(eventData.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),toHide.hide(),show()),toHide.attr("aria-hidden","true"),eventData.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),toShow.length&&toHide.length?eventData.oldTab.attr("tabIndex",-1):toShow.length&&this.tabs.filter(function(){return 0===$(this).attr("tabIndex")}).attr("tabIndex",-1),toShow.attr("aria-hidden","false"),eventData.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(index){var anchor,active=this._findActive(index);active[0]!==this.active[0]&&(active.length||(active=this.active),anchor=active.find(".ui-tabs-anchor")[0],this._eventHandler({target:anchor,currentTarget:anchor,preventDefault:$.noop}))},_findActive:function(index){return index===!1?$():this.tabs.eq(index)},_getIndex:function(index){return"string"==typeof index&&(index=this.anchors.index(this.anchors.filter("[href$='"+$.ui.escapeSelector(index)+"']"))),index},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){$.data(this,"ui-tabs-destroy")?$(this).remove():$(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var li=$(this),prev=li.data("ui-tabs-aria-controls");prev?li.attr("aria-controls",prev).removeData("ui-tabs-aria-controls"):li.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(index){var disabled=this.options.disabled;disabled!==!1&&(void 0===index?disabled=!1:(index=this._getIndex(index),disabled=$.isArray(disabled)?$.map(disabled,function(num){return num!==index?num:null}):$.map(this.tabs,function(li,num){return num!==index?num:null})),this._setOptionDisabled(disabled))},disable:function(index){var disabled=this.options.disabled;if(disabled!==!0){if(void 0===index)disabled=!0;else{if(index=this._getIndex(index),$.inArray(index,disabled)!==-1)return;disabled=$.isArray(disabled)?$.merge([index],disabled).sort():[index]}this._setOptionDisabled(disabled)}},load:function(index,event){index=this._getIndex(index);var that=this,tab=this.tabs.eq(index),anchor=tab.find(".ui-tabs-anchor"),panel=this._getPanelForTab(tab),eventData={tab:tab,panel:panel},complete=function(jqXHR,status){"abort"===status&&that.panels.stop(!1,!0),that._removeClass(tab,"ui-tabs-loading"),panel.removeAttr("aria-busy"),jqXHR===that.xhr&&delete that.xhr};this._isLocal(anchor[0])||(this.xhr=$.ajax(this._ajaxSettings(anchor,event,eventData)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(tab,"ui-tabs-loading"),panel.attr("aria-busy","true"),this.xhr.done(function(response,status,jqXHR){setTimeout(function(){panel.html(response),that._trigger("load",event,eventData),complete(jqXHR,status)},1)}).fail(function(jqXHR,status){setTimeout(function(){complete(jqXHR,status)},1)})))},_ajaxSettings:function(anchor,event,eventData){var that=this;return{url:anchor.attr("href"),beforeSend:function(jqXHR,settings){return that._trigger("beforeLoad",event,$.extend({jqXHR:jqXHR,ajaxSettings:settings},eventData))}}},_getPanelForTab:function(tab){var id=$(tab).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+id))}}),$.uiBackCompat!==!1&&$.widget("ui.tabs",$.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});$.ui.tabs;$.widget("ui.tooltip",{version:"1.12.0",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var title=$(this).attr("title")||"";return $("<a>").text(title).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(elem,id){var describedby=(elem.attr("aria-describedby")||"").split(/\s+/);describedby.push(id),elem.data("ui-tooltip-id",id).attr("aria-describedby",$.trim(describedby.join(" ")))},_removeDescribedBy:function(elem){var id=elem.data("ui-tooltip-id"),describedby=(elem.attr("aria-describedby")||"").split(/\s+/),index=$.inArray(id,describedby);index!==-1&&describedby.splice(index,1),elem.removeData("ui-tooltip-id"),describedby=$.trim(describedby.join(" ")),describedby?elem.attr("aria-describedby",describedby):elem.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=$("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=$([])},_setOption:function(key,value){var that=this;this._super(key,value),"content"===key&&$.each(this.tooltips,function(id,tooltipData){that._updateContent(tooltipData.element)})},_setOptionDisabled:function(value){this[value?"_disable":"_enable"]()},_disable:function(){var that=this;$.each(this.tooltips,function(id,tooltipData){var event=$.Event("blur");event.target=event.currentTarget=tooltipData.element[0],that.close(event,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var element=$(this);if(element.is("[title]"))return element.data("ui-tooltip-title",element.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var element=$(this);element.data("ui-tooltip-title")&&element.attr("title",element.data("ui-tooltip-title"))}),this.disabledTitles=$([])},open:function(event){var that=this,target=$(event?event.target:this.element).closest(this.options.items);target.length&&!target.data("ui-tooltip-id")&&(target.attr("title")&&target.data("ui-tooltip-title",target.attr("title")),target.data("ui-tooltip-open",!0),event&&"mouseover"===event.type&&target.parents().each(function(){var blurEvent,parent=$(this);parent.data("ui-tooltip-open")&&(blurEvent=$.Event("blur"),blurEvent.target=blurEvent.currentTarget=this,that.close(blurEvent,!0)),parent.attr("title")&&(parent.uniqueId(),that.parents[this.id]={element:this,title:parent.attr("title")},parent.attr("title",""))}),this._registerCloseHandlers(event,target),this._updateContent(target,event))},_updateContent:function(target,event){var content,contentOption=this.options.content,that=this,eventType=event?event.type:null;return"string"==typeof contentOption||contentOption.nodeType||contentOption.jquery?this._open(event,target,contentOption):(content=contentOption.call(target[0],function(response){that._delay(function(){target.data("ui-tooltip-open")&&(event&&(event.type=eventType),this._open(event,target,response))})}),void(content&&this._open(event,target,content)))},_open:function(event,target,content){function position(event){positionOption.of=event,tooltip.is(":hidden")||tooltip.position(positionOption)}var tooltipData,tooltip,delayedShow,a11yContent,positionOption=$.extend({},this.options.position);if(content){if(tooltipData=this._find(target))return void tooltipData.tooltip.find(".ui-tooltip-content").html(content);target.is("[title]")&&(event&&"mouseover"===event.type?target.attr("title",""):target.removeAttr("title")),tooltipData=this._tooltip(target),tooltip=tooltipData.tooltip,this._addDescribedBy(target,tooltip.attr("id")),tooltip.find(".ui-tooltip-content").html(content),this.liveRegion.children().hide(),a11yContent=$("<div>").html(tooltip.find(".ui-tooltip-content").html()),a11yContent.removeAttr("name").find("[name]").removeAttr("name"),a11yContent.removeAttr("id").find("[id]").removeAttr("id"),a11yContent.appendTo(this.liveRegion),this.options.track&&event&&/^mouse/.test(event.type)?(this._on(this.document,{mousemove:position}),position(event)):tooltip.position($.extend({of:target},this.options.position)),tooltip.hide(),this._show(tooltip,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(delayedShow=this.delayedShow=setInterval(function(){tooltip.is(":visible")&&(position(positionOption.of),clearInterval(delayedShow))},$.fx.interval)),this._trigger("open",event,{tooltip:tooltip})}},_registerCloseHandlers:function(event,target){var events={keyup:function(event){if(event.keyCode===$.ui.keyCode.ESCAPE){var fakeEvent=$.Event(event);fakeEvent.currentTarget=target[0],this.close(fakeEvent,!0)}}};target[0]!==this.element[0]&&(events.remove=function(){this._removeTooltip(this._find(target).tooltip)}),event&&"mouseover"!==event.type||(events.mouseleave="close"),event&&"focusin"!==event.type||(events.focusout="close"),this._on(!0,target,events)},close:function(event){var tooltip,that=this,target=$(event?event.currentTarget:this.element),tooltipData=this._find(target);return tooltipData?(tooltip=tooltipData.tooltip,void(tooltipData.closing||(clearInterval(this.delayedShow),target.data("ui-tooltip-title")&&!target.attr("title")&&target.attr("title",target.data("ui-tooltip-title")),this._removeDescribedBy(target),tooltipData.hiding=!0,tooltip.stop(!0),this._hide(tooltip,this.options.hide,function(){that._removeTooltip($(this))}),target.removeData("ui-tooltip-open"),this._off(target,"mouseleave focusout keyup"),target[0]!==this.element[0]&&this._off(target,"remove"),this._off(this.document,"mousemove"),event&&"mouseleave"===event.type&&$.each(this.parents,function(id,parent){$(parent.element).attr("title",parent.title),delete that.parents[id]}),tooltipData.closing=!0,this._trigger("close",event,{tooltip:tooltip}),tooltipData.hiding||(tooltipData.closing=!1)))):void target.removeData("ui-tooltip-open")},_tooltip:function(element){var tooltip=$("<div>").attr("role","tooltip"),content=$("<div>").appendTo(tooltip),id=tooltip.uniqueId().attr("id");return this._addClass(content,"ui-tooltip-content"),this._addClass(tooltip,"ui-tooltip","ui-widget ui-widget-content"),tooltip.appendTo(this._appendTo(element)),this.tooltips[id]={element:element,tooltip:tooltip}},_find:function(target){var id=target.data("ui-tooltip-id");return id?this.tooltips[id]:null},_removeTooltip:function(tooltip){tooltip.remove(),delete this.tooltips[tooltip.attr("id")]},_appendTo:function(target){var element=target.closest(".ui-front, dialog");return element.length||(element=this.document[0].body),element},_destroy:function(){var that=this;$.each(this.tooltips,function(id,tooltipData){var event=$.Event("blur"),element=tooltipData.element;event.target=event.currentTarget=element[0],that.close(event,!0),$("#"+id).remove(),element.data("ui-tooltip-title")&&(element.attr("title")||element.attr("title",element.data("ui-tooltip-title")),element.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),$.uiBackCompat!==!1&&$.widget("ui.tooltip",$.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var tooltipData=this._superApply(arguments);return this.options.tooltipClass&&tooltipData.tooltip.addClass(this.options.tooltipClass),tooltipData}});$.ui.tooltip}),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.date"),function(angular){angular.module("ui.date",[]).constant("uiDateConfig",{}).constant("uiDateFormatConfig","").factory("uiDateConverter",["uiDateFormatConfig",function(uiDateFormatConfig){function dateToString(dateFormat,value){if(dateFormat=dateFormat||uiDateFormatConfig,value){if(dateFormat)try{return jQuery.datepicker.formatDate(dateFormat,value)}catch(formatException){return}if(value.toISOString)return value.toISOString()}return null}function stringToDate(dateFormat,valueToParse){if(dateFormat=dateFormat||uiDateFormatConfig,angular.isDate(valueToParse)&&!isNaN(valueToParse))return valueToParse;if(angular.isString(valueToParse)){if(dateFormat)return jQuery.datepicker.parseDate(dateFormat,valueToParse);var isoDate=new Date(valueToParse);return isNaN(isoDate.getTime())?null:isoDate}return angular.isNumber(valueToParse)?new Date(valueToParse):null}return{stringToDate:stringToDate,dateToString:dateToString}}]).directive("uiDate",["uiDateConfig","uiDateConverter",function(uiDateConfig,uiDateConverter){return{require:"?ngModel",link:function(scope,element,attrs,controller){var getOptions=function(){return angular.extend({},uiDateConfig,scope.$eval(attrs.uiDate))},initDateWidget=function(){function setVal(){var keys=["Hours","Minutes","Seconds","Milliseconds"],isDate=angular.isDate(controller.$modelValue),preserve={};isDate&&controller.$modelValue.toDateString()===element.datepicker("getDate").toDateString()||(isDate&&angular.forEach(keys,function(key){preserve[key]=controller.$modelValue["get"+key]()}),controller.$setViewValue(element.datepicker("getDate")),isDate&&angular.forEach(keys,function(key){controller.$viewValue["set"+key](preserve[key])}))}var showing=!1,opts=getOptions();if(controller){var _onSelect=opts.onSelect||angular.noop;opts.onSelect=function(value,picker){scope.$apply(function(){showing=!0,setVal(),_onSelect(value,picker),element.blur()})};var _beforeShow=opts.beforeShow||angular.noop;opts.beforeShow=function(input,picker){showing=!0,_beforeShow(input,picker)};var _onClose=opts.onClose||angular.noop;opts.onClose=function(value,picker){showing=!1,_onClose(value,picker)},element.off("blur.datepicker").on("blur.datepicker",function(){showing||scope.$apply(function(){element.datepicker("setDate",element.datepicker("getDate")),setVal()})}),controller.$validators.uiDateValidator=function(modelValue,viewValue){return angular.isDate(uiDateConverter.stringToDate(attrs.uiDateFormat,viewValue))},controller.$parsers.push(function(valueToParse){return uiDateConverter.stringToDate(attrs.uiDateFormat,valueToParse)}),controller.$render=function(){element.datepicker("setDate",controller.$modelValue)}}element.data("datepicker")?(element.datepicker("option",opts),element.datepicker("refresh")):(element.datepicker(opts),element.on("$destroy",function(){element.datepicker("hide"),element.datepicker("destroy")})),controller&&controller.$render()};scope.$watch(getOptions,initDateWidget,!0)}}}]).directive("uiDateFormat",["uiDateConverter",function(uiDateConverter){return{require:"ngModel",link:function(scope,element,attrs,modelCtrl){var dateFormat=attrs.uiDateFormat;modelCtrl.$formatters.unshift(function(value){return uiDateConverter.stringToDate(dateFormat,value)}),modelCtrl.$parsers.push(function(value){return uiDateConverter.dateToString(dateFormat,value)})}}}])}(angular),function(){function baseCompareAscending(value,other){if(value!==other){var valIsNull=null===value,valIsUndef=value===undefined,valIsReflexive=value===value,othIsNull=null===other,othIsUndef=other===undefined,othIsReflexive=other===other;if(value>other&&!othIsNull||!valIsReflexive||valIsNull&&!othIsUndef&&othIsReflexive||valIsUndef&&othIsReflexive)return 1;if(value<other&&!valIsNull||!othIsReflexive||othIsNull&&!valIsUndef&&valIsReflexive||othIsUndef&&valIsReflexive)return-1}return 0}function baseFindIndex(array,predicate,fromRight){for(var length=array.length,index=fromRight?length:-1;fromRight?index--:++index<length;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){if(value!==value)return indexOfNaN(array,fromIndex);for(var index=fromIndex-1,length=array.length;++index<length;)if(array[index]===value)return index;return-1}function baseIsFunction(value){return"function"==typeof value||!1}function baseToString(value){return null==value?"":value+""}function charsLeftIndex(string,chars){for(var index=-1,length=string.length;++index<length&&chars.indexOf(string.charAt(index))>-1;);return index}function charsRightIndex(string,chars){for(var index=string.length;index--&&chars.indexOf(string.charAt(index))>-1;);return index}function compareAscending(object,other){return baseCompareAscending(object.criteria,other.criteria)||object.index-other.index}function compareMultiple(object,other,orders){for(var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;++index<length;){var result=baseCompareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength)return result;var order=orders[index];return result*("asc"===order||order===!0?1:-1)}}return object.index-other.index}function deburrLetter(letter){return deburredLetters[letter]}function escapeHtmlChar(chr){return htmlEscapes[chr]}function escapeRegExpChar(chr,leadingChar,whitespaceChar){return leadingChar?chr=regexpEscapes[chr]:whitespaceChar&&(chr=stringEscapes[chr]),"\\"+chr}function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function indexOfNaN(array,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?0:-1);fromRight?index--:++index<length;){var other=array[index];if(other!==other)return index}return-1}function isObjectLike(value){return!!value&&"object"==typeof value}function isSpace(charCode){return charCode<=160&&charCode>=9&&charCode<=13||32==charCode||160==charCode||5760==charCode||6158==charCode||charCode>=8192&&(charCode<=8202||8232==charCode||8233==charCode||8239==charCode||8287==charCode||12288==charCode||65279==charCode)}function replaceHolders(array,placeholder){for(var index=-1,length=array.length,resIndex=-1,result=[];++index<length;)array[index]===placeholder&&(array[index]=PLACEHOLDER,result[++resIndex]=index);return result}function sortedUniq(array,iteratee){for(var seen,index=-1,length=array.length,resIndex=-1,result=[];++index<length;){var value=array[index],computed=iteratee?iteratee(value,index,array):value;index&&seen===computed||(seen=computed,result[++resIndex]=value)}return result}function trimmedLeftIndex(string){for(var index=-1,length=string.length;++index<length&&isSpace(string.charCodeAt(index)););return index}function trimmedRightIndex(string){for(var index=string.length;index--&&isSpace(string.charCodeAt(index)););return index}function unescapeHtmlChar(chr){return htmlUnescapes[chr]}function runInContext(context){function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper)return value;if(hasOwnProperty.call(value,"__chain__")&&hasOwnProperty.call(value,"__wrapped__"))return wrapperClone(value)}return new LodashWrapper(value)}function baseLodash(){}function LodashWrapper(value,chainAll,actions){this.__wrapped__=value,this.__actions__=actions||[],this.__chain__=!!chainAll}function LazyWrapper(value){this.__wrapped__=value,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=POSITIVE_INFINITY,this.__views__=[]}function lazyClone(){var result=new LazyWrapper(this.__wrapped__);return result.__actions__=arrayCopy(this.__actions__),result.__dir__=this.__dir__,result.__filtered__=this.__filtered__,result.__iteratees__=arrayCopy(this.__iteratees__),result.__takeCount__=this.__takeCount__,result.__views__=arrayCopy(this.__views__),result}function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1,result.__filtered__=!0}else result=this.clone(),result.__dir__*=-1;return result}function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||arrLength<LARGE_ARRAY_SIZE||arrLength==length&&takeCount==length)return baseWrapperValue(array,this.__actions__);var result=[];outer:for(;length--&&resIndex<takeCount;){index+=dir;for(var iterIndex=-1,value=array[index];++iterIndex<iterLength;){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(type==LAZY_MAP_FLAG)value=computed;else if(!computed){if(type==LAZY_FILTER_FLAG)continue outer;break outer}}result[resIndex++]=value}return result}function MapCache(){this.__data__={}}function mapDelete(key){return this.has(key)&&delete this.__data__[key]}function mapGet(key){return"__proto__"==key?undefined:this.__data__[key]}function mapHas(key){return"__proto__"!=key&&hasOwnProperty.call(this.__data__,key)}function mapSet(key,value){return"__proto__"!=key&&(this.__data__[key]=value),this}function SetCache(values){var length=values?values.length:0;for(this.data={hash:nativeCreate(null),set:new Set};length--;)this.push(values[length])}function cacheIndexOf(cache,value){var data=cache.data,result="string"==typeof value||isObject(value)?data.set.has(value):data.hash[value];return result?0:-1}function cachePush(value){var data=this.data;"string"==typeof value||isObject(value)?data.set.add(value):data.hash[value]=!0}function arrayConcat(array,other){for(var index=-1,length=array.length,othIndex=-1,othLength=other.length,result=Array(length+othLength);++index<length;)result[index]=array[index];for(;++othIndex<othLength;)result[index++]=other[othIndex];return result}function arrayCopy(source,array){var index=-1,length=source.length;for(array||(array=Array(length));++index<length;)array[index]=source[index];return array}function arrayEach(array,iteratee){for(var index=-1,length=array.length;++index<length&&iteratee(array[index],index,array)!==!1;);return array}function arrayEachRight(array,iteratee){for(var length=array.length;length--&&iteratee(array[length],length,array)!==!1;);return array}function arrayEvery(array,predicate){for(var index=-1,length=array.length;++index<length;)if(!predicate(array[index],index,array))return!1;return!0}function arrayExtremum(array,iteratee,comparator,exValue){for(var index=-1,length=array.length,computed=exValue,result=computed;++index<length;){var value=array[index],current=+iteratee(value);comparator(current,computed)&&(computed=current,result=value)}return result}function arrayFilter(array,predicate){for(var index=-1,length=array.length,resIndex=-1,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[++resIndex]=value)}return result}function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}function arrayPush(array,values){for(var index=-1,length=values.length,offset=array.length;++index<length;)array[offset+index]=values[index];return array}function arrayReduce(array,iteratee,accumulator,initFromArray){var index=-1,length=array.length;for(initFromArray&&length&&(accumulator=array[++index]);++index<length;)accumulator=iteratee(accumulator,array[index],index,array);return accumulator}function arrayReduceRight(array,iteratee,accumulator,initFromArray){var length=array.length;for(initFromArray&&length&&(accumulator=array[--length]);length--;)accumulator=iteratee(accumulator,array[length],length,array);return accumulator}function arraySome(array,predicate){for(var index=-1,length=array.length;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function arraySum(array,iteratee){for(var length=array.length,result=0;length--;)result+=+iteratee(array[length])||0;return result}function assignDefaults(objectValue,sourceValue){return objectValue===undefined?sourceValue:objectValue}function assignOwnDefaults(objectValue,sourceValue,key,object){return objectValue!==undefined&&hasOwnProperty.call(object,key)?objectValue:sourceValue}function assignWith(object,source,customizer){for(var index=-1,props=keys(source),length=props.length;++index<length;){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);(result===result?result===value:value!==value)&&(value!==undefined||key in object)||(object[key]=result)}return object}function baseAssign(object,source){return null==source?object:baseCopy(source,keys(source),object)}function baseAt(collection,props){for(var index=-1,isNil=null==collection,isArr=!isNil&&isArrayLike(collection),length=isArr?collection.length:0,propsLength=props.length,result=Array(propsLength);++index<propsLength;){var key=props[index];isArr?result[index]=isIndex(key,length)?collection[key]:undefined:result[index]=isNil?undefined:collection[key]}return result}function baseCopy(source,props,object){object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;return"function"==type?thisArg===undefined?func:bindCallback(func,thisArg,argCount):null==func?identity:"object"==type?baseMatches(func):thisArg===undefined?property(func):baseMatchesProperty(func,thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer&&(result=object?customizer(value,key,object):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=initCloneArray(value),!isDeep)return arrayCopy(value,result)}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag!=objectTag&&tag!=argsTag&&(!isFunc||object))return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{};if(result=initCloneObject(isFunc?{}:value),!isDeep)return baseAssign(result,value)}stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==value)return stackB[length];return stackA.push(value),stackB.push(result),(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)}),result}function baseDelay(func,wait,args){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return setTimeout(function(){func.apply(undefined,args)},wait)}function baseDifference(array,values){var length=array?array.length:0,result=[];if(!length)return result;var index=-1,indexOf=getIndexOf(),isCommon=indexOf===baseIndexOf,cache=isCommon&&values.length>=LARGE_ARRAY_SIZE?createCache(values):null,valuesLength=values.length;cache&&(indexOf=cacheIndexOf,isCommon=!1,values=cache);outer:for(;++index<length;){
var value=array[index];if(isCommon&&value===value){for(var valuesIndex=valuesLength;valuesIndex--;)if(values[valuesIndex]===value)continue outer;result.push(value)}else indexOf(values,value,0)<0&&result.push(value)}return result}function baseEvery(collection,predicate){var result=!0;return baseEach(collection,function(value,index,collection){return result=!!predicate(value,index,collection)}),result}function baseExtremum(collection,iteratee,comparator,exValue){var computed=exValue,result=computed;return baseEach(collection,function(value,index,collection){var current=+iteratee(value,index,collection);(comparator(current,computed)||current===exValue&&current===result)&&(computed=current,result=value)}),result}function baseFill(array,value,start,end){var length=array.length;for(start=null==start?0:+start||0,start<0&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:+end||0,end<0&&(end+=length),length=start>end?0:end>>>0,start>>>=0;start<length;)array[start++]=value;return array}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseFind(collection,predicate,eachFunc,retKey){var result;return eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection))return result=retKey?key:value,!1}),result}function baseFlatten(array,isDeep,isStrict,result){result||(result=[]);for(var index=-1,length=array.length;++index<length;){var value=array[index];isObjectLike(value)&&isArrayLike(value)&&(isStrict||isArray(value)||isArguments(value))?isDeep?baseFlatten(value,isDeep,isStrict,result):arrayPush(result,value):isStrict||(result[result.length]=value)}return result}function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return baseForRight(object,iteratee,keys)}function baseFunctions(object,props){for(var index=-1,length=props.length,resIndex=-1,result=[];++index<length;){var key=props[index];isFunction(object[key])&&(result[++resIndex]=key)}return result}function baseGet(object,path,pathKey){if(null!=object){pathKey!==undefined&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=0,length=path.length;null!=object&&index<length;)object=object[path[index++]];return index&&index==length?object:undefined}}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){return value===other||(null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB))}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=objToString.call(object),objTag==argsTag?objTag=objectTag:objTag!=objectTag&&(objIsArr=isTypedArray(object))),othIsArr||(othTag=objToString.call(other),othTag==argsTag?othTag=objectTag:othTag!=objectTag&&(othIsArr=isTypedArray(other)));var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!objIsArr&&!objIsObj)return equalByTag(object,other,objTag);if(!isLoose){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped)return equalFunc(objIsWrapped?object.value():object,othIsWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag)return!1;stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==object)return stackB[length]==other;stackA.push(object),stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);return stackA.pop(),stackB.pop(),result}function baseIsMatch(object,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=toObject(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object))return!1}else{var result=customizer?customizer(objValue,srcValue,key):undefined;if(!(result===undefined?baseIsEqual(srcValue,objValue,customizer,!0):result))return!1}}return!0}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)}),result}function baseMatches(source){var matchData=getMatchData(source);if(1==matchData.length&&matchData[0][2]){var key=matchData[0][0],value=matchData[0][1];return function(object){return null!=object&&(object[key]===value&&(value!==undefined||key in toObject(object)))}}return function(object){return baseIsMatch(object,matchData)}}function baseMatchesProperty(path,srcValue){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(srcValue),pathKey=path+"";return path=toPath(path),function(object){if(null==object)return!1;var key=pathKey;if(object=toObject(object),(isArr||!isCommon)&&!(key in object)){if(object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),null==object)return!1;key=last(path),object=toObject(object)}return object[key]===srcValue?srcValue!==undefined||key in object:baseIsEqual(srcValue,object[key],undefined,!0)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object))return object;var isSrcArr=isArrayLike(source)&&(isArray(source)||isTypedArray(source)),props=isSrcArr?undefined:keys(source);return arrayEach(props||source,function(srcValue,key){if(props&&(key=srcValue,srcValue=source[key]),isObjectLike(srcValue))stackA||(stackA=[]),stackB||(stackB=[]),baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB);else{var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue),result===undefined&&(!isSrcArr||key in object)||!isCommon&&(result===result?result===value:value!==value)||(object[key]=result)}}),object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){for(var length=stackA.length,srcValue=source[key];length--;)if(stackA[length]==srcValue)return void(object[key]=stackB[length]);var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=result===undefined;isCommon&&(result=srcValue,isArrayLike(srcValue)&&(isArray(srcValue)||isTypedArray(srcValue))?result=isArray(value)?value:isArrayLike(value)?arrayCopy(value):[]:isPlainObject(srcValue)||isArguments(srcValue)?result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}:isCommon=!1),stackA.push(srcValue),stackB.push(result),isCommon?object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB):(result===result?result!==value:value===value)&&(object[key]=result)}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyDeep(path){var pathKey=path+"";return path=toPath(path),function(object){return baseGet(object,path,pathKey)}}function basePullAt(array,indexes){for(var length=array?indexes.length:0;length--;){var index=indexes[length];if(index!=previous&&isIndex(index)){var previous=index;splice.call(array,index,1)}}return array}function baseRandom(min,max){return min+nativeFloor(nativeRandom()*(max-min+1))}function baseReduce(collection,iteratee,accumulator,initFromCollection,eachFunc){return eachFunc(collection,function(value,index,collection){accumulator=initFromCollection?(initFromCollection=!1,value):iteratee(accumulator,value,index,collection)}),accumulator}function baseSlice(array,start,end){var index=-1,length=array.length;start=null==start?0:+start||0,start<0&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:+end||0,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseSortBy(array,comparer){var length=array.length;for(array.sort(comparer);length--;)array[length]=array[length].value;return array}function baseSortByOrder(collection,iteratees,orders){var callback=getCallback(),index=-1;iteratees=arrayMap(iteratees,function(iteratee){return callback(iteratee)});var result=baseMap(collection,function(value){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value)});return{criteria:criteria,index:++index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}function baseSum(collection,iteratee){var result=0;return baseEach(collection,function(value,index,collection){result+=+iteratee(value,index,collection)||0}),result}function baseUniq(array,iteratee){var index=-1,indexOf=getIndexOf(),length=array.length,isCommon=indexOf===baseIndexOf,isLarge=isCommon&&length>=LARGE_ARRAY_SIZE,seen=isLarge?createCache():null,result=[];seen?(indexOf=cacheIndexOf,isCommon=!1):(isLarge=!1,seen=iteratee?[]:result);outer:for(;++index<length;){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(isCommon&&value===value){for(var seenIndex=seen.length;seenIndex--;)if(seen[seenIndex]===computed)continue outer;iteratee&&seen.push(computed),result.push(value)}else indexOf(seen,computed,0)<0&&((iteratee||isLarge)&&seen.push(computed),result.push(value))}return result}function baseValues(object,props){for(var index=-1,length=props.length,result=Array(length);++index<length;)result[index]=object[props[index]];return result}function baseWhile(array,predicate,isDrop,fromRight){for(var length=array.length,index=fromRight?length:-1;(fromRight?index--:++index<length)&&predicate(array[index],index,array););return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;result instanceof LazyWrapper&&(result=result.value());for(var index=-1,length=actions.length;++index<length;){var action=actions[index];result=action.func.apply(action.thisArg,arrayPush([result],action.args))}return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if("number"==typeof value&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){for(;low<high;){var mid=low+high>>>1,computed=array[mid];(retHighest?computed<=value:computed<value)&&null!==computed?low=mid+1:high=mid}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);for(var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsNull=null===value,valIsUndef=value===undefined;low<high;){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),isDef=computed!==undefined,isReflexive=computed===computed;if(valIsNaN)var setLow=isReflexive||retHighest;else setLow=valIsNull?isReflexive&&isDef&&(retHighest||null!=computed):valIsUndef?isReflexive&&(retHighest||isDef):null!=computed&&(retHighest?computed<=value:computed<value);setLow?low=mid+1:high=mid}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if("function"!=typeof func)return identity;if(thisArg===undefined)return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){var result=new ArrayBuffer(buffer.byteLength),view=new Uint8Array(result);return view.set(new Uint8Array(buffer)),result}function composeArgs(args,partials,holders){for(var holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),leftIndex=-1,leftLength=partials.length,result=Array(leftLength+argsLength);++leftIndex<leftLength;)result[leftIndex]=partials[leftIndex];for(;++argsIndex<holdersLength;)result[holders[argsIndex]]=args[argsIndex];for(;argsLength--;)result[leftIndex++]=args[argsIndex++];return result}function composeArgsRight(args,partials,holders){for(var holdersIndex=-1,holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),rightIndex=-1,rightLength=partials.length,result=Array(argsLength+rightLength);++argsIndex<argsLength;)result[argsIndex]=args[argsIndex];for(var offset=argsIndex;++rightIndex<rightLength;)result[offset+rightIndex]=partials[rightIndex];for(;++holdersIndex<holdersLength;)result[offset+holders[holdersIndex]]=args[argsIndex++];return result}function createAggregator(setter,initializer){return function(collection,iteratee,thisArg){var result=initializer?initializer():{};if(iteratee=getCallback(iteratee,thisArg,3),isArray(collection))for(var index=-1,length=collection.length;++index<length;){var value=collection[index];setter(result,value,iteratee(value,index,collection),collection)}else baseEach(collection,function(value,key,collection){setter(result,value,iteratee(value,key,collection),collection)});return result}}function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=null==object?0:sources.length,customizer=length>2?sources[length-2]:undefined,guard=length>2?sources[2]:undefined,thisArg=length>1?sources[length-1]:undefined;for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:undefined,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?undefined:customizer,length=1);++index<length;){var source=sources[index];source&&assigner(object,source,customizer)}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length))return eachFunc(collection,iteratee);for(var index=fromRight?length:-1,iterable=toObject(collection);(fromRight?index--:++index<length)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;fromRight?index--:++index<length;){var key=props[index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function createBindWrapper(func,thisArg){function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(thisArg,arguments)}var Ctor=createCtorWrapper(func);return wrapper}function createCache(values){return nativeCreate&&Set?new SetCache(values):null}function createCompounder(callback){return function(string){for(var index=-1,array=words(deburr(string)),length=array.length,result="";++index<length;)result=callback(result,array[index],index);return result}}function createCtorWrapper(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}function createCurry(flag){function curryFunc(func,arity,guard){guard&&isIterateeCall(func,arity,guard)&&(arity=undefined);var result=createWrapper(func,flag,undefined,undefined,undefined,undefined,undefined,arity);return result.placeholder=curryFunc.placeholder,result}return curryFunc}function createDefaults(assigner,customizer){return restParam(function(args){var object=args[0];return null==object?object:(args.push(customizer),assigner.apply(undefined,args))})}function createExtremum(comparator,exValue){return function(collection,iteratee,thisArg){if(thisArg&&isIterateeCall(collection,iteratee,thisArg)&&(iteratee=undefined),iteratee=getCallback(iteratee,thisArg,3),1==iteratee.length){collection=isArray(collection)?collection:toIterable(collection);var result=arrayExtremum(collection,iteratee,comparator,exValue);if(!collection.length||result!==exValue)return result}return baseExtremum(collection,iteratee,comparator,exValue)}}function createFind(eachFunc,fromRight){return function(collection,predicate,thisArg){if(predicate=getCallback(predicate,thisArg,3),isArray(collection)){var index=baseFindIndex(collection,predicate,fromRight);return index>-1?collection[index]:undefined}return baseFind(collection,predicate,eachFunc)}}function createFindIndex(fromRight){return function(array,predicate,thisArg){return array&&array.length?(predicate=getCallback(predicate,thisArg,3),baseFindIndex(array,predicate,fromRight)):-1}}function createFindKey(objectFunc){return function(object,predicate,thisArg){return predicate=getCallback(predicate,thisArg,3),baseFind(object,predicate,objectFunc,!0)}}function createFlow(fromRight){return function(){for(var wrapper,length=arguments.length,index=fromRight?length:-1,leftIndex=0,funcs=Array(length);fromRight?index--:++index<length;){var func=funcs[leftIndex++]=arguments[index];if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);!wrapper&&LodashWrapper.prototype.thru&&"wrapper"==getFuncName(func)&&(wrapper=new LodashWrapper([],(!0)))}for(index=wrapper?-1:length;++index<length;){func=funcs[index];var funcName=getFuncName(func),data="wrapper"==funcName?getData(func):undefined;wrapper=data&&isLaziable(data[0])&&data[1]==(ARY_FLAG|CURRY_FLAG|PARTIAL_FLAG|REARG_FLAG)&&!data[4].length&&1==data[9]?wrapper[getFuncName(data[0])].apply(wrapper,data[3]):1==func.length&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}return function(){var args=arguments,value=args[0];if(wrapper&&1==args.length&&isArray(value)&&value.length>=LARGE_ARRAY_SIZE)return wrapper.plant(value).value();for(var index=0,result=length?funcs[index].apply(this,args):value;++index<length;)result=funcs[index].call(this,result);return result}}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return"function"==typeof iteratee&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function createForIn(objectFunc){return function(object,iteratee,thisArg){return"function"==typeof iteratee&&thisArg===undefined||(iteratee=bindCallback(iteratee,thisArg,3)),objectFunc(object,iteratee,keysIn)}}function createForOwn(objectFunc){return function(object,iteratee,thisArg){return"function"==typeof iteratee&&thisArg===undefined||(iteratee=bindCallback(iteratee,thisArg,3)),objectFunc(object,iteratee)}}function createObjectMapper(isMapKeys){return function(object,iteratee,thisArg){var result={};return iteratee=getCallback(iteratee,thisArg,3),baseForOwn(object,function(value,key,object){var mapped=iteratee(value,key,object);key=isMapKeys?mapped:key,value=isMapKeys?value:mapped,result[key]=value}),result}}function createPadDir(fromRight){return function(string,length,chars){return string=baseToString(string),(fromRight?string:"")+createPadding(string,length,chars)+(fromRight?"":string)}}function createPartial(flag){var partialFunc=restParam(function(func,partials){var holders=replaceHolders(partials,partialFunc.placeholder);return createWrapper(func,flag,undefined,partials,holders)});return partialFunc}function createReduce(arrayFunc,eachFunc){return function(collection,iteratee,accumulator,thisArg){var initFromArray=arguments.length<3;return"function"==typeof iteratee&&thisArg===undefined&&isArray(collection)?arrayFunc(collection,iteratee,accumulator,initFromArray):baseReduce(collection,getCallback(iteratee,thisArg,4),accumulator,initFromArray,eachFunc)}}function createHybridWrapper(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){function wrapper(){for(var length=arguments.length,index=length,args=Array(length);index--;)args[index]=arguments[index];if(partials&&(args=composeArgs(args,partials,holders)),partialsRight&&(args=composeArgsRight(args,partialsRight,holdersRight)),isCurry||isCurryRight){var placeholder=wrapper.placeholder,argsHolders=replaceHolders(args,placeholder);if(length-=argsHolders.length,length<arity){var newArgPos=argPos?arrayCopy(argPos):undefined,newArity=nativeMax(arity-length,0),newsHolders=isCurry?argsHolders:undefined,newHoldersRight=isCurry?undefined:argsHolders,newPartials=isCurry?args:undefined,newPartialsRight=isCurry?undefined:args;bitmask|=isCurry?PARTIAL_FLAG:PARTIAL_RIGHT_FLAG,bitmask&=~(isCurry?PARTIAL_RIGHT_FLAG:PARTIAL_FLAG),isCurryBound||(bitmask&=~(BIND_FLAG|BIND_KEY_FLAG));var newData=[func,bitmask,thisArg,newPartials,newsHolders,newPartialsRight,newHoldersRight,newArgPos,ary,newArity],result=createHybridWrapper.apply(undefined,newData);return isLaziable(func)&&setData(result,newData),result.placeholder=placeholder,result}}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;return argPos&&(args=reorder(args,argPos)),isAry&&ary<args.length&&(args.length=ary),this&&this!==root&&this instanceof wrapper&&(fn=Ctor||createCtorWrapper(func)),fn.apply(thisBinding,args)}var isAry=bitmask&ARY_FLAG,isBind=bitmask&BIND_FLAG,isBindKey=bitmask&BIND_KEY_FLAG,isCurry=bitmask&CURRY_FLAG,isCurryBound=bitmask&CURRY_BOUND_FLAG,isCurryRight=bitmask&CURRY_RIGHT_FLAG,Ctor=isBindKey?undefined:createCtorWrapper(func);return wrapper}function createPadding(string,length,chars){var strLength=string.length;if(length=+length,strLength>=length||!nativeIsFinite(length))return"";var padLength=length-strLength;return chars=null==chars?" ":chars+"",repeat(chars,nativeCeil(padLength/chars.length)).slice(0,padLength)}function createPartialWrapper(func,bitmask,thisArg,partials){function wrapper(){for(var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength);++leftIndex<leftLength;)args[leftIndex]=partials[leftIndex];for(;argsLength--;)args[leftIndex++]=arguments[++argsIndex];var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,args)}var isBind=bitmask&BIND_FLAG,Ctor=createCtorWrapper(func);return wrapper}function createRound(methodName){var func=Math[methodName];return function(number,precision){return precision=precision===undefined?0:+precision||0,precision?(precision=pow(10,precision),func(number*precision)/precision):func(number)}}function createSortedIndex(retHighest){return function(array,value,iteratee,thisArg){var callback=getCallback(iteratee);return null==iteratee&&callback===baseCallback?binaryIndex(array,value,retHighest):binaryIndexBy(array,value,callback(iteratee,thisArg,1),retHighest)}}function createWrapper(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&BIND_KEY_FLAG;if(!isBindKey&&"function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);var length=partials?partials.length:0;if(length||(bitmask&=~(PARTIAL_FLAG|PARTIAL_RIGHT_FLAG),partials=holders=undefined),length-=holders?holders.length:0,bitmask&PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=undefined}var data=isBindKey?undefined:getData(func),newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data&&(mergeData(newData,data),bitmask=newData[1],arity=newData[9]),newData[9]=null==arity?isBindKey?0:func.length:nativeMax(arity-length,0)||0,bitmask==BIND_FLAG)var result=createBindWrapper(newData[0],newData[2]);else result=bitmask!=PARTIAL_FLAG&&bitmask!=(BIND_FLAG|PARTIAL_FLAG)||newData[4].length?createHybridWrapper.apply(undefined,newData):createPartialWrapper.apply(undefined,newData);var setter=data?baseSetData:setData;return setter(result,newData)}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength))return!1;for(;++index<arrLength;){var arrValue=array[index],othValue=other[index],result=customizer?customizer(isLoose?othValue:arrValue,isLoose?arrValue:othValue,index):undefined;if(result!==undefined){if(result)continue;return!1}if(isLoose){if(!arraySome(other,function(othValue){return arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)}))return!1}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))return!1}return!0}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:object==+other;case regexpTag:case stringTag:return object==other+""}return!1}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isLoose?key in other:hasOwnProperty.call(other,key)))return!1}for(var skipCtor=isLoose;++index<objLength;){key=objProps[index];var objValue=object[key],othValue=other[key],result=customizer?customizer(isLoose?othValue:objValue,isLoose?objValue:othValue,key):undefined;if(!(result===undefined?equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB):result))return!1;skipCtor||(skipCtor="constructor"==key)}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor))return!1}return!0}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;return result=result===callback?baseCallback:result,argCount?result(func,thisArg,argCount):result}function getFuncName(func){for(var result=func.name+"",array=realNames[result],length=array?array.length:0;length--;){var data=array[length],otherFunc=data.func;if(null==otherFunc||otherFunc==func)return data.name}return result}function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;return result=result===indexOf?baseIndexOf:result,collection?result(collection,target,fromIndex):result}function getMatchData(object){for(var result=pairs(object),length=result.length;length--;)result[length][2]=isStrictComparable(result[length][1]);return result}function getNative(object,key){var value=null==object?undefined:object[key];return isNative(value)?value:undefined}function getView(start,end,transforms){for(var index=-1,length=transforms.length;++index<length;){var data=transforms[index],size=data.size;switch(data.type){case"drop":start+=size;break;case"dropRight":end-=size;break;case"take":end=nativeMin(end,start+size);break;case"takeRight":start=nativeMax(start,end-size)}}return{start:start,end:end}}function initCloneArray(array){var length=array.length,result=new array.constructor(length);return length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input),result}function initCloneObject(object){var Ctor=object.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor||(Ctor=Object),new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor((+object));case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function invokePath(object,path,args){null==object||isKey(path,object)||(path=toPath(path),object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),path=last(path));var func=null==object?object:object[path];return null==func?undefined:func.apply(object,args)}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isIndex(value,length){return value="number"==typeof value||reIsUint.test(value)?+value:-1,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&value%1==0&&value<length}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if("number"==type?isArrayLike(object)&&isIndex(index,object.length):"string"==type&&index in object){var other=object[index];return value===value?value===other:other!==other}return!1}function isKey(value,object){var type=typeof value;if("string"==type&&reIsPlainProp.test(value)||"number"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if("function"!=typeof other||!(funcName in LazyWrapper.prototype))return!1;if(func===other)return!0;var data=getData(other);return!!data&&func===data[0]}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isStrictComparable(value){return value===value&&!isObject(value)}function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<ARY_FLAG,isCombo=srcBitmask==ARY_FLAG&&bitmask==CURRY_FLAG||srcBitmask==ARY_FLAG&&bitmask==REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(ARY_FLAG|REARG_FLAG)&&bitmask==CURRY_FLAG;if(!isCommon&&!isCombo)return data;srcBitmask&BIND_FLAG&&(data[2]=source[2],newBitmask|=bitmask&BIND_FLAG?0:CURRY_BOUND_FLAG);var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):arrayCopy(value),data[4]=partials?replaceHolders(data[3],PLACEHOLDER):arrayCopy(source[4])}return value=source[5],value&&(partials=data[5],data[5]=partials?composeArgsRight(partials,value,source[6]):arrayCopy(value),data[6]=partials?replaceHolders(data[5],PLACEHOLDER):arrayCopy(source[6])),value=source[7],value&&(data[7]=arrayCopy(value)),srcBitmask&ARY_FLAG&&(data[8]=null==data[8]?source[8]:nativeMin(data[8],source[8])),null==data[9]&&(data[9]=source[9]),data[0]=source[0],data[1]=newBitmask,data}function mergeDefaults(objectValue,sourceValue){return objectValue===undefined?sourceValue:merge(objectValue,sourceValue,mergeDefaults)}function pickByArray(object,props){object=toObject(object);for(var index=-1,length=props.length,result={};++index<length;){var key=props[index];key in object&&(result[key]=object[key])}return result}function pickByCallback(object,predicate){var result={};return baseForIn(object,function(value,key,object){predicate(value,key,object)&&(result[key]=value)}),result}function reorder(array,indexes){for(var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=arrayCopy(array);length--;){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined}return array}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object)),index=-1,result=[];++index<propsLength;){
var key=props[index];(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key))&&result.push(key)}return result}function toIterable(value){return null==value?[]:isArrayLike(value)?isObject(value)?value:Object(value):values(value)}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value))return value;var result=[];return baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result}function wrapperClone(wrapper){return wrapper instanceof LazyWrapper?wrapper.clone():new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__,arrayCopy(wrapper.__actions__))}function chunk(array,size,guard){size=(guard?isIterateeCall(array,size,guard):null==size)?1:nativeMax(nativeFloor(size)||1,1);for(var index=0,length=array?array.length:0,resIndex=-1,result=Array(nativeCeil(length/size));index<length;)result[++resIndex]=baseSlice(array,index,index+=size);return result}function compact(array){for(var index=-1,length=array?array.length:0,resIndex=-1,result=[];++index<length;){var value=array[index];value&&(result[++resIndex]=value)}return result}function drop(array,n,guard){var length=array?array.length:0;return length?((guard?isIterateeCall(array,n,guard):null==n)&&(n=1),baseSlice(array,n<0?0:n)):[]}function dropRight(array,n,guard){var length=array?array.length:0;return length?((guard?isIterateeCall(array,n,guard):null==n)&&(n=1),n=length-(+n||0),baseSlice(array,0,n<0?0:n)):[]}function dropRightWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),!0,!0):[]}function dropWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),!0):[]}function fill(array,value,start,end){var length=array?array.length:0;return length?(start&&"number"!=typeof start&&isIterateeCall(array,value,start)&&(start=0,end=length),baseFill(array,value,start,end)):[]}function first(array){return array?array[0]:undefined}function flatten(array,isDeep,guard){var length=array?array.length:0;return guard&&isIterateeCall(array,isDeep,guard)&&(isDeep=!1),length?baseFlatten(array,isDeep):[]}function flattenDeep(array){var length=array?array.length:0;return length?baseFlatten(array,!0):[]}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length)return-1;if("number"==typeof fromIndex)fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex;else if(fromIndex){var index=binaryIndex(array,value);return index<length&&(value===value?value===array[index]:array[index]!==array[index])?index:-1}return baseIndexOf(array,value,fromIndex||0)}function initial(array){return dropRight(array,1)}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function lastIndexOf(array,value,fromIndex){var length=array?array.length:0;if(!length)return-1;var index=length;if("number"==typeof fromIndex)index=(fromIndex<0?nativeMax(length+fromIndex,0):nativeMin(fromIndex||0,length-1))+1;else if(fromIndex){index=binaryIndex(array,value,!0)-1;var other=array[index];return(value===value?value===other:other!==other)?index:-1}if(value!==value)return indexOfNaN(array,index,!0);for(;index--;)if(array[index]===value)return index;return-1}function pull(){var args=arguments,array=args[0];if(!array||!array.length)return array;for(var index=0,indexOf=getIndexOf(),length=args.length;++index<length;)for(var fromIndex=0,value=args[index];(fromIndex=indexOf(array,value,fromIndex))>-1;)splice.call(array,fromIndex,1);return array}function remove(array,predicate,thisArg){var result=[];if(!array||!array.length)return result;var index=-1,indexes=[],length=array.length;for(predicate=getCallback(predicate,thisArg,3);++index<length;){var value=array[index];predicate(value,index,array)&&(result.push(value),indexes.push(index))}return basePullAt(array,indexes),result}function rest(array){return drop(array,1)}function slice(array,start,end){var length=array?array.length:0;return length?(end&&"number"!=typeof end&&isIterateeCall(array,start,end)&&(start=0,end=length),baseSlice(array,start,end)):[]}function take(array,n,guard){var length=array?array.length:0;return length?((guard?isIterateeCall(array,n,guard):null==n)&&(n=1),baseSlice(array,0,n<0?0:n)):[]}function takeRight(array,n,guard){var length=array?array.length:0;return length?((guard?isIterateeCall(array,n,guard):null==n)&&(n=1),n=length-(+n||0),baseSlice(array,n<0?0:n)):[]}function takeRightWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),!1,!0):[]}function takeWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3)):[]}function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length)return[];null!=isSorted&&"boolean"!=typeof isSorted&&(thisArg=iteratee,iteratee=isIterateeCall(array,isSorted,thisArg)?undefined:isSorted,isSorted=!1);var callback=getCallback();return null==iteratee&&callback===baseCallback||(iteratee=callback(iteratee,thisArg,3)),isSorted&&getIndexOf()===baseIndexOf?sortedUniq(array,iteratee):baseUniq(array,iteratee)}function unzip(array){if(!array||!array.length)return[];var index=-1,length=0;array=arrayFilter(array,function(group){if(isArrayLike(group))return length=nativeMax(group.length,length),!0});for(var result=Array(length);++index<length;)result[index]=arrayMap(array,baseProperty(index));return result}function unzipWith(array,iteratee,thisArg){var length=array?array.length:0;if(!length)return[];var result=unzip(array);return null==iteratee?result:(iteratee=bindCallback(iteratee,thisArg,4),arrayMap(result,function(group){return arrayReduce(group,iteratee,undefined,!0)}))}function xor(){for(var index=-1,length=arguments.length;++index<length;){var array=arguments[index];if(isArrayLike(array))var result=result?arrayPush(baseDifference(result,array),baseDifference(array,result)):array}return result?baseUniq(result):[]}function zipObject(props,values){var index=-1,length=props?props.length:0,result={};for(!length||values||isArray(props[0])||(values=[]);++index<length;){var key=props[index];values?result[key]=values[index]:key&&(result[key[0]]=key[1])}return result}function chain(value){var result=lodash(value);return result.__chain__=!0,result}function tap(value,interceptor,thisArg){return interceptor.call(thisArg,value),value}function thru(value,interceptor,thisArg){return interceptor.call(thisArg,value)}function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperPlant(value){for(var result,parent=this;parent instanceof baseLodash;){var clone=wrapperClone(parent);result?previous.__wrapped__=clone:result=clone;var previous=clone;parent=parent.__wrapped__}return previous.__wrapped__=value,result}function wrapperReverse(){var value=this.__wrapped__,interceptor=function(value){return value.reverse()};if(value instanceof LazyWrapper){var wrapped=value;return this.__actions__.length&&(wrapped=new LazyWrapper(this)),wrapped=wrapped.reverse(),wrapped.__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(wrapped,this.__chain__)}return this.thru(interceptor)}function wrapperToString(){return this.value()+""}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}function every(collection,predicate,thisArg){var func=isArray(collection)?arrayEvery:baseEvery;return thisArg&&isIterateeCall(collection,predicate,thisArg)&&(predicate=undefined),"function"==typeof predicate&&thisArg===undefined||(predicate=getCallback(predicate,thisArg,3)),func(collection,predicate)}function filter(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;return predicate=getCallback(predicate,thisArg,3),func(collection,predicate)}function findWhere(collection,source){return find(collection,baseMatches(source))}function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;return isLength(length)||(collection=values(collection),length=collection.length),fromIndex="number"!=typeof fromIndex||guard&&isIterateeCall(target,fromIndex,guard)?0:fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0,"string"==typeof collection||!isArray(collection)&&isString(collection)?fromIndex<=length&&collection.indexOf(target,fromIndex)>-1:!!length&&getIndexOf(collection,target,fromIndex)>-1}function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;return iteratee=getCallback(iteratee,thisArg,3),func(collection,iteratee)}function pluck(collection,path){return map(collection,property(path))}function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;return predicate=getCallback(predicate,thisArg,3),func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function sample(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):null==n){collection=toIterable(collection);var length=collection.length;return length>0?collection[baseRandom(0,length-1)]:undefined}var index=-1,result=toArray(collection),length=result.length,lastIndex=length-1;for(n=nativeMin(n<0?0:+n||0,length);++index<n;){var rand=baseRandom(index,lastIndex),value=result[rand];result[rand]=result[index],result[index]=value}return result.length=n,result}function shuffle(collection){return sample(collection,POSITIVE_INFINITY)}function size(collection){var length=collection?getLength(collection):0;return isLength(length)?length:keys(collection).length}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;return thisArg&&isIterateeCall(collection,predicate,thisArg)&&(predicate=undefined),"function"==typeof predicate&&thisArg===undefined||(predicate=getCallback(predicate,thisArg,3)),func(collection,predicate)}function sortBy(collection,iteratee,thisArg){if(null==collection)return[];thisArg&&isIterateeCall(collection,iteratee,thisArg)&&(iteratee=undefined);var index=-1;iteratee=getCallback(iteratee,thisArg,3);var result=baseMap(collection,function(value,key,collection){return{criteria:iteratee(value,key,collection),index:++index,value:value}});return baseSortBy(result,compareAscending)}function sortByOrder(collection,iteratees,orders,guard){return null==collection?[]:(guard&&isIterateeCall(iteratees,orders,guard)&&(orders=undefined),isArray(iteratees)||(iteratees=null==iteratees?[]:[iteratees]),isArray(orders)||(orders=null==orders?[]:[orders]),baseSortByOrder(collection,iteratees,orders))}function where(collection,source){return filter(collection,baseMatches(source))}function after(n,func){if("function"!=typeof func){if("function"!=typeof n)throw new TypeError(FUNC_ERROR_TEXT);var temp=n;n=func,func=temp}return n=nativeIsFinite(n=+n)?n:0,function(){if(--n<1)return func.apply(this,arguments)}}function ary(func,n,guard){return guard&&isIterateeCall(func,n,guard)&&(n=undefined),n=func&&null==n?func.length:nativeMax(+n||0,0),createWrapper(func,ARY_FLAG,undefined,undefined,undefined,undefined,n)}function before(n,func){var result;if("function"!=typeof func){if("function"!=typeof n)throw new TypeError(FUNC_ERROR_TEXT);var temp=n;n=func,func=temp}return function(){return--n>0&&(result=func.apply(this,arguments)),n<=1&&(func=undefined),result}}function debounce(func,wait,options){function cancel(){timeoutId&&clearTimeout(timeoutId),maxTimeoutId&&clearTimeout(maxTimeoutId),lastCalled=0,maxTimeoutId=timeoutId=trailingCall=undefined}function complete(isCalled,id){id&&clearTimeout(id),maxTimeoutId=timeoutId=trailingCall=undefined,isCalled&&(lastCalled=now(),result=func.apply(thisArg,args),timeoutId||maxTimeoutId||(args=thisArg=undefined))}function delayed(){var remaining=wait-(now()-stamp);remaining<=0||remaining>wait?complete(trailingCall,maxTimeoutId):timeoutId=setTimeout(delayed,remaining)}function maxDelayed(){complete(trailing,timeoutId)}function debounced(){if(args=arguments,stamp=now(),thisArg=this,trailingCall=trailing&&(timeoutId||!leading),maxWait===!1)var leadingCall=leading&&!timeoutId;else{maxTimeoutId||leading||(lastCalled=stamp);var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0||remaining>maxWait;isCalled?(maxTimeoutId&&(maxTimeoutId=clearTimeout(maxTimeoutId)),lastCalled=stamp,result=func.apply(thisArg,args)):maxTimeoutId||(maxTimeoutId=setTimeout(maxDelayed,remaining))}return isCalled&&timeoutId?timeoutId=clearTimeout(timeoutId):timeoutId||wait===maxWait||(timeoutId=setTimeout(delayed,wait)),leadingCall&&(isCalled=!0,result=func.apply(thisArg,args)),!isCalled||timeoutId||maxTimeoutId||(args=thisArg=undefined),result}var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=!1,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);if(wait=wait<0?0:+wait||0,options===!0){var leading=!0;trailing=!1}else isObject(options)&&(leading=!!options.leading,maxWait="maxWait"in options&&nativeMax(+options.maxWait||0,wait),trailing="trailing"in options?!!options.trailing:trailing);return debounced.cancel=cancel,debounced}function memoize(func,resolver){if("function"!=typeof func||resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result),result};return memoized.cache=new memoize.Cache,memoized}function negate(predicate){if("function"!=typeof predicate)throw new TypeError(FUNC_ERROR_TEXT);return function(){return!predicate.apply(this,arguments)}}function once(func){return before(2,func)}function restParam(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(start===undefined?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);++index<length;)rest[index]=args[start+index];switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);for(index=-1;++index<start;)otherArgs[index]=args[index];return otherArgs[start]=rest,func.apply(this,otherArgs)}}function spread(func){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return function(array){return func.apply(this,array)}}function throttle(func,wait,options){var leading=!0,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return options===!1?leading=!1:isObject(options)&&(leading="leading"in options?!!options.leading:leading,trailing="trailing"in options?!!options.trailing:trailing),debounce(func,wait,{leading:leading,maxWait:+wait,trailing:trailing})}function wrap(value,wrapper){return wrapper=null==wrapper?identity:wrapper,createWrapper(wrapper,PARTIAL_FLAG,undefined,[value],[])}function clone(value,isDeep,customizer,thisArg){return isDeep&&"boolean"!=typeof isDeep&&isIterateeCall(value,isDeep,customizer)?isDeep=!1:"function"==typeof isDeep&&(thisArg=customizer,customizer=isDeep,isDeep=!1),"function"==typeof customizer?baseClone(value,isDeep,bindCallback(customizer,thisArg,3)):baseClone(value,isDeep)}function cloneDeep(value,customizer,thisArg){return"function"==typeof customizer?baseClone(value,!0,bindCallback(customizer,thisArg,3)):baseClone(value,!0)}function gt(value,other){return value>other}function gte(value,other){return value>=other}function isArguments(value){return isObjectLike(value)&&isArrayLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")}function isBoolean(value){return value===!0||value===!1||isObjectLike(value)&&objToString.call(value)==boolTag}function isDate(value){return isObjectLike(value)&&objToString.call(value)==dateTag}function isElement(value){return!!value&&1===value.nodeType&&isObjectLike(value)&&!isPlainObject(value)}function isEmpty(value){return null==value||(isArrayLike(value)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))?!value.length:!keys(value).length)}function isEqual(value,other,customizer,thisArg){customizer="function"==typeof customizer?bindCallback(customizer,thisArg,3):undefined;var result=customizer?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,customizer):!!result}function isError(value){return isObjectLike(value)&&"string"==typeof value.message&&objToString.call(value)==errorTag}function isFinite(value){return"number"==typeof value&&nativeIsFinite(value)}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isMatch(object,source,customizer,thisArg){return customizer="function"==typeof customizer?bindCallback(customizer,thisArg,3):undefined,baseIsMatch(object,getMatchData(source),customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){return null!=value&&(isFunction(value)?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value))}function isNull(value){return null===value}function isNumber(value){return"number"==typeof value||isObjectLike(value)&&objToString.call(value)==numberTag}function isPlainObject(value){var Ctor;if(!isObjectLike(value)||objToString.call(value)!=objectTag||isArguments(value)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,"function"==typeof Ctor&&!(Ctor instanceof Ctor)))return!1;var result;return baseForIn(value,function(subValue,key){result=key}),result===undefined||hasOwnProperty.call(value,result)}function isRegExp(value){return isObject(value)&&objToString.call(value)==regexpTag}function isString(value){return"string"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function isUndefined(value){return value===undefined}function lt(value,other){return value<other}function lte(value,other){return value<=other}function toArray(value){var length=value?getLength(value):0;return isLength(length)?length?arrayCopy(value):[]:values(value)}function toPlainObject(value){return baseCopy(value,keysIn(value))}function create(prototype,properties,guard){var result=baseCreate(prototype);return guard&&isIterateeCall(prototype,properties,guard)&&(properties=undefined),properties?baseAssign(result,properties):result}function functions(object){return baseFunctions(object,keysIn(object))}function get(object,path,defaultValue){var result=null==object?undefined:baseGet(object,toPath(path),path+"");return result===undefined?defaultValue:result}function has(object,path){if(null==object)return!1;var result=hasOwnProperty.call(object,path);if(!result&&!isKey(path)){if(path=toPath(path),object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),null==object)return!1;path=last(path),result=hasOwnProperty.call(object,path)}return result||isLength(object.length)&&isIndex(path,object.length)&&(isArray(object)||isArguments(object))}function invert(object,multiValue,guard){guard&&isIterateeCall(object,multiValue,guard)&&(multiValue=undefined);for(var index=-1,props=keys(object),length=props.length,result={};++index<length;){var key=props[index],value=object[key];multiValue?hasOwnProperty.call(result,value)?result[value].push(key):result[value]=[key]:result[value]=key}return result}function keysIn(object){if(null==object)return[];isObject(object)||(object=Object(object));var length=object.length;length=length&&isLength(length)&&(isArray(object)||isArguments(object))&&length||0;for(var Ctor=object.constructor,index=-1,isProto="function"==typeof Ctor&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;++index<length;)result[index]=index+"";for(var key in object)skipIndexes&&isIndex(key,length)||"constructor"==key&&(isProto||!hasOwnProperty.call(object,key))||result.push(key);return result}function pairs(object){object=toObject(object);for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index<length;){var key=props[index];result[index]=[key,object[key]]}return result}function result(object,path,defaultValue){var result=null==object?undefined:object[path];return result===undefined&&(null==object||isKey(path,object)||(path=toPath(path),object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),result=null==object?undefined:object[last(path)]),result=result===undefined?defaultValue:result),isFunction(result)?result.call(object):result}function set(object,path,value){if(null==object)return object;var pathKey=path+"";path=null!=object[pathKey]||isKey(path,object)?[pathKey]:toPath(path);for(var index=-1,length=path.length,lastIndex=length-1,nested=object;null!=nested&&++index<length;){var key=path[index];isObject(nested)&&(index==lastIndex?nested[key]=value:null==nested[key]&&(nested[key]=isIndex(path[index+1])?[]:{})),nested=nested[key]}return object}function transform(object,iteratee,accumulator,thisArg){var isArr=isArray(object)||isTypedArray(object);if(iteratee=getCallback(iteratee,thisArg,4),null==accumulator)if(isArr||isObject(object)){var Ctor=object.constructor;accumulator=isArr?isArray(object)?new Ctor:[]:baseCreate(isFunction(Ctor)?Ctor.prototype:undefined)}else accumulator={};return(isArr?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object)}),accumulator}function values(object){return baseValues(object,keys(object))}function valuesIn(object){return baseValues(object,keysIn(object))}function inRange(value,start,end){return start=+start||0,end===undefined?(end=start,start=0):end=+end||0,value>=nativeMin(start,end)&&value<nativeMax(start,end)}function random(min,max,floating){floating&&isIterateeCall(min,max,floating)&&(max=floating=undefined);var noMin=null==min,noMax=null==max;if(null==floating&&(noMax&&"boolean"==typeof min?(floating=min,min=1):"boolean"==typeof max&&(floating=max,noMax=!0)),noMin&&noMax&&(max=1,noMax=!1),min=+min||0,noMax?(max=min,min=0):max=+max||0,floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}function capitalize(string){return string=baseToString(string),string&&string.charAt(0).toUpperCase()+string.slice(1)}function deburr(string){return string=baseToString(string),string&&string.replace(reLatin1,deburrLetter).replace(reComboMark,"")}function endsWith(string,target,position){string=baseToString(string),target+="";var length=string.length;return position=position===undefined?length:nativeMin(position<0?0:+position||0,length),position-=target.length,position>=0&&string.indexOf(target,position)==position}function escape(string){return string=baseToString(string),string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,escapeRegExpChar):string||"(?:)"}function pad(string,length,chars){string=baseToString(string),length=+length;var strLength=string.length;if(strLength>=length||!nativeIsFinite(length))return string;var mid=(length-strLength)/2,leftLength=nativeFloor(mid),rightLength=nativeCeil(mid);return chars=createPadding("",rightLength,chars),chars.slice(0,leftLength)+string+chars}function parseInt(string,radix,guard){return(guard?isIterateeCall(string,radix,guard):null==radix)?radix=0:radix&&(radix=+radix),string=trim(string),nativeParseInt(string,radix||(reHasHexPrefix.test(string)?16:10))}function repeat(string,n){var result="";if(string=baseToString(string),n=+n,n<1||!string||!nativeIsFinite(n))return result;do n%2&&(result+=string),n=nativeFloor(n/2),string+=string;while(n);return result}function startsWith(string,target,position){return string=baseToString(string),position=null==position?0:nativeMin(position<0?0:+position||0,string.length),string.lastIndexOf(target,position)==position}function template(string,options,otherOptions){var settings=lodash.templateSettings;otherOptions&&isIterateeCall(string,options,otherOptions)&&(options=otherOptions=undefined),string=baseToString(string),options=assignWith(baseAssign({},otherOptions||options),settings,assignOwnDefaults);var isEscaping,isEvaluating,imports=assignWith(baseAssign({},options.imports),settings.imports,assignOwnDefaults),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys),index=0,interpolate=options.interpolate||reNoMatch,source="__p += '",reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g"),sourceURL="//# sourceURL="+("sourceURL"in options?options.sourceURL:"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){return interpolateValue||(interpolateValue=esTemplateValue),source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar),escapeValue&&(isEscaping=!0,source+="' +\n__e("+escapeValue+") +\n'"),evaluateValue&&(isEvaluating=!0,source+="';\n"+evaluateValue+";\n__p += '"),interpolateValue&&(source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"),index=offset+match.length,match}),source+="';\n";var variable=options.variable;variable||(source="with (obj) {\n"+source+"\n}\n"),source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;"),source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)});if(result.source=source,isError(result))throw result;return result}function trim(string,chars,guard){var value=string;return(string=baseToString(string))?(guard?isIterateeCall(value,chars,guard):null==chars)?string.slice(trimmedLeftIndex(string),trimmedRightIndex(string)+1):(chars+="",string.slice(charsLeftIndex(string,chars),charsRightIndex(string,chars)+1)):string}function trimLeft(string,chars,guard){var value=string;return string=baseToString(string),string?(guard?isIterateeCall(value,chars,guard):null==chars)?string.slice(trimmedLeftIndex(string)):string.slice(charsLeftIndex(string,chars+"")):string}function trimRight(string,chars,guard){var value=string;return string=baseToString(string),string?(guard?isIterateeCall(value,chars,guard):null==chars)?string.slice(0,trimmedRightIndex(string)+1):string.slice(0,charsRightIndex(string,chars+"")+1):string}function trunc(string,options,guard){guard&&isIterateeCall(string,options,guard)&&(options=undefined);var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(null!=options)if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?+options.length||0:length,omission="omission"in options?baseToString(options.omission):omission}else length=+options||0;if(string=baseToString(string),length>=string.length)return string;var end=length-omission.length;if(end<1)return omission;var result=string.slice(0,end);if(null==separator)return result+omission;if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,newEnd,substring=string.slice(0,end);for(separator.global||(separator=RegExp(separator.source,(reFlags.exec(separator)||"")+"g")),separator.lastIndex=0;match=separator.exec(substring);)newEnd=match.index;result=result.slice(0,null==newEnd?end:newEnd)}}else if(string.indexOf(separator,end)!=end){var index=result.lastIndexOf(separator);index>-1&&(result=result.slice(0,index))}return result+omission}function unescape(string){return string=baseToString(string),string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}function words(string,pattern,guard){return guard&&isIterateeCall(string,pattern,guard)&&(pattern=undefined),string=baseToString(string),string.match(pattern||reWords)||[]}function callback(func,thisArg,guard){return guard&&isIterateeCall(func,thisArg,guard)&&(thisArg=undefined),isObjectLike(func)?matches(func):baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function matches(source){return baseMatches(baseClone(source,!0))}function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,!0))}function mixin(object,source,options){if(null==options){var isObj=isObject(source),props=isObj?keys(source):undefined,methodNames=props&&props.length?baseFunctions(source,props):undefined;(methodNames?methodNames.length:isObj)||(methodNames=!1,options=source,source=object,object=this)}methodNames||(methodNames=baseFunctions(source,keys(source)));var chain=!0,index=-1,isFunc=isFunction(object),length=methodNames.length;options===!1?chain=!1:isObject(options)&&"chain"in options&&(chain=options.chain);for(;++index<length;){var methodName=methodNames[index],func=source[methodName];object[methodName]=func,isFunc&&(object.prototype[methodName]=function(func){return function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__),actions=result.__actions__=arrayCopy(this.__actions__);return actions.push({func:func,args:arguments,thisArg:object}),result.__chain__=chainAll,result}return func.apply(object,arrayPush([this.value()],arguments))}}(func))}return object}function noConflict(){return root._=oldDash,this}function noop(){}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}function propertyOf(object){return function(path){return baseGet(object,toPath(path),path+"")}}function range(start,end,step){step&&isIterateeCall(start,end,step)&&(end=step=undefined),start=+start||0,step=null==step?1:+step||0,null==end?(end=start,start=0):end=+end||0;for(var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);++index<length;)result[index]=start,start+=step;return result}function times(n,iteratee,thisArg){if(n=nativeFloor(n),n<1||!nativeIsFinite(n))return[];var index=-1,result=Array(nativeMin(n,MAX_ARRAY_LENGTH));for(iteratee=bindCallback(iteratee,thisArg,1);++index<n;)index<MAX_ARRAY_LENGTH?result[index]=iteratee(index):iteratee(index);return result}function uniqueId(prefix){var id=++idCounter;return baseToString(prefix)+id}function add(augend,addend){return(+augend||0)+(+addend||0)}function sum(collection,iteratee,thisArg){return thisArg&&isIterateeCall(collection,iteratee,thisArg)&&(iteratee=undefined),iteratee=getCallback(iteratee,thisArg,3),1==iteratee.length?arraySum(isArray(collection)?collection:toIterable(collection),iteratee):baseSum(collection,iteratee)}context=context?_.defaults(root.Object(),context,_.pick(root,contextProps)):root;var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Number=context.Number,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError,arrayProto=Array.prototype,objectProto=Object.prototype,stringProto=String.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,idCounter=0,objToString=objectProto.toString,oldDash=root._,reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ArrayBuffer=context.ArrayBuffer,clearTimeout=context.clearTimeout,parseFloat=context.parseFloat,pow=Math.pow,propertyIsEnumerable=objectProto.propertyIsEnumerable,Set=getNative(context,"Set"),setTimeout=context.setTimeout,splice=arrayProto.splice,Uint8Array=context.Uint8Array,WeakMap=getNative(context,"WeakMap"),nativeCeil=Math.ceil,nativeCreate=getNative(Object,"create"),nativeFloor=Math.floor,nativeIsArray=getNative(Array,"isArray"),nativeIsFinite=context.isFinite,nativeKeys=getNative(Object,"keys"),nativeMax=Math.max,nativeMin=Math.min,nativeNow=getNative(Date,"now"),nativeParseInt=context.parseInt,nativeRandom=Math.random,NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,POSITIVE_INFINITY=Number.POSITIVE_INFINITY,MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1,MAX_SAFE_INTEGER=9007199254740991,metaMap=WeakMap&&new WeakMap,realNames={};
lodash.support={};lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}};var baseCreate=function(){function object(){}return function(prototype){if(isObject(prototype)){object.prototype=prototype;var result=new object;object.prototype=undefined}return result||{}}}(),baseEach=createBaseEach(baseForOwn),baseEachRight=createBaseEach(baseForOwnRight,!0),baseFor=createBaseFor(),baseForRight=createBaseFor(!0),baseSetData=metaMap?function(func,data){return metaMap.set(func,data),func}:identity,getData=metaMap?function(func){return metaMap.get(func)}:noop,getLength=baseProperty("length"),setData=function(){var count=0,lastCalled=0;return function(key,value){var stamp=now(),remaining=HOT_SPAN-(stamp-lastCalled);if(lastCalled=stamp,remaining>0){if(++count>=HOT_COUNT)return key}else count=0;return baseSetData(key,value)}}(),difference=restParam(function(array,values){return isObjectLike(array)&&isArrayLike(array)?baseDifference(array,baseFlatten(values,!1,!0)):[]}),findIndex=createFindIndex(),findLastIndex=createFindIndex(!0),intersection=restParam(function(arrays){for(var othLength=arrays.length,othIndex=othLength,caches=Array(length),indexOf=getIndexOf(),isCommon=indexOf===baseIndexOf,result=[];othIndex--;){var value=arrays[othIndex]=isArrayLike(value=arrays[othIndex])?value:[];caches[othIndex]=isCommon&&value.length>=120?createCache(othIndex&&value):null}var array=arrays[0],index=-1,length=array?array.length:0,seen=caches[0];outer:for(;++index<length;)if(value=array[index],(seen?cacheIndexOf(seen,value):indexOf(result,value,0))<0){for(var othIndex=othLength;--othIndex;){var cache=caches[othIndex];if((cache?cacheIndexOf(cache,value):indexOf(arrays[othIndex],value,0))<0)continue outer}seen&&seen.push(value),result.push(value)}return result}),pullAt=restParam(function(array,indexes){indexes=baseFlatten(indexes);var result=baseAt(array,indexes);return basePullAt(array,indexes.sort(baseCompareAscending)),result}),sortedIndex=createSortedIndex(),sortedLastIndex=createSortedIndex(!0),union=restParam(function(arrays){return baseUniq(baseFlatten(arrays,!1,!0))}),without=restParam(function(array,values){return isArrayLike(array)?baseDifference(array,values):[]}),zip=restParam(unzip),zipWith=restParam(function(arrays){var length=arrays.length,iteratee=length>2?arrays[length-2]:undefined,thisArg=length>1?arrays[length-1]:undefined;return length>2&&"function"==typeof iteratee?length-=2:(iteratee=length>1&&"function"==typeof thisArg?(--length,thisArg):undefined,thisArg=undefined),arrays.length=length,unzipWith(arrays,iteratee,thisArg)}),wrapperConcat=restParam(function(values){return values=baseFlatten(values),this.thru(function(array){return arrayConcat(isArray(array)?array:[toObject(array)],values)})}),at=restParam(function(collection,props){return baseAt(collection,baseFlatten(props))}),countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:result[key]=1}),find=createFind(baseEach),findLast=createFind(baseEachRight,!0),forEach=createForEach(arrayEach,baseEach),forEachRight=createForEach(arrayEachRight,baseEachRight),groupBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key].push(value):result[key]=[value]}),indexBy=createAggregator(function(result,value,key){result[key]=value}),invoke=restParam(function(collection,path,args){var index=-1,isFunc="function"==typeof path,isProp=isKey(path),result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value){var func=isFunc?path:isProp&&null!=value?value[path]:undefined;result[++index]=func?func.apply(value,args):invokePath(value,path,args)}),result}),partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]}),reduce=createReduce(arrayReduce,baseEach),reduceRight=createReduce(arrayReduceRight,baseEachRight),sortByAll=restParam(function(collection,iteratees){if(null==collection)return[];var guard=iteratees[2];return guard&&isIterateeCall(iteratees[0],iteratees[1],guard)&&(iteratees.length=1),baseSortByOrder(collection,baseFlatten(iteratees),[])}),now=nativeNow||function(){return(new Date).getTime()},bind=restParam(function(func,thisArg,partials){var bitmask=BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,bind.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(func,bitmask,thisArg,partials,holders)}),bindAll=restParam(function(object,methodNames){methodNames=methodNames.length?baseFlatten(methodNames):functions(object);for(var index=-1,length=methodNames.length;++index<length;){var key=methodNames[index];object[key]=createWrapper(object[key],BIND_FLAG,object)}return object}),bindKey=restParam(function(object,key,partials){var bitmask=BIND_FLAG|BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,bindKey.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(key,bitmask,object,partials,holders)}),curry=createCurry(CURRY_FLAG),curryRight=createCurry(CURRY_RIGHT_FLAG),defer=restParam(function(func,args){return baseDelay(func,1,args)}),delay=restParam(function(func,wait,args){return baseDelay(func,wait,args)}),flow=createFlow(),flowRight=createFlow(!0),modArgs=restParam(function(func,transforms){if(transforms=baseFlatten(transforms),"function"!=typeof func||!arrayEvery(transforms,baseIsFunction))throw new TypeError(FUNC_ERROR_TEXT);var length=transforms.length;return restParam(function(args){for(var index=nativeMin(args.length,length);index--;)args[index]=transforms[index](args[index]);return func.apply(this,args)})}),partial=createPartial(PARTIAL_FLAG),partialRight=createPartial(PARTIAL_RIGHT_FLAG),rearg=restParam(function(func,indexes){return createWrapper(func,REARG_FLAG,undefined,undefined,undefined,baseFlatten(indexes))}),isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag},merge=createAssigner(baseMerge),assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)}),defaults=createDefaults(assign,assignDefaults),defaultsDeep=createDefaults(merge,mergeDefaults),findKey=createFindKey(baseForOwn),findLastKey=createFindKey(baseForOwnRight),forIn=createForIn(baseFor),forInRight=createForIn(baseForRight),forOwn=createForOwn(baseForOwn),forOwnRight=createForOwn(baseForOwnRight),keys=nativeKeys?function(object){var Ctor=null==object?undefined:object.constructor;return"function"==typeof Ctor&&Ctor.prototype===object||"function"!=typeof object&&isArrayLike(object)?shimKeys(object):isObject(object)?nativeKeys(object):[]}:shimKeys,mapKeys=createObjectMapper(!0),mapValues=createObjectMapper(),omit=restParam(function(object,props){if(null==object)return{};if("function"!=typeof props[0]){var props=arrayMap(baseFlatten(props),String);return pickByArray(object,baseDifference(keysIn(object),props))}var predicate=bindCallback(props[0],props[1],3);return pickByCallback(object,function(value,key,object){return!predicate(value,key,object)})}),pick=restParam(function(object,props){return null==object?{}:"function"==typeof props[0]?pickByCallback(object,bindCallback(props[0],props[1],3)):pickByArray(object,baseFlatten(props))}),camelCase=createCompounder(function(result,word,index){return word=word.toLowerCase(),result+(index?word.charAt(0).toUpperCase()+word.slice(1):word)}),kebabCase=createCompounder(function(result,word,index){return result+(index?"-":"")+word.toLowerCase()}),padLeft=createPadDir(),padRight=createPadDir(!0),snakeCase=createCompounder(function(result,word,index){return result+(index?"_":"")+word.toLowerCase()}),startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+(word.charAt(0).toUpperCase()+word.slice(1))}),attempt=restParam(function(func,args){try{return func.apply(undefined,args)}catch(e){return isError(e)?e:new Error(e)}}),method=restParam(function(path,args){return function(object){return invokePath(object,path,args)}}),methodOf=restParam(function(object,args){return function(path){return invokePath(object,path,args)}}),ceil=createRound("ceil"),floor=createRound("floor"),max=createExtremum(gt,NEGATIVE_INFINITY),min=createExtremum(lt,POSITIVE_INFINITY),round=createRound("round");return lodash.prototype=baseLodash.prototype,LodashWrapper.prototype=baseCreate(baseLodash.prototype),LodashWrapper.prototype.constructor=LodashWrapper,LazyWrapper.prototype=baseCreate(baseLodash.prototype),LazyWrapper.prototype.constructor=LazyWrapper,MapCache.prototype["delete"]=mapDelete,MapCache.prototype.get=mapGet,MapCache.prototype.has=mapHas,MapCache.prototype.set=mapSet,SetCache.prototype.push=cachePush,memoize.Cache=MapCache,lodash.after=after,lodash.ary=ary,lodash.assign=assign,lodash.at=at,lodash.before=before,lodash.bind=bind,lodash.bindAll=bindAll,lodash.bindKey=bindKey,lodash.callback=callback,lodash.chain=chain,lodash.chunk=chunk,lodash.compact=compact,lodash.constant=constant,lodash.countBy=countBy,lodash.create=create,lodash.curry=curry,lodash.curryRight=curryRight,lodash.debounce=debounce,lodash.defaults=defaults,lodash.defaultsDeep=defaultsDeep,lodash.defer=defer,lodash.delay=delay,lodash.difference=difference,lodash.drop=drop,lodash.dropRight=dropRight,lodash.dropRightWhile=dropRightWhile,lodash.dropWhile=dropWhile,lodash.fill=fill,lodash.filter=filter,lodash.flatten=flatten,lodash.flattenDeep=flattenDeep,lodash.flow=flow,lodash.flowRight=flowRight,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=forIn,lodash.forInRight=forInRight,lodash.forOwn=forOwn,lodash.forOwnRight=forOwnRight,lodash.functions=functions,lodash.groupBy=groupBy,lodash.indexBy=indexBy,lodash.initial=initial,lodash.intersection=intersection,lodash.invert=invert,lodash.invoke=invoke,lodash.keys=keys,lodash.keysIn=keysIn,lodash.map=map,lodash.mapKeys=mapKeys,lodash.mapValues=mapValues,lodash.matches=matches,lodash.matchesProperty=matchesProperty,lodash.memoize=memoize,lodash.merge=merge,lodash.method=method,lodash.methodOf=methodOf,lodash.mixin=mixin,lodash.modArgs=modArgs,lodash.negate=negate,lodash.omit=omit,lodash.once=once,lodash.pairs=pairs,lodash.partial=partial,lodash.partialRight=partialRight,lodash.partition=partition,lodash.pick=pick,lodash.pluck=pluck,lodash.property=property,lodash.propertyOf=propertyOf,lodash.pull=pull,lodash.pullAt=pullAt,lodash.range=range,lodash.rearg=rearg,lodash.reject=reject,lodash.remove=remove,lodash.rest=rest,lodash.restParam=restParam,lodash.set=set,lodash.shuffle=shuffle,lodash.slice=slice,lodash.sortBy=sortBy,lodash.sortByAll=sortByAll,lodash.sortByOrder=sortByOrder,lodash.spread=spread,lodash.take=take,lodash.takeRight=takeRight,lodash.takeRightWhile=takeRightWhile,lodash.takeWhile=takeWhile,lodash.tap=tap,lodash.throttle=throttle,lodash.thru=thru,lodash.times=times,lodash.toArray=toArray,lodash.toPlainObject=toPlainObject,lodash.transform=transform,lodash.union=union,lodash.uniq=uniq,lodash.unzip=unzip,lodash.unzipWith=unzipWith,lodash.values=values,lodash.valuesIn=valuesIn,lodash.where=where,lodash.without=without,lodash.wrap=wrap,lodash.xor=xor,lodash.zip=zip,lodash.zipObject=zipObject,lodash.zipWith=zipWith,lodash.backflow=flowRight,lodash.collect=map,lodash.compose=flowRight,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.extend=assign,lodash.iteratee=callback,lodash.methods=functions,lodash.object=zipObject,lodash.select=filter,lodash.tail=rest,lodash.unique=uniq,mixin(lodash,lodash),lodash.add=add,lodash.attempt=attempt,lodash.camelCase=camelCase,lodash.capitalize=capitalize,lodash.ceil=ceil,lodash.clone=clone,lodash.cloneDeep=cloneDeep,lodash.deburr=deburr,lodash.endsWith=endsWith,lodash.escape=escape,lodash.escapeRegExp=escapeRegExp,lodash.every=every,lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=findKey,lodash.findLast=findLast,lodash.findLastIndex=findLastIndex,lodash.findLastKey=findLastKey,lodash.findWhere=findWhere,lodash.first=first,lodash.floor=floor,lodash.get=get,lodash.gt=gt,lodash.gte=gte,lodash.has=has,lodash.identity=identity,lodash.includes=includes,lodash.indexOf=indexOf,lodash.inRange=inRange,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isBoolean=isBoolean,lodash.isDate=isDate,lodash.isElement=isElement,lodash.isEmpty=isEmpty,lodash.isEqual=isEqual,lodash.isError=isError,lodash.isFinite=isFinite,lodash.isFunction=isFunction,lodash.isMatch=isMatch,lodash.isNaN=isNaN,lodash.isNative=isNative,lodash.isNull=isNull,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isRegExp=isRegExp,lodash.isString=isString,lodash.isTypedArray=isTypedArray,lodash.isUndefined=isUndefined,lodash.kebabCase=kebabCase,lodash.last=last,lodash.lastIndexOf=lastIndexOf,lodash.lt=lt,lodash.lte=lte,lodash.max=max,lodash.min=min,lodash.noConflict=noConflict,lodash.noop=noop,lodash.now=now,lodash.pad=pad,lodash.padLeft=padLeft,lodash.padRight=padRight,lodash.parseInt=parseInt,lodash.random=random,lodash.reduce=reduce,lodash.reduceRight=reduceRight,lodash.repeat=repeat,lodash.result=result,lodash.round=round,lodash.runInContext=runInContext,lodash.size=size,lodash.snakeCase=snakeCase,lodash.some=some,lodash.sortedIndex=sortedIndex,lodash.sortedLastIndex=sortedLastIndex,lodash.startCase=startCase,lodash.startsWith=startsWith,lodash.sum=sum,lodash.template=template,lodash.trim=trim,lodash.trimLeft=trimLeft,lodash.trimRight=trimRight,lodash.trunc=trunc,lodash.unescape=unescape,lodash.uniqueId=uniqueId,lodash.words=words,lodash.all=every,lodash.any=some,lodash.contains=includes,lodash.eq=isEqual,lodash.detect=find,lodash.foldl=reduce,lodash.foldr=reduceRight,lodash.head=first,lodash.include=includes,lodash.inject=reduce,mixin(lodash,function(){var source={};return baseForOwn(lodash,function(func,methodName){lodash.prototype[methodName]||(source[methodName]=func)}),source}(),!1),lodash.sample=sample,lodash.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(value){return sample(value,n)}):sample(this.value())},lodash.VERSION=VERSION,arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(methodName){lodash[methodName].placeholder=lodash}),arrayEach(["drop","take"],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){var filtered=this.__filtered__;if(filtered&&!index)return new LazyWrapper(this);n=null==n?1:nativeMax(nativeFloor(n)||0,0);var result=this.clone();return filtered?result.__takeCount__=nativeMin(result.__takeCount__,n):result.__views__.push({size:n,type:methodName+(result.__dir__<0?"Right":"")}),result},LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()}}),arrayEach(["filter","map","takeWhile"],function(methodName,index){var type=index+1,isFilter=type!=LAZY_MAP_FLAG;LazyWrapper.prototype[methodName]=function(iteratee,thisArg){var result=this.clone();return result.__iteratees__.push({iteratee:getCallback(iteratee,thisArg,1),type:type}),result.__filtered__=result.__filtered__||isFilter,result}}),arrayEach(["first","last"],function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}}),arrayEach(["initial","rest"],function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1)}}),arrayEach(["pluck","where"],function(methodName,index){var operationName=index?"filter":"map",createCallback=index?baseMatches:property;LazyWrapper.prototype[methodName]=function(value){return this[operationName](createCallback(value))}}),LazyWrapper.prototype.compact=function(){return this.filter(identity)},LazyWrapper.prototype.reject=function(predicate,thisArg){return predicate=getCallback(predicate,thisArg,1),this.filter(function(value){return!predicate(value)})},LazyWrapper.prototype.slice=function(start,end){start=null==start?0:+start||0;var result=this;return result.__filtered__&&(start>0||end<0)?new LazyWrapper(result):(start<0?result=result.takeRight(-start):start&&(result=result.drop(start)),end!==undefined&&(end=+end||0,result=end<0?result.dropRight(-end):result.take(end-start)),result)},LazyWrapper.prototype.takeRightWhile=function(predicate,thisArg){return this.reverse().takeWhile(predicate,thisArg).reverse()},LazyWrapper.prototype.toArray=function(){return this.take(POSITIVE_INFINITY)},baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|map|reject)|While$/.test(methodName),retUnwrapped=/^(?:first|last)$/.test(methodName),lodashFunc=lodash[retUnwrapped?"take"+("last"==methodName?"Right":""):methodName];lodashFunc&&(lodash.prototype[methodName]=function(){var args=retUnwrapped?[1]:arguments,chainAll=this.__chain__,value=this.__wrapped__,isHybrid=!!this.__actions__.length,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value);useLazy&&checkIteratee&&"function"==typeof iteratee&&1!=iteratee.length&&(isLazy=useLazy=!1);var interceptor=function(value){return retUnwrapped&&chainAll?lodashFunc(value,1)[0]:lodashFunc.apply(undefined,arrayPush([value],args))},action={func:thru,args:[interceptor],thisArg:undefined},onlyLazy=isLazy&&!isHybrid;if(retUnwrapped&&!chainAll)return onlyLazy?(value=value.clone(),value.__actions__.push(action),func.call(value)):lodashFunc.call(undefined,this.value())[0];if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);return result.__actions__.push(action),new LodashWrapper(result,chainAll)}return this.thru(interceptor)})}),arrayEach(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(methodName){var func=(/^(?:replace|split)$/.test(methodName)?stringProto:arrayProto)[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:join|pop|replace|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;return retUnwrapped&&!this.__chain__?func.apply(this.value(),args):this[chainName](function(value){return func.apply(value,args)})}}),baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+"",names=realNames[key]||(realNames[key]=[]);names.push({name:methodName,func:lodashFunc})}}),realNames[createHybridWrapper(undefined,BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined}],LazyWrapper.prototype.clone=lazyClone,LazyWrapper.prototype.reverse=lazyReverse,LazyWrapper.prototype.value=lazyValue,lodash.prototype.chain=wrapperChain,lodash.prototype.commit=wrapperCommit,lodash.prototype.concat=wrapperConcat,lodash.prototype.plant=wrapperPlant,lodash.prototype.reverse=wrapperReverse,lodash.prototype.toString=wrapperToString,lodash.prototype.run=lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue,lodash.prototype.collect=lodash.prototype.map,lodash.prototype.head=lodash.prototype.first,lodash.prototype.select=lodash.prototype.filter,lodash.prototype.tail=lodash.prototype.rest,lodash}var undefined,VERSION="3.10.1",BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_FLAG=8,CURRY_RIGHT_FLAG=16,PARTIAL_FLAG=32,PARTIAL_RIGHT_FLAG=64,ARY_FLAG=128,REARG_FLAG=256,DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION="...",HOT_COUNT=150,HOT_SPAN=16,LARGE_ARRAY_SIZE=200,LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,FUNC_ERROR_TEXT="Expected a function",PLACEHOLDER="__lodash_placeholder__",argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g,reEscapedHtml=/&(?:amp|lt|gt|quot|#39|#96);/g,reUnescapedHtml=/[&<>"'`]/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source),reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,reRegExpChars=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,reHasRegExpChars=RegExp(reRegExpChars.source),reComboMark=/[\u0300-\u036f\ufe20-\ufe23]/g,reEscapeChar=/\\(\\)?/g,reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,reFlags=/\w*$/,reHasHexPrefix=/^0[xX]/,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^\d+$/,reLatin1=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,reNoMatch=/($^)/,reUnescapedString=/['\n\r\u2028\u2029\\]/g,reWords=function(){var upper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",lower="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(upper+"+(?="+upper+lower+")|"+upper+"?"+lower+"|"+upper+"+|[0-9]+","g")}(),contextProps=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],templateCounter=-1,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=!1;var deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},htmlUnescapes={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},objectTypes={"function":!0,object:!0},regexpEscapes={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,freeGlobal=freeExports&&freeModule&&"object"==typeof global&&global&&global.Object&&global,freeSelf=objectTypes[typeof self]&&self&&self.Object&&self,freeWindow=objectTypes[typeof window]&&window&&window.Object&&window,moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports,root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this,_=runInContext();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(root._=_,define(function(){return _})):freeExports&&freeModule?moduleExports?(freeModule.exports=_)._=_:freeExports._=_:root._=_}.call(this),function(window,angular,undefined){angular.module("ui.sortable",[]).value("uiSortableConfig",{}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(uiSortableConfig,$timeout,$log){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"="},link:function(scope,element,attrs,ngModel){function combineCallbacks(first,second){return second&&"function"==typeof second?function(){first.apply(this,arguments),second.apply(this,arguments)}:first}function getSortableWidgetInstance(element){var data=element.data("ui-sortable");return data&&"object"==typeof data&&"ui-sortable"===data.widgetFullName?data:null}function hasSortingHelper(element,ui){var helperOption=element.sortable("option","helper");return"clone"===helperOption||"function"==typeof helperOption&&ui.item.sortable.isCustomHelperUsed()}function isFloating(item){return/left|right/.test(item.css("float"))||/inline|table-cell/.test(item.css("display"))}function getElementScope(elementScopes,element){for(var result=null,i=0;i<elementScopes.length;i++){var x=elementScopes[i];if(x.element[0]===element[0]){result=x.scope;break}}return result}function afterStop(e,ui){ui.item.sortable._destroy()}var savedNodes,opts={},directiveOpts={"ui-floating":undefined},callbacks={receive:null,remove:null,start:null,stop:null,update:null},wrappers={helper:null};return angular.extend(opts,directiveOpts,uiSortableConfig,scope.uiSortable),angular.element.fn&&angular.element.fn.jquery?(ngModel?(scope.$watch("ngModel.length",function(){$timeout(function(){getSortableWidgetInstance(element)&&element.sortable("refresh")},0,!1)}),callbacks.start=function(e,ui){if("auto"===opts["ui-floating"]){var siblings=ui.item.siblings(),sortableWidgetInstance=getSortableWidgetInstance(angular.element(e.target));sortableWidgetInstance.floating=isFloating(siblings)}ui.item.sortable={model:ngModel.$modelValue[ui.item.index()],index:ui.item.index(),source:ui.item.parent(),sourceModel:ngModel.$modelValue,cancel:function(){ui.item.sortable._isCanceled=!0},isCanceled:function(){return ui.item.sortable._isCanceled},isCustomHelperUsed:function(){return!!ui.item.sortable._isCustomHelperUsed},_isCanceled:!1,_isCustomHelperUsed:ui.item.sortable._isCustomHelperUsed,_destroy:function(){angular.forEach(ui.item.sortable,function(value,key){ui.item.sortable[key]=undefined})}}},callbacks.activate=function(e,ui){savedNodes=element.contents();var placeholder=element.sortable("option","placeholder");if(placeholder&&placeholder.element&&"function"==typeof placeholder.element){var phElement=placeholder.element();phElement=angular.element(phElement);var excludes=element.find('[class="'+phElement.attr("class")+'"]:not([ng-repeat], [data-ng-repeat])');savedNodes=savedNodes.not(excludes)}var connectedSortables=ui.item.sortable._connectedSortables||[];connectedSortables.push({element:element,scope:scope}),ui.item.sortable._connectedSortables=connectedSortables},callbacks.update=function(e,ui){if(!ui.item.sortable.received){ui.item.sortable.dropindex=ui.item.index();var droptarget=ui.item.parent();ui.item.sortable.droptarget=droptarget;var droptargetScope=getElementScope(ui.item.sortable._connectedSortables,droptarget);ui.item.sortable.droptargetModel=droptargetScope.ngModel,element.sortable("cancel")}hasSortingHelper(element,ui)&&!ui.item.sortable.received&&"parent"===element.sortable("option","appendTo")&&(savedNodes=savedNodes.not(savedNodes.last())),savedNodes.appendTo(element),ui.item.sortable.received&&(savedNodes=null),ui.item.sortable.received&&!ui.item.sortable.isCanceled()&&scope.$apply(function(){ngModel.$modelValue.splice(ui.item.sortable.dropindex,0,ui.item.sortable.moved)})},callbacks.stop=function(e,ui){!ui.item.sortable.received&&"dropindex"in ui.item.sortable&&!ui.item.sortable.isCanceled()?scope.$apply(function(){ngModel.$modelValue.splice(ui.item.sortable.dropindex,0,ngModel.$modelValue.splice(ui.item.sortable.index,1)[0])}):"dropindex"in ui.item.sortable&&!ui.item.sortable.isCanceled()||hasSortingHelper(element,ui)||savedNodes.appendTo(element),savedNodes=null},callbacks.receive=function(e,ui){ui.item.sortable.received=!0},callbacks.remove=function(e,ui){"dropindex"in ui.item.sortable||(element.sortable("cancel"),ui.item.sortable.cancel()),ui.item.sortable.isCanceled()||scope.$apply(function(){ui.item.sortable.moved=ngModel.$modelValue.splice(ui.item.sortable.index,1)[0]})},wrappers.helper=function(inner){return inner&&"function"==typeof inner?function(e,item){var innerResult=inner.apply(this,arguments);return item.sortable._isCustomHelperUsed=item!==innerResult,innerResult}:inner},scope.$watch("uiSortable",function(newVal){var sortableWidgetInstance=getSortableWidgetInstance(element);sortableWidgetInstance&&angular.forEach(newVal,function(value,key){return key in directiveOpts?("ui-floating"!==key||value!==!1&&value!==!0||(sortableWidgetInstance.floating=value),void(opts[key]=value)):(callbacks[key]?("stop"===key&&(value=combineCallbacks(value,function(){scope.$apply()}),value=combineCallbacks(value,afterStop)),value=combineCallbacks(callbacks[key],value)):wrappers[key]&&(value=wrappers[key](value)),opts[key]=value,void element.sortable("option",key,value))})},!0),angular.forEach(callbacks,function(value,key){opts[key]=combineCallbacks(value,opts[key]),"stop"===key&&(opts[key]=combineCallbacks(opts[key],afterStop))})):$log.info("ui.sortable: ngModel not provided!",element),void element.sortable(opts)):void $log.error("ui.sortable: jQuery should be included before AngularJS!")}}}])}(window,window.angular),function(){angular.module("permission",["ui.router"]).run(["$rootScope","Permission","$state","$q",function($rootScope,Permission,$state,$q){$rootScope.$on("$stateChangeStart",function(event,toState,toParams,fromState,fromParams){if(!toState.$$finishAuthorize){var permissions;if(toState.data&&toState.data.permissions?permissions=toState.data.permissions:toState.permissions&&(console.log("Deprecation Warning: permissions should be set inside the `data` key "),console.log("Setting permissions for a state outside `data` will be depracated in version 1"),permissions=toState.permissions),permissions){if(event.preventDefault(),toState=angular.extend({$$finishAuthorize:!0},toState),$rootScope.$broadcast("$stateChangePermissionStart",toState,toParams).defaultPrevented)return;Permission.authorize(permissions,toParams).then(function(){$rootScope.$broadcast("$stateChangeStart",toState,toParams,fromState,fromParams).defaultPrevented||($rootScope.$broadcast("$stateChangePermissionAccepted",toState,toParams),$state.go(toState.name,toParams,{notify:!1}).then(function(){$rootScope.$broadcast("$stateChangeSuccess",toState,toParams,fromState,fromParams)}))},function(){if(!$rootScope.$broadcast("$stateChangeStart",toState,toParams,fromState,fromParams).defaultPrevented){$rootScope.$broadcast("$stateChangePermissionDenied",toState,toParams);var redirectTo=permissions.redirectTo;angular.isFunction(redirectTo)?(redirectTo=redirectTo(),$q.when(redirectTo).then(function(newState){newState&&$state.go(newState,toParams)})):redirectTo&&$state.go(redirectTo,toParams)}})}}})}])}(),function(){angular.module("permission").provider("Permission",function(){var roleValidationConfig={},validateRoleDefinitionParams=function(roleName,validationFunction){
if(!angular.isString(roleName))throw new Error("Role name must be a string");if(!angular.isFunction(validationFunction))throw new Error("Validation function not provided correctly")},validateManyRolesDefinitionParams=function(roles,validationFunction){if(!angular.isArray(roles))throw new Error("Roles must be an array");for(var i=0;i<roles.length;i++)validateRoleDefinitionParams(roles[i],validationFunction)};this.defineRole=function(roleName,validationFunction){return validateRoleDefinitionParams(roleName,validationFunction),roleValidationConfig[roleName]=validationFunction,this},this.$get=["$q",function($q){var Permission={_promiseify:function(value){if(value&&angular.isFunction(value.then))return value;var deferred=$q.defer();return value?deferred.resolve():deferred.reject(),deferred.promise},_validateRoleMap:function(roleMap){if("object"!=typeof roleMap||roleMap instanceof Array)throw new Error("Role map has to be an object");if(void 0===roleMap.only&&void 0===roleMap.except)throw new Error('Either "only" or "except" keys must me defined');if(roleMap.only){if(!(roleMap.only instanceof Array))throw new Error("Array of roles expected")}else if(roleMap.except&&!(roleMap.except instanceof Array))throw new Error("Array of roles expected")},_findMatchingRole:function(rolesArray,toParams){var roles=angular.copy(rolesArray),deferred=$q.defer(),currentRole=roles.shift();if(!currentRole)return deferred.reject(),deferred.promise;if(!angular.isFunction(Permission.roleValidations[currentRole]))throw new Error("undefined role or invalid role validation");var validatingRole=Permission.roleValidations[currentRole](toParams,currentRole);return validatingRole=Permission._promiseify(validatingRole),validatingRole.then(function(){deferred.resolve()},function(){Permission._findMatchingRole(roles,toParams).then(function(){deferred.resolve()},function(){deferred.reject()})}),deferred.promise},defineRole:function(roleName,validationFunction){return validateRoleDefinitionParams(roleName,validationFunction),Permission.roleValidations[roleName]=validationFunction,Permission},defineManyRoles:function(roles,validationFunction){validateManyRolesDefinitionParams(roles,validationFunction);for(var definedPermissions=Permission,i=0;i<roles.length;i++)definedPermissions=definedPermissions.defineRole(roles[i],validationFunction);return definedPermissions},resolveIfMatch:function(rolesArray,toParams){var roles=angular.copy(rolesArray),deferred=$q.defer();return Permission._findMatchingRole(roles,toParams).then(function(){deferred.resolve()},function(){deferred.reject()}),deferred.promise},rejectIfMatch:function(roles,toParams){var deferred=$q.defer();return Permission._findMatchingRole(roles,toParams).then(function(){deferred.reject()},function(){deferred.resolve()}),deferred.promise},roleValidations:roleValidationConfig,authorize:function(roleMap,toParams){Permission._validateRoleMap(roleMap);var authorizing;return authorizing=roleMap.only?Permission.resolveIfMatch(roleMap.only,toParams):Permission.rejectIfMatch(roleMap.except,toParams)}};return Permission}]})}();var saveAs=saveAs||function(view){if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var doc=view.document,get_URL=function(){return view.URL||view.webkitURL||view},save_link=doc.createElementNS("http://www.w3.org/1999/xhtml","a"),can_use_save_link="download"in save_link,click=function(node){var event=doc.createEvent("MouseEvents");event.initMouseEvent("click",!0,!1,view,0,0,0,0,0,!1,!1,!1,!1,0,null),node.dispatchEvent(event)},webkit_req_fs=view.webkitRequestFileSystem,req_fs=view.requestFileSystem||webkit_req_fs||view.mozRequestFileSystem,throw_outside=function(ex){(view.setImmediate||view.setTimeout)(function(){throw ex},0)},force_saveable_type="application/octet-stream",fs_min_size=0,arbitrary_revoke_timeout=500,revoke=function(file){var revoker=function(){"string"==typeof file?get_URL().revokeObjectURL(file):file.remove()};view.chrome?revoker():setTimeout(revoker,arbitrary_revoke_timeout)},dispatch=function(filesaver,event_types,event){event_types=[].concat(event_types);for(var i=event_types.length;i--;){var listener=filesaver["on"+event_types[i]];if("function"==typeof listener)try{listener.call(filesaver,event||filesaver)}catch(ex){throw_outside(ex)}}},auto_bom=function(blob){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)?new Blob(["\ufeff",blob],{type:blob.type}):blob},FileSaver=function(blob,name){blob=auto_bom(blob);var object_url,target_view,slice,filesaver=this,type=blob.type,blob_changed=!1,dispatch_all=function(){dispatch(filesaver,"writestart progress write writeend".split(" "))},fs_error=function(){if(!blob_changed&&object_url||(object_url=get_URL().createObjectURL(blob)),target_view)target_view.location.href=object_url;else{var new_tab=view.open(object_url,"_blank");void 0==new_tab&&"undefined"!=typeof safari&&(view.location.href=object_url)}filesaver.readyState=filesaver.DONE,dispatch_all(),revoke(object_url)},abortable=function(func){return function(){if(filesaver.readyState!==filesaver.DONE)return func.apply(this,arguments)}},create_if_not_found={create:!0,exclusive:!1};return filesaver.readyState=filesaver.INIT,name||(name="download"),can_use_save_link?(object_url=get_URL().createObjectURL(blob),save_link.href=object_url,save_link.download=name,click(save_link),filesaver.readyState=filesaver.DONE,dispatch_all(),void revoke(object_url)):(view.chrome&&type&&type!==force_saveable_type&&(slice=blob.slice||blob.webkitSlice,blob=slice.call(blob,0,blob.size,force_saveable_type),blob_changed=!0),webkit_req_fs&&"download"!==name&&(name+=".download"),(type===force_saveable_type||webkit_req_fs)&&(target_view=view),req_fs?(fs_min_size+=blob.size,void req_fs(view.TEMPORARY,fs_min_size,abortable(function(fs){fs.root.getDirectory("saved",create_if_not_found,abortable(function(dir){var save=function(){dir.getFile(name,create_if_not_found,abortable(function(file){file.createWriter(abortable(function(writer){writer.onwriteend=function(event){target_view.location.href=file.toURL(),filesaver.readyState=filesaver.DONE,dispatch(filesaver,"writeend",event),revoke(file)},writer.onerror=function(){var error=writer.error;error.code!==error.ABORT_ERR&&fs_error()},"writestart progress write abort".split(" ").forEach(function(event){writer["on"+event]=filesaver["on"+event]}),writer.write(blob),filesaver.abort=function(){writer.abort(),filesaver.readyState=filesaver.DONE},filesaver.readyState=filesaver.WRITING}),fs_error)}),fs_error)};dir.getFile(name,{create:!1},abortable(function(file){file.remove(),save()}),abortable(function(ex){ex.code===ex.NOT_FOUND_ERR?save():fs_error()}))}),fs_error)}),fs_error)):void fs_error())},FS_proto=FileSaver.prototype,saveAs=function(blob,name){return new FileSaver(blob,name)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(blob,name){return navigator.msSaveOrOpenBlob(auto_bom(blob),name)}:(FS_proto.abort=function(){var filesaver=this;filesaver.readyState=filesaver.DONE,dispatch(filesaver,"abort")},FS_proto.readyState=FS_proto.INIT=0,FS_proto.WRITING=1,FS_proto.DONE=2,FS_proto.error=FS_proto.onwritestart=FS_proto.onprogress=FS_proto.onwrite=FS_proto.onabort=FS_proto.onerror=FS_proto.onwriteend=null,saveAs)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}),angular.module("colorpicker.module",[]).factory("Helper",function(){return{closestSlider:function(elem){var matchesSelector=elem.matches||elem.webkitMatchesSelector||elem.mozMatchesSelector||elem.msMatchesSelector;return matchesSelector.bind(elem)("I")?elem.parentNode:elem},getOffset:function(elem,fixedPosition){for(var scrollX=0,scrollY=0,rect=elem.getBoundingClientRect();elem&&!isNaN(elem.offsetLeft)&&!isNaN(elem.offsetTop);)fixedPosition||"BODY"!==elem.tagName?(scrollX+=elem.scrollLeft,scrollY+=elem.scrollTop):(scrollX+=document.documentElement.scrollLeft||elem.scrollLeft,scrollY+=document.documentElement.scrollTop||elem.scrollTop),elem=elem.offsetParent;return{top:rect.top+window.pageYOffset,left:rect.left+window.pageXOffset,scrollX:scrollX,scrollY:scrollY}},stringParsers:[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[execResult[1],execResult[2],execResult[3],execResult[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(execResult){return[2.55*execResult[1],2.55*execResult[2],2.55*execResult[3],execResult[4]]}},{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(execResult){return[parseInt(execResult[1],16),parseInt(execResult[2],16),parseInt(execResult[3],16)]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,parse:function(execResult){return[parseInt(execResult[1]+execResult[1],16),parseInt(execResult[2]+execResult[2],16),parseInt(execResult[3]+execResult[3],16)]}}]}}).factory("Color",["Helper",function(Helper){return{value:{h:1,s:1,b:1,a:1},rgb:function(){var rgb=this.toRGB();return"rgb("+rgb.r+","+rgb.g+","+rgb.b+")"},rgba:function(){var rgb=this.toRGB();return"rgba("+rgb.r+","+rgb.g+","+rgb.b+","+rgb.a+")"},hex:function(){return this.toHex()},RGBtoHSB:function(r,g,b,a){r/=255,g/=255,b/=255;var H,S,V,C;return V=Math.max(r,g,b),C=V-Math.min(r,g,b),H=0===C?null:V===r?(g-b)/C:V===g?(b-r)/C+2:(r-g)/C+4,H=(H+360)%6*60/360,S=0===C?0:C/V,{h:H||1,s:S,b:V,a:a||1}},setColor:function(val){val=val?val.toLowerCase():val;for(var key in Helper.stringParsers)if(Helper.stringParsers.hasOwnProperty(key)){var parser=Helper.stringParsers[key],match=parser.re.exec(val),values=match&&parser.parse(match);if(values)return this.value=this.RGBtoHSB.apply(null,values),!1}},setHue:function(h){this.value.h=1-h},setSaturation:function(s){this.value.s=s},setLightness:function(b){this.value.b=1-b},setAlpha:function(a){this.value.a=parseInt(100*(1-a),10)/100},toRGB:function(h,s,b,a){h||(h=this.value.h,s=this.value.s,b=this.value.b),h*=360;var R,G,B,X,C;return h=h%360/60,C=b*s,X=C*(1-Math.abs(h%2-1)),R=G=B=b-C,h=~~h,R+=[C,X,0,0,X,C][h],G+=[X,C,C,X,0,0][h],B+=[0,0,X,C,C,X][h],{r:Math.round(255*R),g:Math.round(255*G),b:Math.round(255*B),a:a||this.value.a}},toHex:function(h,s,b,a){var rgb=this.toRGB(h,s,b,a);return"#"+(1<<24|parseInt(rgb.r,10)<<16|parseInt(rgb.g,10)<<8|parseInt(rgb.b,10)).toString(16).substr(1)}}}]).factory("Slider",["Helper",function(Helper){var slider={maxLeft:0,maxTop:0,callLeft:null,callTop:null,knob:{top:0,left:0}},pointer={};return{getSlider:function(){return slider},getLeftPosition:function(event){return Math.max(0,Math.min(slider.maxLeft,slider.left+((event.pageX||pointer.left)-pointer.left)))},getTopPosition:function(event){return Math.max(0,Math.min(slider.maxTop,slider.top+((event.pageY||pointer.top)-pointer.top)))},setSlider:function(event,fixedPosition){var target=Helper.closestSlider(event.target),targetOffset=Helper.getOffset(target,fixedPosition),rect=target.getBoundingClientRect(),offsetX=event.clientX-rect.left,offsetY=event.clientY-rect.top;slider.knob=target.children[0].style,slider.left=event.pageX-targetOffset.left-window.pageXOffset+targetOffset.scrollX,slider.top=event.pageY-targetOffset.top-window.pageYOffset+targetOffset.scrollY,pointer={left:event.pageX-(offsetX-slider.left),top:event.pageY-(offsetY-slider.top)}},setSaturation:function(event,fixedPosition,componentSize){slider={maxLeft:componentSize,maxTop:componentSize,callLeft:"setSaturation",callTop:"setLightness"},this.setSlider(event,fixedPosition)},setHue:function(event,fixedPosition,componentSize){slider={maxLeft:0,maxTop:componentSize,callLeft:!1,callTop:"setHue"},this.setSlider(event,fixedPosition)},setAlpha:function(event,fixedPosition,componentSize){slider={maxLeft:0,maxTop:componentSize,callLeft:!1,callTop:"setAlpha"},this.setSlider(event,fixedPosition)},setKnob:function(top,left){slider.knob.top=top+"px",slider.knob.left=left+"px"}}}]).directive("colorpicker",["$document","$compile","Color","Slider","Helper",function($document,$compile,Color,Slider,Helper){return{require:"?ngModel",restrict:"A",link:function($scope,elem,attrs,ngModel){function bindMouseEvents(){$document.on("mousemove",mousemove),$document.on("mouseup",mouseup)}function previewColor(){try{colorpickerPreview.css("backgroundColor",pickerColor[thisFormat]())}catch(e){colorpickerPreview.css("backgroundColor",pickerColor.toHex())}sliderSaturation.css("backgroundColor",pickerColor.toHex(pickerColor.value.h,1,1,1)),"rgba"===thisFormat&&(sliderAlpha.css.backgroundColor=pickerColor.toHex())}function mousemove(event){var left=Slider.getLeftPosition(event),top=Slider.getTopPosition(event),slider=Slider.getSlider();Slider.setKnob(top,left),slider.callLeft&&pickerColor[slider.callLeft].call(pickerColor,left/componentSize),slider.callTop&&pickerColor[slider.callTop].call(pickerColor,top/componentSize),previewColor();var newColor=pickerColor[thisFormat]();return elem.val(newColor),ngModel&&$scope.$apply(ngModel.$setViewValue(newColor)),withInput&&pickerColorInput.val(newColor),!1}function mouseup(){emitEvent("colorpicker-selected"),$document.off("mousemove",mousemove),$document.off("mouseup",mouseup)}function update(omitInnerInput){pickerColor.setColor(elem.val()),withInput&&!omitInnerInput&&pickerColorInput.val(elem.val()),pickerColorPointers.eq(0).css({left:pickerColor.value.s*componentSize+"px",top:componentSize-pickerColor.value.b*componentSize+"px"}),pickerColorPointers.eq(1).css("top",componentSize*(1-pickerColor.value.h)+"px"),pickerColorPointers.eq(2).css("top",componentSize*(1-pickerColor.value.a)+"px"),previewColor()}function getColorpickerTemplatePosition(){var positionValue,positionOffset=Helper.getOffset(elem[0]);return angular.isDefined(attrs.colorpickerParent)&&(positionOffset.left=0,positionOffset.top=0),"top"===position?positionValue={top:positionOffset.top-147,left:positionOffset.left}:"right"===position?positionValue={top:positionOffset.top,left:positionOffset.left+126}:"bottom"===position?positionValue={top:positionOffset.top+elem[0].offsetHeight+2,left:positionOffset.left}:"left"===position&&(positionValue={top:positionOffset.top,left:positionOffset.left-150}),{top:positionValue.top+"px",left:positionValue.left+"px"}}function documentMousedownHandler(){hideColorpickerTemplate()}function showColorpickerTemplate(){colorpickerTemplate.hasClass("colorpicker-visible")||(update(),colorpickerTemplate.addClass("colorpicker-visible").css(getColorpickerTemplatePosition()),emitEvent("colorpicker-shown"),inline===!1&&$document.on("mousedown",documentMousedownHandler),attrs.colorpickerIsOpen&&($scope[attrs.colorpickerIsOpen]=!0,$scope.$$phase||$scope.$digest()))}function emitEvent(name){ngModel&&$scope.$emit(name,{name:attrs.ngModel,value:ngModel.$modelValue})}function hideColorpickerTemplate(){colorpickerTemplate.hasClass("colorpicker-visible")&&(colorpickerTemplate.removeClass("colorpicker-visible"),emitEvent("colorpicker-closed"),$document.off("mousedown",documentMousedownHandler),attrs.colorpickerIsOpen&&($scope[attrs.colorpickerIsOpen]=!1,$scope.$$phase||$scope.$digest()))}var componentSizePx,sliderAlpha,thisFormat=attrs.colorpicker?attrs.colorpicker:"hex",position=angular.isDefined(attrs.colorpickerPosition)?attrs.colorpickerPosition:"bottom",inline=!!angular.isDefined(attrs.colorpickerInline)&&attrs.colorpickerInline,fixedPosition=!!angular.isDefined(attrs.colorpickerFixedPosition)&&attrs.colorpickerFixedPosition,target=angular.isDefined(attrs.colorpickerParent)?elem.parent():angular.element(document.body),withInput=!!angular.isDefined(attrs.colorpickerWithInput)&&attrs.colorpickerWithInput,componentSize=angular.isDefined(attrs.colorpickerSize)?attrs.colorpickerSize:100,componentSizePx=componentSize+"px",inputTemplate=withInput?'<input type="text" name="colorpicker-input" spellcheck="false">':"",closeButton=inline?"":'<button type="button" class="close close-colorpicker">&times;</button>',template='<div class="colorpicker dropdown"><div class="dropdown-menu"><colorpicker-saturation><i></i></colorpicker-saturation><colorpicker-hue><i></i></colorpicker-hue><colorpicker-alpha><i></i></colorpicker-alpha><colorpicker-preview></colorpicker-preview>'+inputTemplate+closeButton+"</div></div>",colorpickerTemplate=angular.element(template),pickerColor=Color,sliderHue=colorpickerTemplate.find("colorpicker-hue"),sliderSaturation=colorpickerTemplate.find("colorpicker-saturation"),colorpickerPreview=colorpickerTemplate.find("colorpicker-preview"),pickerColorPointers=colorpickerTemplate.find("i");if($compile(colorpickerTemplate)($scope),colorpickerTemplate.css("min-width",parseInt(componentSize)+29+"px"),sliderSaturation.css({width:componentSizePx,height:componentSizePx}),sliderHue.css("height",componentSizePx),withInput){var pickerColorInput=colorpickerTemplate.find("input");pickerColorInput.css("width",componentSizePx),pickerColorInput.on("mousedown",function(event){event.stopPropagation()}).on("keyup",function(){var newColor=this.value;elem.val(newColor),ngModel&&ngModel.$modelValue!==newColor&&($scope.$apply(ngModel.$setViewValue(newColor)),update(!0))})}"rgba"===thisFormat&&(colorpickerTemplate.addClass("alpha"),sliderAlpha=colorpickerTemplate.find("colorpicker-alpha"),sliderAlpha.css("height",componentSizePx),sliderAlpha.on("click",function(event){Slider.setAlpha(event,fixedPosition,componentSize),mousemove(event)}).on("mousedown",function(event){Slider.setAlpha(event,fixedPosition,componentSize),bindMouseEvents()}).on("mouseup",function(event){emitEvent("colorpicker-selected-alpha")})),sliderHue.on("click",function(event){Slider.setHue(event,fixedPosition,componentSize),mousemove(event)}).on("mousedown",function(event){Slider.setHue(event,fixedPosition,componentSize),bindMouseEvents()}).on("mouseup",function(event){emitEvent("colorpicker-selected-hue")}),sliderSaturation.on("click",function(event){Slider.setSaturation(event,fixedPosition,componentSize),mousemove(event),angular.isDefined(attrs.colorpickerCloseOnSelect)&&hideColorpickerTemplate()}).on("mousedown",function(event){Slider.setSaturation(event,fixedPosition,componentSize),bindMouseEvents()}).on("mouseup",function(event){emitEvent("colorpicker-selected-saturation")}),fixedPosition&&colorpickerTemplate.addClass("colorpicker-fixed-position"),colorpickerTemplate.addClass("colorpicker-position-"+position),"true"===inline&&colorpickerTemplate.addClass("colorpicker-inline"),target.append(colorpickerTemplate),ngModel&&(ngModel.$render=function(){elem.val(ngModel.$viewValue),update()}),elem.on("blur keyup change",function(){update()}),elem.on("$destroy",function(){colorpickerTemplate.remove()}),inline===!1?elem.on("click",showColorpickerTemplate):showColorpickerTemplate(),colorpickerTemplate.on("mousedown",function(event){event.stopPropagation(),event.preventDefault()}),colorpickerTemplate.find("button").on("click",function(){hideColorpickerTemplate()}),attrs.colorpickerIsOpen&&$scope.$watch(attrs.colorpickerIsOpen,function(shouldBeOpen){shouldBeOpen===!0?showColorpickerTemplate():shouldBeOpen===!1&&hideColorpickerTemplate()})}}}]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router.tabs"),angular.module("ui.router.tabs",[]),angular.module("ui.router.tabs").directive("tabs",["$rootScope","$state",function($rootScope,$state){return{restrict:"E",scope:{tabs:"=data",type:"@",justified:"@",vertical:"@"},link:function(scope){var updateTabs=function(){scope.update_tabs()},unbindStateChangeSuccess=$rootScope.$on("$stateChangeSuccess",updateTabs),unbindStateChangeError=$rootScope.$on("$stateChangeError",updateTabs),unbindStateChangeCancel=$rootScope.$on("$stateChangeCancel",updateTabs),unbindStateNotFound=$rootScope.$on("$stateNotFound",updateTabs);scope.$on("$destroy",unbindStateChangeSuccess),scope.$on("$destroy",unbindStateChangeError),scope.$on("$destroy",unbindStateChangeCancel),scope.$on("$destroy",unbindStateNotFound)},controller:["$scope",function($scope){if(!$scope.tabs)throw new Error("UI Router Tabs: 'data' attribute not defined, please check documentation for how to use this directive.");if(!angular.isArray($scope.tabs))throw new Error("UI Router Tabs: 'data' attribute must be an array of tab data with at least one tab defined.");var currentStateEqualTo=function(tab){var isEqual=$state.is(tab.route,tab.params,tab.options);return isEqual};$scope.go=function(tab){currentStateEqualTo(tab)||tab.disable||$state.go(tab.route,tab.params,tab.options)},$scope.active=function(tab){var isAncestorOfCurrentRoute=$state.includes(tab.route,tab.params,tab.options);return isAncestorOfCurrentRoute},$scope.update_tabs=function(){angular.forEach($scope.tabs,function(tab){tab.params=tab.params||{},tab.options=tab.options||{},tab.active=$scope.active(tab)})},$scope.update_tabs()}],templateUrl:function(element,attributes){return attributes.templateUrl||"ui-router-tabs-default-template.html"}}}]).run(["$templateCache",function($templateCache){var DEFAULT_TEMPLATE='<div><uib-tabset class="tab-container" type="{{type}}" vertical="{{vertical}}" justified="{{justified}}"><uib-tab class="tab" ng-repeat="tab in tabs" heading="{{tab.heading}}" active="tab.active" disable="tab.disable" ng-click="go(tab)"></uib-tab></uib-tabset></div>';$templateCache.put("ui-router-tabs-default-template.html",DEFAULT_TEMPLATE)}]);var duScrollDefaultEasing=function(x){return x<.5?Math.pow(2*x,2)/2:1-Math.pow(2*(1-x),2)/2},duScroll=angular.module("duScroll",["duScroll.scrollspy","duScroll.smoothScroll","duScroll.scrollContainer","duScroll.spyContext","duScroll.scrollHelpers"]).value("duScrollDuration",350).value("duScrollSpyWait",100).value("duScrollGreedy",!1).value("duScrollOffset",0).value("duScrollEasing",duScrollDefaultEasing).value("duScrollCancelOnEvents","scroll mousedown mousewheel touchmove keydown").value("duScrollBottomSpy",!1).value("duScrollActiveClass","active");"undefined"!=typeof module&&module&&module.exports&&(module.exports=duScroll),angular.module("duScroll.scrollHelpers",["duScroll.requestAnimation"]).run(["$window","$q","cancelAnimation","requestAnimation","duScrollEasing","duScrollDuration","duScrollOffset","duScrollCancelOnEvents",function($window,$q,cancelAnimation,requestAnimation,duScrollEasing,duScrollDuration,duScrollOffset,duScrollCancelOnEvents){var proto={},isDocument=function(el){return"undefined"!=typeof HTMLDocument&&el instanceof HTMLDocument||el.nodeType&&el.nodeType===el.DOCUMENT_NODE},isElement=function(el){return"undefined"!=typeof HTMLElement&&el instanceof HTMLElement||el.nodeType&&el.nodeType===el.ELEMENT_NODE},unwrap=function(el){return isElement(el)||isDocument(el)?el:el[0]};proto.duScrollTo=function(left,top,duration,easing){var aliasFn;if(angular.isElement(left)?aliasFn=this.duScrollToElement:angular.isDefined(duration)&&(aliasFn=this.duScrollToAnimated),aliasFn)return aliasFn.apply(this,arguments);var el=unwrap(this);return isDocument(el)?$window.scrollTo(left,top):(el.scrollLeft=left,void(el.scrollTop=top))};var scrollAnimation,deferred;proto.duScrollToAnimated=function(left,top,duration,easing){duration&&!easing&&(easing=duScrollEasing);var startLeft=this.duScrollLeft(),startTop=this.duScrollTop(),deltaLeft=Math.round(left-startLeft),deltaTop=Math.round(top-startTop),startTime=null,progress=0,el=this,cancelScrollAnimation=function($event){(!$event||progress&&$event.which>0)&&(duScrollCancelOnEvents&&el.unbind(duScrollCancelOnEvents,cancelScrollAnimation),cancelAnimation(scrollAnimation),deferred.reject(),scrollAnimation=null)};if(scrollAnimation&&cancelScrollAnimation(),deferred=$q.defer(),0===duration||!deltaLeft&&!deltaTop)return 0===duration&&el.duScrollTo(left,top),deferred.resolve(),deferred.promise;var animationStep=function(timestamp){null===startTime&&(startTime=timestamp),progress=timestamp-startTime;var percent=progress>=duration?1:easing(progress/duration);el.scrollTo(startLeft+Math.ceil(deltaLeft*percent),startTop+Math.ceil(deltaTop*percent)),percent<1?scrollAnimation=requestAnimation(animationStep):(duScrollCancelOnEvents&&el.unbind(duScrollCancelOnEvents,cancelScrollAnimation),scrollAnimation=null,deferred.resolve())};return el.duScrollTo(startLeft,startTop),duScrollCancelOnEvents&&el.bind(duScrollCancelOnEvents,cancelScrollAnimation),scrollAnimation=requestAnimation(animationStep),deferred.promise},proto.duScrollToElement=function(target,offset,duration,easing){var el=unwrap(this);angular.isNumber(offset)&&!isNaN(offset)||(offset=duScrollOffset);var top=this.duScrollTop()+unwrap(target).getBoundingClientRect().top-offset;return isElement(el)&&(top-=el.getBoundingClientRect().top),this.duScrollTo(0,top,duration,easing)},proto.duScrollLeft=function(value,duration,easing){if(angular.isNumber(value))return this.duScrollTo(value,this.duScrollTop(),duration,easing);var el=unwrap(this);return isDocument(el)?$window.scrollX||document.documentElement.scrollLeft||document.body.scrollLeft:el.scrollLeft},proto.duScrollTop=function(value,duration,easing){if(angular.isNumber(value))return this.duScrollTo(this.duScrollLeft(),value,duration,easing);var el=unwrap(this);return isDocument(el)?$window.scrollY||document.documentElement.scrollTop||document.body.scrollTop:el.scrollTop},proto.duScrollToElementAnimated=function(target,offset,duration,easing){return this.duScrollToElement(target,offset,duration||duScrollDuration,easing)},proto.duScrollTopAnimated=function(top,duration,easing){return this.duScrollTop(top,duration||duScrollDuration,easing)},proto.duScrollLeftAnimated=function(left,duration,easing){return this.duScrollLeft(left,duration||duScrollDuration,easing)},angular.forEach(proto,function(fn,key){angular.element.prototype[key]=fn;var unprefixed=key.replace(/^duScroll/,"scroll");angular.isUndefined(angular.element.prototype[unprefixed])&&(angular.element.prototype[unprefixed]=fn)})}]),angular.module("duScroll.polyfill",[]).factory("polyfill",["$window",function($window){var vendors=["webkit","moz","o","ms"];return function(fnName,fallback){if($window[fnName])return $window[fnName];for(var key,suffix=fnName.substr(0,1).toUpperCase()+fnName.substr(1),i=0;i<vendors.length;i++)if(key=vendors[i]+suffix,$window[key])return $window[key];return fallback}}]),angular.module("duScroll.requestAnimation",["duScroll.polyfill"]).factory("requestAnimation",["polyfill","$timeout",function(polyfill,$timeout){var lastTime=0,fallback=function(callback,element){var currTime=(new Date).getTime(),timeToCall=Math.max(0,16-(currTime-lastTime)),id=$timeout(function(){callback(currTime+timeToCall)},timeToCall);return lastTime=currTime+timeToCall,id};return polyfill("requestAnimationFrame",fallback)}]).factory("cancelAnimation",["polyfill","$timeout",function(polyfill,$timeout){var fallback=function(promise){$timeout.cancel(promise)};return polyfill("cancelAnimationFrame",fallback)}]),angular.module("duScroll.spyAPI",["duScroll.scrollContainerAPI"]).factory("spyAPI",["$rootScope","$timeout","$window","$document","scrollContainerAPI","duScrollGreedy","duScrollSpyWait","duScrollBottomSpy","duScrollActiveClass",function($rootScope,$timeout,$window,$document,scrollContainerAPI,duScrollGreedy,duScrollSpyWait,duScrollBottomSpy,duScrollActiveClass){var createScrollHandler=function(context){var timer=!1,queued=!1,handler=function(){queued=!1;var bottomReached,container=context.container,containerEl=container[0],containerOffset=0;if("undefined"!=typeof HTMLElement&&containerEl instanceof HTMLElement||containerEl.nodeType&&containerEl.nodeType===containerEl.ELEMENT_NODE)containerOffset=containerEl.getBoundingClientRect().top,bottomReached=Math.round(containerEl.scrollTop+containerEl.clientHeight)>=containerEl.scrollHeight;else{var documentScrollHeight=$document[0].body.scrollHeight||$document[0].documentElement.scrollHeight;bottomReached=Math.round($window.pageYOffset+$window.innerHeight)>=documentScrollHeight}var i,currentlyActive,toBeActive,spies,spy,pos,compareProperty=duScrollBottomSpy&&bottomReached?"bottom":"top";for(spies=context.spies,currentlyActive=context.currentlyActive,toBeActive=void 0,i=0;i<spies.length;i++)spy=spies[i],pos=spy.getTargetPosition(),pos&&(duScrollBottomSpy&&bottomReached||pos.top+spy.offset-containerOffset<20&&(duScrollGreedy||pos.top*-1+containerOffset)<pos.height)&&(!toBeActive||toBeActive[compareProperty]<pos[compareProperty])&&(toBeActive={spy:spy},toBeActive[compareProperty]=pos[compareProperty]);toBeActive&&(toBeActive=toBeActive.spy),currentlyActive===toBeActive||duScrollGreedy&&!toBeActive||(currentlyActive&&(currentlyActive.$element.removeClass(duScrollActiveClass),$rootScope.$broadcast("duScrollspy:becameInactive",currentlyActive.$element,angular.element(currentlyActive.getTargetElement()))),toBeActive&&(toBeActive.$element.addClass(duScrollActiveClass),$rootScope.$broadcast("duScrollspy:becameActive",toBeActive.$element,angular.element(toBeActive.getTargetElement()))),context.currentlyActive=toBeActive)};return duScrollSpyWait?function(){timer?queued=!0:(handler(),timer=$timeout(function(){timer=!1,queued&&handler()},duScrollSpyWait,!1))}:handler},contexts={},createContext=function($scope){var id=$scope.$id,context={spies:[]};return context.handler=createScrollHandler(context),contexts[id]=context,$scope.$on("$destroy",function(){destroyContext($scope)}),id},destroyContext=function($scope){var id=$scope.$id,context=contexts[id],container=context.container;container&&container.off("scroll",context.handler),delete contexts[id]},defaultContextId=createContext($rootScope),getContextForScope=function(scope){return contexts[scope.$id]?contexts[scope.$id]:scope.$parent?getContextForScope(scope.$parent):contexts[defaultContextId]},getContextForSpy=function(spy){var context,contextId,scope=spy.$scope;if(scope)return getContextForScope(scope);for(contextId in contexts)if(context=contexts[contextId],context.spies.indexOf(spy)!==-1)return context},isElementInDocument=function(element){for(;element.parentNode;)if(element=element.parentNode,element===document)return!0;return!1},addSpy=function(spy){var context=getContextForSpy(spy);context&&(context.spies.push(spy),context.container&&isElementInDocument(context.container)||(context.container&&context.container.off("scroll",context.handler),context.container=scrollContainerAPI.getContainer(spy.$scope),context.container.on("scroll",context.handler).triggerHandler("scroll")))},removeSpy=function(spy){var context=getContextForSpy(spy);spy===context.currentlyActive&&($rootScope.$broadcast("duScrollspy:becameInactive",context.currentlyActive.$element),context.currentlyActive=null);var i=context.spies.indexOf(spy);i!==-1&&context.spies.splice(i,1),spy.$element=null};return{addSpy:addSpy,removeSpy:removeSpy,createContext:createContext,destroyContext:destroyContext,getContextForScope:getContextForScope}}]),angular.module("duScroll.scrollContainerAPI",[]).factory("scrollContainerAPI",["$document",function($document){var containers={},setContainer=function(scope,element){var id=scope.$id;return containers[id]=element,id},getContainerId=function(scope){return containers[scope.$id]?scope.$id:scope.$parent?getContainerId(scope.$parent):void 0},getContainer=function(scope){var id=getContainerId(scope);return id?containers[id]:$document},removeContainer=function(scope){var id=getContainerId(scope);id&&delete containers[id]};return{getContainerId:getContainerId,getContainer:getContainer,setContainer:setContainer,removeContainer:removeContainer}}]),angular.module("duScroll.smoothScroll",["duScroll.scrollHelpers","duScroll.scrollContainerAPI"]).directive("duSmoothScroll",["duScrollDuration","duScrollOffset","scrollContainerAPI",function(duScrollDuration,duScrollOffset,scrollContainerAPI){return{link:function($scope,$element,$attr){$element.on("click",function(e){if($attr.href&&$attr.href.indexOf("#")!==-1||""!==$attr.duSmoothScroll){
var id=$attr.href?$attr.href.replace(/.*(?=#[^\s]+$)/,"").substring(1):$attr.duSmoothScroll,target=document.getElementById(id)||document.getElementsByName(id)[0];if(target&&target.getBoundingClientRect){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault();var offset=$attr.offset?parseInt($attr.offset,10):duScrollOffset,duration=$attr.duration?parseInt($attr.duration,10):duScrollDuration,container=scrollContainerAPI.getContainer($scope);container.duScrollToElement(angular.element(target),isNaN(offset)?0:offset,isNaN(duration)?0:duration)}}})}}}]),angular.module("duScroll.spyContext",["duScroll.spyAPI"]).directive("duSpyContext",["spyAPI",function(spyAPI){return{restrict:"A",scope:!0,compile:function(tElement,tAttrs,transclude){return{pre:function($scope,iElement,iAttrs,controller){spyAPI.createContext($scope)}}}}}]),angular.module("duScroll.scrollContainer",["duScroll.scrollContainerAPI"]).directive("duScrollContainer",["scrollContainerAPI",function(scrollContainerAPI){return{restrict:"A",scope:!0,compile:function(tElement,tAttrs,transclude){return{pre:function($scope,iElement,iAttrs,controller){iAttrs.$observe("duScrollContainer",function(element){angular.isString(element)&&(element=document.getElementById(element)),element=angular.isElement(element)?angular.element(element):iElement,scrollContainerAPI.setContainer($scope,element),$scope.$on("$destroy",function(){scrollContainerAPI.removeContainer($scope)})})}}}}}]),angular.module("duScroll.scrollspy",["duScroll.spyAPI"]).directive("duScrollspy",["spyAPI","duScrollOffset","$timeout","$rootScope",function(spyAPI,duScrollOffset,$timeout,$rootScope){var Spy=function(targetElementOrId,$scope,$element,offset){angular.isElement(targetElementOrId)?this.target=targetElementOrId:angular.isString(targetElementOrId)&&(this.targetId=targetElementOrId),this.$scope=$scope,this.$element=$element,this.offset=offset};return Spy.prototype.getTargetElement=function(){return!this.target&&this.targetId&&(this.target=document.getElementById(this.targetId)||document.getElementsByName(this.targetId)[0]),this.target},Spy.prototype.getTargetPosition=function(){var target=this.getTargetElement();if(target)return target.getBoundingClientRect()},Spy.prototype.flushTargetCache=function(){this.targetId&&(this.target=void 0)},{link:function($scope,$element,$attr){var targetId,href=$attr.ngHref||$attr.href;if(href&&href.indexOf("#")!==-1?targetId=href.replace(/.*(?=#[^\s]+$)/,"").substring(1):$attr.duScrollspy?targetId=$attr.duScrollspy:$attr.duSmoothScroll&&(targetId=$attr.duSmoothScroll),targetId){var timeoutPromise=$timeout(function(){var spy=new Spy(targetId,$scope,$element,(-($attr.offset?parseInt($attr.offset,10):duScrollOffset)));spyAPI.addSpy(spy),$scope.$on("$locationChangeSuccess",spy.flushTargetCache.bind(spy));var deregisterOnStateChange=$rootScope.$on("$stateChangeSuccess",spy.flushTargetCache.bind(spy));$scope.$on("$destroy",function(){spyAPI.removeSpy(spy),deregisterOnStateChange()})},0,!1);$scope.$on("$destroy",function(){$timeout.cancel(timeoutPromise)})}}}}]),function(window,angular){function $SanitizeProvider(){function toMap(str,lowercaseKeys){var i,obj={},items=str.split(",");for(i=0;i<items.length;i++)obj[lowercaseKeys?lowercase(items[i]):items[i]]=!0;return obj}function htmlParserImpl(html,handler){null===html||void 0===html?html="":"string"!=typeof html&&(html=""+html),inertBodyElement.innerHTML=html;var mXSSAttempts=5;do{if(0===mXSSAttempts)throw $sanitizeMinErr("uinput","Failed to sanitize html because the input is unstable");mXSSAttempts--,window.document.documentMode&&stripCustomNsAttrs(inertBodyElement),html=inertBodyElement.innerHTML,inertBodyElement.innerHTML=html}while(html!==inertBodyElement.innerHTML);for(var node=inertBodyElement.firstChild;node;){switch(node.nodeType){case 1:handler.start(node.nodeName.toLowerCase(),attrToMap(node.attributes));break;case 3:handler.chars(node.textContent)}var nextNode;if(!(nextNode=node.firstChild)&&(1==node.nodeType&&handler.end(node.nodeName.toLowerCase()),nextNode=node.nextSibling,!nextNode))for(;null==nextNode&&(node=node.parentNode,node!==inertBodyElement);)nextNode=node.nextSibling,1==node.nodeType&&handler.end(node.nodeName.toLowerCase());node=nextNode}for(;node=inertBodyElement.firstChild;)inertBodyElement.removeChild(node)}function attrToMap(attrs){for(var map={},i=0,ii=attrs.length;i<ii;i++){var attr=attrs[i];map[attr.name]=attr.value}return map}function encodeEntities(value){return value.replace(/&/g,"&amp;").replace(SURROGATE_PAIR_REGEXP,function(value){var hi=value.charCodeAt(0),low=value.charCodeAt(1);return"&#"+(1024*(hi-55296)+(low-56320)+65536)+";"}).replace(NON_ALPHANUMERIC_REGEXP,function(value){return"&#"+value.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function htmlSanitizeWriterImpl(buf,uriValidator){var ignoreCurrentElement=!1,out=bind(buf,buf.push);return{start:function(tag,attrs){tag=lowercase(tag),!ignoreCurrentElement&&blockedElements[tag]&&(ignoreCurrentElement=tag),ignoreCurrentElement||validElements[tag]!==!0||(out("<"),out(tag),forEach(attrs,function(value,key){var lkey=lowercase(key),isImage="img"===tag&&"src"===lkey||"background"===lkey;validAttrs[lkey]!==!0||uriAttrs[lkey]===!0&&!uriValidator(value,isImage)||(out(" "),out(key),out('="'),out(encodeEntities(value)),out('"'))}),out(">"))},end:function(tag){tag=lowercase(tag),ignoreCurrentElement||validElements[tag]!==!0||voidElements[tag]===!0||(out("</"),out(tag),out(">")),tag==ignoreCurrentElement&&(ignoreCurrentElement=!1)},chars:function(chars){ignoreCurrentElement||out(encodeEntities(chars))}}}function stripCustomNsAttrs(node){if(node.nodeType===window.Node.ELEMENT_NODE)for(var attrs=node.attributes,i=0,l=attrs.length;i<l;i++){var attrNode=attrs[i],attrName=attrNode.name.toLowerCase();"xmlns:ns1"!==attrName&&0!==attrName.lastIndexOf("ns1:",0)||(node.removeAttributeNode(attrNode),i--,l--)}var nextNode=node.firstChild;nextNode&&stripCustomNsAttrs(nextNode),nextNode=node.nextSibling,nextNode&&stripCustomNsAttrs(nextNode)}var svgEnabled=!1;this.$get=["$$sanitizeUri",function($$sanitizeUri){return svgEnabled&&extend(validElements,svgElements),function(html){var buf=[];return htmlParser(html,htmlSanitizeWriter(buf,function(uri,isImage){return!/^unsafe:/.test($$sanitizeUri(uri,isImage))})),buf.join("")}}],this.enableSvg=function(enableSvg){return isDefined(enableSvg)?(svgEnabled=enableSvg,this):svgEnabled},bind=angular.bind,extend=angular.extend,forEach=angular.forEach,isDefined=angular.isDefined,lowercase=angular.lowercase,noop=angular.noop,htmlParser=htmlParserImpl,htmlSanitizeWriter=htmlSanitizeWriterImpl;var inertBodyElement,SURROGATE_PAIR_REGEXP=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NON_ALPHANUMERIC_REGEXP=/([^\#-~ |!])/g,voidElements=toMap("area,br,col,hr,img,wbr"),optionalEndTagBlockElements=toMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),optionalEndTagInlineElements=toMap("rp,rt"),optionalEndTagElements=extend({},optionalEndTagInlineElements,optionalEndTagBlockElements),blockElements=extend({},optionalEndTagBlockElements,toMap("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),inlineElements=extend({},optionalEndTagInlineElements,toMap("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),svgElements=toMap("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),blockedElements=toMap("script,style"),validElements=extend({},voidElements,blockElements,inlineElements,optionalEndTagElements),uriAttrs=toMap("background,cite,href,longdesc,src,xlink:href"),htmlAttrs=toMap("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),svgAttrs=toMap("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),validAttrs=extend({},uriAttrs,svgAttrs,htmlAttrs);!function(window){var doc;if(!window.document||!window.document.implementation)throw $sanitizeMinErr("noinert","Can't create an inert html document");doc=window.document.implementation.createHTMLDocument("inert");var docElement=doc.documentElement||doc.getDocumentElement(),bodyElements=docElement.getElementsByTagName("body");if(1===bodyElements.length)inertBodyElement=bodyElements[0];else{var html=doc.createElement("html");inertBodyElement=doc.createElement("body"),html.appendChild(inertBodyElement),doc.appendChild(html)}}(window)}function sanitizeText(chars){var buf=[],writer=htmlSanitizeWriter(buf,noop);return writer.chars(chars),buf.join("")}var bind,extend,forEach,isDefined,lowercase,noop,htmlParser,htmlSanitizeWriter,$sanitizeMinErr=angular.$$minErr("$sanitize");angular.module("ngSanitize",[]).provider("$sanitize",$SanitizeProvider),angular.module("ngSanitize").filter("linky",["$sanitize",function($sanitize){var LINKY_URL_REGEXP=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,MAILTO_REGEXP=/^mailto:/i,linkyMinErr=angular.$$minErr("linky"),isDefined=angular.isDefined,isFunction=angular.isFunction,isObject=angular.isObject,isString=angular.isString;return function(text,target,attributes){function addText(text){text&&html.push(sanitizeText(text))}function addLink(url,text){var key,linkAttributes=attributesFn(url);html.push("<a ");for(key in linkAttributes)html.push(key+'="'+linkAttributes[key]+'" ');!isDefined(target)||"target"in linkAttributes||html.push('target="',target,'" '),html.push('href="',url.replace(/"/g,"&quot;"),'">'),addText(text),html.push("</a>")}if(null==text||""===text)return text;if(!isString(text))throw linkyMinErr("notstring","Expected string but received: {0}",text);for(var match,url,i,attributesFn=isFunction(attributes)?attributes:isObject(attributes)?function(){return attributes}:function(){return{}},raw=text,html=[];match=raw.match(LINKY_URL_REGEXP);)url=match[0],match[2]||match[4]||(url=(match[3]?"http://":"mailto:")+url),i=match.index,addText(raw.substr(0,i)),addLink(url,match[0].replace(MAILTO_REGEXP,"")),raw=raw.substring(i+match[0].length);return addText(raw),$sanitize(html.join(""))}}])}(window,window.angular),function(angular){function vBusyDirective($document,buttonConfig){return{restrict:"A",scope:{isBusy:"=vBusy",busyLabel:"@vBusyLabel",busyText:"@vBusyText"},compile:function(tElement,tAttrs){var labelElement=angular.element(tElement.find("span"));return labelElement[0]||(tElement.html("<span>"+tElement.html()+"</span>"),labelElement=angular.element(tElement.find("span"))),function(scope,iElement){var idleLabelHtml=labelElement.html(),busyLabelHtml=scope.busyLabel||buttonConfig.busyLabel,busyTextHtml=scope.busyText;scope.$watch("isBusy",function(value){value?(iElement.addClass(buttonConfig.states.busy),labelElement.html(busyLabelHtml)):(iElement.removeClass(buttonConfig.states.busy),labelElement.html(busyTextHtml||idleLabelHtml))}),tAttrs.$observe("vBusyLabel",function(value){busyLabelHtml=value}),tAttrs.$observe("vBusyText",function(value){busyTextHtml=value})}}}}function vPressableDirective($document,buttonConfig){return{restrict:"A",link:function(scope,iElement){function makeRipple(posX,posY){var top,left,rect=iElement[0].getBoundingClientRect(),ripple=iElement[0].querySelector("v-ripple");angular.element(ripple).remove(),ripple=$document[0].createElement("v-ripple"),ripple.style.height=ripple.style.width=Math.max(rect.width,rect.height)+"px",iElement.append(ripple),left=posX-rect.left-ripple.offsetWidth/2-bodyElement[0].scrollLeft,top=posY-rect.top-ripple.offsetHeight/2-bodyElement[0].scrollTop,ripple.style.left=left+"px",ripple.style.top=top+"px"}function pressButton(event){makeRipple(event.pageX,event.pageY),iElement.addClass(buttonConfig.states.pressed),bodyElement.bind(releaseEvent,releaseButton)}function releaseButton(event){iElement.removeClass(buttonConfig.states.pressed),bodyElement.unbind(releaseEvent,releaseButton)}var isTouch=!("undefined"==typeof $document[0].documentElement.ontouchstart),pressEvent=isTouch?"touchstart":"mousedown",releaseEvent=isTouch?"touchend":"mouseup",bodyElement=angular.element($document[0].body);iElement.bind(pressEvent,pressButton)}}}angular.module("vButton.config",[]).constant("buttonConfig",{busyLabel:"Loading",states:{busy:"is-busy",pressed:"is-pressed"}}),angular.module("vButton.directives",[]),angular.module("vButton",["vButton.config","vButton.directives"]),angular.module("vButton.directives").directive("vBusy",vBusyDirective),vBusyDirective.$inject=["$document","buttonConfig"],angular.module("vButton.directives").directive("vPressable",vPressableDirective),vPressableDirective.$inject=["$document","buttonConfig"]}(angular),function(window,angular,undefined){angular.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){var NG_ANIMATE_CHILDREN="$$ngAnimateChildren";return function(scope,element,attrs){var val=attrs.ngAnimateChildren;angular.isString(val)&&0===val.length?element.data(NG_ANIMATE_CHILDREN,!0):scope.$watch(val,function(value){element.data(NG_ANIMATE_CHILDREN,!!value)})}}).factory("$$animateReflow",["$$rAF","$document",function($$rAF,$document){var bod=$document[0].body;return function(fn){return $$rAF(function(){fn(bod.offsetWidth)})}}]).config(["$provide","$animateProvider",function($provide,$animateProvider){function extractElementNode(element){for(var i=0;i<element.length;i++){var elm=element[i];if(elm.nodeType==ELEMENT_NODE)return elm}}function prepareElement(element){return element&&angular.element(element)}function stripCommentsFromElement(element){return angular.element(extractElementNode(element))}function isMatchingElement(elm1,elm2){return extractElementNode(elm1)==extractElementNode(elm2)}var $$jqLite,noop=angular.noop,forEach=angular.forEach,selectors=$animateProvider.$$selectors,isArray=angular.isArray,isString=angular.isString,isObject=angular.isObject,ELEMENT_NODE=1,NG_ANIMATE_STATE="$$ngAnimateState",NG_ANIMATE_CHILDREN="$$ngAnimateChildren",NG_ANIMATE_CLASS_NAME="ng-animate",rootAnimateState={running:!0};$provide.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest","$$jqLite",function($delegate,$$q,$injector,$sniffer,$rootElement,$$asyncCallback,$rootScope,$document,$templateRequest,$$$jqLite){function classBasedAnimationsBlocked(element,setter){var data=element.data(NG_ANIMATE_STATE)||{};return setter&&(data.running=!0,data.structural=!0,element.data(NG_ANIMATE_STATE,data)),data.disabled||data.running&&data.structural}function runAnimationPostDigest(fn){var cancelFn,defer=$$q.defer();return defer.promise.$$cancelFn=function(){cancelFn&&cancelFn()},$rootScope.$$postDigest(function(){cancelFn=fn(function(){defer.resolve()})}),defer.promise}function parseAnimateOptions(options){if(isObject(options))return options.tempClasses&&isString(options.tempClasses)&&(options.tempClasses=options.tempClasses.split(/\s+/)),options}function resolveElementClasses(element,cache,runningAnimations){runningAnimations=runningAnimations||{};var lookup={};forEach(runningAnimations,function(data,selector){forEach(selector.split(" "),function(s){lookup[s]=data})});var hasClasses=Object.create(null);forEach((element.attr("class")||"").split(/\s+/),function(className){hasClasses[className]=!0});var toAdd=[],toRemove=[];return forEach(cache&&cache.classes||[],function(status,className){var hasClass=hasClasses[className],matchingAnimation=lookup[className]||{};status===!1?(hasClass||"addClass"==matchingAnimation.event)&&toRemove.push(className):status===!0&&(hasClass&&"removeClass"!=matchingAnimation.event||toAdd.push(className))}),toAdd.length+toRemove.length>0&&[toAdd.join(" "),toRemove.join(" ")]}function lookup(name){if(name){var matches=[],flagMap={},classes=name.substr(1).split(".");($sniffer.transitions||$sniffer.animations)&&matches.push($injector.get(selectors[""]));for(var i=0;i<classes.length;i++){var klass=classes[i],selectorFactoryName=selectors[klass];selectorFactoryName&&!flagMap[klass]&&(matches.push($injector.get(selectorFactoryName)),flagMap[klass]=!0)}return matches}}function animationRunner(element,animationEvent,className,options){function registerAnimation(animationFactory,event){var afterFn=animationFactory[event],beforeFn=animationFactory["before"+event.charAt(0).toUpperCase()+event.substr(1)];if(afterFn||beforeFn)return"leave"==event&&(beforeFn=afterFn,afterFn=null),after.push({event:event,fn:afterFn}),before.push({event:event,fn:beforeFn}),!0}function run(fns,cancellations,allCompleteFn){function afterAnimationComplete(index){if(cancellations){if((cancellations[index]||noop)(),++count<animations.length)return;cancellations=null}allCompleteFn()}var animations=[];forEach(fns,function(animation){animation.fn&&animations.push(animation)});var count=0;forEach(animations,function(animation,index){var progress=function(){afterAnimationComplete(index)};switch(animation.event){case"setClass":cancellations.push(animation.fn(element,classNameAdd,classNameRemove,progress,options));break;case"animate":cancellations.push(animation.fn(element,className,options.from,options.to,progress));break;case"addClass":cancellations.push(animation.fn(element,classNameAdd||className,progress,options));break;case"removeClass":cancellations.push(animation.fn(element,classNameRemove||className,progress,options));break;default:cancellations.push(animation.fn(element,progress,options))}}),cancellations&&0===cancellations.length&&allCompleteFn()}var node=element[0];if(node){options&&(options.to=options.to||{},options.from=options.from||{});var classNameAdd,classNameRemove;isArray(className)&&(classNameAdd=className[0],classNameRemove=className[1],classNameAdd?classNameRemove?className=classNameAdd+" "+classNameRemove:(className=classNameAdd,animationEvent="addClass"):(className=classNameRemove,animationEvent="removeClass"));var isSetClassOperation="setClass"==animationEvent,isClassBased=isSetClassOperation||"addClass"==animationEvent||"removeClass"==animationEvent||"animate"==animationEvent,currentClassName=element.attr("class"),classes=currentClassName+" "+className;if(isAnimatableClassName(classes)){var beforeComplete=noop,beforeCancel=[],before=[],afterComplete=noop,afterCancel=[],after=[],animationLookup=(" "+classes).replace(/\s+/g,".");return forEach(lookup(animationLookup),function(animationFactory){var created=registerAnimation(animationFactory,animationEvent);!created&&isSetClassOperation&&(registerAnimation(animationFactory,"addClass"),registerAnimation(animationFactory,"removeClass"))}),{node:node,event:animationEvent,className:className,isClassBased:isClassBased,isSetClassOperation:isSetClassOperation,applyStyles:function(){options&&element.css(angular.extend(options.from||{},options.to||{}))},before:function(allCompleteFn){beforeComplete=allCompleteFn,run(before,beforeCancel,function(){beforeComplete=noop,allCompleteFn()})},after:function(allCompleteFn){afterComplete=allCompleteFn,run(after,afterCancel,function(){afterComplete=noop,allCompleteFn()})},cancel:function(){beforeCancel&&(forEach(beforeCancel,function(cancelFn){(cancelFn||noop)(!0)}),beforeComplete(!0)),afterCancel&&(forEach(afterCancel,function(cancelFn){(cancelFn||noop)(!0)}),afterComplete(!0))}}}}}function performAnimation(animationEvent,className,element,parentElement,afterElement,domOperation,options,doneCallback){function fireDOMCallback(animationPhase){var eventName="$animate:"+animationPhase;elementEvents&&elementEvents[eventName]&&elementEvents[eventName].length>0&&$$asyncCallback(function(){element.triggerHandler(eventName,{event:animationEvent,className:className})})}function fireBeforeCallbackAsync(){fireDOMCallback("before")}function fireAfterCallbackAsync(){fireDOMCallback("after")}function fireDoneCallbackAsync(){fireDOMCallback("close"),doneCallback()}function fireDOMOperation(){fireDOMOperation.hasBeenRun||(fireDOMOperation.hasBeenRun=!0,domOperation())}function closeAnimation(){if(!closeAnimation.hasBeenRun){runner&&runner.applyStyles(),closeAnimation.hasBeenRun=!0,options&&options.tempClasses&&forEach(options.tempClasses,function(className){$$jqLite.removeClass(element,className)});var data=element.data(NG_ANIMATE_STATE);data&&(runner&&runner.isClassBased?cleanup(element,className):($$asyncCallback(function(){var data=element.data(NG_ANIMATE_STATE)||{};localAnimationCount==data.index&&cleanup(element,className,animationEvent)}),element.data(NG_ANIMATE_STATE,data))),fireDoneCallbackAsync()}}var noopCancel=noop,runner=animationRunner(element,animationEvent,className,options);if(!runner)return fireDOMOperation(),fireBeforeCallbackAsync(),fireAfterCallbackAsync(),closeAnimation(),noopCancel;animationEvent=runner.event,className=runner.className;var elementEvents=angular.element._data(runner.node);if(elementEvents=elementEvents&&elementEvents.events,parentElement||(parentElement=afterElement?afterElement.parent():element.parent()),animationsDisabled(element,parentElement))return fireDOMOperation(),fireBeforeCallbackAsync(),fireAfterCallbackAsync(),closeAnimation(),noopCancel;var ngAnimateState=element.data(NG_ANIMATE_STATE)||{},runningAnimations=ngAnimateState.active||{},totalActiveAnimations=ngAnimateState.totalActive||0,lastAnimation=ngAnimateState.last,skipAnimation=!1;if(totalActiveAnimations>0){var animationsToCancel=[];if(runner.isClassBased){if("setClass"==lastAnimation.event)animationsToCancel.push(lastAnimation),cleanup(element,className);else if(runningAnimations[className]){var current=runningAnimations[className];current.event==animationEvent?skipAnimation=!0:(animationsToCancel.push(current),cleanup(element,className))}}else if("leave"==animationEvent&&runningAnimations["ng-leave"])skipAnimation=!0;else{for(var klass in runningAnimations)animationsToCancel.push(runningAnimations[klass]);ngAnimateState={},cleanup(element,!0)}animationsToCancel.length>0&&forEach(animationsToCancel,function(operation){operation.cancel()})}if(!runner.isClassBased||runner.isSetClassOperation||"animate"==animationEvent||skipAnimation||(skipAnimation="addClass"==animationEvent==element.hasClass(className)),skipAnimation)return fireDOMOperation(),fireBeforeCallbackAsync(),fireAfterCallbackAsync(),fireDoneCallbackAsync(),noopCancel;runningAnimations=ngAnimateState.active||{},totalActiveAnimations=ngAnimateState.totalActive||0,"leave"==animationEvent&&element.one("$destroy",function(e){var element=angular.element(this),state=element.data(NG_ANIMATE_STATE);if(state){var activeLeaveAnimation=state.active["ng-leave"];activeLeaveAnimation&&(activeLeaveAnimation.cancel(),cleanup(element,"ng-leave"))}}),$$jqLite.addClass(element,NG_ANIMATE_CLASS_NAME),options&&options.tempClasses&&forEach(options.tempClasses,function(className){$$jqLite.addClass(element,className)});var localAnimationCount=globalAnimationCounter++;return totalActiveAnimations++,runningAnimations[className]=runner,element.data(NG_ANIMATE_STATE,{last:runner,active:runningAnimations,index:localAnimationCount,totalActive:totalActiveAnimations}),fireBeforeCallbackAsync(),runner.before(function(cancelled){var data=element.data(NG_ANIMATE_STATE);cancelled=cancelled||!data||!data.active[className]||runner.isClassBased&&data.active[className].event!=animationEvent,fireDOMOperation(),cancelled===!0?closeAnimation():(fireAfterCallbackAsync(),runner.after(closeAnimation))}),runner.cancel}function cancelChildAnimations(element){var node=extractElementNode(element);if(node){var nodes=angular.isFunction(node.getElementsByClassName)?node.getElementsByClassName(NG_ANIMATE_CLASS_NAME):node.querySelectorAll("."+NG_ANIMATE_CLASS_NAME);forEach(nodes,function(element){element=angular.element(element);var data=element.data(NG_ANIMATE_STATE);data&&data.active&&forEach(data.active,function(runner){runner.cancel()})})}}function cleanup(element,className){if(isMatchingElement(element,$rootElement))rootAnimateState.disabled||(rootAnimateState.running=!1,rootAnimateState.structural=!1);else if(className){var data=element.data(NG_ANIMATE_STATE)||{},removeAnimations=className===!0;!removeAnimations&&data.active&&data.active[className]&&(data.totalActive--,delete data.active[className]),!removeAnimations&&data.totalActive||($$jqLite.removeClass(element,NG_ANIMATE_CLASS_NAME),element.removeData(NG_ANIMATE_STATE))}}function animationsDisabled(element,parentElement){if(rootAnimateState.disabled)return!0;if(isMatchingElement(element,$rootElement))return rootAnimateState.running;var allowChildAnimations,parentRunningAnimation,hasParent;do{if(0===parentElement.length)break;var isRoot=isMatchingElement(parentElement,$rootElement),state=isRoot?rootAnimateState:parentElement.data(NG_ANIMATE_STATE)||{};if(state.disabled)return!0;if(isRoot&&(hasParent=!0),allowChildAnimations!==!1){var animateChildrenFlag=parentElement.data(NG_ANIMATE_CHILDREN);angular.isDefined(animateChildrenFlag)&&(allowChildAnimations=animateChildrenFlag)}parentRunningAnimation=parentRunningAnimation||state.running||state.last&&!state.last.isClassBased}while(parentElement=parentElement.parent());return!hasParent||!allowChildAnimations&&parentRunningAnimation}$$jqLite=$$$jqLite,$rootElement.data(NG_ANIMATE_STATE,rootAnimateState);var deregisterWatch=$rootScope.$watch(function(){return $templateRequest.totalPendingRequests},function(val,oldVal){0===val&&(deregisterWatch(),$rootScope.$$postDigest(function(){$rootScope.$$postDigest(function(){rootAnimateState.running=!1})}))}),globalAnimationCounter=0,classNameFilter=$animateProvider.classNameFilter(),isAnimatableClassName=classNameFilter?function(className){return classNameFilter.test(className)}:function(){return!0};return{animate:function(element,from,to,className,options){return className=className||"ng-inline-animate",options=parseAnimateOptions(options)||{},options.from=to?from:null,options.to=to?to:from,runAnimationPostDigest(function(done){return performAnimation("animate",className,stripCommentsFromElement(element),null,null,noop,options,done)})},enter:function(element,parentElement,afterElement,options){return options=parseAnimateOptions(options),element=angular.element(element),parentElement=prepareElement(parentElement),afterElement=prepareElement(afterElement),classBasedAnimationsBlocked(element,!0),$delegate.enter(element,parentElement,afterElement),runAnimationPostDigest(function(done){return performAnimation("enter","ng-enter",stripCommentsFromElement(element),parentElement,afterElement,noop,options,done)})},leave:function(element,options){return options=parseAnimateOptions(options),element=angular.element(element),cancelChildAnimations(element),classBasedAnimationsBlocked(element,!0),runAnimationPostDigest(function(done){return performAnimation("leave","ng-leave",stripCommentsFromElement(element),null,null,function(){$delegate.leave(element)},options,done)})},move:function(element,parentElement,afterElement,options){return options=parseAnimateOptions(options),element=angular.element(element),parentElement=prepareElement(parentElement),afterElement=prepareElement(afterElement),cancelChildAnimations(element),classBasedAnimationsBlocked(element,!0),$delegate.move(element,parentElement,afterElement),runAnimationPostDigest(function(done){return performAnimation("move","ng-move",stripCommentsFromElement(element),parentElement,afterElement,noop,options,done)})},addClass:function(element,className,options){return this.setClass(element,className,[],options)},removeClass:function(element,className,options){return this.setClass(element,[],className,options)},setClass:function(element,add,remove,options){options=parseAnimateOptions(options);var STORAGE_KEY="$$animateClasses";if(element=angular.element(element),element=stripCommentsFromElement(element),classBasedAnimationsBlocked(element))return $delegate.$$setClassImmediately(element,add,remove,options);var classes,cache=element.data(STORAGE_KEY),hasCache=!!cache;return cache||(cache={},cache.classes={}),classes=cache.classes,add=isArray(add)?add:add.split(" "),forEach(add,function(c){c&&c.length&&(classes[c]=!0)}),remove=isArray(remove)?remove:remove.split(" "),forEach(remove,function(c){c&&c.length&&(classes[c]=!1)}),hasCache?(options&&cache.options&&(cache.options=angular.extend(cache.options||{},options)),cache.promise):(element.data(STORAGE_KEY,cache={classes:classes,options:options}),cache.promise=runAnimationPostDigest(function(done){var cache,parentNode,parentElement,elementNode=extractElementNode(element);if(elementNode&&(cache=element.data(STORAGE_KEY),element.removeData(STORAGE_KEY),parentElement=element.parent(),parentNode=elementNode.parentNode),!parentNode||parentNode.$$NG_REMOVED||elementNode.$$NG_REMOVED)return void done();var state=element.data(NG_ANIMATE_STATE)||{},classes=resolveElementClasses(element,cache,state.active);return classes?performAnimation("setClass",classes,element,parentElement,null,function(){classes[0]&&$delegate.$$addClassImmediately(element,classes[0]),classes[1]&&$delegate.$$removeClassImmediately(element,classes[1])},cache.options,done):done()}))},cancel:function(promise){promise.$$cancelFn()},enabled:function(value,element){switch(arguments.length){case 2:if(value)cleanup(element);else{var data=element.data(NG_ANIMATE_STATE)||{};data.disabled=!0,element.data(NG_ANIMATE_STATE,data)}break;case 1:rootAnimateState.disabled=!value;break;default:value=!rootAnimateState.disabled}return!!value}}}]),$animateProvider.register("",["$window","$sniffer","$timeout","$$animateReflow",function($window,$sniffer,$timeout,$$animateReflow){function clearCacheAfterReflow(){cancelAnimationReflow||(cancelAnimationReflow=$$animateReflow(function(){animationReflowQueue=[],cancelAnimationReflow=null,lookupCache={}}))}function afterReflow(element,callback){cancelAnimationReflow&&cancelAnimationReflow(),animationReflowQueue.push(callback),cancelAnimationReflow=$$animateReflow(function(){forEach(animationReflowQueue,function(fn){fn()}),animationReflowQueue=[],cancelAnimationReflow=null,lookupCache={}})}function animationCloseHandler(element,totalTime){var node=extractElementNode(element);element=angular.element(node),animationElementQueue.push(element);var futureTimestamp=Date.now()+totalTime;futureTimestamp<=closingTimestamp||($timeout.cancel(closingTimer),closingTimestamp=futureTimestamp,closingTimer=$timeout(function(){closeAllAnimations(animationElementQueue),animationElementQueue=[]},totalTime,!1))}function closeAllAnimations(elements){forEach(elements,function(element){
var elementData=element.data(NG_ANIMATE_CSS_DATA_KEY);elementData&&forEach(elementData.closeAnimationFns,function(fn){fn()})})}function getElementAnimationDetails(element,cacheKey){var data=cacheKey?lookupCache[cacheKey]:null;if(!data){var transitionDuration=0,transitionDelay=0,animationDuration=0,animationDelay=0;forEach(element,function(element){if(element.nodeType==ELEMENT_NODE){var elementStyles=$window.getComputedStyle(element)||{},transitionDurationStyle=elementStyles[TRANSITION_PROP+DURATION_KEY];transitionDuration=Math.max(parseMaxTime(transitionDurationStyle),transitionDuration);var transitionDelayStyle=elementStyles[TRANSITION_PROP+DELAY_KEY];transitionDelay=Math.max(parseMaxTime(transitionDelayStyle),transitionDelay);elementStyles[ANIMATION_PROP+DELAY_KEY];animationDelay=Math.max(parseMaxTime(elementStyles[ANIMATION_PROP+DELAY_KEY]),animationDelay);var aDuration=parseMaxTime(elementStyles[ANIMATION_PROP+DURATION_KEY]);aDuration>0&&(aDuration*=parseInt(elementStyles[ANIMATION_PROP+ANIMATION_ITERATION_COUNT_KEY],10)||1),animationDuration=Math.max(aDuration,animationDuration)}}),data={total:0,transitionDelay:transitionDelay,transitionDuration:transitionDuration,animationDelay:animationDelay,animationDuration:animationDuration},cacheKey&&(lookupCache[cacheKey]=data)}return data}function parseMaxTime(str){var maxValue=0,values=isString(str)?str.split(/\s*,\s*/):[];return forEach(values,function(value){maxValue=Math.max(parseFloat(value)||0,maxValue)}),maxValue}function getCacheKey(element){var parentElement=element.parent(),parentID=parentElement.data(NG_ANIMATE_PARENT_KEY);return parentID||(parentElement.data(NG_ANIMATE_PARENT_KEY,++parentCounter),parentID=parentCounter),parentID+"-"+extractElementNode(element).getAttribute("class")}function animateSetup(animationEvent,element,className,styles){var structural=["ng-enter","ng-leave","ng-move"].indexOf(className)>=0,cacheKey=getCacheKey(element),eventCacheKey=cacheKey+" "+className,itemIndex=lookupCache[eventCacheKey]?++lookupCache[eventCacheKey].total:0,stagger={};if(itemIndex>0){var staggerClassName=className+"-stagger",staggerCacheKey=cacheKey+" "+staggerClassName,applyClasses=!lookupCache[staggerCacheKey];applyClasses&&$$jqLite.addClass(element,staggerClassName),stagger=getElementAnimationDetails(element,staggerCacheKey),applyClasses&&$$jqLite.removeClass(element,staggerClassName)}$$jqLite.addClass(element,className);var formerData=element.data(NG_ANIMATE_CSS_DATA_KEY)||{},timings=getElementAnimationDetails(element,eventCacheKey),transitionDuration=timings.transitionDuration,animationDuration=timings.animationDuration;if(structural&&0===transitionDuration&&0===animationDuration)return $$jqLite.removeClass(element,className),!1;var blockTransition=styles||structural&&transitionDuration>0,blockAnimation=animationDuration>0&&stagger.animationDelay>0&&0===stagger.animationDuration,closeAnimationFns=formerData.closeAnimationFns||[];element.data(NG_ANIMATE_CSS_DATA_KEY,{stagger:stagger,cacheKey:eventCacheKey,running:formerData.running||0,itemIndex:itemIndex,blockTransition:blockTransition,closeAnimationFns:closeAnimationFns});var node=extractElementNode(element);return blockTransition&&(blockTransitions(node,!0),styles&&element.css(styles)),blockAnimation&&blockAnimations(node,!0),!0}function animateRun(animationEvent,element,className,activeAnimationComplete,styles){function onEnd(){element.off(css3AnimationEvents,onAnimationProgress),$$jqLite.removeClass(element,activeClassName),$$jqLite.removeClass(element,pendingClassName),staggerTimeout&&$timeout.cancel(staggerTimeout),animateClose(element,className);var node=extractElementNode(element);for(var i in appliedStyles)node.style.removeProperty(appliedStyles[i])}function onAnimationProgress(event){event.stopPropagation();var ev=event.originalEvent||event,timeStamp=ev.$manualTimeStamp||ev.timeStamp||Date.now(),elapsedTime=parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));Math.max(timeStamp-startTime,0)>=maxDelayTime&&elapsedTime>=maxDuration&&activeAnimationComplete()}var node=extractElementNode(element),elementData=element.data(NG_ANIMATE_CSS_DATA_KEY);if(node.getAttribute("class").indexOf(className)==-1||!elementData)return void activeAnimationComplete();var activeClassName="",pendingClassName="";forEach(className.split(" "),function(klass,i){var prefix=(i>0?" ":"")+klass;activeClassName+=prefix+"-active",pendingClassName+=prefix+"-pending"});var style="",appliedStyles=[],itemIndex=elementData.itemIndex,stagger=elementData.stagger,staggerTime=0;if(itemIndex>0){var transitionStaggerDelay=0;stagger.transitionDelay>0&&0===stagger.transitionDuration&&(transitionStaggerDelay=stagger.transitionDelay*itemIndex);var animationStaggerDelay=0;stagger.animationDelay>0&&0===stagger.animationDuration&&(animationStaggerDelay=stagger.animationDelay*itemIndex,appliedStyles.push(CSS_PREFIX+"animation-play-state")),staggerTime=Math.round(100*Math.max(transitionStaggerDelay,animationStaggerDelay))/100}staggerTime||($$jqLite.addClass(element,activeClassName),elementData.blockTransition&&blockTransitions(node,!1));var eventCacheKey=elementData.cacheKey+" "+activeClassName,timings=getElementAnimationDetails(element,eventCacheKey),maxDuration=Math.max(timings.transitionDuration,timings.animationDuration);if(0===maxDuration)return $$jqLite.removeClass(element,activeClassName),animateClose(element,className),void activeAnimationComplete();!staggerTime&&styles&&Object.keys(styles).length>0&&(timings.transitionDuration||(element.css("transition",timings.animationDuration+"s linear all"),appliedStyles.push("transition")),element.css(styles));var maxDelay=Math.max(timings.transitionDelay,timings.animationDelay),maxDelayTime=maxDelay*ONE_SECOND;if(appliedStyles.length>0){var oldStyle=node.getAttribute("style")||"";";"!==oldStyle.charAt(oldStyle.length-1)&&(oldStyle+=";"),node.setAttribute("style",oldStyle+" "+style)}var staggerTimeout,startTime=Date.now(),css3AnimationEvents=ANIMATIONEND_EVENT+" "+TRANSITIONEND_EVENT,animationTime=(maxDelay+maxDuration)*CLOSING_TIME_BUFFER,totalTime=(staggerTime+animationTime)*ONE_SECOND;return staggerTime>0&&($$jqLite.addClass(element,pendingClassName),staggerTimeout=$timeout(function(){staggerTimeout=null,timings.transitionDuration>0&&blockTransitions(node,!1),timings.animationDuration>0&&blockAnimations(node,!1),$$jqLite.addClass(element,activeClassName),$$jqLite.removeClass(element,pendingClassName),styles&&(0===timings.transitionDuration&&element.css("transition",timings.animationDuration+"s linear all"),element.css(styles),appliedStyles.push("transition"))},staggerTime*ONE_SECOND,!1)),element.on(css3AnimationEvents,onAnimationProgress),elementData.closeAnimationFns.push(function(){onEnd(),activeAnimationComplete()}),elementData.running++,animationCloseHandler(element,totalTime),onEnd}function blockTransitions(node,bool){node.style[TRANSITION_PROP+PROPERTY_KEY]=bool?"none":""}function blockAnimations(node,bool){node.style[ANIMATION_PROP+ANIMATION_PLAYSTATE_KEY]=bool?"paused":""}function animateBefore(animationEvent,element,className,styles){if(animateSetup(animationEvent,element,className,styles))return function(cancelled){cancelled&&animateClose(element,className)}}function animateAfter(animationEvent,element,className,afterAnimationComplete,styles){return element.data(NG_ANIMATE_CSS_DATA_KEY)?animateRun(animationEvent,element,className,afterAnimationComplete,styles):(animateClose(element,className),void afterAnimationComplete())}function animate(animationEvent,element,className,animationComplete,options){var preReflowCancellation=animateBefore(animationEvent,element,className,options.from);if(!preReflowCancellation)return clearCacheAfterReflow(),void animationComplete();var cancel=preReflowCancellation;return afterReflow(element,function(){cancel=animateAfter(animationEvent,element,className,animationComplete,options.to)}),function(cancelled){(cancel||noop)(cancelled)}}function animateClose(element,className){$$jqLite.removeClass(element,className);var data=element.data(NG_ANIMATE_CSS_DATA_KEY);data&&(data.running&&data.running--,data.running&&0!==data.running||element.removeData(NG_ANIMATE_CSS_DATA_KEY))}function suffixClasses(classes,suffix){var className="";return classes=isArray(classes)?classes:classes.split(/\s+/),forEach(classes,function(klass,i){klass&&klass.length>0&&(className+=(i>0?" ":"")+klass+suffix)}),className}var TRANSITION_PROP,TRANSITIONEND_EVENT,ANIMATION_PROP,ANIMATIONEND_EVENT,CSS_PREFIX="";window.ontransitionend===undefined&&window.onwebkittransitionend!==undefined?(CSS_PREFIX="-webkit-",TRANSITION_PROP="WebkitTransition",TRANSITIONEND_EVENT="webkitTransitionEnd transitionend"):(TRANSITION_PROP="transition",TRANSITIONEND_EVENT="transitionend"),window.onanimationend===undefined&&window.onwebkitanimationend!==undefined?(CSS_PREFIX="-webkit-",ANIMATION_PROP="WebkitAnimation",ANIMATIONEND_EVENT="webkitAnimationEnd animationend"):(ANIMATION_PROP="animation",ANIMATIONEND_EVENT="animationend");var cancelAnimationReflow,DURATION_KEY="Duration",PROPERTY_KEY="Property",DELAY_KEY="Delay",ANIMATION_ITERATION_COUNT_KEY="IterationCount",ANIMATION_PLAYSTATE_KEY="PlayState",NG_ANIMATE_PARENT_KEY="$$ngAnimateKey",NG_ANIMATE_CSS_DATA_KEY="$$ngAnimateCSS3Data",ELAPSED_TIME_MAX_DECIMAL_PLACES=3,CLOSING_TIME_BUFFER=1.5,ONE_SECOND=1e3,lookupCache={},parentCounter=0,animationReflowQueue=[],closingTimer=null,closingTimestamp=0,animationElementQueue=[];return{animate:function(element,className,from,to,animationCompleted,options){return options=options||{},options.from=from,options.to=to,animate("animate",element,className,animationCompleted,options)},enter:function(element,animationCompleted,options){return options=options||{},animate("enter",element,"ng-enter",animationCompleted,options)},leave:function(element,animationCompleted,options){return options=options||{},animate("leave",element,"ng-leave",animationCompleted,options)},move:function(element,animationCompleted,options){return options=options||{},animate("move",element,"ng-move",animationCompleted,options)},beforeSetClass:function(element,add,remove,animationCompleted,options){options=options||{};var className=suffixClasses(remove,"-remove")+" "+suffixClasses(add,"-add"),cancellationMethod=animateBefore("setClass",element,className,options.from);return cancellationMethod?(afterReflow(element,animationCompleted),cancellationMethod):(clearCacheAfterReflow(),void animationCompleted())},beforeAddClass:function(element,className,animationCompleted,options){options=options||{};var cancellationMethod=animateBefore("addClass",element,suffixClasses(className,"-add"),options.from);return cancellationMethod?(afterReflow(element,animationCompleted),cancellationMethod):(clearCacheAfterReflow(),void animationCompleted())},beforeRemoveClass:function(element,className,animationCompleted,options){options=options||{};var cancellationMethod=animateBefore("removeClass",element,suffixClasses(className,"-remove"),options.from);return cancellationMethod?(afterReflow(element,animationCompleted),cancellationMethod):(clearCacheAfterReflow(),void animationCompleted())},setClass:function(element,add,remove,animationCompleted,options){options=options||{},remove=suffixClasses(remove,"-remove"),add=suffixClasses(add,"-add");var className=remove+" "+add;return animateAfter("setClass",element,className,animationCompleted,options.to)},addClass:function(element,className,animationCompleted,options){return options=options||{},animateAfter("addClass",element,suffixClasses(className,"-add"),animationCompleted,options.to)},removeClass:function(element,className,animationCompleted,options){return options=options||{},animateAfter("removeClass",element,suffixClasses(className,"-remove"),animationCompleted,options.to)}}}])}])}(window,window.angular),angular.module("cgBusy",[]),angular.module("cgBusy").factory("_cgBusyTrackerFactory",["$timeout","$q",function($timeout,$q){return function(){var tracker={};tracker.promises=[],tracker.delayPromise=null,tracker.durationPromise=null,tracker.delayJustFinished=!1,tracker.reset=function(options){tracker.minDuration=options.minDuration,tracker.promises=[],angular.forEach(options.promises,function(p){p&&!p.$cgBusyFulfilled&&addPromiseLikeThing(p)}),0!==tracker.promises.length&&(tracker.delayJustFinished=!1,options.delay&&(tracker.delayPromise=$timeout(function(){tracker.delayPromise=null,tracker.delayJustFinished=!0},parseInt(options.delay,10))),options.minDuration&&(tracker.durationPromise=$timeout(function(){tracker.durationPromise=null},parseInt(options.minDuration,10)+(options.delay?parseInt(options.delay,10):0))))},tracker.isPromise=function(promiseThing){var then=promiseThing&&(promiseThing.then||promiseThing.$then||promiseThing.$promise&&promiseThing.$promise.then);return"undefined"!=typeof then},tracker.callThen=function(promiseThing,success,error){var promise;promiseThing.then||promiseThing.$then?promise=promiseThing:promiseThing.$promise?promise=promiseThing.$promise:promiseThing.denodeify&&(promise=$q.when(promiseThing));var then=promise.then||promise.$then;then.call(promise,success,error)};var addPromiseLikeThing=function(promise){if(!tracker.isPromise(promise))throw new Error("cgBusy expects a promise (or something that has a .promise or .$promise");tracker.promises.indexOf(promise)===-1&&(tracker.promises.push(promise),tracker.callThen(promise,function(){promise.$cgBusyFulfilled=!0,tracker.promises.indexOf(promise)!==-1&&tracker.promises.splice(tracker.promises.indexOf(promise),1)},function(){promise.$cgBusyFulfilled=!0,tracker.promises.indexOf(promise)!==-1&&tracker.promises.splice(tracker.promises.indexOf(promise),1)}))};return tracker.active=function(){return!tracker.delayPromise&&(tracker.delayJustFinished?(tracker.delayJustFinished=!1,0===tracker.promises.length&&(tracker.durationPromise=null),tracker.promises.length>0):!!tracker.durationPromise||tracker.promises.length>0)},tracker}}]),angular.module("cgBusy").value("cgBusyDefaults",{}),angular.module("cgBusy").directive("cgBusy",["$compile","$templateCache","cgBusyDefaults","$http","_cgBusyTrackerFactory",function($compile,$templateCache,cgBusyDefaults,$http,_cgBusyTrackerFactory){return{restrict:"A",link:function(scope,element,attrs,fn){var position=element.css("position");"static"!==position&&""!==position&&"undefined"!=typeof position||element.css("position","relative");var templateElement,backdropElement,currentTemplate,templateScope,backdrop,tracker=_cgBusyTrackerFactory(),defaults={templateUrl:"angular-busy.html",delay:0,minDuration:0,backdrop:!0,message:"Please Wait...",wrapperClass:"cg-busy cg-busy-animation"};angular.extend(defaults,cgBusyDefaults),scope.$watchCollection(attrs.cgBusy,function(options){if(options||(options={promise:null}),angular.isString(options))throw new Error("Invalid value for cg-busy. cgBusy no longer accepts string ids to represent promises/trackers.");(angular.isArray(options)||tracker.isPromise(options))&&(options={promise:options}),options=angular.extend(angular.copy(defaults),options),options.templateUrl||(options.templateUrl=defaults.templateUrl),angular.isArray(options.promise)||(options.promise=[options.promise]),templateScope||(templateScope=scope.$new()),templateScope.$message=options.message,angular.equals(tracker.promises,options.promise)||tracker.reset({promises:options.promise,delay:options.delay,minDuration:options.minDuration}),templateScope.$cgBusyIsActive=function(){return tracker.active()},templateElement&&currentTemplate===options.templateUrl&&backdrop===options.backdrop||(templateElement&&templateElement.remove(),backdropElement&&backdropElement.remove(),currentTemplate=options.templateUrl,backdrop=options.backdrop,$http.get(currentTemplate,{cache:$templateCache}).success(function(indicatorTemplate){if(options.backdrop="undefined"==typeof options.backdrop||options.backdrop,options.backdrop){var backdrop='<div class="cg-busy cg-busy-backdrop cg-busy-backdrop-animation ng-hide" ng-show="$cgBusyIsActive()"></div>';backdropElement=$compile(backdrop)(templateScope),element.append(backdropElement)}var template='<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">'+indicatorTemplate+"</div>";templateElement=$compile(template)(templateScope),angular.element(templateElement.children()[0]).css("position","absolute").css("top",0).css("left",0).css("right",0).css("bottom",0),element.append(templateElement)}).error(function(data){throw new Error("Template specified for cgBusy ("+options.templateUrl+") could not be loaded. "+data)}))},!0)}}}]),angular.module("cgBusy").run(["$templateCache",function($templateCache){$templateCache.put("angular-busy.html",'<div class="cg-busy-default-wrapper">\n\n <div class="cg-busy-default-sign">\n\n <div class="cg-busy-default-spinner">\n <div class="bar1"></div>\n <div class="bar2"></div>\n <div class="bar3"></div>\n <div class="bar4"></div>\n <div class="bar5"></div>\n <div class="bar6"></div>\n <div class="bar7"></div>\n <div class="bar8"></div>\n <div class="bar9"></div>\n <div class="bar10"></div>\n <div class="bar11"></div>\n <div class="bar12"></div>\n </div>\n\n <div class="cg-busy-default-text">{{$message}}</div>\n\n </div>\n\n</div>')}]),function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.jsyaml=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){function deprecated(name){return function(){throw new Error("Function "+name+" is deprecated and cannot be used.")}}var loader=require("./js-yaml/loader"),dumper=require("./js-yaml/dumper");module.exports.Type=require("./js-yaml/type"),module.exports.Schema=require("./js-yaml/schema"),module.exports.FAILSAFE_SCHEMA=require("./js-yaml/schema/failsafe"),module.exports.JSON_SCHEMA=require("./js-yaml/schema/json"),module.exports.CORE_SCHEMA=require("./js-yaml/schema/core"),module.exports.DEFAULT_SAFE_SCHEMA=require("./js-yaml/schema/default_safe"),module.exports.DEFAULT_FULL_SCHEMA=require("./js-yaml/schema/default_full"),module.exports.load=loader.load,module.exports.loadAll=loader.loadAll,module.exports.safeLoad=loader.safeLoad,module.exports.safeLoadAll=loader.safeLoadAll,module.exports.dump=dumper.dump,module.exports.safeDump=dumper.safeDump,module.exports.YAMLException=require("./js-yaml/exception"),module.exports.MINIMAL_SCHEMA=require("./js-yaml/schema/failsafe"),module.exports.SAFE_SCHEMA=require("./js-yaml/schema/default_safe"),module.exports.DEFAULT_SCHEMA=require("./js-yaml/schema/default_full"),module.exports.scan=deprecated("scan"),module.exports.parse=deprecated("parse"),module.exports.compose=deprecated("compose"),module.exports.addConstructor=deprecated("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(require,module,exports){function isNothing(subject){return"undefined"==typeof subject||null===subject}function isObject(subject){return"object"==typeof subject&&null!==subject}function toArray(sequence){return Array.isArray(sequence)?sequence:isNothing(sequence)?[]:[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source)for(sourceKeys=Object.keys(source),index=0,length=sourceKeys.length;index<length;index+=1)key=sourceKeys[index],target[key]=source[key];return target}function repeat(string,count){var cycle,result="";for(cycle=0;cycle<count;cycle+=1)result+=string;return result}function isNegativeZero(number){return 0===number&&Number.NEGATIVE_INFINITY===1/number}module.exports.isNothing=isNothing,module.exports.isObject=isObject,module.exports.toArray=toArray,module.exports.repeat=repeat,module.exports.isNegativeZero=isNegativeZero,module.exports.extend=extend},{}],3:[function(require,module,exports){function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(null===map)return{};for(result={},keys=Object.keys(map),index=0,length=keys.length;index<length;index+=1)tag=keys[index],style=String(map[tag]),"!!"===tag.slice(0,2)&&(tag="tag:yaml.org,2002:"+tag.slice(2)),type=schema.compiledTypeMap[tag],type&&_hasOwnProperty.call(type.styleAliases,style)&&(style=type.styleAliases[style]),result[tag]=style;return result}function encodeHex(character){var string,handle,length;if(string=character.toString(16).toUpperCase(),character<=255)handle="x",length=2;else if(character<=65535)handle="u",length=4;else{if(!(character<=4294967295))throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");handle="U",length=8}return"\\"+handle+common.repeat("0",length-string.length)+string}function State(options){this.schema=options.schema||DEFAULT_FULL_SCHEMA,this.indent=Math.max(1,options.indent||2),this.skipInvalid=options.skipInvalid||!1,this.flowLevel=common.isNothing(options.flowLevel)?-1:options.flowLevel,this.styleMap=compileStyleMap(this.schema,options.styles||null),this.sortKeys=options.sortKeys||!1,this.lineWidth=options.lineWidth||80,this.noRefs=options.noRefs||!1,this.noCompatMode=options.noCompatMode||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function indentString(string,spaces){for(var line,ind=common.repeat(" ",spaces),position=0,next=-1,result="",length=string.length;position<length;)next=string.indexOf("\n",position),next===-1?(line=string.slice(position),position=length):(line=string.slice(position,next+1),position=next+1),line.length&&"\n"!==line&&(result+=ind),result+=line;return result}function generateNextLine(state,level){return"\n"+common.repeat(" ",state.indent*level)}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1)if(type=state.implicitTypes[index],type.resolve(str))return!0;return!1}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&8232!==c&&8233!==c||57344<=c&&c<=65533&&65279!==c||65536<=c&&c<=1114111}function isPlainSafe(c){return isPrintable(c)&&65279!==c&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_COLON&&c!==CHAR_SHARP}function isPlainSafeFirst(c){return isPrintable(c)&&65279!==c&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType){var i,char,hasLineBreak=!1,hasFoldableLine=!1,shouldTrackWidth=lineWidth!==-1,previousLineBreak=-1,plain=isPlainSafeFirst(string.charCodeAt(0))&&!isWhitespace(string.charCodeAt(string.length-1));if(singleLineOnly)for(i=0;i<string.length;i++){if(char=string.charCodeAt(i),!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char)}else{for(i=0;i<string.length;i++){if(char=string.charCodeAt(i),char===CHAR_LINE_FEED)hasLineBreak=!0,shouldTrackWidth&&(hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&" "!==string[previousLineBreak+1],previousLineBreak=i);else if(!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char)}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&i-previousLineBreak-1>lineWidth&&" "!==string[previousLineBreak+1]}return hasLineBreak||hasFoldableLine?" "===string[0]&&indentPerLevel>9?STYLE_DOUBLE:hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL:plain&&!testAmbiguousType(string)?STYLE_PLAIN:STYLE_SINGLE}function writeScalar(state,string,level,iskey){state.dump=function(){function testAmbiguity(string){return testImplicitResolving(state,string)}if(0===string.length)return"''";if(!state.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1)return"'"+string+"'";var indent=state.indent*Math.max(1,level),lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent),singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string,lineWidth)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=" "===string[0]?String(indentPerLevel):"",clip="\n"===string[string.length-1],keep=clip&&("\n"===string[string.length-2]||"\n"===string),chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return"\n"===string[string.length-1]?string.slice(0,-1):string}function foldString(string,width){for(var moreIndented,match,lineRe=/(\n+)([^\n]*)/g,result=function(){var nextLF=string.indexOf("\n");return nextLF=nextLF!==-1?nextLF:string.length,lineRe.lastIndex=nextLF,foldLine(string.slice(0,nextLF),width)}(),prevMoreIndented="\n"===string[0]||" "===string[0];match=lineRe.exec(string);){var prefix=match[1],line=match[2];moreIndented=" "===line[0],result+=prefix+(prevMoreIndented||moreIndented||""===line?"":"\n")+foldLine(line,width),prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(""===line||" "===line[0])return line;for(var match,end,breakRe=/ [^ ]/g,start=0,curr=0,next=0,result="";match=breakRe.exec(line);)next=match.index,next-start>width&&(end=curr>start?curr:next,result+="\n"+line.slice(start,end),start=end+1),curr=next;return result+="\n",result+=line.length-start>width&&curr>start?line.slice(start,curr)+"\n"+line.slice(curr+1):line.slice(start),result.slice(1)}function escapeString(string){for(var char,escapeSeq,result="",i=0;i<string.length;i++)char=string.charCodeAt(i),escapeSeq=ESCAPE_SEQUENCES[char],result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char);return result}function writeFlowSequence(state,level,object){var index,length,_result="",_tag=state.tag;for(index=0,length=object.length;index<length;index+=1)writeNode(state,level,object[index],!1,!1)&&(0!==index&&(_result+=", "),_result+=state.dump);state.tag=_tag,state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var index,length,_result="",_tag=state.tag;for(index=0,length=object.length;index<length;index+=1)writeNode(state,level+1,object[index],!0,!0)&&(compact&&0===index||(_result+=generateNextLine(state,level)),_result+="- "+state.dump);state.tag=_tag,state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var index,length,objectKey,objectValue,pairBuffer,_result="",_tag=state.tag,objectKeyList=Object.keys(object);for(index=0,length=objectKeyList.length;index<length;index+=1)pairBuffer="",0!==index&&(pairBuffer+=", "),objectKey=objectKeyList[index],objectValue=object[objectKey],writeNode(state,level,objectKey,!1,!1)&&(state.dump.length>1024&&(pairBuffer+="? "),pairBuffer+=state.dump+": ",writeNode(state,level,objectValue,!1,!1)&&(pairBuffer+=state.dump,_result+=pairBuffer));state.tag=_tag,state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var index,length,objectKey,objectValue,explicitPair,pairBuffer,_result="",_tag=state.tag,objectKeyList=Object.keys(object);if(state.sortKeys===!0)objectKeyList.sort();else if("function"==typeof state.sortKeys)objectKeyList.sort(state.sortKeys);else if(state.sortKeys)throw new YAMLException("sortKeys must be a boolean or a function");for(index=0,length=objectKeyList.length;index<length;index+=1)pairBuffer="",compact&&0===index||(pairBuffer+=generateNextLine(state,level)),objectKey=objectKeyList[index],objectValue=object[objectKey],writeNode(state,level+1,objectKey,!0,!0,!0)&&(explicitPair=null!==state.tag&&"?"!==state.tag||state.dump&&state.dump.length>1024,explicitPair&&(pairBuffer+=state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)?"?":"? "),pairBuffer+=state.dump,explicitPair&&(pairBuffer+=generateNextLine(state,level)),writeNode(state,level+1,objectValue,!0,explicitPair)&&(pairBuffer+=state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)?":":": ",pairBuffer+=state.dump,_result+=pairBuffer));state.tag=_tag,state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;for(typeList=explicit?state.explicitTypes:state.implicitTypes,index=0,length=typeList.length;index<length;index+=1)if(type=typeList[index],(type.instanceOf||type.predicate)&&(!type.instanceOf||"object"==typeof object&&object instanceof type.instanceOf)&&(!type.predicate||type.predicate(object))){if(state.tag=explicit?type.tag:"?",type.represent){if(style=state.styleMap[type.tag]||type.defaultStyle,"[object Function]"===_toString.call(type.represent))_result=type.represent(object,style);else{if(!_hasOwnProperty.call(type.represent,style))throw new YAMLException("!<"+type.tag+'> tag resolver accepts not "'+style+'" style');_result=type.represent[style](object,style)}state.dump=_result}return!0}return!1}function writeNode(state,level,object,block,compact,iskey){state.tag=null,state.dump=object,detectType(state,object,!1)||detectType(state,object,!0);var type=_toString.call(state.dump);block&&(block=state.flowLevel<0||state.flowLevel>level);var duplicateIndex,duplicate,objectOrArray="[object Object]"===type||"[object Array]"===type;if(objectOrArray&&(duplicateIndex=state.duplicates.indexOf(object),duplicate=duplicateIndex!==-1),(null!==state.tag&&"?"!==state.tag||duplicate||2!==state.indent&&level>0)&&(compact=!1),duplicate&&state.usedDuplicates[duplicateIndex])state.dump="*ref_"+duplicateIndex;else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]&&(state.usedDuplicates[duplicateIndex]=!0),"[object Object]"===type)block&&0!==Object.keys(state.dump).length?(writeBlockMapping(state,level,state.dump,compact),duplicate&&(state.dump="&ref_"+duplicateIndex+state.dump)):(writeFlowMapping(state,level,state.dump),duplicate&&(state.dump="&ref_"+duplicateIndex+" "+state.dump));else if("[object Array]"===type)block&&0!==state.dump.length?(writeBlockSequence(state,level,state.dump,compact),duplicate&&(state.dump="&ref_"+duplicateIndex+state.dump)):(writeFlowSequence(state,level,state.dump),duplicate&&(state.dump="&ref_"+duplicateIndex+" "+state.dump));else{if("[object String]"!==type){if(state.skipInvalid)return!1;throw new YAMLException("unacceptable kind of an object to dump "+type)}"?"!==state.tag&&writeScalar(state,state.dump,level,iskey)}null!==state.tag&&"?"!==state.tag&&(state.dump="!<"+state.tag+"> "+state.dump)}return!0}function getDuplicateReferences(object,state){var index,length,objects=[],duplicatesIndexes=[];for(inspectNode(object,objects,duplicatesIndexes),
index=0,length=duplicatesIndexes.length;index<length;index+=1)state.duplicates.push(objects[duplicatesIndexes[index]]);state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(null!==object&&"object"==typeof object)if(index=objects.indexOf(object),index!==-1)duplicatesIndexes.indexOf(index)===-1&&duplicatesIndexes.push(index);else if(objects.push(object),Array.isArray(object))for(index=0,length=object.length;index<length;index+=1)inspectNode(object[index],objects,duplicatesIndexes);else for(objectKeyList=Object.keys(object),index=0,length=objectKeyList.length;index<length;index+=1)inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}function dump(input,options){options=options||{};var state=new State(options);return state.noRefs||getDuplicateReferences(input,state),writeNode(state,0,input,!0,!0)?state.dump+"\n":""}function safeDump(input,options){return dump(input,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}var common=require("./common"),YAMLException=require("./exception"),DEFAULT_FULL_SCHEMA=require("./schema/default_full"),DEFAULT_SAFE_SCHEMA=require("./schema/default_safe"),_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0",ESCAPE_SEQUENCES[7]="\\a",ESCAPE_SEQUENCES[8]="\\b",ESCAPE_SEQUENCES[9]="\\t",ESCAPE_SEQUENCES[10]="\\n",ESCAPE_SEQUENCES[11]="\\v",ESCAPE_SEQUENCES[12]="\\f",ESCAPE_SEQUENCES[13]="\\r",ESCAPE_SEQUENCES[27]="\\e",ESCAPE_SEQUENCES[34]='\\"',ESCAPE_SEQUENCES[92]="\\\\",ESCAPE_SEQUENCES[133]="\\N",ESCAPE_SEQUENCES[160]="\\_",ESCAPE_SEQUENCES[8232]="\\L",ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;module.exports.dump=dump,module.exports.safeDump=safeDump},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(require,module,exports){function YAMLException(reason,mark){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=reason,this.mark=mark,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}YAMLException.prototype=Object.create(Error.prototype),YAMLException.prototype.constructor=YAMLException,YAMLException.prototype.toString=function(compact){var result=this.name+": ";return result+=this.reason||"(unknown reason)",!compact&&this.mark&&(result+=" "+this.mark.toString()),result},module.exports=YAMLException},{}],5:[function(require,module,exports){function is_EOL(c){return 10===c||13===c}function is_WHITE_SPACE(c){return 9===c||32===c}function is_WS_OR_EOL(c){return 9===c||32===c||10===c||13===c}function is_FLOW_INDICATOR(c){return 44===c||91===c||93===c||123===c||125===c}function fromHexCode(c){var lc;return 48<=c&&c<=57?c-48:(lc=32|c,97<=lc&&lc<=102?lc-97+10:-1)}function escapedHexLen(c){return 120===c?2:117===c?4:85===c?8:0}function fromDecimalCode(c){return 48<=c&&c<=57?c-48:-1}function simpleEscapeSequence(c){return 48===c?"\0":97===c?"":98===c?"\b":116===c?"\t":9===c?"\t":110===c?"\n":118===c?"\x0B":102===c?"\f":114===c?"\r":101===c?"":32===c?" ":34===c?'"':47===c?"/":92===c?"\\":78===c?"…":95===c?" ":76===c?"\u2028":80===c?"\u2029":""}function charFromCodepoint(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}function State(input,options){this.input=input,this.filename=options.filename||null,this.schema=options.schema||DEFAULT_FULL_SCHEMA,this.onWarning=options.onWarning||null,this.legacy=options.legacy||!1,this.json=options.json||!1,this.listener=options.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=input.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function generateError(state,message){return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart))}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){state.onWarning&&state.onWarning.call(null,generateError(state,message))}function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){if(_result=state.input.slice(start,end),checkJson)for(_position=0,_length=_result.length;_position<_length;_position+=1)_character=_result.charCodeAt(_position),9===_character||32<=_character&&_character<=1114111||throwError(state,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(_result)&&throwError(state,"the stream contains non-printable characters");state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;for(common.isObject(source)||throwError(state,"cannot merge mappings; the provided source object is unacceptable"),sourceKeys=Object.keys(source),index=0,quantity=sourceKeys.length;index<quantity;index+=1)key=sourceKeys[index],_hasOwnProperty.call(destination,key)||(destination[key]=source[key],overridableKeys[key]=!0)}function storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode){var index,quantity;if(keyNode=String(keyNode),null===_result&&(_result={}),"tag:yaml.org,2002:merge"===keyTag)if(Array.isArray(valueNode))for(index=0,quantity=valueNode.length;index<quantity;index+=1)mergeMappings(state,_result,valueNode[index],overridableKeys);else mergeMappings(state,_result,valueNode,overridableKeys);else state.json||_hasOwnProperty.call(overridableKeys,keyNode)||!_hasOwnProperty.call(_result,keyNode)||throwError(state,"duplicated mapping key"),_result[keyNode]=valueNode,delete overridableKeys[keyNode];return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position),10===ch?state.position++:13===ch?(state.position++,10===state.input.charCodeAt(state.position)&&state.position++):throwError(state,"a line break is expected"),state.line+=1,state.lineStart=state.position}function skipSeparationSpace(state,allowComments,checkIndent){for(var lineBreaks=0,ch=state.input.charCodeAt(state.position);0!==ch;){for(;is_WHITE_SPACE(ch);)ch=state.input.charCodeAt(++state.position);if(allowComments&&35===ch)do ch=state.input.charCodeAt(++state.position);while(10!==ch&&13!==ch&&0!==ch);if(!is_EOL(ch))break;for(readLineBreak(state),ch=state.input.charCodeAt(state.position),lineBreaks++,state.lineIndent=0;32===ch;)state.lineIndent++,ch=state.input.charCodeAt(++state.position)}return checkIndent!==-1&&0!==lineBreaks&&state.lineIndent<checkIndent&&throwWarning(state,"deficient indentation"),lineBreaks}function testDocumentSeparator(state){var ch,_position=state.position;return ch=state.input.charCodeAt(_position),!(45!==ch&&46!==ch||ch!==state.input.charCodeAt(_position+1)||ch!==state.input.charCodeAt(_position+2)||(_position+=3,ch=state.input.charCodeAt(_position),0!==ch&&!is_WS_OR_EOL(ch)))}function writeFoldedLines(state,count){1===count?state.result+=" ":count>1&&(state.result+=common.repeat("\n",count-1))}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,ch,_kind=state.kind,_result=state.result;if(ch=state.input.charCodeAt(state.position),is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||35===ch||38===ch||42===ch||33===ch||124===ch||62===ch||39===ch||34===ch||37===ch||64===ch||96===ch)return!1;if((63===ch||45===ch)&&(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)))return!1;for(state.kind="scalar",state.result="",captureStart=captureEnd=state.position,hasPendingContent=!1;0!==ch;){if(58===ch){if(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following))break}else if(35===ch){if(preceding=state.input.charCodeAt(state.position-1),is_WS_OR_EOL(preceding))break}else{if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch))break;if(is_EOL(ch)){if(_line=state.line,_lineStart=state.lineStart,_lineIndent=state.lineIndent,skipSeparationSpace(state,!1,-1),state.lineIndent>=nodeIndent){hasPendingContent=!0,ch=state.input.charCodeAt(state.position);continue}state.position=captureEnd,state.line=_line,state.lineStart=_lineStart,state.lineIndent=_lineIndent;break}}hasPendingContent&&(captureSegment(state,captureStart,captureEnd,!1),writeFoldedLines(state,state.line-_line),captureStart=captureEnd=state.position,hasPendingContent=!1),is_WHITE_SPACE(ch)||(captureEnd=state.position+1),ch=state.input.charCodeAt(++state.position)}return captureSegment(state,captureStart,captureEnd,!1),!!state.result||(state.kind=_kind,state.result=_result,!1)}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;if(ch=state.input.charCodeAt(state.position),39!==ch)return!1;for(state.kind="scalar",state.result="",state.position++,captureStart=captureEnd=state.position;0!==(ch=state.input.charCodeAt(state.position));)if(39===ch){if(captureSegment(state,captureStart,state.position,!0),ch=state.input.charCodeAt(++state.position),39!==ch)return!0;captureStart=captureEnd=state.position,state.position++}else is_EOL(ch)?(captureSegment(state,captureStart,captureEnd,!0),writeFoldedLines(state,skipSeparationSpace(state,!1,nodeIndent)),captureStart=captureEnd=state.position):state.position===state.lineStart&&testDocumentSeparator(state)?throwError(state,"unexpected end of the document within a single quoted scalar"):(state.position++,captureEnd=state.position);throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;if(ch=state.input.charCodeAt(state.position),34!==ch)return!1;for(state.kind="scalar",state.result="",state.position++,captureStart=captureEnd=state.position;0!==(ch=state.input.charCodeAt(state.position));){if(34===ch)return captureSegment(state,captureStart,state.position,!0),state.position++,!0;if(92===ch){if(captureSegment(state,captureStart,state.position,!0),ch=state.input.charCodeAt(++state.position),is_EOL(ch))skipSeparationSpace(state,!1,nodeIndent);else if(ch<256&&simpleEscapeCheck[ch])state.result+=simpleEscapeMap[ch],state.position++;else if((tmp=escapedHexLen(ch))>0){for(hexLength=tmp,hexResult=0;hexLength>0;hexLength--)ch=state.input.charCodeAt(++state.position),(tmp=fromHexCode(ch))>=0?hexResult=(hexResult<<4)+tmp:throwError(state,"expected hexadecimal character");state.result+=charFromCodepoint(hexResult),state.position++}else throwError(state,"unknown escape sequence");captureStart=captureEnd=state.position}else is_EOL(ch)?(captureSegment(state,captureStart,captureEnd,!0),writeFoldedLines(state,skipSeparationSpace(state,!1,nodeIndent)),captureStart=captureEnd=state.position):state.position===state.lineStart&&testDocumentSeparator(state)?throwError(state,"unexpected end of the document within a double quoted scalar"):(state.position++,captureEnd=state.position)}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var _line,_result,following,terminator,isPair,isExplicitPair,isMapping,keyNode,keyTag,valueNode,ch,readNext=!0,_tag=state.tag,_anchor=state.anchor,overridableKeys={};if(ch=state.input.charCodeAt(state.position),91===ch)terminator=93,isMapping=!1,_result=[];else{if(123!==ch)return!1;terminator=125,isMapping=!0,_result={}}for(null!==state.anchor&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(++state.position);0!==ch;){if(skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),ch===terminator)return state.position++,state.tag=_tag,state.anchor=_anchor,state.kind=isMapping?"mapping":"sequence",state.result=_result,!0;readNext||throwError(state,"missed comma between flow collection entries"),keyTag=keyNode=valueNode=null,isPair=isExplicitPair=!1,63===ch&&(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)&&(isPair=isExplicitPair=!0,state.position++,skipSeparationSpace(state,!0,nodeIndent))),_line=state.line,composeNode(state,nodeIndent,CONTEXT_FLOW_IN,!1,!0),keyTag=state.tag,keyNode=state.result,skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),!isExplicitPair&&state.line!==_line||58!==ch||(isPair=!0,ch=state.input.charCodeAt(++state.position),skipSeparationSpace(state,!0,nodeIndent),composeNode(state,nodeIndent,CONTEXT_FLOW_IN,!1,!0),valueNode=state.result),isMapping?storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode):isPair?_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode)):_result.push(keyNode),skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),44===ch?(readNext=!0,ch=state.input.charCodeAt(++state.position)):readNext=!1}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,tmp,ch,chomping=CHOMPING_CLIP,didReadContent=!1,detectedIndent=!1,textIndent=nodeIndent,emptyLines=0,atMoreIndented=!1;if(ch=state.input.charCodeAt(state.position),124===ch)folding=!1;else{if(62!==ch)return!1;folding=!0}for(state.kind="scalar",state.result="";0!==ch;)if(ch=state.input.charCodeAt(++state.position),43===ch||45===ch)CHOMPING_CLIP===chomping?chomping=43===ch?CHOMPING_KEEP:CHOMPING_STRIP:throwError(state,"repeat of a chomping mode identifier");else{if(!((tmp=fromDecimalCode(ch))>=0))break;0===tmp?throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one"):detectedIndent?throwError(state,"repeat of an indentation width identifier"):(textIndent=nodeIndent+tmp-1,detectedIndent=!0)}if(is_WHITE_SPACE(ch)){do ch=state.input.charCodeAt(++state.position);while(is_WHITE_SPACE(ch));if(35===ch)do ch=state.input.charCodeAt(++state.position);while(!is_EOL(ch)&&0!==ch)}for(;0!==ch;){for(readLineBreak(state),state.lineIndent=0,ch=state.input.charCodeAt(state.position);(!detectedIndent||state.lineIndent<textIndent)&&32===ch;)state.lineIndent++,ch=state.input.charCodeAt(++state.position);if(!detectedIndent&&state.lineIndent>textIndent&&(textIndent=state.lineIndent),is_EOL(ch))emptyLines++;else{if(state.lineIndent<textIndent){chomping===CHOMPING_KEEP?state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines):chomping===CHOMPING_CLIP&&didReadContent&&(state.result+="\n");break}for(folding?is_WHITE_SPACE(ch)?(atMoreIndented=!0,state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)):atMoreIndented?(atMoreIndented=!1,state.result+=common.repeat("\n",emptyLines+1)):0===emptyLines?didReadContent&&(state.result+=" "):state.result+=common.repeat("\n",emptyLines):state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines),didReadContent=!0,detectedIndent=!0,emptyLines=0,captureStart=state.position;!is_EOL(ch)&&0!==ch;)ch=state.input.charCodeAt(++state.position);captureSegment(state,captureStart,state.position,!1)}}return!0}function readBlockSequence(state,nodeIndent){var _line,following,ch,_tag=state.tag,_anchor=state.anchor,_result=[],detected=!1;for(null!==state.anchor&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(state.position);0!==ch&&45===ch&&(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following));)if(detected=!0,state.position++,skipSeparationSpace(state,!0,-1)&&state.lineIndent<=nodeIndent)_result.push(null),ch=state.input.charCodeAt(state.position);else if(_line=state.line,composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,!1,!0),_result.push(state.result),skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position),(state.line===_line||state.lineIndent>nodeIndent)&&0!==ch)throwError(state,"bad indentation of a sequence entry");else if(state.lineIndent<nodeIndent)break;return!!detected&&(state.tag=_tag,state.anchor=_anchor,state.kind="sequence",state.result=_result,!0)}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,ch,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys={},keyTag=null,keyNode=null,valueNode=null,atExplicitKey=!1,detected=!1;for(null!==state.anchor&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(state.position);0!==ch;){if(following=state.input.charCodeAt(state.position+1),_line=state.line,63!==ch&&58!==ch||!is_WS_OR_EOL(following)){if(!composeNode(state,flowIndent,CONTEXT_FLOW_OUT,!1,!0))break;if(state.line===_line){for(ch=state.input.charCodeAt(state.position);is_WHITE_SPACE(ch);)ch=state.input.charCodeAt(++state.position);if(58===ch)ch=state.input.charCodeAt(++state.position),is_WS_OR_EOL(ch)||throwError(state,"a whitespace character is expected after the key-value separator within a block mapping"),atExplicitKey&&(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null),keyTag=keyNode=valueNode=null),detected=!0,atExplicitKey=!1,allowCompact=!1,keyTag=state.tag,keyNode=state.result;else{if(!detected)return state.tag=_tag,state.anchor=_anchor,!0;throwError(state,"can not read an implicit mapping pair; a colon is missed")}}else{if(!detected)return state.tag=_tag,state.anchor=_anchor,!0;throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===ch?(atExplicitKey&&(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null),keyTag=keyNode=valueNode=null),detected=!0,atExplicitKey=!0,allowCompact=!0):atExplicitKey?(atExplicitKey=!1,allowCompact=!0):throwError(state,"incomplete explicit mapping pair; a key node is missed"),state.position+=1,ch=following;if((state.line===_line||state.lineIndent>nodeIndent)&&(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,!0,allowCompact)&&(atExplicitKey?keyNode=state.result:valueNode=state.result),atExplicitKey||(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode),keyTag=keyNode=valueNode=null),skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position)),state.lineIndent>nodeIndent&&0!==ch)throwError(state,"bad indentation of a mapping entry");else if(state.lineIndent<nodeIndent)break}return atExplicitKey&&storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null),detected&&(state.tag=_tag,state.anchor=_anchor,state.kind="mapping",state.result=_result),detected}function readTagProperty(state){var _position,tagHandle,tagName,ch,isVerbatim=!1,isNamed=!1;if(ch=state.input.charCodeAt(state.position),33!==ch)return!1;if(null!==state.tag&&throwError(state,"duplication of a tag property"),ch=state.input.charCodeAt(++state.position),60===ch?(isVerbatim=!0,ch=state.input.charCodeAt(++state.position)):33===ch?(isNamed=!0,tagHandle="!!",ch=state.input.charCodeAt(++state.position)):tagHandle="!",_position=state.position,isVerbatim){do ch=state.input.charCodeAt(++state.position);while(0!==ch&&62!==ch);state.position<state.length?(tagName=state.input.slice(_position,state.position),ch=state.input.charCodeAt(++state.position)):throwError(state,"unexpected end of the stream within a verbatim tag")}else{for(;0!==ch&&!is_WS_OR_EOL(ch);)33===ch&&(isNamed?throwError(state,"tag suffix cannot contain exclamation marks"):(tagHandle=state.input.slice(_position-1,state.position+1),PATTERN_TAG_HANDLE.test(tagHandle)||throwError(state,"named tag handle cannot contain such characters"),isNamed=!0,_position=state.position+1)),ch=state.input.charCodeAt(++state.position);tagName=state.input.slice(_position,state.position),PATTERN_FLOW_INDICATORS.test(tagName)&&throwError(state,"tag suffix cannot contain flow indicator characters")}return tagName&&!PATTERN_TAG_URI.test(tagName)&&throwError(state,"tag name cannot contain such characters: "+tagName),isVerbatim?state.tag=tagName:_hasOwnProperty.call(state.tagMap,tagHandle)?state.tag=state.tagMap[tagHandle]+tagName:"!"===tagHandle?state.tag="!"+tagName:"!!"===tagHandle?state.tag="tag:yaml.org,2002:"+tagName:throwError(state,'undeclared tag handle "'+tagHandle+'"'),!0}function readAnchorProperty(state){var _position,ch;if(ch=state.input.charCodeAt(state.position),38!==ch)return!1;for(null!==state.anchor&&throwError(state,"duplication of an anchor property"),ch=state.input.charCodeAt(++state.position),_position=state.position;0!==ch&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch);)ch=state.input.charCodeAt(++state.position);return state.position===_position&&throwError(state,"name of an anchor node must contain at least one character"),state.anchor=state.input.slice(_position,state.position),!0}function readAlias(state){var _position,alias,ch;if(ch=state.input.charCodeAt(state.position),42!==ch)return!1;for(ch=state.input.charCodeAt(++state.position),_position=state.position;0!==ch&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch);)ch=state.input.charCodeAt(++state.position);return state.position===_position&&throwError(state,"name of an alias node must contain at least one character"),alias=state.input.slice(_position,state.position),state.anchorMap.hasOwnProperty(alias)||throwError(state,'unidentified alias "'+alias+'"'),state.result=state.anchorMap[alias],skipSeparationSpace(state,!0,-1),!0}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,typeIndex,typeQuantity,type,flowIndent,blockIndent,indentStatus=1,atNewLine=!1,hasContent=!1;if(null!==state.listener&&state.listener("open",state),state.tag=null,state.anchor=null,state.kind=null,state.result=null,allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext,allowToSeek&&skipSeparationSpace(state,!0,-1)&&(atNewLine=!0,state.lineIndent>parentIndent?indentStatus=1:state.lineIndent===parentIndent?indentStatus=0:state.lineIndent<parentIndent&&(indentStatus=-1)),1===indentStatus)for(;readTagProperty(state)||readAnchorProperty(state);)skipSeparationSpace(state,!0,-1)?(atNewLine=!0,allowBlockCollections=allowBlockStyles,state.lineIndent>parentIndent?indentStatus=1:state.lineIndent===parentIndent?indentStatus=0:state.lineIndent<parentIndent&&(indentStatus=-1)):allowBlockCollections=!1;if(allowBlockCollections&&(allowBlockCollections=atNewLine||allowCompact),1!==indentStatus&&CONTEXT_BLOCK_OUT!==nodeContext||(flowIndent=CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext?parentIndent:parentIndent+1,blockIndent=state.position-state.lineStart,1===indentStatus?allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,flowIndent)?hasContent=!0:(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent)?hasContent=!0:readAlias(state)?(hasContent=!0,null===state.tag&&null===state.anchor||throwError(state,"alias node should not have any properties")):readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)&&(hasContent=!0,null===state.tag&&(state.tag="?")),null!==state.anchor&&(state.anchorMap[state.anchor]=state.result)):0===indentStatus&&(hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent))),null!==state.tag&&"!"!==state.tag)if("?"===state.tag){for(typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1)if(type=state.implicitTypes[typeIndex],type.resolve(state.result)){state.result=type.construct(state.result),state.tag=type.tag,null!==state.anchor&&(state.anchorMap[state.anchor]=state.result);break}}else _hasOwnProperty.call(state.typeMap,state.tag)?(type=state.typeMap[state.tag],null!==state.result&&type.kind!==state.kind&&throwError(state,"unacceptable node kind for !<"+state.tag+'> tag; it should be "'+type.kind+'", not "'+state.kind+'"'),type.resolve(state.result)?(state.result=type.construct(state.result),null!==state.anchor&&(state.anchorMap[state.anchor]=state.result)):throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")):throwError(state,"unknown tag !<"+state.tag+">");return null!==state.listener&&state.listener("close",state),null!==state.tag||null!==state.anchor||hasContent}function readDocument(state){var _position,directiveName,directiveArgs,ch,documentStart=state.position,hasDirectives=!1;for(state.version=null,state.checkLineBreaks=state.legacy,state.tagMap={},state.anchorMap={};0!==(ch=state.input.charCodeAt(state.position))&&(skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position),!(state.lineIndent>0||37!==ch));){for(hasDirectives=!0,ch=state.input.charCodeAt(++state.position),_position=state.position;0!==ch&&!is_WS_OR_EOL(ch);)ch=state.input.charCodeAt(++state.position);for(directiveName=state.input.slice(_position,state.position),directiveArgs=[],directiveName.length<1&&throwError(state,"directive name must not be less than one character in length");0!==ch;){for(;is_WHITE_SPACE(ch);)ch=state.input.charCodeAt(++state.position);if(35===ch){do ch=state.input.charCodeAt(++state.position);while(0!==ch&&!is_EOL(ch));break}if(is_EOL(ch))break;for(_position=state.position;0!==ch&&!is_WS_OR_EOL(ch);)ch=state.input.charCodeAt(++state.position);directiveArgs.push(state.input.slice(_position,state.position))}0!==ch&&readLineBreak(state),_hasOwnProperty.call(directiveHandlers,directiveName)?directiveHandlers[directiveName](state,directiveName,directiveArgs):throwWarning(state,'unknown document directive "'+directiveName+'"')}return skipSeparationSpace(state,!0,-1),0===state.lineIndent&&45===state.input.charCodeAt(state.position)&&45===state.input.charCodeAt(state.position+1)&&45===state.input.charCodeAt(state.position+2)?(state.position+=3,skipSeparationSpace(state,!0,-1)):hasDirectives&&throwError(state,"directives end mark is expected"),composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(state,!0,-1),state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))&&throwWarning(state,"non-ASCII line breaks are interpreted as content"),state.documents.push(state.result),state.position===state.lineStart&&testDocumentSeparator(state)?void(46===state.input.charCodeAt(state.position)&&(state.position+=3,skipSeparationSpace(state,!0,-1))):void(state.position<state.length-1&&throwError(state,"end of the stream or a document separator is expected"))}function loadDocuments(input,options){input=String(input),options=options||{},0!==input.length&&(10!==input.charCodeAt(input.length-1)&&13!==input.charCodeAt(input.length-1)&&(input+="\n"),65279===input.charCodeAt(0)&&(input=input.slice(1)));var state=new State(input,options);for(state.input+="\0";32===state.input.charCodeAt(state.position);)state.lineIndent+=1,state.position+=1;for(;state.position<state.length-1;)readDocument(state);return state.documents}function loadAll(input,iterator,options){var index,length,documents=loadDocuments(input,options);for(index=0,length=documents.length;index<length;index+=1)iterator(documents[index])}function load(input,options){var documents=loadDocuments(input,options);if(0!==documents.length){if(1===documents.length)return documents[0];throw new YAMLException("expected a single document in the stream, but found more")}}function safeLoadAll(input,output,options){loadAll(input,output,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}function safeLoad(input,options){return load(input,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}for(var common=require("./common"),YAMLException=require("./exception"),Mark=require("./mark"),DEFAULT_SAFE_SCHEMA=require("./schema/default_safe"),DEFAULT_FULL_SCHEMA=require("./schema/default_full"),_hasOwnProperty=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256),i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);var directiveHandlers={YAML:function(state,name,args){var match,major,minor;null!==state.version&&throwError(state,"duplication of %YAML directive"),1!==args.length&&throwError(state,"YAML directive accepts exactly one argument"),match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]),null===match&&throwError(state,"ill-formed argument of the YAML directive"),major=parseInt(match[1],10),minor=parseInt(match[2],10),1!==major&&throwError(state,"unacceptable YAML version of the document"),state.version=args[0],state.checkLineBreaks=minor<2,1!==minor&&2!==minor&&throwWarning(state,"unsupported YAML version of the document")},TAG:function(state,name,args){var handle,prefix;2!==args.length&&throwError(state,"TAG directive accepts exactly two arguments"),handle=args[0],prefix=args[1],PATTERN_TAG_HANDLE.test(handle)||throwError(state,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty.call(state.tagMap,handle)&&throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle'),PATTERN_TAG_URI.test(prefix)||throwError(state,"ill-formed tag prefix (second argument) of the TAG directive"),state.tagMap[handle]=prefix}};module.exports.loadAll=loadAll,module.exports.load=load,module.exports.safeLoadAll=safeLoadAll,module.exports.safeLoad=safeLoad},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(require,module,exports){function Mark(name,buffer,position,line,column){this.name=name,this.buffer=buffer,this.position=position,this.line=line,this.column=column}var common=require("./common");Mark.prototype.getSnippet=function(indent,maxLength){var head,start,tail,end,snippet;if(!this.buffer)return null;for(indent=indent||4,maxLength=maxLength||75,head="",start=this.position;start>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(start-1))===-1;)if(start-=1,this.position-start>maxLength/2-1){head=" ... ",start+=5;break}for(tail="",end=this.position;end<this.buffer.length&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(end))===-1;)if(end+=1,end-this.position>maxLength/2-1){tail=" ... ",end-=5;break}return snippet=this.buffer.slice(start,end),common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"},Mark.prototype.toString=function(compact){var snippet,where="";return this.name&&(where+='in "'+this.name+'" '),where+="at line "+(this.line+1)+", column "+(this.column+1),compact||(snippet=this.getSnippet(),snippet&&(where+=":\n"+snippet)),where},module.exports=Mark},{"./common":2}],7:[function(require,module,exports){function compileList(schema,name,result){var exclude=[];return schema.include.forEach(function(includedSchema){result=compileList(includedSchema,name,result)}),schema[name].forEach(function(currentType){result.forEach(function(previousType,previousIndex){previousType.tag===currentType.tag&&exclude.push(previousIndex)}),result.push(currentType)}),result.filter(function(type,index){
return exclude.indexOf(index)===-1})}function compileMap(){function collectType(type){result[type.tag]=type}var index,length,result={};for(index=0,length=arguments.length;index<length;index+=1)arguments[index].forEach(collectType);return result}function Schema(definition){this.include=definition.include||[],this.implicit=definition.implicit||[],this.explicit=definition.explicit||[],this.implicit.forEach(function(type){if(type.loadKind&&"scalar"!==type.loadKind)throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=compileList(this,"implicit",[]),this.compiledExplicit=compileList(this,"explicit",[]),this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}var common=require("./common"),YAMLException=require("./exception"),Type=require("./type");Schema.DEFAULT=null,Schema.create=function(){var schemas,types;switch(arguments.length){case 1:schemas=Schema.DEFAULT,types=arguments[0];break;case 2:schemas=arguments[0],types=arguments[1];break;default:throw new YAMLException("Wrong number of arguments for Schema.create function")}if(schemas=common.toArray(schemas),types=common.toArray(types),!schemas.every(function(schema){return schema instanceof Schema}))throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!types.every(function(type){return type instanceof Type}))throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Schema({include:schemas,explicit:types})},module.exports=Schema},{"./common":2,"./exception":4,"./type":13}],8:[function(require,module,exports){var Schema=require("../schema");module.exports=new Schema({include:[require("./json")]})},{"../schema":7,"./json":12}],9:[function(require,module,exports){var Schema=require("../schema");module.exports=Schema.DEFAULT=new Schema({include:[require("./default_safe")],explicit:[require("../type/js/undefined"),require("../type/js/regexp"),require("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(require,module,exports){var Schema=require("../schema");module.exports=new Schema({include:[require("./core")],implicit:[require("../type/timestamp"),require("../type/merge")],explicit:[require("../type/binary"),require("../type/omap"),require("../type/pairs"),require("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(require,module,exports){var Schema=require("../schema");module.exports=new Schema({explicit:[require("../type/str"),require("../type/seq"),require("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(require,module,exports){var Schema=require("../schema");module.exports=new Schema({include:[require("./failsafe")],implicit:[require("../type/null"),require("../type/bool"),require("../type/int"),require("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(require,module,exports){function compileStyleAliases(map){var result={};return null!==map&&Object.keys(map).forEach(function(style){map[style].forEach(function(alias){result[String(alias)]=style})}),result}function Type(tag,options){if(options=options||{},Object.keys(options).forEach(function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1)throw new YAMLException('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.')}),this.tag=tag,this.kind=options.kind||null,this.resolve=options.resolve||function(){return!0},this.construct=options.construct||function(data){return data},this.instanceOf=options.instanceOf||null,this.predicate=options.predicate||null,this.represent=options.represent||null,this.defaultStyle=options.defaultStyle||null,this.styleAliases=compileStyleAliases(options.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.')}var YAMLException=require("./exception"),TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];module.exports=Type},{"./exception":4}],14:[function(require,module,exports){function resolveYamlBinary(data){if(null===data)return!1;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;for(idx=0;idx<max;idx++)if(code=map.indexOf(data.charAt(idx)),!(code>64)){if(code<0)return!1;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++)idx%4===0&&idx&&(result.push(bits>>16&255),result.push(bits>>8&255),result.push(255&bits)),bits=bits<<6|map.indexOf(input.charAt(idx));return tailbits=max%4*6,0===tailbits?(result.push(bits>>16&255),result.push(bits>>8&255),result.push(255&bits)):18===tailbits?(result.push(bits>>10&255),result.push(bits>>2&255)):12===tailbits&&result.push(bits>>4&255),NodeBuffer?new NodeBuffer(result):result}function representYamlBinary(object){var idx,tail,result="",bits=0,max=object.length,map=BASE64_MAP;for(idx=0;idx<max;idx++)idx%3===0&&idx&&(result+=map[bits>>18&63],result+=map[bits>>12&63],result+=map[bits>>6&63],result+=map[63&bits]),bits=(bits<<8)+object[idx];return tail=max%3,0===tail?(result+=map[bits>>18&63],result+=map[bits>>12&63],result+=map[bits>>6&63],result+=map[63&bits]):2===tail?(result+=map[bits>>10&63],result+=map[bits>>4&63],result+=map[bits<<2&63],result+=map[64]):1===tail&&(result+=map[bits>>2&63],result+=map[bits<<4&63],result+=map[64],result+=map[64]),result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}var NodeBuffer;try{var _require=require;NodeBuffer=_require("buffer").Buffer}catch(__){}var Type=require("../type"),BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";module.exports=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},{"../type":13}],15:[function(require,module,exports){function resolveYamlBoolean(data){if(null===data)return!1;var max=data.length;return 4===max&&("true"===data||"True"===data||"TRUE"===data)||5===max&&("false"===data||"False"===data||"FALSE"===data)}function constructYamlBoolean(data){return"true"===data||"True"===data||"TRUE"===data}function isBoolean(object){return"[object Boolean]"===Object.prototype.toString.call(object)}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(require,module,exports){function resolveYamlFloat(data){return null!==data&&!!YAML_FLOAT_PATTERN.test(data)}function constructYamlFloat(data){var value,sign,base,digits;return value=data.replace(/_/g,"").toLowerCase(),sign="-"===value[0]?-1:1,digits=[],"+-".indexOf(value[0])>=0&&(value=value.slice(1)),".inf"===value?1===sign?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===value?NaN:value.indexOf(":")>=0?(value.split(":").forEach(function(v){digits.unshift(parseFloat(v,10))}),value=0,base=1,digits.forEach(function(d){value+=d*base,base*=60}),sign*value):sign*parseFloat(value,10)}function representYamlFloat(object,style){var res;if(isNaN(object))switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===object)switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===object)switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(object))return"-0.0";return res=object.toString(10),SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return"[object Number]"===Object.prototype.toString.call(object)&&(object%1!==0||common.isNegativeZero(object))}var common=require("../common"),Type=require("../type"),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;module.exports=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(require,module,exports){function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(null===data)return!1;var ch,max=data.length,index=0,hasDigits=!1;if(!max)return!1;if(ch=data[index],"-"!==ch&&"+"!==ch||(ch=data[++index]),"0"===ch){if(index+1===max)return!0;if(ch=data[++index],"b"===ch){for(index++;index<max;index++)if(ch=data[index],"_"!==ch){if("0"!==ch&&"1"!==ch)return!1;hasDigits=!0}return hasDigits}if("x"===ch){for(index++;index<max;index++)if(ch=data[index],"_"!==ch){if(!isHexCode(data.charCodeAt(index)))return!1;hasDigits=!0}return hasDigits}for(;index<max;index++)if(ch=data[index],"_"!==ch){if(!isOctCode(data.charCodeAt(index)))return!1;hasDigits=!0}return hasDigits}for(;index<max;index++)if(ch=data[index],"_"!==ch){if(":"===ch)break;if(!isDecCode(data.charCodeAt(index)))return!1;hasDigits=!0}return!!hasDigits&&(":"!==ch||/^(:[0-5]?[0-9])+$/.test(data.slice(index)))}function constructYamlInteger(data){var ch,base,value=data,sign=1,digits=[];return value.indexOf("_")!==-1&&(value=value.replace(/_/g,"")),ch=value[0],"-"!==ch&&"+"!==ch||("-"===ch&&(sign=-1),value=value.slice(1),ch=value[0]),"0"===value?0:"0"===ch?"b"===value[1]?sign*parseInt(value.slice(2),2):"x"===value[1]?sign*parseInt(value,16):sign*parseInt(value,8):value.indexOf(":")!==-1?(value.split(":").forEach(function(v){digits.unshift(parseInt(v,10))}),value=0,base=1,digits.forEach(function(d){value+=d*base,base*=60}),sign*value):sign*parseInt(value,10)}function isInteger(object){return"[object Number]"===Object.prototype.toString.call(object)&&object%1===0&&!common.isNegativeZero(object)}var common=require("../common"),Type=require("../type");module.exports=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(object){return"0b"+object.toString(2)},octal:function(object){return"0"+object.toString(8)},decimal:function(object){return object.toString(10)},hexadecimal:function(object){return"0x"+object.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(require,module,exports){function resolveJavascriptFunction(data){if(null===data)return!1;try{var source="("+data+")",ast=esprima.parse(source,{range:!0});return"Program"===ast.type&&1===ast.body.length&&"ExpressionStatement"===ast.body[0].type&&"FunctionExpression"===ast.body[0].expression.type}catch(err){return!1}}function constructJavascriptFunction(data){var body,source="("+data+")",ast=esprima.parse(source,{range:!0}),params=[];if("Program"!==ast.type||1!==ast.body.length||"ExpressionStatement"!==ast.body[0].type||"FunctionExpression"!==ast.body[0].expression.type)throw new Error("Failed to resolve function");return ast.body[0].expression.params.forEach(function(param){params.push(param.name)}),body=ast.body[0].expression.body.range,new Function(params,source.slice(body[0]+1,body[1]-1))}function representJavascriptFunction(object){return object.toString()}function isFunction(object){return"[object Function]"===Object.prototype.toString.call(object)}var esprima;try{var _require=require;esprima=_require("esprima")}catch(_){"undefined"!=typeof window&&(esprima=window.esprima)}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},{"../../type":13}],19:[function(require,module,exports){function resolveJavascriptRegExp(data){if(null===data)return!1;if(0===data.length)return!1;var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if("/"===regexp[0]){if(tail&&(modifiers=tail[1]),modifiers.length>3)return!1;if("/"!==regexp[regexp.length-modifiers.length-1])return!1}return!0}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";return"/"===regexp[0]&&(tail&&(modifiers=tail[1]),regexp=regexp.slice(1,regexp.length-modifiers.length-1)),new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";return object.global&&(result+="g"),object.multiline&&(result+="m"),object.ignoreCase&&(result+="i"),result}function isRegExp(object){return"[object RegExp]"===Object.prototype.toString.call(object)}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},{"../../type":13}],20:[function(require,module,exports){function resolveJavascriptUndefined(){return!0}function constructJavascriptUndefined(){}function representJavascriptUndefined(){return""}function isUndefined(object){return"undefined"==typeof object}var Type=require("../../type");module.exports=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},{"../../type":13}],21:[function(require,module,exports){var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return null!==data?data:{}}})},{"../type":13}],22:[function(require,module,exports){function resolveYamlMerge(data){return"<<"===data||null===data}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},{"../type":13}],23:[function(require,module,exports){function resolveYamlNull(data){if(null===data)return!0;var max=data.length;return 1===max&&"~"===data||4===max&&("null"===data||"Null"===data||"NULL"===data)}function constructYamlNull(){return null}function isNull(object){return null===object}var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(require,module,exports){function resolveYamlOmap(data){if(null===data)return!0;var index,length,pair,pairKey,pairHasKey,objectKeys=[],object=data;for(index=0,length=object.length;index<length;index+=1){if(pair=object[index],pairHasKey=!1,"[object Object]"!==_toString.call(pair))return!1;for(pairKey in pair)if(_hasOwnProperty.call(pair,pairKey)){if(pairHasKey)return!1;pairHasKey=!0}if(!pairHasKey)return!1;if(objectKeys.indexOf(pairKey)!==-1)return!1;objectKeys.push(pairKey)}return!0}function constructYamlOmap(data){return null!==data?data:[]}var Type=require("../type"),_hasOwnProperty=Object.prototype.hasOwnProperty,_toString=Object.prototype.toString;module.exports=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})},{"../type":13}],25:[function(require,module,exports){function resolveYamlPairs(data){if(null===data)return!0;var index,length,pair,keys,result,object=data;for(result=new Array(object.length),index=0,length=object.length;index<length;index+=1){if(pair=object[index],"[object Object]"!==_toString.call(pair))return!1;if(keys=Object.keys(pair),1!==keys.length)return!1;result[index]=[keys[0],pair[keys[0]]]}return!0}function constructYamlPairs(data){if(null===data)return[];var index,length,pair,keys,result,object=data;for(result=new Array(object.length),index=0,length=object.length;index<length;index+=1)pair=object[index],keys=Object.keys(pair),result[index]=[keys[0],pair[keys[0]]];return result}var Type=require("../type"),_toString=Object.prototype.toString;module.exports=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})},{"../type":13}],26:[function(require,module,exports){var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return null!==data?data:[]}})},{"../type":13}],27:[function(require,module,exports){function resolveYamlSet(data){if(null===data)return!0;var key,object=data;for(key in object)if(_hasOwnProperty.call(object,key)&&null!==object[key])return!1;return!0}function constructYamlSet(data){return null!==data?data:{}}var Type=require("../type"),_hasOwnProperty=Object.prototype.hasOwnProperty;module.exports=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},{"../type":13}],28:[function(require,module,exports){var Type=require("../type");module.exports=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return null!==data?data:""}})},{"../type":13}],29:[function(require,module,exports){function resolveYamlTimestamp(data){return null!==data&&(null!==YAML_DATE_REGEXP.exec(data)||null!==YAML_TIMESTAMP_REGEXP.exec(data))}function constructYamlTimestamp(data){var match,year,month,day,hour,minute,second,tz_hour,tz_minute,date,fraction=0,delta=null;if(match=YAML_DATE_REGEXP.exec(data),null===match&&(match=YAML_TIMESTAMP_REGEXP.exec(data)),null===match)throw new Error("Date resolve error");if(year=+match[1],month=+match[2]-1,day=+match[3],!match[4])return new Date(Date.UTC(year,month,day));if(hour=+match[4],minute=+match[5],second=+match[6],match[7]){for(fraction=match[7].slice(0,3);fraction.length<3;)fraction+="0";fraction=+fraction}return match[9]&&(tz_hour=+match[10],tz_minute=+(match[11]||0),delta=6e4*(60*tz_hour+tz_minute),"-"===match[9]&&(delta=-delta)),date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction)),delta&&date.setTime(date.getTime()-delta),date}function representYamlTimestamp(object){return object.toISOString()}var Type=require("../type"),YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");module.exports=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},{"../type":13}],"/":[function(require,module,exports){var yaml=require("./lib/js-yaml.js");module.exports=yaml},{"./lib/js-yaml.js":1}]},{},[])("/")}),angular.module("angular-input-stars",[]).service("FontAwesomeIcons",["$http","$q",function($http,$q){this.get=function(){var deferred=$q.defer();return $http.get("https://raw.githubusercontent.com/FortAwesome/Font-Awesome/gh-pages/icons.yml").then(function(response){for(var parsedData=jsyaml.load(response.data),parsedIconData={iconMap:{},iconList:[],iconCategoryList:[]},icons=parsedData.icons,i=0;i<icons.length;i++){parsedIconData.iconMap[icons[i].name]=icons[i].id,parsedIconData.iconList.push(icons[i].name);for(var x=0;x<icons[i].categories.length;x++)parsedIconData.iconCategoryList[icons[i].categories[x]]||(parsedIconData.iconCategoryList[icons[i].categories[x]]=[]),parsedIconData.iconCategoryList[icons[i].categories[x]].push(icons[i].name)}deferred.resolve(parsedIconData)},function(response){var error="Could not fetch FontAwesome Github Repo";response||(error=response.data||response),deferred.reject(error)}),deferred.promise}}]).filter("toFaIcon",["FontAwesomeIcons","$timeout",function(FontAwesomeIcons,$timeout){var getRatingShape=function(fieldType,iconData){var iconObj={full:"",empty:""};return __indexOf.call(iconData.iconList,fieldType)>=0?(iconObj.full="fa-"+iconData.iconMap[fieldType],iconObj.empty="fa-"+iconData.iconMap[fieldType]+"-o","thumbs-up"==fieldType||"thumbs-down"==fieldType?iconObj.empty="fa-"+iconData.iconMap[fieldType].split("-")[0]+"-o-"+iconData.iconMap[fieldType].split("-")[1]:"Smile Outlined"==fieldType&&(iconObj.empty="fa-frown-o"),iconObj):(console.error("Error no shape of type: "+fieldType+" for rating input"),iconObj)};return function(shapeType,isEmpty,faData){var shapeData=getRatingShape(shapeType,faData);return isEmpty?shapeData.empty:shapeData.full}}]).directive("inputStars",["$rootScope","$filter","FontAwesomeIcons","$q",function($rootScope,$filter,FontAwesomeIcons,$q){function link(scope,element,attrs,ngModelCtrl){var obj={};(function(){var deferred=$q.defer();return FontAwesomeIcons.get().then(function(result){deferred.resolve(result)},function(err){deferred.reject(new Error("toShapeIcon Error: "+err))}),deferred.promise})().then(function(faData){!function(){scope.items=new Array((+attrs.max)),obj.emptyIcon=$filter("toFaIcon")(attrs.iconEmpty,!0,faData)||attrs.iconEmpty||"fa-stars-o",obj.iconHover=attrs.iconHover||"angular-input-stars-hover",obj.fullIcon=$filter("toFaIcon")(attrs.iconFull,!1,faData)||attrs.iconEmpty||"fa-stars",obj.iconBase=attrs.iconBase||"fa fa-fw",scope.listClass=attrs.listClass||"angular-input-stars",scope.readonly=!(void 0===attrs.readonly)}(),attrs.$observe("max",function(max){scope.items=new Array((+max))}),attrs.$observe("iconEmpty",function(newEmptyIcon){obj.emptyIcon=$filter("toFaIcon")(newEmptyIcon,!0,faData)||newEmptyIcon||"fa-stars-o"}),attrs.$observe("iconFull",function(newFullIcon){obj.fullIcon=$filter("toFaIcon")(newFullIcon,!1,faData)||newFullIcon||"fa-stars"}),ngModelCtrl.$render=function(){scope.last_value=ngModelCtrl.$viewValue||0},scope.getClass=function(index){return index>=scope.last_value?obj.iconBase+" "+obj.emptyIcon:obj.iconBase+" "+obj.fullIcon+" active "},scope.unpaintStars=function($index,hover){scope.paintStars(scope.last_value-1,hover)},scope.paintStars=function($index,hover){if(!scope.readonly){for(var items=element.find("li").find("i"),index=0;index<items.length;index++){var $star=angular.element(items[index]);$index>=index?($star.removeClass(obj.emptyIcon),$star.addClass(obj.fullIcon),$star.addClass("active"),$star.addClass(obj.iconHover)):($star.removeClass(obj.fullIcon),$star.removeClass("active"),$star.removeClass(obj.iconHover),$star.addClass(obj.emptyIcon))}!hover&&items.removeClass(obj.iconHover)}},scope.setValue=function(index,e){if(!scope.readonly){var star=e.target;e.pageX<star.getBoundingClientRect().left+star.offsetWidth/2?scope.last_value=index+1:scope.last_value=index+1,ngModelCtrl.$setViewValue(scope.last_value),attrs.onShapeClick&&scope.$eval(attrs.onStarClick)}}},function(err){console.error("angular-input-stars.js | "+err.message||err)})}var directive={restrict:"EA",replace:!0,template:'<ul ng-class="listClass"><li ng-touch="paintStars($index)" ng-mouseenter="paintStars($index, true)" ng-mouseleave="unpaintStars($index, false)" ng-repeat="item in items track by $index"><i ng-class="getClass($index)" ng-click="setValue($index, $event)"></i></li></ul>',require:"ngModel",scope:!0,link:link};return directive}]),function(window,document,undefined){function toPX(element,attribute,value){var left,rsLeft=element.runtimeStyle&&element.runtimeStyle[attribute],style=element.style;return!/^-?[0-9]+\.?[0-9]*(?:px)?$/i.test(value)&&/^-?\d/.test(value)&&(left=style.left,rsLeft&&(element.runtimeStyle.left=element.currentStyle.left),style.left="fontSize"===attribute?"1em":value||0,value=style.pixelLeft+"px",style.left=left,rsLeft&&(element.runtimeStyle.left=rsLeft)),/^(thin|medium|thick)$/i.test(value)?value:Math.round(parseFloat(value))+"px"}function asInt(val){return parseInt(val,10)}function parseBackgroundSizePosition(value,element,attribute,index){if(value=(value||"").split(","),value=value[index||0]||value[0]||"auto",value=_html2canvas.Util.trimText(value).split(" "),"backgroundSize"!==attribute||value[0]&&!value[0].match(/cover|contain|auto/)){if(value[0]=value[0].indexOf("%")===-1?toPX(element,attribute+"X",value[0]):value[0],value[1]===undefined){if("backgroundSize"===attribute)return value[1]="auto",value;value[1]=value[0]}value[1]=value[1].indexOf("%")===-1?toPX(element,attribute+"Y",value[1]):value[1]}else;return value}function backgroundBoundsFactory(prop,el,bounds,image,imageIndex,backgroundSize){var topPos,left,percentage,val,bgposition=_html2canvas.Util.getCSS(el,prop,imageIndex);if(1===bgposition.length&&(val=bgposition[0],bgposition=[],bgposition[0]=val,bgposition[1]=val),bgposition[0].toString().indexOf("%")!==-1)percentage=parseFloat(bgposition[0])/100,left=bounds.width*percentage,"backgroundSize"!==prop&&(left-=(backgroundSize||image).width*percentage);else if("backgroundSize"===prop)if("auto"===bgposition[0])left=image.width;else if(/contain|cover/.test(bgposition[0])){var resized=_html2canvas.Util.resizeBounds(image.width,image.height,bounds.width,bounds.height,bgposition[0]);left=resized.width,topPos=resized.height}else left=parseInt(bgposition[0],10);else left=parseInt(bgposition[0],10);return"auto"===bgposition[1]?topPos=left/image.width*image.height:bgposition[1].toString().indexOf("%")!==-1?(percentage=parseFloat(bgposition[1])/100,topPos=bounds.height*percentage,"backgroundSize"!==prop&&(topPos-=(backgroundSize||image).height*percentage)):topPos=parseInt(bgposition[1],10),[left,topPos]}function h2cRenderContext(width,height){var storage=[];return{storage:storage,width:width,height:height,clip:function(){storage.push({type:"function",name:"clip",arguments:arguments})},translate:function(){storage.push({type:"function",name:"translate",arguments:arguments})},fill:function(){storage.push({type:"function",name:"fill",arguments:arguments})},save:function(){storage.push({type:"function",name:"save",arguments:arguments})},restore:function(){storage.push({type:"function",name:"restore",arguments:arguments})},fillRect:function(){storage.push({type:"function",name:"fillRect",arguments:arguments})},createPattern:function(){storage.push({type:"function",name:"createPattern",arguments:arguments})},drawShape:function(){var shape=[];return storage.push({type:"function",name:"drawShape",arguments:shape}),{moveTo:function(){shape.push({name:"moveTo",arguments:arguments})},lineTo:function(){shape.push({name:"lineTo",arguments:arguments})},arcTo:function(){shape.push({name:"arcTo",arguments:arguments})},bezierCurveTo:function(){shape.push({name:"bezierCurveTo",arguments:arguments})},quadraticCurveTo:function(){shape.push({name:"quadraticCurveTo",arguments:arguments})}}},drawImage:function(){storage.push({type:"function",name:"drawImage",arguments:arguments})},fillText:function(){storage.push({type:"function",name:"fillText",arguments:arguments})},setVariable:function(variable,value){return storage.push({type:"variable",name:variable,arguments:value}),value}}}function h2czContext(zindex){return{zindex:zindex,children:[]}}var previousElement,computedCSS,_html2canvas={};_html2canvas.Util={},_html2canvas.Util.log=function(a){_html2canvas.logging&&window.console&&window.console.log&&window.console.log(a)},_html2canvas.Util.trimText=function(isNative){return function(input){return isNative?isNative.apply(input):((input||"")+"").replace(/^\s+|\s+$/g,"")}}(String.prototype.trim),_html2canvas.Util.asFloat=function(v){return parseFloat(v)},function(){var TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;_html2canvas.Util.parseTextShadows=function(value){if(!value||"none"===value)return[];for(var shadows=value.match(TEXT_SHADOW_PROPERTY),results=[],i=0;shadows&&i<shadows.length;i++){var s=shadows[i].match(TEXT_SHADOW_VALUES);results.push({color:s[0],offsetX:s[1]?s[1].replace("px",""):0,offsetY:s[2]?s[2].replace("px",""):0,blur:s[3]?s[3].replace("px",""):0})}return results}}(),_html2canvas.Util.parseBackgroundImage=function(value){var method,definition,prefix,prefix_i,block,c,quote,args,whitespace=" \r\n\t",results=[],mode=0,numParen=0,appendResult=function(){method&&('"'===definition.substr(0,1)&&(definition=definition.substr(1,definition.length-2)),definition&&args.push(definition),"-"===method.substr(0,1)&&(prefix_i=method.indexOf("-",1)+1)>0&&(prefix=method.substr(0,prefix_i),method=method.substr(prefix_i)),results.push({prefix:prefix,method:method.toLowerCase(),value:block,args:args})),args=[],method=prefix=definition=block=""};appendResult();for(var i=0,ii=value.length;i<ii;i++)if(c=value[i],!(0===mode&&whitespace.indexOf(c)>-1)){switch(c){case'"':quote?quote===c&&(quote=null):quote=c;break;case"(":if(quote)break;if(0===mode){mode=1,block+=c;continue}numParen++;break;case")":if(quote)break;if(1===mode){if(0===numParen){mode=0,block+=c,appendResult();continue}numParen--}break;case",":if(quote)break;if(0===mode){appendResult();continue}if(1===mode&&0===numParen&&!method.match(/^url$/i)){args.push(definition),definition="",block+=c;continue}}block+=c,0===mode?method+=c:definition+=c}return appendResult(),results},_html2canvas.Util.Bounds=function(element){var clientRect,bounds={};return element.getBoundingClientRect&&(clientRect=element.getBoundingClientRect(),bounds.top=clientRect.top,bounds.bottom=clientRect.bottom||clientRect.top+clientRect.height,bounds.left=clientRect.left,bounds.width=element.offsetWidth,bounds.height=element.offsetHeight),bounds},_html2canvas.Util.OffsetBounds=function(element){var parent=element.offsetParent?_html2canvas.Util.OffsetBounds(element.offsetParent):{top:0,left:0};return{top:element.offsetTop+parent.top,bottom:element.offsetTop+element.offsetHeight+parent.top,left:element.offsetLeft+parent.left,width:element.offsetWidth,height:element.offsetHeight}},_html2canvas.Util.getCSS=function(element,attribute,index){previousElement!==element&&(computedCSS=document.defaultView.getComputedStyle(element,null));var value=computedCSS[attribute];if(/^background(Size|Position)$/.test(attribute))return parseBackgroundSizePosition(value,element,attribute,index);if(/border(Top|Bottom)(Left|Right)Radius/.test(attribute)){var arr=value.split(" ");return arr.length<=1&&(arr[1]=arr[0]),arr.map(asInt)}return value},_html2canvas.Util.resizeBounds=function(current_width,current_height,target_width,target_height,stretch_mode){var output_width,output_height,target_ratio=target_width/target_height,current_ratio=current_width/current_height;return stretch_mode&&"auto"!==stretch_mode?target_ratio<current_ratio^"contain"===stretch_mode?(output_height=target_height,output_width=target_height*current_ratio):(output_width=target_width,output_height=target_width/current_ratio):(output_width=target_width,output_height=target_height),{width:output_width,height:output_height}},_html2canvas.Util.BackgroundPosition=function(el,bounds,image,imageIndex,backgroundSize){var result=backgroundBoundsFactory("backgroundPosition",el,bounds,image,imageIndex,backgroundSize);return{left:result[0],top:result[1]}},_html2canvas.Util.BackgroundSize=function(el,bounds,image,imageIndex){var result=backgroundBoundsFactory("backgroundSize",el,bounds,image,imageIndex);return{width:result[0],height:result[1]}},_html2canvas.Util.Extend=function(options,defaults){
for(var key in options)options.hasOwnProperty(key)&&(defaults[key]=options[key]);return defaults},_html2canvas.Util.Children=function(elem){var children;try{children=elem.nodeName&&"IFRAME"===elem.nodeName.toUpperCase()?elem.contentDocument||elem.contentWindow.document:function(array){var ret=[];return null!==array&&!function(first,second){var i=first.length,j=0;if("number"==typeof second.length)for(var l=second.length;j<l;j++)first[i++]=second[j];else for(;second[j]!==undefined;)first[i++]=second[j++];return first.length=i,first}(ret,array),ret}(elem.childNodes)}catch(ex){_html2canvas.Util.log("html2canvas.Util.Children failed with exception: "+ex.message),children=[]}return children},_html2canvas.Util.isTransparent=function(backgroundColor){return"transparent"===backgroundColor||"rgba(0, 0, 0, 0)"===backgroundColor},_html2canvas.Util.Font=function(){var fontData={};return function(font,fontSize,doc){if(fontData[font+"-"+fontSize]!==undefined)return fontData[font+"-"+fontSize];var baseline,middle,metricsObj,container=doc.createElement("div"),img=doc.createElement("img"),span=doc.createElement("span"),sampleText="Hidden Text";return container.style.visibility="hidden",container.style.fontFamily=font,container.style.fontSize=fontSize,container.style.margin=0,container.style.padding=0,doc.body.appendChild(container),img.src="data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=",img.width=1,img.height=1,img.style.margin=0,img.style.padding=0,img.style.verticalAlign="baseline",span.style.fontFamily=font,span.style.fontSize=fontSize,span.style.margin=0,span.style.padding=0,span.appendChild(doc.createTextNode(sampleText)),container.appendChild(span),container.appendChild(img),baseline=img.offsetTop-span.offsetTop+1,container.removeChild(span),container.appendChild(doc.createTextNode(sampleText)),container.style.lineHeight="normal",img.style.verticalAlign="super",middle=img.offsetTop-container.offsetTop+1,metricsObj={baseline:baseline,lineWidth:1,middle:middle},fontData[font+"-"+fontSize]=metricsObj,doc.body.removeChild(container),metricsObj}}(),function(){function addScrollStops(grad){return function(colorStop){try{grad.addColorStop(colorStop.stop,colorStop.color)}catch(e){Util.log(["failed to add color stop: ",e,"; tried to add: ",colorStop])}}}var Util=_html2canvas.Util,Generate={};_html2canvas.Generate=Generate;var reGradients=[/^(-webkit-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-o-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-webkit-gradient)\((linear|radial),\s((?:\d{1,3}%?)\s(?:\d{1,3}%?),\s(?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)\-]+)\)$/,/^(-moz-linear-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)]+)\)$/,/^(-webkit-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/,/^(-moz-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s?([a-z\-]*)([\w\d\.\s,%\(\)]+)\)$/,/^(-o-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/];Generate.parseGradient=function(css,bounds){var gradient,i,m1,stop,m2,m2Len,step,m3,tl,tr,br,bl,len=reGradients.length;for(i=0;i<len&&!(m1=css.match(reGradients[i]));i+=1);if(m1)switch(m1[1]){case"-webkit-linear-gradient":case"-o-linear-gradient":if(gradient={type:"linear",x0:null,y0:null,x1:null,y1:null,colorStops:[]},m2=m1[2].match(/\w+/g))for(m2Len=m2.length,i=0;i<m2Len;i+=1)switch(m2[i]){case"top":gradient.y0=0,gradient.y1=bounds.height;break;case"right":gradient.x0=bounds.width,gradient.x1=0;break;case"bottom":gradient.y0=bounds.height,gradient.y1=0;break;case"left":gradient.x0=0,gradient.x1=bounds.width}if(null===gradient.x0&&null===gradient.x1&&(gradient.x0=gradient.x1=bounds.width/2),null===gradient.y0&&null===gradient.y1&&(gradient.y0=gradient.y1=bounds.height/2),m2=m1[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g))for(m2Len=m2.length,step=1/Math.max(m2Len-1,1),i=0;i<m2Len;i+=1)m3=m2[i].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/),m3[2]?(stop=parseFloat(m3[2]),stop/="%"===m3[3]?100:bounds.width):stop=i*step,gradient.colorStops.push({color:m3[1],stop:stop});break;case"-webkit-gradient":if(gradient={type:"radial"===m1[2]?"circle":m1[2],x0:0,y0:0,x1:0,y1:0,colorStops:[]},m2=m1[3].match(/(\d{1,3})%?\s(\d{1,3})%?,\s(\d{1,3})%?\s(\d{1,3})%?/),m2&&(gradient.x0=m2[1]*bounds.width/100,gradient.y0=m2[2]*bounds.height/100,gradient.x1=m2[3]*bounds.width/100,gradient.y1=m2[4]*bounds.height/100),m2=m1[4].match(/((?:from|to|color-stop)\((?:[0-9\.]+,\s)?(?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)\))+/g))for(m2Len=m2.length,i=0;i<m2Len;i+=1)m3=m2[i].match(/(from|to|color-stop)\(([0-9\.]+)?(?:,\s)?((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\)/),stop=parseFloat(m3[2]),"from"===m3[1]&&(stop=0),"to"===m3[1]&&(stop=1),gradient.colorStops.push({color:m3[3],stop:stop});break;case"-moz-linear-gradient":if(gradient={type:"linear",x0:0,y0:0,x1:0,y1:0,colorStops:[]},m2=m1[2].match(/(\d{1,3})%?\s(\d{1,3})%?/),m2&&(gradient.x0=m2[1]*bounds.width/100,gradient.y0=m2[2]*bounds.height/100,gradient.x1=bounds.width-gradient.x0,gradient.y1=bounds.height-gradient.y0),m2=m1[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}%)?)+/g))for(m2Len=m2.length,step=1/Math.max(m2Len-1,1),i=0;i<m2Len;i+=1)m3=m2[i].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%)?/),m3[2]?(stop=parseFloat(m3[2]),m3[3]&&(stop/=100)):stop=i*step,gradient.colorStops.push({color:m3[1],stop:stop});break;case"-webkit-radial-gradient":case"-moz-radial-gradient":case"-o-radial-gradient":if(gradient={type:"circle",x0:0,y0:0,x1:bounds.width,y1:bounds.height,cx:0,cy:0,rx:0,ry:0,colorStops:[]},m2=m1[2].match(/(\d{1,3})%?\s(\d{1,3})%?/),m2&&(gradient.cx=m2[1]*bounds.width/100,gradient.cy=m2[2]*bounds.height/100),m2=m1[3].match(/\w+/),m3=m1[4].match(/[a-z\-]*/),m2&&m3)switch(m3[0]){case"farthest-corner":case"cover":case"":tl=Math.sqrt(Math.pow(gradient.cx,2)+Math.pow(gradient.cy,2)),tr=Math.sqrt(Math.pow(gradient.cx,2)+Math.pow(gradient.y1-gradient.cy,2)),br=Math.sqrt(Math.pow(gradient.x1-gradient.cx,2)+Math.pow(gradient.y1-gradient.cy,2)),bl=Math.sqrt(Math.pow(gradient.x1-gradient.cx,2)+Math.pow(gradient.cy,2)),gradient.rx=gradient.ry=Math.max(tl,tr,br,bl);break;case"closest-corner":tl=Math.sqrt(Math.pow(gradient.cx,2)+Math.pow(gradient.cy,2)),tr=Math.sqrt(Math.pow(gradient.cx,2)+Math.pow(gradient.y1-gradient.cy,2)),br=Math.sqrt(Math.pow(gradient.x1-gradient.cx,2)+Math.pow(gradient.y1-gradient.cy,2)),bl=Math.sqrt(Math.pow(gradient.x1-gradient.cx,2)+Math.pow(gradient.cy,2)),gradient.rx=gradient.ry=Math.min(tl,tr,br,bl);break;case"farthest-side":"circle"===m2[0]?gradient.rx=gradient.ry=Math.max(gradient.cx,gradient.cy,gradient.x1-gradient.cx,gradient.y1-gradient.cy):(gradient.type=m2[0],gradient.rx=Math.max(gradient.cx,gradient.x1-gradient.cx),gradient.ry=Math.max(gradient.cy,gradient.y1-gradient.cy));break;case"closest-side":case"contain":"circle"===m2[0]?gradient.rx=gradient.ry=Math.min(gradient.cx,gradient.cy,gradient.x1-gradient.cx,gradient.y1-gradient.cy):(gradient.type=m2[0],gradient.rx=Math.min(gradient.cx,gradient.x1-gradient.cx),gradient.ry=Math.min(gradient.cy,gradient.y1-gradient.cy))}if(m2=m1[5].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g))for(m2Len=m2.length,step=1/Math.max(m2Len-1,1),i=0;i<m2Len;i+=1)m3=m2[i].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/),m3[2]?(stop=parseFloat(m3[2]),stop/="%"===m3[3]?100:bounds.width):stop=i*step,gradient.colorStops.push({color:m3[1],stop:stop})}return gradient},Generate.Gradient=function(src,bounds){if(0!==bounds.width&&0!==bounds.height){var gradient,grad,canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");if(canvas.width=bounds.width,canvas.height=bounds.height,gradient=_html2canvas.Generate.parseGradient(src,bounds))switch(gradient.type){case"linear":grad=ctx.createLinearGradient(gradient.x0,gradient.y0,gradient.x1,gradient.y1),gradient.colorStops.forEach(addScrollStops(grad)),ctx.fillStyle=grad,ctx.fillRect(0,0,bounds.width,bounds.height);break;case"circle":grad=ctx.createRadialGradient(gradient.cx,gradient.cy,0,gradient.cx,gradient.cy,gradient.rx),gradient.colorStops.forEach(addScrollStops(grad)),ctx.fillStyle=grad,ctx.fillRect(0,0,bounds.width,bounds.height);break;case"ellipse":var canvasRadial=document.createElement("canvas"),ctxRadial=canvasRadial.getContext("2d"),ri=Math.max(gradient.rx,gradient.ry),di=2*ri;canvasRadial.width=canvasRadial.height=di,grad=ctxRadial.createRadialGradient(gradient.rx,gradient.ry,0,gradient.rx,gradient.ry,ri),gradient.colorStops.forEach(addScrollStops(grad)),ctxRadial.fillStyle=grad,ctxRadial.fillRect(0,0,di,di),ctx.fillStyle=gradient.colorStops[gradient.colorStops.length-1].color,ctx.fillRect(0,0,canvas.width,canvas.height),ctx.drawImage(canvasRadial,gradient.cx-gradient.rx,gradient.cy-gradient.ry,2*gradient.rx,2*gradient.ry)}return canvas}},Generate.ListAlpha=function(number){var modulus,tmp="";do modulus=number%26,tmp=String.fromCharCode(modulus+64)+tmp,number/=26;while(26*number>26);return tmp},Generate.ListRoman=function(number){var v,romanArray=["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"],decimal=[1e3,900,500,400,100,90,50,40,10,9,5,4,1],roman="",len=romanArray.length;if(number<=0||number>=4e3)return number;for(v=0;v<len;v+=1)for(;number>=decimal[v];)number-=decimal[v],roman+=romanArray[v];return roman}}(),_html2canvas.Parse=function(images,options){function documentWidth(){return Math.max(Math.max(doc.body.scrollWidth,doc.documentElement.scrollWidth),Math.max(doc.body.offsetWidth,doc.documentElement.offsetWidth),Math.max(doc.body.clientWidth,doc.documentElement.clientWidth))}function documentHeight(){return Math.max(Math.max(doc.body.scrollHeight,doc.documentElement.scrollHeight),Math.max(doc.body.offsetHeight,doc.documentElement.offsetHeight),Math.max(doc.body.clientHeight,doc.documentElement.clientHeight))}function getCSSInt(element,attribute){var val=parseInt(getCSS(element,attribute),10);return isNaN(val)?0:val}function renderRect(ctx,x,y,w,h,bgcolor){"transparent"!==bgcolor&&(ctx.setVariable("fillStyle",bgcolor),ctx.fillRect(x,y,w,h),numDraws+=1)}function capitalize(m,p1,p2){if(m.length>0)return p1+p2.toUpperCase()}function textTransform(text,transform){switch(transform){case"lowercase":return text.toLowerCase();case"capitalize":return text.replace(/(^|\s|:|-|\(|\))([a-z])/g,capitalize);case"uppercase":return text.toUpperCase();default:return text}}function noLetterSpacing(letter_spacing){return/^(normal|none|0px)$/.test(letter_spacing)}function drawText(currentText,x,y,ctx){null!==currentText&&Util.trimText(currentText).length>0&&(ctx.fillText(currentText,x,y),numDraws+=1)}function setTextVariables(ctx,el,text_decoration,color){var align=!1,bold=getCSS(el,"fontWeight"),family=getCSS(el,"fontFamily"),size=getCSS(el,"fontSize"),shadows=Util.parseTextShadows(getCSS(el,"textShadow"));switch(parseInt(bold,10)){case 401:bold="bold";break;case 400:bold="normal"}if(ctx.setVariable("fillStyle",color),ctx.setVariable("font",[getCSS(el,"fontStyle"),getCSS(el,"fontVariant"),bold,size,family].join(" ")),ctx.setVariable("textAlign",align?"right":"left"),shadows.length&&(ctx.setVariable("shadowColor",shadows[0].color),ctx.setVariable("shadowOffsetX",shadows[0].offsetX),ctx.setVariable("shadowOffsetY",shadows[0].offsetY),ctx.setVariable("shadowBlur",shadows[0].blur)),"none"!==text_decoration)return Util.Font(family,size,doc)}function renderTextDecoration(ctx,text_decoration,bounds,metrics,color){switch(text_decoration){case"underline":renderRect(ctx,bounds.left,Math.round(bounds.top+metrics.baseline+metrics.lineWidth),bounds.width,1,color);break;case"overline":renderRect(ctx,bounds.left,Math.round(bounds.top),bounds.width,1,color);break;case"line-through":renderRect(ctx,bounds.left,Math.ceil(bounds.top+metrics.middle+metrics.lineWidth),bounds.width,1,color)}}function getTextBounds(state,text,textDecoration,isLast,transform){var bounds;if(support.rangeBounds&&!transform)"none"===textDecoration&&0===Util.trimText(text).length||(bounds=textRangeBounds(text,state.node,state.textOffset)),state.textOffset+=text.length;else if(state.node&&"string"==typeof state.node.nodeValue){var newTextNode=isLast?state.node.splitText(text.length):null;bounds=textWrapperBounds(state.node,transform),state.node=newTextNode}return bounds}function textRangeBounds(text,textNode,textOffset){var range=doc.createRange();return range.setStart(textNode,textOffset),range.setEnd(textNode,textOffset+text.length),range.getBoundingClientRect()}function textWrapperBounds(oldTextNode,transform){var parent=oldTextNode.parentNode,wrapElement=doc.createElement("wrapper"),backupText=oldTextNode.cloneNode(!0);wrapElement.appendChild(oldTextNode.cloneNode(!0)),parent.replaceChild(wrapElement,oldTextNode);var bounds=transform?Util.OffsetBounds(wrapElement):Util.Bounds(wrapElement);return parent.replaceChild(backupText,wrapElement),bounds}function renderText(el,textNode,stack){var metrics,textList,ctx=stack.ctx,color=getCSS(el,"color"),textDecoration=getCSS(el,"textDecoration"),textAlign=getCSS(el,"textAlign"),state={node:textNode,textOffset:0};Util.trimText(textNode.nodeValue).length>0&&(textNode.nodeValue=textTransform(textNode.nodeValue,getCSS(el,"textTransform")),textAlign=textAlign.replace(["-webkit-auto"],["auto"]),textList=!options.letterRendering&&/^(left|right|justify|auto)$/.test(textAlign)&&noLetterSpacing(getCSS(el,"letterSpacing"))?textNode.nodeValue.split(/(\b| )/):textNode.nodeValue.split(""),metrics=setTextVariables(ctx,el,textDecoration,color),options.chinese&&textList.forEach(function(word,index){/.*[\u4E00-\u9FA5].*$/.test(word)&&(word=word.split(""),word.unshift(index,1),textList.splice.apply(textList,word))}),textList.forEach(function(text,index){var bounds=getTextBounds(state,text,textDecoration,index<textList.length-1,stack.transform.matrix);bounds&&(drawText(text,bounds.left,bounds.bottom,ctx),renderTextDecoration(ctx,textDecoration,bounds,metrics,color))}))}function listPosition(element,val){var originalType,bounds,boundElement=doc.createElement("boundelement");return boundElement.style.display="inline",originalType=element.style.listStyleType,element.style.listStyleType="none",boundElement.appendChild(doc.createTextNode(val)),element.insertBefore(boundElement,element.firstChild),bounds=Util.Bounds(boundElement),element.removeChild(boundElement),element.style.listStyleType=originalType,bounds}function elementIndex(el){var i=-1,count=1,childs=el.parentNode.childNodes;if(el.parentNode){for(;childs[++i]!==el;)1===childs[i].nodeType&&count++;return count}return-1}function listItemText(element,type){var text,currentIndex=elementIndex(element);switch(type){case"decimal":text=currentIndex;break;case"decimal-leading-zero":text=1===currentIndex.toString().length?currentIndex="0"+currentIndex.toString():currentIndex.toString();break;case"upper-roman":text=_html2canvas.Generate.ListRoman(currentIndex);break;case"lower-roman":text=_html2canvas.Generate.ListRoman(currentIndex).toLowerCase();break;case"lower-alpha":text=_html2canvas.Generate.ListAlpha(currentIndex).toLowerCase();break;case"upper-alpha":text=_html2canvas.Generate.ListAlpha(currentIndex)}return text+". "}function renderListItem(element,stack,elBounds){var x,text,listBounds,ctx=stack.ctx,type=getCSS(element,"listStyleType");if(/^(decimal|decimal-leading-zero|upper-alpha|upper-latin|upper-roman|lower-alpha|lower-greek|lower-latin|lower-roman)$/i.test(type)){if(text=listItemText(element,type),listBounds=listPosition(element,text),setTextVariables(ctx,element,"none",getCSS(element,"color")),"inside"!==getCSS(element,"listStylePosition"))return;ctx.setVariable("textAlign","left"),x=elBounds.left,drawText(text,x,listBounds.bottom,ctx)}}function loadImage(src){var img=images[src];return!(!img||img.succeeded!==!0)&&img.img}function clipBounds(src,dst){var x=Math.max(src.left,dst.left),y=Math.max(src.top,dst.top),x2=Math.min(src.left+src.width,dst.left+dst.width),y2=Math.min(src.top+src.height,dst.top+dst.height);return{left:x,top:y,width:x2-x,height:y2-y}}function setZ(element,stack,parentStack){var newContext,isPositioned="static"!==stack.cssPosition,zIndex=isPositioned?getCSS(element,"zIndex"):"auto",opacity=getCSS(element,"opacity"),isFloated="none"!==getCSS(element,"cssFloat");stack.zIndex=newContext=h2czContext(zIndex),newContext.isPositioned=isPositioned,newContext.isFloated=isFloated,newContext.opacity=opacity,newContext.ownStacking="auto"!==zIndex||opacity<1,parentStack&&parentStack.zIndex.children.push(stack)}function renderImage(ctx,element,image,bounds,borders){var paddingLeft=getCSSInt(element,"paddingLeft"),paddingTop=getCSSInt(element,"paddingTop"),paddingRight=getCSSInt(element,"paddingRight"),paddingBottom=getCSSInt(element,"paddingBottom");drawImage(ctx,image,0,0,image.width,image.height,bounds.left+paddingLeft+borders[3].width,bounds.top+paddingTop+borders[0].width,bounds.width-(borders[1].width+borders[3].width+paddingLeft+paddingRight),bounds.height-(borders[0].width+borders[2].width+paddingTop+paddingBottom))}function getBorderData(element){return["Top","Right","Bottom","Left"].map(function(side){return{width:getCSSInt(element,"border"+side+"Width"),color:getCSS(element,"border"+side+"Color")}})}function getBorderRadiusData(element){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(side){return getCSS(element,"border"+side+"Radius")})}function bezierCurve(start,startControl,endControl,end){var lerp=function(a,b,t){return{x:a.x+(b.x-a.x)*t,y:a.y+(b.y-a.y)*t}};return{start:start,startControl:startControl,endControl:endControl,end:end,subdivide:function(t){var ab=lerp(start,startControl,t),bc=lerp(startControl,endControl,t),cd=lerp(endControl,end,t),abbc=lerp(ab,bc,t),bccd=lerp(bc,cd,t),dest=lerp(abbc,bccd,t);return[bezierCurve(start,ab,abbc,dest),bezierCurve(dest,bccd,cd,end)]},curveTo:function(borderArgs){borderArgs.push(["bezierCurve",startControl.x,startControl.y,endControl.x,endControl.y,end.x,end.y])},curveToReversed:function(borderArgs){borderArgs.push(["bezierCurve",endControl.x,endControl.y,startControl.x,startControl.y,start.x,start.y])}}}function parseCorner(borderArgs,radius1,radius2,corner1,corner2,x,y){radius1[0]>0||radius1[1]>0?(borderArgs.push(["line",corner1[0].start.x,corner1[0].start.y]),corner1[0].curveTo(borderArgs),corner1[1].curveTo(borderArgs)):borderArgs.push(["line",x,y]),(radius2[0]>0||radius2[1]>0)&&borderArgs.push(["line",corner2[0].start.x,corner2[0].start.y])}function drawSide(borderData,radius1,radius2,outer1,inner1,outer2,inner2){var borderArgs=[];return radius1[0]>0||radius1[1]>0?(borderArgs.push(["line",outer1[1].start.x,outer1[1].start.y]),outer1[1].curveTo(borderArgs)):borderArgs.push(["line",borderData.c1[0],borderData.c1[1]]),radius2[0]>0||radius2[1]>0?(borderArgs.push(["line",outer2[0].start.x,outer2[0].start.y]),outer2[0].curveTo(borderArgs),borderArgs.push(["line",inner2[0].end.x,inner2[0].end.y]),inner2[0].curveToReversed(borderArgs)):(borderArgs.push(["line",borderData.c2[0],borderData.c2[1]]),borderArgs.push(["line",borderData.c3[0],borderData.c3[1]])),radius1[0]>0||radius1[1]>0?(borderArgs.push(["line",inner1[1].end.x,inner1[1].end.y]),inner1[1].curveToReversed(borderArgs)):borderArgs.push(["line",borderData.c4[0],borderData.c4[1]]),borderArgs}function calculateCurvePoints(bounds,borderRadius,borders){var x=bounds.left,y=bounds.top,width=bounds.width,height=bounds.height,tlh=borderRadius[0][0],tlv=borderRadius[0][1],trh=borderRadius[1][0],trv=borderRadius[1][1],brh=borderRadius[2][0],brv=borderRadius[2][1],blh=borderRadius[3][0],blv=borderRadius[3][1],topWidth=width-trh,rightHeight=height-brv,bottomWidth=width-brh,leftHeight=height-blv;return{topLeftOuter:getCurvePoints(x,y,tlh,tlv).topLeft.subdivide(.5),topLeftInner:getCurvePoints(x+borders[3].width,y+borders[0].width,Math.max(0,tlh-borders[3].width),Math.max(0,tlv-borders[0].width)).topLeft.subdivide(.5),topRightOuter:getCurvePoints(x+topWidth,y,trh,trv).topRight.subdivide(.5),topRightInner:getCurvePoints(x+Math.min(topWidth,width+borders[3].width),y+borders[0].width,topWidth>width+borders[3].width?0:trh-borders[3].width,trv-borders[0].width).topRight.subdivide(.5),bottomRightOuter:getCurvePoints(x+bottomWidth,y+rightHeight,brh,brv).bottomRight.subdivide(.5),bottomRightInner:getCurvePoints(x+Math.min(bottomWidth,width+borders[3].width),y+Math.min(rightHeight,height+borders[0].width),Math.max(0,brh-borders[1].width),Math.max(0,brv-borders[2].width)).bottomRight.subdivide(.5),bottomLeftOuter:getCurvePoints(x,y+leftHeight,blh,blv).bottomLeft.subdivide(.5),bottomLeftInner:getCurvePoints(x+borders[3].width,y+leftHeight,Math.max(0,blh-borders[3].width),Math.max(0,blv-borders[2].width)).bottomLeft.subdivide(.5)}}function getBorderClip(element,borderPoints,borders,radius,bounds){var backgroundClip=getCSS(element,"backgroundClip"),borderArgs=[];switch(backgroundClip){case"content-box":case"padding-box":parseCorner(borderArgs,radius[0],radius[1],borderPoints.topLeftInner,borderPoints.topRightInner,bounds.left+borders[3].width,bounds.top+borders[0].width),parseCorner(borderArgs,radius[1],radius[2],borderPoints.topRightInner,borderPoints.bottomRightInner,bounds.left+bounds.width-borders[1].width,bounds.top+borders[0].width),parseCorner(borderArgs,radius[2],radius[3],borderPoints.bottomRightInner,borderPoints.bottomLeftInner,bounds.left+bounds.width-borders[1].width,bounds.top+bounds.height-borders[2].width),parseCorner(borderArgs,radius[3],radius[0],borderPoints.bottomLeftInner,borderPoints.topLeftInner,bounds.left+borders[3].width,bounds.top+bounds.height-borders[2].width);break;default:parseCorner(borderArgs,radius[0],radius[1],borderPoints.topLeftOuter,borderPoints.topRightOuter,bounds.left,bounds.top),parseCorner(borderArgs,radius[1],radius[2],borderPoints.topRightOuter,borderPoints.bottomRightOuter,bounds.left+bounds.width,bounds.top),parseCorner(borderArgs,radius[2],radius[3],borderPoints.bottomRightOuter,borderPoints.bottomLeftOuter,bounds.left+bounds.width,bounds.top+bounds.height),parseCorner(borderArgs,radius[3],radius[0],borderPoints.bottomLeftOuter,borderPoints.topLeftOuter,bounds.left,bounds.top+bounds.height)}return borderArgs}function parseBorders(element,bounds,borders){var borderSide,bx,by,bw,bh,borderArgs,x=bounds.left,y=bounds.top,width=bounds.width,height=bounds.height,borderRadius=getBorderRadiusData(element),borderPoints=calculateCurvePoints(bounds,borderRadius,borders),borderData={clip:getBorderClip(element,borderPoints,borders,borderRadius,bounds),borders:[]};for(borderSide=0;borderSide<4;borderSide++)if(borders[borderSide].width>0){switch(bx=x,by=y,bw=width,bh=height-borders[2].width,borderSide){case 0:bh=borders[0].width,borderArgs=drawSide({c1:[bx,by],c2:[bx+bw,by],c3:[bx+bw-borders[1].width,by+bh],c4:[bx+borders[3].width,by+bh]},borderRadius[0],borderRadius[1],borderPoints.topLeftOuter,borderPoints.topLeftInner,borderPoints.topRightOuter,borderPoints.topRightInner);break;case 1:bx=x+width-borders[1].width,bw=borders[1].width,borderArgs=drawSide({c1:[bx+bw,by],c2:[bx+bw,by+bh+borders[2].width],c3:[bx,by+bh],c4:[bx,by+borders[0].width]},borderRadius[1],borderRadius[2],borderPoints.topRightOuter,borderPoints.topRightInner,borderPoints.bottomRightOuter,borderPoints.bottomRightInner);break;case 2:by=by+height-borders[2].width,bh=borders[2].width,borderArgs=drawSide({c1:[bx+bw,by+bh],c2:[bx,by+bh],c3:[bx+borders[3].width,by],c4:[bx+bw-borders[3].width,by]},borderRadius[2],borderRadius[3],borderPoints.bottomRightOuter,borderPoints.bottomRightInner,borderPoints.bottomLeftOuter,borderPoints.bottomLeftInner);break;case 3:bw=borders[3].width,borderArgs=drawSide({c1:[bx,by+bh+borders[2].width],c2:[bx,by],c3:[bx+bw,by+borders[0].width],c4:[bx+bw,by+bh]},borderRadius[3],borderRadius[0],borderPoints.bottomLeftOuter,borderPoints.bottomLeftInner,borderPoints.topLeftOuter,borderPoints.topLeftInner)}borderData.borders.push({args:borderArgs,color:borders[borderSide].color})}return borderData}function createShape(ctx,args){var shape=ctx.drawShape();return args.forEach(function(border,index){shape[0===index?"moveTo":border[0]+"To"].apply(null,border.slice(1))}),shape}function renderBorders(ctx,borderArgs,color){"transparent"!==color&&(ctx.setVariable("fillStyle",color),createShape(ctx,borderArgs),ctx.fill(),numDraws+=1)}function renderFormValue(el,bounds,stack){var textValue,textNode,valueWrap=doc.createElement("valuewrap"),cssPropertyArray=["lineHeight","textAlign","fontFamily","color","fontSize","paddingLeft","paddingTop","width","height","border","borderLeftWidth","borderTopWidth"];cssPropertyArray.forEach(function(property){try{valueWrap.style[property]=getCSS(el,property)}catch(e){Util.log("html2canvas: Parse: Exception caught in renderFormValue: "+e.message)}}),valueWrap.style.borderColor="black",valueWrap.style.borderStyle="solid",valueWrap.style.display="block",valueWrap.style.position="absolute",(/^(submit|reset|button|text|password)$/.test(el.type)||"SELECT"===el.nodeName)&&(valueWrap.style.lineHeight=getCSS(el,"height")),valueWrap.style.top=bounds.top+"px",valueWrap.style.left=bounds.left+"px",textValue="SELECT"===el.nodeName?(el.options[el.selectedIndex]||0).text:el.value,textValue||(textValue=el.placeholder),textNode=doc.createTextNode(textValue),valueWrap.appendChild(textNode),body.appendChild(valueWrap),renderText(el,textNode,stack),body.removeChild(valueWrap)}function drawImage(ctx){ctx.drawImage.apply(ctx,Array.prototype.slice.call(arguments,1)),numDraws+=1}function getPseudoElement(el,which){var elStyle=window.getComputedStyle(el,which);if(elStyle&&elStyle.content&&"none"!==elStyle.content&&"-moz-alt-content"!==elStyle.content&&"none"!==elStyle.display){var content=elStyle.content+"",first=content.substr(0,1);first===content.substr(content.length-1)&&first.match(/'|"/)&&(content=content.substr(1,content.length-2));var isImage="url"===content.substr(0,3),elps=document.createElement(isImage?"img":"span");return elps.className=pseudoHide+"-before "+pseudoHide+"-after",Object.keys(elStyle).filter(indexedProperty).forEach(function(prop){try{elps.style[prop]=elStyle[prop]}catch(e){Util.log(["Tried to assign readonly property ",prop,"Error:",e])}}),isImage?elps.src=Util.parseBackgroundImage(content)[0].args[0]:elps.innerHTML=content,elps}}function indexedProperty(property){return isNaN(window.parseInt(property,10))}function injectPseudoElements(el,stack){var before=getPseudoElement(el,":before"),after=getPseudoElement(el,":after");(before||after)&&(before&&(el.className+=" "+pseudoHide+"-before",el.parentNode.insertBefore(before,el),parseElement(before,stack,!0),el.parentNode.removeChild(before),el.className=el.className.replace(pseudoHide+"-before","").trim()),after&&(el.className+=" "+pseudoHide+"-after",el.appendChild(after),parseElement(after,stack,!0),el.removeChild(after),el.className=el.className.replace(pseudoHide+"-after","").trim()))}function renderBackgroundRepeat(ctx,image,backgroundPosition,bounds){var offsetX=Math.round(bounds.left+backgroundPosition.left),offsetY=Math.round(bounds.top+backgroundPosition.top);ctx.createPattern(image),ctx.translate(offsetX,offsetY),ctx.fill(),ctx.translate(-offsetX,-offsetY)}function backgroundRepeatShape(ctx,image,backgroundPosition,bounds,left,top,width,height){var args=[];args.push(["line",Math.round(left),Math.round(top)]),args.push(["line",Math.round(left+width),Math.round(top)]),args.push(["line",Math.round(left+width),Math.round(height+top)]),args.push(["line",Math.round(left),Math.round(height+top)]),createShape(ctx,args),ctx.save(),ctx.clip(),renderBackgroundRepeat(ctx,image,backgroundPosition,bounds),ctx.restore()}function renderBackgroundColor(ctx,backgroundBounds,bgcolor){renderRect(ctx,backgroundBounds.left,backgroundBounds.top,backgroundBounds.width,backgroundBounds.height,bgcolor)}function renderBackgroundRepeating(el,bounds,ctx,image,imageIndex){var backgroundSize=Util.BackgroundSize(el,bounds,image,imageIndex),backgroundPosition=Util.BackgroundPosition(el,bounds,image,imageIndex,backgroundSize),backgroundRepeat=getCSS(el,"backgroundRepeat").split(",").map(Util.trimText);switch(image=resizeImage(image,backgroundSize),backgroundRepeat=backgroundRepeat[imageIndex]||backgroundRepeat[0]){case"repeat-x":backgroundRepeatShape(ctx,image,backgroundPosition,bounds,bounds.left,bounds.top+backgroundPosition.top,99999,image.height);break;case"repeat-y":backgroundRepeatShape(ctx,image,backgroundPosition,bounds,bounds.left+backgroundPosition.left,bounds.top,image.width,99999);break;case"no-repeat":backgroundRepeatShape(ctx,image,backgroundPosition,bounds,bounds.left+backgroundPosition.left,bounds.top+backgroundPosition.top,image.width,image.height);break;default:renderBackgroundRepeat(ctx,image,backgroundPosition,{top:bounds.top,left:bounds.left,width:image.width,height:image.height})}}function renderBackgroundImage(element,bounds,ctx){for(var image,backgroundImage=getCSS(element,"backgroundImage"),backgroundImages=Util.parseBackgroundImage(backgroundImage),imageIndex=backgroundImages.length;imageIndex--;)if(backgroundImage=backgroundImages[imageIndex],backgroundImage.args&&0!==backgroundImage.args.length){var key="url"===backgroundImage.method?backgroundImage.args[0]:backgroundImage.value;image=loadImage(key),image?renderBackgroundRepeating(element,bounds,ctx,image,imageIndex):Util.log("html2canvas: Error loading background:",backgroundImage)}}function resizeImage(image,bounds){if(image.width===bounds.width&&image.height===bounds.height)return image;var ctx,canvas=doc.createElement("canvas");return canvas.width=bounds.width,canvas.height=bounds.height,ctx=canvas.getContext("2d"),drawImage(ctx,image,0,0,image.width,image.height,0,0,bounds.width,bounds.height),canvas}function setOpacity(ctx,element,parentStack){return ctx.setVariable("globalAlpha",getCSS(element,"opacity")*(parentStack?parentStack.opacity:1))}function removePx(str){return str.replace("px","")}function getTransform(element,parentStack){var transform=getCSS(element,"transform")||getCSS(element,"-webkit-transform")||getCSS(element,"-moz-transform")||getCSS(element,"-ms-transform")||getCSS(element,"-o-transform"),transformOrigin=getCSS(element,"transform-origin")||getCSS(element,"-webkit-transform-origin")||getCSS(element,"-moz-transform-origin")||getCSS(element,"-ms-transform-origin")||getCSS(element,"-o-transform-origin")||"0px 0px";transformOrigin=transformOrigin.split(" ").map(removePx).map(Util.asFloat);var matrix;if(transform&&"none"!==transform){var match=transform.match(transformRegExp);if(match)switch(match[1]){case"matrix":matrix=match[2].split(",").map(Util.trimText).map(Util.asFloat)}}return{origin:transformOrigin,matrix:matrix}}function createStack(element,parentStack,bounds,transform){var ctx=h2cRenderContext(parentStack?bounds.width:documentWidth(),parentStack?bounds.height:documentHeight()),stack={ctx:ctx,opacity:setOpacity(ctx,element,parentStack),cssPosition:getCSS(element,"position"),borders:getBorderData(element),transform:transform,clip:parentStack&&parentStack.clip?Util.Extend({},parentStack.clip):null};return setZ(element,stack,parentStack),options.useOverflow===!0&&/(hidden|scroll|auto)/.test(getCSS(element,"overflow"))===!0&&/(BODY)/i.test(element.nodeName)===!1&&(stack.clip=stack.clip?clipBounds(stack.clip,bounds):bounds),stack}function getBackgroundBounds(borders,bounds,clip){var backgroundBounds={left:bounds.left+borders[3].width,top:bounds.top+borders[0].width,width:bounds.width-(borders[1].width+borders[3].width),height:bounds.height-(borders[0].width+borders[2].width)};return clip&&(backgroundBounds=clipBounds(backgroundBounds,clip)),backgroundBounds}function getBounds(element,transform){var bounds=transform.matrix?Util.OffsetBounds(element):Util.Bounds(element);return transform.origin[0]+=bounds.left,
transform.origin[1]+=bounds.top,bounds}function renderElement(element,parentStack,pseudoElement,ignoreBackground){var image,transform=getTransform(element,parentStack),bounds=getBounds(element,transform),stack=createStack(element,parentStack,bounds,transform),borders=stack.borders,ctx=stack.ctx,backgroundBounds=getBackgroundBounds(borders,bounds,stack.clip),borderData=parseBorders(element,bounds,borders),backgroundColor=ignoreElementsRegExp.test(element.nodeName)?"#efefef":getCSS(element,"backgroundColor");switch(createShape(ctx,borderData.clip),ctx.save(),ctx.clip(),backgroundBounds.height>0&&backgroundBounds.width>0&&!ignoreBackground?(renderBackgroundColor(ctx,bounds,backgroundColor),renderBackgroundImage(element,backgroundBounds,ctx)):ignoreBackground&&(stack.backgroundColor=backgroundColor),ctx.restore(),borderData.borders.forEach(function(border){renderBorders(ctx,border.args,border.color)}),pseudoElement||injectPseudoElements(element,stack),element.nodeName){case"IMG":(image=loadImage(element.getAttribute("src")))?renderImage(ctx,element,image,bounds,borders):Util.log("html2canvas: Error loading <img>:"+element.getAttribute("src"));break;case"INPUT":/^(text|url|email|submit|button|reset)$/.test(element.type)&&(element.value||element.placeholder||"").length>0&&renderFormValue(element,bounds,stack);break;case"TEXTAREA":(element.value||element.placeholder||"").length>0&&renderFormValue(element,bounds,stack);break;case"SELECT":(element.options||element.placeholder||"").length>0&&renderFormValue(element,bounds,stack);break;case"LI":renderListItem(element,stack,backgroundBounds);break;case"CANVAS":renderImage(ctx,element,element,bounds,borders)}return stack}function isElementVisible(element){return"none"!==getCSS(element,"display")&&"hidden"!==getCSS(element,"visibility")&&!element.hasAttribute("data-html2canvas-ignore")}function parseElement(element,stack,pseudoElement){isElementVisible(element)&&(stack=renderElement(element,stack,pseudoElement,!1)||stack,ignoreElementsRegExp.test(element.nodeName)||parseChildren(element,stack,pseudoElement))}function parseChildren(element,stack,pseudoElement){Util.Children(element).forEach(function(node){node.nodeType===node.ELEMENT_NODE?parseElement(node,stack,pseudoElement):node.nodeType===node.TEXT_NODE&&renderText(element,node,stack)})}function init(){var background=getCSS(document.documentElement,"backgroundColor"),transparentBackground=Util.isTransparent(background)&&element===document.body,stack=renderElement(element,null,!1,transparentBackground);return parseChildren(element,stack),transparentBackground&&(background=stack.backgroundColor),body.removeChild(hidePseudoElements),{backgroundColor:background,stack:stack}}window.scroll(0,0);var element=options.elements===undefined?document.body:options.elements[0],numDraws=0,doc=element.ownerDocument,Util=_html2canvas.Util,support=Util.Support(options,doc),ignoreElementsRegExp=new RegExp("("+options.ignoreElements+")"),body=doc.body,getCSS=Util.getCSS,pseudoHide="___html2canvas___pseudoelement",hidePseudoElements=doc.createElement("style");hidePseudoElements.innerHTML="."+pseudoHide+'-before:before { content: "" !important; display: none !important; }.'+pseudoHide+'-after:after { content: "" !important; display: none !important; }',body.appendChild(hidePseudoElements),images=images||{};var getCurvePoints=function(kappa){return function(x,y,r1,r2){var ox=r1*kappa,oy=r2*kappa,xm=x+r1,ym=y+r2;return{topLeft:bezierCurve({x:x,y:ym},{x:x,y:ym-oy},{x:xm-ox,y:y},{x:xm,y:y}),topRight:bezierCurve({x:x,y:y},{x:x+ox,y:y},{x:xm,y:ym-oy},{x:xm,y:ym}),bottomRight:bezierCurve({x:xm,y:y},{x:xm,y:y+oy},{x:x+ox,y:ym},{x:x,y:ym}),bottomLeft:bezierCurve({x:xm,y:ym},{x:xm-ox,y:ym},{x:x,y:y+oy},{x:x,y:y})}}}(4*((Math.sqrt(2)-1)/3)),transformRegExp=/(matrix)\((.+)\)/;return init()},_html2canvas.Preload=function(options){function isSameOrigin(url){link.href=url,link.href=link.href;var origin=link.protocol+link.host;return origin===pageOrigin}function start(){Util.log("html2canvas: start: images: "+images.numLoaded+" / "+images.numTotal+" (failed: "+images.numFailed+")"),!images.firstRun&&images.numLoaded>=images.numTotal&&(Util.log("Finished loading images: # "+images.numTotal+" (failed: "+images.numFailed+")"),"function"==typeof options.complete&&options.complete(images))}function proxyGetImage(url,img,imageObj){var callback_name,script,scriptUrl=options.proxy;link.href=url,url=link.href,callback_name="html2canvas_"+count++,imageObj.callbackname=callback_name,scriptUrl+=scriptUrl.indexOf("?")>-1?"&":"?",scriptUrl+="url="+encodeURIComponent(url)+"&callback="+callback_name,script=doc.createElement("script"),window[callback_name]=function(a){"error:"===a.substring(0,6)?(imageObj.succeeded=!1,images.numLoaded++,images.numFailed++,start()):(setImageLoadHandlers(img,imageObj),img.src=a),window[callback_name]=undefined;try{delete window[callback_name]}catch(ex){}script.parentNode.removeChild(script),script=null,delete imageObj.script,delete imageObj.callbackname},script.setAttribute("type","text/javascript"),script.setAttribute("src",scriptUrl),imageObj.script=script,window.document.body.appendChild(script)}function loadPseudoElement(element,type){var style=window.getComputedStyle(element,type),content=style.content;"url"===content.substr(0,3)&&methods.loadImage(_html2canvas.Util.parseBackgroundImage(content)[0].args[0]),loadBackgroundImages(style.backgroundImage,element)}function loadPseudoElementImages(element){loadPseudoElement(element,":before"),loadPseudoElement(element,":after")}function loadGradientImage(backgroundImage,bounds){var img=_html2canvas.Generate.Gradient(backgroundImage,bounds);img!==undefined&&(images[backgroundImage]={img:img,succeeded:!0},images.numTotal++,images.numLoaded++,start())}function invalidBackgrounds(background_image){return background_image&&background_image.method&&background_image.args&&background_image.args.length>0}function loadBackgroundImages(background_image,el){var bounds;_html2canvas.Util.parseBackgroundImage(background_image).filter(invalidBackgrounds).forEach(function(background_image){"url"===background_image.method?methods.loadImage(background_image.args[0]):background_image.method.match(/\-?gradient$/)&&(bounds===undefined&&(bounds=_html2canvas.Util.Bounds(el)),loadGradientImage(background_image.value,bounds))})}function getImages(el){var elNodeType=!1;try{Util.Children(el).forEach(getImages)}catch(e){}try{elNodeType=el.nodeType}catch(ex){elNodeType=!1,Util.log("html2canvas: failed to access some element's nodeType - Exception: "+ex.message)}if(1===elNodeType||elNodeType===undefined){loadPseudoElementImages(el);try{loadBackgroundImages(Util.getCSS(el,"backgroundImage"),el)}catch(e){Util.log("html2canvas: failed to get background-image - Exception: "+e.message)}loadBackgroundImages(el)}}function setImageLoadHandlers(img,imageObj){img.onload=function(){imageObj.timer!==undefined&&window.clearTimeout(imageObj.timer),images.numLoaded++,imageObj.succeeded=!0,img.onerror=img.onload=null,start()},img.onerror=function(){if("anonymous"===img.crossOrigin&&(window.clearTimeout(imageObj.timer),options.proxy)){var src=img.src;return img=new Image,imageObj.img=img,img.src=src,void proxyGetImage(img.src,img,imageObj)}images.numLoaded++,images.numFailed++,imageObj.succeeded=!1,img.onerror=img.onload=null,start()}}var pageOrigin,methods,i,timeoutTimer,images={numLoaded:0,numFailed:0,numTotal:0,cleanupDone:!1},Util=_html2canvas.Util,count=0,element=options.elements[0]||document.body,doc=element.ownerDocument,domImages=element.getElementsByTagName("img"),imgLen=domImages.length,link=doc.createElement("a"),supportCORS=function(img){return img.crossOrigin!==undefined}(new Image);for(link.href=window.location.href,pageOrigin=link.protocol+link.host,methods={loadImage:function(src){var img,imageObj;src&&images[src]===undefined&&(img=new Image,src.match(/data:image\/.*;base64,/i)?(img.src=src.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),imageObj=images[src]={img:img},images.numTotal++,setImageLoadHandlers(img,imageObj)):isSameOrigin(src)||options.allowTaint===!0?(imageObj=images[src]={img:img},images.numTotal++,setImageLoadHandlers(img,imageObj),img.src=src):supportCORS&&!options.allowTaint&&options.useCORS?(img.crossOrigin="anonymous",imageObj=images[src]={img:img},images.numTotal++,setImageLoadHandlers(img,imageObj),img.src=src):options.proxy&&(imageObj=images[src]={img:img},images.numTotal++,proxyGetImage(src,img,imageObj)))},cleanupDOM:function(cause){var img,src;if(!images.cleanupDone){cause&&"string"==typeof cause?Util.log("html2canvas: Cleanup because: "+cause):Util.log("html2canvas: Cleanup after timeout: "+options.timeout+" ms.");for(src in images)if(images.hasOwnProperty(src)&&(img=images[src],"object"==typeof img&&img.callbackname&&img.succeeded===undefined)){window[img.callbackname]=undefined;try{delete window[img.callbackname]}catch(ex){}img.script&&img.script.parentNode&&(img.script.setAttribute("src","about:blank"),img.script.parentNode.removeChild(img.script)),images.numLoaded++,images.numFailed++,Util.log("html2canvas: Cleaned up failed img: '"+src+"' Steps: "+images.numLoaded+" / "+images.numTotal)}window.stop!==undefined?window.stop():document.execCommand!==undefined&&document.execCommand("Stop",!1),document.close!==undefined&&document.close(),images.cleanupDone=!0,cause&&"string"==typeof cause||start()}},renderingDone:function(){timeoutTimer&&window.clearTimeout(timeoutTimer)}},options.timeout>0&&(timeoutTimer=window.setTimeout(methods.cleanupDOM,options.timeout)),Util.log("html2canvas: Preload starts: finding background-images"),images.firstRun=!0,getImages(element),Util.log("html2canvas: Preload: Finding images"),i=0;i<imgLen;i+=1)methods.loadImage(domImages[i].getAttribute("src"));return images.firstRun=!1,Util.log("html2canvas: Preload: Done."),images.numTotal===images.numLoaded&&start(),methods},_html2canvas.Renderer=function(parseQueue,options){function createRenderQueue(parseQueue){function sortZ(context){Object.keys(context).sort().forEach(function(zi){var nonPositioned=[],floated=[],positioned=[],list=[];context[zi].forEach(function(v){v.node.zIndex.isPositioned||v.node.zIndex.opacity<1?positioned.push(v):v.node.zIndex.isFloated?floated.push(v):nonPositioned.push(v)}),function walk(arr){arr.forEach(function(v){list.push(v),v.children&&walk(v.children)})}(nonPositioned.concat(floated,positioned)),list.forEach(function(v){v.context?sortZ(v.context):queue.push(v.node)})})}var rootContext,queue=[];return rootContext=function(rootNode){function insert(context,node,specialParent){var zi="auto"===node.zIndex.zindex?0:Number(node.zIndex.zindex),contextForChildren=context,isPositioned=node.zIndex.isPositioned,isFloated=node.zIndex.isFloated,stub={node:node},childrenDest=specialParent;node.zIndex.ownStacking?(contextForChildren=stub.context={"!":[{node:node,children:[]}]},childrenDest=undefined):(isPositioned||isFloated)&&(childrenDest=stub.children=[]),0===zi&&specialParent?specialParent.push(stub):(context[zi]||(context[zi]=[]),context[zi].push(stub)),node.zIndex.children.forEach(function(childNode){insert(contextForChildren,childNode,childrenDest)})}var rootContext={};return insert(rootContext,rootNode),rootContext}(parseQueue),sortZ(rootContext),queue}function getRenderer(rendererName){var renderer;if("string"==typeof options.renderer&&_html2canvas.Renderer[rendererName]!==undefined)renderer=_html2canvas.Renderer[rendererName](options);else{if("function"!=typeof rendererName)throw new Error("Unknown renderer");renderer=rendererName(options)}if("function"!=typeof renderer)throw new Error("Invalid renderer defined");return renderer}return getRenderer(options.renderer)(parseQueue,options,document,createRenderQueue(parseQueue.stack),_html2canvas)},_html2canvas.Util.Support=function(options,doc){function supportSVGRendering(){var img=new Image,canvas=doc.createElement("canvas"),ctx=canvas.getContext!==undefined&&canvas.getContext("2d");if(ctx===!1)return!1;canvas.width=canvas.height=10,img.src=["data:image/svg+xml,","<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'>","<foreignObject width='10' height='10'>","<div xmlns='http://www.w3.org/1999/xhtml' style='width:10;height:10;'>","sup","</div>","</foreignObject>","</svg>"].join("");try{ctx.drawImage(img,0,0),canvas.toDataURL()}catch(e){return!1}return _html2canvas.Util.log("html2canvas: Parse: SVG powered rendering available"),!0}function supportRangeBounds(){var r,testElement,rangeBounds,rangeHeight,support=!1;return doc.createRange&&(r=doc.createRange(),r.getBoundingClientRect&&(testElement=doc.createElement("boundtest"),testElement.style.height="123px",testElement.style.display="block",doc.body.appendChild(testElement),r.selectNode(testElement),rangeBounds=r.getBoundingClientRect(),rangeHeight=rangeBounds.height,123===rangeHeight&&(support=!0),doc.body.removeChild(testElement))),support}return{rangeBounds:supportRangeBounds(),svgRendering:options.svgRendering&&supportSVGRendering()}},window.html2canvas=function(elements,opts){elements=elements.length?elements:[elements];var queue,canvas,options={logging:!1,elements:elements,background:"#fff",proxy:null,timeout:0,useCORS:!1,allowTaint:!1,svgRendering:!1,ignoreElements:"IFRAME|OBJECT|PARAM",useOverflow:!0,letterRendering:!1,chinese:!1,width:null,height:null,taintTest:!0,renderer:"Canvas"};return options=_html2canvas.Util.Extend(opts,options),_html2canvas.logging=options.logging,options.complete=function(images){"function"==typeof options.onpreloaded&&options.onpreloaded(images)===!1||(queue=_html2canvas.Parse(images,options),"function"==typeof options.onparsed&&options.onparsed(queue)===!1||(canvas=_html2canvas.Renderer(queue,options),"function"==typeof options.onrendered&&options.onrendered(canvas)))},window.setTimeout(function(){_html2canvas.Preload(options)},0),{render:function(queue,opts){return _html2canvas.Renderer(queue,_html2canvas.Util.Extend(opts,options))},parse:function(images,opts){return _html2canvas.Parse(images,_html2canvas.Util.Extend(opts,options))},preload:function(opts){return _html2canvas.Preload(_html2canvas.Util.Extend(opts,options))},log:_html2canvas.Util.log}},window.html2canvas.log=_html2canvas.Util.log,window.html2canvas.Renderer={Canvas:undefined},_html2canvas.Renderer.Canvas=function(options){function createShape(ctx,args){ctx.beginPath(),args.forEach(function(arg){ctx[arg.name].apply(ctx,arg.arguments)}),ctx.closePath()}function safeImage(item){if(safeImages.indexOf(item.arguments[0].src)===-1){testctx.drawImage(item.arguments[0],0,0);try{testctx.getImageData(0,0,1,1)}catch(e){return testCanvas=doc.createElement("canvas"),testctx=testCanvas.getContext("2d"),!1}safeImages.push(item.arguments[0].src)}return!0}function renderItem(ctx,item){switch(item.type){case"variable":ctx[item.name]=item.arguments;break;case"function":switch(item.name){case"createPattern":if(item.arguments[0].width>0&&item.arguments[0].height>0)try{ctx.fillStyle=ctx.createPattern(item.arguments[0],"repeat")}catch(e){Util.log("html2canvas: Renderer: Error creating pattern",e.message)}break;case"drawShape":createShape(ctx,item.arguments);break;case"drawImage":item.arguments[8]>0&&item.arguments[7]>0&&(!options.taintTest||options.taintTest&&safeImage(item))&&ctx.drawImage.apply(ctx,item.arguments);break;default:ctx[item.name].apply(ctx,item.arguments)}}}options=options||{};var doc=document,safeImages=[],testCanvas=document.createElement("canvas"),testctx=testCanvas.getContext("2d"),Util=_html2canvas.Util,canvas=options.canvas||doc.createElement("canvas");return function(parsedData,options,document,queue,_html2canvas){var newCanvas,bounds,fstyle,ctx=canvas.getContext("2d"),zStack=parsedData.stack;return canvas.width=canvas.style.width=options.width||zStack.ctx.width,canvas.height=canvas.style.height=options.height||zStack.ctx.height,fstyle=ctx.fillStyle,ctx.fillStyle=Util.isTransparent(zStack.backgroundColor)&&options.background!==undefined?options.background:parsedData.backgroundColor,ctx.fillRect(0,0,canvas.width,canvas.height),ctx.fillStyle=fstyle,queue.forEach(function(storageContext){ctx.textBaseline="bottom",ctx.save(),storageContext.transform.matrix&&(ctx.translate(storageContext.transform.origin[0],storageContext.transform.origin[1]),ctx.transform.apply(ctx,storageContext.transform.matrix),ctx.translate(-storageContext.transform.origin[0],-storageContext.transform.origin[1])),storageContext.clip&&(ctx.beginPath(),ctx.rect(storageContext.clip.left,storageContext.clip.top,storageContext.clip.width,storageContext.clip.height),ctx.clip()),storageContext.ctx.storage&&storageContext.ctx.storage.forEach(function(item){renderItem(ctx,item)}),ctx.restore()}),Util.log("html2canvas: Renderer: Canvas renderer done - returning canvas obj"),1===options.elements.length&&"object"==typeof options.elements[0]&&"BODY"!==options.elements[0].nodeName?(bounds=_html2canvas.Util.Bounds(options.elements[0]),newCanvas=document.createElement("canvas"),newCanvas.width=Math.ceil(bounds.width),newCanvas.height=Math.ceil(bounds.height),ctx=newCanvas.getContext("2d"),ctx.drawImage(canvas,bounds.left,bounds.top,bounds.width,bounds.height,0,0,bounds.width,bounds.height),canvas=null,newCanvas):canvas}}}(window,document),!function(t,e){e["true"]=t;var n=function(t){function e(e){var n={};this.subscribe=function(t,e,r){if("function"!=typeof e)return!1;n.hasOwnProperty(t)||(n[t]={});var s=Math.random().toString(35);return n[t][s]=[e,!!r],s},this.unsubscribe=function(t){for(var e in n)if(n[e][t])return delete n[e][t],!0;return!1},this.publish=function(r){if(n.hasOwnProperty(r)){var s=Array.prototype.slice.call(arguments,1),i=[];for(var o in n[r]){var a=n[r][o];try{a[0].apply(e,s)}catch(u){t.console&&console.error("jsPDF PubSub Error",u.message,u)}a[1]&&i.push(o)}i.length&&i.forEach(this.unsubscribe)}}}function n(a,u,c,l){var f={};"object"==typeof a&&(f=a,a=f.orientation,u=f.unit||u,c=f.format||c,l=f.compress||f.compressPdf||l),u=u||"mm",c=c||"a4",a=(""+(a||"P")).toLowerCase();var d,h,p,m,w,g,y,v,b,q=((""+c).toLowerCase(),!!l&&"function"==typeof Uint8Array),x=f.textColor||"0 g",k=f.drawColor||"0 G",_=f.fontSize||16,A=f.lineHeight||1.15,C=f.lineWidth||.200025,S=2,E=!1,z=[],T={},I={},B=0,O=[],P={},R=[],F=0,D=0,U=0,N={title:"",subject:"",author:"",keywords:"",creator:""},L={},j=new e(L),M=function(t){return t.toFixed(2)},H=function(t){return t.toFixed(3)},G=function(t){return("0"+parseInt(t)).slice(-2)},W=function(t){E?O[m].push(t):(U+=t.length+1,R.push(t))},V=function(){return S++,z[S]=U,W(S+" 0 obj"),S},J=function(t){W("stream"),W(t),W("endstream")},X=function(){var e,r,i,o,a,u,c,l,f;for(c=t.adler32cs||n.adler32cs,q&&"undefined"==typeof c&&(q=!1),e=1;B>=e;e++){if(V(),l=(w=P[e].width)*h,f=(g=P[e].height)*h,W("<</Type /Page"),W("/Parent 1 0 R"),W("/Resources 2 0 R"),W("/MediaBox [0 0 "+M(l)+" "+M(f)+"]"),W("/Contents "+(S+1)+" 0 R>>"),W("endobj"),r=O[e].join("\n"),V(),q){for(i=[],o=r.length;o--;)i[o]=r.charCodeAt(o);u=c.from(r),a=new s(6),a.append(new Uint8Array(i)),r=a.flush(),i=new Uint8Array(r.length+6),i.set(new Uint8Array([120,156])),i.set(r,2),i.set(new Uint8Array([255&u,u>>8&255,u>>16&255,u>>24&255]),r.length+2),r=String.fromCharCode.apply(null,i),W("<</Length "+r.length+" /Filter [/FlateDecode]>>")}else W("<</Length "+r.length+">>");J(r),W("endobj")}z[1]=U,W("1 0 obj"),W("<</Type /Pages");var d="/Kids [";for(o=0;B>o;o++)d+=3+2*o+" 0 R ";W(d+"]"),W("/Count "+B),W(">>"),W("endobj")},Y=function(t){t.objectNumber=V(),W("<</BaseFont/"+t.PostScriptName+"/Type/Font"),"string"==typeof t.encoding&&W("/Encoding/"+t.encoding),W("/Subtype/Type1>>"),W("endobj")},K=function(){for(var t in T)T.hasOwnProperty(t)&&Y(T[t])},Q=function(){j.publish("putXobjectDict")},$=function(){W("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),W("/Font <<");for(var t in T)T.hasOwnProperty(t)&&W("/"+t+" "+T[t].objectNumber+" 0 R");W(">>"),W("/XObject <<"),Q(),W(">>")},Z=function(){K(),j.publish("putResources"),z[2]=U,W("2 0 obj"),W("<<"),$(),W(">>"),W("endobj"),j.publish("postPutResources")},te=function(t,e,n){I.hasOwnProperty(e)||(I[e]={}),I[e][n]=t},ee=function(t,e,n,r){var s="F"+(Object.keys(T).length+1).toString(10),i=T[s]={id:s,PostScriptName:t,fontName:e,fontStyle:n,encoding:r,metadata:{}};return te(s,e,n),j.publish("addFont",i),s},ne=function(){for(var t="helvetica",e="times",n="courier",r="normal",s="bold",i="italic",o="bolditalic",a="StandardEncoding",u=[["Helvetica",t,r],["Helvetica-Bold",t,s],["Helvetica-Oblique",t,i],["Helvetica-BoldOblique",t,o],["Courier",n,r],["Courier-Bold",n,s],["Courier-Oblique",n,i],["Courier-BoldOblique",n,o],["Times-Roman",e,r],["Times-Bold",e,s],["Times-Italic",e,i],["Times-BoldItalic",e,o]],c=0,l=u.length;l>c;c++){var f=ee(u[c][0],u[c][1],u[c][2],a),d=u[c][0].split("-");te(f,d[0],d[1]||"")}j.publish("addFonts",{fonts:T,dictionary:I})},re=function(e){return e.foo=function(){try{return e.apply(this,arguments)}catch(n){var r=n.stack||"";~r.indexOf(" at ")&&(r=r.split(" at ")[1]);var s="Error in function "+r.split("\n")[0].split("<")[0]+": "+n.message;if(!t.console)throw new Error(s);t.console.error(s,n),t.alert&&alert(s)}},e.foo.bar=e,e.foo},se=function(t,e){var n,r,s,i,o,a,u,c,l;if(e=e||{},s=e.sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&T[d].metadata&&T[d].metadata[s]&&T[d].metadata[s].encoding&&(i=T[d].metadata[s].encoding,!o&&T[d].encoding&&(o=T[d].encoding),!o&&i.codePages&&(o=i.codePages[0]),"string"==typeof o&&(o=i[o]),o)){for(u=!1,a=[],n=0,r=t.length;r>n;n++)c=o[t.charCodeAt(n)],a.push(c?String.fromCharCode(c):t[n]),a[n].charCodeAt(0)>>8&&(u=!0);t=a.join("")}for(n=t.length;void 0===u&&0!==n;)t.charCodeAt(n-1)>>8&&(u=!0),n--;if(!u)return t;for(a=e.noBOM?[]:[254,255],n=0,r=t.length;r>n;n++){if(c=t.charCodeAt(n),l=c>>8,l>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(l),a.push(c-(l<<8))}return String.fromCharCode.apply(void 0,a)},ie=function(t,e){return se(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},oe=function(){W("/Producer (jsPDF "+n.version+")");for(var t in N)N.hasOwnProperty(t)&&N[t]&&W("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+ie(N[t])+")");var e=new Date,r=e.getTimezoneOffset(),s=0>r?"+":"-",i=Math.floor(Math.abs(r/60)),o=Math.abs(r%60),a=[s,G(i),"'",G(o),"'"].join("");W(["/CreationDate (D:",e.getFullYear(),G(e.getMonth()+1),G(e.getDate()),G(e.getHours()),G(e.getMinutes()),G(e.getSeconds()),a,")"].join(""))},ae=function(){switch(W("/Type /Catalog"),W("/Pages 1 0 R"),v||(v="fullwidth"),v){case"fullwidth":W("/OpenAction [3 0 R /FitH null]");break;case"fullheight":W("/OpenAction [3 0 R /FitV null]");break;case"fullpage":W("/OpenAction [3 0 R /Fit]");break;case"original":W("/OpenAction [3 0 R /XYZ null null 1]");break;default:var t=""+v;"%"===t.substr(t.length-1)&&(v=parseInt(v)/100),"number"==typeof v&&W("/OpenAction [3 0 R /XYZ null null "+M(v)+"]")}switch(b||(b="continuous"),b){case"continuous":W("/PageLayout /OneColumn");break;case"single":W("/PageLayout /SinglePage");break;case"two":case"twoleft":W("/PageLayout /TwoColumnLeft");break;case"tworight":W("/PageLayout /TwoColumnRight")}y&&W("/PageMode /"+y),j.publish("putCatalog")},ue=function(){W("/Size "+(S+1)),W("/Root "+S+" 0 R"),W("/Info "+(S-1)+" 0 R")},ce=function(t,e){var n="string"==typeof e&&e.toLowerCase();if("string"==typeof t){var r=t.toLowerCase();o.hasOwnProperty(r)&&(t=o[r][0]/h,e=o[r][1]/h)}if(Array.isArray(t)&&(e=t[1],t=t[0]),n){switch(n.substr(0,1)){case"l":e>t&&(n="s");break;case"p":t>e&&(n="s")}"s"===n&&(p=t,t=e,e=p)}E=!0,O[++B]=[],P[B]={width:Number(t)||w,height:Number(e)||g},fe(B)},le=function(){ce.apply(this,arguments),W(M(C*h)+" w"),W(k),0!==F&&W(F+" J"),0!==D&&W(D+" j"),j.publish("addPage",{pageNumber:B})},fe=function(t){t>0&&B>=t&&(m=t,w=P[t].width,g=P[t].height)},de=function(t,e){var n;t=void 0!==t?t:T[d].fontName,e=void 0!==e?e:T[d].fontStyle;try{n=I[t][e]}catch(r){}if(!n)throw new Error("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts.");return n},he=function(){E=!1,S=2,R=[],z=[],W("%PDF-"+i),X(),Z(),V(),W("<<"),oe(),W(">>"),W("endobj"),V(),W("<<"),ae(),W(">>"),W("endobj");var t,e=U,n="0000000000";for(W("xref"),W("0 "+(S+1)),W(n+" 65535 f "),t=1;S>=t;t++)W((n+z[t]).slice(-10)+" 00000 n ");return W("trailer"),W("<<"),ue(),W(">>"),W("startxref"),W(e),W("%%EOF"),E=!0,R.join("\n")},pe=function(t){var e="S";return"F"===t?e="f":"FD"===t||"DF"===t?e="B":("f"===t||"f*"===t||"B"===t||"B*"===t)&&(e=t),e},me=function(){for(var t=he(),e=t.length,n=new ArrayBuffer(e),r=new Uint8Array(n);e--;)r[e]=t.charCodeAt(e);return n},we=function(){return new Blob([me()],{type:"application/pdf"})},ge=re(function(e,n){var s="dataur"===(""+e).substr(0,6)?"data:application/pdf;base64,"+btoa(he()):0;switch(e){case void 0:return he();case"save":if(navigator.getUserMedia&&(void 0===t.URL||void 0===t.URL.createObjectURL))return L.output("dataurlnewwindow");r(we(),n),"function"==typeof r.unload&&t.setTimeout&&setTimeout(r.unload,911);break;case"arraybuffer":return me();case"blob":return we();case"bloburi":case"bloburl":return t.URL&&t.URL.createObjectURL(we())||void 0;case"datauristring":case"dataurlstring":return s;case"dataurlnewwindow":var i=t.open(s);if(i||"undefined"==typeof safari)return i;case"datauri":case"dataurl":return t.document.location.href=s;default:throw new Error('Output type "'+e+'" is not supported.')}});switch(u){case"pt":h=1;break;case"mm":h=72/25.4;break;case"cm":h=72/2.54;break;case"in":h=72;break;case"px":h=96/72;break;case"pc":h=12;break;case"em":h=12;break;case"ex":h=6;break;default:throw"Invalid unit: "+u}L.internal={pdfEscape:ie,getStyle:pe,getFont:function(){return T[de.apply(L,arguments)]},getFontSize:function(){return _},getLineHeight:function(){return _*A},write:function(t){W(1===arguments.length?t:Array.prototype.join.call(arguments," "))},getCoordinateString:function(t){return M(t*h)},getVerticalCoordinateString:function(t){return M((g-t)*h)},collections:{},newObject:V,putStream:J,events:j,scaleFactor:h,pageSize:{get width(){return w},get height(){return g}},output:function(t,e){return ge(t,e)},getNumberOfPages:function(){return O.length-1},pages:O},L.addPage=function(){return le.apply(this,arguments),this},L.setPage=function(){return fe.apply(this,arguments),this},L.setDisplayMode=function(t,e,n){return v=t,b=e,y=n,this},L.text=function(t,e,n,r,s){function i(t){return t=t.split("\t").join(Array(f.TabLen||9).join(" ")),ie(t,r)}"number"==typeof t&&(p=n,n=e,e=t,t=p),"string"==typeof t&&t.match(/[\n\r]/)&&(t=t.split(/\r\n|\r|\n/g)),"number"==typeof r&&(s=r,r=null);var o,a="",u="Td";if(s){s*=Math.PI/180;var c=Math.cos(s),l=Math.sin(s);a=[M(c),M(l),M(-1*l),M(c),""].join(" "),u="Tm"}if(r=r||{},"noBOM"in r||(r.noBOM=!0),"autoencode"in r||(r.autoencode=!0),"string"==typeof t)t=i(t);else{if(!(t instanceof Array))throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');for(var m=t.concat(),w=[],y=m.length;y--;)w.push(i(m.shift()));var v=Math.ceil((g-n)*h/(_*A));v>=0&&v<w.length+1&&(o=w.splice(v-1)),t=w.join(") Tj\nT* (")}return W("BT\n/"+d+" "+_+" Tf\n"+_*A+" TL\n"+x+"\n"+a+M(e*h)+" "+M((g-n)*h)+" "+u+"\n("+t+") Tj\nET"),o&&(this.addPage(),this.text(o,e,1.7*_/h)),this},L.lstext=function(t,e,n,r){for(var s=0,i=t.length;i>s;s++,e+=r)this.text(t[s],e,n)},L.line=function(t,e,n,r){return this.lines([[n-t,r-e]],t,e)},L.clip=function(){W("W"),W("S")},L.lines=function(t,e,n,r,s,i){var o,a,u,c,l,f,d,m,w,y,v;for("number"==typeof t&&(p=n,n=e,e=t,t=p),r=r||[1,1],W(H(e*h)+" "+H((g-n)*h)+" m "),o=r[0],a=r[1],c=t.length,y=e,v=n,u=0;c>u;u++)l=t[u],2===l.length?(y=l[0]*o+y,v=l[1]*a+v,W(H(y*h)+" "+H((g-v)*h)+" l")):(f=l[0]*o+y,d=l[1]*a+v,m=l[2]*o+y,w=l[3]*a+v,y=l[4]*o+y,v=l[5]*a+v,W(H(f*h)+" "+H((g-d)*h)+" "+H(m*h)+" "+H((g-w)*h)+" "+H(y*h)+" "+H((g-v)*h)+" c"));return i&&W(" h"),null!==s&&W(pe(s)),this},L.rect=function(t,e,n,r,s){return pe(s),W([M(t*h),M((g-e)*h),M(n*h),M(-r*h),"re"].join(" ")),null!==s&&W(pe(s)),this},L.triangle=function(t,e,n,r,s,i,o){return this.lines([[n-t,r-e],[s-n,i-r],[t-s,e-i]],t,e,[1,1],o,!0),this},L.roundedRect=function(t,e,n,r,s,i,o){var a=4/3*(Math.SQRT2-1);return this.lines([[n-2*s,0],[s*a,0,s,i-i*a,s,i],[0,r-2*i],[0,i*a,-(s*a),i,-s,i],[-n+2*s,0],[-(s*a),0,-s,-(i*a),-s,-i],[0,-r+2*i],[0,-(i*a),s*a,-i,s,-i]],t+s,e,[1,1],o),this},L.ellipse=function(t,e,n,r,s){var i=4/3*(Math.SQRT2-1)*n,o=4/3*(Math.SQRT2-1)*r;return W([M((t+n)*h),M((g-e)*h),"m",M((t+n)*h),M((g-(e-o))*h),M((t+i)*h),M((g-(e-r))*h),M(t*h),M((g-(e-r))*h),"c"].join(" ")),W([M((t-i)*h),M((g-(e-r))*h),M((t-n)*h),M((g-(e-o))*h),M((t-n)*h),M((g-e)*h),"c"].join(" ")),W([M((t-n)*h),M((g-(e+o))*h),M((t-i)*h),M((g-(e+r))*h),M(t*h),M((g-(e+r))*h),"c"].join(" ")),W([M((t+i)*h),M((g-(e+r))*h),M((t+n)*h),M((g-(e+o))*h),M((t+n)*h),M((g-e)*h),"c"].join(" ")),null!==s&&W(pe(s)),this},L.circle=function(t,e,n,r){return this.ellipse(t,e,n,n,r)},L.setProperties=function(t){for(var e in N)N.hasOwnProperty(e)&&t[e]&&(N[e]=t[e]);return this},L.setFontSize=function(t){return _=t,this},L.setFont=function(t,e){return d=de(t,e),this},L.setFontStyle=L.setFontType=function(t){return d=de(void 0,t),this},L.getFontList=function(){var t,e,n,r={};for(t in I)if(I.hasOwnProperty(t)){r[t]=n=[];for(e in I[t])I[t].hasOwnProperty(e)&&n.push(e)}return r},L.setLineWidth=function(t){return W((t*h).toFixed(2)+" w"),this},L.setDrawColor=function(t,e,n,r){var s;return s=void 0===e||void 0===r&&t===e===n?"string"==typeof t?t+" G":M(t/255)+" G":void 0===r?"string"==typeof t?[t,e,n,"RG"].join(" "):[M(t/255),M(e/255),M(n/255),"RG"].join(" "):"string"==typeof t?[t,e,n,r,"K"].join(" "):[M(t),M(e),M(n),M(r),"K"].join(" "),W(s),this},L.setFillColor=function(t,e,n,r){var s;return s=void 0===e||void 0===r&&t===e===n?"string"==typeof t?t+" g":M(t/255)+" g":void 0===r?"string"==typeof t?[t,e,n,"rg"].join(" "):[M(t/255),M(e/255),M(n/255),"rg"].join(" "):"string"==typeof t?[t,e,n,r,"k"].join(" "):[M(t),M(e),M(n),M(r),"k"].join(" "),W(s),this},L.setTextColor=function(t,e,n){if("string"==typeof t&&/^#[0-9A-Fa-f]{6}$/.test(t)){var r=parseInt(t.substr(1),16);t=r>>16&255,e=r>>8&255,n=255&r}return x=0===t&&0===e&&0===n||"undefined"==typeof e?H(t/255)+" g":[H(t/255),H(e/255),H(n/255),"rg"].join(" "),this},L.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},L.setLineCap=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return F=e,W(e+" J"),this},L.setLineJoin=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return D=e,W(e+" j"),this},L.output=ge,L.save=function(t){L.output("save",t)};for(var ye in n.API)n.API.hasOwnProperty(ye)&&("events"===ye&&n.API.events.length?!function(t,e){var n,r,s;for(s=e.length-1;-1!==s;s--)n=e[s][0],r=e[s][1],t.subscribe.apply(t,[n].concat("function"==typeof r?[r]:r))}(j,n.API.events):L[ye]=n.API[ye]);return ne(),d="F1",le(c,a),j.publish("initialized"),L}var i="1.3",o={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};return n.API={
events:[]},n.version="1.0.272-git 2014-09-29T15:09:diegocr","function"==typeof define&&define.amd?define("jsPDF",function(){return n}):t.jsPDF=n,n}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this);!function(t){t.addHTML=function(t,e,n,r,s){if("undefined"==typeof html2canvas&&"undefined"==typeof rasterizeHTML)throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js");"number"!=typeof e&&(r=e,s=n),"function"==typeof r&&(s=r,r=null);var i=this.internal,o=i.scaleFactor,a=i.pageSize.width,u=i.pageSize.height;if(r=r||{},r.onrendered=function(t){e=parseInt(e)||0,n=parseInt(n)||0;var i=r.dim||{},c=i.h||0,l=i.w||Math.min(a,t.width/o)-e,f="JPEG";if(r.format&&(f=r.format),t.height>u&&r.pagesplit){var d=function(){for(var r=0;;){var i=document.createElement("canvas");i.width=Math.min(a*o,t.width),i.height=Math.min(u*o,t.height-r);var c=i.getContext("2d");c.drawImage(t,0,r,t.width,i.height,0,0,i.width,i.height);var d=[i,e,r?0:n,i.width/o,i.height/o,f,null,"SLOW"];if(this.addImage.apply(this,d),r+=i.height,r>=t.height)break;this.addPage()}s(l,r,null,d)}.bind(this);if("CANVAS"===t.nodeName){var h=new Image;h.onload=d,h.src=t.toDataURL("image/png"),t=h}else d()}else{var p=Math.random().toString(35),m=[t,e,n,l,c,f,p,"SLOW"];this.addImage.apply(this,m),s(l,c,p,m)}}.bind(this),"undefined"!=typeof html2canvas&&!r.rstz)return html2canvas(t,r);if("undefined"!=typeof rasterizeHTML){var c="drawDocument";return"string"==typeof t&&(c=/^http/.test(t)?"drawURL":"drawHTML"),r.width=r.width||a*o,rasterizeHTML[c](t,void 0,r).then(function(t){r.onrendered(t.image)},function(t){s(null,t)})}return null}}(n.API),function(t){var e="addImage_",n=["jpeg","jpg","png"],r=function(t){var e=this.internal.newObject(),n=this.internal.write,s=this.internal.putStream;if(t.n=e,n("<</Type /XObject"),n("/Subtype /Image"),n("/Width "+t.w),n("/Height "+t.h),t.cs===this.color_spaces.INDEXED?n("/ColorSpace [/Indexed /DeviceRGB "+(t.pal.length/3-1)+" "+("smask"in t?e+2:e+1)+" 0 R]"):(n("/ColorSpace /"+t.cs),t.cs===this.color_spaces.DEVICE_CMYK&&n("/Decode [1 0 1 0 1 0 1 0]")),n("/BitsPerComponent "+t.bpc),"f"in t&&n("/Filter /"+t.f),"dp"in t&&n("/DecodeParms <<"+t.dp+">>"),"trns"in t&&t.trns.constructor==Array){for(var i="",o=0,a=t.trns.length;a>o;o++)i+=t.trns[o]+" "+t.trns[o]+" ";n("/Mask ["+i+"]")}if("smask"in t&&n("/SMask "+(e+1)+" 0 R"),n("/Length "+t.data.length+">>"),s(t.data),n("endobj"),"smask"in t){var u="/Predictor 15 /Colors 1 /BitsPerComponent "+t.bpc+" /Columns "+t.w,c={w:t.w,h:t.h,cs:"DeviceGray",bpc:t.bpc,dp:u,data:t.smask};"f"in t&&(c.f=t.f),r.call(this,c)}t.cs===this.color_spaces.INDEXED&&(this.internal.newObject(),n("<< /Length "+t.pal.length+">>"),s(this.arrayBufferToBinaryString(new Uint8Array(t.pal))),n("endobj"))},s=function(){var t=this.internal.collections[e+"images"];for(var n in t)r.call(this,t[n])},i=function(){var t,n=this.internal.collections[e+"images"],r=this.internal.write;for(var s in n)t=n[s],r("/I"+t.i,t.n,"0","R")},o=function(e){return e&&"string"==typeof e&&(e=e.toUpperCase()),e in t.image_compression?e:t.image_compression.NONE},a=function(){var t=this.internal.collections[e+"images"];return t||(this.internal.collections[e+"images"]=t={},this.internal.events.subscribe("putResources",s),this.internal.events.subscribe("putXobjectDict",i)),t},u=function(t){var e=0;return t&&(e=Object.keys?Object.keys(t).length:function(t){var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return e}(t)),e},c=function(t){return"undefined"==typeof t||null===t},l=function(e){return"string"==typeof e&&t.sHashCode(e)},f=function(t){return-1===n.indexOf(t)},d=function(e){return"function"!=typeof t["process"+e.toUpperCase()]},h=function(t){return"object"==typeof t&&1===t.nodeType},p=function(t,e,n){if("IMG"===t.nodeName&&t.hasAttribute("src")){var r=""+t.getAttribute("src");if(!n&&0===r.indexOf("data:image/"))return r;!e&&/\.png(?:[?#].*)?$/i.test(r)&&(e="png")}if("CANVAS"===t.nodeName)var s=t;else{var s=document.createElement("canvas");s.width=t.clientWidth||t.width,s.height=t.clientHeight||t.height;var i=s.getContext("2d");if(!i)throw"addImage requires canvas to be supported by browser.";if(n){var o,a,u,c,l,f,d,h,p=Math.PI/180;"object"==typeof n&&(o=n.x,a=n.y,u=n.bg,n=n.angle),h=n*p,c=Math.abs(Math.cos(h)),l=Math.abs(Math.sin(h)),f=s.width,d=s.height,s.width=d*l+f*c,s.height=d*c+f*l,isNaN(o)&&(o=s.width/2),isNaN(a)&&(a=s.height/2),i.clearRect(0,0,s.width,s.height),i.fillStyle=u||"white",i.fillRect(0,0,s.width,s.height),i.save(),i.translate(o,a),i.rotate(h),i.drawImage(t,-(f/2),-(d/2)),i.rotate(-h),i.translate(-o,-a),i.restore()}else i.drawImage(t,0,0,s.width,s.height)}return s.toDataURL("png"==(""+e).toLowerCase()?"image/png":"image/jpeg")},m=function(t,e){var n;if(e)for(var r in e)if(t===e[r].alias){n=e[r];break}return n},w=function(t,e,n){return t||e||(t=-96,e=-96),0>t&&(t=-1*n.w*72/t/this.internal.scaleFactor),0>e&&(e=-1*n.h*72/e/this.internal.scaleFactor),0===t&&(t=e*n.w/n.h),0===e&&(e=t*n.h/n.w),[t,e]},g=function(t,e,n,r,s,i,o){var a=w.call(this,n,r,s),u=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString;n=a[0],r=a[1],o[i]=s,this.internal.write("q",u(n),"0 0",u(r),u(t),c(e+r),"cm /I"+s.i,"Do Q")};t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPERATION:"Seperation",DEVICE_N:"DeviceN"},t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"},t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},t.sHashCode=function(t){return Array.prototype.reduce&&t.split("").reduce(function(t,e){return t=(t<<5)-t+e.charCodeAt(0),t&t},0)},t.isString=function(t){return"string"==typeof t},t.extractInfoFromBase64DataURI=function(t){return/^data:([\w]+?\/([\w]+?));base64,(.+?)$/g.exec(t)},t.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array},t.isArrayBuffer=function(t){return!!this.supportsArrayBuffer()&&t instanceof ArrayBuffer},t.isArrayBufferView=function(t){return!!this.supportsArrayBuffer()&&("undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array))},t.binaryStringToUint8Array=function(t){for(var e=t.length,n=new Uint8Array(e),r=0;e>r;r++)n[r]=t.charCodeAt(r);return n},t.arrayBufferToBinaryString=function(t){this.isArrayBuffer(t)&&(t=new Uint8Array(t));for(var e="",n=t.byteLength,r=0;n>r;r++)e+=String.fromCharCode(t[r]);return e},t.arrayBufferToBase64=function(t){for(var e,n,r,s,i,o="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=new Uint8Array(t),c=u.byteLength,l=c%3,f=c-l,d=0;f>d;d+=3)i=u[d]<<16|u[d+1]<<8|u[d+2],e=(16515072&i)>>18,n=(258048&i)>>12,r=(4032&i)>>6,s=63&i,o+=a[e]+a[n]+a[r]+a[s];return 1==l?(i=u[f],e=(252&i)>>2,n=(3&i)<<4,o+=a[e]+a[n]+"=="):2==l&&(i=u[f]<<8|u[f+1],e=(64512&i)>>10,n=(1008&i)>>4,r=(15&i)<<2,o+=a[e]+a[n]+a[r]+"="),o},t.createImageInfo=function(t,e,n,r,s,i,o,a,u,c,l,f){var d={alias:a,w:e,h:n,cs:r,bpc:s,i:o,data:t};return i&&(d.f=i),u&&(d.dp=u),c&&(d.trns=c),l&&(d.pal=l),f&&(d.smask=f),d},t.addImage=function(t,e,r,s,i,w,y,v,b){if("string"!=typeof e){var q=w;w=i,i=s,s=r,r=e,e=q}if("object"==typeof t&&!h(t)&&"imageData"in t){var x=t;t=x.imageData,e=x.format||e,r=x.x||r||0,s=x.y||s||0,i=x.w||i,w=x.h||w,y=x.alias||y,v=x.compression||v,b=x.rotation||x.angle||b}if(isNaN(r)||isNaN(s))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");var k,_=a.call(this);if(!(k=m(t,_))){var A;if(h(t)&&(t=p(t,e,b)),c(y)&&(y=l(t)),!(k=m(y,_))){if(this.isString(t)){var C=this.extractInfoFromBase64DataURI(t);C?(e=C[2],t=atob(C[3])):137===t.charCodeAt(0)&&80===t.charCodeAt(1)&&78===t.charCodeAt(2)&&71===t.charCodeAt(3)&&(e="png")}if(e=(e||"JPEG").toLowerCase(),f(e))throw new Error("addImage currently only supports formats "+n+", not '"+e+"'");if(d(e))throw new Error("please ensure that the plugin for '"+e+"' support is added");if(this.supportsArrayBuffer()&&(A=t,t=this.binaryStringToUint8Array(t)),k=this["process"+e.toUpperCase()](t,u(_),y,o(v),A),!k)throw new Error("An unkwown error occurred whilst processing the image")}}return g.call(this,r,s,i,w,k,k.i,_),this};var y=function(t){var e,n,r;if(255===!t.charCodeAt(0)||216===!t.charCodeAt(1)||255===!t.charCodeAt(2)||224===!t.charCodeAt(3)||!t.charCodeAt(6)==="J".charCodeAt(0)||!t.charCodeAt(7)==="F".charCodeAt(0)||!t.charCodeAt(8)==="I".charCodeAt(0)||!t.charCodeAt(9)==="F".charCodeAt(0)||0===!t.charCodeAt(10))throw new Error("getJpegSize requires a binary string jpeg file");for(var s=256*t.charCodeAt(4)+t.charCodeAt(5),i=4,o=t.length;o>i;){if(i+=s,255!==t.charCodeAt(i))throw new Error("getJpegSize could not find the size of the image");if(192===t.charCodeAt(i+1)||193===t.charCodeAt(i+1)||194===t.charCodeAt(i+1)||195===t.charCodeAt(i+1)||196===t.charCodeAt(i+1)||197===t.charCodeAt(i+1)||198===t.charCodeAt(i+1)||199===t.charCodeAt(i+1))return n=256*t.charCodeAt(i+5)+t.charCodeAt(i+6),e=256*t.charCodeAt(i+7)+t.charCodeAt(i+8),r=t.charCodeAt(i+9),[e,n,r];i+=2,s=256*t.charCodeAt(i)+t.charCodeAt(i+1)}},v=function(t){var e=t[0]<<8|t[1];if(65496!==e)throw new Error("Supplied data is not a JPEG");for(var n,r,s,i,o=t.length,a=(t[4]<<8)+t[5],u=4;o>u;){if(u+=a,n=b(t,u),a=(n[2]<<8)+n[3],(192===n[1]||194===n[1])&&255===n[0]&&a>7)return n=b(t,u+5),r=(n[2]<<8)+n[3],s=(n[0]<<8)+n[1],i=n[4],{width:r,height:s,numcomponents:i};u+=2}throw new Error("getJpegSizeFromBytes could not find the size of the image")},b=function(t,e){return t.subarray(e,e+5)};t.processJPEG=function(t,e,n,r,s){var i,o=this.color_spaces.DEVICE_RGB,a=this.decode.DCT_DECODE,u=8;return this.isString(t)?(i=y(t),this.createImageInfo(t,i[0],i[1],1==i[3]?this.color_spaces.DEVICE_GRAY:o,u,a,e,n)):(this.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.isArrayBufferView(t)?(i=v(t),t=s||this.arrayBufferToBinaryString(t),this.createImageInfo(t,i.width,i.height,1==i.numcomponents?this.color_spaces.DEVICE_GRAY:o,u,a,e,n)):null)},t.processJPG=function(){return this.processJPEG.apply(this,arguments)}}(n.API),function(t){t.autoPrint=function(){var t;return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.write("<< /S/Named /Type/Action /N/Print >>","endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.write("/OpenAction "+t+" 0 R")}),this}}(n.API),function(t){var e,n,r,s,i=3,o=13,a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1,c=function(t,e,n,r,s){a={x:t,y:e,w:n,h:r,ln:s}},l=function(){return a},f={left:0,top:0,bottom:0};t.setHeaderFunction=function(t){s=t},t.getTextDimensions=function(t){e=this.internal.getFont().fontName,n=this.table_font_size||this.internal.getFontSize(),r=this.internal.getFont().fontStyle;var s,i,o=19.049976/25.4;return i=document.createElement("font"),i.id="jsPDFCell",i.style.fontStyle=r,i.style.fontName=e,i.style.fontSize=n+"pt",i.textContent=t,document.body.appendChild(i),s={w:(i.offsetWidth+1)*o,h:(i.offsetHeight+1)*o},document.body.removeChild(i),s},t.cellAddPage=function(){var t=this.margins||f;this.addPage(),c(t.left,t.top,void 0,void 0),u+=1},t.cellInitialize=function(){a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1},t.cell=function(t,e,n,r,s,a,u){var d=l();if(void 0!==d.ln)if(d.ln===a)t=d.x+d.w,e=d.y;else{var h=this.margins||f;d.y+d.h+r+o>=this.internal.pageSize.height-h.bottom&&(this.cellAddPage(),this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(a,!0)),e=l().y+l().h}if(void 0!==s[0])if(this.printingHeaderRow?this.rect(t,e,n,r,"FD"):this.rect(t,e,n,r),"right"===u){if(s instanceof Array)for(var p=0;p<s.length;p++){var m=s[p],w=this.getStringUnitWidth(m)*this.internal.getFontSize();this.text(m,t+n-w-i,e+this.internal.getLineHeight()*(p+1))}}else this.text(s,t+i,e+this.internal.getLineHeight());return c(t,e,n,r,a),this},t.arrayMax=function(t,e){var n,r,s,i=t[0];for(n=0,r=t.length;r>n;n+=1)s=t[n],e?-1===e(i,s)&&(i=s):s>i&&(i=s);return i},t.table=function(e,n,r,s,i){if(!r)throw"No data for PDF table";var o,c,l,d,h,p,m,w,g,y,v=[],b=[],q={},x={},k=[],_=[],A=!1,C=!0,S=12,E=f;if(E.width=this.internal.pageSize.width,i&&(i.autoSize===!0&&(A=!0),i.printHeaders===!1&&(C=!1),i.fontSize&&(S=i.fontSize),i.margins&&(E=i.margins)),this.lnMod=0,a={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},u=1,this.printHeaders=C,this.margins=E,this.setFontSize(S),this.table_font_size=S,void 0===s||null===s)v=Object.keys(r[0]);else if(s[0]&&"string"!=typeof s[0]){var z=19.049976/25.4;for(c=0,l=s.length;l>c;c+=1)o=s[c],v.push(o.name),b.push(o.prompt),x[o.name]=o.width*z}else v=s;if(A)for(y=function(t){return t[o]},c=0,l=v.length;l>c;c+=1){for(o=v[c],q[o]=r.map(y),k.push(this.getTextDimensions(b[c]||o).w),p=q[o],m=0,d=p.length;d>m;m+=1)h=p[m],k.push(this.getTextDimensions(h).w);x[o]=t.arrayMax(k)}if(C){var T=this.calculateLineHeight(v,x,b.length?b:v);for(c=0,l=v.length;l>c;c+=1)o=v[c],_.push([e,n,x[o],T,String(b.length?b[c]:o)]);this.setTableHeaderRow(_),this.printHeaderRow(1,!1)}for(c=0,l=r.length;l>c;c+=1){var T;for(w=r[c],T=this.calculateLineHeight(v,x,w),m=0,g=v.length;g>m;m+=1)o=v[m],this.cell(e,n,x[o],T,w[o],c+2,o.align)}return this.lastCellPos=a,this.table_x=e,this.table_y=n,this},t.calculateLineHeight=function(t,e,n){for(var r,s=0,o=0;o<t.length;o++){r=t[o],n[r]=this.splitTextToSize(String(n[r]),e[r]-i);var a=this.internal.getLineHeight()*n[r].length+i;a>s&&(s=a)}return s},t.setTableHeaderRow=function(t){this.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";var n,r,i,o;if(this.printingHeaderRow=!0,void 0!==s){var a=s(this,u);c(a[0],a[1],a[2],a[3],-1)}this.setFontStyle("bold");var l=[];for(i=0,o=this.tableHeaderRow.length;o>i;i+=1)this.setFillColor(200,200,200),n=this.tableHeaderRow[i],e&&(n[1]=this.margins&&this.margins.top||0,l.push(n)),r=[].concat(n),this.cell.apply(this,r.concat(t));l.length>0&&this.setTableHeaderRow(l),this.setFontStyle("normal"),this.printingHeaderRow=!1}}(n.API),function(t){var e,n,r,s,i,o,a,u,c,l,f,d,h,p,m,w,g,y,v;e=function(){function t(){}return function(e){return t.prototype=e,new t}}(),c=function(t){var e,n,r,s,i,o,a;for(n=0,r=t.length,e=void 0,s=!1,o=!1;!s&&n!==r;)e=t[n]=t[n].trimLeft(),e&&(s=!0),n++;for(n=r-1;r&&!o&&-1!==n;)e=t[n]=t[n].trimRight(),e&&(o=!0),n--;for(i=/\s+$/g,a=!0,n=0;n!==r;)e=t[n].replace(/\s+/g," "),a&&(e=e.trimLeft()),e&&(a=i.test(e)),t[n]=e,n++;return t},l=function(t,e,n,r){return this.pdf=t,this.x=e,this.y=n,this.settings=r,this.watchFunctions=[],this.init(),this},f=function(t){var e,n,s;for(e=void 0,s=t.split(","),n=s.shift();!e&&n;)e=r[n.trim().toLowerCase()],n=s.shift();return e},d=function(t){t="auto"===t?"0px":t,t.indexOf("em")>-1&&!isNaN(Number(t.replace("em","")))&&(t=18.719*Number(t.replace("em",""))+"px"),t.indexOf("pt")>-1&&!isNaN(Number(t.replace("pt","")))&&(t=1.333*Number(t.replace("pt",""))+"px");var e,n,r;return n=void 0,e=16,(r=h[t])?r:(r={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[{css_line_height_string:t}],r!==n?h[t]=r/e:(r=parseFloat(t))?h[t]=r/e:(r=t.match(/([\d\.]+)(px)/),h[t]=3===r.length?parseFloat(r[1])/e:1))},u=function(t){var e,n,r;return r=function(t){var e;return e=function(t){return document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle?t.currentStyle:t.style}(t),function(t){return t=t.replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()}),e[t]}}(t),e={},n=void 0,e["font-family"]=f(r("font-family"))||"times",e["font-style"]=s[r("font-style")]||"normal",e["text-align"]=TextAlignMap[r("text-align")]||"left",n=i[r("font-weight")]||"normal","bold"===n&&(e["font-style"]="normal"===e["font-style"]?n:n+e["font-style"]),e["font-size"]=d(r("font-size"))||1,e["line-height"]=d(r("line-height"))||1,e.display="inline"===r("display")?"inline":"block",n="block"===e.display,e["margin-top"]=n&&d(r("margin-top"))||0,e["margin-bottom"]=n&&d(r("margin-bottom"))||0,e["padding-top"]=n&&d(r("padding-top"))||0,e["padding-bottom"]=n&&d(r("padding-bottom"))||0,e["margin-left"]=n&&d(r("margin-left"))||0,e["margin-right"]=n&&d(r("margin-right"))||0,e["padding-left"]=n&&d(r("padding-left"))||0,e["padding-right"]=n&&d(r("padding-right"))||0,e["float"]=o[r("cssFloat")]||"none",e.clear=a[r("clear")]||"none",e},p=function(t,e,n){var r,s,i,o,a;if(i=!1,s=void 0,o=void 0,a=void 0,r=n["#"+t.id])if("function"==typeof r)i=r(t,e);else for(s=0,o=r.length;!i&&s!==o;)i=r[s](t,e),s++;if(r=n[t.nodeName],!i&&r)if("function"==typeof r)i=r(t,e);else for(s=0,o=r.length;!i&&s!==o;)i=r[s](t,e),s++;return i},v=function(t,e){var n,r,s,i,o,a,u,c,l,f;for(n=[],r=[],s=0,f=t.rows[0].cells.length,c=t.clientWidth;f>s;)l=t.rows[0].cells[s],r[s]={name:l.textContent.toLowerCase().replace(/\s+/g,""),prompt:l.textContent.replace(/\r?\n/g,""),width:l.clientWidth/c*e.pdf.internal.pageSize.width},s++;for(s=1;s<t.rows.length;){for(a=t.rows[s],o={},i=0;i<a.cells.length;)o[r[i].name]=a.cells[i].textContent.replace(/\r?\n/g,""),i++;n.push(o),s++}return u={rows:n,headers:r}};var b={SCRIPT:1,STYLE:1,NOSCRIPT:1,OBJECT:1,EMBED:1,SELECT:1},q=1;n=function(t,e,r){var s,i,o,a,c,l,f,d,h;for(i=t.childNodes,s=void 0,o=u(t),c="block"===o.display,c&&(e.setBlockBoundary(),e.setBlockStyle(o)),f=19.049976/25.4,a=0,l=i.length;l>a;){if(s=i[a],"object"==typeof s){if(e.executeWatchFunctions(s),1===s.nodeType&&"HEADER"===s.nodeName){var w=s,g=e.pdf.margins_doc.top;e.pdf.internal.events.subscribe("addPage",function(){e.y=g,n(w,e,r),e.pdf.margins_doc.top=e.y+10,e.y+=10},!1)}if(8===s.nodeType&&"#comment"===s.nodeName)~s.textContent.indexOf("ADD_PAGE")&&(e.pdf.addPage(),e.y=e.pdf.margins_doc.top);else if(1!==s.nodeType||b[s.nodeName])if(3===s.nodeType){var y=s.nodeValue;if(s.nodeValue&&"LI"===s.parentNode.nodeName)if("OL"===s.parentNode.parentNode.nodeName)y=q++ +". "+y;else{var x=16*o["font-size"],k=2;x>20&&(k=3),h=function(t,e){this.pdf.circle(t,e,k,"FD")}}e.addText(y,o)}else"string"==typeof s&&e.addText(s,o);else{var _;if("IMG"===s.nodeName){var A=s.getAttribute("src");_=m[e.pdf.sHashCode(A)||A]}if(_){e.pdf.internal.pageSize.height-e.pdf.margins_doc.bottom<e.y+s.height&&e.y>e.pdf.margins_doc.top&&(e.pdf.addPage(),e.y=e.pdf.margins_doc.top,e.executeWatchFunctions(s));var C=u(s),S=e.x,E=12/e.pdf.internal.scaleFactor,z=(C["margin-left"]+C["padding-left"])*E,T=(C["margin-right"]+C["padding-right"])*E,I=(C["margin-top"]+C["padding-top"])*E,B=(C["margin-bottom"]+C["padding-bottom"])*E;S+=void 0!==C["float"]&&"right"===C["float"]?e.settings.width-s.width-T:z,e.pdf.addImage(_,S,e.y+I,s.width,s.height),_=void 0,"right"===C["float"]||"left"===C["float"]?(e.watchFunctions.push(function(t,n,r,s){return e.y>=n?(e.x+=t,e.settings.width+=r,!0):!!(s&&1===s.nodeType&&!b[s.nodeName]&&e.x+s.width>e.pdf.margins_doc.left+e.pdf.margins_doc.width)&&(e.x+=t,e.y=n,e.settings.width+=r,!0)}.bind(this,"left"===C["float"]?-s.width-z-T:0,e.y+s.height+I+B,s.width)),e.watchFunctions.push(function(t,n,r){return!(e.y<t&&n===e.pdf.internal.getNumberOfPages())||1===r.nodeType&&"both"===u(r).clear&&(e.y=t,!0)}.bind(this,e.y+s.height,e.pdf.internal.getNumberOfPages())),e.settings.width-=s.width+z+T,"left"===C["float"]&&(e.x+=s.width+z+T)):e.y+=s.height+B}else if("TABLE"===s.nodeName)d=v(s,e),e.y+=10,e.pdf.table(e.x,e.y,d.rows,d.headers,{autoSize:!1,printHeaders:!0,margins:e.pdf.margins_doc}),e.y=e.pdf.lastCellPos.y+e.pdf.lastCellPos.h+20;else if("OL"===s.nodeName||"UL"===s.nodeName)q=1,p(s,e,r)||n(s,e,r),e.y+=10;else if("LI"===s.nodeName){var O=e.x;e.x+="UL"===s.parentNode.nodeName?22:10,e.y+=3,p(s,e,r)||n(s,e,r),e.x=O}else"BR"===s.nodeName?e.y+=o["font-size"]*e.pdf.internal.scaleFactor:p(s,e,r)||n(s,e,r)}}a++}return c?e.setBlockBoundary(h):void 0},m={},w=function(t,e,n,r){function s(){e.pdf.internal.events.publish("imagesLoaded"),r(o)}function i(t,n,r){if(t){var i=new Image;o=++c,i.crossOrigin="",i.onerror=i.onload=function(){if(i.complete&&(0===i.src.indexOf("data:image/")&&(i.width=n||i.width||0,i.height=r||i.height||0),i.width+i.height)){var o=e.pdf.sHashCode(t)||t;m[o]=m[o]||i}--c||s()},i.src=t}}for(var o,a=t.getElementsByTagName("img"),u=a.length,c=0;u--;)i(a[u].getAttribute("src"),a[u].width,a[u].height);return c||s()},g=function(t,e,r){var s=t.getElementsByTagName("footer");if(s.length>0){s=s[0];var i=e.pdf.internal.write,o=e.y;e.pdf.internal.write=function(){},n(s,e,r);var a=Math.ceil(e.y-o)+5;e.y=o,e.pdf.internal.write=i,e.pdf.margins_doc.bottom+=a;for(var u=function(t){var i=void 0!==t?t.pageNumber:1,o=e.y;e.y=e.pdf.internal.pageSize.height-e.pdf.margins_doc.bottom,e.pdf.margins_doc.bottom-=a;for(var u=s.getElementsByTagName("span"),c=0;c<u.length;++c)(" "+u[c].className+" ").replace(/[\n\t]/g," ").indexOf(" pageCounter ")>-1&&(u[c].innerHTML=i),(" "+u[c].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&(u[c].innerHTML="###jsPDFVarTotalPages###");n(s,e,r),e.pdf.margins_doc.bottom+=a,e.y=o},c=s.getElementsByTagName("span"),l=0;l<c.length;++l)(" "+c[l].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&e.pdf.internal.events.subscribe("htmlRenderingFinished",e.pdf.putTotalPages.bind(e.pdf,"###jsPDFVarTotalPages###"),!0);e.pdf.internal.events.subscribe("addPage",u,!1),u(),b.FOOTER=1}},y=function(t,e,r,s,i,o){if(!e)return!1;"string"==typeof e||e.parentNode||(e=""+e.innerHTML),"string"==typeof e&&(e=function(t){var e,n,r,s;return r="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),s="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",n=document.createElement("div"),n.style.cssText=s,n.innerHTML='<iframe style="height:1px;width:1px" name="'+r+'" />',document.body.appendChild(n),e=window.frames[r],e.document.body.innerHTML=t,e.document.body}(e.replace(/<\/?script[^>]*?>/gi,"")));var a,u=new l(t,r,s,i);return w.call(this,e,u,i.elementHandlers,function(t){g(e,u,i.elementHandlers),n(e,u,i.elementHandlers),u.pdf.internal.events.publish("htmlRenderingFinished"),a=u.dispose(),"function"==typeof o?o(a):t&&console.error("jsPDF Warning: rendering issues? provide a callback to fromHTML!")}),a||{x:u.x,y:u.y}},l.prototype.init=function(){return this.paragraph={text:[],style:[]},this.pdf.internal.write("q")},l.prototype.dispose=function(){return this.pdf.internal.write("Q"),{x:this.x,y:this.y,ready:!0}},l.prototype.executeWatchFunctions=function(t){var e=!1,n=[];if(this.watchFunctions.length>0){for(var r=0;r<this.watchFunctions.length;++r)this.watchFunctions[r](t)===!0?e=!0:n.push(this.watchFunctions[r]);this.watchFunctions=n}return e},l.prototype.splitFragmentsIntoLines=function(t,n){var r,s,i,o,a,u,c,l,f,d,h,p,m,w,g;for(s=12,h=this.pdf.internal.scaleFactor,a={},i=void 0,d=void 0,o=void 0,u=void 0,g=void 0,f=void 0,l=void 0,c=void 0,p=[],m=[p],r=0,w=this.settings.width;t.length;)if(u=t.shift(),g=n.shift(),u)if(i=g["font-family"],d=g["font-style"],o=a[i+d],o||(o=this.pdf.internal.getFont(i,d).metadata.Unicode,a[i+d]=o),f={widths:o.widths,kerning:o.kerning,fontSize:g["font-size"]*s,textIndent:r},l=this.pdf.getStringUnitWidth(u,f)*f.fontSize/h,r+l>w){for(c=this.pdf.splitTextToSize(u,w,f),p.push([c.shift(),g]);c.length;)p=[[c.shift(),g]],m.push(p);r=this.pdf.getStringUnitWidth(p[0][0],f)*f.fontSize/h}else p.push([u,g]),r+=l;if(void 0!==g["text-align"]&&("center"===g["text-align"]||"right"===g["text-align"]||"justify"===g["text-align"]))for(var y=0;y<m.length;++y){var v=this.pdf.getStringUnitWidth(m[y][0][0],f)*f.fontSize/h;y>0&&(m[y][0][1]=e(m[y][0][1]));var b=w-v;if("right"===g["text-align"])m[y][0][1]["margin-left"]=b;else if("center"===g["text-align"])m[y][0][1]["margin-left"]=b/2;else if("justify"===g["text-align"]){var q=m[y][0][0].split(" ").length-1;m[y][0][1]["word-spacing"]=b/q,y===m.length-1&&(m[y][0][1]["word-spacing"]=0)}}return m},l.prototype.RenderTextFragment=function(t,e){var n,r,s;s=0,n=12,this.pdf.internal.pageSize.height-this.pdf.margins_doc.bottom<this.y+this.pdf.internal.getFontSize()&&(this.pdf.internal.write("ET","Q"),this.pdf.addPage(),this.y=this.pdf.margins_doc.top,this.pdf.internal.write("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td"),s=Math.max(s,e["line-height"],e["font-size"]),this.pdf.internal.write(0,(-1*n*s).toFixed(2),"Td")),r=this.pdf.internal.getFont(e["font-family"],e["font-style"]),void 0!==e["word-spacing"]&&e["word-spacing"]>0&&this.pdf.internal.write(e["word-spacing"].toFixed(2),"Tw"),this.pdf.internal.write("/"+r.id,(n*e["font-size"]).toFixed(2),"Tf","("+this.pdf.internal.pdfEscape(t)+") Tj"),void 0!==e["word-spacing"]&&this.pdf.internal.write(0,"Tw")},l.prototype.renderParagraph=function(t){var e,n,r,s,i,o,a,u,l,f,d,h,p,m,w;if(s=c(this.paragraph.text),m=this.paragraph.style,e=this.paragraph.blockstyle,p=this.paragraph.blockstyle||{},this.paragraph={text:[],style:[],blockstyle:{},priorblockstyle:e},s.join("").trim()){u=this.splitFragmentsIntoLines(s,m),a=void 0,l=void 0,n=12,r=n/this.pdf.internal.scaleFactor,h=(Math.max((e["margin-top"]||0)-(p["margin-bottom"]||0),0)+(e["padding-top"]||0))*r,d=((e["margin-bottom"]||0)+(e["padding-bottom"]||0))*r,f=this.pdf.internal.write,i=void 0,o=void 0,this.y+=h,f("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td");for(var g=0;u.length;){for(a=u.shift(),l=0,i=0,o=a.length;i!==o;)a[i][0].trim()&&(l=Math.max(l,a[i][1]["line-height"],a[i][1]["font-size"]),w=7*a[i][1]["font-size"]),i++;var y=0;for(void 0!==a[0][1]["margin-left"]&&a[0][1]["margin-left"]>0&&(wantedIndent=this.pdf.internal.getCoordinateString(a[0][1]["margin-left"]),y=wantedIndent-g,g=wantedIndent),f(y,(-1*n*l).toFixed(2),"Td"),i=0,o=a.length;i!==o;)a[i][0]&&this.RenderTextFragment(a[i][0],a[i][1]),i++;if(this.y+=l*r,this.executeWatchFunctions(a[0][1])&&u.length>0){var v=[],b=[];u.forEach(function(t){for(var e=0,n=t.length;e!==n;)t[e][0]&&(v.push(t[e][0]+" "),b.push(t[e][1])),++e}),u=this.splitFragmentsIntoLines(c(v),b),f("ET","Q"),f("q","BT 0 g",this.pdf.internal.getCoordinateString(this.x),this.pdf.internal.getVerticalCoordinateString(this.y),"Td")}}return t&&"function"==typeof t&&t.call(this,this.x-9,this.y-w/2),f("ET","Q"),this.y+=d}},l.prototype.setBlockBoundary=function(t){return this.renderParagraph(t)},l.prototype.setBlockStyle=function(t){return this.paragraph.blockstyle=t},l.prototype.addText=function(t,e){return this.paragraph.text.push(t),this.paragraph.style.push(e)},r={helvetica:"helvetica","sans-serif":"helvetica","times new roman":"times",serif:"times",times:"times",monospace:"courier",courier:"courier"},i={100:"normal",200:"normal",300:"normal",400:"normal",500:"bold",600:"bold",700:"bold",800:"bold",900:"bold",normal:"normal",bold:"bold",bolder:"bold",lighter:"normal"},s={normal:"normal",italic:"italic",oblique:"italic"},TextAlignMap={left:"left",right:"right",center:"center",justify:"justify"},o={none:"none",right:"right",left:"left"},a={none:"none",both:"both"},h={normal:1},t.fromHTML=function(t,e,n,r,s,i){return this.margins_doc=i||{top:0,bottom:0},r||(r={}),r.elementHandlers||(r.elementHandlers={}),y(this,t,isNaN(e)?4:e,isNaN(n)?4:n,r,s)}}(n.API),function(t){var e,n,r;t.addJS=function(t){return r=t,this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.write("<< /Names [(EmbeddedJS) "+(e+1)+" 0 R] >>","endobj"),n=this.internal.newObject(),this.internal.write("<< /S /JavaScript /JS (",r,") >>","endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==e&&void 0!==n&&this.internal.write("/Names <</JavaScript "+e+" 0 R>>")}),this}}(n.API),function(t){var e=function(){return"function"!=typeof PNG||"function"!=typeof o},n=function(e){return e!==t.image_compression.NONE&&r()},r=function(){var t="function"==typeof s;if(!t)throw new Error("requires deflate.js for compression");return t},i=function(e,n,r,i){var o=5,l=d;switch(i){case t.image_compression.FAST:o=3,l=f;break;case t.image_compression.MEDIUM:o=6,l=h;break;case t.image_compression.SLOW:o=9,l=p}e=c(e,n,r,l);var m=new Uint8Array(a(o)),w=u(e),g=new s(o),y=g.append(e),v=g.flush(),b=m.length+y.length+v.length,q=new Uint8Array(b+4);return q.set(m),q.set(y,m.length),q.set(v,m.length+y.length),q[b++]=w>>>24&255,q[b++]=w>>>16&255,q[b++]=w>>>8&255,q[b++]=255&w,t.arrayBufferToBinaryString(q)},a=function(t,e){var n=8,r=Math.LOG2E*Math.log(32768)-8,s=r<<4|n,i=s<<8,o=Math.min(3,(e-1&255)>>1);return i|=o<<6,i|=0,i+=31-i%31,[s,255&i&255]},u=function(t,e){for(var n,r=1,s=65535&r,i=r>>>16&65535,o=t.length,a=0;o>0;){n=o>e?e:o,o-=n;do s+=t[a++],i+=s;while(--n);s%=65521,i%=65521}return(i<<16|s)>>>0},c=function(t,e,n,r){for(var s,i,o,a=t.length/e,u=new Uint8Array(t.length+a),c=w(),l=0;a>l;l++){if(o=l*e,s=t.subarray(o,o+e),r)u.set(r(s,n,i),o+l);else{for(var f=0,d=c.length,h=[];d>f;f++)h[f]=c[f](s,n,i);var p=g(h.concat());u.set(h[p],o+l)}i=s}return u},l=function(t){var e=Array.apply([],t);return e.unshift(0),e},f=function(t,e){var n,r=[],s=0,i=t.length;for(r[0]=1;i>s;s++)n=t[s-e]||0,r[s+1]=t[s]-n+256&255;return r},d=function(t,e,n){var r,s=[],i=0,o=t.length;for(s[0]=2;o>i;i++)r=n&&n[i]||0,s[i+1]=t[i]-r+256&255;return s},h=function(t,e,n){var r,s,i=[],o=0,a=t.length;for(i[0]=3;a>o;o++)r=t[o-e]||0,s=n&&n[o]||0,i[o+1]=t[o]+256-(r+s>>>1)&255;return i},p=function(t,e,n){var r,s,i,o,a=[],u=0,c=t.length;for(a[0]=4;c>u;u++)r=t[u-e]||0,s=n&&n[u]||0,i=n&&n[u-e]||0,o=m(r,s,i),a[u+1]=t[u]-o+256&255;return a},m=function(t,e,n){var r=t+e-n,s=Math.abs(r-t),i=Math.abs(r-e),o=Math.abs(r-n);return i>=s&&o>=s?t:o>=i?e:n},w=function(){return[l,f,d,h,p]},g=function(t){for(var e,n,r,s=0,i=t.length;i>s;)e=y(t[s].slice(1)),(n>e||!n)&&(n=e,r=s),s++;return r},y=function(t){for(var e=0,n=t.length,r=0;n>e;)r+=Math.abs(t[e++]);return r};t.processPNG=function(t,r,s,o){var a,u,c,l,f,d,h=this.color_spaces.DEVICE_RGB,p=this.decode.FLATE_DECODE,m=8;if(this.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.isArrayBufferView(t)){if(e())throw new Error("PNG support requires png.js and zlib.js");if(a=new PNG(t),t=a.imgData,m=a.bits,h=a.colorSpace,l=a.colors,-1!==[4,6].indexOf(a.colorType)){if(8===a.bits)for(var w,g,y=window["Uint"+a.pixelBitlength+"Array"],v=new y(a.decodePixels().buffer),b=v.length,q=new Uint8Array(b*a.colors),x=new Uint8Array(b),k=a.pixelBitlength-a.bits,_=0,A=0;b>_;_++){for(w=v[_],g=0;k>g;)q[A++]=w>>>g&255,g+=a.bits;x[_]=w>>>g&255}if(16===a.bits){for(var w,v=new Uint32Array(a.decodePixels().buffer),b=v.length,q=new Uint8Array(b*(32/a.pixelBitlength)*a.colors),x=new Uint8Array(b*(32/a.pixelBitlength)),C=a.colors>1,_=0,A=0,S=0;b>_;)w=v[_++],q[A++]=w>>>0&255,C&&(q[A++]=w>>>16&255,w=v[_++],q[A++]=w>>>0&255),x[S++]=w>>>16&255;m=8}n(o)?(t=i(q,a.width*a.colors,a.colors,o),d=i(x,a.width,1,o)):(t=q,d=x,p=null)}if(3===a.colorType&&(h=this.color_spaces.INDEXED,f=a.palette,a.transparency.indexed)){for(var E=a.transparency.indexed,z=0,_=0,b=E.length;b>_;++_)z+=E[_];if(z/=255,z===b-1&&-1!==E.indexOf(0))c=[E.indexOf(0)];else if(z!==b){for(var v=a.decodePixels(),x=new Uint8Array(v.length),_=0,b=v.length;b>_;_++)x[_]=E[v[_]];d=i(x,a.width,1)}}return u=p===this.decode.FLATE_DECODE?"/Predictor 15 /Colors "+l+" /BitsPerComponent "+m+" /Columns "+a.width:"/Colors "+l+" /BitsPerComponent "+m+" /Columns "+a.width,(this.isArrayBuffer(t)||this.isArrayBufferView(t))&&(t=this.arrayBufferToBinaryString(t)),
(d&&this.isArrayBuffer(d)||this.isArrayBufferView(d))&&(d=this.arrayBufferToBinaryString(d)),this.createImageInfo(t,a.width,a.height,h,m,p,r,s,u,c,f,d)}throw new Error("Unsupported PNG image data, try using JPEG instead.")}}(n.API),function(t){t.addSVG=function(t,e,n,r,s){function i(t,e){var n=e.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(e.createTextNode(t)),e.getElementsByTagName("head")[0].appendChild(n)}function o(t){var e="childframe",n=t.createElement("iframe");return i(".jsPDF_sillysvg_iframe {display:none;position:absolute;}",t),n.name=e,n.setAttribute("width",0),n.setAttribute("height",0),n.setAttribute("frameborder","0"),n.setAttribute("scrolling","no"),n.setAttribute("seamless","seamless"),n.setAttribute("class","jsPDF_sillysvg_iframe"),t.body.appendChild(n),n}function a(t,e){var n=(e.contentWindow||e.contentDocument).document;return n.write(t),n.close(),n.getElementsByTagName("svg")[0]}function u(t){for(var e=parseFloat(t[1]),n=parseFloat(t[2]),r=[],s=3,i=t.length;i>s;)"c"===t[s]?(r.push([parseFloat(t[s+1]),parseFloat(t[s+2]),parseFloat(t[s+3]),parseFloat(t[s+4]),parseFloat(t[s+5]),parseFloat(t[s+6])]),s+=7):"l"===t[s]?(r.push([parseFloat(t[s+1]),parseFloat(t[s+2])]),s+=3):s+=1;return[e,n,r]}var c;if(e===c||n===c)throw new Error("addSVG needs values for 'x' and 'y'");var l=o(document),f=a(t,l),d=[1,1],h=parseFloat(f.getAttribute("width")),p=parseFloat(f.getAttribute("height"));h&&p&&(r&&s?d=[r/h,s/p]:r?d=[r/h,r/h]:s&&(d=[s/p,s/p]));var m,w,g,y,v=f.childNodes;for(m=0,w=v.length;w>m;m++)g=v[m],g.tagName&&"PATH"===g.tagName.toUpperCase()&&(y=u(g.getAttribute("d").split(" ")),y[0]=y[0]*d[0]+e,y[1]=y[1]*d[1]+n,this.lines.call(this,y[2],y[0],y[1],d));return this}}(n.API),function(t){var e=t.getCharWidthsArray=function(t,e){e||(e={});var n,r,s,i=e.widths?e.widths:this.internal.getFont().metadata.Unicode.widths,o=i.fof?i.fof:1,a=e.kerning?e.kerning:this.internal.getFont().metadata.Unicode.kerning,u=a.fof?a.fof:1,c=0,l=i[0]||o,f=[];for(n=0,r=t.length;r>n;n++)s=t.charCodeAt(n),f.push((i[s]||l)/o+(a[s]&&a[s][c]||0)/u),c=s;return f},n=function(t){for(var e=t.length,n=0;e;)e--,n+=t[e];return n},r=t.getStringUnitWidth=function(t,r){return n(e.call(this,t,r))},s=function(t,e,n,r){for(var s=[],i=0,o=t.length,a=0;i!==o&&a+e[i]<n;)a+=e[i],i++;s.push(t.slice(0,i));var u=i;for(a=0;i!==o;)a+e[i]>r&&(s.push(t.slice(u,i)),a=0,u=i),a+=e[i],i++;return u!==i&&s.push(t.slice(u,i)),s},i=function(t,i,o){o||(o={});var a,u,c,l,f,d,h=[],p=[h],m=o.textIndent||0,w=0,g=0,y=t.split(" "),v=e(" ",o)[0];if(d=-1===o.lineIndent?y[0].length+2:o.lineIndent||0){var b=Array(d).join(" "),q=[];y.map(function(t){t=t.split(/\s*\n/),t.length>1?q=q.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):q.push(t[0])}),y=q,d=r(b,o)}for(c=0,l=y.length;l>c;c++){var x=0;if(a=y[c],d&&"\n"==a[0]&&(a=a.substr(1),x=1),u=e(a,o),g=n(u),m+w+g>i||x){if(g>i){for(f=s(a,u,i-(m+w),i),h.push(f.shift()),h=[f.pop()];f.length;)p.push([f.shift()]);g=n(u.slice(a.length-h[0].length))}else h=[a];p.push(h),m=g+d,w=v}else h.push(a),m+=w+g,w=v}if(d)var k=function(t,e){return(e?b:"")+t.join(" ")};else var k=function(t){return t.join(" ")};return p.map(k)};t.splitTextToSize=function(t,e,n){n||(n={});var r,s=n.fontSize||this.internal.getFontSize(),o=function(t){var e={0:1},n={};if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var r=this.internal.getFont(t.fontName,t.fontStyle),s="Unicode";return r.metadata[s]?{widths:r.metadata[s].widths||e,kerning:r.metadata[s].kerning||n}:{widths:e,kerning:n}}.call(this,n);r=Array.isArray(t)?t:t.split(/\r?\n/);var a=1*this.internal.scaleFactor*e/s;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/s:0,o.lineIndent=n.lineIndent;var u,c,l=[];for(u=0,c=r.length;c>u;u++)l=l.concat(i(r[u],a,o));return l}}(n.API),function(t){var e=function(t){for(var e="0123456789abcdef",n="klmnopqrstuvwxyz",r={},s=0;s<n.length;s++)r[n[s]]=e[s];var i,o,a,u,c,l={},f=1,d=l,h=[],p="",m="",w=t.length-1;for(s=1;s!=w;)c=t[s],s+=1,"'"==c?o?(u=o.join(""),o=i):o=[]:o?o.push(c):"{"==c?(h.push([d,u]),d={},u=i):"}"==c?(a=h.pop(),a[0][a[1]]=d,u=i,d=a[0]):"-"==c?f=-1:u===i?r.hasOwnProperty(c)?(p+=r[c],u=parseInt(p,16)*f,f=1,p=""):p+=c:r.hasOwnProperty(c)?(m+=r[c],d[u]=parseInt(m,16)*f,f=1,u=i,m=""):m+=c;return l},n={codePages:["WinAnsiEncoding"],WinAnsiEncoding:e("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},r={Unicode:{Courier:n,"Courier-Bold":n,"Courier-BoldOblique":n,"Courier-Oblique":n,Helvetica:n,"Helvetica-Bold":n,"Helvetica-BoldOblique":n,"Helvetica-Oblique":n,"Times-Roman":n,"Times-Bold":n,"Times-BoldItalic":n,"Times-Italic":n}},s={Unicode:{"Courier-Oblique":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":e("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":e("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":e("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Helvetica:e("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":e("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),"Courier-Bold":e("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":e("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":e("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":e("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFonts",function(t){var e,n,i,o,a,u="Unicode";for(n in t.fonts)t.fonts.hasOwnProperty(n)&&(e=t.fonts[n],i=s[u][e.PostScriptName],i&&(o=e.metadata[u]?e.metadata[u]:e.metadata[u]={},o.widths=i.widths,o.kerning=i.kerning),a=r[u][e.PostScriptName],a&&(o=e.metadata[u]?e.metadata[u]:e.metadata[u]={},o.encoding=a,a.codePages&&a.codePages.length&&(e.encoding=a.codePages[0])))}])}(n.API),function(t){t.putTotalPages=function(t){for(var e=new RegExp(t,"g"),n=1;n<=this.internal.getNumberOfPages();n++)for(var r=0;r<this.internal.pages[n].length;r++)this.internal.pages[n][r]=this.internal.pages[n][r].replace(e,this.internal.getNumberOfPages());return this}}(n.API),function(t){if(t.URL=t.URL||t.webkitURL,t.Blob&&t.URL)try{return void new Blob}catch(e){}var n=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||function(t){var e=function(t){return Object.prototype.toString.call(t).match(/^\[object\s(.*)\]$/)[1]},n=function(){this.data=[]},r=function(t,e,n){this.data=t,this.size=t.length,this.type=e,this.encoding=n},s=n.prototype,i=r.prototype,o=t.FileReaderSync,a=function(t){this.code=this[this.name=t]},u="NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR".split(" "),c=u.length,l=t.URL||t.webkitURL||t,f=l.createObjectURL,d=l.revokeObjectURL,h=l,p=t.btoa,m=t.atob,w=t.ArrayBuffer,g=t.Uint8Array,y=/^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/;for(r.fake=i.fake=!0;c--;)a.prototype[u[c]]=c+1;return l.createObjectURL||(h=t.URL=function(t){var e,n=document.createElementNS("http://www.w3.org/1999/xhtml","a");return n.href=t,"origin"in n||("data:"===n.protocol.toLowerCase()?n.origin=null:(e=t.match(y),n.origin=e&&e[1])),n}),h.createObjectURL=function(t){var e,n=t.type;return null===n&&(n="application/octet-stream"),t instanceof r?(e="data:"+n,"base64"===t.encoding?e+";base64,"+t.data:"URI"===t.encoding?e+","+decodeURIComponent(t.data):p?e+";base64,"+p(t.data):e+","+encodeURIComponent(t.data)):f?f.call(l,t):void 0},h.revokeObjectURL=function(t){"data:"!==t.substring(0,5)&&d&&d.call(l,t)},s.append=function(t){var n=this.data;if(g&&(t instanceof w||t instanceof g)){for(var s="",i=new g(t),u=0,c=i.length;c>u;u++)s+=String.fromCharCode(i[u]);n.push(s)}else if("Blob"===e(t)||"File"===e(t)){if(!o)throw new a("NOT_READABLE_ERR");var l=new o;n.push(l.readAsBinaryString(t))}else t instanceof r?"base64"===t.encoding&&m?n.push(m(t.data)):"URI"===t.encoding?n.push(decodeURIComponent(t.data)):"raw"===t.encoding&&n.push(t.data):("string"!=typeof t&&(t+=""),n.push(unescape(encodeURIComponent(t))))},s.getBlob=function(t){return arguments.length||(t=null),new r(this.data.join(""),t,"raw")},s.toString=function(){return"[object BlobBuilder]"},i.slice=function(t,e,n){var s=arguments.length;return 3>s&&(n=null),new r(this.data.slice(t,s>1?e:this.data.length),n,this.encoding)},i.toString=function(){return"[object Blob]"},i.close=function(){this.size=0,delete this.data},n}(t);t.Blob=function(t,e){var r=e?e.type||"":"",s=new n;if(t)for(var i=0,o=t.length;o>i;i++)s.append(t[i]);return s.getBlob(r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this);var r=r||"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(t){if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var e=t.document,n=function(){return t.URL||t.webkitURL||t},r=e.createElementNS("http://www.w3.org/1999/xhtml","a"),s="download"in r,i=function(n){var r=e.createEvent("MouseEvents");r.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)},o=t.webkitRequestFileSystem,a=t.requestFileSystem||o||t.mozRequestFileSystem,u=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},c="application/octet-stream",l=0,f=10,d=function(e){var r=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};t.chrome?r():setTimeout(r,f)},h=function(t,e,n){e=[].concat(e);for(var r=e.length;r--;){var s=t["on"+e[r]];if("function"==typeof s)try{s.call(t,n||t)}catch(i){u(i)}}},p=function(e,u){var f,p,m,w=this,g=e.type,y=!1,v=function(){h(w,"writestart progress write writeend".split(" "))},b=function(){if((y||!f)&&(f=n().createObjectURL(e)),p)p.location.href=f;else{var r=t.open(f,"_blank");void 0==r&&"undefined"!=typeof safari&&(t.location.href=f)}w.readyState=w.DONE,v(),d(f)},q=function(t){return function(){return w.readyState!==w.DONE?t.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};return w.readyState=w.INIT,u||(u="download"),s?(f=n().createObjectURL(e),r.href=f,r.download=u,i(r),w.readyState=w.DONE,v(),void d(f)):(t.chrome&&g&&g!==c&&(m=e.slice||e.webkitSlice,e=m.call(e,0,e.size,c),y=!0),o&&"download"!==u&&(u+=".download"),(g===c||o)&&(p=t),a?(l+=e.size,void a(t.TEMPORARY,l,q(function(t){t.root.getDirectory("saved",x,q(function(t){var n=function(){t.getFile(u,x,q(function(t){t.createWriter(q(function(n){n.onwriteend=function(e){p.location.href=t.toURL(),w.readyState=w.DONE,h(w,"writeend",e),d(t)},n.onerror=function(){var t=n.error;t.code!==t.ABORT_ERR&&b()},"writestart progress write abort".split(" ").forEach(function(t){n["on"+t]=w["on"+t]}),n.write(e),w.abort=function(){n.abort(),w.readyState=w.DONE},w.readyState=w.WRITING}),b)}),b)};t.getFile(u,{create:!1},q(function(t){t.remove(),n()}),q(function(t){t.code===t.NOT_FOUND_ERR?n():b()}))}),b)}),b)):void b())},m=p.prototype,w=function(t,e){return new p(t,e)};return m.abort=function(){var t=this;t.readyState=t.DONE,h(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,w}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&null!==module&&(module.exports=r),void function(t,e){"object"==typeof module?module.exports=e():t.adler32cs=e()}(n,function(){var t="function"==typeof ArrayBuffer&&"function"==typeof Uint8Array,e=null,n=function(){if(!t)return function(){return!1};try{var n=require("buffer");"function"==typeof n.Buffer&&(e=n.Buffer)}catch(r){}return function(t){return t instanceof ArrayBuffer||null!==e&&t instanceof e}}(),r=function(){return null!==e?function(t){return new e(t,"utf8").toString("binary")}:function(t){return unescape(encodeURIComponent(t))}}(),s=65521,i=function(t,e){for(var n=65535&t,r=t>>>16,i=0,o=e.length;o>i;i++)n=(n+(255&e.charCodeAt(i)))%s,r=(r+n)%s;return(r<<16|n)>>>0},o=function(t,e){for(var n=65535&t,r=t>>>16,i=0,o=e.length;o>i;i++)n=(n+e[i])%s,r=(r+n)%s;return(r<<16|n)>>>0},a={},u=a.Adler32=function(){var e=function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(!isFinite(t=null==t?1:+t))throw new Error("First arguments needs to be a finite number.");this.checksum=t>>>0},s=e.prototype={};return s.constructor=e,e.from=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");this.checksum=i(1,t.toString())}),e.fromUtf8=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(null==t)throw new Error("First argument needs to be a string.");var n=r(t.toString());this.checksum=i(1,n)}),t&&(e.fromBuffer=function(t){return t.prototype=s,t}(function(t){if(!(this instanceof e))throw new TypeError("Constructor cannot called be as a function.");if(!n(t))throw new Error("First argument needs to be ArrayBuffer.");var r=new Uint8Array(t);return this.checksum=o(1,r)})),s.update=function(t){if(null==t)throw new Error("First argument needs to be a string.");return t=t.toString(),this.checksum=i(this.checksum,t)},s.updateUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=r(t.toString());return this.checksum=i(this.checksum,e)},t&&(s.updateBuffer=function(t){if(!n(t))throw new Error("First argument needs to be ArrayBuffer.");var e=new Uint8Array(t);return this.checksum=o(this.checksum,e)}),s.clone=function(){return new u(this.checksum)},e}();return a.from=function(t){if(null==t)throw new Error("First argument needs to be a string.");return i(1,t.toString())},a.fromUtf8=function(t){if(null==t)throw new Error("First argument needs to be a string.");var e=r(t.toString());return i(1,e)},t&&(a.fromBuffer=function(t){if(!n(t))throw new Error("First argument need to be ArrayBuffer.");var e=new Uint8Array(t);return o(1,e)}),a});var s=function(){function t(){function t(t){var e,n,s,i,a,u,c=r.dyn_tree,l=r.stat_desc.static_tree,f=r.stat_desc.extra_bits,h=r.stat_desc.extra_base,p=r.stat_desc.max_length,m=0;for(i=0;o>=i;i++)t.bl_count[i]=0;for(c[2*t.heap[t.heap_max]+1]=0,e=t.heap_max+1;d>e;e++)n=t.heap[e],i=c[2*c[2*n+1]+1]+1,i>p&&(i=p,m++),c[2*n+1]=i,n>r.max_code||(t.bl_count[i]++,a=0,n>=h&&(a=f[n-h]),u=c[2*n],t.opt_len+=u*(i+a),l&&(t.static_len+=u*(l[2*n+1]+a)));if(0!==m){do{for(i=p-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(i=p;0!==i;i--)for(n=t.bl_count[i];0!==n;)s=t.heap[--e],s>r.max_code||(c[2*s+1]!=i&&(t.opt_len+=(i-c[2*s+1])*c[2*s],c[2*s+1]=i),n--)}}function e(t,e){var n=0;do n|=1&t,t>>>=1,n<<=1;while(--e>0);return n>>>1}function n(t,n,r){var s,i,a,u=[],c=0;for(s=1;o>=s;s++)u[s]=c=c+r[s-1]<<1;for(i=0;n>=i;i++)a=t[2*i+1],0!==a&&(t[2*i]=e(u[a]++,a))}var r=this;r.build_tree=function(e){var s,i,o,a=r.dyn_tree,u=r.stat_desc.static_tree,c=r.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=d,s=0;c>s;s++)0!==a[2*s]?(e.heap[++e.heap_len]=l=s,e.depth[s]=0):a[2*s+1]=0;for(;e.heap_len<2;)o=e.heap[++e.heap_len]=2>l?++l:0,a[2*o]=1,e.depth[o]=0,e.opt_len--,u&&(e.static_len-=u[2*o+1]);for(r.max_code=l,s=Math.floor(e.heap_len/2);s>=1;s--)e.pqdownheap(a,s);o=c;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],e.pqdownheap(a,1),i=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=i,a[2*o]=a[2*s]+a[2*i],e.depth[o]=Math.max(e.depth[s],e.depth[i])+1,a[2*s+1]=a[2*i+1]=o,e.heap[1]=o++,e.pqdownheap(a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],t(e),n(a,r.max_code,e.bl_count)}}function e(t,e,n,r,s){var i=this;i.static_tree=t,i.extra_bits=e,i.extra_base=n,i.elems=r,i.max_length=s}function n(t,e,n,r,s){var i=this;i.good_length=t,i.max_lazy=e,i.nice_length=n,i.max_chain=r,i.func=s}function r(t,e,n,r){var s=t[2*e],i=t[2*n];return i>s||s==i&&r[e]<=r[n]}function s(){function n(){var t;for(Te=2*Ce,Be[Pe-1]=0,t=0;Pe-1>t;t++)Be[t]=0;Je=N[Xe].max_lazy,Ke=N[Xe].good_length,Qe=N[Xe].nice_length,Ve=N[Xe].max_chain,Me=0,Ue=0,Ge=0,Ne=We=Z-1,je=0,Oe=0}function s(){var t;for(t=0;f>t;t++)$e[2*t]=0;for(t=0;a>t;t++)Ze[2*t]=0;for(t=0;u>t;t++)tn[2*t]=0;$e[2*h]=1,en.opt_len=en.static_len=0,un=ln=0}function i(){nn.dyn_tree=$e,nn.stat_desc=e.static_l_desc,rn.dyn_tree=Ze,rn.stat_desc=e.static_d_desc,sn.dyn_tree=tn,sn.stat_desc=e.static_bl_desc,dn=0,hn=0,fn=8,s()}function o(t,e){var n,r,s=-1,i=t[1],o=0,a=7,u=4;for(0===i&&(a=138,u=3),t[2*(e+1)+1]=65535,n=0;e>=n;n++)r=i,i=t[2*(n+1)+1],++o<a&&r==i||(u>o?tn[2*r]+=o:0!==r?(r!=s&&tn[2*r]++,tn[2*m]++):10>=o?tn[2*w]++:tn[2*g]++,o=0,s=r,0===i?(a=138,u=3):r==i?(a=6,u=3):(a=7,u=4))}function c(){var e;for(o($e,nn.max_code),o(Ze,rn.max_code),sn.build_tree(en),e=u-1;e>=3&&0===tn[2*t.bl_order[e]+1];e--);return en.opt_len+=3*(e+1)+5+5+4,e}function d(t){en.pending_buf[en.pending++]=t}function p(t){d(255&t),d(t>>>8&255)}function O(t){d(t>>8&255),d(255&t&255)}function ne(t,e){var n,r=e;hn>y-r?(n=t,dn|=n<<hn&65535,p(dn),dn=n>>>y-hn,hn+=r-y):(dn|=t<<hn&65535,hn+=r)}function re(t,e){var n=2*t;ne(65535&e[n],65535&e[n+1])}function se(t,e){var n,r,s=-1,i=t[1],o=0,a=7,u=4;for(0===i&&(a=138,u=3),n=0;e>=n;n++)if(r=i,i=t[2*(n+1)+1],!(++o<a&&r==i)){if(u>o){do re(r,tn);while(0!==--o)}else 0!==r?(r!=s&&(re(r,tn),o--),re(m,tn),ne(o-3,2)):10>=o?(re(w,tn),ne(o-3,3)):(re(g,tn),ne(o-11,7));o=0,s=r,0===i?(a=138,u=3):r==i?(a=6,u=3):(a=7,u=4)}}function ie(e,n,r){var s;for(ne(e-257,5),ne(n-1,5),ne(r-4,4),s=0;r>s;s++)ne(tn[2*t.bl_order[s]+1],3);se($e,e-1),se(Ze,n-1)}function oe(){16==hn?(p(dn),dn=0,hn=0):hn>=8&&(d(255&dn),dn>>>=8,hn-=8)}function ae(){ne(Q<<1,3),re(h,e.static_ltree),oe(),9>1+fn+10-hn&&(ne(Q<<1,3),re(h,e.static_ltree),oe()),fn=7}function ue(e,n){var r,s,i;if(en.pending_buf[cn+2*un]=e>>>8&255,en.pending_buf[cn+2*un+1]=255&e,en.pending_buf[on+un]=255&n,un++,0===e?$e[2*n]++:(ln++,e--,$e[2*(t._length_code[n]+l+1)]++,Ze[2*t.d_code(e)]++),0===(8191&un)&&Xe>2){for(r=8*un,s=Me-Ue,i=0;a>i;i++)r+=Ze[2*i]*(5+t.extra_dbits[i]);if(r>>>=3,ln<Math.floor(un/2)&&r<Math.floor(s/2))return!0}return un==an-1}function ce(e,n){var r,s,i,o,a=0;if(0!==un)do r=en.pending_buf[cn+2*a]<<8&65280|255&en.pending_buf[cn+2*a+1],s=255&en.pending_buf[on+a],a++,0===r?re(s,e):(i=t._length_code[s],re(i+l+1,e),o=t.extra_lbits[i],0!==o&&(s-=t.base_length[i],
ne(s,o)),r--,i=t.d_code(r),re(i,n),o=t.extra_dbits[i],0!==o&&(r-=t.base_dist[i],ne(r,o)));while(un>a);re(h,e),fn=e[2*h+1]}function le(){hn>8?p(dn):hn>0&&d(255&dn),dn=0,hn=0}function fe(t,e,n){le(),fn=8,n&&(p(e),p(~e)),en.pending_buf.set(ze.subarray(t,t+e),en.pending),en.pending+=e}function de(t,e,n){ne((K<<1)+(n?1:0),3),fe(t,e,!0)}function he(t,n,r){var i,o,a=0;Xe>0?(nn.build_tree(en),rn.build_tree(en),a=c(),i=en.opt_len+3+7>>>3,o=en.static_len+3+7>>>3,i>=o&&(i=o)):i=o=n+5,i>=n+4&&-1!=t?de(t,n,r):o==i?(ne((Q<<1)+(r?1:0),3),ce(e.static_ltree,e.static_dtree)):(ne(($<<1)+(r?1:0),3),ie(nn.max_code+1,rn.max_code+1,a+1),ce($e,Ze)),s(),r&&le()}function pe(t){he(Ue>=0?Ue:-1,Me-Ue,t),Ue=Me,qe.flush_pending()}function me(){var t,e,n,r;do{if(r=Te-Ge-Me,0===r&&0===Me&&0===Ge)r=Ce;else if(-1==r)r--;else if(Me>=Ce+Ce-ee){ze.set(ze.subarray(Ce,Ce+Ce),0),He-=Ce,Me-=Ce,Ue-=Ce,t=Pe,n=t;do e=65535&Be[--n],Be[n]=e>=Ce?e-Ce:0;while(0!==--t);t=Ce,n=t;do e=65535&Ie[--n],Ie[n]=e>=Ce?e-Ce:0;while(0!==--t);r+=Ce}if(0===qe.avail_in)return;t=qe.read_buf(ze,Me+Ge,r),Ge+=t,Ge>=Z&&(Oe=255&ze[Me],Oe=(Oe<<De^255&ze[Me+1])&Fe)}while(ee>Ge&&0!==qe.avail_in)}function we(t){var e,n=65535;for(n>ke-5&&(n=ke-5);;){if(1>=Ge){if(me(),0===Ge&&t==k)return j;if(0===Ge)break}if(Me+=Ge,Ge=0,e=Ue+n,(0===Me||Me>=e)&&(Ge=Me-e,Me=e,pe(!1),0===qe.avail_out))return j;if(Me-Ue>=Ce-ee&&(pe(!1),0===qe.avail_out))return j}return pe(t==C),0===qe.avail_out?t==C?H:j:t==C?G:M}function ge(t){var e,n,r=Ve,s=Me,i=We,o=Me>Ce-ee?Me-(Ce-ee):0,a=Qe,u=Ee,c=Me+te,l=ze[s+i-1],f=ze[s+i];We>=Ke&&(r>>=2),a>Ge&&(a=Ge);do if(e=t,ze[e+i]==f&&ze[e+i-1]==l&&ze[e]==ze[s]&&ze[++e]==ze[s+1]){s+=2,e++;do;while(ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&ze[++s]==ze[++e]&&c>s);if(n=te-(c-s),s=c-te,n>i){if(He=t,i=n,n>=a)break;l=ze[s+i-1],f=ze[s+i]}}while((t=65535&Ie[t&u])>o&&0!==--r);return Ge>=i?i:Ge}function ye(t){for(var e,n=0;;){if(ee>Ge){if(me(),ee>Ge&&t==k)return j;if(0===Ge)break}if(Ge>=Z&&(Oe=(Oe<<De^255&ze[Me+(Z-1)])&Fe,n=65535&Be[Oe],Ie[Me&Ee]=Be[Oe],Be[Oe]=Me),0!==n&&Ce-ee>=(Me-n&65535)&&Ye!=q&&(Ne=ge(n)),Ne>=Z)if(e=ue(Me-He,Ne-Z),Ge-=Ne,Je>=Ne&&Ge>=Z){Ne--;do Me++,Oe=(Oe<<De^255&ze[Me+(Z-1)])&Fe,n=65535&Be[Oe],Ie[Me&Ee]=Be[Oe],Be[Oe]=Me;while(0!==--Ne);Me++}else Me+=Ne,Ne=0,Oe=255&ze[Me],Oe=(Oe<<De^255&ze[Me+1])&Fe;else e=ue(0,255&ze[Me]),Ge--,Me++;if(e&&(pe(!1),0===qe.avail_out))return j}return pe(t==C),0===qe.avail_out?t==C?H:j:t==C?G:M}function ve(t){for(var e,n,r=0;;){if(ee>Ge){if(me(),ee>Ge&&t==k)return j;if(0===Ge)break}if(Ge>=Z&&(Oe=(Oe<<De^255&ze[Me+(Z-1)])&Fe,r=65535&Be[Oe],Ie[Me&Ee]=Be[Oe],Be[Oe]=Me),We=Ne,Le=He,Ne=Z-1,0!==r&&Je>We&&Ce-ee>=(Me-r&65535)&&(Ye!=q&&(Ne=ge(r)),5>=Ne&&(Ye==b||Ne==Z&&Me-He>4096)&&(Ne=Z-1)),We>=Z&&We>=Ne){n=Me+Ge-Z,e=ue(Me-1-Le,We-Z),Ge-=We-1,We-=2;do++Me<=n&&(Oe=(Oe<<De^255&ze[Me+(Z-1)])&Fe,r=65535&Be[Oe],Ie[Me&Ee]=Be[Oe],Be[Oe]=Me);while(0!==--We);if(je=0,Ne=Z-1,Me++,e&&(pe(!1),0===qe.avail_out))return j}else if(0!==je){if(e=ue(0,255&ze[Me-1]),e&&pe(!1),Me++,Ge--,0===qe.avail_out)return j}else je=1,Me++,Ge--}return 0!==je&&(e=ue(0,255&ze[Me-1]),je=0),pe(t==C),0===qe.avail_out?t==C?H:j:t==C?G:M}function be(t){return t.total_in=t.total_out=0,t.msg=null,en.pending=0,en.pending_out=0,xe=J,Ae=k,i(),n(),S}var qe,xe,ke,_e,Ae,Ce,Se,Ee,ze,Te,Ie,Be,Oe,Pe,Re,Fe,De,Ue,Ne,Le,je,Me,He,Ge,We,Ve,Je,Xe,Ye,Ke,Qe,$e,Ze,tn,en=this,nn=new t,rn=new t,sn=new t;en.depth=[];var on,an,un,cn,ln,fn,dn,hn;en.bl_count=[],en.heap=[],$e=[],Ze=[],tn=[],en.pqdownheap=function(t,e){for(var n=en.heap,s=n[e],i=e<<1;i<=en.heap_len&&(i<en.heap_len&&r(t,n[i+1],n[i],en.depth)&&i++,!r(t,s,n[i],en.depth));)n[e]=n[i],e=i,i<<=1;n[e]=s},en.deflateInit=function(t,e,n,r,s,i){return r||(r=Y),s||(s=R),i||(i=x),t.msg=null,e==v&&(e=6),1>s||s>P||r!=Y||9>n||n>15||0>e||e>9||0>i||i>q?T:(t.dstate=en,Se=n,Ce=1<<Se,Ee=Ce-1,Re=s+7,Pe=1<<Re,Fe=Pe-1,De=Math.floor((Re+Z-1)/Z),ze=new Uint8Array(2*Ce),Ie=[],Be=[],an=1<<s+6,en.pending_buf=new Uint8Array(4*an),ke=4*an,cn=Math.floor(an/2),on=3*an,Xe=e,Ye=i,_e=255&r,be(t))},en.deflateEnd=function(){return xe!=V&&xe!=J&&xe!=X?T:(en.pending_buf=null,Be=null,Ie=null,ze=null,en.dstate=null,xe==J?I:S)},en.deflateParams=function(t,e,n){var r=S;return e==v&&(e=6),0>e||e>9||0>n||n>q?T:(N[Xe].func!=N[e].func&&0!==t.total_in&&(r=t.deflate(_)),Xe!=e&&(Xe=e,Je=N[Xe].max_lazy,Ke=N[Xe].good_length,Qe=N[Xe].nice_length,Ve=N[Xe].max_chain),Ye=n,r)},en.deflateSetDictionary=function(t,e,n){var r,s=n,i=0;if(!e||xe!=V)return T;if(Z>s)return S;for(s>Ce-ee&&(s=Ce-ee,i=n-s),ze.set(e.subarray(i,i+s),0),Me=s,Ue=s,Oe=255&ze[0],Oe=(Oe<<De^255&ze[1])&Fe,r=0;s-Z>=r;r++)Oe=(Oe<<De^255&ze[r+(Z-1)])&Fe,Ie[r&Ee]=Be[Oe],Be[Oe]=r;return S},en.deflate=function(t,e){var n,r,s,i,o;if(e>C||0>e)return T;if(!t.next_out||!t.next_in&&0!==t.avail_in||xe==X&&e!=C)return t.msg=L[z-T],T;if(0===t.avail_out)return t.msg=L[z-B],B;if(qe=t,i=Ae,Ae=e,xe==V&&(r=Y+(Se-8<<4)<<8,s=(Xe-1&255)>>1,s>3&&(s=3),r|=s<<6,0!==Me&&(r|=W),r+=31-r%31,xe=J,O(r)),0!==en.pending){if(qe.flush_pending(),0===qe.avail_out)return Ae=-1,S}else if(0===qe.avail_in&&i>=e&&e!=C)return qe.msg=L[z-B],B;if(xe==X&&0!==qe.avail_in)return t.msg=L[z-B],B;if(0!==qe.avail_in||0!==Ge||e!=k&&xe!=X){switch(o=-1,N[Xe].func){case F:o=we(e);break;case D:o=ye(e);break;case U:o=ve(e)}if((o==H||o==G)&&(xe=X),o==j||o==H)return 0===qe.avail_out&&(Ae=-1),S;if(o==M){if(e==_)ae();else if(de(0,0,!1),e==A)for(n=0;Pe>n;n++)Be[n]=0;if(qe.flush_pending(),0===qe.avail_out)return Ae=-1,S}}return e!=C?S:E}}function i(){var t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}var o=15,a=30,u=19,c=29,l=256,f=l+1+c,d=2*f+1,h=256,p=7,m=16,w=17,g=18,y=16,v=-1,b=1,q=2,x=0,k=0,_=1,A=3,C=4,S=0,E=1,z=2,T=-2,I=-3,B=-5,O=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29];t._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28],t.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],t.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],t.d_code=function(t){return 256>t?O[t]:O[256+(t>>>7)]},t.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],t.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],t.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],t.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],e.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],e.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],e.static_l_desc=new e(e.static_ltree,t.extra_lbits,l+1,f,o),e.static_d_desc=new e(e.static_dtree,t.extra_dbits,0,a,o),e.static_bl_desc=new e(null,t.extra_blbits,0,u,p);var P=9,R=8,F=0,D=1,U=2,N=[new n(0,0,0,0,F),new n(4,4,8,4,D),new n(4,5,16,8,D),new n(4,6,32,32,D),new n(4,4,16,16,U),new n(8,16,32,32,U),new n(8,16,128,128,U),new n(8,32,128,256,U),new n(32,128,258,1024,U),new n(32,258,258,4096,U)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],j=0,M=1,H=2,G=3,W=32,V=42,J=113,X=666,Y=8,K=0,Q=1,$=2,Z=3,te=258,ee=te+Z+1;return i.prototype={deflateInit:function(t,e){var n=this;return n.dstate=new s,e||(e=o),n.dstate.deflateInit(n,t,e)},deflate:function(t){var e=this;return e.dstate?e.dstate.deflate(e,t):T},deflateEnd:function(){var t=this;if(!t.dstate)return T;var e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){var n=this;return n.dstate?n.dstate.deflateParams(n,t,e):T},deflateSetDictionary:function(t,e){var n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):T},read_buf:function(t,e,n){var r=this,s=r.avail_in;return s>n&&(s=n),0===s?0:(r.avail_in-=s,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),e),r.next_in_index+=s,r.total_in+=s,s)},flush_pending:function(){var t=this,e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}},function(t){var e=this,n=new i,r=512,s=k,o=new Uint8Array(r);"undefined"==typeof t&&(t=v),n.deflateInit(t),n.next_out=o,e.append=function(t,e){var i,a,u=[],c=0,l=0,f=0;if(t.length){n.next_in_index=0,n.next_in=t,n.avail_in=t.length;do{if(n.next_out_index=0,n.avail_out=r,i=n.deflate(s),i!=S)throw"deflating: "+n.msg;n.next_out_index&&u.push(n.next_out_index==r?new Uint8Array(o):new Uint8Array(o.subarray(0,n.next_out_index))),f+=n.next_out_index,e&&n.next_in_index>0&&n.next_in_index!=c&&(e(n.next_in_index),c=n.next_in_index)}while(n.avail_in>0||0===n.avail_out);return a=new Uint8Array(f),u.forEach(function(t){a.set(t,l),l+=t.length}),a}},e.flush=function(){var t,e,s=[],i=0,a=0;do{if(n.next_out_index=0,n.avail_out=r,t=n.deflate(C),t!=E&&t!=S)throw"deflating: "+n.msg;r-n.avail_out>0&&s.push(new Uint8Array(o.subarray(0,n.next_out_index))),a+=n.next_out_index}while(n.avail_in>0||0===n.avail_out);return n.deflateEnd(),e=new Uint8Array(a),s.forEach(function(t){e.set(t,i),i+=t.length}),e}}}(this);!function(t){var e;e=function(){function e(t){var e,n,r,s,i,o,a,u,c,l,f,d,h,p,m;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},o=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],a=t=0;4>t;a=++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":o&&this.animation.frames.push(o),this.pos+=4,o={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},i=this.readUInt16(),s=this.readUInt16()||100,o.delay=1e3*i/s,o.disposeOp=this.data[this.pos++],o.blendOp=this.data[this.pos++],o.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,e-=4),t=(null!=o?o.data:void 0)||this.imgData,a=h=0;e>=0?e>h:h>e;a=e>=0?++h:--h)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(r=this.palette.length/3,this.transparency.indexed=this.read(e),this.transparency.indexed.length>r)throw new Error("More transparent colors than palette size");if(f=r-this.transparency.indexed.length,f>0)for(a=p=0;f>=0?f>p:p>f;a=f>=0?++p:--p)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":d=this.read(e),u=d.indexOf(0),c=String.fromCharCode.apply(String,d.slice(0,u)),this.text[c]=String.fromCharCode.apply(String,d.slice(u+1));break;case"IEND":return o&&this.animation.frames.push(o),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(m=this.colorType)||6===m,n=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*n,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}var n,r,s,i,a,u,c,l;e.load=function(t,n,r){var s;return"function"==typeof n&&(r=n),s=new XMLHttpRequest,s.open("GET",t,!0),s.responseType="arraybuffer",s.onload=function(){var t,i;return t=new Uint8Array(s.response||s.mozResponseArrayBuffer),i=new e(t),"function"==typeof(null!=n?n.getContext:void 0)&&i.render(n),"function"==typeof r?r(i):void 0},s.send(null)},i=0,s=1,a=2,r=0,n=1,e.prototype.read=function(t){var e,n,r;for(r=[],e=n=0;t>=0?t>n:n>t;e=t>=0?++n:--n)r.push(this.data[this.pos++]);return r},e.prototype.readUInt32=function(){var t,e,n,r;return t=this.data[this.pos++]<<24,e=this.data[this.pos++]<<16,n=this.data[this.pos++]<<8,r=this.data[this.pos++],t|e|n|r},e.prototype.readUInt16=function(){var t,e;return t=this.data[this.pos++]<<8,e=this.data[this.pos++],t|e},e.prototype.decodePixels=function(t){var e,n,r,s,i,a,u,c,l,f,d,h,p,m,w,g,y,v,b,q,x,k,_;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=new o(t),t=t.getBytes(),h=this.pixelBitlength/8,g=h*this.width,p=new Uint8Array(g*this.height),a=t.length,w=0,m=0,n=0;a>m;){switch(t[m++]){case 0:for(s=b=0;g>b;s=b+=1)p[n++]=t[m++];break;case 1:for(s=q=0;g>q;s=q+=1)e=t[m++],i=h>s?0:p[n-h],p[n++]=(e+i)%256;break;case 2:for(s=x=0;g>x;s=x+=1)e=t[m++],r=(s-s%h)/h,y=w&&p[(w-1)*g+r*h+s%h],p[n++]=(y+e)%256;break;case 3:for(s=k=0;g>k;s=k+=1)e=t[m++],r=(s-s%h)/h,i=h>s?0:p[n-h],y=w&&p[(w-1)*g+r*h+s%h],p[n++]=(e+Math.floor((i+y)/2))%256;break;case 4:for(s=_=0;g>_;s=_+=1)e=t[m++],r=(s-s%h)/h,i=h>s?0:p[n-h],0===w?y=v=0:(y=p[(w-1)*g+r*h+s%h],v=r&&p[(w-1)*g+(r-1)*h+s%h]),u=i+y-v,c=Math.abs(u-i),f=Math.abs(u-y),d=Math.abs(u-v),l=f>=c&&d>=c?i:d>=f?y:v,p[n++]=(e+l)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}w++}return p},e.prototype.decodePalette=function(){var t,e,n,r,s,i,o,a,u,c;for(r=this.palette,o=this.transparency.indexed||[],i=new Uint8Array((o.length||0)+r.length),s=0,n=r.length,t=0,e=a=0,u=r.length;u>a;e=a+=3)i[s++]=r[e],i[s++]=r[e+1],i[s++]=r[e+2],i[s++]=null!=(c=o[t++])?c:255;return i},e.prototype.copyToImageData=function(t,e){var n,r,s,i,o,a,u,c,l,f,d;if(r=this.colors,l=null,n=this.hasAlphaChannel,this.palette.length&&(l=null!=(d=this._decodedPalette)?d:this._decodedPalette=this.decodePalette(),r=4,n=!0),s=t.data||t,c=s.length,o=l||e,i=a=0,1===r)for(;c>i;)u=l?4*e[i/4]:a,f=o[u++],s[i++]=f,s[i++]=f,s[i++]=f,s[i++]=n?o[u++]:255,a=u;else for(;c>i;)u=l?4*e[i/4]:a,s[i++]=o[u++],s[i++]=o[u++],s[i++]=o[u++],s[i++]=n?o[u++]:255,a=u},e.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};try{c=t.document.createElement("canvas"),l=c.getContext("2d")}catch(f){return-1}return u=function(t){var e;return l.width=t.width,l.height=t.height,l.clearRect(0,0,t.width,t.height),l.putImageData(t,0,0),e=new Image,e.src=c.toDataURL(),e},e.prototype.decodeFrames=function(t){var e,n,r,s,i,o,a,c;if(this.animation){for(a=this.animation.frames,c=[],n=i=0,o=a.length;o>i;n=++i)e=a[n],r=t.createImageData(e.width,e.height),s=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(r,s),e.imageData=r,c.push(e.image=u(r));return c}},e.prototype.renderFrame=function(t,e){var n,i,o;return i=this.animation.frames,n=i[e],o=i[e-1],0===e&&t.clearRect(0,0,this.width,this.height),(null!=o?o.disposeOp:void 0)===s?t.clearRect(o.xOffset,o.yOffset,o.width,o.height):(null!=o?o.disposeOp:void 0)===a&&t.putImageData(o.imageData,o.xOffset,o.yOffset),n.blendOp===r&&t.clearRect(n.xOffset,n.yOffset,n.width,n.height),t.drawImage(n.image,n.xOffset,n.yOffset)},e.prototype.animate=function(t){var e,n,r,s,i,o,a=this;return n=0,o=this.animation,s=o.numFrames,r=o.frames,i=o.numPlays,(e=function(){var o,u;return o=n++%s,u=r[o],a.renderFrame(t,o),s>1&&i>n/s?a.animation._timeout=setTimeout(e,u.delay):void 0})()},e.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},e.prototype.render=function(t){var e,n;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(n=e.createImageData(this.width,this.height),this.copyToImageData(n,this.decodePixels()),e.putImageData(n,0,0))},e}(),t.PNG=e}("undefined"!=typeof window&&window||this);var i=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(t){var e=this.buffer,n=e?e.byteLength:0;if(n>t)return e;for(var r=512;t>r;)r<<=1;for(var s=new Uint8Array(r),i=0;n>i;++i)s[i]=e[i];return this.buffer=s},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var n=e+t;!this.eof&&this.bufferLength<n;)this.readBlock();var r=this.bufferLength;n>r&&(n=r)}else{for(;!this.eof;)this.readBlock();var n=this.bufferLength}return this.pos=n,this.buffer.subarray(e,n)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,n){for(var r=t+e;this.bufferLength<=r&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,n)},skip:function(t){t||(t=1),this.pos+=t},reset:function(){this.pos=0}},t}(),o=function(){function t(t){throw new Error(t)}function e(e){var n=0,r=e[n++],s=e[n++];(-1==r||-1==s)&&t("Invalid header in flate stream"),8!=(15&r)&&t("Unknown compression method in flate stream"),((r<<8)+s)%31!=0&&t("Bad FCHECK in flate stream"),32&s&&t("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=n,this.codeSize=0,this.codeBuf=0,i.call(this)}if("undefined"!=typeof Uint32Array){var n=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),r=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),s=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],a=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return e.prototype=Object.create(i.prototype),e.prototype.getBits=function(e){for(var n,r=this.codeSize,s=this.codeBuf,i=this.bytes,o=this.bytesPos;e>r;)"undefined"==typeof(n=i[o++])&&t("Bad encoding in flate stream"),s|=n<<r,r+=8;return n=s&(1<<e)-1,this.codeBuf=s>>e,this.codeSize=r-=e,this.bytesPos=o,n},e.prototype.getCode=function(e){for(var n=e[0],r=e[1],s=this.codeSize,i=this.codeBuf,o=this.bytes,a=this.bytesPos;r>s;){var u;"undefined"==typeof(u=o[a++])&&t("Bad encoding in flate stream"),i|=u<<s,s+=8}var c=n[i&(1<<r)-1],l=c>>16,f=65535&c;return(0==s||l>s||0==l)&&t("Bad encoding in flate stream"),this.codeBuf=i>>l,this.codeSize=s-l,this.bytesPos=a,f},e.prototype.generateHuffmanTable=function(t){for(var e=t.length,n=0,r=0;e>r;++r)t[r]>n&&(n=t[r]);for(var s=1<<n,i=new Uint32Array(s),o=1,a=0,u=2;n>=o;++o,a<<=1,u<<=1)for(var c=0;e>c;++c)if(t[c]==o){for(var l=0,f=a,r=0;o>r;++r)l=l<<1|1&f,f>>=1;for(var r=l;s>r;r+=u)i[r]=o<<16|c;++a}return[i,n]},e.prototype.readBlock=function(){function e(t,e,n,r,s){for(var i=t.getBits(n)+r;i-- >0;)e[k++]=s}var i=this.getBits(3);if(1&i&&(this.eof=!0),i>>=1,0==i){var u,c=this.bytes,l=this.bytesPos;"undefined"==typeof(u=c[l++])&&t("Bad block header in flate stream");var f=u;"undefined"==typeof(u=c[l++])&&t("Bad block header in flate stream"),f|=u<<8,"undefined"==typeof(u=c[l++])&&t("Bad block header in flate stream");var d=u;"undefined"==typeof(u=c[l++])&&t("Bad block header in flate stream"),d|=u<<8,d!=(65535&~f)&&t("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var h=this.bufferLength,p=this.ensureBuffer(h+f),m=h+f;this.bufferLength=m;for(var w=h;m>w;++w){if("undefined"==typeof(u=c[l++])){this.eof=!0;break}p[w]=u}return void(this.bytesPos=l)}var g,y;if(1==i)g=o,y=a;else if(2==i){for(var v=this.getBits(5)+257,b=this.getBits(5)+1,q=this.getBits(4)+4,x=Array(n.length),k=0;q>k;)x[n[k++]]=this.getBits(3);for(var _=this.generateHuffmanTable(x),A=0,k=0,C=v+b,S=new Array(C);C>k;){var E=this.getCode(_);16==E?e(this,S,2,3,A):17==E?e(this,S,3,3,A=0):18==E?e(this,S,7,11,A=0):S[k++]=A=E}g=this.generateHuffmanTable(S.slice(0,v)),y=this.generateHuffmanTable(S.slice(v,C))}else t("Unknown block type in flate stream");for(var p=this.buffer,z=p?p.length:0,T=this.bufferLength;;){var I=this.getCode(g);if(256>I)T+1>=z&&(p=this.ensureBuffer(T+1),z=p.length),p[T++]=I;else{if(256==I)return void(this.bufferLength=T);I-=257,I=r[I];var B=I>>16;B>0&&(B=this.getBits(B));var A=(65535&I)+B;I=this.getCode(y),I=s[I],B=I>>16,B>0&&(B=this.getBits(B));var O=(65535&I)+B;T+A>=z&&(p=this.ensureBuffer(T+A),z=p.length);for(var P=0;A>P;++P,++T)p[T]=p[T-O]}}},e}}();!function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";"undefined"==typeof t.btoa&&(t.btoa=function(t){var n,r,s,i,o,a,u,c,l=0,f=0,d="",h=[];if(!t)return t;do n=t.charCodeAt(l++),r=t.charCodeAt(l++),s=t.charCodeAt(l++),c=n<<16|r<<8|s,i=c>>18&63,o=c>>12&63,a=c>>6&63,u=63&c,h[f++]=e.charAt(i)+e.charAt(o)+e.charAt(a)+e.charAt(u);while(l<t.length);d=h.join("");var p=t.length%3;return(p?d.slice(0,p-3):d)+"===".slice(p||3)}),"undefined"==typeof t.atob&&(t.atob=function(t){var n,r,s,i,o,a,u,c,l=0,f=0,d="",h=[];if(!t)return t;t+="";do i=e.indexOf(t.charAt(l++)),o=e.indexOf(t.charAt(l++)),a=e.indexOf(t.charAt(l++)),u=e.indexOf(t.charAt(l++)),c=i<<18|o<<12|a<<6|u,n=c>>16&255,r=c>>8&255,s=255&c,h[f++]=64==a?String.fromCharCode(n):64==u?String.fromCharCode(n,r):String.fromCharCode(n,r,s);while(l<t.length);return d=h.join("")}),Array.prototype.map||(Array.prototype.map=function(t){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var e=Object(this),n=e.length>>>0,r=new Array(n),s=arguments.length>1?arguments[1]:void 0,i=0;n>i;i++)i in e&&(r[i]=t.call(s,e[i],i,e));return r}),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.forEach||(Array.prototype.forEach=function(t,e){if(void 0===this||null===this||"function"!=typeof t)throw new TypeError;for(var n=Object(this),r=n.length>>>0,s=0;r>s;s++)s in n&&t.call(e,n[s],s,n)}),Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(s){if("object"!=typeof s&&("function"!=typeof s||null===s))throw new TypeError;var i,o,a=[];for(i in s)t.call(s,i)&&a.push(i);if(e)for(o=0;r>o;o++)t.call(s,n[o])&&a.push(n[o]);return a}}()),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/g,"")}),String.prototype.trimRight||(String.prototype.trimRight=function(){return this.replace(/\s+$/g,"")})}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this)}({},function(){return this}()),function(API){function initOptions(userOptions){var settings=extend(defaultOptions(),userOptions);"undefined"!=typeof settings.extendWidth&&(settings.tableWidth=settings.extendWidth?"auto":"wrap",console.error("Use of deprecated option: extendWidth, use tableWidth instead.")),"undefined"!=typeof settings.margins&&("undefined"==typeof settings.margin&&(settings.margin=settings.margins),console.error("Use of deprecated option: margins, use margin instead.")),[["padding","cellPadding"],["lineHeight","rowHeight"],"fontSize","overflow"].forEach(function(o){var deprecatedOption="string"==typeof o?o:o[0],style="string"==typeof o?o:o[1];"undefined"!=typeof settings[deprecatedOption]&&("undefined"==typeof settings.styles[style]&&(settings.styles[style]=settings[deprecatedOption]),console.error("Use of deprecated option: "+deprecatedOption+", use the style "+style+" instead."))});var marginSetting=settings.margin;return settings.margin={},"number"==typeof marginSetting.horizontal&&(marginSetting.right=marginSetting.horizontal,marginSetting.left=marginSetting.horizontal),"number"==typeof marginSetting.vertical&&(marginSetting.top=marginSetting.vertical,marginSetting.bottom=marginSetting.vertical),["top","right","bottom","left"].forEach(function(side,i){if("number"==typeof marginSetting)settings.margin[side]=marginSetting;else{var key=Array.isArray(marginSetting)?i:side;settings.margin[side]="number"==typeof marginSetting[key]?marginSetting[key]:40}}),
settings}function createModels(inputHeaders,inputData){table=new Table,table.x=settings.margin.left;var splitRegex=/\r\n|\r|\n/g,headerRow=new Row(inputHeaders);headerRow.index=-1;var themeStyles=extend(defaultStyles,themes[settings.theme].table,themes[settings.theme].header);headerRow.styles=extend(themeStyles,settings.styles,settings.headerStyles),inputHeaders.forEach(function(rawColumn,dataKey){"object"==typeof rawColumn&&(dataKey="undefined"!=typeof rawColumn.dataKey?rawColumn.dataKey:rawColumn.key),"undefined"!=typeof rawColumn.width&&console.error("Use of deprecated option: column.width, use column.styles.columnWidth instead.");var col=new Column(dataKey);col.styles=settings.columnStyles[col.dataKey]||{},table.columns.push(col);var cell=new Cell;cell.raw="object"==typeof rawColumn?rawColumn.title:rawColumn,cell.styles=headerRow.styles,cell.text=""+cell.raw,cell.contentWidth=2*cell.styles.cellPadding+getStringWidth(cell.text,cell.styles),cell.text=cell.text.split(splitRegex),headerRow.cells[dataKey]=cell,settings.createdHeaderCell(cell,{column:col,row:headerRow,settings:settings})}),table.headerRow=headerRow,inputData.forEach(function(rawRow,i){var row=new Row(rawRow),isAlternate=i%2===0,themeStyles=extend(defaultStyles,themes[settings.theme].table,isAlternate?themes[settings.theme].alternateRow:{}),userStyles=extend(settings.styles,settings.bodyStyles,isAlternate?settings.alternateRowStyles:{});row.styles=extend(themeStyles,userStyles),row.index=i,table.columns.forEach(function(column){var cell=new Cell;cell.raw=rawRow[column.dataKey],cell.styles=extend(row.styles,column.styles),cell.text="undefined"!=typeof cell.raw?""+cell.raw:"",row.cells[column.dataKey]=cell,settings.createdCell(cell,hooksData({column:column,row:row})),cell.contentWidth=2*cell.styles.cellPadding+getStringWidth(cell.text,cell.styles),cell.text=cell.text.split(splitRegex)}),table.rows.push(row)})}function calculateWidths(){var tableContentWidth=0;table.columns.forEach(function(column){column.contentWidth=table.headerRow.cells[column.dataKey].contentWidth,table.rows.forEach(function(row){var cellWidth=row.cells[column.dataKey].contentWidth;cellWidth>column.contentWidth&&(column.contentWidth=cellWidth)}),column.width=column.contentWidth,tableContentWidth+=column.contentWidth}),table.contentWidth=tableContentWidth;var maxTableWidth=doc.internal.pageSize.width-settings.margin.left-settings.margin.right,preferredTableWidth=maxTableWidth;"number"==typeof settings.tableWidth?preferredTableWidth=settings.tableWidth:"wrap"===settings.tableWidth&&(preferredTableWidth=table.contentWidth),table.width=preferredTableWidth<maxTableWidth?preferredTableWidth:maxTableWidth;var dynamicColumns=[],dynamicColumnsContentWidth=0,fairWidth=table.width/table.columns.length,staticWidth=0;table.columns.forEach(function(column){var colStyles=extend(defaultStyles,themes[settings.theme].table,settings.styles,column.styles);"wrap"===colStyles.columnWidth?column.width=column.contentWidth:"number"==typeof colStyles.columnWidth?column.width=colStyles.columnWidth:("auto"===colStyles.columnWidth,column.contentWidth<=fairWidth&&table.contentWidth>table.width?column.width=column.contentWidth:(dynamicColumns.push(column),dynamicColumnsContentWidth+=column.contentWidth,column.width=0)),staticWidth+=column.width}),distributeWidth(dynamicColumns,staticWidth,dynamicColumnsContentWidth,fairWidth),table.height=0;var all=table.rows.concat(table.headerRow);all.forEach(function(row,i){var lineBreakCount=0,cursorX=table.x;table.columns.forEach(function(col){var cell=row.cells[col.dataKey];col.x=cursorX,applyStyles(cell.styles);var textSpace=col.width-2*cell.styles.cellPadding;"linebreak"===cell.styles.overflow?cell.text=doc.splitTextToSize(cell.text,textSpace+1,{fontSize:cell.styles.fontSize}):"ellipsize"===cell.styles.overflow?cell.text=ellipsize(cell.text,textSpace,cell.styles):"visible"===cell.styles.overflow||("hidden"===cell.styles.overflow?cell.text=ellipsize(cell.text,textSpace,cell.styles,""):"function"==typeof cell.styles.overflow?cell.text=cell.styles.overflow(cell.text,textSpace):console.error("Unrecognized overflow type: "+cell.styles.overflow));var count=Array.isArray(cell.text)?cell.text.length-1:0;count>lineBreakCount&&(lineBreakCount=count),cursorX+=col.width}),row.heightStyle=row.styles.rowHeight,row.height=row.heightStyle+lineBreakCount*row.styles.fontSize*FONT_ROW_RATIO,table.height+=row.height})}function distributeWidth(dynamicColumns,staticWidth,dynamicColumnsContentWidth,fairWidth){for(var extraWidth=table.width-staticWidth-dynamicColumnsContentWidth,i=0;i<dynamicColumns.length;i++){var col=dynamicColumns[i],ratio=col.contentWidth/dynamicColumnsContentWidth,isNoneDynamic=col.contentWidth+extraWidth*ratio<fairWidth;if(extraWidth<0&&isNoneDynamic){dynamicColumns.splice(i,1),dynamicColumnsContentWidth-=col.contentWidth,col.width=fairWidth,staticWidth+=col.width,distributeWidth(dynamicColumns,staticWidth,dynamicColumnsContentWidth,fairWidth);break}col.width=col.contentWidth+extraWidth*ratio}}function printRows(){table.rows.forEach(function(row,i){if(isNewPage(row.height)){addPage()}row.y=cursor.y,settings.drawRow(row,hooksData({row:row}))!==!1&&printRow(row,settings.drawCell)})}function addPage(){settings.afterPageContent(hooksData()),doc.addPage(),pageCount++,cursor={x:settings.margin.left,y:settings.margin.top},settings.beforePageContent(hooksData()),settings.drawHeaderRow(table.headerRow,hooksData({row:table.headerRow}))!==!1&&printRow(table.headerRow,settings.drawHeaderCell)}function isNewPage(rowHeight){var afterRowPos=cursor.y+rowHeight+settings.margin.bottom;return afterRowPos>=doc.internal.pageSize.height}function printRow(row,hookHandler){for(var i=0;i<table.columns.length;i++){var column=table.columns[i],cell=row.cells[column.dataKey];if(cell){applyStyles(cell.styles),cell.x=column.x,cell.y=cursor.y,cell.height=row.height,cell.width=column.width,"top"===cell.styles.valign?cell.textPos.y=cursor.y+cell.styles.cellPadding:"bottom"===cell.styles.valign?cell.textPos.y=cursor.y+row.height-cell.styles.cellPadding:cell.textPos.y=cursor.y+row.height/2,"right"===cell.styles.halign?cell.textPos.x=cell.x+cell.width-cell.styles.cellPadding:"center"===cell.styles.halign?cell.textPos.x=cell.x+cell.width/2:cell.textPos.x=cell.x+cell.styles.cellPadding;var data=hooksData({column:column,row:row});hookHandler(cell,data)!==!1&&(doc.rect(cell.x,cell.y,cell.width,cell.height,cell.styles.fillStyle),doc.autoTableText(cell.text,cell.textPos.x,cell.textPos.y,{halign:cell.styles.halign,valign:cell.styles.valign}))}}cursor.y+=row.height}function applyStyles(styles){var arr=[{func:doc.setFillColor,value:styles.fillColor},{func:doc.setTextColor,value:styles.textColor},{func:doc.setFontStyle,value:styles.fontStyle},{func:doc.setDrawColor,value:styles.lineColor},{func:doc.setLineWidth,value:styles.lineWidth},{func:doc.setFont,value:styles.font},{func:doc.setFontSize,value:styles.fontSize}];arr.forEach(function(obj){"undefined"!=typeof obj.value&&(obj.value.constructor===Array?obj.func.apply(this,obj.value):obj.func(obj.value))})}function hooksData(additionalData){additionalData=additionalData||{};var data={pageCount:pageCount,settings:settings,table:table,cursor:cursor};for(var prop in additionalData)additionalData.hasOwnProperty(prop)&&(data[prop]=additionalData[prop]);return data}function ellipsize(text,width,styles,ellipsizeStr){if(ellipsizeStr="undefined"!=typeof ellipsizeStr?ellipsizeStr:"...",Array.isArray(text))return text.forEach(function(str,i){text[i]=ellipsize(str,width,styles,ellipsizeStr)}),text;if(width>=getStringWidth(text,styles))return text;for(;width<getStringWidth(text+ellipsizeStr,styles)&&!(text.length<2);)text=text.substring(0,text.length-1);return text.trim()+ellipsizeStr}function getStringWidth(text,styles){applyStyles(styles);var w=doc.getStringUnitWidth(text);return w*styles.fontSize}function extend(defaults){var prop,extended={};for(prop in defaults)defaults.hasOwnProperty(prop)&&(extended[prop]=defaults[prop]);for(var i=1;i<arguments.length;i++){var options=arguments[i];for(prop in options)options.hasOwnProperty(prop)&&("object"!=typeof options[prop]||Array.isArray(options[prop])?extended[prop]=options[prop]:extended[prop]=options[prop])}return extended}var doc,cursor,settings,pageCount,table,FONT_ROW_RATIO=1.15,defaultStyles={cellPadding:5,fontSize:10,font:"helvetica",lineColor:200,lineWidth:.1,fontStyle:"normal",overflow:"ellipsize",fillColor:255,textColor:20,halign:"left",valign:"top",fillStyle:"F",rowHeight:20,columnWidth:"auto"},themes={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal",fillStyle:"F"},header:{textColor:255,fillColor:[41,128,185],rowHeight:23,fontStyle:"bold"},body:{},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1,fillStyle:"DF"},header:{textColor:255,fillColor:[26,188,156],rowHeight:23,fillStyle:"F",fontStyle:"bold"},body:{},alternateRow:{}},plain:{header:{fontStyle:"bold"}}},defaultOptions=function(){return{theme:"striped",styles:{},headerStyles:{},bodyStyles:{},alternateRowStyles:{},columnStyles:{},startY:!1,margin:40,pageBreak:"auto",tableWidth:"auto",createdHeaderCell:function(cell,data){},createdCell:function(cell,data){},drawHeaderRow:function(row,data){},drawRow:function(row,data){},drawHeaderCell:function(cell,data){},drawCell:function(cell,data){},beforePageContent:function(data){},afterPageContent:function(data){}}};API.autoTable=function(headers,data,options){doc=this,settings=initOptions(options||{}),pageCount=1,cursor={y:settings.startY===!1?settings.margin.top:settings.startY};var userStyles={textColor:30,fontSize:doc.internal.getFontSize(),fontStyle:doc.internal.getFont().fontStyle};createModels(headers,data),calculateWidths();var firstRowHeight=table.rows[0]&&"auto"===settings.pageBreak?table.rows[0].height:0,minTableBottomPos=settings.startY+settings.margin.bottom+table.headerRow.height+firstRowHeight;return"avoid"===settings.pageBreak&&(minTableBottomPos+=table.height),("always"===settings.pageBreak&&settings.startY!==!1||settings.startY!==!1&&minTableBottomPos>doc.internal.pageSize.height)&&(doc.addPage(),cursor.y=settings.margin.top),applyStyles(userStyles),settings.beforePageContent(hooksData()),settings.drawHeaderRow(table.headerRow,hooksData({row:table.headerRow}))!==!1&&printRow(table.headerRow,settings.drawHeaderCell),applyStyles(userStyles),printRows(),settings.afterPageContent(hooksData()),applyStyles(userStyles),this},API.autoTableEndPosY=function(){return"undefined"==typeof cursor||"undefined"==typeof cursor.y?0:cursor.y},API.autoTableHtmlToJson=function(table){var tableRow,rowData,i,j,data=[],headers=[],header=table.rows[0];for(i=0;i<header.cells.length;i++)headers.push("undefined"!=typeof header.cells[i]?header.cells[i].textContent:"");for(i=1;i<table.rows.length;i++){for(tableRow=table.rows[i],rowData=[],j=0;j<header.cells.length;j++)rowData.push("undefined"!=typeof tableRow.cells[j]?tableRow.cells[j].textContent:"");data.push(rowData)}return{columns:headers,data:data,rows:data}},API.autoTableText=function(text,x,y,styles){"number"==typeof x&&"number"==typeof y||console.error("The x and y parameters are required. Missing for the text: ",text);var fontSize=doc.internal.getFontSize()/doc.internal.scaleFactor,lineHeightProportion=FONT_ROW_RATIO,splitRegex=/\r\n|\r|\n/g,splittedText=null,lineCount=1;if("middle"!==styles.valign&&"bottom"!==styles.valign&&"center"!==styles.halign&&"right"!==styles.halign||(splittedText="string"==typeof text?text.split(splitRegex):text,lineCount=splittedText.length||1),y+=fontSize*(2-lineHeightProportion),"middle"===styles.valign?y-=lineCount/2*fontSize:"bottom"===styles.valign&&(y-=lineCount*fontSize),"center"===styles.halign||"right"===styles.halign){var alignSize=fontSize;if("center"===styles.halign&&(alignSize*=.5),lineCount>=1){for(var iLine=0;iLine<splittedText.length;iLine++)doc.text(splittedText[iLine],x-doc.getStringUnitWidth(splittedText[iLine])*alignSize,y),y+=fontSize;return doc}x-=doc.getStringUnitWidth(text)*alignSize}return doc.text(text,x,y),doc}}(jsPDF.API);var Table=function Table(){_classCallCheck(this,Table),this.height=0,this.width=0,this.x=0,this.y=0,this.contentWidth=0,this.rows=[],this.columns=[],this.headerRow=null,this.settings={}},Row=function Row(raw){_classCallCheck(this,Row),this.raw=raw||{},this.index=0,this.styles={},this.cells={},this.height=0,this.y=0},Cell=function Cell(raw){_classCallCheck(this,Cell),this.raw=raw,this.styles={},this.text="",this.contentWidth=0,this.textPos={},this.height=0,this.width=0,this.x=0,this.y=0},Column=function Column(dataKey){_classCallCheck(this,Column),this.dataKey=dataKey,this.options={},this.styles={},this.contentWidth=0,this.width=0,this.x=0};!function(d){d.fn.extend({tableExport:function(t){function Q(b){var a=[];return d(b).find("thead").first().find("th").each(function(b,f){void 0!==d(f).attr("data-field")&&(a[b]=d(f).attr("data-field"))}),a}function B(b,g,e,f,m){if(-1==d.inArray(e,a.ignoreRow)&&-1==d.inArray(e-f,a.ignoreRow)){var z=d(b).filter(function(){return"none"!=d(this).data("tableexport-display")&&(d(this).is(":visible")||"always"==d(this).data("tableexport-display")||"always"==d(this).closest("table").data("tableexport-display"))}).find(g),L=0;if(z.each(function(b){if("always"==d(this).data("tableexport-display")||"none"!=d(this).css("display")&&"hidden"!=d(this).css("visibility")&&"none"!=d(this).data("tableexport-display")){var g=b,f=!1;if(0<a.ignoreColumn.length&&("string"==typeof a.ignoreColumn[0]?H.length>g&&"undefined"!=typeof H[g]&&-1!=d.inArray(H[g],a.ignoreColumn)&&(f=!0):"number"!=typeof a.ignoreColumn[0]||-1==d.inArray(g,a.ignoreColumn)&&-1==d.inArray(g-z.length,a.ignoreColumn)||(f=!0)),0==f&&"function"==typeof m){var h,f=0,k=0;if("undefined"!=typeof x[e]&&0<x[e].length)for(g=0;g<=b;g++)"undefined"!=typeof x[e][g]&&(m(null,e,g),delete x[e][g],b++);for(d(this).is("[colspan]")&&(f=parseInt(d(this).attr("colspan")),L+=0<f?f-1:0),d(this).is("[rowspan]")&&(k=parseInt(d(this).attr("rowspan"))),m(this,e,b),g=0;g<f-1;g++)m(null,e,b+g);if(k)for(h=1;h<k;h++)for("undefined"==typeof x[e+h]&&(x[e+h]=[]),x[e+h][b+L]="",g=1;g<f;g++)x[e+h][b+L-g]=""}}}),"undefined"!=typeof x[e]&&0<x[e].length)for(c=0;c<=x[e].length;c++)"undefined"!=typeof x[e][c]&&(m(null,e,c),delete x[e][c])}}function T(b){if(!0===a.consoleLog&&console.log(b.output()),"string"===a.outputMode)return b.output();if("base64"===a.outputMode)return F(b.output());try{var g=b.output("blob");saveAs(g,a.fileName+".pdf")}catch(e){G(a.fileName+".pdf","data:application/pdf;base64,",b.output())}}function U(b,a,e){var f=0;if("undefined"!=typeof e&&(f=e.colspan),0<=f){for(var m=b.width,d=b.textPos.x,h=a.table.columns.indexOf(a.column),k=1;k<f;k++)m+=a.table.columns[h+k].width;return 1<f&&("right"===b.styles.halign?d=b.textPos.x+m-b.width:"center"===b.styles.halign&&(d=b.textPos.x+(m-b.width)/2)),b.width=m,b.textPos.x=d,"undefined"!=typeof e&&1<e.rowspan&&(b.height*=e.rowspan),"middle"!==b.styles.valign&&"bottom"!==b.styles.valign||(e=("string"==typeof b.text?b.text.split(/\r\n|\r|\n/g):b.text).length||1,2<e&&(b.textPos.y-=(2-1.15)/2*a.row.styles.fontSize*(e-2)/3)),!0}return!1}function V(b,g,e){g.each(function(){var g=d(this).children();if(d(this).is("div")){var m=M(E(this,"background-color"),[255,255,255]),z=M(E(this,"border-top-color"),[0,0,0]),h=N(this,"border-top-width",a.jspdf.unit),k=this.getBoundingClientRect(),l=this.offsetLeft*e.dw,n=this.offsetTop*e.dh,p=k.width*e.dw,k=k.height*e.dh;e.doc.setDrawColor.apply(void 0,z),e.doc.setFillColor.apply(void 0,m),e.doc.setLineWidth(h),e.doc.rect(b.x+l,b.y+n,p,k,h?"FD":"F")}"undefined"!=typeof g&&0<g.length&&V(b,g,e)})}function R(b,a,e){return b.replace(new RegExp(a.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),e)}function aa(b){return b=R(b||"0",a.numbers.html.decimalMark,"."),b=R(b,a.numbers.html.thousandsSeparator,""),("number"==typeof b||!1!==jQuery.isNumeric(b))&&b}function y(b,g,e){var f="";if(null!=b){b=d(b);var m;if(m=b[0].hasAttribute("data-tableexport-value")?b.data("tableexport-value"):b.html(),"function"==typeof a.onCellHtmlData&&(m=a.onCellHtmlData(b,g,e,m)),!0===a.htmlContent)f=d.trim(m);else{var z=m.replace(/\n/g,"\u2028").replace(/<br\s*[\/]?>/gi,"");if(m=d("<div/>").html(z).contents(),z="",d.each(m.text().split("\u2028"),function(b,a){0<b&&(z+=" "),z+=d.trim(a)}),d.each(z.split(""),function(b,a){0<b&&(f+="\n"),f+=d.trim(a).replace(/\u00AD/g,"")}),(a.numbers.html.decimalMark!=a.numbers.output.decimalMark||a.numbers.html.thousandsSeparator!=a.numbers.output.thousandsSeparator)&&(m=aa(f),!1!==m)){var h=(""+m).split(".");1==h.length&&(h[1]="");var k=3<h[0].length?h[0].length%3:0,f=(0>m?"-":"")+(a.numbers.output.thousandsSeparator?(k?h[0].substr(0,k)+a.numbers.output.thousandsSeparator:"")+h[0].substr(k).replace(/(\d{3})(?=\d)/g,"$1"+a.numbers.output.thousandsSeparator):h[0])+(h[1].length?a.numbers.output.decimalMark+h[1]:"")}}!0===a.escape&&(f=escape(f)),"function"==typeof a.onCellData&&(f=a.onCellData(b,g,e,f))}return f}function ba(b,a,e){return a+"-"+e.toLowerCase()}function M(b,a){var e=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(b),f=a;return e&&(f=[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]),f}function W(b){var a=E(b,"text-align"),e=E(b,"font-weight"),f=E(b,"font-style"),m="";return"start"==a&&(a="rtl"==E(b,"direction")?"right":"left"),700<=e&&(m="bold"),"italic"==f&&(m+=f),""==m&&(m="normal"),a={style:{align:a,bcolor:M(E(b,"background-color"),[255,255,255]),color:M(E(b,"color"),[0,0,0]),fstyle:m},colspan:parseInt(d(b).attr("colspan"))||0,rowspan:parseInt(d(b).attr("rowspan"))||0},null!==b&&(b=b.getBoundingClientRect(),a.rect={width:b.width,height:b.height}),a}function E(b,a){try{return window.getComputedStyle?(a=a.replace(/([a-z])([A-Z])/,ba),window.getComputedStyle(b,null).getPropertyValue(a)):b.currentStyle?b.currentStyle[a]:b.style[a]}catch(e){}return""}function N(a,g,e){if(g=E(a,g).match(/\d+/),null!==g){g=g[0],a=a.parentElement;var f=document.createElement("div");return f.style.overflow="hidden",f.style.visibility="hidden",a.appendChild(f),f.style.width=100+e,e=100/f.offsetWidth,a.removeChild(f),g*e}return 0}function G(a,g,e){var f=window.navigator.userAgent;0<f.indexOf("MSIE ")||f.match(/Trident.*rv\:11\./)?(g=document.createElement("iframe"))&&(document.body.appendChild(g),g.setAttribute("style","display:none"),g.contentDocument.open("txt/html","replace"),g.contentDocument.write(e),g.contentDocument.close(),g.focus(),g.contentDocument.execCommand("SaveAs",!0,a),document.body.removeChild(g)):(f=document.createElement("a"))&&(f.style.display="none",f.download=a,0<=g.toLowerCase().indexOf("base64,")?f.href=g+F(e):f.href=g+encodeURIComponent(e),document.body.appendChild(f),document.createEvent?(null==O&&(O=document.createEvent("MouseEvents")),O.initEvent("click",!0,!1),f.dispatchEvent(O)):document.createEventObject?f.fireEvent("onclick"):"function"==typeof f.onclick&&f.onclick(),document.body.removeChild(f))}function F(a){var e,f,m,d,h,k,g="",l=0;for(a=a.replace(/\x0d\x0a/g,"\n"),f="",m=0;m<a.length;m++)d=a.charCodeAt(m),128>d?f+=String.fromCharCode(d):(127<d&&2048>d?f+=String.fromCharCode(d>>6|192):(f+=String.fromCharCode(d>>12|224),f+=String.fromCharCode(d>>6&63|128)),f+=String.fromCharCode(63&d|128));for(a=f;l<a.length;)e=a.charCodeAt(l++),f=a.charCodeAt(l++),m=a.charCodeAt(l++),d=e>>2,e=(3&e)<<4|f>>4,h=(15&f)<<2|m>>6,k=63&m,isNaN(f)?h=k=64:isNaN(m)&&(k=64),g=g+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(k);return g}var a={consoleLog:!1,csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,displayTableName:!1,escape:!1,excelstyles:[],fileName:"tableExport",htmlContent:!1,ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"left",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"center"},alternateRowStyles:{fillColor:245},tableExport:{onAfterAutotable:null,onBeforeAutotable:null,onTable:null}}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onCellData:null,onCellHtmlData:null,outputMode:"file",tbodySelector:"tr",theadSelector:"tr",tableName:"myTableName",type:"csv",worksheetName:"xlsWorksheetName"},u=this,O=null,r=[],q=[],p=0,x=[],l="",H=[];if(d.extend(!0,a,t),H=Q(u),"csv"==a.type||"txt"==a.type){t=function(b,g,e,f){return q=d(u).find(b).first().find(g),q.each(function(){l="",B(this,e,p,f+q.length,function(b,e,f){var d=l,g="";null!=b&&(b=y(b,e,f),e=null===b||""==b?"":b.toString(),b instanceof Date?g=a.csvEnclosure+b.toLocaleString()+a.csvEnclosure:(g=R(e,a.csvEnclosure,a.csvEnclosure+a.csvEnclosure),(0<=g.indexOf(a.csvSeparator)||/[\r\n ]/g.test(g))&&(g=a.csvEnclosure+g+a.csvEnclosure))),l=d+(g+a.csvSeparator)}),l=d.trim(l).substring(0,l.length-1),0<l.length&&(0<A.length&&(A+="\n"),A+=l),p++}),q.length};var A="",C=0,p=0,C=C+t("thead",a.theadSelector,"th,td",C),C=C+t("tbody",a.tbodySelector,"td",C);if(t("tfoot",a.tbodySelector,"td",C),A+="\n",!0===a.consoleLog&&console.log(A),"string"===a.outputMode)return A;if("base64"===a.outputMode)return F(A);try{var D=new Blob([A],{type:"text/"+("csv"==a.type?"csv":"plain")+";charset=utf-8"});saveAs(D,a.fileName+"."+a.type,"csv"!=a.type||!1===a.csvUseBOM)}catch(b){G(a.fileName+"."+a.type,"data:text/"+("csv"==a.type?"csv":"plain")+";charset=utf-8,"+("csv"==a.type&&a.csvUseBOM?"\ufeff":""),A)}}else if("sql"==a.type){var p=0,n="INSERT INTO `"+a.tableName+"` (",r=d(u).find("thead").first().find(a.theadSelector);if(r.each(function(){B(this,"th,td",p,r.length,function(a,g,e){n+="'"+y(a,g,e)+"',"}),p++,n=d.trim(n),n=d.trim(n).substring(0,n.length-1)}),n+=") VALUES ",q=d(u).find("tbody").first().find(a.tbodySelector),q.each(function(){l="",B(this,"td",p,r.length+q.length,function(a,g,e){l+="'"+y(a,g,e)+"',"}),3<l.length&&(n+="("+l,n=d.trim(n).substring(0,n.length-1),n+="),"),p++}),n=d.trim(n).substring(0,n.length-1),n+=";",!0===a.consoleLog&&console.log(n),"string"===a.outputMode)return n;if("base64"===a.outputMode)return F(n);try{D=new Blob([n],{type:"text/plain;charset=utf-8"}),saveAs(D,a.fileName+".sql")}catch(b){G(a.fileName+".sql","data:application/sql;charset=utf-8,",n)}}else if("json"==a.type){var I=[],r=d(u).find("thead").first().find(a.theadSelector);r.each(function(){var a=[];B(this,"th,td",p,r.length,function(g,e,f){a.push(y(g,e,f))}),I.push(a)});var S=[],q=d(u).find("tbody").first().find(a.tbodySelector);if(q.each(function(){var a={},g=0;B(this,"td",p,r.length+q.length,function(e,f,d){I.length?a[I[I.length-1][g]]=y(e,f,d):a[g]=y(e,f,d),g++}),0==d.isEmptyObject(a)&&S.push(a),p++}),t="",t="head"==a.jsonScope?JSON.stringify(I):"data"==a.jsonScope?JSON.stringify(S):JSON.stringify({header:I,data:S}),!0===a.consoleLog&&console.log(t),"string"===a.outputMode)return t;if("base64"===a.outputMode)return F(t);try{D=new Blob([t],{type:"application/json;charset=utf-8"}),saveAs(D,a.fileName+".json")}catch(b){G(a.fileName+".json","data:application/json;charset=utf-8;base64,",t)}}else if("xml"===a.type){var p=0,v='<?xml version="1.0" encoding="utf-8"?>',v=v+"<tabledata><fields>",r=d(u).find("thead").first().find(a.theadSelector);r.each(function(){B(this,"th,td",p,q.length,function(a,d,e){v+="<field>"+y(a,d,e)+"</field>"}),p++});var v=v+"</fields><data>",X=1,q=d(u).find("tbody").first().find(a.tbodySelector);if(q.each(function(){var a=1;l="",B(this,"td",p,r.length+q.length,function(d,e,f){l+="<column-"+a+">"+y(d,e,f)+"</column-"+a+">",a++}),0<l.length&&"<column-1></column-1>"!=l&&(v+='<row id="'+X+'">'+l+"</row>",X++),p++}),v+="</data></tabledata>",!0===a.consoleLog&&console.log(v),"string"===a.outputMode)return v;if("base64"===a.outputMode)return F(v);try{D=new Blob([v],{type:"application/xml;charset=utf-8"}),saveAs(D,a.fileName+".xml")}catch(b){G(a.fileName+".xml","data:application/xml;charset=utf-8;base64,",v)}}else if("excel"==a.type||"xls"==a.type||"word"==a.type||"doc"==a.type){t="excel"==a.type||"xls"==a.type?"excel":"word";var C="excel"==t?"xls":"doc",k="xls"==C?'xmlns:x="urn:schemas-microsoft-com:office:excel"':'xmlns:w="urn:schemas-microsoft-com:office:word"',w="";if(d(u).filter(function(){return"none"!=d(this).data("tableexport-display")&&(d(this).is(":visible")||"always"==d(this).data("tableexport-display"))}).each(function(){p=0,H=Q(this),w+="<table><thead>",r=d(this).find("thead").first().find(a.theadSelector),r.each(function(){l="",B(this,"th,td",p,r.length,function(b,g,e){if(null!=b){var f="";l+="<th";for(var m in a.excelstyles)if(a.excelstyles.hasOwnProperty(m)){var h=d(b).css(a.excelstyles[m]);""!=h&&"0px none rgb(0, 0, 0)"!=h&&(""==f&&(f='style="'),f+=a.excelstyles[m]+":"+h+";")}""!=f&&(l+=" "+f+'"'),d(b).is("[colspan]")&&(l+=' colspan="'+d(b).attr("colspan")+'"'),d(b).is("[rowspan]")&&(l+=' rowspan="'+d(b).attr("rowspan")+'"'),l+=">"+y(b,g,e)+"</th>"}}),0<l.length&&(w+="<tr>"+l+"</tr>"),p++}),w+="</thead><tbody>",q=d(this).find("tbody").first().find(a.tbodySelector),q.each(function(){l="",B(this,"td",p,r.length+q.length,function(b,g,e){if(null!=b){var f="";l+="<td";for(var m in a.excelstyles)if(a.excelstyles.hasOwnProperty(m)){var h=d(b).css(a.excelstyles[m]);""!=h&&"0px none rgb(0, 0, 0)"!=h&&(""==f&&(f='style="'),f+=a.excelstyles[m]+":"+h+";")}""!=f&&(l+=" "+f+'"'),d(b).is("[colspan]")&&(l+=' colspan="'+d(b).attr("colspan")+'"'),d(b).is("[rowspan]")&&(l+=' rowspan="'+d(b).attr("rowspan")+'"'),l+=">"+y(b,g,e)+"</td>"}}),0<l.length&&(w+="<tr>"+l+"</tr>"),p++}),a.displayTableName&&(w+="<tr><td></td></tr><tr><td></td></tr><tr><td>"+y(d("<p>"+a.tableName+"</p>"))+"</td></tr>"),w+="</tbody></table>",!0===a.consoleLog&&console.log(w)}),k='<html xmlns:o="urn:schemas-microsoft-com:office:office" '+k+' xmlns="http://www.w3.org/TR/REC-html40">'+('<meta http-equiv="content-type" content="application/vnd.ms-'+t+'; charset=UTF-8">'),k+="<head>","excel"===t&&(k+="<!--[if gte mso 9]>",k+="<xml>",k+="<x:ExcelWorkbook>",k+="<x:ExcelWorksheets>",k+="<x:ExcelWorksheet>",k+="<x:Name>",k+=a.worksheetName,k+="</x:Name>",k+="<x:WorksheetOptions>",k+="<x:DisplayGridlines/>",k+="</x:WorksheetOptions>",k+="</x:ExcelWorksheet>",k+="</x:ExcelWorksheets>",k+="</x:ExcelWorkbook>",k+="</xml>",k+="<![endif]-->"),k+="</head>",k+="<body>",k+=w,k+="</body>",k+="</html>",!0===a.consoleLog&&console.log(k),"string"===a.outputMode)return k;if("base64"===a.outputMode)return F(k);try{D=new Blob([k],{type:"application/vnd.ms-"+a.type}),saveAs(D,a.fileName+"."+C)}catch(b){G(a.fileName+"."+C,"data:application/vnd.ms-"+t+";base64,",k)}}else if("png"==a.type)html2canvas(d(u)[0],{allowTaint:!0,background:"#fff",onrendered:function(b){b=b.toDataURL(),b=b.substring(22);for(var d=atob(b),e=new ArrayBuffer(d.length),f=new Uint8Array(e),m=0;m<d.length;m++)f[m]=d.charCodeAt(m);if(!0===a.consoleLog&&console.log(d),"string"===a.outputMode)return d;if("base64"===a.outputMode)return F(b);try{var h=new Blob([e],{type:"image/png"});saveAs(h,a.fileName+".png")}catch(k){G(a.fileName+".png","data:image/png;base64,",b)}}});else if("pdf"==a.type)if(!1===a.jspdf.autotable){var D={dim:{w:N(d(u).first().get(0),"width","mm"),h:N(d(u).first().get(0),"height","mm")},pagesplit:!1},Y=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format);Y.addHTML(d(u).first(),a.jspdf.margins.left,a.jspdf.margins.top,D,function(){T(Y)})}else{var h=a.jspdf.autotable.tableExport;if("string"==typeof a.jspdf.format&&"bestfit"===a.jspdf.format.toLowerCase()){var J={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89]},P="",K="",Z=0;d(u).filter(":visible").each(function(){if("none"!=d(this).css("display")){var a=N(d(this).get(0),"width","pt");if(a>Z){a>J.a0[0]&&(P="a0",K="l");for(var g in J)J.hasOwnProperty(g)&&J[g][1]>a&&(P=g,K="l",J[g][0]>a&&(K="p"));Z=a}}}),a.jspdf.format=""==P?"a4":P,a.jspdf.orientation=""==K?"w":K}h.doc=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format),d(u).filter(function(){return"none"!=d(this).data("tableexport-display")&&(d(this).is(":visible")||"always"==d(this).data("tableexport-display"))}).each(function(){var b,g=0;if(H=Q(this),h.columns=[],h.rows=[],h.rowoptions={},"function"==typeof h.onTable&&!1===h.onTable(d(this),a))return!0;a.jspdf.autotable.tableExport=null;var e=d.extend(!0,{},a.jspdf.autotable);a.jspdf.autotable.tableExport=h,e.margin={},d.extend(!0,e.margin,a.jspdf.margins),e.tableExport=h,"function"!=typeof e.beforePageContent&&(e.beforePageContent=function(a){1==a.pageCount&&a.table.rows.concat(a.table.headerRow).forEach(function(b){0<b.height&&(b.height+=(2-1.15)/2*b.styles.fontSize,a.table.height+=(2-1.15)/2*b.styles.fontSize)})}),"function"!=typeof e.createdHeaderCell&&(e.createdHeaderCell=function(a,b){if(a.styles=d.extend({},b.row.styles),"undefined"!=typeof h.columns[b.column.dataKey]){var f=h.columns[b.column.dataKey];if("undefined"!=typeof f.rect){var g;a.contentWidth=f.rect.width,"undefined"!=typeof h.heightRatio&&0!=h.heightRatio||(g=b.row.raw[b.column.dataKey].rowspan?b.row.raw[b.column.dataKey].rect.height/b.row.raw[b.column.dataKey].rowspan:b.row.raw[b.column.dataKey].rect.height,h.heightRatio=a.styles.rowHeight/g),g=b.row.raw[b.column.dataKey].rect.height*h.heightRatio,g>a.styles.rowHeight&&(a.styles.rowHeight=g)}"undefined"!=typeof f.style&&!0!==f.style.hidden&&(a.styles.halign=f.style.align,"inherit"===e.styles.fillColor&&(a.styles.fillColor=f.style.bcolor),"inherit"===e.styles.textColor&&(a.styles.textColor=f.style.color),"inherit"===e.styles.fontStyle&&(a.styles.fontStyle=f.style.fstyle))}}),"function"!=typeof e.createdCell&&(e.createdCell=function(a,b){var d=h.rowoptions[b.row.index+":"+b.column.dataKey];"undefined"!=typeof d&&"undefined"!=typeof d.style&&!0!==d.style.hidden&&(a.styles.halign=d.style.align,"inherit"===e.styles.fillColor&&(a.styles.fillColor=d.style.bcolor),"inherit"===e.styles.textColor&&(a.styles.textColor=d.style.color),"inherit"===e.styles.fontStyle&&(a.styles.fontStyle=d.style.fstyle))}),"function"!=typeof e.drawHeaderCell&&(e.drawHeaderCell=function(a,b){var d=h.columns[b.column.dataKey];return(1!=d.style.hasOwnProperty("hidden")||!0!==d.style.hidden)&&0<=d.rowIndex&&U(a,b,d)}),"function"!=typeof e.drawCell&&(e.drawCell=function(a,b){var d=h.rowoptions[b.row.index+":"+b.column.dataKey];if(U(a,b,d)){if(h.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"!=typeof d&&"undefined"!=typeof d.kids&&0<d.kids.length){var e=a.height/d.rect.height;(e>h.dh||"undefined"==typeof h.dh)&&(h.dh=e),h.dw=a.width/d.rect.width,V(a,d.kids,h)}h.doc.autoTableText(a.text,a.textPos.x,a.textPos.y,{halign:a.styles.halign,valign:a.styles.valign})}return!1}),h.headerrows=[],r=d(this).find("thead").find(a.theadSelector),r.each(function(){b=0,h.headerrows[g]=[],B(this,"th,td",g,r.length,function(a,d,e){var f=W(a);f.title=y(a,d,e),f.key=b++,f.rowIndex=g,h.headerrows[g].push(f)}),g++}),0<g&&d.each(h.headerrows[g-1],function(){obj=1<g&&null==this.rect?h.headerrows[g-2][this.key]:this,null!=obj&&h.columns.push(obj)});var f=0;q=d(this).find("tbody").find(a.tbodySelector),q.each(function(){var a=[];b=0,B(this,"td",g,r.length+q.length,function(e,g,k){if("undefined"==typeof h.columns[b]){var l={title:"",key:b,style:{hidden:!0}};h.columns.push(l)}"undefined"!=typeof e&&null!=e?(l=W(e),l.kids=d(e).children()):(l=d.extend(!0,{},h.rowoptions[f+":"+(b-1)]),l.colspan=-1),h.rowoptions[f+":"+b++]=l,a.push(y(e,g,k))}),a.length&&(h.rows.push(a),f++),g++}),"function"==typeof h.onBeforeAutotable&&h.onBeforeAutotable(d(this),h.columns,h.rows,e),h.doc.autoTable(h.columns,h.rows,e),"function"==typeof h.onAfterAutotable&&h.onAfterAutotable(d(this),e),a.jspdf.autotable.startY=h.doc.autoTableEndPosY()+e.margin.top;
}),T(h.doc),"undefined"!=typeof h.headerrows&&(h.headerrows.length=0),"undefined"!=typeof h.columns&&(h.columns.length=0),"undefined"!=typeof h.rows&&(h.rows.length=0),delete h.doc,h.doc=null}return this}})}(jQuery),function(){var KEY={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,COMMAND:91,MAP:{91:"COMMAND",8:"BACKSPACE",9:"TAB",13:"ENTER",16:"SHIFT",17:"CTRL",18:"ALT",19:"PAUSEBREAK",20:"CAPSLOCK",27:"ESC",32:"SPACE",33:"PAGE_UP",34:"PAGE_DOWN",35:"END",36:"HOME",37:"LEFT",38:"UP",39:"RIGHT",40:"DOWN",43:"+",44:"PRINTSCREEN",45:"INSERT",46:"DELETE",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NUMLOCK",145:"SCROLLLOCK",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},isControl:function(e){var k=e.which;switch(k){case KEY.COMMAND:case KEY.SHIFT:case KEY.CTRL:case KEY.ALT:return!0}return!!(e.metaKey||e.ctrlKey||e.altKey)},isFunctionKey:function(k){return k=k.which?k.which:k,k>=112&&k<=123},isVerticalMovement:function(k){return~[KEY.UP,KEY.DOWN].indexOf(k)},isHorizontalMovement:function(k){return~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k)},toSeparator:function(k){var sep={ENTER:"\n",TAB:"\t",SPACE:" "}[k];return sep?sep:KEY[k]?void 0:k}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(selector){return angular.element(this[0].querySelectorAll(selector))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(selector){for(var elem=this[0],matchesSelector=elem.matches||elem.webkitMatchesSelector||elem.mozMatchesSelector||elem.msMatchesSelector;elem;){if(matchesSelector.bind(elem)(selector))return elem;elem=elem.parentElement}return!1});var latestId=0,uis=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,skipFocusser:!1,dropdownPosition:"auto",removeSelected:!0,generateId:function(){return latestId++},appendToBody:!1}).service("uiSelectMinErr",function(){var minErr=angular.$$minErr("ui.select");return function(){var error=minErr.apply(this,arguments),message=error.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(message)}}).directive("uisTranscludeAppend",function(){return{link:function(scope,element,attrs,ctrl,transclude){transclude(scope,function(clone){element.append(clone)})}}}).filter("highlight",function(){function escapeRegexp(queryToEscape){return(""+queryToEscape).replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(matchItem,query){return query&&matchItem?(""+matchItem).replace(new RegExp(escapeRegexp(query),"gi"),'<span class="ui-select-highlight">$&</span>'):matchItem}}).factory("uisOffset",["$document","$window",function($document,$window){return function(element){var boundingClientRect=element[0].getBoundingClientRect();return{width:boundingClientRect.width||element.prop("offsetWidth"),height:boundingClientRect.height||element.prop("offsetHeight"),top:boundingClientRect.top+($window.pageYOffset||$document[0].documentElement.scrollTop),left:boundingClientRect.left+($window.pageXOffset||$document[0].documentElement.scrollLeft)}}}]);uis.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile","$window",function(uiSelectConfig,RepeatParser,uiSelectMinErr,$compile,$window){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(tElement){tElement.addClass("ui-select-choices");var theme=tElement.parent().attr("theme")||uiSelectConfig.theme;return theme+"/choices.tpl.html"},compile:function(tElement,tAttrs){if(!tAttrs.repeat)throw uiSelectMinErr("repeat","Expected 'repeat' expression.");var groupByExp=tAttrs.groupBy,groupFilterExp=tAttrs.groupFilter;if(groupByExp){var groups=tElement.querySelectorAll(".ui-select-choices-group");if(1!==groups.length)throw uiSelectMinErr("rows","Expected 1 .ui-select-choices-group but got '{0}'.",groups.length);groups.attr("ng-repeat",RepeatParser.getGroupNgRepeatExpression())}var parserResult=RepeatParser.parse(tAttrs.repeat),choices=tElement.querySelectorAll(".ui-select-choices-row");if(1!==choices.length)throw uiSelectMinErr("rows","Expected 1 .ui-select-choices-row but got '{0}'.",choices.length);choices.attr("ng-repeat",parserResult.repeatExpression(groupByExp)).attr("ng-if","$select.open");var rowsInner=tElement.querySelectorAll(".ui-select-choices-row-inner");if(1!==rowsInner.length)throw uiSelectMinErr("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",rowsInner.length);rowsInner.attr("uis-transclude-append","");var clickTarget=$window.document.addEventListener?choices:rowsInner;return clickTarget.attr("ng-click","$select.select("+parserResult.itemName+",$select.skipFocusser,$event)"),function(scope,element,attrs,$select){$select.parseRepeatAttr(attrs.repeat,groupByExp,groupFilterExp),$select.disableChoiceExpression=attrs.uiDisableChoice,$select.onHighlightCallback=attrs.onHighlight,$select.dropdownPosition=attrs.position?attrs.position.toLowerCase():uiSelectConfig.dropdownPosition,scope.$on("$destroy",function(){choices.remove()}),scope.$watch("$select.search",function(newValue){newValue&&!$select.open&&$select.multiple&&$select.activate(!1,!0),$select.activeIndex=$select.tagging.isActivated?-1:0,!attrs.minimumInputLength||$select.search.length>=attrs.minimumInputLength?$select.refresh(attrs.refresh):$select.items=[]}),attrs.$observe("refreshDelay",function(){var refreshDelay=scope.$eval(attrs.refreshDelay);$select.refreshDelay=void 0!==refreshDelay?refreshDelay:uiSelectConfig.refreshDelay})}}}}]),uis.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","$$uisDebounce","uisRepeatParser","uiSelectMinErr","uiSelectConfig","$parse","$injector","$window",function($scope,$element,$timeout,$filter,$$uisDebounce,RepeatParser,uiSelectMinErr,uiSelectConfig,$parse,$injector,$window){function _findIndex(collection,predicate,thisArg){if(collection.findIndex)return collection.findIndex(predicate,thisArg);for(var value,list=Object(collection),length=list.length>>>0,i=0;i<length;i++)if(value=list[i],predicate.call(thisArg,value,i,list))return i;return-1}function _resetSearchInput(){(ctrl.resetSearchInput||void 0===ctrl.resetSearchInput&&uiSelectConfig.resetSearchInput)&&(ctrl.search=EMPTY_SEARCH,ctrl.selected&&ctrl.items.length&&!ctrl.multiple&&(ctrl.activeIndex=_findIndex(ctrl.items,function(item){return angular.equals(this,item)},ctrl.selected)))}function _setSearchToAnswer(){(ctrl.setSearchToAnswer||void 0===ctrl.setSearchToAnswer&&uiSelectConfig.setSearchToAnswer)&&(console.log("searchBy: "+ctrl.searchBy),ctrl.searchBy&&(console.log("_setSearchToAnswer"),ctrl.resetSearchInput=!1,ctrl.search=ctrl.selected[ctrl.searchBy]))}function _groupsFilter(groups,groupNames){var i,j,result=[];for(i=0;i<groupNames.length;i++)for(j=0;j<groups.length;j++)groups[j].name==[groupNames[i]]&&result.push(groups[j]);return result}function _handleDropDownSelection(key){var processed=!0;switch(key){case KEY.DOWN:!ctrl.open&&ctrl.multiple?ctrl.activate(!1,!0):ctrl.activeIndex<ctrl.items.length-1&&ctrl.activeIndex++;break;case KEY.UP:!ctrl.open&&ctrl.multiple?ctrl.activate(!1,!0):(ctrl.activeIndex>0||0===ctrl.search.length&&ctrl.tagging.isActivated&&ctrl.activeIndex>-1)&&ctrl.activeIndex--;break;case KEY.TAB:ctrl.multiple&&!ctrl.open||ctrl.select(ctrl.items[ctrl.activeIndex],!0);break;case KEY.ENTER:ctrl.open&&(ctrl.tagging.isActivated||ctrl.activeIndex>=0)?ctrl.select(ctrl.items[ctrl.activeIndex],ctrl.skipFocusser):ctrl.activate(!1,!0);break;case KEY.ESC:ctrl.close();break;default:processed=!1}return processed}function _ensureHighlightVisible(){var container=$element.querySelectorAll(".ui-select-choices-content"),choices=container.querySelectorAll(".ui-select-choices-row");if(choices.length<1)throw uiSelectMinErr("choices","Expected multiple .ui-select-choices-row but got '{0}'.",choices.length);if(!(ctrl.activeIndex<0)){var highlighted=choices[ctrl.activeIndex],posY=highlighted.offsetTop+highlighted.clientHeight-container[0].scrollTop,height=container[0].offsetHeight;posY>height?container[0].scrollTop+=posY-height:posY<highlighted.clientHeight&&(ctrl.isGrouped&&0===ctrl.activeIndex?container[0].scrollTop=0:container[0].scrollTop-=highlighted.clientHeight-posY)}}var ctrl=this,EMPTY_SEARCH="";if(ctrl.placeholder=uiSelectConfig.placeholder,ctrl.searchEnabled=uiSelectConfig.searchEnabled,ctrl.sortable=uiSelectConfig.sortable,ctrl.refreshDelay=uiSelectConfig.refreshDelay,ctrl.paste=uiSelectConfig.paste,ctrl.removeSelected=uiSelectConfig.removeSelected,ctrl.closeOnSelect=!0,ctrl.skipFocusser=!1,ctrl.search=EMPTY_SEARCH,ctrl.activeIndex=0,ctrl.items=[],ctrl.open=!1,ctrl.focus=!1,ctrl.disabled=!1,ctrl.selected=void 0,ctrl.dropdownPosition="auto",ctrl.focusser=void 0,ctrl.resetSearchInput=!0,ctrl.setSearchToAnswer=!1,ctrl.searchBy=void 0,ctrl.multiple=void 0,ctrl.disableChoiceExpression=void 0,ctrl.tagging={isActivated:!1,fct:void 0},ctrl.taggingTokens={isActivated:!1,tokens:void 0},ctrl.lockChoiceExpression=void 0,ctrl.clickTriggeredSelect=!1,ctrl.$filter=$filter,ctrl.$element=$element,ctrl.$animate=function(){try{return $injector.get("$animate")}catch(err){return null}}(),ctrl.searchInput=$element.querySelectorAll("input.ui-select-search"),1!==ctrl.searchInput.length)throw uiSelectMinErr("searchInput","Expected 1 input.ui-select-search but got '{0}'.",ctrl.searchInput.length);ctrl.isEmpty=function(){return angular.isUndefined(ctrl.selected)||null===ctrl.selected||""===ctrl.selected||ctrl.multiple&&0===ctrl.selected.length},ctrl.activate=function(initSearchValue,avoidReset){if(!ctrl.disabled&&!ctrl.open){avoidReset||_resetSearchInput(),$scope.$broadcast("uis:activate"),ctrl.open=!0,ctrl.activeIndex=ctrl.activeIndex>=ctrl.items.length?0:ctrl.activeIndex,ctrl.activeIndex===-1&&ctrl.taggingLabel!==!1&&(ctrl.activeIndex=0);var container=$element.querySelectorAll(".ui-select-choices-content"),searchInput=$element.querySelectorAll(".ui-select-search");if(ctrl.$animate&&ctrl.$animate.on&&ctrl.$animate.enabled(container[0])){var animateHandler=function(elem,phase){"start"===phase&&0===ctrl.items.length?(ctrl.$animate.off("removeClass",searchInput[0],animateHandler),$timeout(function(){ctrl.focusSearchInput(initSearchValue)})):"close"===phase&&(ctrl.$animate.off("enter",container[0],animateHandler),$timeout(function(){ctrl.focusSearchInput(initSearchValue)}))};ctrl.items.length>0?ctrl.$animate.on("enter",container[0],animateHandler):ctrl.$animate.on("removeClass",searchInput[0],animateHandler)}else $timeout(function(){ctrl.focusSearchInput(initSearchValue),!ctrl.tagging.isActivated&&ctrl.items.length>1&&_ensureHighlightVisible()})}},ctrl.focusSearchInput=function(initSearchValue){ctrl.search=initSearchValue||ctrl.search,ctrl.searchInput[0].focus()},ctrl.findGroupByName=function(name){return ctrl.groups&&ctrl.groups.filter(function(group){return group.name===name})[0]},ctrl.parseRepeatAttr=function(repeatAttr,groupByExp,groupFilterExp){function updateGroups(items){var groupFn=$scope.$eval(groupByExp);if(ctrl.groups=[],angular.forEach(items,function(item){var groupName=angular.isFunction(groupFn)?groupFn(item):item[groupFn],group=ctrl.findGroupByName(groupName);group?group.items.push(item):ctrl.groups.push({name:groupName,items:[item]})}),groupFilterExp){var groupFilterFn=$scope.$eval(groupFilterExp);angular.isFunction(groupFilterFn)?ctrl.groups=groupFilterFn(ctrl.groups):angular.isArray(groupFilterFn)&&(ctrl.groups=_groupsFilter(ctrl.groups,groupFilterFn))}ctrl.items=[],ctrl.groups.forEach(function(group){ctrl.items=ctrl.items.concat(group.items)})}function setPlainItems(items){ctrl.items=items}ctrl.setItemsFn=groupByExp?updateGroups:setPlainItems,ctrl.parserResult=RepeatParser.parse(repeatAttr),ctrl.isGrouped=!!groupByExp,ctrl.itemProperty=ctrl.parserResult.itemName;var originalSource=ctrl.parserResult.source,createArrayFromObject=function(){var origSrc=originalSource($scope);$scope.$uisSource=Object.keys(origSrc).map(function(v){var result={};return result[ctrl.parserResult.keyName]=v,result.value=origSrc[v],result})};ctrl.parserResult.keyName&&(createArrayFromObject(),ctrl.parserResult.source=$parse("$uisSource"+ctrl.parserResult.filters),$scope.$watch(originalSource,function(newVal,oldVal){newVal!==oldVal&&createArrayFromObject()},!0)),ctrl.refreshItems=function(data){data=data||ctrl.parserResult.source($scope);var selectedItems=ctrl.selected;if(ctrl.isEmpty()||angular.isArray(selectedItems)&&!selectedItems.length||!ctrl.removeSelected)ctrl.setItemsFn(data);else if(void 0!==data){var filteredItems=data.filter(function(i){return angular.isArray(selectedItems)?selectedItems.every(function(selectedItem){return!angular.equals(i,selectedItem)}):!angular.equals(i,selectedItems)});ctrl.setItemsFn(filteredItems)}"auto"!==ctrl.dropdownPosition&&"up"!==ctrl.dropdownPosition||$scope.calculateDropdownPos(),$scope.$broadcast("uis:refresh")},$scope.$watchCollection(ctrl.parserResult.source,function(items){if(void 0===items||null===items)ctrl.items=[];else{if(!angular.isArray(items))throw uiSelectMinErr("items","Expected an array but got '{0}'.",items);ctrl.refreshItems(items),angular.isDefined(ctrl.ngModel.$modelValue)&&(ctrl.ngModel.$modelValue=null)}})};var _refreshDelayPromise;ctrl.refresh=function(refreshAttr){void 0!==refreshAttr&&(_refreshDelayPromise&&$timeout.cancel(_refreshDelayPromise),_refreshDelayPromise=$timeout(function(){$scope.$eval(refreshAttr)},ctrl.refreshDelay))},ctrl.isActive=function(itemScope){if(!ctrl.open)return!1;var itemIndex=ctrl.items.indexOf(itemScope[ctrl.itemProperty]),isActive=itemIndex==ctrl.activeIndex;return!(!isActive||itemIndex<0)&&(isActive&&!angular.isUndefined(ctrl.onHighlightCallback)&&itemScope.$eval(ctrl.onHighlightCallback),isActive)};var _isItemSelected=function(item){return ctrl.selected&&angular.isArray(ctrl.selected)&&ctrl.selected.filter(function(selection){return angular.equals(selection,item)}).length>0};ctrl.isDisabled=function(itemScope){if(ctrl.open){var item,itemIndex=ctrl.items.indexOf(itemScope[ctrl.itemProperty]),isDisabled=!1;return itemIndex>=0&&(!angular.isUndefined(ctrl.disableChoiceExpression)||ctrl.multiple)&&(item=ctrl.items[itemIndex],isDisabled=!!itemScope.$eval(ctrl.disableChoiceExpression)||_isItemSelected(item),item._uiSelectChoiceDisabled=isDisabled),isDisabled}},ctrl.select=function(item,skipFocusser,$event){if(void 0===item||!item._uiSelectChoiceDisabled){if(!ctrl.items&&!ctrl.search&&!ctrl.tagging.isActivated)return;if(!item||!item._uiSelectChoiceDisabled){if(ctrl.tagging.isActivated){if(ctrl.taggingLabel===!1)if(ctrl.activeIndex<0){if(item=void 0!==ctrl.tagging.fct?ctrl.tagging.fct(ctrl.search):ctrl.search,!item||angular.equals(ctrl.items[0],item))return}else item=ctrl.items[ctrl.activeIndex];else if(0===ctrl.activeIndex){if(void 0===item)return;if(void 0!==ctrl.tagging.fct&&"string"==typeof item){if(item=ctrl.tagging.fct(item),!item)return}else"string"==typeof item&&(item=item.replace(ctrl.taggingLabel,"").trim())}if(_isItemSelected(item))return void ctrl.close(skipFocusser)}$scope.$broadcast("uis:select",item);var locals={};locals[ctrl.parserResult.itemName]=item,$timeout(function(){ctrl.onSelectCallback($scope,{$item:item,$model:ctrl.parserResult.modelMapper($scope,locals)})}),ctrl.closeOnSelect&&ctrl.close(skipFocusser),$event&&"click"===$event.type&&(ctrl.clickTriggeredSelect=!0)}}},ctrl.close=function(skipFocusser){ctrl.open&&(ctrl.ngModel&&ctrl.ngModel.$setTouched&&ctrl.ngModel.$setTouched(),_resetSearchInput(),_setSearchToAnswer(),ctrl.open=!1,$scope.$broadcast("uis:close",skipFocusser))},ctrl.setFocus=function(){ctrl.focus||ctrl.focusInput[0].focus()},ctrl.clear=function($event){ctrl.select(void 0),$event.stopPropagation(),$timeout(function(){ctrl.focusser[0].focus()},0,!1)},ctrl.toggle=function(e){ctrl.open?(ctrl.close(),e.preventDefault(),e.stopPropagation()):ctrl.activate()},ctrl.isLocked=function(itemScope,itemIndex){var isLocked,item=ctrl.selected[itemIndex];return item&&!angular.isUndefined(ctrl.lockChoiceExpression)&&(isLocked=!!itemScope.$eval(ctrl.lockChoiceExpression),item._uiSelectChoiceLocked=isLocked),isLocked};var sizeWatch=null,updaterScheduled=!1;ctrl.sizeSearchInput=function(){var input=ctrl.searchInput[0],container=ctrl.searchInput.parent().parent()[0],calculateContainerWidth=function(){return container.clientWidth*!!input.offsetParent},updateIfVisible=function(containerWidth){if(0===containerWidth)return!1;var inputWidth=containerWidth-input.offsetLeft-10;return inputWidth<50&&(inputWidth=containerWidth),ctrl.searchInput.css("width",inputWidth+"px"),!0};ctrl.searchInput.css("width","10px"),$timeout(function(){null!==sizeWatch||updateIfVisible(calculateContainerWidth())||(sizeWatch=$scope.$watch(function(){updaterScheduled||(updaterScheduled=!0,$scope.$$postDigest(function(){updaterScheduled=!1,updateIfVisible(calculateContainerWidth())&&(sizeWatch(),sizeWatch=null)}))},angular.noop))})},ctrl.searchInput.on("keydown",function(e){var key=e.which;~[KEY.ENTER,KEY.ESC].indexOf(key)&&(e.preventDefault(),e.stopPropagation()),$scope.$apply(function(){var tagged=!1;if((ctrl.items.length>0||ctrl.tagging.isActivated)&&(_handleDropDownSelection(key),ctrl.taggingTokens.isActivated)){for(var i=0;i<ctrl.taggingTokens.tokens.length;i++)ctrl.taggingTokens.tokens[i]===KEY.MAP[e.keyCode]&&ctrl.search.length>0&&(tagged=!0);tagged&&$timeout(function(){ctrl.searchInput.triggerHandler("tagged");var newItem=ctrl.search.replace(KEY.MAP[e.keyCode],"").trim();ctrl.tagging.fct&&(newItem=ctrl.tagging.fct(newItem)),newItem&&ctrl.select(newItem,!0)})}}),KEY.isVerticalMovement(key)&&ctrl.items.length>0&&_ensureHighlightVisible(),key!==KEY.ENTER&&key!==KEY.ESC||(e.preventDefault(),e.stopPropagation())}),ctrl.searchInput.on("paste",function(e){var data;if(data=window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):(e.originalEvent||e).clipboardData.getData("text/plain"),data=ctrl.search+data,data&&data.length>0)if(ctrl.taggingTokens.isActivated){for(var items=[],i=0;i<ctrl.taggingTokens.tokens.length;i++){var separator=KEY.toSeparator(ctrl.taggingTokens.tokens[i])||ctrl.taggingTokens.tokens[i];if(data.indexOf(separator)>-1){items=data.split(separator);break}}if(0===items.length&&(items=[data]),items.length>0){var oldsearch=ctrl.search;angular.forEach(items,function(item){var newItem=ctrl.tagging.fct?ctrl.tagging.fct(item):item;newItem&&ctrl.select(newItem,!0)}),ctrl.search=oldsearch||EMPTY_SEARCH,e.preventDefault(),e.stopPropagation()}}else ctrl.paste&&(ctrl.paste(data),ctrl.search=EMPTY_SEARCH,e.preventDefault(),e.stopPropagation())}),ctrl.searchInput.on("tagged",function(){$timeout(function(){_resetSearchInput()})});var onResize=$$uisDebounce(function(){ctrl.sizeSearchInput()},50);angular.element($window).bind("resize",onResize),$scope.$on("$destroy",function(){ctrl.searchInput.off("keyup keydown tagged blur paste"),angular.element($window).off("resize",onResize)})}]),uis.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function($document,uiSelectConfig,uiSelectMinErr,uisOffset,$compile,$parse,$timeout){return{restrict:"EA",templateUrl:function(tElement,tAttrs){var theme=tAttrs.theme||uiSelectConfig.theme;return theme+(angular.isDefined(tAttrs.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(tElement,tAttrs){var match=/{(.*)}\s*{(.*)}/.exec(tAttrs.ngClass);if(match){var combined="{"+match[1]+", "+match[2]+"}";tAttrs.ngClass=combined,tElement.attr("ng-class",combined)}return angular.isDefined(tAttrs.multiple)?tElement.append("<ui-select-multiple/>").removeAttr("multiple"):tElement.append("<ui-select-single/>"),tAttrs.inputId&&(tElement.querySelectorAll("input.ui-select-search")[0].id=tAttrs.inputId),function(scope,element,attrs,ctrls,transcludeFn){function onDocumentClick(e){if($select.open){var contains=!1;if(contains=window.jQuery?window.jQuery.contains(element[0],e.target):element[0].contains(e.target),!contains&&!$select.clickTriggeredSelect){var skipFocusser;if($select.skipFocusser)skipFocusser=!0;else{var focusableControls=["input","button","textarea","select"],targetController=angular.element(e.target).controller("uiSelect");skipFocusser=targetController&&targetController!==$select,skipFocusser||(skipFocusser=~focusableControls.indexOf(e.target.tagName.toLowerCase()))}$select.close(skipFocusser),scope.$digest()}$select.clickTriggeredSelect=!1}}function positionDropdown(){var offset=uisOffset(element);placeholder=angular.element('<div class="ui-select-placeholder"></div>'),placeholder[0].style.width=offset.width+"px",placeholder[0].style.height=offset.height+"px",element.after(placeholder),originalWidth=element[0].style.width,$document.find("body").append(element),element[0].style.position="absolute",element[0].style.left=offset.left+"px",element[0].style.top=offset.top+"px",element[0].style.width=offset.width+"px"}function resetDropdown(){null!==placeholder&&(placeholder.replaceWith(element),placeholder=null,element[0].style.position="",element[0].style.left="",element[0].style.top="",element[0].style.width=originalWidth,$select.setFocus())}var $select=ctrls[0],ngModel=ctrls[1];$select.generatedId=uiSelectConfig.generateId(),$select.baseTitle=attrs.title||"Select box",$select.focusserTitle=$select.baseTitle+" focus",$select.focusserId="focusser-"+$select.generatedId,$select.closeOnSelect=function(){return angular.isDefined(attrs.closeOnSelect)?$parse(attrs.closeOnSelect)():uiSelectConfig.closeOnSelect}(),scope.$watch("skipFocusser",function(){var skipFocusser=scope.$eval(attrs.skipFocusser);$select.skipFocusser=void 0!==skipFocusser?skipFocusser:uiSelectConfig.skipFocusser}),$select.onSelectCallback=$parse(attrs.onSelect),$select.onRemoveCallback=$parse(attrs.onRemove),$select.ngModel=ngModel,$select.choiceGrouped=function(group){return $select.isGrouped&&group&&group.name},attrs.tabindex&&attrs.$observe("tabindex",function(value){$select.focusInput.attr("tabindex",value),element.removeAttr("tabindex")}),scope.$watch("searchEnabled",function(){var searchEnabled=scope.$eval(attrs.searchEnabled);$select.searchEnabled=void 0!==searchEnabled?searchEnabled:uiSelectConfig.searchEnabled}),scope.$watch("sortable",function(){var sortable=scope.$eval(attrs.sortable);$select.sortable=void 0!==sortable?sortable:uiSelectConfig.sortable}),attrs.$observe("limit",function(){$select.limit=angular.isDefined(attrs.limit)?parseInt(attrs.limit,10):void 0}),scope.$watch("removeSelected",function(){var removeSelected=scope.$eval(attrs.removeSelected);$select.removeSelected=void 0!==removeSelected?removeSelected:uiSelectConfig.removeSelected}),attrs.$observe("disabled",function(){$select.disabled=void 0!==attrs.disabled&&attrs.disabled}),attrs.$observe("resetSearchInput",function(){var resetSearchInput=scope.$eval(attrs.resetSearchInput);$select.resetSearchInput=void 0===resetSearchInput||resetSearchInput}),attrs.$observe("setSearchToAnswer",function(){var setSearchToAnswer=scope.$eval(attrs.setSearchToAnswer);$select.setSearchToAnswer=void 0===setSearchToAnswer||setSearchToAnswer}),attrs.$observe("searchBy",function(){$select.searchBy=attrs.searchBy}),attrs.$observe("paste",function(){$select.paste=scope.$eval(attrs.paste)}),attrs.$observe("tagging",function(){if(void 0!==attrs.tagging){var taggingEval=scope.$eval(attrs.tagging);$select.tagging={isActivated:!0,fct:taggingEval!==!0?taggingEval:void 0}}else $select.tagging={isActivated:!1,fct:void 0}}),attrs.$observe("taggingLabel",function(){void 0!==attrs.tagging&&("false"===attrs.taggingLabel?$select.taggingLabel=!1:$select.taggingLabel=void 0!==attrs.taggingLabel?attrs.taggingLabel:"(new)")}),attrs.$observe("taggingTokens",function(){if(void 0!==attrs.tagging){var tokens=void 0!==attrs.taggingTokens?attrs.taggingTokens.split("|"):[",","ENTER"];$select.taggingTokens={isActivated:!0,tokens:tokens}}}),angular.isDefined(attrs.autofocus)&&$timeout(function(){$select.setFocus()}),angular.isDefined(attrs.focusOn)&&scope.$on(attrs.focusOn,function(){$timeout(function(){$select.setFocus()})}),$document.on("click",onDocumentClick),scope.$on("$destroy",function(){$document.off("click",onDocumentClick)}),transcludeFn(scope,function(clone){var transcluded=angular.element("<div>").append(clone),transcludedMatch=transcluded.querySelectorAll(".ui-select-match");if(transcludedMatch.removeAttr("ui-select-match"),transcludedMatch.removeAttr("data-ui-select-match"),1!==transcludedMatch.length)throw uiSelectMinErr("transcluded","Expected 1 .ui-select-match but got '{0}'.",transcludedMatch.length);element.querySelectorAll(".ui-select-match").replaceWith(transcludedMatch);var transcludedChoices=transcluded.querySelectorAll(".ui-select-choices");if(transcludedChoices.removeAttr("ui-select-choices"),transcludedChoices.removeAttr("data-ui-select-choices"),1!==transcludedChoices.length)throw uiSelectMinErr("transcluded","Expected 1 .ui-select-choices but got '{0}'.",transcludedChoices.length);element.querySelectorAll(".ui-select-choices").replaceWith(transcludedChoices);var transcludedNoChoice=transcluded.querySelectorAll(".ui-select-no-choice");transcludedNoChoice.removeAttr("ui-select-no-choice"),transcludedNoChoice.removeAttr("data-ui-select-no-choice"),1==transcludedNoChoice.length&&element.querySelectorAll(".ui-select-no-choice").replaceWith(transcludedNoChoice)});var appendToBody=scope.$eval(attrs.appendToBody);(void 0!==appendToBody?appendToBody:uiSelectConfig.appendToBody)&&(scope.$watch("$select.open",function(isOpen){isOpen?positionDropdown():resetDropdown()}),scope.$on("$destroy",function(){resetDropdown()}));var placeholder=null,originalWidth="",dropdown=null,directionUpClassName="direction-up";scope.$watch("$select.open",function(){"auto"!==$select.dropdownPosition&&"up"!==$select.dropdownPosition||scope.calculateDropdownPos()});var setDropdownPosUp=function(offset,offsetDropdown){offset=offset||uisOffset(element),offsetDropdown=offsetDropdown||uisOffset(dropdown),dropdown[0].style.position="absolute",dropdown[0].style.top=offsetDropdown.height*-1+"px",element.addClass(directionUpClassName)},setDropdownPosDown=function(offset,offsetDropdown){element.removeClass(directionUpClassName),offset=offset||uisOffset(element),offsetDropdown=offsetDropdown||uisOffset(dropdown),dropdown[0].style.position="",dropdown[0].style.top=""},calculateDropdownPosAfterAnimation=function(){$timeout(function(){if("up"===$select.dropdownPosition)setDropdownPosUp();else{element.removeClass(directionUpClassName);var offset=uisOffset(element),offsetDropdown=uisOffset(dropdown),scrollTop=$document[0].documentElement.scrollTop||$document[0].body.scrollTop;offset.top+offset.height+offsetDropdown.height>scrollTop+$document[0].documentElement.clientHeight?setDropdownPosUp(offset,offsetDropdown):setDropdownPosDown(offset,offsetDropdown)}dropdown[0].style.opacity=1})};scope.calculateDropdownPos=function(){if($select.open){if(dropdown=angular.element(element).querySelectorAll(".ui-select-dropdown"),0===dropdown.length)return;if(dropdown[0].style.opacity=0,!uisOffset(dropdown).height&&$select.$animate&&$select.$animate.on&&$select.$animate.enabled(dropdown)){var needsCalculated=!0;$select.$animate.on("enter",dropdown,function(elem,phase){"close"===phase&&needsCalculated&&(calculateDropdownPosAfterAnimation(),needsCalculated=!1)})}else calculateDropdownPosAfterAnimation()}else{if(null===dropdown||0===dropdown.length)return;dropdown[0].style.opacity=0,dropdown[0].style.position="",dropdown[0].style.top="",element.removeClass(directionUpClassName)}}}}}}]),uis.directive("uiSelectMatch",["uiSelectConfig",function(uiSelectConfig){function getAttribute(elem,attribute){return elem[0].hasAttribute(attribute)?elem.attr(attribute):elem[0].hasAttribute("data-"+attribute)?elem.attr("data-"+attribute):elem[0].hasAttribute("x-"+attribute)?elem.attr("x-"+attribute):void 0}return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(tElement){tElement.addClass("ui-select-match");var parent=tElement.parent(),theme=getAttribute(parent,"theme")||uiSelectConfig.theme,multi=angular.isDefined(getAttribute(parent,"multiple"));return theme+(multi?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(scope,element,attrs,$select){function setAllowClear(allow){$select.allowClear=!!angular.isDefined(allow)&&(""===allow||"true"===allow.toLowerCase())}$select.lockChoiceExpression=attrs.uiLockChoice,attrs.$observe("placeholder",function(placeholder){$select.placeholder=void 0!==placeholder?placeholder:uiSelectConfig.placeholder}),attrs.$observe("allowClear",setAllowClear),setAllowClear(attrs.allowClear),$select.multiple&&$select.sizeSearchInput()}}}]),uis.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(uiSelectMinErr,$timeout){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function($scope,$timeout){var ngModel,ctrl=this,$select=$scope.$select;angular.isUndefined($select.selected)&&($select.selected=[]),$scope.$evalAsync(function(){ngModel=$scope.ngModel}),ctrl.activeMatchIndex=-1,ctrl.updateModel=function(){ngModel.$setViewValue(Date.now()),ctrl.refreshComponent()},ctrl.refreshComponent=function(){$select.refreshItems(),$select.sizeSearchInput()},ctrl.removeChoice=function(index){var removedChoice=$select.selected[index];if(!removedChoice._uiSelectChoiceLocked){var locals={};locals[$select.parserResult.itemName]=removedChoice,$select.selected.splice(index,1),ctrl.activeMatchIndex=-1,$select.sizeSearchInput(),$timeout(function(){$select.onRemoveCallback($scope,{$item:removedChoice,$model:$select.parserResult.modelMapper($scope,locals)})}),ctrl.updateModel()}},ctrl.getPlaceholder=function(){if(!$select.selected||!$select.selected.length)return $select.placeholder}}],controllerAs:"$selectMultiple",link:function(scope,element,attrs,ctrls){function _getCaretPosition(el){return angular.isNumber(el.selectionStart)?el.selectionStart:el.value.length}function _handleMatchSelection(key){function getNewActiveMatchIndex(){switch(key){case KEY.LEFT:return~$selectMultiple.activeMatchIndex?prev:last;case KEY.RIGHT:return~$selectMultiple.activeMatchIndex&&curr!==last?next:($select.activate(),!1);case KEY.BACKSPACE:return~$selectMultiple.activeMatchIndex?($selectMultiple.removeChoice(curr),prev):last;case KEY.DELETE:return!!~$selectMultiple.activeMatchIndex&&($selectMultiple.removeChoice($selectMultiple.activeMatchIndex),curr)}}var caretPosition=_getCaretPosition($select.searchInput[0]),length=$select.selected.length,first=0,last=length-1,curr=$selectMultiple.activeMatchIndex,next=$selectMultiple.activeMatchIndex+1,prev=$selectMultiple.activeMatchIndex-1,newIndex=curr;return!(caretPosition>0||$select.search.length&&key==KEY.RIGHT)&&($select.close(),newIndex=getNewActiveMatchIndex(),$select.selected.length&&newIndex!==!1?$selectMultiple.activeMatchIndex=Math.min(last,Math.max(first,newIndex)):$selectMultiple.activeMatchIndex=-1,!0)}function _findCaseInsensitiveDupe(arr){if(void 0===arr||void 0===$select.search)return!1;var hasDupe=arr.filter(function(origItem){return void 0!==$select.search.toUpperCase()&&void 0!==origItem&&origItem.toUpperCase()===$select.search.toUpperCase()}).length>0;return hasDupe}function _findApproxDupe(haystack,needle){var dupeIndex=-1;
if(angular.isArray(haystack))for(var tempArr=angular.copy(haystack),i=0;i<tempArr.length;i++)if(void 0===$select.tagging.fct)tempArr[i]+" "+$select.taggingLabel===needle&&(dupeIndex=i);else{var mockObj=tempArr[i];angular.isObject(mockObj)&&(mockObj.isTag=!0),angular.equals(mockObj,needle)&&(dupeIndex=i)}return dupeIndex}var $select=ctrls[0],ngModel=scope.ngModel=ctrls[1],$selectMultiple=scope.$selectMultiple;$select.multiple=!0,$select.focusInput=$select.searchInput,ngModel.$isEmpty=function(value){return!value||0===value.length},ngModel.$parsers.unshift(function(){for(var result,locals={},resultMultiple=[],j=$select.selected.length-1;j>=0;j--)locals={},locals[$select.parserResult.itemName]=$select.selected[j],result=$select.parserResult.modelMapper(scope,locals),resultMultiple.unshift(result);return resultMultiple}),ngModel.$formatters.unshift(function(inputValue){var result,data=$select.parserResult&&$select.parserResult.source(scope,{$select:{search:""}}),locals={};if(!data)return inputValue;var resultMultiple=[],checkFnMultiple=function(list,value){if(list&&list.length){for(var p=list.length-1;p>=0;p--){if(locals[$select.parserResult.itemName]=list[p],result=$select.parserResult.modelMapper(scope,locals),$select.parserResult.trackByExp){var propsItemNameMatches=/(\w*)\./.exec($select.parserResult.trackByExp),matches=/\.([^\s]+)/.exec($select.parserResult.trackByExp);if(propsItemNameMatches&&propsItemNameMatches.length>0&&propsItemNameMatches[1]==$select.parserResult.itemName&&matches&&matches.length>0&&result[matches[1]]==value[matches[1]])return resultMultiple.unshift(list[p]),!0}if(angular.equals(result,value))return resultMultiple.unshift(list[p]),!0}return!1}};if(!inputValue)return resultMultiple;for(var k=inputValue.length-1;k>=0;k--)checkFnMultiple($select.selected,inputValue[k])||checkFnMultiple(data,inputValue[k])||resultMultiple.unshift(inputValue[k]);return resultMultiple}),scope.$watchCollection(function(){return ngModel.$modelValue},function(newValue,oldValue){oldValue!=newValue&&(angular.isDefined(ngModel.$modelValue)&&(ngModel.$modelValue=null),$selectMultiple.refreshComponent())}),ngModel.$render=function(){if(!angular.isArray(ngModel.$viewValue)){if(!angular.isUndefined(ngModel.$viewValue)&&null!==ngModel.$viewValue)throw uiSelectMinErr("multiarr","Expected model value to be array but got '{0}'",ngModel.$viewValue);$select.selected=[]}$select.selected=ngModel.$viewValue,$selectMultiple.refreshComponent(),scope.$evalAsync()},scope.$on("uis:select",function(event,item){$select.selected.length>=$select.limit||($select.selected.push(item),$selectMultiple.updateModel())}),scope.$on("uis:activate",function(){$selectMultiple.activeMatchIndex=-1}),scope.$watch("$select.disabled",function(newValue,oldValue){oldValue&&!newValue&&$select.sizeSearchInput()}),$select.searchInput.on("keydown",function(e){var key=e.which;scope.$apply(function(){var processed=!1;KEY.isHorizontalMovement(key)&&(processed=_handleMatchSelection(key)),processed&&key!=KEY.TAB&&(e.preventDefault(),e.stopPropagation())})}),$select.searchInput.on("keyup",function(e){if(KEY.isVerticalMovement(e.which)||scope.$evalAsync(function(){$select.activeIndex=$select.taggingLabel===!1?-1:0}),$select.tagging.isActivated&&$select.search.length>0){if(e.which===KEY.TAB||KEY.isControl(e)||KEY.isFunctionKey(e)||e.which===KEY.ESC||KEY.isVerticalMovement(e.which))return;if($select.activeIndex=$select.taggingLabel===!1?-1:0,$select.taggingLabel===!1)return;var newItem,item,tagItems,tagItem,items=angular.copy($select.items),stashArr=angular.copy($select.items),hasTag=!1,dupeIndex=-1;if(void 0!==$select.tagging.fct){if(tagItems=$select.$filter("filter")(items,{isTag:!0}),tagItems.length>0&&(tagItem=tagItems[0]),items.length>0&&tagItem&&(hasTag=!0,items=items.slice(1,items.length),stashArr=stashArr.slice(1,stashArr.length)),newItem=$select.tagging.fct($select.search),stashArr.some(function(origItem){return angular.equals(origItem,newItem)})||$select.selected.some(function(origItem){return angular.equals(origItem,newItem)}))return void scope.$evalAsync(function(){$select.activeIndex=0,$select.items=items});newItem&&(newItem.isTag=!0)}else{if(tagItems=$select.$filter("filter")(items,function(item){return item.match($select.taggingLabel)}),tagItems.length>0&&(tagItem=tagItems[0]),item=items[0],void 0!==item&&items.length>0&&tagItem&&(hasTag=!0,items=items.slice(1,items.length),stashArr=stashArr.slice(1,stashArr.length)),newItem=$select.search+" "+$select.taggingLabel,_findApproxDupe($select.selected,$select.search)>-1)return;if(_findCaseInsensitiveDupe(stashArr.concat($select.selected)))return void(hasTag&&(items=stashArr,scope.$evalAsync(function(){$select.activeIndex=0,$select.items=items})));if(_findCaseInsensitiveDupe(stashArr))return void(hasTag&&($select.items=stashArr.slice(1,stashArr.length)))}hasTag&&(dupeIndex=_findApproxDupe($select.selected,newItem)),dupeIndex>-1?items=items.slice(dupeIndex+1,items.length-1):(items=[],newItem&&items.push(newItem),items=items.concat(stashArr)),scope.$evalAsync(function(){if($select.activeIndex=0,$select.items=items,$select.isGrouped){var itemsWithoutTag=newItem?items.slice(1):items;$select.setItemsFn(itemsWithoutTag),newItem&&($select.items.unshift(newItem),$select.groups.unshift({name:"",items:[newItem],tagging:!0}))}})}}),$select.searchInput.on("blur",function(){$timeout(function(){$selectMultiple.activeMatchIndex=-1})})}}}]),uis.directive("uiSelectNoChoice",["uiSelectConfig",function(uiSelectConfig){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(tElement){tElement.addClass("ui-select-no-choice");var theme=tElement.parent().attr("theme")||uiSelectConfig.theme;return theme+"/no-choice.tpl.html"}}}]),uis.directive("uiSelectSingle",["$timeout","$compile",function($timeout,$compile){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(scope,element,attrs,ctrls){var $select=ctrls[0],ngModel=ctrls[1];ngModel.$parsers.unshift(function(inputValue){var result,locals={};return locals[$select.parserResult.itemName]=inputValue,result=$select.parserResult.modelMapper(scope,locals)}),ngModel.$formatters.unshift(function(inputValue){var result,data=$select.parserResult&&$select.parserResult.source(scope,{$select:{search:""}}),locals={};if(data){var checkFnSingle=function(d){return locals[$select.parserResult.itemName]=d,result=$select.parserResult.modelMapper(scope,locals),result===inputValue};if($select.selected&&checkFnSingle($select.selected))return $select.selected;for(var i=data.length-1;i>=0;i--)if(checkFnSingle(data[i]))return data[i]}return inputValue}),scope.$watch("$select.selected",function(newValue){ngModel.$viewValue!==newValue&&ngModel.$setViewValue(newValue)}),ngModel.$render=function(){$select.selected=ngModel.$viewValue},scope.$on("uis:select",function(event,item){$select.selected=item}),scope.$on("uis:close",function(event,skipFocusser){$timeout(function(){$select.focusser.prop("disabled",!1),skipFocusser||$select.focusser[0].focus()},0,!1)}),scope.$on("uis:activate",function(){focusser.prop("disabled",!0)});var focusser=angular.element("<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' id='{{ $select.focusserId }}' aria-label='{{ $select.focusserTitle }}' aria-haspopup='true' role='button' />");$compile(focusser)(scope),$select.focusser=focusser,$select.focusInput=focusser,element.parent().append(focusser),focusser.bind("focus",function(){scope.$evalAsync(function(){$select.focus=!0})}),focusser.bind("blur",function(){scope.$evalAsync(function(){$select.focus=!1})}),focusser.bind("keydown",function(e){return e.which===KEY.BACKSPACE?(e.preventDefault(),e.stopPropagation(),$select.select(void 0),void scope.$apply()):void(e.which===KEY.TAB||KEY.isControl(e)||KEY.isFunctionKey(e)||e.which===KEY.ESC||(e.which!=KEY.DOWN&&e.which!=KEY.UP&&e.which!=KEY.ENTER&&e.which!=KEY.SPACE||(e.preventDefault(),e.stopPropagation(),$select.activate()),scope.$digest()))}),focusser.bind("keyup input",function(e){e.which===KEY.TAB||KEY.isControl(e)||KEY.isFunctionKey(e)||e.which===KEY.ESC||e.which==KEY.ENTER||e.which===KEY.BACKSPACE||($select.activate(focusser.val()),focusser.val(""),scope.$digest())})}}}]),uis.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function($timeout,uiSelectConfig,uiSelectMinErr){return{require:["^^uiSelect","^ngModel"],link:function(scope,element,attrs,ctrls){if(null===scope[attrs.uiSelectSort])throw uiSelectMinErr("sort","Expected a list to sort");var $select=ctrls[0],$ngModel=ctrls[1],options=angular.extend({axis:"horizontal"},scope.$eval(attrs.uiSelectSortOptions)),axis=options.axis,draggingClassName="dragging",droppingClassName="dropping",droppingBeforeClassName="dropping-before",droppingAfterClassName="dropping-after";scope.$watch(function(){return $select.sortable},function(newValue){newValue?element.attr("draggable",!0):element.removeAttr("draggable")}),element.on("dragstart",function(event){element.addClass(draggingClassName),(event.dataTransfer||event.originalEvent.dataTransfer).setData("text",scope.$index.toString())}),element.on("dragend",function(){removeClass(draggingClassName)});var dropTimeout,move=function(from,to){this.splice(to,0,this.splice(from,1)[0])},removeClass=function(className){angular.forEach($select.$element.querySelectorAll("."+className),function(el){angular.element(el).removeClass(className)})},dragOverHandler=function(event){event.preventDefault();var offset="vertical"===axis?event.offsetY||event.layerY||(event.originalEvent?event.originalEvent.offsetY:0):event.offsetX||event.layerX||(event.originalEvent?event.originalEvent.offsetX:0);offset<this["vertical"===axis?"offsetHeight":"offsetWidth"]/2?(removeClass(droppingAfterClassName),element.addClass(droppingBeforeClassName)):(removeClass(droppingBeforeClassName),element.addClass(droppingAfterClassName))},dropHandler=function(event){event.preventDefault();var droppedItemIndex=parseInt((event.dataTransfer||event.originalEvent.dataTransfer).getData("text"),10);$timeout.cancel(dropTimeout),dropTimeout=$timeout(function(){_dropHandler(droppedItemIndex)},20)},_dropHandler=function(droppedItemIndex){var theList=scope.$eval(attrs.uiSelectSort),itemToMove=theList[droppedItemIndex],newIndex=null;newIndex=element.hasClass(droppingBeforeClassName)?droppedItemIndex<scope.$index?scope.$index-1:scope.$index:droppedItemIndex<scope.$index?scope.$index:scope.$index+1,move.apply(theList,[droppedItemIndex,newIndex]),$ngModel.$setViewValue(Date.now()),scope.$apply(function(){scope.$emit("uiSelectSort:change",{array:theList,item:itemToMove,from:droppedItemIndex,to:newIndex})}),removeClass(droppingClassName),removeClass(droppingBeforeClassName),removeClass(droppingAfterClassName),element.off("drop",dropHandler)};element.on("dragenter",function(){element.hasClass(draggingClassName)||(element.addClass(droppingClassName),element.on("dragover",dragOverHandler),element.on("drop",dropHandler))}),element.on("dragleave",function(event){event.target==element&&(removeClass(droppingClassName),removeClass(droppingBeforeClassName),removeClass(droppingAfterClassName),element.off("dragover",dragOverHandler),element.off("drop",dropHandler))})}}}]),uis.factory("$$uisDebounce",["$timeout",function($timeout){return function(callback,debounceTime){var timeoutPromise;return function(){var self=this,args=Array.prototype.slice.call(arguments);timeoutPromise&&$timeout.cancel(timeoutPromise),timeoutPromise=$timeout(function(){callback.apply(self,args)},debounceTime)}}}]),uis.service("uisRepeatParser",["uiSelectMinErr","$parse",function(uiSelectMinErr,$parse){var self=this;self.parse=function(expression){var match;if(match=expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(\s*[\s\S]+?)?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),!match)throw uiSelectMinErr("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",expression);var source=match[5],filters="";if(match[3]){source=match[5].replace(/(^\()|(\)$)/g,"");var filterMatch=match[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/);filterMatch&&filterMatch[1].trim()&&(filters=filterMatch[1],source=source.replace(filters,""))}return{itemName:match[4]||match[2],keyName:match[3],source:$parse(source),filters:filters,trackByExp:match[6],modelMapper:$parse(match[1]||match[4]||match[2]),repeatExpression:function(grouped){var expression=this.itemName+" in "+(grouped?"$group.items":"$select.items");return this.trackByExp&&(expression+=" track by "+this.trackByExp),expression}}},self.getGroupNgRepeatExpression=function(){return"$group in $select.groups"}}])}(),angular.module("ui.select").run(["$templateCache",function($templateCache){$templateCache.put("bootstrap/choices.tpl.html",'<ul class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu" role="listbox" ng-show="$select.open && $select.items.length > 0"><li class="ui-select-choices-group" id="ui-select-choices-{{ $select.generatedId }}"><div class="divider" ng-show="$select.isGrouped && $index > 0"></div><div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind="$group.name"></div><div ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}" role="option"><a href="" class="ui-select-choices-row-inner"></a></div></li></ul>'),$templateCache.put("bootstrap/match-multiple.tpl.html",'<span class="ui-select-match"><span ng-repeat="$item in $select.selected"><span class="ui-select-match-item btn btn-default btn-xs" tabindex="-1" type="button" ng-disabled="$select.disabled" ng-click="$selectMultiple.activeMatchIndex = $index;" ng-class="{\'btn-primary\':$selectMultiple.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)">&nbsp;&times;</span> <span uis-transclude-append=""></span></span></span></span>'),$templateCache.put("bootstrap/match.tpl.html",'<div class="ui-select-match" ng-hide="$select.open && $select.searchEnabled" ng-disabled="$select.disabled" ng-class="{\'btn-default-focus\':$select.focus}"><span tabindex="-1" class="btn btn-default form-control ui-select-toggle" aria-label="{{ $select.baseTitle }} activate" ng-disabled="$select.disabled" ng-click="$select.activate()" style="outline: 0;"><span ng-show="$select.isEmpty()" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="ui-select-match-text pull-left" ng-class="{\'ui-select-allow-clear\': $select.allowClear && !$select.isEmpty()}" ng-transclude=""></span> <i class="caret pull-right" ng-click="$select.toggle($event)"></i> <a ng-show="$select.allowClear && !$select.isEmpty() && ($select.disabled !== true)" aria-label="{{ $select.baseTitle }} clear" style="margin-right: 10px" ng-click="$select.clear($event)" class="btn btn-xs btn-link pull-right"><i class="glyphicon glyphicon-remove" aria-hidden="true"></i></a></span></div>'),$templateCache.put("bootstrap/no-choice.tpl.html",'<ul class="ui-select-no-choice dropdown-menu" ng-show="$select.items.length == 0"><li ng-transclude=""></li></ul>'),$templateCache.put("bootstrap/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control" ng-class="{open: $select.open}"><div><div class="ui-select-match"></div><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="ui-select-search input-xs" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-click="$select.activate()" ng-model="$select.search" role="combobox" aria-label="{{ $select.baseTitle }}" ondrop="return false;"></div><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>'),$templateCache.put("bootstrap/select.tpl.html",'<div class="ui-select-container ui-select-bootstrap dropdown" ng-class="{open: $select.open}"><div class="ui-select-match"></div><input type="search" autocomplete="off" tabindex="-1" aria-expanded="true" aria-label="{{ $select.baseTitle }}" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="form-control ui-select-search" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.searchEnabled && $select.open"><div class="ui-select-choices"></div><div class="ui-select-no-choice"></div></div>'),$templateCache.put("select2/choices.tpl.html",'<ul tabindex="-1" class="ui-select-choices ui-select-choices-content select2-results"><li class="ui-select-choices-group" ng-class="{\'select2-result-with-children\': $select.choiceGrouped($group) }"><div ng-show="$select.choiceGrouped($group)" class="ui-select-choices-group-label select2-result-label" ng-bind="$group.name"></div><ul role="listbox" id="ui-select-choices-{{ $select.generatedId }}" ng-class="{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }"><li role="option" ng-attr-id="ui-select-choices-row-{{ $select.generatedId }}-{{$index}}" class="ui-select-choices-row" ng-class="{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}"><div class="select2-result-label ui-select-choices-row-inner"></div></li></ul></li></ul>'),$templateCache.put("select2/match-multiple.tpl.html",'<span class="ui-select-match"><li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected" ng-class="{\'select2-search-choice-focus\':$selectMultiple.activeMatchIndex === $index, \'select2-locked\':$select.isLocked(this, $index)}" ui-select-sort="$select.selected"><span uis-transclude-append=""></span> <a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$selectMultiple.removeChoice($index)" tabindex="-1"></a></li></span>'),$templateCache.put("select2/match.tpl.html",'<a class="select2-choice ui-select-match" ng-class="{\'select2-default\': $select.isEmpty()}" ng-click="$select.toggle($event)" aria-label="{{ $select.baseTitle }} select"><span ng-show="$select.isEmpty()" class="select2-chosen">{{$select.placeholder}}</span> <span ng-hide="$select.isEmpty()" class="select2-chosen" ng-transclude=""></span> <abbr ng-if="$select.allowClear && !$select.isEmpty()" class="select2-search-choice-close" ng-click="$select.clear($event)"></abbr> <span class="select2-arrow ui-select-toggle"><b></b></span></a>'),$templateCache.put("select2/select-multiple.tpl.html",'<div class="ui-select-container ui-select-multiple select2 select2-container select2-container-multi" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled}"><ul class="select2-choices"><span class="ui-select-match"></span><li class="select2-search-field"><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="select2-input ui-select-search" placeholder="{{$selectMultiple.getPlaceholder()}}" ng-disabled="$select.disabled" ng-hide="$select.disabled" ng-model="$select.search" ng-click="$select.activate()" style="width: 34px;" ondrop="return false;"></li></ul><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open || $select.items.length === 0}"><div class="ui-select-choices"></div></div></div>'),$templateCache.put("select2/select.tpl.html",'<div class="ui-select-container select2 select2-container" ng-class="{\'select2-container-active select2-dropdown-open open\': $select.open, \'select2-container-disabled\': $select.disabled, \'select2-container-active\': $select.focus, \'select2-allowclear\': $select.allowClear && !$select.isEmpty()}"><div class="ui-select-match"></div><div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active" ng-class="{\'select2-display-none\': !$select.open}"><div class="select2-search" ng-show="$select.searchEnabled"><input type="search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="combobox" aria-expanded="true" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-label="{{ $select.baseTitle }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="ui-select-search select2-input" ng-model="$select.search"></div><div class="ui-select-choices"></div></div></div>'),$templateCache.put("selectize/choices.tpl.html",'<div ng-show="$select.open" class="ui-select-choices ui-select-dropdown selectize-dropdown single"><div class="ui-select-choices-content selectize-dropdown-content"><div class="ui-select-choices-group optgroup" role="listbox"><div ng-show="$select.isGrouped" class="ui-select-choices-group-label optgroup-header" ng-bind="$group.name"></div><div role="option" class="ui-select-choices-row" ng-class="{active: $select.isActive(this), disabled: $select.isDisabled(this)}"><div class="option ui-select-choices-row-inner" data-selectable=""></div></div></div></div></div>'),$templateCache.put("selectize/match.tpl.html",'<div ng-hide="$select.searchEnabled && ($select.open || $select.isEmpty())" class="ui-select-match" ng-transclude=""></div>'),$templateCache.put("selectize/select.tpl.html",'<div class="ui-select-container selectize-control single" ng-class="{\'open\': $select.open}"><div class="selectize-input" ng-class="{\'focus\': $select.open, \'disabled\': $select.disabled, \'selectize-focus\' : $select.focus}" ng-click="$select.open && !$select.searchEnabled ? $select.toggle($event) : $select.activate()" ng-focus"$select.open="" &&="" !$select.searchenabled="" ?="" $select.toggle($event)="" :="" $select.activate()"=""><div class="ui-select-match" ng-hide="$select.setSearchToAnswer"></div><input type="search" autocomplete="off" tabindex="-1" class="ui-select-search ui-select-toggle" ng-click="$select.toggle($event)" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-hide="(!$select.searchEnabled || ($select.selected && !$select.open)) && !$select.setSearchToAnswer" ng-disabled="$select.disabled" aria-label="{{ $select.baseTitle }}"></div><div class="ui-select-choices"></div></div>')}]),function(root,factory){"function"==typeof define&&define.amd?define([],function(){return factory()}):"object"==typeof exports?module.exports=factory():factory()}(this,function(){function runTranslate($translate){var key=$translate.storageKey(),storage=$translate.storage(),fallbackFromIncorrectStorageValue=function(){var preferred=$translate.preferredLanguage();angular.isString(preferred)?$translate.use(preferred):storage.put(key,$translate.use())};fallbackFromIncorrectStorageValue.displayName="fallbackFromIncorrectStorageValue",storage?storage.get(key)?$translate.use(storage.get(key))["catch"](fallbackFromIncorrectStorageValue):fallbackFromIncorrectStorageValue():angular.isString($translate.preferredLanguage())&&$translate.use($translate.preferredLanguage())}function $translateSanitizationProvider(){var $sanitize,strategies,currentStrategy=null,hasConfiguredStrategy=!1,hasShownNoStrategyConfiguredWarning=!1;strategies={sanitize:function(value,mode){return"text"===mode&&(value=htmlSanitizeValue(value)),value},escape:function(value,mode){return"text"===mode&&(value=htmlEscapeValue(value)),value},sanitizeParameters:function(value,mode){return"params"===mode&&(value=mapInterpolationParameters(value,htmlSanitizeValue)),value},escapeParameters:function(value,mode){return"params"===mode&&(value=mapInterpolationParameters(value,htmlEscapeValue)),value}},strategies.escaped=strategies.escapeParameters,this.addStrategy=function(strategyName,strategyFunction){return strategies[strategyName]=strategyFunction,this},this.removeStrategy=function(strategyName){return delete strategies[strategyName],this},this.useStrategy=function(strategy){return hasConfiguredStrategy=!0,currentStrategy=strategy,this},this.$get=["$injector","$log",function($injector,$log){var cachedStrategyMap={},applyStrategies=function(value,mode,selectedStrategies){return angular.forEach(selectedStrategies,function(selectedStrategy){if(angular.isFunction(selectedStrategy))value=selectedStrategy(value,mode);else if(angular.isFunction(strategies[selectedStrategy]))value=strategies[selectedStrategy](value,mode);else{if(!angular.isString(strategies[selectedStrategy]))throw new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+selectedStrategy+"'");if(!cachedStrategyMap[strategies[selectedStrategy]])try{cachedStrategyMap[strategies[selectedStrategy]]=$injector.get(strategies[selectedStrategy])}catch(e){throw cachedStrategyMap[strategies[selectedStrategy]]=function(){},new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+selectedStrategy+"'")}value=cachedStrategyMap[strategies[selectedStrategy]](value,mode)}}),value},showNoStrategyConfiguredWarning=function(){hasConfiguredStrategy||hasShownNoStrategyConfiguredWarning||($log.warn("pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details."),hasShownNoStrategyConfiguredWarning=!0)};return $injector.has("$sanitize")&&($sanitize=$injector.get("$sanitize")),{useStrategy:function(self){return function(strategy){self.useStrategy(strategy)}}(this),sanitize:function(value,mode,strategy){if(currentStrategy||showNoStrategyConfiguredWarning(),arguments.length<3&&(strategy=currentStrategy),!strategy)return value;var selectedStrategies=angular.isArray(strategy)?strategy:[strategy];return applyStrategies(value,mode,selectedStrategies)}}}];var htmlEscapeValue=function(value){var element=angular.element("<div></div>");return element.text(value),element.html()},htmlSanitizeValue=function(value){if(!$sanitize)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sanitize service. Either include the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) or use a sanitization strategy which does not depend on $sanitize, such as 'escape'.");return $sanitize(value)},mapInterpolationParameters=function(value,iteratee,stack){if(angular.isObject(value)){var result=angular.isArray(value)?[]:{};if(stack){if(stack.indexOf(value)>-1)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot interpolate parameter due recursive object")}else stack=[];return stack.push(value),angular.forEach(value,function(propertyValue,propertyKey){angular.isFunction(propertyValue)||(result[propertyKey]=mapInterpolationParameters(propertyValue,iteratee,stack))}),stack.splice(-1,1),result}return angular.isNumber(value)?value:iteratee(value)}}function $translate($STORAGE_KEY,$windowProvider,$translateSanitizationProvider,pascalprechtTranslateOverrider){var $preferredLanguage,$languageKeyAliases,$fallbackLanguage,$fallbackWasString,$uses,$nextLang,$storageFactory,$storagePrefix,$missingTranslationHandlerFactory,$interpolationFactory,$loaderFactory,$loaderOptions,$notFoundIndicatorLeft,$notFoundIndicatorRight,loaderCache,postProcessFn,$translationTable={},$availableLanguageKeys=[],$storageKey=$STORAGE_KEY,$interpolatorFactories=[],$cloakClassName="translate-cloak",$postCompilingEnabled=!1,$forceAsyncReloadEnabled=!1,$nestedObjectDelimeter=".",$isReady=!1,$keepContent=!1,directivePriority=0,statefulFilter=!0,uniformLanguageTagResolver="default",languageTagResolver={"default":function(tag){return(tag||"").split("-").join("_")},java:function(tag){var temp=(tag||"").split("-").join("_"),parts=temp.split("_");return parts.length>1?parts[0].toLowerCase()+"_"+parts[1].toUpperCase():temp},bcp47:function(tag){var temp=(tag||"").split("_").join("-"),parts=temp.split("-");return parts.length>1?parts[0].toLowerCase()+"-"+parts[1].toUpperCase():temp},"iso639-1":function(tag){var temp=(tag||"").split("_").join("-"),parts=temp.split("-");return parts[0].toLowerCase()}},version="2.11.1",getFirstBrowserLanguage=function(){if(angular.isFunction(pascalprechtTranslateOverrider.getLocale))return pascalprechtTranslateOverrider.getLocale();var i,language,nav=$windowProvider.$get().navigator,browserLanguagePropertyKeys=["language","browserLanguage","systemLanguage","userLanguage"];if(angular.isArray(nav.languages))for(i=0;i<nav.languages.length;i++)if(language=nav.languages[i],language&&language.length)return language;for(i=0;i<browserLanguagePropertyKeys.length;i++)if(language=nav[browserLanguagePropertyKeys[i]],language&&language.length)return language;return null};getFirstBrowserLanguage.displayName="angular-translate/service: getFirstBrowserLanguage";var getLocale=function(){var locale=getFirstBrowserLanguage()||"";return languageTagResolver[uniformLanguageTagResolver]&&(locale=languageTagResolver[uniformLanguageTagResolver](locale)),locale};getLocale.displayName="angular-translate/service: getLocale";var indexOf=function(array,searchElement){for(var i=0,len=array.length;i<len;i++)if(array[i]===searchElement)return i;return-1},trim=function(){return this.toString().replace(/^\s+|\s+$/g,"")},negotiateLocale=function(preferred){if(preferred){for(var avail=[],locale=angular.lowercase(preferred),i=0,n=$availableLanguageKeys.length;i<n;i++)avail.push(angular.lowercase($availableLanguageKeys[i]));if(indexOf(avail,locale)>-1)return preferred;if($languageKeyAliases){var alias;for(var langKeyAlias in $languageKeyAliases)if($languageKeyAliases.hasOwnProperty(langKeyAlias)){var hasWildcardKey=!1,hasExactKey=Object.prototype.hasOwnProperty.call($languageKeyAliases,langKeyAlias)&&angular.lowercase(langKeyAlias)===angular.lowercase(preferred);if("*"===langKeyAlias.slice(-1)&&(hasWildcardKey=langKeyAlias.slice(0,-1)===preferred.slice(0,langKeyAlias.length-1)),(hasExactKey||hasWildcardKey)&&(alias=$languageKeyAliases[langKeyAlias],indexOf(avail,angular.lowercase(alias))>-1))return alias}}var parts=preferred.split("_");return parts.length>1&&indexOf(avail,angular.lowercase(parts[0]))>-1?parts[0]:void 0}},translations=function(langKey,translationTable){if(!langKey&&!translationTable)return $translationTable;if(langKey&&!translationTable){if(angular.isString(langKey))return $translationTable[langKey]}else angular.isObject($translationTable[langKey])||($translationTable[langKey]={}),angular.extend($translationTable[langKey],flatObject(translationTable));return this};this.translations=translations,this.cloakClassName=function(name){return name?($cloakClassName=name,this):$cloakClassName},this.nestedObjectDelimeter=function(delimiter){return delimiter?($nestedObjectDelimeter=delimiter,this):$nestedObjectDelimeter};var flatObject=function(data,path,result,prevKey){var key,keyWithPath,keyWithShortPath,val;path||(path=[]),result||(result={});for(key in data)Object.prototype.hasOwnProperty.call(data,key)&&(val=data[key],angular.isObject(val)?flatObject(val,path.concat(key),result,key):(keyWithPath=path.length?""+path.join($nestedObjectDelimeter)+$nestedObjectDelimeter+key:key,path.length&&key===prevKey&&(keyWithShortPath=""+path.join($nestedObjectDelimeter),result[keyWithShortPath]="@:"+keyWithPath),result[keyWithPath]=val));return result};flatObject.displayName="flatObject",this.addInterpolation=function(factory){return $interpolatorFactories.push(factory),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation");
},this.useInterpolation=function(factory){return $interpolationFactory=factory,this},this.useSanitizeValueStrategy=function(value){return $translateSanitizationProvider.useStrategy(value),this},this.preferredLanguage=function(langKey){return langKey?(setupPreferredLanguage(langKey),this):$preferredLanguage};var setupPreferredLanguage=function(langKey){return langKey&&($preferredLanguage=langKey),$preferredLanguage};this.translationNotFoundIndicator=function(indicator){return this.translationNotFoundIndicatorLeft(indicator),this.translationNotFoundIndicatorRight(indicator),this},this.translationNotFoundIndicatorLeft=function(indicator){return indicator?($notFoundIndicatorLeft=indicator,this):$notFoundIndicatorLeft},this.translationNotFoundIndicatorRight=function(indicator){return indicator?($notFoundIndicatorRight=indicator,this):$notFoundIndicatorRight},this.fallbackLanguage=function(langKey){return fallbackStack(langKey),this};var fallbackStack=function(langKey){return langKey?(angular.isString(langKey)?($fallbackWasString=!0,$fallbackLanguage=[langKey]):angular.isArray(langKey)&&($fallbackWasString=!1,$fallbackLanguage=langKey),angular.isString($preferredLanguage)&&indexOf($fallbackLanguage,$preferredLanguage)<0&&$fallbackLanguage.push($preferredLanguage),this):$fallbackWasString?$fallbackLanguage[0]:$fallbackLanguage};this.use=function(langKey){if(langKey){if(!$translationTable[langKey]&&!$loaderFactory)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+langKey+"'");return $uses=langKey,this}return $uses},this.resolveClientLocale=function(){return getLocale()};var storageKey=function(key){return key?($storageKey=key,this):$storagePrefix?$storagePrefix+$storageKey:$storageKey};this.storageKey=storageKey,this.useUrlLoader=function(url,options){return this.useLoader("$translateUrlLoader",angular.extend({url:url},options))},this.useStaticFilesLoader=function(options){return this.useLoader("$translateStaticFilesLoader",options)},this.useLoader=function(loaderFactory,options){return $loaderFactory=loaderFactory,$loaderOptions=options||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(storageFactory){return $storageFactory=storageFactory,this},this.storagePrefix=function(prefix){return prefix?($storagePrefix=prefix,this):prefix},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(factory){return $missingTranslationHandlerFactory=factory,this},this.usePostCompiling=function(value){return $postCompilingEnabled=!!value,this},this.forceAsyncReload=function(value){return $forceAsyncReloadEnabled=!!value,this},this.uniformLanguageTag=function(options){return options?angular.isString(options)&&(options={standard:options}):options={},uniformLanguageTagResolver=options.standard,this},this.determinePreferredLanguage=function(fn){var locale=fn&&angular.isFunction(fn)?fn():getLocale();return $preferredLanguage=$availableLanguageKeys.length?negotiateLocale(locale)||locale:locale,this},this.registerAvailableLanguageKeys=function(languageKeys,aliases){return languageKeys?($availableLanguageKeys=languageKeys,aliases&&($languageKeyAliases=aliases),this):$availableLanguageKeys},this.useLoaderCache=function(cache){return cache===!1?loaderCache=void 0:cache===!0?loaderCache=!0:"undefined"==typeof cache?loaderCache="$translationCache":cache&&(loaderCache=cache),this},this.directivePriority=function(priority){return void 0===priority?directivePriority:(directivePriority=priority,this)},this.statefulFilter=function(state){return void 0===state?statefulFilter:(statefulFilter=state,this)},this.postProcess=function(fn){return postProcessFn=fn?fn:void 0,this},this.keepContent=function(value){return $keepContent=!!value,this},this.$get=["$log","$injector","$rootScope","$q",function($log,$injector,$rootScope,$q){var Storage,fallbackIndex,startFallbackIteration,defaultInterpolator=$injector.get($interpolationFactory||"$translateDefaultInterpolation"),pendingLoader=!1,interpolatorHashMap={},langPromises={},$translate=function(translationId,interpolateParams,interpolationId,defaultTranslationText,forceLanguage){!$uses&&$preferredLanguage&&($uses=$preferredLanguage);var uses=forceLanguage&&forceLanguage!==$uses?negotiateLocale(forceLanguage)||forceLanguage:$uses;if(forceLanguage&&loadTranslationsIfMissing(forceLanguage),angular.isArray(translationId)){var translateAll=function(translationIds){for(var results={},promises=[],translate=function(translationId){var deferred=$q.defer(),regardless=function(value){results[translationId]=value,deferred.resolve([translationId,value])};return $translate(translationId,interpolateParams,interpolationId,defaultTranslationText,forceLanguage).then(regardless,regardless),deferred.promise},i=0,c=translationIds.length;i<c;i++)promises.push(translate(translationIds[i]));return $q.all(promises).then(function(){return results})};return translateAll(translationId)}var deferred=$q.defer();translationId&&(translationId=trim.apply(translationId));var promiseToWaitFor=function(){var promise=$preferredLanguage?langPromises[$preferredLanguage]:langPromises[uses];if(fallbackIndex=0,$storageFactory&&!promise){var langKey=Storage.get($storageKey);if(promise=langPromises[langKey],$fallbackLanguage&&$fallbackLanguage.length){var index=indexOf($fallbackLanguage,langKey);fallbackIndex=0===index?1:0,indexOf($fallbackLanguage,$preferredLanguage)<0&&$fallbackLanguage.push($preferredLanguage)}}return promise}();if(promiseToWaitFor){var promiseResolved=function(){forceLanguage||(uses=$uses),determineTranslation(translationId,interpolateParams,interpolationId,defaultTranslationText,uses).then(deferred.resolve,deferred.reject)};promiseResolved.displayName="promiseResolved",promiseToWaitFor["finally"](promiseResolved)}else determineTranslation(translationId,interpolateParams,interpolationId,defaultTranslationText,uses).then(deferred.resolve,deferred.reject);return deferred.promise},applyNotFoundIndicators=function(translationId){return $notFoundIndicatorLeft&&(translationId=[$notFoundIndicatorLeft,translationId].join(" ")),$notFoundIndicatorRight&&(translationId=[translationId,$notFoundIndicatorRight].join(" ")),translationId},useLanguage=function(key){$uses=key,$storageFactory&&Storage.put($translate.storageKey(),$uses),$rootScope.$emit("$translateChangeSuccess",{language:key}),defaultInterpolator.setLocale($uses);var eachInterpolator=function(interpolator,id){interpolatorHashMap[id].setLocale($uses)};eachInterpolator.displayName="eachInterpolatorLocaleSetter",angular.forEach(interpolatorHashMap,eachInterpolator),$rootScope.$emit("$translateChangeEnd",{language:key})},loadAsync=function(key){if(!key)throw"No language key specified for loading.";var deferred=$q.defer();$rootScope.$emit("$translateLoadingStart",{language:key}),pendingLoader=!0;var cache=loaderCache;"string"==typeof cache&&(cache=$injector.get(cache));var loaderOptions=angular.extend({},$loaderOptions,{key:key,$http:angular.extend({},{cache:cache},$loaderOptions.$http)}),onLoaderSuccess=function(data){var translationTable={};$rootScope.$emit("$translateLoadingSuccess",{language:key}),angular.isArray(data)?angular.forEach(data,function(table){angular.extend(translationTable,flatObject(table))}):angular.extend(translationTable,flatObject(data)),pendingLoader=!1,deferred.resolve({key:key,table:translationTable}),$rootScope.$emit("$translateLoadingEnd",{language:key})};onLoaderSuccess.displayName="onLoaderSuccess";var onLoaderError=function(key){$rootScope.$emit("$translateLoadingError",{language:key}),deferred.reject(key),$rootScope.$emit("$translateLoadingEnd",{language:key})};return onLoaderError.displayName="onLoaderError",$injector.get($loaderFactory)(loaderOptions).then(onLoaderSuccess,onLoaderError),deferred.promise};if($storageFactory&&(Storage=$injector.get($storageFactory),!Storage.get||!Storage.put))throw new Error("Couldn't use storage '"+$storageFactory+"', missing get() or put() method!");if($interpolatorFactories.length){var eachInterpolationFactory=function(interpolatorFactory){var interpolator=$injector.get(interpolatorFactory);interpolator.setLocale($preferredLanguage||$uses),interpolatorHashMap[interpolator.getInterpolationIdentifier()]=interpolator};eachInterpolationFactory.displayName="interpolationFactoryAdder",angular.forEach($interpolatorFactories,eachInterpolationFactory)}var getTranslationTable=function(langKey){var deferred=$q.defer();if(Object.prototype.hasOwnProperty.call($translationTable,langKey))deferred.resolve($translationTable[langKey]);else if(langPromises[langKey]){var onResolve=function(data){translations(data.key,data.table),deferred.resolve(data.table)};onResolve.displayName="translationTableResolver",langPromises[langKey].then(onResolve,deferred.reject)}else deferred.reject();return deferred.promise},getFallbackTranslation=function(langKey,translationId,interpolateParams,Interpolator){var deferred=$q.defer(),onResolve=function(translationTable){if(Object.prototype.hasOwnProperty.call(translationTable,translationId)){Interpolator.setLocale(langKey);var translation=translationTable[translationId];if("@:"===translation.substr(0,2))getFallbackTranslation(langKey,translation.substr(2),interpolateParams,Interpolator).then(deferred.resolve,deferred.reject);else{var interpolatedValue=Interpolator.interpolate(translationTable[translationId],interpolateParams);interpolatedValue=applyPostProcessing(translationId,translationTable[translationId],interpolatedValue,interpolateParams,langKey),deferred.resolve(interpolatedValue)}Interpolator.setLocale($uses)}else deferred.reject()};return onResolve.displayName="fallbackTranslationResolver",getTranslationTable(langKey).then(onResolve,deferred.reject),deferred.promise},getFallbackTranslationInstant=function(langKey,translationId,interpolateParams,Interpolator){var result,translationTable=$translationTable[langKey];if(translationTable&&Object.prototype.hasOwnProperty.call(translationTable,translationId)){if(Interpolator.setLocale(langKey),result=Interpolator.interpolate(translationTable[translationId],interpolateParams),result=applyPostProcessing(translationId,translationTable[translationId],result,interpolateParams,langKey),"@:"===result.substr(0,2))return getFallbackTranslationInstant(langKey,result.substr(2),interpolateParams,Interpolator);Interpolator.setLocale($uses)}return result},translateByHandler=function(translationId,interpolateParams,defaultTranslationText){if($missingTranslationHandlerFactory){var resultString=$injector.get($missingTranslationHandlerFactory)(translationId,$uses,interpolateParams,defaultTranslationText);return void 0!==resultString?resultString:translationId}return translationId},resolveForFallbackLanguage=function(fallbackLanguageIndex,translationId,interpolateParams,Interpolator,defaultTranslationText){var deferred=$q.defer();if(fallbackLanguageIndex<$fallbackLanguage.length){var langKey=$fallbackLanguage[fallbackLanguageIndex];getFallbackTranslation(langKey,translationId,interpolateParams,Interpolator).then(function(data){deferred.resolve(data)},function(){return resolveForFallbackLanguage(fallbackLanguageIndex+1,translationId,interpolateParams,Interpolator,defaultTranslationText).then(deferred.resolve,deferred.reject)})}else defaultTranslationText?deferred.resolve(defaultTranslationText):$missingTranslationHandlerFactory?deferred.resolve(translateByHandler(translationId,interpolateParams)):deferred.reject(translateByHandler(translationId,interpolateParams));return deferred.promise},resolveForFallbackLanguageInstant=function(fallbackLanguageIndex,translationId,interpolateParams,Interpolator){var result;if(fallbackLanguageIndex<$fallbackLanguage.length){var langKey=$fallbackLanguage[fallbackLanguageIndex];result=getFallbackTranslationInstant(langKey,translationId,interpolateParams,Interpolator),result||(result=resolveForFallbackLanguageInstant(fallbackLanguageIndex+1,translationId,interpolateParams,Interpolator))}return result},fallbackTranslation=function(translationId,interpolateParams,Interpolator,defaultTranslationText){return resolveForFallbackLanguage(startFallbackIteration>0?startFallbackIteration:fallbackIndex,translationId,interpolateParams,Interpolator,defaultTranslationText)},fallbackTranslationInstant=function(translationId,interpolateParams,Interpolator){return resolveForFallbackLanguageInstant(startFallbackIteration>0?startFallbackIteration:fallbackIndex,translationId,interpolateParams,Interpolator)},determineTranslation=function(translationId,interpolateParams,interpolationId,defaultTranslationText,uses){var deferred=$q.defer(),table=uses?$translationTable[uses]:$translationTable,Interpolator=interpolationId?interpolatorHashMap[interpolationId]:defaultInterpolator;if(table&&Object.prototype.hasOwnProperty.call(table,translationId)){var translation=table[translationId];if("@:"===translation.substr(0,2))$translate(translation.substr(2),interpolateParams,interpolationId,defaultTranslationText,uses).then(deferred.resolve,deferred.reject);else{var resolvedTranslation=Interpolator.interpolate(translation,interpolateParams);resolvedTranslation=applyPostProcessing(translationId,translation,resolvedTranslation,interpolateParams,uses),deferred.resolve(resolvedTranslation)}}else{var missingTranslationHandlerTranslation;$missingTranslationHandlerFactory&&!pendingLoader&&(missingTranslationHandlerTranslation=translateByHandler(translationId,interpolateParams,defaultTranslationText)),uses&&$fallbackLanguage&&$fallbackLanguage.length?fallbackTranslation(translationId,interpolateParams,Interpolator,defaultTranslationText).then(function(translation){deferred.resolve(translation)},function(_translationId){deferred.reject(applyNotFoundIndicators(_translationId))}):$missingTranslationHandlerFactory&&!pendingLoader&&missingTranslationHandlerTranslation?defaultTranslationText?deferred.resolve(defaultTranslationText):deferred.resolve(missingTranslationHandlerTranslation):defaultTranslationText?deferred.resolve(defaultTranslationText):deferred.reject(applyNotFoundIndicators(translationId))}return deferred.promise},determineTranslationInstant=function(translationId,interpolateParams,interpolationId,uses){var result,table=uses?$translationTable[uses]:$translationTable,Interpolator=defaultInterpolator;if(interpolatorHashMap&&Object.prototype.hasOwnProperty.call(interpolatorHashMap,interpolationId)&&(Interpolator=interpolatorHashMap[interpolationId]),table&&Object.prototype.hasOwnProperty.call(table,translationId)){var translation=table[translationId];"@:"===translation.substr(0,2)?result=determineTranslationInstant(translation.substr(2),interpolateParams,interpolationId,uses):(result=Interpolator.interpolate(translation,interpolateParams),result=applyPostProcessing(translationId,translation,result,interpolateParams,uses))}else{var missingTranslationHandlerTranslation;$missingTranslationHandlerFactory&&!pendingLoader&&(missingTranslationHandlerTranslation=translateByHandler(translationId,interpolateParams)),uses&&$fallbackLanguage&&$fallbackLanguage.length?(fallbackIndex=0,result=fallbackTranslationInstant(translationId,interpolateParams,Interpolator)):result=$missingTranslationHandlerFactory&&!pendingLoader&&missingTranslationHandlerTranslation?missingTranslationHandlerTranslation:applyNotFoundIndicators(translationId)}return result},clearNextLangAndPromise=function(key){$nextLang===key&&($nextLang=void 0),langPromises[key]=void 0},applyPostProcessing=function(translationId,translation,resolvedTranslation,interpolateParams,uses){var fn=postProcessFn;return fn&&("string"==typeof fn&&(fn=$injector.get(fn)),fn)?fn(translationId,translation,resolvedTranslation,interpolateParams,uses):resolvedTranslation},loadTranslationsIfMissing=function(key){$translationTable[key]||!$loaderFactory||langPromises[key]||(langPromises[key]=loadAsync(key).then(function(translation){return translations(translation.key,translation.table),translation}))};$translate.preferredLanguage=function(langKey){return langKey&&setupPreferredLanguage(langKey),$preferredLanguage},$translate.cloakClassName=function(){return $cloakClassName},$translate.nestedObjectDelimeter=function(){return $nestedObjectDelimeter},$translate.fallbackLanguage=function(langKey){if(void 0!==langKey&&null!==langKey){if(fallbackStack(langKey),$loaderFactory&&$fallbackLanguage&&$fallbackLanguage.length)for(var i=0,len=$fallbackLanguage.length;i<len;i++)langPromises[$fallbackLanguage[i]]||(langPromises[$fallbackLanguage[i]]=loadAsync($fallbackLanguage[i]));$translate.use($translate.use())}return $fallbackWasString?$fallbackLanguage[0]:$fallbackLanguage},$translate.useFallbackLanguage=function(langKey){if(void 0!==langKey&&null!==langKey)if(langKey){var langKeyPosition=indexOf($fallbackLanguage,langKey);langKeyPosition>-1&&(startFallbackIteration=langKeyPosition)}else startFallbackIteration=0},$translate.proposedLanguage=function(){return $nextLang},$translate.storage=function(){return Storage},$translate.negotiateLocale=negotiateLocale,$translate.use=function(key){if(!key)return $uses;var deferred=$q.defer();$rootScope.$emit("$translateChangeStart",{language:key});var aliasedKey=negotiateLocale(key);return $availableLanguageKeys.length>0&&!aliasedKey?$q.reject(key):(aliasedKey&&(key=aliasedKey),$nextLang=key,!$forceAsyncReloadEnabled&&$translationTable[key]||!$loaderFactory||langPromises[key]?langPromises[key]?langPromises[key].then(function(translation){return $nextLang===translation.key&&useLanguage(translation.key),deferred.resolve(translation.key),translation},function(key){return!$uses&&$fallbackLanguage&&$fallbackLanguage.length>0?$translate.use($fallbackLanguage[0]).then(deferred.resolve,deferred.reject):deferred.reject(key)}):(deferred.resolve(key),useLanguage(key)):(langPromises[key]=loadAsync(key).then(function(translation){return translations(translation.key,translation.table),deferred.resolve(translation.key),$nextLang===key&&useLanguage(translation.key),translation},function(key){return $rootScope.$emit("$translateChangeError",{language:key}),deferred.reject(key),$rootScope.$emit("$translateChangeEnd",{language:key}),$q.reject(key)}),langPromises[key]["finally"](function(){clearNextLangAndPromise(key)})),deferred.promise)},$translate.resolveClientLocale=function(){return getLocale()},$translate.storageKey=function(){return storageKey()},$translate.isPostCompilingEnabled=function(){return $postCompilingEnabled},$translate.isForceAsyncReloadEnabled=function(){return $forceAsyncReloadEnabled},$translate.isKeepContent=function(){return $keepContent},$translate.refresh=function(langKey){function resolve(){deferred.resolve(),$rootScope.$emit("$translateRefreshEnd",{language:langKey})}function reject(){deferred.reject(),$rootScope.$emit("$translateRefreshEnd",{language:langKey})}if(!$loaderFactory)throw new Error("Couldn't refresh translation table, no loader registered!");var deferred=$q.defer();if($rootScope.$emit("$translateRefreshStart",{language:langKey}),langKey)if($translationTable[langKey]){var oneTranslationsLoaded=function(data){return translations(data.key,data.table),langKey===$uses&&useLanguage($uses),resolve(),data};oneTranslationsLoaded.displayName="refreshPostProcessor",loadAsync(langKey).then(oneTranslationsLoaded,reject)}else reject();else{var tables=[],loadingKeys={};if($fallbackLanguage&&$fallbackLanguage.length)for(var i=0,len=$fallbackLanguage.length;i<len;i++)tables.push(loadAsync($fallbackLanguage[i])),loadingKeys[$fallbackLanguage[i]]=!0;$uses&&!loadingKeys[$uses]&&tables.push(loadAsync($uses));var allTranslationsLoaded=function(tableData){$translationTable={},angular.forEach(tableData,function(data){translations(data.key,data.table)}),$uses&&useLanguage($uses),resolve()};allTranslationsLoaded.displayName="refreshPostProcessor",$q.all(tables).then(allTranslationsLoaded,reject)}return deferred.promise},$translate.instant=function(translationId,interpolateParams,interpolationId,forceLanguage){var uses=forceLanguage&&forceLanguage!==$uses?negotiateLocale(forceLanguage)||forceLanguage:$uses;if(null===translationId||angular.isUndefined(translationId))return translationId;if(forceLanguage&&loadTranslationsIfMissing(forceLanguage),angular.isArray(translationId)){for(var results={},i=0,c=translationId.length;i<c;i++)results[translationId[i]]=$translate.instant(translationId[i],interpolateParams,interpolationId,forceLanguage);return results}if(angular.isString(translationId)&&translationId.length<1)return translationId;translationId&&(translationId=trim.apply(translationId));var result,possibleLangKeys=[];$preferredLanguage&&possibleLangKeys.push($preferredLanguage),uses&&possibleLangKeys.push(uses),$fallbackLanguage&&$fallbackLanguage.length&&(possibleLangKeys=possibleLangKeys.concat($fallbackLanguage));for(var j=0,d=possibleLangKeys.length;j<d;j++){var possibleLangKey=possibleLangKeys[j];if($translationTable[possibleLangKey]&&"undefined"!=typeof $translationTable[possibleLangKey][translationId]&&(result=determineTranslationInstant(translationId,interpolateParams,interpolationId,uses)),"undefined"!=typeof result)break}return result||""===result||($notFoundIndicatorLeft||$notFoundIndicatorRight?result=applyNotFoundIndicators(translationId):(result=defaultInterpolator.interpolate(translationId,interpolateParams),$missingTranslationHandlerFactory&&!pendingLoader&&(result=translateByHandler(translationId,interpolateParams)))),result},$translate.versionInfo=function(){return version},$translate.loaderCache=function(){return loaderCache},$translate.directivePriority=function(){return directivePriority},$translate.statefulFilter=function(){return statefulFilter},$translate.isReady=function(){return $isReady};var $onReadyDeferred=$q.defer();$onReadyDeferred.promise.then(function(){$isReady=!0}),$translate.onReady=function(fn){var deferred=$q.defer();return angular.isFunction(fn)&&deferred.promise.then(fn),$isReady?deferred.resolve():$onReadyDeferred.promise.then(deferred.resolve),deferred.promise},$translate.getAvailableLanguageKeys=function(){return $availableLanguageKeys.length>0?$availableLanguageKeys:null};var globalOnReadyListener=$rootScope.$on("$translateReady",function(){$onReadyDeferred.resolve(),globalOnReadyListener(),globalOnReadyListener=null}),globalOnChangeListener=$rootScope.$on("$translateChangeEnd",function(){$onReadyDeferred.resolve(),globalOnChangeListener(),globalOnChangeListener=null});if($loaderFactory){if(angular.equals($translationTable,{})&&$translate.use()&&$translate.use($translate.use()),$fallbackLanguage&&$fallbackLanguage.length)for(var processAsyncResult=function(translation){return translations(translation.key,translation.table),$rootScope.$emit("$translateChangeEnd",{language:translation.key}),translation},i=0,len=$fallbackLanguage.length;i<len;i++){var fallbackLanguageId=$fallbackLanguage[i];!$forceAsyncReloadEnabled&&$translationTable[fallbackLanguageId]||(langPromises[fallbackLanguageId]=loadAsync(fallbackLanguageId).then(processAsyncResult))}}else $rootScope.$emit("$translateReady",{language:$translate.use()});return $translate}]}function $translateDefaultInterpolation($interpolate,$translateSanitization){var $locale,$translateInterpolator={},$identifier="default";return $translateInterpolator.setLocale=function(locale){$locale=locale},$translateInterpolator.getInterpolationIdentifier=function(){return $identifier},$translateInterpolator.useSanitizeValueStrategy=function(value){return $translateSanitization.useStrategy(value),this},$translateInterpolator.interpolate=function(value,interpolationParams){interpolationParams=interpolationParams||{},interpolationParams=$translateSanitization.sanitize(interpolationParams,"params");var interpolatedText;return angular.isNumber(value)?interpolatedText=""+value:angular.isString(value)?(interpolatedText=$interpolate(value)(interpolationParams),interpolatedText=$translateSanitization.sanitize(interpolatedText,"text")):interpolatedText="",interpolatedText},$translateInterpolator}function translateDirective($translate,$q,$interpolate,$compile,$parse,$rootScope){var trim=function(){return this.toString().replace(/^\s+|\s+$/g,"")};return{restrict:"AE",scope:!0,priority:$translate.directivePriority(),compile:function(tElement,tAttr){var translateValuesExist=tAttr.translateValues?tAttr.translateValues:void 0,translateInterpolation=tAttr.translateInterpolation?tAttr.translateInterpolation:void 0,translateValueExist=tElement[0].outerHTML.match(/translate-value-+/i),interpolateRegExp="^(.*)("+$interpolate.startSymbol()+".*"+$interpolate.endSymbol()+")(.*)",watcherRegExp="^(.*)"+$interpolate.startSymbol()+"(.*)"+$interpolate.endSymbol()+"(.*)";return function(scope,iElement,iAttr){scope.interpolateParams={},scope.preText="",scope.postText="",scope.translateNamespace=getTranslateNamespace(scope);var translationIds={},initInterpolationParams=function(interpolateParams,iAttr,tAttr){if(iAttr.translateValues&&angular.extend(interpolateParams,$parse(iAttr.translateValues)(scope.$parent)),translateValueExist)for(var attr in tAttr)if(Object.prototype.hasOwnProperty.call(iAttr,attr)&&"translateValue"===attr.substr(0,14)&&"translateValues"!==attr){var attributeName=angular.lowercase(attr.substr(14,1))+attr.substr(15);interpolateParams[attributeName]=tAttr[attr]}},observeElementTranslation=function(translationId){if(angular.isFunction(observeElementTranslation._unwatchOld)&&(observeElementTranslation._unwatchOld(),observeElementTranslation._unwatchOld=void 0),angular.equals(translationId,"")||!angular.isDefined(translationId)){var iElementText=trim.apply(iElement.text()),interpolateMatches=iElementText.match(interpolateRegExp);if(angular.isArray(interpolateMatches)){scope.preText=interpolateMatches[1],scope.postText=interpolateMatches[3],translationIds.translate=$interpolate(interpolateMatches[2])(scope.$parent);var watcherMatches=iElementText.match(watcherRegExp);angular.isArray(watcherMatches)&&watcherMatches[2]&&watcherMatches[2].length&&(observeElementTranslation._unwatchOld=scope.$watch(watcherMatches[2],function(newValue){translationIds.translate=newValue,updateTranslations()}))}else translationIds.translate=iElementText?iElementText:void 0}else translationIds.translate=translationId;updateTranslations()},observeAttributeTranslation=function(translateAttr){iAttr.$observe(translateAttr,function(translationId){translationIds[translateAttr]=translationId,updateTranslations()})};initInterpolationParams(scope.interpolateParams,iAttr,tAttr);var firstAttributeChangedEvent=!0;iAttr.$observe("translate",function(translationId){"undefined"==typeof translationId?observeElementTranslation(""):""===translationId&&firstAttributeChangedEvent||(translationIds.translate=translationId,updateTranslations()),firstAttributeChangedEvent=!1});for(var translateAttr in iAttr)iAttr.hasOwnProperty(translateAttr)&&"translateAttr"===translateAttr.substr(0,13)&&observeAttributeTranslation(translateAttr);if(iAttr.$observe("translateDefault",function(value){scope.defaultText=value,updateTranslations()}),translateValuesExist&&iAttr.$observe("translateValues",function(interpolateParams){interpolateParams&&scope.$parent.$watch(function(){angular.extend(scope.interpolateParams,$parse(interpolateParams)(scope.$parent))})}),translateValueExist){var observeValueAttribute=function(attrName){iAttr.$observe(attrName,function(value){var attributeName=angular.lowercase(attrName.substr(14,1))+attrName.substr(15);scope.interpolateParams[attributeName]=value})};for(var attr in iAttr)Object.prototype.hasOwnProperty.call(iAttr,attr)&&"translateValue"===attr.substr(0,14)&&"translateValues"!==attr&&observeValueAttribute(attr)}var updateTranslations=function(){for(var key in translationIds)translationIds.hasOwnProperty(key)&&void 0!==translationIds[key]&&updateTranslation(key,translationIds[key],scope,scope.interpolateParams,scope.defaultText,scope.translateNamespace)},updateTranslation=function(translateAttr,translationId,scope,interpolateParams,defaultTranslationText,translateNamespace){translationId?(translateNamespace&&"."===translationId.charAt(0)&&(translationId=translateNamespace+translationId),$translate(translationId,interpolateParams,translateInterpolation,defaultTranslationText,scope.translateLanguage).then(function(translation){applyTranslation(translation,scope,!0,translateAttr)},function(translationId){applyTranslation(translationId,scope,!1,translateAttr)})):applyTranslation(translationId,scope,!1,translateAttr)},applyTranslation=function(value,scope,successful,translateAttr){if(successful||"undefined"!=typeof scope.defaultText&&(value=scope.defaultText),"translate"===translateAttr){(successful||!successful&&!$translate.isKeepContent()&&"undefined"==typeof iAttr.translateKeepContent)&&iElement.empty().append(scope.preText+value+scope.postText);var globallyEnabled=$translate.isPostCompilingEnabled(),locallyDefined="undefined"!=typeof tAttr.translateCompile,locallyEnabled=locallyDefined&&"false"!==tAttr.translateCompile;(globallyEnabled&&!locallyDefined||locallyEnabled)&&$compile(iElement.contents())(scope)}else{var attributeName=iAttr.$attr[translateAttr];"data-"===attributeName.substr(0,5)&&(attributeName=attributeName.substr(5)),attributeName=attributeName.substr(15),iElement.attr(attributeName,value)}};(translateValuesExist||translateValueExist||iAttr.translateDefault)&&scope.$watch("interpolateParams",updateTranslations,!0);var unbindTranslateLanguage=scope.$on("translateLanguageChanged",updateTranslations),unbind=$rootScope.$on("$translateChangeSuccess",updateTranslations);iElement.text().length?observeElementTranslation(iAttr.translate?iAttr.translate:""):iAttr.translate&&observeElementTranslation(iAttr.translate),updateTranslations(),scope.$on("$destroy",function(){unbindTranslateLanguage(),unbind()})}}}}function getTranslateNamespace(scope){return scope.translateNamespace?scope.translateNamespace:scope.$parent?getTranslateNamespace(scope.$parent):void 0}function translateCloakDirective($translate,$rootScope){return{compile:function(tElement){var applyCloak=function(){tElement.addClass($translate.cloakClassName())},removeCloak=function(){tElement.removeClass($translate.cloakClassName())};return $translate.onReady(function(){removeCloak()}),applyCloak(),function(scope,iElement,iAttr){iAttr.translateCloak&&iAttr.translateCloak.length&&(iAttr.$observe("translateCloak",function(translationId){$translate(translationId).then(removeCloak,applyCloak)}),$rootScope.$on("$translateChangeSuccess",function(){$translate(iAttr.translateCloak).then(removeCloak,applyCloak)}))}}}}function translateNamespaceDirective(){return{restrict:"A",scope:!0,compile:function(){return{pre:function(scope,iElement,iAttrs){scope.translateNamespace=getTranslateNamespace(scope),scope.translateNamespace&&"."===iAttrs.translateNamespace.charAt(0)?scope.translateNamespace+=iAttrs.translateNamespace:scope.translateNamespace=iAttrs.translateNamespace}}}}}function getTranslateNamespace(scope){return scope.translateNamespace?scope.translateNamespace:scope.$parent?getTranslateNamespace(scope.$parent):void 0}function translateLanguageDirective(){return{restrict:"A",scope:!0,compile:function(){return function(scope,iElement,iAttrs){iAttrs.$observe("translateLanguage",function(newTranslateLanguage){scope.translateLanguage=newTranslateLanguage}),scope.$watch("translateLanguage",function(){scope.$broadcast("translateLanguageChanged")})}}}}function translateFilterFactory($parse,$translate){var translateFilter=function(translationId,interpolateParams,interpolation,forceLanguage){return angular.isObject(interpolateParams)||(interpolateParams=$parse(interpolateParams)(this)),$translate.instant(translationId,interpolateParams,interpolation,forceLanguage)};return $translate.statefulFilter()&&(translateFilter.$stateful=!0),translateFilter;
}function $translationCache($cacheFactory){return $cacheFactory("translations")}return runTranslate.$inject=["$translate"],$translate.$inject=["$STORAGE_KEY","$windowProvider","$translateSanitizationProvider","pascalprechtTranslateOverrider"],$translateDefaultInterpolation.$inject=["$interpolate","$translateSanitization"],translateDirective.$inject=["$translate","$q","$interpolate","$compile","$parse","$rootScope"],translateCloakDirective.$inject=["$translate","$rootScope"],translateFilterFactory.$inject=["$parse","$translate"],$translationCache.$inject=["$cacheFactory"],angular.module("pascalprecht.translate",["ng"]).run(runTranslate),runTranslate.displayName="runTranslate",angular.module("pascalprecht.translate").provider("$translateSanitization",$translateSanitizationProvider),angular.module("pascalprecht.translate").constant("pascalprechtTranslateOverrider",{}).provider("$translate",$translate),$translate.displayName="displayName",angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",$translateDefaultInterpolation),$translateDefaultInterpolation.displayName="$translateDefaultInterpolation",angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",translateDirective),translateDirective.displayName="translateDirective",angular.module("pascalprecht.translate").directive("translateCloak",translateCloakDirective),translateCloakDirective.displayName="translateCloakDirective",angular.module("pascalprecht.translate").directive("translateNamespace",translateNamespaceDirective),translateNamespaceDirective.displayName="translateNamespaceDirective",angular.module("pascalprecht.translate").directive("translateLanguage",translateLanguageDirective),translateLanguageDirective.displayName="translateLanguageDirective",angular.module("pascalprecht.translate").filter("translate",translateFilterFactory),translateFilterFactory.displayName="translateFilterFactory",angular.module("pascalprecht.translate").factory("$translationCache",$translationCache),$translationCache.displayName="$translationCache","pascalprecht.translate"}),function(root,factory){"function"==typeof define&&define.amd?define([],function(){return factory()}):"object"==typeof exports?module.exports=factory():root.DeepDiff=factory()}(this,function(undefined){function inherits(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}function Diff(kind,path){Object.defineProperty(this,"kind",{value:kind,enumerable:!0}),path&&path.length&&Object.defineProperty(this,"path",{value:path,enumerable:!0})}function DiffEdit(path,origin,value){DiffEdit.super_.call(this,"E",path),Object.defineProperty(this,"lhs",{value:origin,enumerable:!0}),Object.defineProperty(this,"rhs",{value:value,enumerable:!0})}function DiffNew(path,value){DiffNew.super_.call(this,"N",path),Object.defineProperty(this,"rhs",{value:value,enumerable:!0})}function DiffDeleted(path,value){DiffDeleted.super_.call(this,"D",path),Object.defineProperty(this,"lhs",{value:value,enumerable:!0})}function DiffArray(path,index,item){DiffArray.super_.call(this,"A",path),Object.defineProperty(this,"index",{value:index,enumerable:!0}),Object.defineProperty(this,"item",{value:item,enumerable:!0})}function arrayRemove(arr,from,to){var rest=arr.slice((to||from)+1||arr.length);return arr.length=from<0?arr.length+from:from,arr.push.apply(arr,rest),arr}function realTypeOf(subject){var type=typeof subject;return"object"!==type?type:subject===Math?"math":null===subject?"null":Array.isArray(subject)?"array":"[object Date]"===Object.prototype.toString.call(subject)?"date":"undefined"!=typeof subject.toString&&/^\/.*\//.test(subject.toString())?"regexp":"object"}function deepDiff(lhs,rhs,changes,prefilter,path,key,stack){path=path||[];var currentPath=path.slice(0);if("undefined"!=typeof key){if(prefilter){if("function"==typeof prefilter&&prefilter(currentPath,key))return;if("object"==typeof prefilter){if(prefilter.prefilter&&prefilter.prefilter(currentPath,key))return;if(prefilter.normalize){var alt=prefilter.normalize(currentPath,key,lhs,rhs);alt&&(lhs=alt[0],rhs=alt[1])}}}currentPath.push(key)}"regexp"===realTypeOf(lhs)&&"regexp"===realTypeOf(rhs)&&(lhs=lhs.toString(),rhs=rhs.toString());var ltype=typeof lhs,rtype=typeof rhs;if("undefined"===ltype)"undefined"!==rtype&&changes(new DiffNew(currentPath,rhs));else if("undefined"===rtype)changes(new DiffDeleted(currentPath,lhs));else if(realTypeOf(lhs)!==realTypeOf(rhs))changes(new DiffEdit(currentPath,lhs,rhs));else if("[object Date]"===Object.prototype.toString.call(lhs)&&"[object Date]"===Object.prototype.toString.call(rhs)&&lhs-rhs!==0)changes(new DiffEdit(currentPath,lhs,rhs));else if("object"===ltype&&null!==lhs&&null!==rhs){if(stack=stack||[],stack.indexOf(lhs)<0){if(stack.push(lhs),Array.isArray(lhs)){var i;lhs.length;for(i=0;i<lhs.length;i++)i>=rhs.length?changes(new DiffArray(currentPath,i,new DiffDeleted(undefined,lhs[i]))):deepDiff(lhs[i],rhs[i],changes,prefilter,currentPath,i,stack);for(;i<rhs.length;)changes(new DiffArray(currentPath,i,new DiffNew(undefined,rhs[i++])))}else{var akeys=Object.keys(lhs),pkeys=Object.keys(rhs);akeys.forEach(function(k,i){var other=pkeys.indexOf(k);other>=0?(deepDiff(lhs[k],rhs[k],changes,prefilter,currentPath,k,stack),pkeys=arrayRemove(pkeys,other)):deepDiff(lhs[k],undefined,changes,prefilter,currentPath,k,stack)}),pkeys.forEach(function(k){deepDiff(undefined,rhs[k],changes,prefilter,currentPath,k,stack)})}stack.length=stack.length-1}}else lhs!==rhs&&("number"===ltype&&isNaN(lhs)&&isNaN(rhs)||changes(new DiffEdit(currentPath,lhs,rhs)))}function accumulateDiff(lhs,rhs,prefilter,accum){return accum=accum||[],deepDiff(lhs,rhs,function(diff){diff&&accum.push(diff)},prefilter),accum.length?accum:undefined}function applyArrayChange(arr,index,change){if(change.path&&change.path.length){var i,it=arr[index],u=change.path.length-1;for(i=0;i<u;i++)it=it[change.path[i]];switch(change.kind){case"A":applyArrayChange(it[change.path[i]],change.index,change.item);break;case"D":delete it[change.path[i]];break;case"E":case"N":it[change.path[i]]=change.rhs}}else switch(change.kind){case"A":applyArrayChange(arr[index],change.index,change.item);break;case"D":arr=arrayRemove(arr,index);break;case"E":case"N":arr[index]=change.rhs}return arr}function applyChange(target,source,change){if(target&&source&&change&&change.kind){for(var it=target,i=-1,last=change.path?change.path.length-1:0;++i<last;)"undefined"==typeof it[change.path[i]]&&(it[change.path[i]]="number"==typeof change.path[i]?[]:{}),it=it[change.path[i]];switch(change.kind){case"A":applyArrayChange(change.path?it[change.path[i]]:it,change.index,change.item);break;case"D":delete it[change.path[i]];break;case"E":case"N":it[change.path[i]]=change.rhs}}}function revertArrayChange(arr,index,change){if(change.path&&change.path.length){var i,it=arr[index],u=change.path.length-1;for(i=0;i<u;i++)it=it[change.path[i]];switch(change.kind){case"A":revertArrayChange(it[change.path[i]],change.index,change.item);break;case"D":it[change.path[i]]=change.lhs;break;case"E":it[change.path[i]]=change.lhs;break;case"N":delete it[change.path[i]]}}else switch(change.kind){case"A":revertArrayChange(arr[index],change.index,change.item);break;case"D":arr[index]=change.lhs;break;case"E":arr[index]=change.lhs;break;case"N":arr=arrayRemove(arr,index)}return arr}function revertChange(target,source,change){if(target&&source&&change&&change.kind){var i,u,it=target;for(u=change.path.length-1,i=0;i<u;i++)"undefined"==typeof it[change.path[i]]&&(it[change.path[i]]={}),it=it[change.path[i]];switch(change.kind){case"A":revertArrayChange(it[change.path[i]],change.index,change.item);break;case"D":it[change.path[i]]=change.lhs;break;case"E":it[change.path[i]]=change.lhs;break;case"N":delete it[change.path[i]]}}}function applyDiff(target,source,filter){if(target&&source){var onChange=function(change){filter&&!filter(target,source,change)||applyChange(target,source,change)};deepDiff(target,source,onChange)}}var $scope,conflict,conflictResolution=[];return $scope="object"==typeof global&&global?global:"undefined"!=typeof window?window:{},conflict=$scope.DeepDiff,conflict&&conflictResolution.push(function(){"undefined"!=typeof conflict&&$scope.DeepDiff===accumulateDiff&&($scope.DeepDiff=conflict,conflict=undefined)}),inherits(DiffEdit,Diff),inherits(DiffNew,Diff),inherits(DiffDeleted,Diff),inherits(DiffArray,Diff),Object.defineProperties(accumulateDiff,{diff:{value:accumulateDiff,enumerable:!0},observableDiff:{value:deepDiff,enumerable:!0},applyDiff:{value:applyDiff,enumerable:!0},applyChange:{value:applyChange,enumerable:!0},revertChange:{value:revertChange,enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof conflict},enumerable:!0},noConflict:{value:function(){return conflictResolution&&(conflictResolution.forEach(function(it){it()}),conflictResolution=null),accumulateDiff},enumerable:!0}}),accumulateDiff}),function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.Clipboard=f()}}(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){function closest(element,selector){for(;element&&element!==document;){if(element.matches(selector))return element;element=element.parentNode}}if(Element&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector}module.exports=closest},{}],2:[function(require,module,exports){function delegate(element,selector,type,callback,useCapture){var listenerFn=listener.apply(this,arguments);return element.addEventListener(type,listenerFn,useCapture),{destroy:function(){element.removeEventListener(type,listenerFn,useCapture)}}}function listener(element,selector,type,callback){return function(e){e.delegateTarget=closest(e.target,selector),e.delegateTarget&&callback.call(element,e)}}var closest=require("./closest");module.exports=delegate},{"./closest":1}],3:[function(require,module,exports){exports.node=function(value){return void 0!==value&&value instanceof HTMLElement&&1===value.nodeType},exports.nodeList=function(value){var type=Object.prototype.toString.call(value);return void 0!==value&&("[object NodeList]"===type||"[object HTMLCollection]"===type)&&"length"in value&&(0===value.length||exports.node(value[0]))},exports.string=function(value){return"string"==typeof value||value instanceof String},exports.fn=function(value){var type=Object.prototype.toString.call(value);return"[object Function]"===type}},{}],4:[function(require,module,exports){function listen(target,type,callback){if(!target&&!type&&!callback)throw new Error("Missing required arguments");if(!is.string(type))throw new TypeError("Second argument must be a String");if(!is.fn(callback))throw new TypeError("Third argument must be a Function");if(is.node(target))return listenNode(target,type,callback);if(is.nodeList(target))return listenNodeList(target,type,callback);if(is.string(target))return listenSelector(target,type,callback);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function listenNode(node,type,callback){return node.addEventListener(type,callback),{destroy:function(){node.removeEventListener(type,callback)}}}function listenNodeList(nodeList,type,callback){return Array.prototype.forEach.call(nodeList,function(node){node.addEventListener(type,callback)}),{destroy:function(){Array.prototype.forEach.call(nodeList,function(node){node.removeEventListener(type,callback)})}}}function listenSelector(selector,type,callback){return delegate(document.body,selector,type,callback)}var is=require("./is"),delegate=require("delegate");module.exports=listen},{"./is":3,delegate:2}],5:[function(require,module,exports){function select(element){var selectedText;if("SELECT"===element.nodeName)element.focus(),selectedText=element.value;else if("INPUT"===element.nodeName||"TEXTAREA"===element.nodeName)element.focus(),element.setSelectionRange(0,element.value.length),selectedText=element.value;else{element.hasAttribute("contenteditable")&&element.focus();var selection=window.getSelection(),range=document.createRange();range.selectNodeContents(element),selection.removeAllRanges(),selection.addRange(range),selectedText=selection.toString()}return selectedText}module.exports=select},{}],6:[function(require,module,exports){function E(){}E.prototype={on:function(name,callback,ctx){var e=this.e||(this.e={});return(e[name]||(e[name]=[])).push({fn:callback,ctx:ctx}),this},once:function(name,callback,ctx){function listener(){self.off(name,listener),callback.apply(ctx,arguments)}var self=this;return listener._=callback,this.on(name,listener,ctx)},emit:function(name){var data=[].slice.call(arguments,1),evtArr=((this.e||(this.e={}))[name]||[]).slice(),i=0,len=evtArr.length;for(i;i<len;i++)evtArr[i].fn.apply(evtArr[i].ctx,data);return this},off:function(name,callback){var e=this.e||(this.e={}),evts=e[name],liveEvents=[];if(evts&&callback)for(var i=0,len=evts.length;i<len;i++)evts[i].fn!==callback&&evts[i].fn._!==callback&&liveEvents.push(evts[i]);return liveEvents.length?e[name]=liveEvents:delete e[name],this}},module.exports=E},{}],7:[function(require,module,exports){!function(global,factory){if("function"==typeof define&&define.amd)define(["module","select"],factory);else if("undefined"!=typeof exports)factory(module,require("select"));else{var mod={exports:{}};factory(mod,global.select),global.clipboardAction=mod.exports}}(this,function(module,_select){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var _select2=_interopRequireDefault(_select),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),ClipboardAction=function(){function ClipboardAction(options){_classCallCheck(this,ClipboardAction),this.resolveOptions(options),this.initSelection()}return _createClass(ClipboardAction,[{key:"resolveOptions",value:function(){var options=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=options.action,this.emitter=options.emitter,this.target=options.target,this.text=options.text,this.trigger=options.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var _this=this,isRTL="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return _this.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[isRTL?"right":"left"]="-9999px";var yPosition=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,yPosition)),this.fakeElem.style.top=yPosition+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,_select2["default"])(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,_select2["default"])(this.target),this.copyText()}},{key:"copyText",value:function(){var succeeded=void 0;try{succeeded=document.execCommand(this.action)}catch(err){succeeded=!1}this.handleResult(succeeded)}},{key:"handleResult",value:function(succeeded){this.emitter.emit(succeeded?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var action=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=action,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(target){if(void 0!==target){if(!target||"object"!==("undefined"==typeof target?"undefined":_typeof(target))||1!==target.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&target.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(target.hasAttribute("readonly")||target.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=target}},get:function(){return this._target}}]),ClipboardAction}();module.exports=ClipboardAction})},{select:5}],8:[function(require,module,exports){!function(global,factory){if("function"==typeof define&&define.amd)define(["module","./clipboard-action","tiny-emitter","good-listener"],factory);else if("undefined"!=typeof exports)factory(module,require("./clipboard-action"),require("tiny-emitter"),require("good-listener"));else{var mod={exports:{}};factory(mod,global.clipboardAction,global.tinyEmitter,global.goodListener),global.clipboard=mod.exports}}(this,function(module,_clipboardAction,_tinyEmitter,_goodListener){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function getAttributeValue(suffix,element){var attribute="data-clipboard-"+suffix;if(element.hasAttribute(attribute))return element.getAttribute(attribute)}var _clipboardAction2=_interopRequireDefault(_clipboardAction),_tinyEmitter2=_interopRequireDefault(_tinyEmitter),_goodListener2=_interopRequireDefault(_goodListener),_createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),Clipboard=function(_Emitter){function Clipboard(trigger,options){_classCallCheck(this,Clipboard);var _this=_possibleConstructorReturn(this,(Clipboard.__proto__||Object.getPrototypeOf(Clipboard)).call(this));return _this.resolveOptions(options),_this.listenClick(trigger),_this}return _inherits(Clipboard,_Emitter),_createClass(Clipboard,[{key:"resolveOptions",value:function(){var options=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof options.action?options.action:this.defaultAction,this.target="function"==typeof options.target?options.target:this.defaultTarget,this.text="function"==typeof options.text?options.text:this.defaultText}},{key:"listenClick",value:function(trigger){var _this2=this;this.listener=(0,_goodListener2["default"])(trigger,"click",function(e){return _this2.onClick(e)})}},{key:"onClick",value:function(e){var trigger=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new _clipboardAction2["default"]({action:this.action(trigger),target:this.target(trigger),text:this.text(trigger),trigger:trigger,emitter:this})}},{key:"defaultAction",value:function(trigger){return getAttributeValue("action",trigger)}},{key:"defaultTarget",value:function(trigger){var selector=getAttributeValue("target",trigger);if(selector)return document.querySelector(selector)}},{key:"defaultText",value:function(trigger){return getAttributeValue("text",trigger)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),Clipboard}(_tinyEmitter2["default"]);module.exports=Clipboard})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(){var angular,Clipboard,MODULE_NAME="ngclipboard";"object"==typeof module&&module.exports?(angular=require("angular"),Clipboard=require("clipboard"),module.exports=MODULE_NAME):(angular=window.angular,Clipboard=window.Clipboard),angular.module(MODULE_NAME,[]).directive("ngclipboard",function(){return{restrict:"A",scope:{ngclipboardSuccess:"&",ngclipboardError:"&"},link:function(scope,element){var clipboard=new Clipboard(element[0]);clipboard.on("success",function(e){scope.$apply(function(){scope.ngclipboardSuccess({e:e})})}),clipboard.on("error",function(e){scope.$apply(function(){scope.ngclipboardError({e:e})})})}}})}(),function(define,undefined){define(function(){function equalIC(a,b){return null!=a&&null!=b&&a.toLowerCase()===b.toLowerCase()}function containsIC(array,value){var valueLC,i,len=array.length;if(!len||!value)return!1;for(valueLC=value.toLowerCase(),i=0;i<len;++i)if(valueLC===array[i].toLowerCase())return!0;return!1}function convertPropsToRegExp(object){for(var key in object)hasOwnProp.call(object,key)&&(object[key]=new RegExp(object[key],"i"))}function MobileDetect(userAgent,maxPhoneWidth){this.ua=userAgent||"",this._cache={},this.maxPhoneWidth=maxPhoneWidth||600}var impl={};impl.mobileDetectRules={phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",Dell:"Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b",Samsung:"Samsung|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",NokiaLumia:"Lumia [0-9]{3,4}",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",
iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo 3DS",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI)\\b",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K017 |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",NokiaLumiaTablet:"Lumia 2520",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",KocasoTablet:"\\b(TB-1207)\\b",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bJolla\\b|\\bTP750\\b"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Vivaldi:"Vivaldi",Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+",Skyfire:"Skyfire",Edge:"Mobile Safari/[.0-9]* Edge",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",Tizen:"Tizen",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger",PaleMoon:"Android.*PaleMoon|Mobile.*PaleMoon"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:"Firefox/[VER]",Fennec:"Fennec/[VER]",Edge:"Edge/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]","UC Browser":"UC Browser[VER]",MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",PaleMoon:"PaleMoon/[VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",Goanna:"Goanna/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},impl.detectMobileBrowsers={fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,tabletPattern:/android|ipad|playbook|silk/i};var isArray,hasOwnProp=Object.prototype.hasOwnProperty;return impl.FALLBACK_PHONE="UnknownPhone",impl.FALLBACK_TABLET="UnknownTablet",impl.FALLBACK_MOBILE="UnknownMobile",isArray="isArray"in Array?Array.isArray:function(value){return"[object Array]"===Object.prototype.toString.call(value)},function(){var key,values,value,i,len,verPos,mobileDetectRules=impl.mobileDetectRules;for(key in mobileDetectRules.props)if(hasOwnProp.call(mobileDetectRules.props,key)){for(values=mobileDetectRules.props[key],isArray(values)||(values=[values]),len=values.length,i=0;i<len;++i)value=values[i],verPos=value.indexOf("[VER]"),verPos>=0&&(value=value.substring(0,verPos)+"([\\w._\\+]+)"+value.substring(verPos+5)),values[i]=new RegExp(value,"i");mobileDetectRules.props[key]=values}convertPropsToRegExp(mobileDetectRules.oss),convertPropsToRegExp(mobileDetectRules.phones),convertPropsToRegExp(mobileDetectRules.tablets),convertPropsToRegExp(mobileDetectRules.uas),convertPropsToRegExp(mobileDetectRules.utils),mobileDetectRules.oss0={WindowsPhoneOS:mobileDetectRules.oss.WindowsPhoneOS,WindowsMobileOS:mobileDetectRules.oss.WindowsMobileOS}}(),impl.findMatch=function(rules,userAgent){for(var key in rules)if(hasOwnProp.call(rules,key)&&rules[key].test(userAgent))return key;return null},impl.findMatches=function(rules,userAgent){var result=[];for(var key in rules)hasOwnProp.call(rules,key)&&rules[key].test(userAgent)&&result.push(key);return result},impl.getVersionStr=function(propertyName,userAgent){var patterns,i,len,match,props=impl.mobileDetectRules.props;if(hasOwnProp.call(props,propertyName))for(patterns=props[propertyName],len=patterns.length,i=0;i<len;++i)if(match=patterns[i].exec(userAgent),null!==match)return match[1];return null},impl.getVersion=function(propertyName,userAgent){var version=impl.getVersionStr(propertyName,userAgent);return version?impl.prepareVersionNo(version):NaN},impl.prepareVersionNo=function(version){var numbers;return numbers=version.split(/[a-z._ \/\-]/i),1===numbers.length&&(version=numbers[0]),numbers.length>1&&(version=numbers[0]+".",numbers.shift(),version+=numbers.join("")),Number(version)},impl.isMobileFallback=function(userAgent){return impl.detectMobileBrowsers.fullPattern.test(userAgent)||impl.detectMobileBrowsers.shortPattern.test(userAgent.substr(0,4))},impl.isTabletFallback=function(userAgent){return impl.detectMobileBrowsers.tabletPattern.test(userAgent)},impl.prepareDetectionCache=function(cache,userAgent,maxPhoneWidth){if(cache.mobile===undefined){var phone,tablet,phoneSized;return(tablet=impl.findMatch(impl.mobileDetectRules.tablets,userAgent))?(cache.mobile=cache.tablet=tablet,void(cache.phone=null)):(phone=impl.findMatch(impl.mobileDetectRules.phones,userAgent))?(cache.mobile=cache.phone=phone,void(cache.tablet=null)):void(impl.isMobileFallback(userAgent)?(phoneSized=MobileDetect.isPhoneSized(maxPhoneWidth),phoneSized===undefined?(cache.mobile=impl.FALLBACK_MOBILE,cache.tablet=cache.phone=null):phoneSized?(cache.mobile=cache.phone=impl.FALLBACK_PHONE,cache.tablet=null):(cache.mobile=cache.tablet=impl.FALLBACK_TABLET,cache.phone=null)):impl.isTabletFallback(userAgent)?(cache.mobile=cache.tablet=impl.FALLBACK_TABLET,cache.phone=null):cache.mobile=cache.tablet=cache.phone=null)}},impl.mobileGrade=function(t){var $isMobile=null!==t.mobile();return t.os("iOS")&&t.version("iPad")>=4.3||t.os("iOS")&&t.version("iPhone")>=3.1||t.os("iOS")&&t.version("iPod")>=3.1||t.version("Android")>2.1&&t.is("Webkit")||t.version("Windows Phone OS")>=7||t.is("BlackBerry")&&t.version("BlackBerry")>=6||t.match("Playbook.*Tablet")||t.version("webOS")>=1.4&&t.match("Palm|Pre|Pixi")||t.match("hp.*TouchPad")||t.is("Firefox")&&t.version("Firefox")>=12||t.is("Chrome")&&t.is("AndroidOS")&&t.version("Android")>=4||t.is("Skyfire")&&t.version("Skyfire")>=4.1&&t.is("AndroidOS")&&t.version("Android")>=2.3||t.is("Opera")&&t.version("Opera Mobi")>11&&t.is("AndroidOS")||t.is("MeeGoOS")||t.is("Tizen")||t.is("Dolfin")&&t.version("Bada")>=2||(t.is("UC Browser")||t.is("Dolfin"))&&t.version("Android")>=2.3||t.match("Kindle Fire")||t.is("Kindle")&&t.version("Kindle")>=3||t.is("AndroidOS")&&t.is("NookTablet")||t.version("Chrome")>=11&&!$isMobile||t.version("Safari")>=5&&!$isMobile||t.version("Firefox")>=4&&!$isMobile||t.version("MSIE")>=7&&!$isMobile||t.version("Opera")>=10&&!$isMobile?"A":t.os("iOS")&&t.version("iPad")<4.3||t.os("iOS")&&t.version("iPhone")<3.1||t.os("iOS")&&t.version("iPod")<3.1||t.is("Blackberry")&&t.version("BlackBerry")>=5&&t.version("BlackBerry")<6||t.version("Opera Mini")>=5&&t.version("Opera Mini")<=6.5&&(t.version("Android")>=2.3||t.is("iOS"))||t.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||t.version("Opera Mobi")>=11&&t.is("SymbianOS")?"B":(t.version("BlackBerry")<5||t.match("MSIEMobile|Windows CE.*Mobile")||t.version("Windows Mobile")<=5.2,"C")},impl.detectOS=function(ua){return impl.findMatch(impl.mobileDetectRules.oss0,ua)||impl.findMatch(impl.mobileDetectRules.oss,ua)},impl.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},MobileDetect.prototype={constructor:MobileDetect,mobile:function(){return impl.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return impl.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return impl.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return this._cache.userAgent===undefined&&(this._cache.userAgent=impl.findMatch(impl.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return this._cache.userAgents===undefined&&(this._cache.userAgents=impl.findMatches(impl.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return this._cache.os===undefined&&(this._cache.os=impl.detectOS(this.ua)),this._cache.os},version:function(key){return impl.getVersion(key,this.ua)},versionStr:function(key){return impl.getVersionStr(key,this.ua)},is:function(key){return containsIC(this.userAgents(),key)||equalIC(key,this.os())||equalIC(key,this.phone())||equalIC(key,this.tablet())||containsIC(impl.findMatches(impl.mobileDetectRules.utils,this.ua),key)},match:function(pattern){return pattern instanceof RegExp||(pattern=new RegExp(pattern,"i")),pattern.test(this.ua)},isPhoneSized:function(maxPhoneWidth){return MobileDetect.isPhoneSized(maxPhoneWidth||this.maxPhoneWidth)},mobileGrade:function(){return this._cache.grade===undefined&&(this._cache.grade=impl.mobileGrade(this)),this._cache.grade}},"undefined"!=typeof window&&window.screen?MobileDetect.isPhoneSized=function(maxPhoneWidth){return maxPhoneWidth<0?undefined:impl.getDeviceSmallerSide()<=maxPhoneWidth}:MobileDetect.isPhoneSized=function(){},MobileDetect._impl=impl,MobileDetect.version="1.3.3 2016-07-31",MobileDetect})}(function(undefined){if("undefined"!=typeof module&&module.exports)return function(factory){module.exports=factory()};if("function"==typeof define&&define.amd)return define;if("undefined"!=typeof window)return function(factory){window.MobileDetect=factory()};throw new Error("unknown environment")}()),function(window,document,undefined){function bsCompilerService($q,$http,$injector,$compile,$controller,$templateCache){function findElement(query,element){return angular.element((element||document).querySelectorAll(query))}function fetchTemplate(template){return fetchPromises[template]?fetchPromises[template]:fetchPromises[template]=$http.get(template,{cache:$templateCache}).then(function(res){return res.data})}this.compile=function(options){options.template&&/\.html$/.test(options.template)&&(console.warn("Deprecated use of `template` option to pass a file. Please use the `templateUrl` option instead."),options.templateUrl=options.template,options.template="");var templateUrl=options.templateUrl,template=options.template||"",controller=options.controller,controllerAs=options.controllerAs,resolve=options.resolve||{},locals=options.locals||{},transformTemplate=options.transformTemplate||angular.identity,bindToController=options.bindToController;if(angular.forEach(resolve,function(value,key){angular.isString(value)?resolve[key]=$injector.get(value):resolve[key]=$injector.invoke(value)}),angular.extend(resolve,locals),template)resolve.$template=$q.when(template);else{if(!templateUrl)throw new Error("Missing `template` / `templateUrl` option.");resolve.$template=fetchTemplate(templateUrl)}return options.titleTemplate&&(resolve.$template=$q.all([resolve.$template,fetchTemplate(options.titleTemplate)]).then(function(templates){var templateEl=angular.element(templates[0]);return findElement('[ng-bind="title"]',templateEl[0]).removeAttr("ng-bind").html(templates[1]),templateEl[0].outerHTML})),options.contentTemplate&&(resolve.$template=$q.all([resolve.$template,fetchTemplate(options.contentTemplate)]).then(function(templates){var templateEl=angular.element(templates[0]),contentEl=findElement('[ng-bind="content"]',templateEl[0]).removeAttr("ng-bind").html(templates[1]);
return options.templateUrl||contentEl.next().remove(),templateEl[0].outerHTML})),$q.all(resolve).then(function(locals){var template=transformTemplate(locals.$template);options.html&&(template=template.replace(/ng-bind="/gi,'ng-bind-html="'));var element=angular.element("<div>").html(template.trim()).contents(),linkFn=$compile(element);return{locals:locals,element:element,link:function(scope){if(locals.$scope=scope,controller){var invokeCtrl=$controller(controller,locals,!0);bindToController&&angular.extend(invokeCtrl.instance,locals);var ctrl=angular.isObject(invokeCtrl)?invokeCtrl:invokeCtrl();element.data("$ngControllerController",ctrl),element.children().data("$ngControllerController",ctrl),controllerAs&&(scope[controllerAs]=ctrl)}return linkFn.apply(null,arguments)}}})};var fetchPromises={}}bsCompilerService.$inject=["$q","$http","$injector","$compile","$controller","$templateCache"],angular.module("mgcrea.ngStrap.typeahead",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$typeahead",function(){var defaults=this.defaults={animation:"am-fade",prefixClass:"typeahead",prefixEvent:"$typeahead",placement:"bottom-left",templateUrl:"typeahead/typeahead.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,minLength:1,filter:"bsAsyncFilter",limit:6,autoSelect:!1,comparator:"",trimValue:!0};this.$get=["$window","$rootScope","$tooltip","$$rAF","$timeout",function($window,$rootScope,$tooltip,$$rAF,$timeout){function TypeaheadFactory(element,controller,config){var $typeahead={},options=angular.extend({},defaults,config);$typeahead=$tooltip(element,options);var parentScope=config.scope,scope=$typeahead.$scope;scope.$resetMatches=function(){scope.$matches=[],scope.$activeIndex=options.autoSelect?0:-1},scope.$resetMatches(),scope.$activate=function(index){scope.$$postDigest(function(){$typeahead.activate(index)})},scope.$select=function(index,evt){scope.$$postDigest(function(){$typeahead.select(index)})},scope.$isVisible=function(){return $typeahead.$isVisible()},$typeahead.update=function(matches){scope.$matches=matches,scope.$activeIndex>=matches.length&&(scope.$activeIndex=options.autoSelect?0:-1),safeDigest(scope),$$rAF($typeahead.$applyPlacement)},$typeahead.activate=function(index){scope.$activeIndex=index},$typeahead.select=function(index){if(index!==-1){var value=scope.$matches[index].value;controller.$setViewValue(value),controller.$render(),scope.$resetMatches(),parentScope&&parentScope.$digest(),scope.$emit(options.prefixEvent+".select",value,index,$typeahead),angular.isDefined(options.onSelect)&&angular.isFunction(options.onSelect)&&options.onSelect(value,index,$typeahead)}},$typeahead.$isVisible=function(){return options.minLength&&controller?scope.$matches.length&&angular.isString(controller.$viewValue)&&controller.$viewValue.length>=options.minLength:!!scope.$matches.length},$typeahead.$getIndex=function(value){var index;for(index=scope.$matches.length;index--&&!angular.equals(scope.$matches[index].value,value););return index},$typeahead.$onMouseDown=function(evt){evt.preventDefault(),evt.stopPropagation()},$typeahead.$$updateScrollTop=function(container,index){if(index>-1&&index<container.children.length){var active=container.children[index],clientTop=active.offsetTop,clientBottom=active.offsetTop+active.clientHeight,highWatermark=container.scrollTop,lowWatermark=container.scrollTop+container.clientHeight;clientBottom>=highWatermark&&clientTop<highWatermark?container.scrollTop=Math.max(0,container.scrollTop-container.clientHeight):clientBottom>lowWatermark&&(container.scrollTop=clientTop)}},$typeahead.$onKeyDown=function(evt){/(38|40|13)/.test(evt.keyCode)&&(!$typeahead.$isVisible()||13===evt.keyCode&&scope.$activeIndex===-1||(evt.preventDefault(),evt.stopPropagation()),13===evt.keyCode&&scope.$matches.length?$typeahead.select(scope.$activeIndex):38===evt.keyCode&&scope.$activeIndex>0?scope.$activeIndex--:40===evt.keyCode&&scope.$activeIndex<scope.$matches.length-1?scope.$activeIndex++:angular.isUndefined(scope.$activeIndex)&&(scope.$activeIndex=0),$typeahead.$$updateScrollTop($typeahead.$element[0],scope.$activeIndex),scope.$digest())};var show=$typeahead.show;$typeahead.show=function(){show(),$timeout(function(){$typeahead.$element&&($typeahead.$element.on("mousedown",$typeahead.$onMouseDown),options.keyboard&&element&&element.on("keydown",$typeahead.$onKeyDown))},0,!1)};var hide=$typeahead.hide;return $typeahead.hide=function(){$typeahead.$element&&$typeahead.$element.off("mousedown",$typeahead.$onMouseDown),options.keyboard&&element&&element.off("keydown",$typeahead.$onKeyDown),options.autoSelect||$typeahead.activate(-1),hide()},$typeahead}function safeDigest(scope){scope.$$phase||scope.$root&&scope.$root.$$phase||scope.$digest()}return TypeaheadFactory.defaults=defaults,TypeaheadFactory}]}).filter("bsAsyncFilter",["$filter",function($filter){return function(array,expression,comparator){return array&&angular.isFunction(array.then)?array.then(function(results){return $filter("filter")(results,expression,comparator)}):$filter("filter")(array,expression,comparator)}}]).directive("bsTypeahead",["$window","$parse","$q","$typeahead","$parseOptions",function($window,$parse,$q,$typeahead,$parseOptions){var defaults=$typeahead.defaults;return{restrict:"EAC",require:"ngModel",link:function(scope,element,attr,controller){element.off("change");var options={scope:scope};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","keyboard","html","animation","filter","limit","minLength","watchOptions","selectMode","autoSelect","comparator","id","prefixEvent","prefixClass"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["html","container","trimValue","filter"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide","onSelect"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))}),element.attr("autocomplete")||element.attr("autocomplete","off");var filter=angular.isDefined(options.filter)?options.filter:defaults.filter,limit=options.limit||defaults.limit,comparator=options.comparator||defaults.comparator,bsOptions=attr.bsOptions;filter&&(bsOptions+=" | "+filter+":$viewValue",comparator&&(bsOptions+=":"+comparator)),limit&&(bsOptions+=" | limitTo:"+limit);var parsedOptions=$parseOptions(bsOptions),typeahead=$typeahead(element,controller,options);if(options.watchOptions){var watchedOptions=parsedOptions.$match[7].replace(/\|.+/,"").replace(/\(.*\)/g,"").trim();scope.$watchCollection(watchedOptions,function(newValue,oldValue){parsedOptions.valuesFn(scope,controller).then(function(values){typeahead.update(values),controller.$render()})})}scope.$watch(attr.ngModel,function(newValue,oldValue){scope.$modelValue=newValue,parsedOptions.valuesFn(scope,controller).then(function(values){return options.selectMode&&!values.length&&newValue.length>0?void controller.$setViewValue(controller.$viewValue.substring(0,controller.$viewValue.length-1)):(values.length>limit&&(values=values.slice(0,limit)),typeahead.update(values),void controller.$render())})}),controller.$formatters.push(function(modelValue){var displayValue=parsedOptions.displayValue(modelValue);return displayValue?displayValue:angular.isDefined(modelValue)&&"object"!=typeof modelValue?modelValue:""}),controller.$render=function(){if(controller.$isEmpty(controller.$viewValue))return element.val("");var index=typeahead.$getIndex(controller.$modelValue),selected=index!==-1?typeahead.$scope.$matches[index].label:controller.$viewValue;selected=angular.isObject(selected)?parsedOptions.displayValue(selected):selected;var value=selected?selected.toString().replace(/<(?:.|\n)*?>/gm,""):"",ss=element[0].selectionStart,sd=element[0].selectionEnd;element.val(options.trimValue===!1?value:value.trim()),element[0].setSelectionRange(ss,sd)},scope.$on("$destroy",function(){typeahead&&typeahead.destroy(),options=null,typeahead=null})}}}]),angular.module("mgcrea.ngStrap.tooltip",["mgcrea.ngStrap.core","mgcrea.ngStrap.helpers.dimensions"]).provider("$tooltip",function(){var defaults=this.defaults={animation:"am-fade",customClass:"",prefixClass:"tooltip",prefixEvent:"tooltip",container:!1,target:!1,placement:"top",templateUrl:"tooltip/tooltip.tpl.html",template:"",titleTemplate:!1,trigger:"hover focus",keyboard:!1,html:!1,show:!1,title:"",type:"",delay:0,autoClose:!1,bsEnabled:!0,mouseDownPreventDefault:!0,mouseDownStopPropagation:!0,viewport:{selector:"body",padding:0}};this.$get=["$window","$rootScope","$bsCompiler","$q","$templateCache","$http","$animate","$sce","dimensions","$$rAF","$timeout",function($window,$rootScope,$bsCompiler,$q,$templateCache,$http,$animate,$sce,dimensions,$$rAF,$timeout){function TooltipFactory(element,config){function enterAnimateCallback(){scope.$emit(options.prefixEvent+".show",$tooltip),angular.isDefined(options.onShow)&&angular.isFunction(options.onShow)&&options.onShow($tooltip)}function leaveAnimateCallback(){if(scope.$emit(options.prefixEvent+".hide",$tooltip),angular.isDefined(options.onHide)&&angular.isFunction(options.onHide)&&options.onHide($tooltip),tipElement===_tipToHide){if(_blur&&"focus"===options.trigger)return element[0].blur();destroyTipElement()}}function bindTriggerEvents(){var triggers=options.trigger.split(" ");angular.forEach(triggers,function(trigger){"click"===trigger||"contextmenu"===trigger?element.on(trigger,$tooltip.toggle):"manual"!==trigger&&(element.on("hover"===trigger?"mouseenter":"focus",$tooltip.enter),element.on("hover"===trigger?"mouseleave":"blur",$tooltip.leave),"button"===nodeName&&"hover"!==trigger&&element.on(isTouch?"touchstart":"mousedown",$tooltip.$onFocusElementMouseDown))})}function unbindTriggerEvents(){for(var triggers=options.trigger.split(" "),i=triggers.length;i--;){var trigger=triggers[i];"click"===trigger||"contextmenu"===trigger?element.off(trigger,$tooltip.toggle):"manual"!==trigger&&(element.off("hover"===trigger?"mouseenter":"focus",$tooltip.enter),element.off("hover"===trigger?"mouseleave":"blur",$tooltip.leave),"button"===nodeName&&"hover"!==trigger&&element.off(isTouch?"touchstart":"mousedown",$tooltip.$onFocusElementMouseDown))}}function bindKeyboardEvents(){"focus"!==options.trigger?tipElement.on("keyup",$tooltip.$onKeyUp):element.on("keyup",$tooltip.$onFocusKeyUp)}function unbindKeyboardEvents(){"focus"!==options.trigger?tipElement.off("keyup",$tooltip.$onKeyUp):element.off("keyup",$tooltip.$onFocusKeyUp)}function bindAutoCloseEvents(){$timeout(function(){tipElement.on("click",stopEventPropagation),$body.on("click",$tooltip.hide),_autoCloseEventsBinded=!0},0,!1)}function unbindAutoCloseEvents(){_autoCloseEventsBinded&&(tipElement.off("click",stopEventPropagation),$body.off("click",$tooltip.hide),_autoCloseEventsBinded=!1)}function stopEventPropagation(event){event.stopPropagation()}function getPosition($element){$element=$element||options.target||element;var el=$element[0],isBody="BODY"===el.tagName,elRect=el.getBoundingClientRect(),rect={};for(var p in elRect)rect[p]=elRect[p];null===rect.width&&(rect=angular.extend({},rect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top}));var elOffset=isBody?{top:0,left:0}:dimensions.offset(el),scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.prop("scrollTop")||0},outerDims=isBody?{width:document.documentElement.clientWidth,height:$window.innerHeight}:null;return angular.extend({},rect,scroll,outerDims,elOffset)}function getCalculatedOffset(placement,position,actualWidth,actualHeight){var offset,split=placement.split("-");switch(split[0]){case"right":offset={top:position.top+position.height/2-actualHeight/2,left:position.left+position.width};break;case"bottom":offset={top:position.top+position.height,left:position.left+position.width/2-actualWidth/2};break;case"left":offset={top:position.top+position.height/2-actualHeight/2,left:position.left-actualWidth};break;default:offset={top:position.top-actualHeight,left:position.left+position.width/2-actualWidth/2}}if(!split[1])return offset;if("top"===split[0]||"bottom"===split[0])switch(split[1]){case"left":offset.left=position.left;break;case"right":offset.left=position.left+position.width-actualWidth}else if("left"===split[0]||"right"===split[0])switch(split[1]){case"top":offset.top=position.top-actualHeight+position.height;break;case"bottom":offset.top=position.top}return offset}function applyPlacement(offset,placement){var tip=tipElement[0],width=tip.offsetWidth,height=tip.offsetHeight,marginTop=parseInt(dimensions.css(tip,"margin-top"),10),marginLeft=parseInt(dimensions.css(tip,"margin-left"),10);isNaN(marginTop)&&(marginTop=0),isNaN(marginLeft)&&(marginLeft=0),offset.top=offset.top+marginTop,offset.left=offset.left+marginLeft,dimensions.setOffset(tip,angular.extend({using:function(props){tipElement.css({top:Math.round(props.top)+"px",left:Math.round(props.left)+"px",right:""})}},offset),0);var actualWidth=tip.offsetWidth,actualHeight=tip.offsetHeight;if("top"===placement&&actualHeight!==height&&(offset.top=offset.top+height-actualHeight),!/top-left|top-right|bottom-left|bottom-right/.test(placement)){var delta=getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight);if(delta.left?offset.left+=delta.left:offset.top+=delta.top,dimensions.setOffset(tip,offset),/top|right|bottom|left/.test(placement)){var isVertical=/top|bottom/.test(placement),arrowDelta=isVertical?2*delta.left-width+actualWidth:2*delta.top-height+actualHeight,arrowOffsetPosition=isVertical?"offsetWidth":"offsetHeight";replaceArrow(arrowDelta,tip[arrowOffsetPosition],isVertical)}}}function getViewportAdjustedDelta(placement,position,actualWidth,actualHeight){var delta={top:0,left:0};if(!$tooltip.$viewport)return delta;var viewportPadding=options.viewport&&options.viewport.padding||0,viewportDimensions=getPosition($tooltip.$viewport);if(/right|left/.test(placement)){var topEdgeOffset=position.top-viewportPadding-viewportDimensions.scroll,bottomEdgeOffset=position.top+viewportPadding-viewportDimensions.scroll+actualHeight;topEdgeOffset<viewportDimensions.top?delta.top=viewportDimensions.top-topEdgeOffset:bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height&&(delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset)}else{var leftEdgeOffset=position.left-viewportPadding,rightEdgeOffset=position.left+viewportPadding+actualWidth;leftEdgeOffset<viewportDimensions.left?delta.left=viewportDimensions.left-leftEdgeOffset:rightEdgeOffset>viewportDimensions.right&&(delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset)}return delta}function replaceArrow(delta,dimension,isHorizontal){var $arrow=findElement(".tooltip-arrow, .arrow",tipElement[0]);$arrow.css(isHorizontal?"left":"top",50*(1-delta/dimension)+"%").css(isHorizontal?"top":"left","")}function destroyTipElement(){clearTimeout(timeout),$tooltip.$isShown&&null!==tipElement&&(options.autoClose&&unbindAutoCloseEvents(),options.keyboard&&unbindKeyboardEvents()),tipScope&&(tipScope.$destroy(),tipScope=null),tipElement&&(tipElement.remove(),tipElement=$tooltip.$element=null)}var $tooltip={},options=$tooltip.$options=angular.extend({},defaults,config),promise=$tooltip.$promise=$bsCompiler.compile(options),scope=$tooltip.$scope=options.scope&&options.scope.$new()||$rootScope.$new(),nodeName=element[0].nodeName.toLowerCase();if(options.delay&&angular.isString(options.delay)){var split=options.delay.split(",").map(parseFloat);options.delay=split.length>1?{show:split[0],hide:split[1]}:split[0]}$tooltip.$id=options.id||element.attr("id")||"",options.title&&(scope.title=$sce.trustAsHtml(options.title)),scope.$setEnabled=function(isEnabled){scope.$$postDigest(function(){$tooltip.setEnabled(isEnabled)})},scope.$hide=function(){scope.$$postDigest(function(){$tooltip.hide()})},scope.$show=function(){scope.$$postDigest(function(){$tooltip.show()})},scope.$toggle=function(){scope.$$postDigest(function(){$tooltip.toggle()})},$tooltip.$isShown=scope.$isShown=!1;var timeout,hoverState,compileData,tipElement,tipContainer,tipScope;promise.then(function(data){compileData=data,$tooltip.init()}),$tooltip.init=function(){options.delay&&angular.isNumber(options.delay)&&(options.delay={show:options.delay,hide:options.delay}),"self"===options.container?tipContainer=element:angular.isElement(options.container)?tipContainer=options.container:options.container&&(tipContainer=findElement(options.container)),bindTriggerEvents(),options.target&&(options.target=angular.isElement(options.target)?options.target:findElement(options.target)),options.show&&scope.$$postDigest(function(){"focus"===options.trigger?element[0].focus():$tooltip.show()})},$tooltip.destroy=function(){unbindTriggerEvents(),destroyTipElement(),scope.$destroy()},$tooltip.enter=function(){return clearTimeout(timeout),hoverState="in",options.delay&&options.delay.show?void(timeout=setTimeout(function(){"in"===hoverState&&$tooltip.show()},options.delay.show)):$tooltip.show()},$tooltip.show=function(){if(options.bsEnabled&&!$tooltip.$isShown){scope.$emit(options.prefixEvent+".show.before",$tooltip),angular.isDefined(options.onBeforeShow)&&angular.isFunction(options.onBeforeShow)&&options.onBeforeShow($tooltip);var parent,after;options.container?(parent=tipContainer,after=tipContainer[0].lastChild?angular.element(tipContainer[0].lastChild):null):(parent=null,after=element),tipElement&&destroyTipElement(),tipScope=$tooltip.$scope.$new(),tipElement=$tooltip.$element=compileData.link(tipScope,function(clonedElement,scope){}),tipElement.css({top:"-9999px",left:"-9999px",right:"auto",display:"block",visibility:"hidden"}),options.animation&&tipElement.addClass(options.animation),options.type&&tipElement.addClass(options.prefixClass+"-"+options.type),options.customClass&&tipElement.addClass(options.customClass),after?after.after(tipElement):parent.prepend(tipElement),$tooltip.$isShown=scope.$isShown=!0,safeDigest(scope),$tooltip.$applyPlacement(),angular.version.minor<=2?$animate.enter(tipElement,parent,after,enterAnimateCallback):$animate.enter(tipElement,parent,after).then(enterAnimateCallback),safeDigest(scope),$$rAF(function(){tipElement&&tipElement.css({visibility:"visible"}),options.keyboard&&("focus"!==options.trigger&&$tooltip.focus(),bindKeyboardEvents())}),options.autoClose&&bindAutoCloseEvents()}},$tooltip.leave=function(){return clearTimeout(timeout),hoverState="out",options.delay&&options.delay.hide?void(timeout=setTimeout(function(){"out"===hoverState&&$tooltip.hide()},options.delay.hide)):$tooltip.hide()};var _blur,_tipToHide;$tooltip.hide=function(blur){$tooltip.$isShown&&(scope.$emit(options.prefixEvent+".hide.before",$tooltip),angular.isDefined(options.onBeforeHide)&&angular.isFunction(options.onBeforeHide)&&options.onBeforeHide($tooltip),_blur=blur,_tipToHide=tipElement,null!==tipElement&&(angular.version.minor<=2?$animate.leave(tipElement,leaveAnimateCallback):$animate.leave(tipElement).then(leaveAnimateCallback)),$tooltip.$isShown=scope.$isShown=!1,safeDigest(scope),options.keyboard&&null!==tipElement&&unbindKeyboardEvents(),options.autoClose&&null!==tipElement&&unbindAutoCloseEvents())},$tooltip.toggle=function(evt){evt&&evt.preventDefault(),$tooltip.$isShown?$tooltip.leave():$tooltip.enter()},$tooltip.focus=function(){tipElement[0].focus()},$tooltip.setEnabled=function(isEnabled){options.bsEnabled=isEnabled},$tooltip.setViewport=function(viewport){options.viewport=viewport},$tooltip.$applyPlacement=function(){if(tipElement){var placement=options.placement,autoToken=/\s?auto?\s?/i,autoPlace=autoToken.test(placement);autoPlace&&(placement=placement.replace(autoToken,"")||defaults.placement),tipElement.addClass(options.placement);var elementPosition=getPosition(),tipWidth=tipElement.prop("offsetWidth"),tipHeight=tipElement.prop("offsetHeight");if($tooltip.$viewport=options.viewport&&findElement(options.viewport.selector||options.viewport),autoPlace){var originalPlacement=placement,viewportPosition=getPosition($tooltip.$viewport);/bottom/.test(originalPlacement)&&elementPosition.bottom+tipHeight>viewportPosition.bottom?placement=originalPlacement.replace("bottom","top"):/top/.test(originalPlacement)&&elementPosition.top-tipHeight<viewportPosition.top&&(placement=originalPlacement.replace("top","bottom")),/left/.test(originalPlacement)&&elementPosition.left-tipWidth<viewportPosition.left?placement=placement.replace("left","right"):/right/.test(originalPlacement)&&elementPosition.right+tipWidth>viewportPosition.width&&(placement=placement.replace("right","left")),tipElement.removeClass(originalPlacement).addClass(placement)}var tipPosition=getCalculatedOffset(placement,elementPosition,tipWidth,tipHeight);applyPlacement(tipPosition,placement)}},$tooltip.$onKeyUp=function(evt){27===evt.which&&$tooltip.$isShown&&($tooltip.hide(),evt.stopPropagation())},$tooltip.$onFocusKeyUp=function(evt){27===evt.which&&(element[0].blur(),evt.stopPropagation())},$tooltip.$onFocusElementMouseDown=function(evt){options.mouseDownPreventDefault&&evt.preventDefault(),options.mouseDownStopPropagation&&evt.stopPropagation(),$tooltip.$isShown?element[0].blur():element[0].focus()};var _autoCloseEventsBinded=!1;return $tooltip}function safeDigest(scope){scope.$$phase||scope.$root&&scope.$root.$$phase||scope.$digest()}function findElement(query,element){return angular.element((element||document).querySelectorAll(query))}var isNative=/(ip[ao]d|iphone|android)/gi.test($window.navigator.userAgent),isTouch="createTouch"in $window.document&&isNative,$body=angular.element($window.document);return TooltipFactory}]}).directive("bsTooltip",["$window","$location","$sce","$parse","$tooltip","$$rAF",function($window,$location,$sce,$parse,$tooltip,$$rAF){return{restrict:"EAC",scope:!0,link:function(scope,element,attr,transclusion){var tooltip,options={scope:scope};angular.forEach(["template","templateUrl","controller","controllerAs","titleTemplate","placement","container","delay","trigger","html","animation","backdropAnimation","type","customClass","id"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["html","container"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))});var dataTarget=element.attr("data-target");angular.isDefined(dataTarget)&&(falseValueRegExp.test(dataTarget)?options.target=!1:options.target=dataTarget),scope.hasOwnProperty("title")||(scope.title=""),attr.$observe("title",function(newValue){if(angular.isDefined(newValue)||!scope.hasOwnProperty("title")){var oldValue=scope.title;scope.title=$sce.trustAsHtml(newValue),angular.isDefined(oldValue)&&$$rAF(function(){tooltip&&tooltip.$applyPlacement()})}}),attr.$observe("disabled",function(newValue){newValue&&tooltip.$isShown&&tooltip.hide()}),attr.bsTooltip&&scope.$watch(attr.bsTooltip,function(newValue,oldValue){angular.isObject(newValue)?angular.extend(scope,newValue):scope.title=newValue,angular.isDefined(oldValue)&&$$rAF(function(){tooltip&&tooltip.$applyPlacement()})},!0),attr.bsShow&&scope.$watch(attr.bsShow,function(newValue,oldValue){tooltip&&angular.isDefined(newValue)&&(angular.isString(newValue)&&(newValue=!!newValue.match(/true|,?(tooltip),?/i)),newValue===!0?tooltip.show():tooltip.hide())}),attr.bsEnabled&&scope.$watch(attr.bsEnabled,function(newValue,oldValue){tooltip&&angular.isDefined(newValue)&&(angular.isString(newValue)&&(newValue=!!newValue.match(/true|1|,?(tooltip),?/i)),newValue===!1?tooltip.setEnabled(!1):tooltip.setEnabled(!0))}),attr.viewport&&scope.$watch(attr.viewport,function(newValue){tooltip&&angular.isDefined(newValue)&&tooltip.setViewport(newValue)}),tooltip=$tooltip(element,options),scope.$on("$destroy",function(){tooltip&&tooltip.destroy(),options=null,tooltip=null})}}}]),angular.module("mgcrea.ngStrap.timepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.helpers.dateFormatter","mgcrea.ngStrap.tooltip"]).provider("$timepicker",function(){var defaults=this.defaults={animation:"am-fade",defaultDate:"auto",prefixClass:"timepicker",placement:"bottom-left",templateUrl:"timepicker/timepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!0,timeType:"date",timeFormat:"shortTime",timezone:null,modelTimeFormat:null,autoclose:!1,minTime:-(1/0),maxTime:+(1/0),length:5,hourStep:1,minuteStep:5,secondStep:5,roundDisplay:!1,iconUp:"glyphicon glyphicon-chevron-up",iconDown:"glyphicon glyphicon-chevron-down",arrowBehavior:"pager"};this.$get=["$window","$document","$rootScope","$sce","$dateFormatter","$tooltip","$timeout",function($window,$document,$rootScope,$sce,$dateFormatter,$tooltip,$timeout){function timepickerFactory(element,controller,config){function floorMinutes(time){var coeff=6e4*options.minuteStep;return new Date(Math.floor(time.getTime()/coeff)*coeff)}function createSelection(start,length){var end=start+length;if(element[0].createTextRange){var selRange=element[0].createTextRange();selRange.collapse(!0),selRange.moveStart("character",start),selRange.moveEnd("character",end),selRange.select()}else element[0].setSelectionRange?element[0].setSelectionRange(start,end):angular.isUndefined(element[0].selectionStart)&&(element[0].selectionStart=start,element[0].selectionEnd=end)}function focusElement(){element[0].focus()}var $timepicker=$tooltip(element,angular.extend({},defaults,config)),parentScope=config.scope,options=$timepicker.$options,scope=$timepicker.$scope,lang=options.lang,formatDate=function(date,format,timezone){return $dateFormatter.formatDate(date,format,lang,timezone)},selectedIndex=0,defaultDate=options.roundDisplay?floorMinutes(new Date):new Date,startDate=controller.$dateValue||defaultDate,viewDate={hour:startDate.getHours(),meridian:startDate.getHours()<12,minute:startDate.getMinutes(),second:startDate.getSeconds(),millisecond:startDate.getMilliseconds()},format=$dateFormatter.getDatetimeFormat(options.timeFormat,lang),hoursFormat=$dateFormatter.hoursFormat(format),timeSeparator=$dateFormatter.timeSeparator(format),minutesFormat=$dateFormatter.minutesFormat(format),secondsFormat=$dateFormatter.secondsFormat(format),showSeconds=$dateFormatter.showSeconds(format),showAM=$dateFormatter.showAM(format);scope.$iconUp=options.iconUp,scope.$iconDown=options.iconDown,scope.$select=function(date,index){$timepicker.select(date,index)},scope.$moveIndex=function(value,index){$timepicker.$moveIndex(value,index)},scope.$switchMeridian=function(date){$timepicker.switchMeridian(date)},$timepicker.update=function(date){angular.isDate(date)&&!isNaN(date.getTime())?($timepicker.$date=date,angular.extend(viewDate,{hour:date.getHours(),minute:date.getMinutes(),second:date.getSeconds(),millisecond:date.getMilliseconds()}),$timepicker.$build()):$timepicker.$isBuilt||$timepicker.$build()},$timepicker.select=function(date,index,keep){controller.$dateValue&&!isNaN(controller.$dateValue.getTime())||(controller.$dateValue="today"===options.defaultDate?new Date:new Date(1970,0,1)),angular.isDate(date)||(date=new Date(date)),0===index?controller.$dateValue.setHours(date.getHours()):1===index?controller.$dateValue.setMinutes(date.getMinutes()):2===index&&controller.$dateValue.setSeconds(date.getSeconds()),controller.$setViewValue(angular.copy(controller.$dateValue)),controller.$render(),options.autoclose&&!keep&&$timeout(function(){$timepicker.hide(!0)})},$timepicker.switchMeridian=function(date){if(controller.$dateValue&&!isNaN(controller.$dateValue.getTime())){var hours=(date||controller.$dateValue).getHours();controller.$dateValue.setHours(hours<12?hours+12:hours-12),controller.$setViewValue(angular.copy(controller.$dateValue)),controller.$render()}},$timepicker.$build=function(){var i,hour,midIndex=scope.midIndex=parseInt(options.length/2,10),hours=[];for(i=0;i<options.length;i++)hour=new Date(1970,0,1,viewDate.hour-(midIndex-i)*options.hourStep),hours.push({date:hour,label:formatDate(hour,hoursFormat),selected:$timepicker.$date&&$timepicker.$isSelected(hour,0),disabled:$timepicker.$isDisabled(hour,0)});var minute,minutes=[];for(i=0;i<options.length;i++)minute=new Date(1970,0,1,0,viewDate.minute-(midIndex-i)*options.minuteStep),minutes.push({date:minute,label:formatDate(minute,minutesFormat),selected:$timepicker.$date&&$timepicker.$isSelected(minute,1),disabled:$timepicker.$isDisabled(minute,1)});var second,seconds=[];for(i=0;i<options.length;i++)second=new Date(1970,0,1,0,0,viewDate.second-(midIndex-i)*options.secondStep),seconds.push({date:second,label:formatDate(second,secondsFormat),selected:$timepicker.$date&&$timepicker.$isSelected(second,2),disabled:$timepicker.$isDisabled(second,2)});var rows=[];for(i=0;i<options.length;i++)showSeconds?rows.push([hours[i],minutes[i],seconds[i]]):rows.push([hours[i],minutes[i]]);scope.rows=rows,scope.showSeconds=showSeconds,scope.showAM=showAM,scope.isAM=($timepicker.$date||hours[midIndex].date).getHours()<12,scope.timeSeparator=timeSeparator,$timepicker.$isBuilt=!0},$timepicker.$isSelected=function(date,index){return!!$timepicker.$date&&(0===index?date.getHours()===$timepicker.$date.getHours():1===index?date.getMinutes()===$timepicker.$date.getMinutes():2===index?date.getSeconds()===$timepicker.$date.getSeconds():void 0)},$timepicker.$isDisabled=function(date,index){var selectedTime;return 0===index?selectedTime=date.getTime()+6e4*viewDate.minute+1e3*viewDate.second:1===index?selectedTime=date.getTime()+36e5*viewDate.hour+1e3*viewDate.second:2===index&&(selectedTime=date.getTime()+36e5*viewDate.hour+6e4*viewDate.minute),selectedTime<1*options.minTime||selectedTime>1*options.maxTime},scope.$arrowAction=function(value,index){"picker"===options.arrowBehavior?$timepicker.$setTimeByStep(value,index):$timepicker.$moveIndex(value,index)},$timepicker.$setTimeByStep=function(value,index){var newDate=new Date($timepicker.$date||startDate),hours=newDate.getHours(),minutes=newDate.getMinutes(),seconds=newDate.getSeconds();0===index?newDate.setHours(hours-parseInt(options.hourStep,10)*value):1===index?newDate.setMinutes(minutes-parseInt(options.minuteStep,10)*value):2===index&&newDate.setSeconds(seconds-parseInt(options.secondStep,10)*value),$timepicker.select(newDate,index,!0)},$timepicker.$moveIndex=function(value,index){var targetDate;0===index?(targetDate=new Date(1970,0,1,viewDate.hour+value*options.length,viewDate.minute,viewDate.second),angular.extend(viewDate,{hour:targetDate.getHours()})):1===index?(targetDate=new Date(1970,0,1,viewDate.hour,viewDate.minute+value*options.length*options.minuteStep,viewDate.second),angular.extend(viewDate,{minute:targetDate.getMinutes()})):2===index&&(targetDate=new Date(1970,0,1,viewDate.hour,viewDate.minute,viewDate.second+value*options.length*options.secondStep),angular.extend(viewDate,{second:targetDate.getSeconds()})),$timepicker.$build()},$timepicker.$onMouseDown=function(evt){if("input"!==evt.target.nodeName.toLowerCase()&&evt.preventDefault(),evt.stopPropagation(),isTouch){var targetEl=angular.element(evt.target);"button"!==targetEl[0].nodeName.toLowerCase()&&(targetEl=targetEl.parent()),targetEl.triggerHandler("click")}},$timepicker.$onKeyDown=function(evt){if(/(38|37|39|40|13)/.test(evt.keyCode)&&!evt.shiftKey&&!evt.altKey){if(evt.preventDefault(),evt.stopPropagation(),13===evt.keyCode)return void $timepicker.hide(!0);var newDate=new Date($timepicker.$date),hours=newDate.getHours(),hoursLength=formatDate(newDate,hoursFormat).length,minutes=newDate.getMinutes(),minutesLength=formatDate(newDate,minutesFormat).length,seconds=newDate.getSeconds(),secondsLength=formatDate(newDate,secondsFormat).length,sepLength=1,lateralMove=/(37|39)/.test(evt.keyCode),count=2+1*showSeconds+1*showAM;
lateralMove&&(37===evt.keyCode?selectedIndex=selectedIndex<1?count-1:selectedIndex-1:39===evt.keyCode&&(selectedIndex=selectedIndex<count-1?selectedIndex+1:0));var selectRange=[0,hoursLength],incr=0;38===evt.keyCode&&(incr=-1),40===evt.keyCode&&(incr=1);var isSeconds=2===selectedIndex&&showSeconds,isMeridian=2===selectedIndex&&!showSeconds||3===selectedIndex&&showSeconds;0===selectedIndex?(newDate.setHours(hours+incr*parseInt(options.hourStep,10)),hoursLength=formatDate(newDate,hoursFormat).length,selectRange=[0,hoursLength]):1===selectedIndex?(newDate.setMinutes(minutes+incr*parseInt(options.minuteStep,10)),minutesLength=formatDate(newDate,minutesFormat).length,selectRange=[hoursLength+sepLength,minutesLength]):isSeconds?(newDate.setSeconds(seconds+incr*parseInt(options.secondStep,10)),secondsLength=formatDate(newDate,secondsFormat).length,selectRange=[hoursLength+sepLength+minutesLength+sepLength,secondsLength]):isMeridian&&(lateralMove||$timepicker.switchMeridian(),selectRange=[hoursLength+sepLength+minutesLength+sepLength+(secondsLength+sepLength)*showSeconds,2]),$timepicker.select(newDate,selectedIndex,!0),createSelection(selectRange[0],selectRange[1]),parentScope.$digest()}};var _init=$timepicker.init;$timepicker.init=function(){return isNative&&options.useNative?(element.prop("type","time"),void element.css("-webkit-appearance","textfield")):(isTouch&&(element.prop("type","text"),element.attr("readonly","true"),element.on("click",focusElement)),void _init())};var _destroy=$timepicker.destroy;$timepicker.destroy=function(){isNative&&options.useNative&&element.off("click",focusElement),_destroy()};var _show=$timepicker.show;$timepicker.show=function(){!isTouch&&element.attr("readonly")||element.attr("disabled")||(_show(),$timeout(function(){$timepicker.$element&&$timepicker.$element.on(isTouch?"touchstart":"mousedown",$timepicker.$onMouseDown),options.keyboard&&element&&element.on("keydown",$timepicker.$onKeyDown)},0,!1))};var _hide=$timepicker.hide;return $timepicker.hide=function(blur){$timepicker.$isShown&&($timepicker.$element&&$timepicker.$element.off(isTouch?"touchstart":"mousedown",$timepicker.$onMouseDown),options.keyboard&&element&&element.off("keydown",$timepicker.$onKeyDown),_hide(blur))},$timepicker}var isNative=/(ip[ao]d|iphone|android)/gi.test($window.navigator.userAgent),isTouch="createTouch"in $window.document&&isNative;return defaults.lang||(defaults.lang=$dateFormatter.getDefaultLocale()),timepickerFactory.defaults=defaults,timepickerFactory}]}).directive("bsTimepicker",["$window","$parse","$q","$dateFormatter","$dateParser","$timepicker",function($window,$parse,$q,$dateFormatter,$dateParser,$timepicker){var defaults=$timepicker.defaults,isNative=/(ip[ao]d|iphone|android)/gi.test($window.navigator.userAgent);return{restrict:"EAC",require:"ngModel",link:function(scope,element,attr,controller){function validateAgainstMinMaxTime(parsedTime){if(angular.isDate(parsedTime)){var isMinValid=isNaN(options.minTime)||new Date(parsedTime.getTime()).setFullYear(1970,0,1)>=options.minTime,isMaxValid=isNaN(options.maxTime)||new Date(parsedTime.getTime()).setFullYear(1970,0,1)<=options.maxTime,isValid=isMinValid&&isMaxValid;controller.$setValidity("date",isValid),controller.$setValidity("min",isMinValid),controller.$setValidity("max",isMaxValid),isValid&&(controller.$dateValue=parsedTime)}}function getTimeFormattedString(){return!controller.$dateValue||isNaN(controller.$dateValue.getTime())?"":formatDate(controller.$dateValue,options.timeFormat)}var options={scope:scope};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","keyboard","html","animation","autoclose","timeType","timeFormat","timezone","modelTimeFormat","useNative","hourStep","minuteStep","secondStep","length","arrowBehavior","iconUp","iconDown","roundDisplay","id","prefixClass","prefixEvent","defaultDate"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["html","container","autoclose","useNative","roundDisplay"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))}),isNative&&(options.useNative||defaults.useNative)&&(options.timeFormat="HH:mm");var timepicker=$timepicker(element,controller,options);options=timepicker.$options;var lang=options.lang,formatDate=function(date,format,timezone){return $dateFormatter.formatDate(date,format,lang,timezone)};attr.bsShow&&scope.$watch(attr.bsShow,function(newValue,oldValue){timepicker&&angular.isDefined(newValue)&&(angular.isString(newValue)&&(newValue=!!newValue.match(/true|,?(timepicker),?/i)),newValue===!0?timepicker.show():timepicker.hide())});var dateParser=$dateParser({format:options.timeFormat,lang:lang});angular.forEach(["minTime","maxTime"],function(key){angular.isDefined(attr[key])&&attr.$observe(key,function(newValue){timepicker.$options[key]=dateParser.getTimeForAttribute(key,newValue),isNaN(timepicker.$options[key])||timepicker.$build(),validateAgainstMinMaxTime(controller.$dateValue)})}),scope.$watch(attr.ngModel,function(newValue,oldValue){timepicker.update(controller.$dateValue)},!0),controller.$parsers.unshift(function(viewValue){var date;if(!viewValue)return controller.$setValidity("date",!0),null;var parsedTime=angular.isDate(viewValue)?viewValue:dateParser.parse(viewValue,controller.$dateValue);return!parsedTime||isNaN(parsedTime.getTime())?(controller.$setValidity("date",!1),undefined):(validateAgainstMinMaxTime(parsedTime),"string"===options.timeType?(date=dateParser.timezoneOffsetAdjust(parsedTime,options.timezone,!0),formatDate(date,options.modelTimeFormat||options.timeFormat)):(date=dateParser.timezoneOffsetAdjust(controller.$dateValue,options.timezone,!0),"number"===options.timeType?date.getTime():"unix"===options.timeType?date.getTime()/1e3:"iso"===options.timeType?date.toISOString():new Date(date)))}),controller.$formatters.push(function(modelValue){var date;return date=angular.isUndefined(modelValue)||null===modelValue?NaN:angular.isDate(modelValue)?modelValue:"string"===options.timeType?dateParser.parse(modelValue,null,options.modelTimeFormat):"unix"===options.timeType?new Date(1e3*modelValue):new Date(modelValue),controller.$dateValue=dateParser.timezoneOffsetAdjust(date,options.timezone),getTimeFormattedString()}),controller.$render=function(){element.val(getTimeFormattedString())},scope.$on("$destroy",function(){timepicker&&timepicker.destroy(),options=null,timepicker=null})}}}]),angular.module("mgcrea.ngStrap.tab",[]).provider("$tab",function(){var defaults=this.defaults={animation:"am-fade",template:"tab/tab.tpl.html",navClass:"nav-tabs",activeClass:"active"},controller=this.controller=function($scope,$element,$attrs){var self=this;self.$options=angular.copy(defaults),angular.forEach(["animation","navClass","activeClass"],function(key){angular.isDefined($attrs[key])&&(self.$options[key]=$attrs[key])}),$scope.$navClass=self.$options.navClass,$scope.$activeClass=self.$options.activeClass,self.$panes=$scope.$panes=[],self.$activePaneChangeListeners=self.$viewChangeListeners=[],self.$push=function(pane){angular.isUndefined(self.$panes.$active)&&$scope.$setActive(pane.name||0),self.$panes.push(pane)},self.$remove=function(pane){var activeIndex,index=self.$panes.indexOf(pane),active=self.$panes.$active;activeIndex=angular.isString(active)?self.$panes.map(function(pane){return pane.name}).indexOf(active):self.$panes.$active,self.$panes.splice(index,1),index<activeIndex?activeIndex--:index===activeIndex&&activeIndex===self.$panes.length&&activeIndex--,activeIndex>=0&&activeIndex<self.$panes.length?self.$setActive(self.$panes[activeIndex].name||activeIndex):self.$setActive()},self.$setActive=$scope.$setActive=function(value){self.$panes.$active=value,self.$activePaneChangeListeners.forEach(function(fn){fn()})},self.$isActive=$scope.$isActive=function($pane,$index){return self.$panes.$active===$pane.name||self.$panes.$active===$index}};this.$get=function(){var $tab={};return $tab.defaults=defaults,$tab.controller=controller,$tab}}).directive("bsTabs",["$window","$animate","$tab","$parse",function($window,$animate,$tab,$parse){var defaults=$tab.defaults;return{require:["?ngModel","bsTabs"],transclude:!0,scope:!0,controller:["$scope","$element","$attrs",$tab.controller],templateUrl:function(element,attr){return attr.template||defaults.template},link:function(scope,element,attrs,controllers){var ngModelCtrl=controllers[0],bsTabsCtrl=controllers[1];if(ngModelCtrl&&(bsTabsCtrl.$activePaneChangeListeners.push(function(){ngModelCtrl.$setViewValue(bsTabsCtrl.$panes.$active)}),ngModelCtrl.$formatters.push(function(modelValue){return bsTabsCtrl.$setActive(modelValue),modelValue})),attrs.bsActivePane){var parsedBsActivePane=$parse(attrs.bsActivePane);bsTabsCtrl.$activePaneChangeListeners.push(function(){parsedBsActivePane.assign(scope,bsTabsCtrl.$panes.$active)}),scope.$watch(attrs.bsActivePane,function(newValue,oldValue){bsTabsCtrl.$setActive(newValue)},!0)}}}}]).directive("bsPane",["$window","$animate","$sce",function($window,$animate,$sce){return{require:["^?ngModel","^bsTabs"],scope:!0,link:function(scope,element,attrs,controllers){function render(){var index=bsTabsCtrl.$panes.indexOf(scope);$animate[bsTabsCtrl.$isActive(scope,index)?"addClass":"removeClass"](element,bsTabsCtrl.$options.activeClass)}var bsTabsCtrl=controllers[1];element.addClass("tab-pane"),attrs.$observe("title",function(newValue,oldValue){scope.title=$sce.trustAsHtml(newValue)}),scope.name=attrs.name,bsTabsCtrl.$options.animation&&element.addClass(bsTabsCtrl.$options.animation),attrs.$observe("disabled",function(newValue,oldValue){scope.disabled=scope.$eval(newValue)}),bsTabsCtrl.$push(scope),scope.$on("$destroy",function(){bsTabsCtrl.$remove(scope)}),bsTabsCtrl.$activePaneChangeListeners.push(function(){render()}),render()}}}]),angular.module("mgcrea.ngStrap.select",["mgcrea.ngStrap.tooltip","mgcrea.ngStrap.helpers.parseOptions"]).provider("$select",function(){var defaults=this.defaults={animation:"am-fade",prefixClass:"select",prefixEvent:"$select",placement:"bottom-left",templateUrl:"select/select.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,multiple:!1,allNoneButtons:!1,sort:!0,caretHtml:'&nbsp;<span class="caret"></span>',placeholder:"Choose among the following...",allText:"All",noneText:"None",maxLength:3,maxLengthHtml:"selected",iconCheckmark:"glyphicon glyphicon-ok",toggle:!1};this.$get=["$window","$document","$rootScope","$tooltip","$timeout",function($window,$document,$rootScope,$tooltip,$timeout){function SelectFactory(element,controller,config){var $select={},options=angular.extend({},defaults,config);$select=$tooltip(element,options);var scope=$select.$scope;scope.$matches=[],options.multiple?scope.$activeIndex=[]:scope.$activeIndex=-1,scope.$isMultiple=options.multiple,scope.$showAllNoneButtons=options.allNoneButtons&&options.multiple,scope.$iconCheckmark=options.iconCheckmark,scope.$allText=options.allText,scope.$noneText=options.noneText,scope.$activate=function(index){scope.$$postDigest(function(){$select.activate(index)})},scope.$select=function(index,evt){scope.$$postDigest(function(){$select.select(index)})},scope.$isVisible=function(){return $select.$isVisible()},scope.$isActive=function(index){return $select.$isActive(index)},scope.$selectAll=function(){for(var i=0;i<scope.$matches.length;i++)scope.$isActive(i)||scope.$select(i)},scope.$selectNone=function(){for(var i=0;i<scope.$matches.length;i++)scope.$isActive(i)&&scope.$select(i)},$select.update=function(matches){scope.$matches=matches,$select.$updateActiveIndex()},$select.activate=function(index){return options.multiple?($select.$isActive(index)?scope.$activeIndex.splice(scope.$activeIndex.indexOf(index),1):scope.$activeIndex.push(index),options.sort&&scope.$activeIndex.sort(function(a,b){return a-b})):scope.$activeIndex=index,scope.$activeIndex},$select.select=function(index){if(!(angular.isUndefined(index)||index<0||index>=scope.$matches.length)){var value=scope.$matches[index].value;scope.$apply(function(){$select.activate(index),options.multiple?controller.$setViewValue(scope.$activeIndex.map(function(index){return angular.isUndefined(scope.$matches[index])?null:scope.$matches[index].value})):(options.toggle?controller.$setViewValue(value===controller.$modelValue?undefined:value):controller.$setViewValue(value),$select.hide())}),scope.$emit(options.prefixEvent+".select",value,index,$select),angular.isDefined(options.onSelect)&&angular.isFunction(options.onSelect)&&options.onSelect(value,index,$select)}},$select.$updateActiveIndex=function(){options.multiple?angular.isArray(controller.$modelValue)?scope.$activeIndex=controller.$modelValue.map(function(value){return $select.$getIndex(value)}):scope.$activeIndex=[]:angular.isDefined(controller.$modelValue)&&scope.$matches.length?scope.$activeIndex=$select.$getIndex(controller.$modelValue):scope.$activeIndex=-1},$select.$isVisible=function(){return options.minLength&&controller?scope.$matches.length&&controller.$viewValue.length>=options.minLength:scope.$matches.length},$select.$isActive=function(index){return options.multiple?scope.$activeIndex.indexOf(index)!==-1:scope.$activeIndex===index},$select.$getIndex=function(value){var index;for(index=scope.$matches.length;index--&&!angular.equals(scope.$matches[index].value,value););return index},$select.$onMouseDown=function(evt){if(evt.preventDefault(),evt.stopPropagation(),isTouch){var anchor,targetEl=angular.element(evt.target);if("A"!==evt.target.nodeName)for(var anchorCandidate=targetEl.parent();!anchor&&anchorCandidate.length>0;)"A"===anchorCandidate[0].nodeName&&(anchor=anchorCandidate),anchorCandidate=anchorCandidate.parent();anchor?angular.element(anchor).triggerHandler("click"):targetEl.triggerHandler("click")}},$select.$onKeyDown=function(evt){if(/(9|13|38|40)/.test(evt.keyCode))return 9!==evt.keyCode&&(evt.preventDefault(),evt.stopPropagation()),options.multiple&&9===evt.keyCode?$select.hide():options.multiple||13!==evt.keyCode&&9!==evt.keyCode?void(options.multiple||(38===evt.keyCode&&scope.$activeIndex>0?scope.$activeIndex--:38===evt.keyCode&&scope.$activeIndex<0?scope.$activeIndex=scope.$matches.length-1:40===evt.keyCode&&scope.$activeIndex<scope.$matches.length-1?scope.$activeIndex++:angular.isUndefined(scope.$activeIndex)&&(scope.$activeIndex=0),scope.$digest())):$select.select(scope.$activeIndex)},$select.$isIE=function(){var ua=$window.navigator.userAgent;return ua.indexOf("MSIE ")>0||ua.indexOf("Trident/")>0||ua.indexOf("Edge/")>0},$select.$selectScrollFix=function(e){"UL"===$document[0].activeElement.tagName&&(e.preventDefault(),e.stopImmediatePropagation(),e.target.focus())};var _show=$select.show;$select.show=function(){_show(),options.multiple&&$select.$element.addClass("select-multiple"),$timeout(function(){$select.$element.on(isTouch?"touchstart":"mousedown",$select.$onMouseDown),options.keyboard&&element.on("keydown",$select.$onKeyDown)},0,!1)};var _hide=$select.hide;return $select.hide=function(){!options.multiple&&angular.isUndefined(controller.$modelValue)&&(scope.$activeIndex=-1),$select.$element.off(isTouch?"touchstart":"mousedown",$select.$onMouseDown),options.keyboard&&element.off("keydown",$select.$onKeyDown),_hide(!0)},$select}var isNative=/(ip[ao]d|iphone|android)/gi.test($window.navigator.userAgent),isTouch="createTouch"in $window.document&&isNative;return SelectFactory.defaults=defaults,SelectFactory}]}).directive("bsSelect",["$window","$parse","$q","$select","$parseOptions",function($window,$parse,$q,$select,$parseOptions){var defaults=$select.defaults;return{restrict:"EAC",require:"ngModel",link:function(scope,element,attr,controller){var options={scope:scope,placeholder:defaults.placeholder};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","keyboard","html","animation","placeholder","allNoneButtons","maxLength","maxLengthHtml","allText","noneText","iconCheckmark","autoClose","id","sort","caretHtml","prefixClass","prefixEvent","toggle"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["html","container","allNoneButtons","sort"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide","onSelect"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))});var dataMultiple=element.attr("data-multiple");if(angular.isDefined(dataMultiple)&&(falseValueRegExp.test(dataMultiple)?options.multiple=!1:options.multiple=dataMultiple),"select"===element[0].nodeName.toLowerCase()){var inputEl=element;inputEl.css("display","none"),element=angular.element('<button type="button" class="btn btn-default"></button>'),inputEl.after(element)}var parsedOptions=$parseOptions(attr.bsOptions),select=$select(element,controller,options);select.$isIE()&&element[0].addEventListener("blur",select.$selectScrollFix);var watchedOptions=parsedOptions.$match[7].replace(/\|.+/,"").trim();scope.$watch(watchedOptions,function(newValue,oldValue){parsedOptions.valuesFn(scope,controller).then(function(values){select.update(values),controller.$render()})},!0),scope.$watch(attr.ngModel,function(newValue,oldValue){select.$updateActiveIndex(),controller.$render()},!0),controller.$render=function(){var selected,index;options.multiple&&angular.isArray(controller.$modelValue)?(selected=controller.$modelValue.map(function(value){return index=select.$getIndex(value),index!==-1&&select.$scope.$matches[index].label}).filter(angular.isDefined),selected=selected.length>(options.maxLength||defaults.maxLength)?selected.length+" "+(options.maxLengthHtml||defaults.maxLengthHtml):selected.join(", ")):(index=select.$getIndex(controller.$modelValue),selected=index!==-1&&select.$scope.$matches[index].label),element.html((selected||options.placeholder)+(options.caretHtml||defaults.caretHtml))},options.multiple&&(controller.$isEmpty=function(value){return!value||0===value.length}),scope.$on("$destroy",function(){select&&select.destroy(),options=null,select=null})}}}]),angular.module("mgcrea.ngStrap.scrollspy",["mgcrea.ngStrap.helpers.debounce","mgcrea.ngStrap.helpers.dimensions"]).provider("$scrollspy",function(){var spies=this.$$spies={},defaults=this.defaults={debounce:150,throttle:100,offset:100};this.$get=["$window","$document","$rootScope","dimensions","debounce","throttle",function($window,$document,$rootScope,dimensions,debounce,throttle){function nodeName(element,name){return element[0].nodeName&&element[0].nodeName.toLowerCase()===name.toLowerCase()}function ScrollSpyFactory(config){var options=angular.extend({},defaults,config);options.element||(options.element=bodyEl);var isWindowSpy=nodeName(options.element,"body"),scrollEl=isWindowSpy?windowEl:options.element,scrollId=isWindowSpy?"window":options.id;if(spies[scrollId])return spies[scrollId].$$count++,spies[scrollId];var unbindViewContentLoaded,unbindIncludeContentLoaded,activeTarget,debouncedCheckPosition,throttledCheckPosition,debouncedCheckOffsets,viewportHeight,scrollTop,$scrollspy={},trackedElements=$scrollspy.$trackedElements=[],sortedElements=[];return $scrollspy.init=function(){this.$$count=1,debouncedCheckPosition=debounce(this.checkPosition,options.debounce),throttledCheckPosition=throttle(this.checkPosition,options.throttle),scrollEl.on("click",this.checkPositionWithEventLoop),windowEl.on("resize",debouncedCheckPosition),scrollEl.on("scroll",throttledCheckPosition),debouncedCheckOffsets=debounce(this.checkOffsets,options.debounce),unbindViewContentLoaded=$rootScope.$on("$viewContentLoaded",debouncedCheckOffsets),unbindIncludeContentLoaded=$rootScope.$on("$includeContentLoaded",debouncedCheckOffsets),debouncedCheckOffsets(),scrollId&&(spies[scrollId]=$scrollspy)},$scrollspy.destroy=function(){this.$$count--,this.$$count>0||(scrollEl.off("click",this.checkPositionWithEventLoop),windowEl.off("resize",debouncedCheckPosition),scrollEl.off("scroll",throttledCheckPosition),unbindViewContentLoaded(),unbindIncludeContentLoaded(),scrollId&&delete spies[scrollId])},$scrollspy.checkPosition=function(){if(sortedElements.length){if(scrollTop=(isWindowSpy?$window.pageYOffset:scrollEl.prop("scrollTop"))||0,viewportHeight=Math.max($window.innerHeight,docEl.prop("clientHeight")),scrollTop<sortedElements[0].offsetTop&&activeTarget!==sortedElements[0].target)return $scrollspy.$activateElement(sortedElements[0]);for(var i=sortedElements.length;i--;)if(!angular.isUndefined(sortedElements[i].offsetTop)&&null!==sortedElements[i].offsetTop&&activeTarget!==sortedElements[i].target&&!(scrollTop<sortedElements[i].offsetTop||sortedElements[i+1]&&scrollTop>sortedElements[i+1].offsetTop))return $scrollspy.$activateElement(sortedElements[i])}},$scrollspy.checkPositionWithEventLoop=function(){setTimeout($scrollspy.checkPosition,1)},$scrollspy.$activateElement=function(element){if(activeTarget){var activeElement=$scrollspy.$getTrackedElement(activeTarget);activeElement&&(activeElement.source.removeClass("active"),nodeName(activeElement.source,"li")&&nodeName(activeElement.source.parent().parent(),"li")&&activeElement.source.parent().parent().removeClass("active"))}activeTarget=element.target,element.source.addClass("active"),nodeName(element.source,"li")&&nodeName(element.source.parent().parent(),"li")&&element.source.parent().parent().addClass("active")},$scrollspy.$getTrackedElement=function(target){return trackedElements.filter(function(obj){return obj.target===target})[0]},$scrollspy.checkOffsets=function(){angular.forEach(trackedElements,function(trackedElement){var targetElement=document.querySelector(trackedElement.target);trackedElement.offsetTop=targetElement?dimensions.offset(targetElement).top:null,options.offset&&null!==trackedElement.offsetTop&&(trackedElement.offsetTop-=1*options.offset)}),sortedElements=trackedElements.filter(function(el){return null!==el.offsetTop}).sort(function(a,b){return a.offsetTop-b.offsetTop}),debouncedCheckPosition()},$scrollspy.trackElement=function(target,source){trackedElements.push({target:target,source:source})},$scrollspy.untrackElement=function(target,source){for(var toDelete,i=trackedElements.length;i--;)if(trackedElements[i].target===target&&trackedElements[i].source===source){toDelete=i;break}trackedElements.splice(toDelete,1)},$scrollspy.activate=function(i){trackedElements[i].addClass("active")},$scrollspy.init(),$scrollspy}var windowEl=angular.element($window),docEl=angular.element($document.prop("documentElement")),bodyEl=angular.element($window.document.body);return ScrollSpyFactory}]}).directive("bsScrollspy",["$rootScope","debounce","dimensions","$scrollspy",function($rootScope,debounce,dimensions,$scrollspy){return{restrict:"EAC",link:function(scope,element,attr){var options={scope:scope};angular.forEach(["offset","target"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var scrollspy=$scrollspy(options);scrollspy.trackElement(options.target,element),scope.$on("$destroy",function(){scrollspy&&(scrollspy.untrackElement(options.target,element),scrollspy.destroy()),options=null,scrollspy=null})}}}]).directive("bsScrollspyList",["$rootScope","debounce","dimensions","$scrollspy",function($rootScope,debounce,dimensions,$scrollspy){return{restrict:"A",compile:function(element,attr){var children=element[0].querySelectorAll("li > a[href]");angular.forEach(children,function(child){var childEl=angular.element(child);childEl.parent().attr("bs-scrollspy","").attr("data-target",childEl.attr("href"))})}}}]),angular.module("mgcrea.ngStrap.popover",["mgcrea.ngStrap.tooltip"]).provider("$popover",function(){var defaults=this.defaults={animation:"am-fade",customClass:"",container:!1,target:!1,placement:"right",templateUrl:"popover/popover.tpl.html",contentTemplate:!1,trigger:"click",keyboard:!0,html:!1,title:"",content:"",delay:0,autoClose:!1};this.$get=["$tooltip",function($tooltip){function PopoverFactory(element,config){var options=angular.extend({},defaults,config),$popover=$tooltip(element,options);return options.content&&($popover.$scope.content=options.content),$popover}return PopoverFactory}]}).directive("bsPopover",["$window","$sce","$popover",function($window,$sce,$popover){var requestAnimationFrame=$window.requestAnimationFrame||$window.setTimeout;return{restrict:"EAC",scope:!0,link:function(scope,element,attr){var popover,options={scope:scope};angular.forEach(["template","templateUrl","controller","controllerAs","contentTemplate","placement","container","delay","trigger","html","animation","customClass","autoClose","id","prefixClass","prefixEvent","bsEnabled"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["html","container","autoClose"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))});var dataTarget=element.attr("data-target");angular.isDefined(dataTarget)&&(falseValueRegExp.test(dataTarget)?options.target=!1:options.target=dataTarget),angular.forEach(["title","content"],function(key){attr[key]&&attr.$observe(key,function(newValue,oldValue){scope[key]=$sce.trustAsHtml(newValue),angular.isDefined(oldValue)&&requestAnimationFrame(function(){popover&&popover.$applyPlacement()})})}),attr.bsPopover&&scope.$watch(attr.bsPopover,function(newValue,oldValue){angular.isObject(newValue)?angular.extend(scope,newValue):scope.content=newValue,angular.isDefined(oldValue)&&requestAnimationFrame(function(){popover&&popover.$applyPlacement()})},!0),attr.bsShow&&scope.$watch(attr.bsShow,function(newValue,oldValue){popover&&angular.isDefined(newValue)&&(angular.isString(newValue)&&(newValue=!!newValue.match(/true|,?(popover),?/i)),newValue===!0?popover.show():popover.hide())}),attr.bsEnabled&&scope.$watch(attr.bsEnabled,function(newValue){popover&&angular.isDefined(newValue)&&(angular.isString(newValue)&&(newValue=!!newValue.match(/true|1|,?(popover),?/i)),newValue===!1?popover.setEnabled(!1):popover.setEnabled(!0))}),attr.viewport&&scope.$watch(attr.viewport,function(newValue){popover&&angular.isDefined(newValue)&&popover.setViewport(newValue)}),popover=$popover(element,options),scope.$on("$destroy",function(){popover&&popover.destroy(),options=null,popover=null})}}}]),angular.module("mgcrea.ngStrap.navbar",[]).provider("$navbar",function(){var defaults=this.defaults={activeClass:"active",routeAttr:"data-match-route",strict:!1};this.$get=function(){return{defaults:defaults}}}).directive("bsNavbar",["$window","$location","$navbar",function($window,$location,$navbar){var defaults=$navbar.defaults;return{restrict:"A",link:function(scope,element,attr,controller){var options=angular.copy(defaults);angular.forEach(Object.keys(defaults),function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])}),scope.$watch(function(){return $location.path()},function(newValue,oldValue){var liElements=element[0].querySelectorAll("li["+options.routeAttr+"]");angular.forEach(liElements,function(li){var liElement=angular.element(li),pattern=liElement.attr(options.routeAttr).replace("/","\\/");options.strict&&(pattern="^"+pattern+"$");var regexp=new RegExp(pattern,"i");regexp.test(newValue)?liElement.addClass(options.activeClass):liElement.removeClass(options.activeClass)})})}}}]),angular.module("mgcrea.ngStrap.modal",["mgcrea.ngStrap.core","mgcrea.ngStrap.helpers.dimensions"]).provider("$modal",function(){var defaults=this.defaults={animation:"am-fade",backdropAnimation:"am-fade",customClass:"",prefixClass:"modal",prefixEvent:"modal",placement:"top",templateUrl:"modal/modal.tpl.html",template:"",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0,size:null,zIndex:null};this.$get=["$window","$rootScope","$bsCompiler","$animate","$timeout","$sce","dimensions",function($window,$rootScope,$bsCompiler,$animate,$timeout,$sce,dimensions){function ModalFactory(config){function enterAnimateCallback(){scope.$emit(options.prefixEvent+".show",$modal),angular.isDefined(options.onShow)&&angular.isFunction(options.onShow)&&options.onShow($modal)}function leaveAnimateCallback(){scope.$emit(options.prefixEvent+".hide",$modal),angular.isDefined(options.onHide)&&angular.isFunction(options.onHide)&&options.onHide($modal),findElement(".modal").length<=0&&bodyElement.removeClass(options.prefixClass+"-open"),options.animation&&bodyElement.removeClass(options.prefixClass+"-with-"+options.animation)}function bindBackdropEvents(){options.backdrop&&(modalElement.on("click",hideOnBackdropClick),backdropElement.on("click",hideOnBackdropClick),backdropElement.on("wheel",preventEventDefault))}function unbindBackdropEvents(){options.backdrop&&(modalElement.off("click",hideOnBackdropClick),backdropElement.off("click",hideOnBackdropClick),backdropElement.off("wheel",preventEventDefault))}function bindKeyboardEvents(){options.keyboard&&modalElement.on("keyup",$modal.$onKeyUp)}function unbindKeyboardEvents(){options.keyboard&&modalElement.off("keyup",$modal.$onKeyUp)}function hideOnBackdropClick(evt){evt.target===evt.currentTarget&&("static"===options.backdrop?$modal.focus():$modal.hide())}function preventEventDefault(evt){evt.preventDefault()}function destroyModalElement(){$modal.$isShown&&null!==modalElement&&(unbindBackdropEvents(),unbindKeyboardEvents()),modalScope&&(modalScope.$destroy(),modalScope=null),modalElement&&(modalElement.remove(),modalElement=$modal.$element=null)}var $modal={},options=$modal.$options=angular.extend({},defaults,config),promise=$modal.$promise=$bsCompiler.compile(options),scope=$modal.$scope=options.scope&&options.scope.$new()||$rootScope.$new();options.element||options.container||(options.container="body"),options.zIndex&&(dialogBaseZindex=parseInt(options.zIndex,10),backdropBaseZindex=dialogBaseZindex-10),$modal.$id=options.id||options.element&&options.element.attr("id")||"",forEach(["title","content"],function(key){options[key]&&(scope[key]=$sce.trustAsHtml(options[key]))}),scope.$hide=function(){scope.$$postDigest(function(){$modal.hide()})},scope.$show=function(){scope.$$postDigest(function(){$modal.show()})},scope.$toggle=function(){scope.$$postDigest(function(){$modal.toggle()})},$modal.$isShown=scope.$isShown=!1;var compileData,modalElement,modalScope,backdropElement=angular.element('<div class="'+options.prefixClass+'-backdrop"/>');return backdropElement.css({position:"fixed",top:"0px",left:"0px",bottom:"0px",right:"0px"}),promise.then(function(data){compileData=data,$modal.init()}),$modal.init=function(){options.show&&scope.$$postDigest(function(){$modal.show()})},$modal.destroy=function(){destroyModalElement(),backdropElement&&(backdropElement.remove(),backdropElement=null),scope.$destroy()},$modal.show=function(){if(!$modal.$isShown){var parent,after;if(angular.isElement(options.container)?(parent=options.container,after=options.container[0].lastChild?angular.element(options.container[0].lastChild):null):options.container?(parent=findElement(options.container),after=parent[0]&&parent[0].lastChild?angular.element(parent[0].lastChild):null):(parent=null,after=options.element),modalElement&&destroyModalElement(),modalScope=$modal.$scope.$new(),modalElement=$modal.$element=compileData.link(modalScope,function(clonedElement,scope){}),options.backdrop&&(modalElement.css({"z-index":dialogBaseZindex+20*backdropCount}),backdropElement.css({"z-index":backdropBaseZindex+20*backdropCount
}),backdropCount++),!scope.$emit(options.prefixEvent+".show.before",$modal).defaultPrevented){angular.isDefined(options.onBeforeShow)&&angular.isFunction(options.onBeforeShow)&&options.onBeforeShow($modal),modalElement.css({display:"block"}).addClass(options.placement),options.customClass&&modalElement.addClass(options.customClass),options.size&&validSizes[options.size]&&angular.element(findElement(".modal-dialog",modalElement[0])).addClass(validSizes[options.size]),options.animation&&(options.backdrop&&backdropElement.addClass(options.backdropAnimation),modalElement.addClass(options.animation)),options.backdrop&&$animate.enter(backdropElement,bodyElement,null),angular.version.minor<=2?$animate.enter(modalElement,parent,after,enterAnimateCallback):$animate.enter(modalElement,parent,after).then(enterAnimateCallback),$modal.$isShown=scope.$isShown=!0,safeDigest(scope);var el=modalElement[0];requestAnimationFrame(function(){el.focus()}),bodyElement.addClass(options.prefixClass+"-open"),options.animation&&bodyElement.addClass(options.prefixClass+"-with-"+options.animation),bindBackdropEvents(),bindKeyboardEvents()}}},$modal.hide=function(){$modal.$isShown&&(scope.$emit(options.prefixEvent+".hide.before",$modal).defaultPrevented||(angular.isDefined(options.onBeforeHide)&&angular.isFunction(options.onBeforeHide)&&options.onBeforeHide($modal),angular.version.minor<=2?$animate.leave(modalElement,leaveAnimateCallback):$animate.leave(modalElement).then(leaveAnimateCallback),options.backdrop&&(backdropCount--,$animate.leave(backdropElement)),$modal.$isShown=scope.$isShown=!1,safeDigest(scope),unbindBackdropEvents(),unbindKeyboardEvents()))},$modal.toggle=function(){$modal.$isShown?$modal.hide():$modal.show()},$modal.focus=function(){modalElement[0].focus()},$modal.$onKeyUp=function(evt){27===evt.which&&$modal.$isShown&&($modal.hide(),evt.stopPropagation())},$modal}function safeDigest(scope){scope.$$phase||scope.$root&&scope.$root.$$phase||scope.$digest()}function findElement(query,element){return angular.element((element||document).querySelectorAll(query))}var forEach=angular.forEach,requestAnimationFrame=$window.requestAnimationFrame||$window.setTimeout,bodyElement=angular.element($window.document.body),backdropCount=0,dialogBaseZindex=1050,backdropBaseZindex=1040,validSizes={lg:"modal-lg",sm:"modal-sm"};return ModalFactory}]}).directive("bsModal",["$window","$sce","$parse","$modal",function($window,$sce,$parse,$modal){return{restrict:"EAC",scope:!0,link:function(scope,element,attr,transclusion){var options={scope:scope,element:element,show:!1};angular.forEach(["template","templateUrl","controller","controllerAs","contentTemplate","placement","backdrop","keyboard","html","container","animation","backdropAnimation","id","prefixEvent","prefixClass","customClass","modalClass","size","zIndex"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])}),options.modalClass&&(options.customClass=options.modalClass);var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["backdrop","keyboard","html","container"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))}),angular.forEach(["title","content"],function(key){attr[key]&&attr.$observe(key,function(newValue,oldValue){scope[key]=$sce.trustAsHtml(newValue)})}),attr.bsModal&&scope.$watch(attr.bsModal,function(newValue,oldValue){angular.isObject(newValue)?angular.extend(scope,newValue):scope.content=newValue},!0);var modal=$modal(options);element.on(attr.trigger||"click",modal.toggle),scope.$on("$destroy",function(){modal&&modal.destroy(),options=null,modal=null})}}}]),angular.version.minor<3&&angular.version.dot<14&&angular.module("ng").factory("$$rAF",["$window","$timeout",function($window,$timeout){var requestAnimationFrame=$window.requestAnimationFrame||$window.webkitRequestAnimationFrame||$window.mozRequestAnimationFrame,cancelAnimationFrame=$window.cancelAnimationFrame||$window.webkitCancelAnimationFrame||$window.mozCancelAnimationFrame||$window.webkitCancelRequestAnimationFrame,rafSupported=!!requestAnimationFrame,raf=rafSupported?function(fn){var id=requestAnimationFrame(fn);return function(){cancelAnimationFrame(id)}}:function(fn){var timer=$timeout(fn,16.66,!1);return function(){$timeout.cancel(timer)}};return raf.supported=rafSupported,raf}]),angular.module("mgcrea.ngStrap.helpers.parseOptions",[]).provider("$parseOptions",function(){var defaults=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=["$parse","$q",function($parse,$q){function ParseOptionsFactory(attr,config){function parseValues(values,scope){return values.map(function(match,index){var label,value,locals={};return locals[valueName]=match,label=displayFn(scope,locals),value=valueFn(scope,locals),{label:label,value:value,index:index}})}var $parseOptions={},options=angular.extend({},defaults,config);$parseOptions.$values=[];var match,displayFn,valueName,keyName,groupByFn,valueFn,valuesFn;return $parseOptions.init=function(){$parseOptions.$match=match=attr.match(options.regexp),displayFn=$parse(match[2]||match[1]),valueName=match[4]||match[6],keyName=match[5],groupByFn=$parse(match[3]||""),valueFn=$parse(match[2]?match[1]:valueName),valuesFn=$parse(match[7])},$parseOptions.valuesFn=function(scope,controller){return $q.when(valuesFn(scope,controller)).then(function(values){return angular.isArray(values)||(values=[]),$parseOptions.$values=values.length?parseValues(values,scope):[],$parseOptions.$values})},$parseOptions.displayValue=function(modelValue){var scope={};return scope[valueName]=modelValue,displayFn(scope)},$parseOptions.init(),$parseOptions}return ParseOptionsFactory}]}),angular.module("mgcrea.ngStrap.helpers.dimensions",[]).factory("dimensions",function(){function offsetParentElement(element){var docElement=element.ownerDocument,offsetParent=element.offsetParent||docElement;if(nodeName(offsetParent,"#document"))return docElement.documentElement;for(;offsetParent&&!nodeName(offsetParent,"html")&&"static"===fn.css(offsetParent,"position");)offsetParent=offsetParent.offsetParent;return offsetParent||docElement.documentElement}var fn={},nodeName=fn.nodeName=function(element,name){return element.nodeName&&element.nodeName.toLowerCase()===name.toLowerCase()};return fn.css=function(element,prop,extra){var value;return value=element.currentStyle?element.currentStyle[prop]:window.getComputedStyle?window.getComputedStyle(element)[prop]:element.style[prop],extra===!0?parseFloat(value)||0:value},fn.offset=function(element){var boxRect=element.getBoundingClientRect(),docElement=element.ownerDocument;return{width:boxRect.width||element.offsetWidth,height:boxRect.height||element.offsetHeight,top:boxRect.top+(window.pageYOffset||docElement.documentElement.scrollTop)-(docElement.documentElement.clientTop||0),left:boxRect.left+(window.pageXOffset||docElement.documentElement.scrollLeft)-(docElement.documentElement.clientLeft||0)}},fn.setOffset=function(element,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=fn.css(element,"position"),curElem=angular.element(element),props={};"static"===position&&(element.style.position="relative"),curOffset=fn.offset(element),curCSSTop=fn.css(element,"top"),curCSSLeft=fn.css(element,"left"),calculatePosition=("absolute"===position||"fixed"===position)&&(curCSSTop+curCSSLeft).indexOf("auto")>-1,calculatePosition?(curPosition=fn.position(element),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0),angular.isFunction(options)&&(options=options.call(element,i,curOffset)),null!==options.top&&(props.top=options.top-curOffset.top+curTop),null!==options.left&&(props.left=options.left-curOffset.left+curLeft),"using"in options?options.using.call(curElem,props):curElem.css({top:props.top+"px",left:props.left+"px"})},fn.position=function(element){var offsetParentEl,offset,offsetParentRect={top:0,left:0};return"fixed"===fn.css(element,"position")?offset=element.getBoundingClientRect():(offsetParentEl=offsetParentElement(element),offset=fn.offset(element),nodeName(offsetParentEl,"html")||(offsetParentRect=fn.offset(offsetParentEl)),offsetParentRect.top+=fn.css(offsetParentEl,"borderTopWidth",!0),offsetParentRect.left+=fn.css(offsetParentEl,"borderLeftWidth",!0)),{width:element.offsetWidth,height:element.offsetHeight,top:offset.top-offsetParentRect.top-fn.css(element,"marginTop",!0),left:offset.left-offsetParentRect.left-fn.css(element,"marginLeft",!0)}},fn.height=function(element,outer){var value=element.offsetHeight;return outer?value+=fn.css(element,"marginTop",!0)+fn.css(element,"marginBottom",!0):value-=fn.css(element,"paddingTop",!0)+fn.css(element,"paddingBottom",!0)+fn.css(element,"borderTopWidth",!0)+fn.css(element,"borderBottomWidth",!0),value},fn.width=function(element,outer){var value=element.offsetWidth;return outer?value+=fn.css(element,"marginLeft",!0)+fn.css(element,"marginRight",!0):value-=fn.css(element,"paddingLeft",!0)+fn.css(element,"paddingRight",!0)+fn.css(element,"borderLeftWidth",!0)+fn.css(element,"borderRightWidth",!0),value},fn}),angular.module("mgcrea.ngStrap.helpers.debounce",[]).factory("debounce",["$timeout",function($timeout){return function(func,wait,immediate){var timeout=null;return function(){var context=this,args=arguments,callNow=immediate&&!timeout;return timeout&&$timeout.cancel(timeout),timeout=$timeout(function(){timeout=null,immediate||func.apply(context,args)},wait,!1),callNow&&func.apply(context,args),timeout}}}]).factory("throttle",["$timeout",function($timeout){return function(func,wait,options){var timeout=null;return options||(options={}),function(){var context=this,args=arguments;timeout||(options.leading!==!1&&func.apply(context,args),timeout=$timeout(function(){timeout=null,options.trailing!==!1&&func.apply(context,args)},wait,!1))}}}]),angular.module("mgcrea.ngStrap.helpers.dateParser",[]).provider("$dateParser",["$localeProvider",function($localeProvider){function ParseDate(){this.year=1970,this.month=0,this.day=1,this.hours=0,this.minutes=0,this.seconds=0,this.milliseconds=0}function noop(){}function isNumeric(n){return!isNaN(parseFloat(n))&&isFinite(n)}function indexOfCaseInsensitive(array,value){for(var len=array.length,str=value.toString().toLowerCase(),i=0;i<len;i++)if(array[i].toLowerCase()===str)return i;return-1}ParseDate.prototype.setMilliseconds=function(value){this.milliseconds=value},ParseDate.prototype.setSeconds=function(value){this.seconds=value},ParseDate.prototype.setMinutes=function(value){this.minutes=value},ParseDate.prototype.setHours=function(value){this.hours=value},ParseDate.prototype.getHours=function(){return this.hours},ParseDate.prototype.setDate=function(value){this.day=value},ParseDate.prototype.setMonth=function(value){this.month=value},ParseDate.prototype.setFullYear=function(value){this.year=value},ParseDate.prototype.fromDate=function(value){return this.year=value.getFullYear(),this.month=value.getMonth(),this.day=value.getDate(),this.hours=value.getHours(),this.minutes=value.getMinutes(),this.seconds=value.getSeconds(),this.milliseconds=value.getMilliseconds(),this},ParseDate.prototype.toDate=function(){return new Date(this.year,this.month,this.day,this.hours,this.minutes,this.seconds,this.milliseconds)};var proto=ParseDate.prototype,defaults=this.defaults={format:"shortDate",strict:!1};this.$get=["$locale","dateFilter",function($locale,dateFilter){var DateParserFactory=function(config){function regExpForFormat(format){var re=buildDateAbstractRegex(format);return buildDateParseRegex(re)}function buildDateAbstractRegex(format){var escapedFormat=escapeReservedSymbols(format),escapedLiteralFormat=escapedFormat.replace(/''/g,"\\'"),literalRegex=/('(?:\\'|.)*?')/,formatParts=escapedLiteralFormat.split(literalRegex),dateElements=Object.keys(regExpMap),dateRegexParts=[];return angular.forEach(formatParts,function(part){if(isFormatStringLiteral(part))part=trimLiteralEscapeChars(part);else for(var i=0;i<dateElements.length;i++)part=part.split(dateElements[i]).join("${"+i+"}");dateRegexParts.push(part)}),dateRegexParts.join("")}function escapeReservedSymbols(text){return text.replace(/\\/g,"[\\\\]").replace(/-/g,"[-]").replace(/\./g,"[.]").replace(/\*/g,"[*]").replace(/\+/g,"[+]").replace(/\?/g,"[?]").replace(/\$/g,"[$]").replace(/\^/g,"[^]").replace(/\//g,"[/]").replace(/\\s/g,"[\\s]")}function isFormatStringLiteral(text){return/^'.*'$/.test(text)}function trimLiteralEscapeChars(text){return text.replace(/^'(.*)'$/,"$1")}function buildDateParseRegex(abstractRegex){for(var dateElements=Object.keys(regExpMap),re=abstractRegex,i=0;i<dateElements.length;i++)re=re.split("${"+i+"}").join("("+regExpMap[dateElements[i]]+")");return new RegExp("^"+re+"$",["i"])}function setMapForFormat(format){var re=buildDateAbstractRegex(format);return buildDateParseValuesMap(re)}function buildDateParseValuesMap(abstractRegex){for(var valuesMatch,keyIndex,valueKey,valueFunction,dateElements=Object.keys(regExpMap),valuesRegex=new RegExp("\\${(\\d+)}","g"),valuesFunctionMap=[];null!==(valuesMatch=valuesRegex.exec(abstractRegex));)keyIndex=valuesMatch[1],valueKey=dateElements[keyIndex],valueFunction=setFnMap[valueKey],valuesFunctionMap.push(valueFunction);return valuesFunctionMap}var regex,setMap,options=angular.extend({},defaults,config),$dateParser={},regExpMap={sss:"[0-9]{3}",ss:"[0-5][0-9]",s:options.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",mm:"[0-5][0-9]",m:options.strict?"[1-5]?[0-9]":"[0-9]|[0-5][0-9]",HH:"[01][0-9]|2[0-3]",H:options.strict?"1?[0-9]|2[0-3]":"[01]?[0-9]|2[0-3]",hh:"[0][1-9]|[1][012]",h:options.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",a:"AM|PM",EEEE:$locale.DATETIME_FORMATS.DAY.join("|"),EEE:$locale.DATETIME_FORMATS.SHORTDAY.join("|"),dd:"0[1-9]|[12][0-9]|3[01]",d:options.strict?"[1-9]|[1-2][0-9]|3[01]":"0?[1-9]|[1-2][0-9]|3[01]",MMMM:$locale.DATETIME_FORMATS.MONTH.join("|"),MMM:$locale.DATETIME_FORMATS.SHORTMONTH.join("|"),MM:"0[1-9]|1[012]",M:options.strict?"[1-9]|1[012]":"0?[1-9]|1[012]",yyyy:"[1]{1}[0-9]{3}|[2]{1}[0-9]{3}",yy:"[0-9]{2}",y:options.strict?"-?(0|[1-9][0-9]{0,3})":"-?0*[0-9]{1,4}"},setFnMap={sss:proto.setMilliseconds,ss:proto.setSeconds,s:proto.setSeconds,mm:proto.setMinutes,m:proto.setMinutes,HH:proto.setHours,H:proto.setHours,hh:proto.setHours,h:proto.setHours,EEEE:noop,EEE:noop,dd:proto.setDate,d:proto.setDate,a:function(value){var hours=this.getHours()%12;return this.setHours(value.match(/pm/i)?hours+12:hours)},MMMM:function(value){return this.setMonth(indexOfCaseInsensitive($locale.DATETIME_FORMATS.MONTH,value))},MMM:function(value){return this.setMonth(indexOfCaseInsensitive($locale.DATETIME_FORMATS.SHORTMONTH,value))},MM:function(value){return this.setMonth(1*value-1)},M:function(value){return this.setMonth(1*value-1)},yyyy:proto.setFullYear,yy:function(value){return this.setFullYear(2e3+1*value)},y:function(value){return 1*value<=50&&2===value.length?this.setFullYear(2e3+1*value):this.setFullYear(1*value)}};return $dateParser.init=function(){$dateParser.$format=$locale.DATETIME_FORMATS[options.format]||options.format,regex=regExpForFormat($dateParser.$format),setMap=setMapForFormat($dateParser.$format)},$dateParser.isValid=function(date){return angular.isDate(date)?!isNaN(date.getTime()):regex.test(date)},$dateParser.parse=function(value,baseDate,format,timezone){format&&(format=$locale.DATETIME_FORMATS[format]||format),angular.isDate(value)&&(value=dateFilter(value,format||$dateParser.$format,timezone));var formatRegex=format?regExpForFormat(format):regex,formatSetMap=format?setMapForFormat(format):setMap,matches=formatRegex.exec(value);if(!matches)return!1;for(var date=baseDate&&!isNaN(baseDate.getTime())?(new ParseDate).fromDate(baseDate):(new ParseDate).fromDate(new Date(1970,0,1,0)),i=0;i<matches.length-1;i++)formatSetMap[i]&&formatSetMap[i].call(date,matches[i+1]);var newDate=date.toDate();return parseInt(date.day,10)===newDate.getDate()&&newDate},$dateParser.getDateForAttribute=function(key,value){var date;if("today"===value){var today=new Date;date=new Date(today.getFullYear(),today.getMonth(),today.getDate()+("maxDate"===key?1:0),0,0,0,"minDate"===key?0:-1)}else date=angular.isString(value)&&value.match(/^".+"$/)?new Date(value.substr(1,value.length-2)):isNumeric(value)?new Date(parseInt(value,10)):angular.isString(value)&&0===value.length?"minDate"===key?-(1/0):+(1/0):new Date(value);return date},$dateParser.getTimeForAttribute=function(key,value){var time;return time="now"===value?(new Date).setFullYear(1970,0,1):angular.isString(value)&&value.match(/^".+"$/)?new Date(value.substr(1,value.length-2)).setFullYear(1970,0,1):isNumeric(value)?new Date(parseInt(value,10)).setFullYear(1970,0,1):angular.isString(value)&&0===value.length?"minTime"===key?-(1/0):+(1/0):$dateParser.parse(value,new Date(1970,0,1,0))},$dateParser.daylightSavingAdjust=function(date){return date?(date.setHours(date.getHours()>12?date.getHours()+2:0),date):null},$dateParser.timezoneOffsetAdjust=function(date,timezone,undo){return date?(timezone&&"UTC"===timezone&&(date=new Date(date.getTime()),date.setMinutes(date.getMinutes()+(undo?-1:1)*date.getTimezoneOffset())),date):null},$dateParser.init(),$dateParser};return DateParserFactory}]}]),angular.module("mgcrea.ngStrap.helpers.dateFormatter",[]).service("$dateFormatter",["$locale","dateFilter",function($locale,dateFilter){function splitTimeFormat(format){return/(h+)([:\.])?(m+)([:\.])?(s*)[ ]?(a?)/i.exec(format).slice(1)}this.getDefaultLocale=function(){return $locale.id},this.getDatetimeFormat=function(format,lang){return $locale.DATETIME_FORMATS[format]||format},this.weekdaysShort=function(lang){return $locale.DATETIME_FORMATS.SHORTDAY},this.hoursFormat=function(timeFormat){return splitTimeFormat(timeFormat)[0]},this.minutesFormat=function(timeFormat){return splitTimeFormat(timeFormat)[2]},this.secondsFormat=function(timeFormat){return splitTimeFormat(timeFormat)[4]},this.timeSeparator=function(timeFormat){return splitTimeFormat(timeFormat)[1]},this.showSeconds=function(timeFormat){return!!splitTimeFormat(timeFormat)[4]},this.showAM=function(timeFormat){return!!splitTimeFormat(timeFormat)[5]},this.formatDate=function(date,format,lang,timezone){return dateFilter(date,format,timezone)}}]),angular.module("mgcrea.ngStrap.core",[]).service("$bsCompiler",bsCompilerService),angular.module("mgcrea.ngStrap.dropdown",["mgcrea.ngStrap.tooltip"]).provider("$dropdown",function(){var defaults=this.defaults={animation:"am-fade",prefixClass:"dropdown",prefixEvent:"dropdown",placement:"bottom-left",templateUrl:"dropdown/dropdown.tpl.html",trigger:"click",container:!1,keyboard:!0,html:!1,delay:0};this.$get=["$window","$rootScope","$tooltip","$timeout",function($window,$rootScope,$tooltip,$timeout){function DropdownFactory(element,config){function onBodyClick(evt){if(evt.target!==element[0])return evt.target!==element[0]&&$dropdown.hide()}var $dropdown={},options=angular.extend({},defaults,config);$dropdown.$scope=options.scope&&options.scope.$new()||$rootScope.$new(),$dropdown=$tooltip(element,options);var parentEl=element.parent();$dropdown.$onKeyDown=function(evt){if(/(38|40)/.test(evt.keyCode)){evt.preventDefault(),evt.stopPropagation();var items=angular.element($dropdown.$element[0].querySelectorAll("li:not(.divider) a"));if(items.length){var index;angular.forEach(items,function(el,i){matchesSelector&&matchesSelector.call(el,":focus")&&(index=i)}),38===evt.keyCode&&index>0?index--:40===evt.keyCode&&index<items.length-1?index++:angular.isUndefined(index)&&(index=0),items.eq(index)[0].focus()}}};var show=$dropdown.show;$dropdown.show=function(){show(),$timeout(function(){options.keyboard&&$dropdown.$element&&$dropdown.$element.on("keydown",$dropdown.$onKeyDown),bodyEl.on("click",onBodyClick)},0,!1),parentEl.hasClass("dropdown")&&parentEl.addClass("open")};var hide=$dropdown.hide;$dropdown.hide=function(){$dropdown.$isShown&&(options.keyboard&&$dropdown.$element&&$dropdown.$element.off("keydown",$dropdown.$onKeyDown),bodyEl.off("click",onBodyClick),parentEl.hasClass("dropdown")&&parentEl.removeClass("open"),hide())};var destroy=$dropdown.destroy;return $dropdown.destroy=function(){bodyEl.off("click",onBodyClick),destroy()},$dropdown}var bodyEl=angular.element($window.document.body),matchesSelector=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector;return DropdownFactory}]}).directive("bsDropdown",["$window","$sce","$dropdown",function($window,$sce,$dropdown){return{restrict:"EAC",scope:!0,compile:function(tElement,tAttrs){if(!tAttrs.bsDropdown){for(var nextSibling=tElement[0].nextSibling;nextSibling&&1!==nextSibling.nodeType;)nextSibling=nextSibling.nextSibling;nextSibling&&nextSibling.className.split(" ").indexOf("dropdown-menu")>=0&&(tAttrs.template=nextSibling.outerHTML,tAttrs.templateUrl=undefined,nextSibling.parentNode.removeChild(nextSibling))}return function(scope,element,attr){var options={scope:scope};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","keyboard","html","animation","id","autoClose"],function(key){angular.isDefined(tAttrs[key])&&(options[key]=tAttrs[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["html","container"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))}),attr.bsDropdown&&scope.$watch(attr.bsDropdown,function(newValue,oldValue){scope.content=newValue},!0);var dropdown=$dropdown(element,options);attr.bsShow&&scope.$watch(attr.bsShow,function(newValue,oldValue){dropdown&&angular.isDefined(newValue)&&(angular.isString(newValue)&&(newValue=!!newValue.match(/true|,?(dropdown),?/i)),newValue===!0?dropdown.show():dropdown.hide())}),scope.$on("$destroy",function(){dropdown&&dropdown.destroy(),options=null,dropdown=null})}}}}]),angular.module("mgcrea.ngStrap.button",[]).provider("$button",function(){var defaults=this.defaults={activeClass:"active",toggleEvent:"click"};this.$get=function(){return{defaults:defaults}}}).directive("bsCheckboxGroup",function(){return{restrict:"A",require:"ngModel",compile:function(element,attr){element.attr("data-toggle","buttons"),element.removeAttr("ng-model");var children=element[0].querySelectorAll('input[type="checkbox"]');angular.forEach(children,function(child){var childEl=angular.element(child);childEl.attr("bs-checkbox",""),childEl.attr("ng-model",attr.ngModel+"."+childEl.attr("value"))})}}}).directive("bsCheckbox",["$button","$$rAF",function($button,$$rAF){var defaults=$button.defaults,constantValueRegExp=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(scope,element,attr,controller){var options=defaults,isInput="INPUT"===element[0].nodeName,activeElement=isInput?element.parent():element,trueValue=!angular.isDefined(attr.trueValue)||attr.trueValue;constantValueRegExp.test(attr.trueValue)&&(trueValue=scope.$eval(attr.trueValue));var falseValue=!!angular.isDefined(attr.falseValue)&&attr.falseValue;constantValueRegExp.test(attr.falseValue)&&(falseValue=scope.$eval(attr.falseValue));var hasExoticValues="boolean"!=typeof trueValue||"boolean"!=typeof falseValue;hasExoticValues&&(controller.$parsers.push(function(viewValue){return viewValue?trueValue:falseValue}),controller.$formatters.push(function(modelValue){return angular.equals(modelValue,trueValue)})),controller.$render=function(){var isActive=!!controller.$viewValue;$$rAF(function(){isInput&&(element[0].checked=isActive),activeElement.toggleClass(options.activeClass,isActive)})},element.bind(options.toggleEvent,function(){scope.$apply(function(){isInput||controller.$setViewValue(!activeElement.hasClass("active")),controller.$render()})})}}}]).directive("bsRadioGroup",function(){return{restrict:"A",require:"ngModel",compile:function(element,attr){element.attr("data-toggle","buttons"),element.removeAttr("ng-model");var children=element[0].querySelectorAll('input[type="radio"]');angular.forEach(children,function(child){angular.element(child).attr("bs-radio",""),angular.element(child).attr("ng-model",attr.ngModel)})}}}).directive("bsRadio",["$button","$$rAF",function($button,$$rAF){var defaults=$button.defaults,constantValueRegExp=/^(true|false|\d+)$/;return{restrict:"A",require:"ngModel",link:function(scope,element,attr,controller){var value,options=defaults,isInput="INPUT"===element[0].nodeName,activeElement=isInput?element.parent():element;attr.$observe("value",function(v){value="boolean"!=typeof v&&constantValueRegExp.test(v)?scope.$eval(v):v,controller.$render()}),controller.$render=function(){var isActive=angular.equals(controller.$viewValue,value);$$rAF(function(){isInput&&(element[0].checked=isActive),activeElement.toggleClass(options.activeClass,isActive)})},element.bind(options.toggleEvent,function(){scope.$apply(function(){controller.$setViewValue(value),controller.$render()})})}}}]),angular.module("mgcrea.ngStrap.datepicker",["mgcrea.ngStrap.helpers.dateParser","mgcrea.ngStrap.helpers.dateFormatter","mgcrea.ngStrap.tooltip"]).provider("$datepicker",function(){var defaults=this.defaults={animation:"am-fade",prefixClass:"datepicker",placement:"bottom-left",templateUrl:"datepicker/datepicker.tpl.html",trigger:"focus",container:!1,keyboard:!0,html:!1,delay:0,useNative:!1,dateType:"date",dateFormat:"shortDate",timezone:null,modelDateFormat:null,dayFormat:"dd",monthFormat:"MMM",yearFormat:"yyyy",monthTitleFormat:"MMMM yyyy",yearTitleFormat:"yyyy",strictFormat:!1,autoclose:!1,minDate:-(1/0),maxDate:+(1/0),startView:0,minView:0,startWeek:0,daysOfWeekDisabled:"",hasToday:!1,hasClear:!1,iconLeft:"glyphicon glyphicon-chevron-left",iconRight:"glyphicon glyphicon-chevron-right"};this.$get=["$window","$document","$rootScope","$sce","$dateFormatter","datepickerViews","$tooltip","$timeout",function($window,$document,$rootScope,$sce,$dateFormatter,datepickerViews,$tooltip,$timeout){function DatepickerFactory(element,controller,config){function updateSelected(el){el.selected=$datepicker.$isSelected(el.date)}function focusElement(){element[0].focus()}var $datepicker=$tooltip(element,angular.extend({},defaults,config)),parentScope=config.scope,options=$datepicker.$options,scope=$datepicker.$scope;options.startView&&(options.startView-=options.minView);var pickerViews=datepickerViews($datepicker);$datepicker.$views=pickerViews.views;var viewDate=pickerViews.viewDate;scope.$mode=options.startView,scope.$iconLeft=options.iconLeft,scope.$iconRight=options.iconRight,scope.$hasToday=options.hasToday,scope.$hasClear=options.hasClear;var $picker=$datepicker.$views[scope.$mode];scope.$select=function(date,disabled){disabled||$datepicker.select(date)},scope.$selectPane=function(value){$datepicker.$selectPane(value)},scope.$toggleMode=function(){$datepicker.setMode((scope.$mode+1)%$datepicker.$views.length)},scope.$setToday=function(){options.autoclose?($datepicker.setMode(0),$datepicker.select(new Date)):$datepicker.select(new Date,!0)},scope.$clear=function(){options.autoclose?($datepicker.setMode(0),$datepicker.select(null)):$datepicker.select(null,!0)},$datepicker.update=function(date){angular.isDate(date)&&!isNaN(date.getTime())&&($datepicker.$date=date,$picker.update.call($picker,date)),$datepicker.$build(!0)},$datepicker.updateDisabledDates=function(dateRanges){options.disabledDateRanges=dateRanges;for(var i=0,l=scope.rows.length;i<l;i++)angular.forEach(scope.rows[i],$datepicker.$setDisabledEl)},$datepicker.select=function(date,keep){angular.isDate(date)?angular.isDate(controller.$dateValue)&&!isNaN(controller.$dateValue.getTime())||(controller.$dateValue=new Date(date)):controller.$dateValue=null,!scope.$mode||keep?(controller.$setViewValue(angular.copy(date)),controller.$render(),options.autoclose&&!keep&&$timeout(function(){$datepicker.hide(!0)})):(angular.extend(viewDate,{year:date.getFullYear(),month:date.getMonth(),date:date.getDate()}),$datepicker.setMode(scope.$mode-1),$datepicker.$build())},$datepicker.setMode=function(mode){scope.$mode=mode,$picker=$datepicker.$views[scope.$mode],$datepicker.$build()},$datepicker.$build=function(pristine){pristine===!0&&$picker.built||(pristine!==!1||$picker.built)&&$picker.build.call($picker)},$datepicker.$updateSelected=function(){for(var i=0,l=scope.rows.length;i<l;i++)angular.forEach(scope.rows[i],updateSelected)},$datepicker.$isSelected=function(date){return $picker.isSelected(date)},$datepicker.$setDisabledEl=function(el){el.disabled=$picker.isDisabled(el.date)},$datepicker.$selectPane=function(value){var steps=$picker.steps,targetDate=new Date(Date.UTC(viewDate.year+(steps.year||0)*value,viewDate.month+(steps.month||0)*value,1));angular.extend(viewDate,{year:targetDate.getUTCFullYear(),month:targetDate.getUTCMonth(),date:targetDate.getUTCDate()}),$datepicker.$build()},$datepicker.$onMouseDown=function(evt){if(evt.preventDefault(),evt.stopPropagation(),isTouch){var targetEl=angular.element(evt.target);"button"!==targetEl[0].nodeName.toLowerCase()&&(targetEl=targetEl.parent()),targetEl.triggerHandler("click")}},$datepicker.$onKeyDown=function(evt){if(/(38|37|39|40|13)/.test(evt.keyCode)&&!evt.shiftKey&&!evt.altKey){if(evt.preventDefault(),evt.stopPropagation(),13===evt.keyCode)return void(scope.$mode?scope.$apply(function(){$datepicker.setMode(scope.$mode-1)}):$datepicker.hide(!0));$picker.onKeyDown(evt),parentScope.$digest()}};var _init=$datepicker.init;$datepicker.init=function(){return isNative&&options.useNative?(element.prop("type","date"),void element.css("-webkit-appearance","textfield")):(isTouch&&(element.prop("type","text"),element.attr("readonly","true"),element.on("click",focusElement)),void _init())};var _destroy=$datepicker.destroy;$datepicker.destroy=function(){isNative&&options.useNative&&element.off("click",focusElement),_destroy()};var _show=$datepicker.show;$datepicker.show=function(){!isTouch&&element.attr("readonly")||element.attr("disabled")||(_show(),$timeout(function(){$datepicker.$isShown&&($datepicker.$element.on(isTouch?"touchstart":"mousedown",$datepicker.$onMouseDown),options.keyboard&&element.on("keydown",$datepicker.$onKeyDown))},0,!1))};var _hide=$datepicker.hide;return $datepicker.hide=function(blur){$datepicker.$isShown&&($datepicker.$element.off(isTouch?"touchstart":"mousedown",$datepicker.$onMouseDown),options.keyboard&&element.off("keydown",$datepicker.$onKeyDown),_hide(blur))},$datepicker}var isNative=/(ip[ao]d|iphone|android)/gi.test($window.navigator.userAgent),isTouch="createTouch"in $window.document&&isNative;return defaults.lang||(defaults.lang=$dateFormatter.getDefaultLocale()),DatepickerFactory.defaults=defaults,DatepickerFactory}]}).directive("bsDatepicker",["$window","$parse","$q","$dateFormatter","$dateParser","$datepicker",function($window,$parse,$q,$dateFormatter,$dateParser,$datepicker){var isNative=/(ip[ao]d|iphone|android)/gi.test($window.navigator.userAgent);return{restrict:"EAC",require:"ngModel",link:function(scope,element,attr,controller){function normalizeDateRanges(ranges){return ranges&&ranges.length?ranges:null}function validateAgainstMinMaxDate(parsedDate){if(angular.isDate(parsedDate)){var isMinValid=isNaN(datepicker.$options.minDate)||parsedDate.getTime()>=datepicker.$options.minDate,isMaxValid=isNaN(datepicker.$options.maxDate)||parsedDate.getTime()<=datepicker.$options.maxDate,isValid=isMinValid&&isMaxValid;controller.$setValidity("date",isValid),
controller.$setValidity("min",isMinValid),controller.$setValidity("max",isMaxValid),isValid&&(controller.$dateValue=parsedDate)}}function getDateFormattedString(){return!controller.$dateValue||isNaN(controller.$dateValue.getTime())?"":formatDate(controller.$dateValue,options.dateFormat)}var options={scope:scope};angular.forEach(["template","templateUrl","controller","controllerAs","placement","container","delay","trigger","html","animation","autoclose","dateType","dateFormat","timezone","modelDateFormat","dayFormat","strictFormat","startWeek","startDate","useNative","lang","startView","minView","iconLeft","iconRight","daysOfWeekDisabled","id","prefixClass","prefixEvent","hasToday","hasClear"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["html","container","autoclose","useNative","hasToday","hasClear"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))});var datepicker=$datepicker(element,controller,options);options=datepicker.$options,isNative&&options.useNative&&(options.dateFormat="yyyy-MM-dd");var lang=options.lang,formatDate=function(date,format){return $dateFormatter.formatDate(date,format,lang)},dateParser=$dateParser({format:options.dateFormat,lang:lang,strict:options.strictFormat});attr.bsShow&&scope.$watch(attr.bsShow,function(newValue,oldValue){datepicker&&angular.isDefined(newValue)&&(angular.isString(newValue)&&(newValue=!!newValue.match(/true|,?(datepicker),?/i)),newValue===!0?datepicker.show():datepicker.hide())}),angular.forEach(["minDate","maxDate"],function(key){angular.isDefined(attr[key])&&attr.$observe(key,function(newValue){datepicker.$options[key]=dateParser.getDateForAttribute(key,newValue),isNaN(datepicker.$options[key])||datepicker.$build(!1),validateAgainstMinMaxDate(controller.$dateValue)})}),angular.isDefined(attr.dateFormat)&&attr.$observe("dateFormat",function(newValue){datepicker.$options.dateFormat=newValue}),scope.$watch(attr.ngModel,function(newValue,oldValue){datepicker.update(controller.$dateValue)},!0),angular.isDefined(attr.disabledDates)&&scope.$watch(attr.disabledDates,function(disabledRanges,previousValue){disabledRanges=normalizeDateRanges(disabledRanges),previousValue=normalizeDateRanges(previousValue),disabledRanges&&datepicker.updateDisabledDates(disabledRanges)}),controller.$parsers.unshift(function(viewValue){var date;if(!viewValue)return controller.$setValidity("date",!0),null;var parsedDate=dateParser.parse(viewValue,controller.$dateValue);return!parsedDate||isNaN(parsedDate.getTime())?void controller.$setValidity("date",!1):(validateAgainstMinMaxDate(parsedDate),"string"===options.dateType?(date=dateParser.timezoneOffsetAdjust(parsedDate,options.timezone,!0),formatDate(date,options.modelDateFormat||options.dateFormat)):(date=dateParser.timezoneOffsetAdjust(controller.$dateValue,options.timezone,!0),"number"===options.dateType?date.getTime():"unix"===options.dateType?date.getTime()/1e3:"iso"===options.dateType?date.toISOString():new Date(date)))}),controller.$formatters.push(function(modelValue){var date;return date=angular.isUndefined(modelValue)||null===modelValue?NaN:angular.isDate(modelValue)?modelValue:"string"===options.dateType?dateParser.parse(modelValue,null,options.modelDateFormat):"unix"===options.dateType?new Date(1e3*modelValue):new Date(modelValue),controller.$dateValue=dateParser.timezoneOffsetAdjust(date,options.timezone),getDateFormattedString()}),controller.$render=function(){element.val(getDateFormattedString())},scope.$on("$destroy",function(){datepicker&&datepicker.destroy(),options=null,datepicker=null})}}}]).provider("datepickerViews",function(){function split(arr,size){for(var arrays=[];arr.length>0;)arrays.push(arr.splice(0,size));return arrays}function mod(n,m){return(n%m+m)%m}this.$get=["$dateFormatter","$dateParser","$sce",function($dateFormatter,$dateParser,$sce){return function(picker){var scope=picker.$scope,options=picker.$options,lang=options.lang,formatDate=function(date,format){return $dateFormatter.formatDate(date,format,lang)},dateParser=$dateParser({format:options.dateFormat,lang:lang,strict:options.strictFormat}),weekDaysMin=$dateFormatter.weekdaysShort(lang),weekDaysLabels=weekDaysMin.slice(options.startWeek).concat(weekDaysMin.slice(0,options.startWeek)),weekDaysLabelsHtml=$sce.trustAsHtml('<th class="dow text-center">'+weekDaysLabels.join('</th><th class="dow text-center">')+"</th>"),startDate=picker.$date||(options.startDate?dateParser.getDateForAttribute("startDate",options.startDate):new Date),viewDate={year:startDate.getFullYear(),month:startDate.getMonth(),date:startDate.getDate()},views=[{format:options.dayFormat,split:7,steps:{month:1},update:function(date,force){!this.built||force||date.getFullYear()!==viewDate.year||date.getMonth()!==viewDate.month?(angular.extend(viewDate,{year:picker.$date.getFullYear(),month:picker.$date.getMonth(),date:picker.$date.getDate()}),picker.$build()):date.getDate()===viewDate.date&&1!==date.getDate()||(viewDate.date=picker.$date.getDate(),picker.$updateSelected())},build:function(){var firstDayOfMonth=new Date(viewDate.year,viewDate.month,1),firstDayOfMonthOffset=firstDayOfMonth.getTimezoneOffset(),firstDate=new Date(+firstDayOfMonth-864e5*mod(firstDayOfMonth.getDay()-options.startWeek,7)),firstDateOffset=firstDate.getTimezoneOffset(),today=dateParser.timezoneOffsetAdjust(new Date,options.timezone).toDateString();firstDateOffset!==firstDayOfMonthOffset&&(firstDate=new Date(+firstDate+6e4*(firstDateOffset-firstDayOfMonthOffset)));for(var day,days=[],i=0;i<42;i++)day=dateParser.daylightSavingAdjust(new Date(firstDate.getFullYear(),firstDate.getMonth(),firstDate.getDate()+i)),days.push({date:day,isToday:day.toDateString()===today,label:formatDate(day,this.format),selected:picker.$date&&this.isSelected(day),muted:day.getMonth()!==viewDate.month,disabled:this.isDisabled(day)});scope.title=formatDate(firstDayOfMonth,options.monthTitleFormat),scope.showLabels=!0,scope.labels=weekDaysLabelsHtml,scope.rows=split(days,this.split),scope.isTodayDisabled=this.isDisabled(new Date),this.built=!0},isSelected:function(date){return picker.$date&&date.getFullYear()===picker.$date.getFullYear()&&date.getMonth()===picker.$date.getMonth()&&date.getDate()===picker.$date.getDate()},isDisabled:function(date){var time=date.getTime();if(time<options.minDate||time>options.maxDate)return!0;if(options.daysOfWeekDisabled.indexOf(date.getDay())!==-1)return!0;if(options.disabledDateRanges)for(var i=0;i<options.disabledDateRanges.length;i++)if(time>=options.disabledDateRanges[i].start&&time<=options.disabledDateRanges[i].end)return!0;return!1},onKeyDown:function(evt){if(picker.$date){var newDate,actualTime=picker.$date.getTime();37===evt.keyCode?newDate=new Date(actualTime-864e5):38===evt.keyCode?newDate=new Date(actualTime-6048e5):39===evt.keyCode?newDate=new Date(actualTime+864e5):40===evt.keyCode&&(newDate=new Date(actualTime+6048e5)),this.isDisabled(newDate)||picker.select(newDate,!0)}}},{name:"month",format:options.monthFormat,split:4,steps:{year:1},update:function(date,force){this.built&&date.getFullYear()===viewDate.year?date.getMonth()!==viewDate.month&&(angular.extend(viewDate,{month:picker.$date.getMonth(),date:picker.$date.getDate()}),picker.$updateSelected()):(angular.extend(viewDate,{year:picker.$date.getFullYear(),month:picker.$date.getMonth(),date:picker.$date.getDate()}),picker.$build())},build:function(){for(var month,months=[],i=0;i<12;i++)month=new Date(viewDate.year,i,1),months.push({date:month,label:formatDate(month,this.format),selected:picker.$isSelected(month),disabled:this.isDisabled(month)});scope.title=formatDate(month,options.yearTitleFormat),scope.showLabels=!1,scope.rows=split(months,this.split),this.built=!0},isSelected:function(date){return picker.$date&&date.getFullYear()===picker.$date.getFullYear()&&date.getMonth()===picker.$date.getMonth()},isDisabled:function(date){var lastDate=+new Date(date.getFullYear(),date.getMonth()+1,0);return lastDate<options.minDate||date.getTime()>options.maxDate},onKeyDown:function(evt){if(picker.$date){var actualMonth=picker.$date.getMonth(),newDate=new Date(picker.$date);37===evt.keyCode?newDate.setMonth(actualMonth-1):38===evt.keyCode?newDate.setMonth(actualMonth-4):39===evt.keyCode?newDate.setMonth(actualMonth+1):40===evt.keyCode&&newDate.setMonth(actualMonth+4),this.isDisabled(newDate)||picker.select(newDate,!0)}}},{name:"year",format:options.yearFormat,split:4,steps:{year:12},update:function(date,force){!this.built||force||parseInt(date.getFullYear()/20,10)!==parseInt(viewDate.year/20,10)?(angular.extend(viewDate,{year:picker.$date.getFullYear(),month:picker.$date.getMonth(),date:picker.$date.getDate()}),picker.$build()):date.getFullYear()!==viewDate.year&&(angular.extend(viewDate,{year:picker.$date.getFullYear(),month:picker.$date.getMonth(),date:picker.$date.getDate()}),picker.$updateSelected())},build:function(){for(var year,firstYear=viewDate.year-viewDate.year%(3*this.split),years=[],i=0;i<12;i++)year=new Date(firstYear+i,0,1),years.push({date:year,label:formatDate(year,this.format),selected:picker.$isSelected(year),disabled:this.isDisabled(year)});scope.title=years[0].label+"-"+years[years.length-1].label,scope.showLabels=!1,scope.rows=split(years,this.split),this.built=!0},isSelected:function(date){return picker.$date&&date.getFullYear()===picker.$date.getFullYear()},isDisabled:function(date){var lastDate=+new Date(date.getFullYear()+1,0,0);return lastDate<options.minDate||date.getTime()>options.maxDate},onKeyDown:function(evt){if(picker.$date){var actualYear=picker.$date.getFullYear(),newDate=new Date(picker.$date);37===evt.keyCode?newDate.setYear(actualYear-1):38===evt.keyCode?newDate.setYear(actualYear-4):39===evt.keyCode?newDate.setYear(actualYear+1):40===evt.keyCode&&newDate.setYear(actualYear+4),this.isDisabled(newDate)||picker.select(newDate,!0)}}}];return{views:options.minView?Array.prototype.slice.call(views,options.minView):views,viewDate:viewDate}}}]}),angular.module("mgcrea.ngStrap.collapse",[]).provider("$collapse",function(){var defaults=this.defaults={animation:"am-collapse",disallowToggle:!1,activeClass:"in",startCollapsed:!1,allowMultiple:!1},controller=this.controller=function($scope,$element,$attrs){function fixActiveItemIndexes(index){for(var activeIndexes=self.$targets.$active,i=0;i<activeIndexes.length;i++)index<activeIndexes[i]&&(activeIndexes[i]=activeIndexes[i]-1),activeIndexes[i]===self.$targets.length&&(activeIndexes[i]=self.$targets.length-1)}function isActive(value){var activeItems=self.$targets.$active;return activeItems.indexOf(value)!==-1}function deactivateItem(value){var index=self.$targets.$active.indexOf(value);index!==-1&&self.$targets.$active.splice(index,1)}function activateItem(value){self.$options.allowMultiple||self.$targets.$active.splice(0,1),self.$targets.$active.indexOf(value)===-1&&self.$targets.$active.push(value)}var self=this;self.$options=angular.copy(defaults),angular.forEach(["animation","disallowToggle","activeClass","startCollapsed","allowMultiple"],function(key){angular.isDefined($attrs[key])&&(self.$options[key]=$attrs[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["disallowToggle","startCollapsed","allowMultiple"],function(key){angular.isDefined($attrs[key])&&falseValueRegExp.test($attrs[key])&&(self.$options[key]=!1)}),self.$toggles=[],self.$targets=[],self.$viewChangeListeners=[],self.$registerToggle=function(element){self.$toggles.push(element)},self.$registerTarget=function(element){self.$targets.push(element)},self.$unregisterToggle=function(element){var index=self.$toggles.indexOf(element);self.$toggles.splice(index,1)},self.$unregisterTarget=function(element){var index=self.$targets.indexOf(element);self.$targets.splice(index,1),self.$options.allowMultiple&&deactivateItem(element),fixActiveItemIndexes(index),self.$viewChangeListeners.forEach(function(fn){fn()})},self.$targets.$active=self.$options.startCollapsed?[]:[0],self.$setActive=$scope.$setActive=function(value){angular.isArray(value)?self.$targets.$active=value:!self.$options.disallowToggle&&isActive(value)?deactivateItem(value):activateItem(value),self.$viewChangeListeners.forEach(function(fn){fn()})},self.$activeIndexes=function(){return self.$options.allowMultiple?self.$targets.$active:1===self.$targets.$active.length?self.$targets.$active[0]:-1}};this.$get=function(){var $collapse={};return $collapse.defaults=defaults,$collapse.controller=controller,$collapse}}).directive("bsCollapse",["$window","$animate","$collapse",function($window,$animate,$collapse){return{require:["?ngModel","bsCollapse"],controller:["$scope","$element","$attrs",$collapse.controller],link:function(scope,element,attrs,controllers){var ngModelCtrl=controllers[0],bsCollapseCtrl=controllers[1];ngModelCtrl&&(bsCollapseCtrl.$viewChangeListeners.push(function(){ngModelCtrl.$setViewValue(bsCollapseCtrl.$activeIndexes())}),ngModelCtrl.$formatters.push(function(modelValue){if(angular.isArray(modelValue))bsCollapseCtrl.$setActive(modelValue);else{var activeIndexes=bsCollapseCtrl.$activeIndexes();angular.isArray(activeIndexes)?activeIndexes.indexOf(1*modelValue)===-1&&bsCollapseCtrl.$setActive(1*modelValue):activeIndexes!==1*modelValue&&bsCollapseCtrl.$setActive(1*modelValue)}return modelValue}))}}}]).directive("bsCollapseToggle",function(){return{require:["^?ngModel","^bsCollapse"],link:function(scope,element,attrs,controllers){var bsCollapseCtrl=controllers[1];element.attr("data-toggle","collapse"),bsCollapseCtrl.$registerToggle(element),scope.$on("$destroy",function(){bsCollapseCtrl.$unregisterToggle(element)}),element.on("click",function(){if(!attrs.disabled){var index=attrs.bsCollapseToggle&&"bs-collapse-toggle"!==attrs.bsCollapseToggle?attrs.bsCollapseToggle:bsCollapseCtrl.$toggles.indexOf(element);bsCollapseCtrl.$setActive(1*index),scope.$apply()}})}}}).directive("bsCollapseTarget",["$animate",function($animate){return{require:["^?ngModel","^bsCollapse"],link:function(scope,element,attrs,controllers){function render(){var index=bsCollapseCtrl.$targets.indexOf(element),active=bsCollapseCtrl.$activeIndexes(),action="removeClass";angular.isArray(active)?active.indexOf(index)!==-1&&(action="addClass"):index===active&&(action="addClass"),$animate[action](element,bsCollapseCtrl.$options.activeClass)}var bsCollapseCtrl=controllers[1];element.addClass("collapse"),bsCollapseCtrl.$options.animation&&element.addClass(bsCollapseCtrl.$options.animation),bsCollapseCtrl.$registerTarget(element),scope.$on("$destroy",function(){bsCollapseCtrl.$unregisterTarget(element)}),bsCollapseCtrl.$viewChangeListeners.push(function(){render()}),render()}}}]),angular.module("mgcrea.ngStrap.aside",["mgcrea.ngStrap.modal"]).provider("$aside",function(){var defaults=this.defaults={animation:"am-fade-and-slide-right",prefixClass:"aside",prefixEvent:"aside",placement:"right",templateUrl:"aside/aside.tpl.html",contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=["$modal",function($modal){function AsideFactory(config){var $aside={},options=angular.extend({},defaults,config);return $aside=$modal(options)}return AsideFactory}]}).directive("bsAside",["$window","$sce","$aside",function($window,$sce,$aside){return{restrict:"EAC",scope:!0,link:function(scope,element,attr,transclusion){var options={scope:scope,element:element,show:!1};angular.forEach(["template","templateUrl","controller","controllerAs","contentTemplate","placement","backdrop","keyboard","html","container","animation"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["backdrop","keyboard","html","container"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))}),angular.forEach(["title","content"],function(key){attr[key]&&attr.$observe(key,function(newValue,oldValue){scope[key]=$sce.trustAsHtml(newValue)})}),attr.bsAside&&scope.$watch(attr.bsAside,function(newValue,oldValue){angular.isObject(newValue)?angular.extend(scope,newValue):scope.content=newValue},!0);var aside=$aside(options);element.on(attr.trigger||"click",aside.toggle),scope.$on("$destroy",function(){aside&&aside.destroy(),options=null,aside=null})}}}]),angular.module("mgcrea.ngStrap.alert",["mgcrea.ngStrap.modal"]).provider("$alert",function(){var defaults=this.defaults={animation:"am-fade",prefixClass:"alert",prefixEvent:"alert",placement:null,templateUrl:"alert/alert.tpl.html",container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=["$modal","$timeout",function($modal,$timeout){function AlertFactory(config){var $alert={},options=angular.extend({},defaults,config);$alert=$modal(options),$alert.$scope.dismissable=!!options.dismissable,options.type&&($alert.$scope.type=options.type);var show=$alert.show;return options.duration&&($alert.show=function(){show(),$timeout(function(){$alert.hide()},1e3*options.duration)}),$alert}return AlertFactory}]}).directive("bsAlert",["$window","$sce","$alert",function($window,$sce,$alert){return{restrict:"EAC",scope:!0,link:function(scope,element,attr,transclusion){var options={scope:scope,element:element,show:!1};angular.forEach(["template","templateUrl","controller","controllerAs","placement","keyboard","html","container","animation","duration","dismissable"],function(key){angular.isDefined(attr[key])&&(options[key]=attr[key])});var falseValueRegExp=/^(false|0|)$/i;angular.forEach(["keyboard","html","container","dismissable"],function(key){angular.isDefined(attr[key])&&falseValueRegExp.test(attr[key])&&(options[key]=!1)}),angular.forEach(["onBeforeShow","onShow","onBeforeHide","onHide"],function(key){var bsKey="bs"+key.charAt(0).toUpperCase()+key.slice(1);angular.isDefined(attr[bsKey])&&(options[key]=scope.$eval(attr[bsKey]))}),scope.hasOwnProperty("title")||(scope.title=""),angular.forEach(["title","content","type"],function(key){attr[key]&&attr.$observe(key,function(newValue,oldValue){scope[key]=$sce.trustAsHtml(newValue)})}),attr.bsAlert&&scope.$watch(attr.bsAlert,function(newValue,oldValue){angular.isObject(newValue)?angular.extend(scope,newValue):scope.content=newValue},!0);var alert=$alert(options);element.on(attr.trigger||"click",alert.toggle),scope.$on("$destroy",function(){alert&&alert.destroy(),options=null,alert=null})}}}]),angular.module("mgcrea.ngStrap.affix",["mgcrea.ngStrap.helpers.dimensions","mgcrea.ngStrap.helpers.debounce"]).provider("$affix",function(){var defaults=this.defaults={offsetTop:"auto",inlineStyles:!0,setWidth:!0};this.$get=["$window","debounce","dimensions",function($window,debounce,dimensions){function AffixFactory(element,config){function getRequiredAffixClass(_unpin,position,elementHeight){var scrollTop=getScrollTop(),scrollHeight=getScrollHeight();return scrollTop<=offsetTop?"top":null!==_unpin?scrollTop+_unpin<=position.top?"middle":"bottom":null!==offsetBottom&&position.top+elementHeight+initialAffixTop>=scrollHeight-offsetBottom?"bottom":"middle"}function getScrollTop(){return targetEl[0]===$window?$window.pageYOffset:targetEl[0].scrollTop}function getScrollHeight(){return targetEl[0]===$window?$window.document.body.scrollHeight:targetEl[0].scrollHeight}var $affix={},options=angular.extend({},defaults,config),targetEl=options.target,reset="affix affix-top affix-bottom",setWidth=!1,initialAffixTop=0,initialOffsetTop=0,offsetTop=0,offsetBottom=0,affixed=null,unpin=null,parent=element.parent();if(options.offsetParent)if(options.offsetParent.match(/^\d+$/))for(var i=0;i<1*options.offsetParent-1;i++)parent=parent.parent();else parent=angular.element(options.offsetParent);return $affix.init=function(){this.$parseOffsets(),initialOffsetTop=dimensions.offset(element[0]).top+initialAffixTop,setWidth=options.setWidth&&!element[0].style.width,targetEl.on("scroll",this.checkPosition),targetEl.on("click",this.checkPositionWithEventLoop),windowEl.on("resize",this.$debouncedOnResize),this.checkPosition(),this.checkPositionWithEventLoop()},$affix.destroy=function(){targetEl.off("scroll",this.checkPosition),targetEl.off("click",this.checkPositionWithEventLoop),windowEl.off("resize",this.$debouncedOnResize)},$affix.checkPositionWithEventLoop=function(){setTimeout($affix.checkPosition,1)},$affix.checkPosition=function(){var scrollTop=getScrollTop(),position=dimensions.offset(element[0]),elementHeight=dimensions.height(element[0]),affix=getRequiredAffixClass(unpin,position,elementHeight);affixed!==affix&&(affixed=affix,"top"===affix?(unpin=null,setWidth&&element.css("width",""),options.inlineStyles&&(element.css("position",options.offsetParent?"":"relative"),element.css("top",""))):"bottom"===affix?(unpin=options.offsetUnpin?-(1*options.offsetUnpin):position.top-scrollTop,setWidth&&element.css("width",""),options.inlineStyles&&(element.css("position",options.offsetParent?"":"relative"),element.css("top",options.offsetParent?"":bodyEl[0].offsetHeight-offsetBottom-elementHeight-initialOffsetTop+"px"))):(unpin=null,setWidth&&element.css("width",element[0].offsetWidth+"px"),options.inlineStyles&&(element.css("position","fixed"),element.css("top",initialAffixTop+"px"))),element.removeClass(reset).addClass("affix"+("middle"!==affix?"-"+affix:"")))},$affix.$onResize=function(){$affix.$parseOffsets(),$affix.checkPosition()},$affix.$debouncedOnResize=debounce($affix.$onResize,50),$affix.$parseOffsets=function(){var initialPosition=element[0].style.position,initialTop=element[0].style.top;options.inlineStyles&&(element.css("position",options.offsetParent?"":"relative"),element.css("top","")),options.offsetTop&&("auto"===options.offsetTop&&(options.offsetTop="+0"),options.offsetTop.match(/^[-+]\d+$/)?(initialAffixTop=1*-options.offsetTop,offsetTop=options.offsetParent?dimensions.offset(parent[0]).top+1*options.offsetTop:dimensions.offset(element[0]).top-dimensions.css(element[0],"marginTop",!0)+1*options.offsetTop):offsetTop=1*options.offsetTop),options.offsetBottom&&(offsetBottom=options.offsetParent&&options.offsetBottom.match(/^[-+]\d+$/)?getScrollHeight()-(dimensions.offset(parent[0]).top+dimensions.height(parent[0]))+1*options.offsetBottom+1:1*options.offsetBottom),options.inlineStyles&&(element.css("position",initialPosition),element.css("top",initialTop))},$affix.init(),$affix}var bodyEl=angular.element($window.document.body),windowEl=angular.element($window);return AffixFactory}]}).directive("bsAffix",["$affix","$window","$timeout",function($affix,$window,$timeout){return{restrict:"EAC",require:"^?bsAffixTarget",link:function(scope,element,attr,affixTarget){var options={scope:scope,target:affixTarget?affixTarget.$element:angular.element($window)};angular.forEach(["offsetTop","offsetBottom","offsetParent","offsetUnpin","inlineStyles","setWidth"],function(key){if(angular.isDefined(attr[key])){var option=attr[key];/true/i.test(option)&&(option=!0),/false/i.test(option)&&(option=!1),options[key]=option}});var affix;$timeout(function(){affix=$affix(element,options)}),scope.$on("$destroy",function(){affix&&affix.destroy(),options=null,affix=null})}}}]).directive("bsAffixTarget",function(){return{controller:["$element",function($element){this.$element=$element}]}}),angular.module("mgcrea.ngStrap",["mgcrea.ngStrap.modal","mgcrea.ngStrap.aside","mgcrea.ngStrap.alert","mgcrea.ngStrap.button","mgcrea.ngStrap.select","mgcrea.ngStrap.datepicker","mgcrea.ngStrap.timepicker","mgcrea.ngStrap.navbar","mgcrea.ngStrap.tooltip","mgcrea.ngStrap.popover","mgcrea.ngStrap.dropdown","mgcrea.ngStrap.typeahead","mgcrea.ngStrap.scrollspy","mgcrea.ngStrap.affix","mgcrea.ngStrap.tab","mgcrea.ngStrap.collapse"])}(window,document),function(window,document,undefined){angular.module("mgcrea.ngStrap.alert").run(["$templateCache",function($templateCache){$templateCache.put("alert/alert.tpl.html",'<div class="alert" ng-class="[type ? \'alert-\' + type : null]"><button type="button" class="close" ng-if="dismissable" ng-click="$hide()">&times;</button> <span ng-if="title"><strong ng-bind="title"></strong>&nbsp;<span ng-bind-html="content"></span> </span><span ng-if="!title" ng-bind-html="content"></span></div>')}]),angular.module("mgcrea.ngStrap.aside").run(["$templateCache",function($templateCache){$templateCache.put("aside/aside.tpl.html",'<div class="aside" tabindex="-1" role="dialog"><div class="aside-dialog"><div class="aside-content"><div class="aside-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="aside-title" ng-bind="title"></h4></div><div class="aside-body" ng-bind="content"></div><div class="aside-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>')}]),angular.module("mgcrea.ngStrap.datepicker").run(["$templateCache",function($templateCache){$templateCache.put("datepicker/datepicker.tpl.html",'<div class="dropdown-menu datepicker" ng-class="\'datepicker-mode-\' + $mode" style="max-width: 320px"><table style="table-layout: fixed; height: 100%; width: 100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$selectPane(-1)"><i class="{{$iconLeft}}"></i></button></th><th colspan="{{ rows[0].length - 2 }}"><button tabindex="-1" type="button" class="btn btn-default btn-block text-strong" ng-click="$toggleMode()"><strong style="text-transform: capitalize" ng-bind="title"></strong></button></th><th><button tabindex="-1" type="button" class="btn btn-default pull-right" ng-click="$selectPane(+1)"><i class="{{$iconRight}}"></i></button></th></tr><tr ng-if="showLabels" ng-bind-html="labels"></tr></thead><tbody><tr ng-repeat="(i, row) in rows" height="{{ 100 / rows.length }}%"><td class="text-center" ng-repeat="(j, el) in row"><button tabindex="-1" type="button" class="btn btn-default" style="width: 100%" ng-class="{\'btn-primary\': el.selected, \'btn-info btn-today\': el.isToday && !el.selected}" ng-click="$select(el.date, el.disabled)" ng-disabled="el.disabled"><span ng-class="{\'text-muted\': el.muted}" ng-bind="el.label"></span></button></td></tr></tbody><tfoot><tr><td colspan="{{ rows[0].length }}"><div class="btn-group btn-group-justified" role="group"><div class="btn-group" role="group" ng-if="$hasToday"><button type="button" class="btn btn-default today" ng-click="$setToday()" ng-disabled="isTodayDisabled"><strong style="text-transform: capitalize">Today</strong></button></div><div class="btn-group" role="group" ng-if="$hasClear"><button type="button" class="btn btn-default clear" ng-click="$clear()"><strong style="text-transform: capitalize">Clear</strong></button></div></div></td></tr></tfoot></table></div>')}]),angular.module("mgcrea.ngStrap.dropdown").run(["$templateCache",function($templateCache){$templateCache.put("dropdown/dropdown.tpl.html",'<ul tabindex="-1" class="dropdown-menu" role="menu" ng-show="content && content.length"><li role="presentation" ng-class="{divider: item.divider, active: item.active}" ng-repeat="item in content"><a role="menuitem" tabindex="-1" ng-href="{{item.href}}" ng-if="!item.divider && item.href" target="{{item.target || \'\'}}" ng-bind="item.text"></a> <a role="menuitem" tabindex="-1" href="javascript:void(0)" ng-if="!item.divider && item.click" ng-click="$eval(item.click);$hide()" ng-bind="item.text"></a></li></ul>')}]),angular.module("mgcrea.ngStrap.modal").run(["$templateCache",function($templateCache){$templateCache.put("modal/modal.tpl.html",'<div class="modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><button type="button" class="close" aria-label="Close" ng-click="$hide()"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body" ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>')}]),angular.module("mgcrea.ngStrap.popover").run(["$templateCache",function($templateCache){$templateCache.put("popover/popover.tpl.html",'<div class="popover" tabindex="-1"><div class="arrow"></div><h3 class="popover-title" ng-bind="title" ng-show="title"></h3><div class="popover-content" ng-bind="content"></div></div>')}]),angular.module("mgcrea.ngStrap.select").run(["$templateCache",function($templateCache){$templateCache.put("select/select.tpl.html",'<ul tabindex="-1" class="select dropdown-menu" ng-show="$isVisible()" role="select"><li ng-if="$showAllNoneButtons"><div class="btn-group" style="margin-bottom: 5px; margin-left: 5px"><button type="button" class="btn btn-default btn-xs" ng-click="$selectAll()">{{$allText}}</button> <button type="button" class="btn btn-default btn-xs" ng-click="$selectNone()">{{$noneText}}</button></div></li><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $isActive($index)}"><a style="cursor: default" role="menuitem" tabindex="-1" ng-click="$select($index, $event)"><i class="{{$iconCheckmark}} pull-right" ng-if="$isMultiple && $isActive($index)"></i> <span ng-bind="match.label"></span></a></li></ul>')}]),angular.module("mgcrea.ngStrap.tab").run(["$templateCache",function($templateCache){$templateCache.put("tab/tab.tpl.html",'<ul class="nav" ng-class="$navClass" role="tablist"><li role="presentation" ng-repeat="$pane in $panes track by $index" ng-class="[ $isActive($pane, $index) ? $activeClass : \'\', $pane.disabled ? \'disabled\' : \'\' ]"><a role="tab" data-toggle="tab" ng-click="!$pane.disabled && $setActive($pane.name || $index)" data-index="{{ $index }}" ng-bind-html="$pane.title" aria-controls="$pane.title" href=""></a></li></ul><div ng-transclude class="tab-content"></div>')}]),angular.module("mgcrea.ngStrap.timepicker").run(["$templateCache",function($templateCache){$templateCache.put("timepicker/timepicker.tpl.html",'<div class="dropdown-menu timepicker" style="min-width: 0px;width: auto"><table height="100%"><thead><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 0)"><i class="{{ $iconUp }}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 1)"><i class="{{ $iconUp }}"></i></button></th><th ng-if="showSeconds">&nbsp;</th><th ng-if="showSeconds"><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(-1, 2)"><i class="{{ $iconUp }}"></i></button></th></tr></thead><tbody><tr ng-repeat="(i, row) in rows"><td class="text-center"><button tabindex="-1" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[0].selected}" ng-click="$select(row[0].date, 0)" ng-disabled="row[0].disabled"><span ng-class="{\'text-muted\': row[0].muted}" ng-bind="row[0].label"></span></button></td><td><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td class="text-center"><button tabindex="-1" ng-if="row[1].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[1].selected}" ng-click="$select(row[1].date, 1)" ng-disabled="row[1].disabled"><span ng-class="{\'text-muted\': row[1].muted}" ng-bind="row[1].label"></span></button></td><td ng-if="showSeconds"><span ng-bind="i == midIndex ? timeSeparator : \' \'"></span></td><td ng-if="showSeconds" class="text-center"><button tabindex="-1" ng-if="row[2].date" style="width: 100%" type="button" class="btn btn-default" ng-class="{\'btn-primary\': row[2].selected}" ng-click="$select(row[2].date, 2)" ng-disabled="row[2].disabled"><span ng-class="{\'text-muted\': row[2].muted}" ng-bind="row[2].label"></span></button></td><td ng-if="showAM">&nbsp;</td><td ng-if="showAM"><button tabindex="-1" ng-show="i == midIndex - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !!isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">AM</button> <button tabindex="-1" ng-show="i == midIndex + 1 - !isAM * 1" style="width: 100%" type="button" ng-class="{\'btn-primary\': !isAM}" class="btn btn-default" ng-click="$switchMeridian()" ng-disabled="el.disabled">PM</button></td></tr></tbody><tfoot><tr class="text-center"><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 0)"><i class="{{ $iconDown }}"></i></button></th><th>&nbsp;</th><th><button tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 1)"><i class="{{ $iconDown }}"></i></button></th><th ng-if="showSeconds">&nbsp;</th><th ng-if="showSeconds"><button ng-if="showSeconds" tabindex="-1" type="button" class="btn btn-default pull-left" ng-click="$arrowAction(1, 2)"><i class="{{ $iconDown }}"></i></button></th></tr></tfoot></table></div>');
}]),angular.module("mgcrea.ngStrap.tooltip").run(["$templateCache",function($templateCache){$templateCache.put("tooltip/tooltip.tpl.html",'<div class="tooltip in" ng-show="title"><div class="tooltip-arrow"></div><div class="tooltip-inner" ng-bind="title"></div></div>')}]),angular.module("mgcrea.ngStrap.typeahead").run(["$templateCache",function($templateCache){$templateCache.put("typeahead/typeahead.tpl.html",'<ul tabindex="-1" class="typeahead dropdown-menu" ng-show="$isVisible()" role="select"><li role="presentation" ng-repeat="match in $matches" ng-class="{active: $index == $activeIndex}"><a role="menuitem" tabindex="-1" ng-click="$select($index, $event)" ng-bind="match.label"></a></li></ul>')}])}(window,document);