Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
www.reboot.netflix.js Maven / Gradle / Ivy
var nf=typeof nf!=="undefined"?nf:{};nf.utils=function(){var createRow=function(data,isSafeHTML,isHeader){var tr=document.createElement("tr");data.forEach(function(item){var nodeType=isHeader?"th":"td",td=document.createElement(nodeType);if(item instanceof HTMLElement||item instanceof DocumentFragment){td.appendChild(item)}else if(isSafeHTML){td.innerHTML=item}else{td.textContent=item}tr.appendChild(td)});return tr};var arrayToSet=function(array){var set=new Set;array.forEach(function(item){set.add(item)});return set};var setToArray=function(set){var array=[];set.forEach(function(item){array.push(item)});return array};var extend=function(objects){var extended={};var merge=function(obj){for(var prop in obj){if(Object.prototype.hasOwnProperty.call(obj,prop)){extended[prop]=obj[prop]}}};merge(arguments[0]);for(var i=1;i=0){a=this.walk(a,d)}else{b=this.walk(b,-d)}while(a&&b&&a!==b){a=a.parentNode||a.host;b=b.parentNode||b.host}return a},walk:function(n,u){for(var i=0;n&&i-1){this.values[i]=inEvent}else{this.keys.push(inId);this.values.push(inEvent)}},has:function(inId){return this.keys.indexOf(inId)>-1},"delete":function(inId){var i=this.keys.indexOf(inId);if(i>-1){this.keys.splice(i,1);this.values.splice(i,1)}},get:function(inId){var i=this.keys.indexOf(inId);return this.values[i]},clear:function(){this.keys.length=0;this.values.length=0},forEach:function(callback,thisArg){this.values.forEach(function(v,i){callback.call(thisArg,v,this.keys[i],this)},this)},pointers:function(){return this.keys.length}};scope.PointerMap=PointerMap})(window.PolymerGestures);(function(scope){var CLONE_PROPS=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","which","pageX","pageY","timeStamp","preventTap","tapPrevented","_source"];var CLONE_DEFAULTS=[false,false,null,null,0,0,0,0,false,false,false,false,0,null,0,0,0,0,0,0,0,"",0,false,"",null,null,0,0,0,0,function(){},false];var HAS_SVG_INSTANCE=typeof SVGElementInstance!=="undefined";var eventFactory=scope.eventFactory;var currentGestures;var dispatcher={IS_IOS:false,pointermap:new scope.PointerMap,requiredGestures:new scope.PointerMap,eventMap:Object.create(null),eventSources:Object.create(null),eventSourceList:[],gestures:[],dependencyMap:{down:{listeners:0,index:-1},up:{listeners:0,index:-1}},gestureQueue:[],registerSource:function(name,source){var s=source;var newEvents=s.events;if(newEvents){newEvents.forEach(function(e){if(s[e]){this.eventMap[e]=s[e].bind(s)}},this);this.eventSources[name]=s;this.eventSourceList.push(s)}},registerGesture:function(name,source){var obj=Object.create(null);obj.listeners=0;obj.index=this.gestures.length;for(var i=0,g;i0){r=this.dependencyMap[g];ri=r?r.index:-1;currentGestures[ri]=true}}}},eventHandler:function(inEvent){var type=inEvent.type;if(type==="touchstart"||type==="mousedown"||type==="pointerdown"||type==="MSPointerDown"){if(!inEvent._handledByPG){currentGestures={}}if(this.IS_IOS){var ev=inEvent;if(type==="touchstart"){var ct=inEvent.changedTouches[0];ev={target:inEvent.target,clientX:ct.clientX,clientY:ct.clientY,path:inEvent.path}}var nodes=inEvent.path||scope.targetFinding.path(ev);for(var i=0,n;i0){node._pgListeners--}if(node._pgListeners===0){dispatcher.unregister(node)}if(node._pgEvents){if(node._pgEvents[g]>0){node._pgEvents[g]--}else{node._pgEvents[g]=0}}}return Boolean(dep)};scope.removeEventListener=function(node,gesture,handler,capture){if(handler){scope.deactivateGesture(node,gesture);node.removeEventListener(gesture,handler,capture)}}})(window.PolymerGestures);(function(scope){var dispatcher=scope.dispatcher;var pointermap=dispatcher.pointermap;var DEDUP_DIST=25;var WHICH_TO_BUTTONS=[0,1,4,2];var CURRENT_BUTTONS=0;var HAS_BUTTONS=false;try{HAS_BUTTONS=new MouseEvent("test",{buttons:1}).buttons===1}catch(e){}var mouseEvents={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup"],exposes:["down","up","move"],register:function(target){dispatcher.listen(target,this.events)},unregister:function(target){if(target===document){return}dispatcher.unlisten(target,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(inEvent){var lts=this.lastTouches;var x=inEvent.clientX,y=inEvent.clientY;for(var i=0,l=lts.length,t;i=doa}return ret}},findTouch:function(inTL,inId){for(var i=0,l=inTL.length,t;i=tl.length){var d=[];pointermap.forEach(function(value,key){if(key!==1&&!this.findTouch(tl,key-2)){var p=value;d.push(p)}},this);d.forEach(function(p){this.cancel(p);pointermap.delete(p.pointerId)})}},touchstart:function(inEvent){this.vacuumTouches(inEvent);this.setPrimaryTouch(inEvent.changedTouches[0]);this.dedupSynthMouse(inEvent);if(!this.scrolling){this.clickCount++;this.processTouches(inEvent,this.down)}},down:function(inPointer){dispatcher.down(inPointer)},touchmove:function(inEvent){if(HAS_TOUCH_ACTION){if(inEvent.cancelable){this.processTouches(inEvent,this.move)}}else{if(!this.scrolling){if(this.scrolling===null&&this.shouldScroll(inEvent)){this.scrolling=true}else{this.scrolling=false;inEvent.preventDefault();this.processTouches(inEvent,this.move)}}else if(this.firstXY){var t=inEvent.changedTouches[0];var dx=t.clientX-this.firstXY.X;var dy=t.clientY-this.firstXY.Y;var dd=Math.sqrt(dx*dx+dy*dy);if(dd>=HYSTERESIS){this.touchcancel(inEvent);this.scrolling=true;this.firstXY=null}}}},move:function(inPointer){dispatcher.move(inPointer)},touchend:function(inEvent){this.dedupSynthMouse(inEvent);this.processTouches(inEvent,this.up)},up:function(inPointer){inPointer.relatedTarget=scope.findTarget(inPointer);dispatcher.up(inPointer)},cancel:function(inPointer){dispatcher.cancel(inPointer)},touchcancel:function(inEvent){inEvent._cancel=true;this.processTouches(inEvent,this.cancel)},cleanUpPointer:function(inPointer){pointermap["delete"](inPointer.pointerId);this.removePrimaryPointer(inPointer)},dedupSynthMouse:function(inEvent){var lts=scope.mouseEvents.lastTouches;var t=inEvent.changedTouches[0];if(this.isPrimaryTouch(t)){var lt={x:t.clientX,y:t.clientY};lts.push(lt);var fn=function(lts,lt){var i=lts.indexOf(lt);if(i>-1){lts.splice(i,1)}}.bind(null,lts,lt);setTimeout(fn,DEDUP_TIMEOUT)}}};var STOP_PROP_FN=Event.prototype.stopImmediatePropagation||Event.prototype.stopPropagation;document.addEventListener("click",function(ev){var x=ev.clientX,y=ev.clientY;var closeTo=function(touch){var dx=Math.abs(x-touch.x),dy=Math.abs(y-touch.y);return dx<=DEDUP_DIST&&dy<=DEDUP_DIST};var wasTouched=scope.mouseEvents.lastTouches.some(closeTo);var path=scope.targetFinding.path(ev);if(wasTouched){for(var i=0;i0?1:-1},calcPositionDelta:function(inA,inB){var x=0,y=0;if(inA&&inB){x=inB.pageX-inA.pageX;y=inB.pageY-inA.pageY}return{x:x,y:y}},fireTrack:function(inType,inEvent,inTrackingData){var t=inTrackingData;var d=this.calcPositionDelta(t.downEvent,inEvent);var dd=this.calcPositionDelta(t.lastMoveEvent,inEvent);if(dd.x){t.xDirection=this.clampDir(dd.x)}else if(inType==="trackx"){return}if(dd.y){t.yDirection=this.clampDir(dd.y)}else if(inType==="tracky"){return}var gestureProto={bubbles:true,cancelable:true,trackInfo:t.trackInfo,relatedTarget:inEvent.relatedTarget,pointerType:inEvent.pointerType,pointerId:inEvent.pointerId,_source:"track"};if(inType!=="tracky"){gestureProto.x=inEvent.x;gestureProto.dx=d.x;gestureProto.ddx=dd.x;gestureProto.clientX=inEvent.clientX;gestureProto.pageX=inEvent.pageX;gestureProto.screenX=inEvent.screenX;gestureProto.xDirection=t.xDirection}if(inType!=="trackx"){gestureProto.dy=d.y;gestureProto.ddy=dd.y;gestureProto.y=inEvent.y;gestureProto.clientY=inEvent.clientY;gestureProto.pageY=inEvent.pageY;gestureProto.screenY=inEvent.screenY;gestureProto.yDirection=t.yDirection}var e=eventFactory.makeGestureEvent(inType,gestureProto);t.downTarget.dispatchEvent(e)},down:function(inEvent){if(inEvent.isPrimary&&(inEvent.pointerType==="mouse"?inEvent.buttons===1:true)){var p={downEvent:inEvent,downTarget:inEvent.target,trackInfo:{},lastMoveEvent:null,xDirection:0,yDirection:0,tracking:false};pointermap.set(inEvent.pointerId,p)}},move:function(inEvent){var p=pointermap.get(inEvent.pointerId);if(p){if(!p.tracking){var d=this.calcPositionDelta(p.downEvent,inEvent);var move=d.x*d.x+d.y*d.y;if(move>this.WIGGLE_THRESHOLD){p.tracking=true;p.lastMoveEvent=p.downEvent;this.fireTrack("trackstart",inEvent,p)}}if(p.tracking){this.fireTrack("track",inEvent,p);this.fireTrack("trackx",inEvent,p);this.fireTrack("tracky",inEvent,p)}p.lastMoveEvent=inEvent}},up:function(inEvent){var p=pointermap.get(inEvent.pointerId);if(p){if(p.tracking){this.fireTrack("trackend",inEvent,p)}pointermap.delete(inEvent.pointerId)}}};dispatcher.registerGesture("track",track)})(window.PolymerGestures);(function(scope){var dispatcher=scope.dispatcher;var eventFactory=scope.eventFactory;var hold={HOLD_DELAY:200,WIGGLE_THRESHOLD:16,events:["down","move","up"],exposes:["hold","holdpulse","release"],heldPointer:null,holdJob:null,pulse:function(){var hold=Date.now()-this.heldPointer.timeStamp;var type=this.held?"holdpulse":"hold";this.fireHold(type,hold);this.held=true},cancel:function(){clearInterval(this.holdJob);if(this.held){this.fireHold("release")}this.held=false;this.heldPointer=null;this.target=null;this.holdJob=null},down:function(inEvent){if(inEvent.isPrimary&&!this.heldPointer){this.heldPointer=inEvent;this.target=inEvent.target;this.holdJob=setInterval(this.pulse.bind(this),this.HOLD_DELAY)}},up:function(inEvent){if(this.heldPointer&&this.heldPointer.pointerId===inEvent.pointerId){this.cancel()}},move:function(inEvent){if(this.heldPointer&&this.heldPointer.pointerId===inEvent.pointerId){var x=inEvent.clientX-this.heldPointer.clientX;var y=inEvent.clientY-this.heldPointer.clientY;if(x*x+y*y>this.WIGGLE_THRESHOLD){this.cancel()}}},fireHold:function(inType,inHoldTime){var p={bubbles:true,cancelable:true,pointerType:this.heldPointer.pointerType,pointerId:this.heldPointer.pointerId,x:this.heldPointer.clientX,y:this.heldPointer.clientY,_source:"hold"};if(inHoldTime){p.holdTime=inHoldTime}var e=eventFactory.makeGestureEvent(inType,p);this.target.dispatchEvent(e)}};dispatcher.registerGesture("hold",hold)})(window.PolymerGestures);(function(scope){var dispatcher=scope.dispatcher;var eventFactory=scope.eventFactory;var pointermap=new scope.PointerMap;var tap={events:["down","up"],exposes:["tap"],down:function(inEvent){if(inEvent.isPrimary&&!inEvent.tapPrevented){pointermap.set(inEvent.pointerId,{target:inEvent.target,buttons:inEvent.buttons,x:inEvent.clientX,y:inEvent.clientY})}},shouldTap:function(e,downState){var tap=true;if(e.pointerType==="mouse"){tap=e.buttons^1&&downState.buttons&1}return tap&&!e.tapPrevented},up:function(inEvent){var start=pointermap.get(inEvent.pointerId);if(start&&this.shouldTap(inEvent,start)){var t=scope.targetFinding.LCA(start.target,inEvent.relatedTarget);if(t){var e=eventFactory.makeGestureEvent("tap",{bubbles:true,cancelable:true,x:inEvent.clientX,y:inEvent.clientY,detail:inEvent.detail,pointerType:inEvent.pointerType,pointerId:inEvent.pointerId,altKey:inEvent.altKey,ctrlKey:inEvent.ctrlKey,metaKey:inEvent.metaKey,shiftKey:inEvent.shiftKey,_source:"tap"});t.dispatchEvent(e)}}pointermap.delete(inEvent.pointerId)}};eventFactory.preventTap=function(e){return function(){e.tapPrevented=true;pointermap.delete(e.pointerId)}};dispatcher.registerGesture("tap",tap)})(window.PolymerGestures);(function(scope){var dispatcher=scope.dispatcher;var eventFactory=scope.eventFactory;var pointermap=new scope.PointerMap;var RAD_TO_DEG=180/Math.PI;var pinch={events:["down","up","move","cancel"],exposes:["pinch","rotate"],defaultActions:{pinch:"none",rotate:"none"},reference:{},down:function(inEvent){pointermap.set(inEvent.pointerId,inEvent);if(pointermap.pointers()==2){var points=this.calcChord();var angle=this.calcAngle(points);this.reference={angle:angle,diameter:points.diameter,target:scope.targetFinding.LCA(points.a.target,points.b.target)}}},up:function(inEvent){var p=pointermap.get(inEvent.pointerId);if(p){pointermap.delete(inEvent.pointerId)}},move:function(inEvent){if(pointermap.has(inEvent.pointerId)){pointermap.set(inEvent.pointerId,inEvent);if(pointermap.pointers()>1){this.calcPinchRotate()}}},cancel:function(inEvent){this.up(inEvent)},firePinch:function(diameter,points){var zoom=diameter/this.reference.diameter;var e=eventFactory.makeGestureEvent("pinch",{bubbles:true,cancelable:true,scale:zoom,centerX:points.center.x,centerY:points.center.y,_source:"pinch"});this.reference.target.dispatchEvent(e)},fireRotate:function(angle,points){var diff=Math.round((angle-this.reference.angle)%360);var e=eventFactory.makeGestureEvent("rotate",{bubbles:true,cancelable:true,angle:diff,centerX:points.center.x,centerY:points.center.y,_source:"pinch"});
this.reference.target.dispatchEvent(e)},calcPinchRotate:function(){var points=this.calcChord();var diameter=points.diameter;var angle=this.calcAngle(points);if(diameter!=this.reference.diameter){this.firePinch(diameter,points)}if(angle!=this.reference.angle){this.fireRotate(angle,points)}},calcChord:function(){var pointers=[];pointermap.forEach(function(p){pointers.push(p)});var dist=0;var points={a:pointers[0],b:pointers[1]};var x,y,d;for(var i=0;idist){dist=d;points={a:a,b:b}}}}x=Math.abs(points.a.clientX+points.b.clientX)/2;y=Math.abs(points.a.clientY+points.b.clientY)/2;points.center={x:x,y:y};points.diameter=dist;return points},calcAngle:function(points){var x=points.a.clientX-points.b.clientX;var y=points.a.clientY-points.b.clientY;return(360+Math.atan2(y,x)*RAD_TO_DEG)%360}};dispatcher.registerGesture("pinch",pinch)})(window.PolymerGestures);(function(global){"use strict";var Token,TokenName,Syntax,Messages,source,index,length,delegate,lookahead,state;Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8};TokenName={};TokenName[Token.BooleanLiteral]="Boolean";TokenName[Token.EOF]="";TokenName[Token.Identifier]="Identifier";TokenName[Token.Keyword]="Keyword";TokenName[Token.NullLiteral]="Null";TokenName[Token.NumericLiteral]="Numeric";TokenName[Token.Punctuator]="Punctuator";TokenName[Token.StringLiteral]="String";Syntax={ArrayExpression:"ArrayExpression",BinaryExpression:"BinaryExpression",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",Identifier:"Identifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ThisExpression:"ThisExpression",UnaryExpression:"UnaryExpression"};Messages={UnexpectedToken:"Unexpected token %0",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared"};function assert(condition,message){if(!condition){throw new Error("ASSERT: "+message)}}function isDecimalDigit(ch){return ch>=48&&ch<=57}function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&" ".indexOf(String.fromCharCode(ch))>0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122}function isIdentifierPart(ch){return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57}function isKeyword(id){return id==="this"}function skipWhitespace(){while(index=0){index+=2;return{type:Token.Punctuator,value:ch1+ch2,range:[start,index]}}if("<>=!+-*%&|^/".indexOf(ch1)>=0){++index;return{type:Token.Punctuator,value:ch1,range:[start,index]}}throwError({},Messages.UnexpectedToken,"ILLEGAL")}function scanNumericLiteral(){var number,start,ch;ch=source[index];assert(isDecimalDigit(ch.charCodeAt(0))||ch===".","Numeric literal must start with a decimal digit or a decimal point");start=index;number="";if(ch!=="."){number=source[index++];ch=source[index];if(number==="0"){if(ch&&isDecimalDigit(ch.charCodeAt(0))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}}while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="."){number+=source[index++];while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}ch=source[index]}if(ch==="e"||ch==="E"){number+=source[index++];ch=source[index];if(ch==="+"||ch==="-"){number+=source[index++]}if(isDecimalDigit(source.charCodeAt(index))){while(isDecimalDigit(source.charCodeAt(index))){number+=source[index++]}}else{throwError({},Messages.UnexpectedToken,"ILLEGAL")}}if(isIdentifierStart(source.charCodeAt(index))){throwError({},Messages.UnexpectedToken,"ILLEGAL")}return{type:Token.NumericLiteral,value:parseFloat(number),range:[start,index]}}function scanStringLiteral(){var str="",quote,start,ch,octal=false;quote=source[index];assert(quote==="'"||quote==='"',"String literal must starts with a quote");start=index;++index;while(index=length){return{type:Token.EOF,range:[index,index]}}ch=source.charCodeAt(index);if(ch===40||ch===41||ch===58){return scanPunctuator()}if(ch===39||ch===34){return scanStringLiteral()}if(isIdentifierStart(ch)){return scanIdentifier()}if(ch===46){if(isDecimalDigit(source.charCodeAt(index+1))){return scanNumericLiteral()}return scanPunctuator()}if(isDecimalDigit(ch)){return scanNumericLiteral()}return scanPunctuator()}function lex(){var token;token=lookahead;index=token.range[1];lookahead=advance();index=token.range[1];return token}function peek(){var pos;pos=index;lookahead=advance();index=pos}function throwError(token,messageFormat){var error,args=Array.prototype.slice.call(arguments,2),msg=messageFormat.replace(/%(\d)/g,function(whole,index){assert(index":case"<=":case">=":case"instanceof":prec=7;break;case"in":prec=7;break;case"+":case"-":prec=9;break;case"*":case"/":case"%":prec=11;break;default:break}return prec}function parseBinaryExpression(){var expr,token,prec,stack,right,operator,left,i;left=parseUnaryExpression();token=lookahead;prec=binaryPrecedence(token);if(prec===0){return left}token.prec=prec;lex();right=parseUnaryExpression();stack=[left,token,right];while((prec=binaryPrecedence(lookahead))>0){while(stack.length>2&&prec<=stack[stack.length-2].prec){right=stack.pop();operator=stack.pop().value;left=stack.pop();expr=delegate.createBinaryExpression(operator,left,right);stack.push(expr)}token=lex();token.prec=prec;stack.push(token);expr=parseUnaryExpression();stack.push(expr)}i=stack.length-1;expr=stack[i];while(i>1){expr=delegate.createBinaryExpression(stack[i-1].value,stack[i-2],expr);i-=2}return expr}function parseConditionalExpression(){var expr,consequent,alternate;expr=parseBinaryExpression();if(match("?")){lex();consequent=parseConditionalExpression();expect(":");alternate=parseConditionalExpression();expr=delegate.createConditionalExpression(expr,consequent,alternate)}return expr}var parseExpression=parseConditionalExpression;function parseFilter(){var identifier,args;identifier=lex();if(identifier.type!==Token.Identifier){throwUnexpected(identifier)}args=match("(")?parseArguments():[];return delegate.createFilter(identifier.value,args)}function parseFilters(){while(match("|")){lex();parseFilter()}}function parseTopLevel(){skipWhitespace();peek();var expr=parseExpression();if(expr){if(lookahead.value===","||lookahead.value=="in"&&expr.type===Syntax.Identifier){parseInExpression(expr)}else{parseFilters();if(lookahead.value==="as"){parseAsExpression(expr)}else{delegate.createTopLevel(expr)}}}if(lookahead.type!==Token.EOF){throwUnexpected(lookahead)}}function parseAsExpression(expr){lex();var identifier=lex().value;delegate.createAsExpression(expr,identifier)}function parseInExpression(identifier){var indexName;if(lookahead.value===","){lex();if(lookahead.type!==Token.Identifier)throwUnexpected(lookahead);indexName=lex().value}lex();var expr=parseExpression();parseFilters();delegate.createInExpression(identifier.name,indexName,expr)}function parse(code,inDelegate){delegate=inDelegate;source=code;index=0;length=source.length;lookahead=null;state={labelSet:{}};return parseTopLevel()}global.esprima={parse:parse}})(this);(function(global){"use strict";function prepareBinding(expressionText,name,node,filterRegistry){var expression;try{expression=getExpression(expressionText);if(expression.scopeIdent&&(node.nodeType!==Node.ELEMENT_NODE||node.tagName!=="TEMPLATE"||name!=="bind"&&name!=="repeat")){throw Error("as and in can only be used within ")}}catch(ex){console.error("Invalid expression syntax: "+expressionText,ex);return}return function(model,node,oneTime){var binding=expression.getBinding(model,filterRegistry,oneTime);if(expression.scopeIdent&&binding){node.polymerExpressionScopeIdent_=expression.scopeIdent;if(expression.indexIdent)node.polymerExpressionIndexIdent_=expression.indexIdent}return binding}}var expressionParseCache=Object.create(null);function getExpression(expressionText){var expression=expressionParseCache[expressionText];if(!expression){var delegate=new ASTDelegate;esprima.parse(expressionText,delegate);expression=new Expression(delegate);expressionParseCache[expressionText]=expression}return expression}function Literal(value){this.value=value;this.valueFn_=undefined}Literal.prototype={valueFn:function(){if(!this.valueFn_){var value=this.value;this.valueFn_=function(){return value}}return this.valueFn_}};function IdentPath(name){this.name=name;this.path=Path.get(name)}IdentPath.prototype={valueFn:function(){if(!this.valueFn_){var name=this.name;var path=this.path;this.valueFn_=function(model,observer){if(observer)observer.addPath(model,path);return path.getValueFrom(model)}}return this.valueFn_},setValue:function(model,newValue){if(this.path.length==1);model=findScope(model,this.path[0]);return this.path.setValueFrom(model,newValue)}};function MemberExpression(object,property,accessor){this.computed=accessor=="[";this.dynamicDeps=typeof object=="function"||object.dynamicDeps||this.computed&&!(property instanceof Literal);this.simplePath=!this.dynamicDeps&&(property instanceof IdentPath||property instanceof Literal)&&(object instanceof MemberExpression||object instanceof IdentPath);this.object=this.simplePath?object:getFn(object);this.property=!this.computed||this.simplePath?property:getFn(property)}MemberExpression.prototype={get fullPath(){if(!this.fullPath_){var parts=this.object instanceof MemberExpression?this.object.fullPath.slice():[this.object.name];parts.push(this.property instanceof IdentPath?this.property.name:this.property.value);this.fullPath_=Path.get(parts)}return this.fullPath_},valueFn:function(){if(!this.valueFn_){var object=this.object;if(this.simplePath){var path=this.fullPath;this.valueFn_=function(model,observer){if(observer)observer.addPath(model,path);return path.getValueFrom(model)}}else if(!this.computed){var path=Path.get(this.property.name);this.valueFn_=function(model,observer,filterRegistry){var context=object(model,observer,filterRegistry);if(observer)observer.addPath(context,path);return path.getValueFrom(context)}}else{var property=this.property;this.valueFn_=function(model,observer,filterRegistry){var context=object(model,observer,filterRegistry);var propName=property(model,observer,filterRegistry);if(observer)observer.addPath(context,[propName]);return context?context[propName]:undefined}}}return this.valueFn_},setValue:function(model,newValue){if(this.simplePath){this.fullPath.setValueFrom(model,newValue);return newValue}var object=this.object(model);var propName=this.property instanceof IdentPath?this.property.name:this.property(model);return object[propName]=newValue}};function Filter(name,args){this.name=name;this.args=[];for(var i=0;i":function(l,r){return l>r},"<=":function(l,r){return l<=r},">=":function(l,r){return l>=r},"==":function(l,r){return l==r},"!=":function(l,r){return l!=r},"===":function(l,r){return l===r},"!==":function(l,r){return l!==r},"&&":function(l,r){return l&&r},"||":function(l,r){return l||r}};function getFn(arg){return typeof arg=="function"?arg:arg.valueFn()}function ASTDelegate(){this.expression=null;this.filters=[];this.deps={};this.currentPath=undefined;this.scopeIdent=undefined;this.indexIdent=undefined;this.dynamicDeps=false}ASTDelegate.prototype={createUnaryExpression:function(op,argument){if(!unaryOperators[op])throw Error("Disallowed operator: "+op);argument=getFn(argument);return function(model,observer,filterRegistry){return unaryOperators[op](argument(model,observer,filterRegistry))}},createBinaryExpression:function(op,left,right){if(!binaryOperators[op])throw Error("Disallowed operator: "+op);left=getFn(left);right=getFn(right);switch(op){case"||":this.dynamicDeps=true;return function(model,observer,filterRegistry){return left(model,observer,filterRegistry)||right(model,observer,filterRegistry)};case"&&":this.dynamicDeps=true;return function(model,observer,filterRegistry){return left(model,observer,filterRegistry)&&right(model,observer,filterRegistry)}}return function(model,observer,filterRegistry){return binaryOperators[op](left(model,observer,filterRegistry),right(model,observer,filterRegistry))}},createConditionalExpression:function(test,consequent,alternate){test=getFn(test);consequent=getFn(consequent);alternate=getFn(alternate);this.dynamicDeps=true;return function(model,observer,filterRegistry){return test(model,observer,filterRegistry)?consequent(model,observer,filterRegistry):alternate(model,observer,filterRegistry)}},createIdentifier:function(name){var ident=new IdentPath(name);ident.type="Identifier";return ident},createMemberExpression:function(accessor,object,property){var ex=new MemberExpression(object,property,accessor);if(ex.dynamicDeps)this.dynamicDeps=true;return ex},createCallExpression:function(expression,args){if(!(expression instanceof IdentPath))throw Error("Only identifier function invocations are allowed");var filter=new Filter(expression.name,args);return function(model,observer,filterRegistry){return filter.transform(model,observer,filterRegistry,false)}},createLiteral:function(token){return new Literal(token.value)},createArrayExpression:function(elements){for(var i=0;i0){newValue=this.filters[count].transform(model,undefined,filterRegistry,true,[newValue])}if(this.expression.setValue)return this.expression.setValue(model,newValue)}};function convertStylePropertyName(name){return String(name).replace(/[A-Z]/g,function(c){return"-"+c.toLowerCase()})}var parentScopeName="@"+Math.random().toString(36).slice(2);function findScope(model,prop){while(model[parentScopeName]&&!Object.prototype.hasOwnProperty.call(model,prop)){model=model[parentScopeName]}return model}function isLiteralExpression(pathString){switch(pathString){case"":return false;case"false":case"null":case"true":return true}if(!isNaN(Number(pathString)))return true;return false}function PolymerExpressions(){}PolymerExpressions.prototype={styleObject:function(value){var parts=[];for(var key in value){parts.push(convertStylePropertyName(key)+": "+value[key])}return parts.join("; ")},tokenList:function(value){var tokens=[];for(var key in value){if(value[key])tokens.push(key)}return tokens.join(" ")},prepareInstancePositionChanged:function(template){var indexIdent=template.polymerExpressionIndexIdent_;if(!indexIdent)return;return function(templateInstance,index){templateInstance.model[indexIdent]=index}},prepareBinding:function(pathString,name,node){var path=Path.get(pathString);if(!isLiteralExpression(pathString)&&path.valid){if(path.length==1){return function(model,node,oneTime){if(oneTime)return path.getValueFrom(model);var scope=findScope(model,path[0]);return new PathObserver(scope,path)}}return}return prepareBinding(pathString,name,node,this)},prepareInstanceModel:function(template){var scopeName=template.polymerExpressionScopeIdent_;if(!scopeName)return;var parentScope=template.templateInstance?template.templateInstance.model:template.model;var indexName=template.polymerExpressionIndexIdent_;return function(model){return createScopeObject(parentScope,model,scopeName,indexName)}}};var createScopeObject="__proto__"in{}?function(parentScope,model,scopeName,indexName){var scope={};scope[scopeName]=model;scope[indexName]=undefined;scope[parentScopeName]=parentScope;scope.__proto__=parentScope;return scope}:function(parentScope,model,scopeName,indexName){var scope=Object.create(parentScope);Object.defineProperty(scope,scopeName,{value:model,configurable:true,writable:true});Object.defineProperty(scope,indexName,{value:undefined,configurable:true,writable:true});Object.defineProperty(scope,parentScopeName,{value:parentScope,configurable:true,writable:true});return scope};global.PolymerExpressions=PolymerExpressions;PolymerExpressions.getExpression=getExpression})(this);Polymer={version:"0.5.1"};if(typeof window.Polymer==="function"){Polymer={}}(function(scope){function withDependencies(task,depends){depends=depends||[];if(!depends.map){depends=[depends]}return task.apply(this,depends.map(marshal))}function module(name,dependsOrFactory,moduleFactory){var module;switch(arguments.length){case 0:return;case 1:module=null;break;case 2:module=dependsOrFactory.apply(this);break;default:module=withDependencies(moduleFactory,dependsOrFactory);break}modules[name]=module}function marshal(name){return modules[name]}var modules={};function using(depends,task){HTMLImports.whenImportsReady(function(){withDependencies(task,depends)})}scope.marshal=marshal;scope.modularize=module;scope.using=using})(window);if(!window.WebComponents){if(!window.WebComponents){WebComponents={flush:function(){},flags:{log:{}}};Platform=WebComponents;CustomElements={useNative:true,ready:true,takeRecords:function(){},"instanceof":function(obj,base){return obj instanceof base}};HTMLImports={useNative:true};addEventListener("HTMLImportsLoaded",function(){document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:true}))});ShadowDOMPolyfill=null;wrap=unwrap=function(n){return n}}window.HTMLImports=window.HTMLImports||{flags:{}};(function(scope){var IMPORT_LINK_TYPE="import";var useNative=Boolean(IMPORT_LINK_TYPE in document.createElement("link"));var hasShadowDOMPolyfill=Boolean(window.ShadowDOMPolyfill);var wrap=function(node){return hasShadowDOMPolyfill?ShadowDOMPolyfill.wrapIfNeeded(node):node};var rootDocument=wrap(document);var currentScriptDescriptor={get:function(){var script=HTMLImports.currentScript||document.currentScript||(document.readyState!=="complete"?document.scripts[document.scripts.length-1]:null);return wrap(script)},configurable:true};Object.defineProperty(document,"_currentScript",currentScriptDescriptor);Object.defineProperty(rootDocument,"_currentScript",currentScriptDescriptor);var isIE=/Trident/.test(navigator.userAgent);function whenReady(callback,doc){doc=doc||rootDocument;whenDocumentReady(function(){watchImportsLoad(callback,doc)},doc)}var requiredReadyState=isIE?"complete":"interactive";var READY_EVENT="readystatechange";function isDocumentReady(doc){return doc.readyState==="complete"||doc.readyState===requiredReadyState}function whenDocumentReady(callback,doc){if(!isDocumentReady(doc)){var checkReady=function(){if(doc.readyState==="complete"||doc.readyState===requiredReadyState){doc.removeEventListener(READY_EVENT,checkReady);whenDocumentReady(callback,doc)}};doc.addEventListener(READY_EVENT,checkReady)}else if(callback){callback()}}function markTargetLoaded(event){event.target.__loaded=true}function watchImportsLoad(callback,doc){var imports=doc.querySelectorAll("link[rel=import]");var loaded=0,l=imports.length;function checkDone(d){if(loaded==l&&callback){callback()}}function loadedImport(e){markTargetLoaded(e);loaded++;checkDone()}if(l){for(var i=0,imp;i>>0&&s!==""}function toNumber(s){return+s}function isObject(obj){return obj===Object(obj)}var numberIsNaN=global.Number.isNaN||function(value){return typeof value==="number"&&global.isNaN(value)};function areSameValue(left,right){if(left===right)return left!==0||1/left===1/right;
if(numberIsNaN(left)&&numberIsNaN(right))return true;return left!==left&&right!==right}var createObject="__proto__"in{}?function(obj){return obj}:function(obj){var proto=obj.__proto__;if(!proto)return obj;var newObject=Object.create(proto);Object.getOwnPropertyNames(obj).forEach(function(name){Object.defineProperty(newObject,name,Object.getOwnPropertyDescriptor(obj,name))});return newObject};var identStart="[$_a-zA-Z]";var identPart="[$_a-zA-Z0-9]";var identRegExp=new RegExp("^"+identStart+"+"+identPart+"*"+"$");function getPathCharType(char){if(char===undefined)return"eof";var code=char.charCodeAt(0);switch(code){case 91:case 93:case 46:case 34:case 39:case 48:return char;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}if(97<=code&&code<=122||65<=code&&code<=90)return"ident";if(49<=code&&code<=57)return"number";return"else"}var pathStateMachine={beforePath:{ws:["beforePath"],ident:["inIdent","append"],"[":["beforeElement"],eof:["afterPath"]},inPath:{ws:["inPath"],".":["beforeIdent"],"[":["beforeElement"],eof:["afterPath"]},beforeIdent:{ws:["beforeIdent"],ident:["inIdent","append"]},inIdent:{ident:["inIdent","append"],0:["inIdent","append"],number:["inIdent","append"],ws:["inPath","push"],".":["beforeIdent","push"],"[":["beforeElement","push"],eof:["afterPath","push"]},beforeElement:{ws:["beforeElement"],0:["afterZero","append"],number:["inIndex","append"],"'":["inSingleQuote","append",""],'"':["inDoubleQuote","append",""]},afterZero:{ws:["afterElement","push"],"]":["inPath","push"]},inIndex:{0:["inIndex","append"],number:["inIndex","append"],ws:["afterElement"],"]":["inPath","push"]},inSingleQuote:{"'":["afterElement"],eof:["error"],"else":["inSingleQuote","append"]},inDoubleQuote:{'"':["afterElement"],eof:["error"],"else":["inDoubleQuote","append"]},afterElement:{ws:["afterElement"],"]":["inPath","push"]}};function noop(){}function parsePath(path){var keys=[];var index=-1;var c,newChar,key,type,transition,action,typeMap,mode="beforePath";var actions={push:function(){if(key===undefined)return;keys.push(key);key=undefined},append:function(){if(key===undefined)key=newChar;else key+=newChar}};function maybeUnescapeQuote(){if(index>=path.length)return;var nextChar=path[index+1];if(mode=="inSingleQuote"&&nextChar=="'"||mode=="inDoubleQuote"&&nextChar=='"'){index++;newChar=nextChar;actions.append();return true}}while(mode){index++;c=path[index];if(c=="\\"&&maybeUnescapeQuote(mode))continue;type=getPathCharType(c);typeMap=pathStateMachine[mode];transition=typeMap[type]||typeMap["else"]||"error";if(transition=="error")return;mode=transition[0];action=actions[transition[1]]||noop;newChar=transition[2]===undefined?c:transition[2];action();if(mode==="afterPath"){return keys}}return}function isIdent(s){return identRegExp.test(s)}var constructorIsPrivate={};function Path(parts,privateToken){if(privateToken!==constructorIsPrivate)throw Error("Use Path.get to retrieve path objects");for(var i=0;i0}function objectIsEmpty(object){for(var prop in object)return false;return true}function diffIsEmpty(diff){return objectIsEmpty(diff.added)&&objectIsEmpty(diff.removed)&&objectIsEmpty(diff.changed)}function diffObjectFromOldObject(object,oldObject){var added={};var removed={};var changed={};for(var prop in oldObject){var newValue=object[prop];if(newValue!==undefined&&newValue===oldObject[prop])continue;if(!(prop in object)){removed[prop]=undefined;continue}if(newValue!==oldObject[prop])changed[prop]=newValue}for(var prop in object){if(prop in oldObject)continue;added[prop]=object[prop]}if(Array.isArray(object)&&object.length!==oldObject.length)changed.length=object.length;return{added:added,removed:removed,changed:changed}}var eomTasks=[];function runEOMTasks(){if(!eomTasks.length)return false;for(var i=0;i0){return}for(var i=0;i0||j>0){if(i==0){edits.push(EDIT_ADD);j--;continue}if(j==0){edits.push(EDIT_DELETE);i--;continue}var northWest=distances[i-1][j-1];var west=distances[i-1][j];var north=distances[i][j-1];var min;if(west=0){splices.splice(i,1);i--;insertionOffset-=current.addedCount-current.removed.length;splice.addedCount+=current.addedCount-intersectCount;var deleteCount=splice.removed.length+current.removed.length-intersectCount;if(!splice.addedCount&&!deleteCount){inserted=true}else{var removed=current.removed;if(splice.indexcurrent.index+current.addedCount){var append=splice.removed.slice(current.index+current.addedCount-splice.index);Array.prototype.push.apply(removed,append)}splice.removed=removed;if(current.index0){var attrib=attribs[count];if(templateAttributeDirectives[attrib.name]){if(attrib.name!=="template")template.setAttribute(attrib.name,attrib.value);el.removeAttribute(attrib.name)}}return template}function extractTemplateFromSVGTemplate(el){var template=el.ownerDocument.createElement("template");el.parentNode.insertBefore(template,el);var attribs=el.attributes;var count=attribs.length;while(count-->0){var attrib=attribs[count];template.setAttribute(attrib.name,attrib.value);el.removeAttribute(attrib.name)}el.parentNode.removeChild(el);return template}function liftNonNativeTemplateChildrenIntoContent(template,el,useRoot){var content=template.content;if(useRoot){content.appendChild(el);return}var child;while(child=el.firstChild){content.appendChild(child)}}var templateObserver;if(typeof MutationObserver=="function"){templateObserver=new MutationObserver(function(records){for(var i=0;i=0&&(startIndex<0||oneTimeStart32&&unicode<127&&[34,35,60,62,63,96].indexOf(unicode)==-1){return c}return encodeURIComponent(c)}function percentEscapeQuery(c){var unicode=c.charCodeAt(0);if(unicode>32&&unicode<127&&[34,35,60,62,96].indexOf(unicode)==-1){return c}return encodeURIComponent(c)}var EOF=undefined,ALPHA=/[a-zA-Z]/,ALPHANUMERIC=/[a-zA-Z0-9\+\-\.]/;function parse(input,stateOverride,base){function err(message){errors.push(message)}var state=stateOverride||"scheme start",cursor=0,buffer="",seenAt=false,seenBracket=false,errors=[];loop:while((input[cursor-1]!=EOF||cursor==0)&&!this._isInvalid){var c=input[cursor];switch(state){case"scheme start":if(c&&ALPHA.test(c)){buffer+=c.toLowerCase();state="scheme"}else if(!stateOverride){buffer="";state="no scheme";continue}else{err("Invalid scheme.");break loop}break;case"scheme":if(c&&ALPHANUMERIC.test(c)){buffer+=c.toLowerCase()}else if(":"==c){this._scheme=buffer;buffer="";if(stateOverride){break loop}if(isRelativeScheme(this._scheme)){this._isRelative=true}if("file"==this._scheme){state="relative"}else if(this._isRelative&&base&&base._scheme==this._scheme){state="relative or authority"}else if(this._isRelative){state="authority first slash"}else{state="scheme data"}}else if(!stateOverride){buffer="";cursor=0;state="no scheme";continue}else if(EOF==c){break loop}else{err("Code point not allowed in scheme: "+c);break loop}break;case"scheme data":if("?"==c){query="?";state="query"}else if("#"==c){this._fragment="#";state="fragment"}else{if(EOF!=c&&" "!=c&&"\n"!=c&&"\r"!=c){this._schemeData+=percentEscape(c)}}break;case"no scheme":if(!base||!isRelativeScheme(base._scheme)){err("Missing scheme.");invalid.call(this)}else{state="relative";continue}break;case"relative or authority":if("/"==c&&"/"==input[cursor+1]){state="authority ignore slashes"}else{err("Expected /, got: "+c);state="relative";continue}break;case"relative":this._isRelative=true;if("file"!=this._scheme)this._scheme=base._scheme;if(EOF==c){this._host=base._host;this._port=base._port;this._path=base._path.slice();this._query=base._query;break loop}else if("/"==c||"\\"==c){if("\\"==c)err("\\ is an invalid code point.");state="relative slash"}else if("?"==c){this._host=base._host;this._port=base._port;this._path=base._path.slice();this._query="?";state="query"}else if("#"==c){this._host=base._host;this._port=base._port;this._path=base._path.slice();this._query=base._query;this._fragment="#";state="fragment"}else{var nextC=input[cursor+1];var nextNextC=input[cursor+2];if("file"!=this._scheme||!ALPHA.test(c)||nextC!=":"&&nextC!="|"||EOF!=nextNextC&&"/"!=nextNextC&&"\\"!=nextNextC&&"?"!=nextNextC&&"#"!=nextNextC){this._host=base._host;this._port=base._port;this._path=base._path.slice();this._path.pop()}state="relative path";continue}break;case"relative slash":if("/"==c||"\\"==c){if("\\"==c){err("\\ is an invalid code point.")}if("file"==this._scheme){state="file host"}else{state="authority ignore slashes"}}else{if("file"!=this._scheme){this._host=base._host;this._port=base._port}state="relative path";continue}break;case"authority first slash":if("/"==c){state="authority second slash"}else{err("Expected '/', got: "+c);state="authority ignore slashes";continue}break;case"authority second slash":state="authority ignore slashes";if("/"!=c){err("Expected '/', got: "+c);continue}break;case"authority ignore slashes":if("/"!=c&&"\\"!=c){state="authority";continue}else{err("Expected authority, got: "+c)}break;case"authority":if("@"==c){if(seenAt){err("@ already seen.");buffer+="%40"}seenAt=true;for(var i=0;i0&&console.log("[%s] addHostListeners:",this.localName,events);for(var type in events){var methodName=events[type];PolymerGestures.addEventListener(this,type,this.element.getEventHandler(this,this,methodName))}},dispatchMethod:function(obj,method,args){if(obj){log.events&&console.group("[%s] dispatch [%s]",obj.localName,method);var fn=typeof method==="function"?method:obj[method];if(fn){fn[args?"apply":"call"](obj,args)}log.events&&console.groupEnd();Polymer.flush()}}};scope.api.instance.events=events;scope.addEventListener=function(node,eventType,handlerFn,capture){PolymerGestures.addEventListener(wrap(node),eventType,handlerFn,capture)};scope.removeEventListener=function(node,eventType,handlerFn,capture){PolymerGestures.removeEventListener(wrap(node),eventType,handlerFn,capture)}})(Polymer);(function(scope){var attributes={copyInstanceAttributes:function(){var a$=this._instanceAttributes;for(var k in a$){if(!this.hasAttribute(k)){this.setAttribute(k,a$[k])}}},takeAttributes:function(){if(this._publishLC){for(var i=0,a$=this.attributes,l=a$.length,a;(a=a$[i])&&i=0){return}var currentValue=this[name];var value=this.deserializeValue(value,currentValue);if(value!==currentValue){this[name]=value}}},propertyForAttribute:function(name){var match=this._publishLC&&this._publishLC[name];return match},deserializeValue:function(stringValue,currentValue){return scope.deserializeValue(stringValue,currentValue)},serializeValue:function(value,inferredType){if(inferredType==="boolean"){return value?"":undefined}else if(inferredType!=="object"&&inferredType!=="function"&&value!==undefined){return value}},reflectPropertyToAttribute:function(name){var inferredType=typeof this[name];var serializedValue=this.serializeValue(this[name],inferredType);if(serializedValue!==undefined){this.setAttribute(name,serializedValue)}else if(inferredType==="boolean"){this.removeAttribute(name)}}};scope.api.instance.attributes=attributes})(Polymer);(function(scope){var log=window.WebComponents?WebComponents.flags.log:{};var OBSERVE_SUFFIX="Changed";var empty=[];var updateRecord={object:undefined,type:"update",name:undefined,oldValue:undefined};var numberIsNaN=Number.isNaN||function(value){return typeof value==="number"&&isNaN(value)};function areSameValue(left,right){if(left===right)return left!==0||1/left===1/right;if(numberIsNaN(left)&&numberIsNaN(right))return true;return left!==left&&right!==right}function resolveBindingValue(oldValue,value){if(value===undefined&&oldValue===null){return value}return value===null||value===undefined?oldValue:value}var properties={createPropertyObserver:function(){var n$=this._observeNames;if(n$&&n$.length){var o=this._propertyObserver=new CompoundObserver(true);this.registerObserver(o);for(var i=0,l=n$.length,n;i=0&&document.contains(element)){i+=HTMLImports.useNative||HTMLImports.ready?importQueue.length:1e9}return i},go:function(element){var readied=this.remove(element);if(readied){element.__queue.flushable=true;this.addToFlushQueue(readied);this.check()}},remove:function(element){var i=this.indexOf(element);if(i!==0){return}return queueForElement(element).shift()},check:function(){var element=this.nextElement();if(element){element.__queue.check.call(element)}if(this.canReady()){this.ready();return true}},nextElement:function(){return nextQueued()},canReady:function(){return!this.waitToReady&&this.isEmpty()},isEmpty:function(){for(var i=0,l=elements.length,e;i=0}whenReady(function(){document.body.removeAttribute("unresolved");document.dispatchEvent(new CustomEvent("polymer-ready",{bubbles:true}))});document.registerElement("polymer-element",{prototype:prototype})})(Polymer);(function(scope){var whenReady=scope.whenReady;function importElements(node,callback){if(node){document.head.appendChild(node);whenReady(callback)}else if(callback){callback()}}function _import(urls,callback){if(urls&&urls.length){var frag=document.createDocumentFragment();for(var i=0,l=urls.length,url,link;ia||a>1||0>c||c>1?y:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<.001)return f(b,d,i);e>j?g=i:h=i}}}function e(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function f(a){var b=w.exec(a);if(b)return d.apply(this,b.slice(1).map(Number));var c=x.exec(a);if(c)return e(Number(c[1]),{start:r,middle:s,end:t}[c[2]]);var f=u[a];return f?f:y}function g(a){return Math.abs(h(a)/a.playbackRate)}function h(a){return a.duration*a.iterations}function i(a,b,c){return null==b?z:b=c.delay+a?B:C}function j(a,b,c,d,e){switch(d){case A:return"backwards"==b||"both"==b?0:null;case C:return c-e;case B:return"forwards"==b||"both"==b?a:null;case z:return null}}function k(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function l(a,b,c,d,e){return 1/0===c||c===-1/0||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function m(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function n(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d.easing(h)}function o(a,b,c){var d=i(a,b,c),e=j(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===A?0:1;var f=c.iterationStart*c.duration,g=k(a,e,f,c),o=l(c.duration,h(c),g,f,c),p=m(c.duration,o,g,c);return n(p,c.duration,o,c)/c.duration}var p="backwards|forwards|both".split("|"),q="reverse|alternate|alternate-reverse".split("|"),r=1,s=.5,t=0,u={ease:d(.25,.1,.25,1),"ease-in":d(.42,0,1,1),"ease-out":d(0,0,.58,1),"ease-in-out":d(.42,0,.58,1),"step-start":e(1,r),"step-middle":e(1,s),"step-end":e(1,t)},v="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",w=new RegExp("cubic-bezier\\("+v+","+v+","+v+","+v+"\\)"),x=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,y=function(a){return a},z=0,A=1,B=2,C=3;a.makeTiming=b,a.normalizeTimingInput=c,a.calculateActiveDuration=g,a.calculateTimeFraction=o,a.calculatePhase=i,a.toTimingFunction=f}(c,f),function(a){function b(a,b){return a in h?h[a][b]||b:b}function c(a,c,d){var g=e[a];if(g){f.style[a]=c;for(var h in g){var i=g[h],j=f.style[i];d[i]=b(i,j)}}else d[a]=b(a,c)}function d(b){function d(){var a=e.length;null==e[a-1].offset&&(e[a-1].offset=1),a>1&&null==e[0].offset&&(e[0].offset=0);for(var b=0,c=e[0].offset,d=1;a>d;d++){var f=e[d].offset;if(null!=f){for(var g=1;d-b>g;g++)e[b+g].offset=c+(f-c)*g/(d-b);b=d,c=f}}}if(!Array.isArray(b)&&null!==b)throw new TypeError("Keyframe effect must be null or an array of keyframes");if(null==b)return[];for(var e=b.map(function(b){var d={};for(var e in b){var f=b[e];if("offset"==e){if(null!=f&&(f=Number(f),!isFinite(f)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==e)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};f="easing"==e?a.toTimingFunction(f):""+f}c(e,f,d)}return void 0==d.offset&&(d.offset=null),void 0==d.easing&&(d.easing=a.toTimingFunction("linear")),d}),f=!0,g=-1/0,h=0;hi)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return e=e.filter(function(a){return a.offset>=0&&a.offset<=1}),f||d(),e}var e={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},f=document.createElementNS("http://www.w3.org/1999/xhtml","div"),g={thin:"1px",medium:"3px",thick:"5px"},h={borderBottomWidth:g,borderLeftWidth:g,borderRightWidth:g,borderTopWidth:g,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:g,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.normalizeKeyframes=d}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+auxVerb+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b){b.AnimationNode=function(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateTimeFraction(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d._isCurrent=function(d){var e=a.calculatePhase(c,d,b);return e===PhaseActive||e===PhaseBefore},d}}(c,d),function(a,b){function c(a){for(var b={},c=0;c=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a){function b(a,b,c){e[c]=e[c]||[],e[c].push([a,b])}function c(a,c,d){for(var e=0;ed?a:c;if(a.length==c.length){for(var e=[],f=0;f0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(b){b=+b,isNaN(b)||(a.restart(),this.paused||null==this._startTime||(this._startTime=this._timeline.currentTime-b/this._playbackRate),this._currentTimePending=!1,this._currentTime!=b&&(this._tickCurrentTime(b,!0),a.invalidateEffects()))},get startTime(){return this._startTime},set startTime(b){b=+b,isNaN(b)||this.paused||this._idle||(this._startTime=b,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),a.invalidateEffects())},get playbackRate(){return this._playbackRate},get finished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._source._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this.paused&&0!=this.playbackRate||this._currentTimePending?"pending":this.paused?"paused":this.finished?"finished":"running"},play:function(){this.paused=!1,(this.finished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null,a.invalidateEffects()),this._finishedFlag=!1,a.restart(),this._idle=!1,this._ensureAlive()},pause:function(){this.finished||this.paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this.paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1)},cancel:function(){this._inEffect=!1,this._idle=!0,this.currentTime=0,this._startTime=null},reverse:function(){this._playbackRate*=-1,this._startTime=null,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){var b=this.finished;if((b||this._idle)&&!this._finishedFlag){var d=new c(this,this._currentTime,a),e=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){e.forEach(function(a){a.call(d.target,d)})},0)}this._finishedFlag=b},_tick:function(a){return this._idle||this.paused||(null==this._startTime?this.startTime=a-this._currentTime/this.playbackRate:this.finished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),this._currentTimePending=!1,this._fireEvents(a),!this._idle&&(this._inEffect||!this._finishedFlag)}}}(d,f),function(a,b){function c(a){var b=i;i=[],g(a),b.forEach(function(b){b[1](a)}),m&&g(a),f()}function d(a,b){return a._sequenceNumber-b._sequenceNumber}function e(){this._players=[],this.currentTime=window.performance&&performance.now?performance.now():0}function f(){n.forEach(function(a){a()})}function g(a){l=!1;var c=b.timeline;c.currentTime=a,c._players.sort(d),k=!1;var e=c._players;c._players=[];var f=[],g=[];e=e.filter(function(b){return b._inTimeline=b._tick(a),b._inEffect?g.push(b._source):f.push(b._source),b.finished||b.paused||b._idle||(k=!0),b._inTimeline}),n.length=0,n.push.apply(n,f),n.push.apply(n,g),c._players.push.apply(c._players,e),m=!1,k&&requestAnimationFrame(function(){})}var h=window.requestAnimationFrame,i=[],j=0;window.requestAnimationFrame=function(a){var b=j++;return 0==i.length&&h(c),i.push([b,a]),b},window.cancelAnimationFrame=function(a){i.forEach(function(b){b[0]==a&&(b[1]=function(){})})},e.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Player(c);return d._idle=!1,d._timeline=this,this._players.push(d),b.restart(),b.invalidateEffects(),d}};var k=!1,l=!1;b.restart=function(){return k||(k=!0,requestAnimationFrame(function(){}),l=!0),l};var m=!1;b.invalidateEffects=function(){m=!0};var n=[],o=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){return m&&g(p.currentTime),f(),o.apply(this,arguments)}});var p=new e;b.timeline=p}(c,d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;ek;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,b,["visibility"])}(d),function(a){function b(a){a=a.trim(),e.fillStyle="#000",e.fillStyle=a;var b=e.fillStyle;if(e.fillStyle="#fff",e.fillStyle=a,b==e.fillStyle){e.fillRect(0,0,1,1);var c=e.getImageData(0,0,1,1).data;e.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function c(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=d.height=1;var e=d.getContext("2d");a.addPropertiesHandler(b,c,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,b),a.mergeColors=c}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a){function b(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function c(c){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,b,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],c);return d&&4==d[0].length?d[0]:void 0}function d(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function e(a){return"rect("+a+")"}var f=a.mergeWrappedNestedRepeated.bind(null,e,d,", ");a.parseBox=c,a.mergeBoxes=f,a.addPropertiesHandler(c,f,["clip"])}(d,f),function(a){function b(a){return function(b){var c=0;return a.map(function(a){return a===j?b[c++]:a})}}function c(a){return a}function d(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=m[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length=this._childPlayers.length?(d=window.document.timeline.play(e),this._childPlayers.push(d)):d=this._childPlayers[b],e.player=this.source.player,d.startTime!=this.startTime+a&&(null===this.startTime?(d.currentTime=this.source.player.currentTime-a,d._startTime=null):d.startTime=this.startTime+a,d._updateChildren()),-1==this.playbackRate&&this.currentTimeb-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function k(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function l(){}function m(a,b){b!==!1&&H(a),p(this,a),this._d=new Date(+a._d),uc===!1&&(uc=!0,vb.updateOffset(this),uc=!1)}function n(a){var b=A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=vb.localeData(),this._bubble()}function o(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function p(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Kb.length>0)for(c in Kb)d=Kb[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthd;d++)(c&&a[d]!==b[d]||!c&&C(a[d])!==C(b[d]))&&g++;return g+f}function z(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=lc[a]||mc[b]||b}return a}function A(a){var b,d,e={};for(d in a)c(a,d)&&(b=z(d),b&&(e[b]=a[d]));return e}function B(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}vb[b]=function(e,f){var g,h,i=vb._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=vb().utc().set(d,a);return i.call(vb._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function C(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function D(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function E(a,b,c){return jb(vb([a,11,31+b-c]),b,c).week}function F(a){return G(a)?366:365}function G(a){return a%4===0&&a%100!==0||a%400===0}function H(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Db]<0||a._a[Db]>11?Db:a._a[Eb]<1||a._a[Eb]>D(a._a[Cb],a._a[Db])?Eb:a._a[Fb]<0||a._a[Fb]>24||24===a._a[Fb]&&(0!==a._a[Gb]||0!==a._a[Hb]||0!==a._a[Ib])?Fb:a._a[Gb]<0||a._a[Gb]>59?Gb:a._a[Hb]<0||a._a[Hb]>59?Hb:a._a[Ib]<0||a._a[Ib]>999?Ib:-1,a._pf._overflowDayOfYear&&(Cb>b||b>Eb)&&(b=Eb),a._pf.overflow=b)}function I(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function J(a){return a?a.toLowerCase().replace("_","-"):a}function K(a){for(var b,c,d,e,f=0;f0;){if(d=L(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&y(e,c,!0)>=b-1)break;b--}f++}return null}function L(a){var b=null;if(!Jb[a]&&Lb)try{b=vb.locale(),require("./locale/"+a),vb.locale(b)}catch(c){}return Jb[a]}function M(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(vb.isMoment(a)||x(a)?+a:+vb(a))-+c,c._d.setTime(+c._d+d),vb.updateOffset(c,!1),c):vb(a).local()}function N(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function O(a){var b,c,d=a.match(Pb);for(b=0,c=d.length;c>b;b++)d[b]=rc[d[b]]?rc[d[b]]:N(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function P(a,b){return a.isValid()?(b=Q(b,a.localeData()),nc[b]||(nc[b]=O(b)),nc[b](a)):a.localeData().invalidDate()}function Q(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Qb.lastIndex=0;d>=0&&Qb.test(a);)a=a.replace(Qb,c),Qb.lastIndex=0,d-=1;return a}function R(a,b){var c,d=b._strict;switch(a){case"Q":return _b;case"DDDD":return bc;case"YYYY":case"GGGG":case"gggg":return d?cc:Tb;case"Y":case"G":case"g":return ec;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?dc:Ub;case"S":if(d)return _b;case"SS":if(d)return ac;case"SSS":if(d)return bc;case"DDD":return Sb;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Wb;case"a":case"A":return b._locale._meridiemParse;case"x":return Zb;case"X":return $b;case"Z":case"ZZ":return Xb;case"T":return Yb;case"SSSS":return Vb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?ac:Rb;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Rb;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp($(Z(a.replace("\\","")),"i"))}}function S(a){a=a||"";var b=a.match(Xb)||[],c=b[b.length-1]||[],d=(c+"").match(jc)||["-",0,0],e=+(60*d[1])+C(d[2]);return"+"===d[0]?e:-e}function T(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Db]=3*(C(b)-1));break;case"M":case"MM":null!=b&&(e[Db]=C(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Db]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Eb]=C(b));break;case"Do":null!=b&&(e[Eb]=C(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=C(b));break;case"YY":e[Cb]=vb.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Cb]=C(b);break;case"a":case"A":c._meridiem=b;break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Fb]=C(b);break;case"m":case"mm":e[Gb]=C(b);break;case"s":case"ss":e[Hb]=C(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ib]=C(1e3*("0."+b));break;case"x":c._d=new Date(C(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=S(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=C(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=vb.parseTwoDigitYear(b)}}function U(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Cb],jb(vb(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Cb],jb(vb(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=kb(d,e,f,h,g),a._a[Cb]=i.year,a._dayOfYear=i.dayOfYear}function V(a){var c,d,e,f,g=[];if(!a._d){for(e=X(a),a._w&&null==a._a[Eb]&&null==a._a[Db]&&U(a),a._dayOfYear&&(f=b(a._a[Cb],e[Cb]),a._dayOfYear>F(f)&&(a._pf._overflowDayOfYear=!0),d=fb(f,0,a._dayOfYear),a._a[Db]=d.getUTCMonth(),a._a[Eb]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Fb]&&0===a._a[Gb]&&0===a._a[Hb]&&0===a._a[Ib]&&(a._nextDay=!0,a._a[Fb]=0),a._d=(a._useUTC?fb:eb).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Fb]=24)}}function W(a){var b;a._d||(b=A(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],V(a))}function X(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function Y(b){if(b._f===vb.ISO_8601)return void ab(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Q(b._f,b._locale).match(Pb)||[],c=0;c0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),rc[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),T(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Fb]<=12&&(b._pf.bigHour=a),b._a[Fb]=k(b._locale,b._a[Fb],b._meridiem),V(b),H(b)}function Z(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function $(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(0/0));for(f=0;fg)&&(e=g,c=b));o(a,c||b)}function ab(a){var b,c,d=a._i,e=fc.exec(d);if(e){for(a._pf.iso=!0,b=0,c=hc.length;c>b;b++)if(hc[b][1].exec(d)){a._f=hc[b][0]+(e[6]||" ");break}for(b=0,c=ic.length;c>b;b++)if(ic[b][1].exec(d)){a._f+=ic[b][0];break}d.match(Xb)&&(a._f+="Z"),Y(a)}else a._isValid=!1}function bb(a){ab(a),a._isValid===!1&&(delete a._isValid,vb.createFromInputFallback(a))}function cb(a,b){var c,d=[];for(c=0;ca&&h.setFullYear(a),h}function fb(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function gb(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function hb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ib(a,b,c){var d=vb.duration(a).abs(),e=Ab(d.as("s")),f=Ab(d.as("m")),g=Ab(d.as("h")),h=Ab(d.as("d")),i=Ab(d.as("M")),j=Ab(d.as("y")),k=e0,k[4]=c,hb.apply({},k)}function jb(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=vb(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function kb(a,b,c,d,e){var f,g,h=fb(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:F(a-1)+g}}function lb(b){var c,d=b._i,e=b._f;return b._locale=b._locale||vb.localeData(b._l),null===d||e===a&&""===d?vb.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),vb.isMoment(d)?new m(d,!0):(e?w(e)?_(b):Y(b):db(b),c=new m(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function mb(a,b){var c,d;if(1===b.length&&w(b[0])&&(b=b[0]),!b.length)return vb();for(c=b[0],d=1;d=0?"+":"-";return b+r(Math.abs(a),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return C(this.milliseconds()/100)},SS:function(){return r(C(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+":"+r(C(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+r(C(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},sc={},tc=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],uc=!1;pc.length;)xb=pc.pop(),rc[xb+"o"]=i(rc[xb],xb);for(;qc.length;)xb=qc.pop(),rc[xb+xb]=h(rc[xb],2);rc.DDDD=h(rc.DDD,3),o(l.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=vb.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=vb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return jb(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),vb=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),lb(g)},vb.suppressDeprecationWarnings=!1,vb.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),vb.min=function(){var a=[].slice.call(arguments,0);return mb("isBefore",a)},vb.max=function(){var a=[].slice.call(arguments,0);return mb("isAfter",a)},vb.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),lb(g).utc()},vb.unix=function(a){return vb(1e3*a)},vb.duration=function(a,b){var d,e,f,g,h=a,i=null;return vb.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Nb.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:C(i[Eb])*d,h:C(i[Fb])*d,m:C(i[Gb])*d,s:C(i[Hb])*d,ms:C(i[Ib])*d}):(i=Ob.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(g=t(vb(h.from),vb(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new n(h),vb.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},vb.version=yb,vb.defaultFormat=gc,vb.ISO_8601=function(){},vb.momentProperties=Kb,vb.updateOffset=function(){},vb.relativeTimeThreshold=function(b,c){return oc[b]===a?!1:c===a?oc[b]:(oc[b]=c,!0)},vb.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return vb.locale(a,b)}),vb.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?vb.defineLocale(a,b):vb.localeData(a),c&&(vb.duration._locale=vb._locale=c)),vb._locale._abbr},vb.defineLocale=function(a,b){return null!==b?(b.abbr=a,Jb[a]||(Jb[a]=new l),Jb[a].set(b),vb.locale(a),Jb[a]):(delete Jb[a],null)},vb.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return vb.localeData(a)}),vb.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return vb._locale;if(!w(a)){if(b=L(a))return b;a=[a]}return K(a)},vb.isMoment=function(a){return a instanceof m||null!=a&&c(a,"_isAMomentObject")},vb.isDuration=function(a){return a instanceof n};for(xb=tc.length-1;xb>=0;--xb)B(tc[xb]);vb.normalizeUnits=function(a){return z(a)},vb.invalid=function(a){var b=vb.utc(0/0);return null!=a?o(b._pf,a):b._pf.userInvalidated=!0,b},vb.parseZone=function(){return vb.apply(null,arguments).parseZone()},vb.parseTwoDigitYear=function(a){return C(a)+(C(a)>68?1900:2e3)},vb.isDate=x,o(vb.fn=m.prototype,{clone:function(){return vb(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=vb(this).utc();return 00:!1},parsingFlags:function(){return o({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(a){var b=P(this,a||vb.defaultFormat);return this.localeData().postformat(b)},add:u(1,"add"),subtract:u(-1,"subtract"),diff:function(a,b,c){var d,e,f=M(a,this),g=6e4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=j(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:q(e)},from:function(a,b){return vb.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(vb(),a)},calendar:function(a){var b=a||vb(),c=M(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,vb(b)))},isLeapYear:function(){return G(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=gb(a,this.localeData()),this.add(a-b,"d")):b},month:qb("Month",!0),startOf:function(a){switch(a=z(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=z(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+this>+a):(c=vb.isMoment(a)?+a:+vb(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=vb.isMoment(a)?a:vb(a),+a>+this):(c=vb.isMoment(a)?+a:+vb(a),+this.clone().endOf(b)a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=vb.apply(null,arguments),a>this?this:a}),zone:f("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()
}),utcOffset:function(a,b){var c,d=this._offset||0;return null!=a?("string"==typeof a&&(a=S(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateUtcOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.add(c,"m"),d!==a&&(!b||this._changeInProgress?v(this,vb.duration(a-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,vb.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?d:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(S(this._i)),this},hasAlignedHourOffset:function(a){return a=a?vb(a).utcOffset():0,(this.utcOffset()-a)%60===0},daysInMonth:function(){return D(this.year(),this.month())},dayOfYear:function(a){var b=Ab((vb(this).startOf("day")-vb(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=jb(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=jb(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=jb(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return E(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return E(this.year(),a.dow,a.doy)},get:function(a){return a=z(a),this[a]()},set:function(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else a=z(a),"function"==typeof this[a]&&this[a](b);return this},locale:function(b){var c;return b===a?this._locale._abbr:(c=vb.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),vb.fn.millisecond=vb.fn.milliseconds=qb("Milliseconds",!1),vb.fn.second=vb.fn.seconds=qb("Seconds",!1),vb.fn.minute=vb.fn.minutes=qb("Minutes",!1),vb.fn.hour=vb.fn.hours=qb("Hours",!0),vb.fn.date=qb("Date",!0),vb.fn.dates=f("dates accessor is deprecated. Use date instead.",qb("Date",!0)),vb.fn.year=qb("FullYear",!0),vb.fn.years=f("years accessor is deprecated. Use year instead.",qb("FullYear",!0)),vb.fn.days=vb.fn.day,vb.fn.months=vb.fn.month,vb.fn.weeks=vb.fn.week,vb.fn.isoWeeks=vb.fn.isoWeek,vb.fn.quarters=vb.fn.quarter,vb.fn.toJSON=vb.fn.toISOString,vb.fn.isUTC=vb.fn.isUtc,o(vb.duration.fn=n.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=q(d/1e3),g.seconds=a%60,b=q(a/60),g.minutes=b%60,c=q(b/60),g.hours=c%24,e+=q(c/24),h=q(rb(e)),e-=q(sb(h)),f+=q(e/30),e%=30,h+=q(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return q(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12)},humanize:function(a){var b=ib(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=vb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=vb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=z(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=z(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*rb(b),"month"===a?c:c/12;switch(b=this._days+Math.round(sb(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:vb.fn.lang,locale:vb.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),vb.duration.fn.toString=vb.duration.fn.toISOString;for(xb in kc)c(kc,xb)&&tb(xb.toLowerCase());vb.duration.fn.asMilliseconds=function(){return this.as("ms")},vb.duration.fn.asSeconds=function(){return this.as("s")},vb.duration.fn.asMinutes=function(){return this.as("m")},vb.duration.fn.asHours=function(){return this.as("h")},vb.duration.fn.asDays=function(){return this.as("d")},vb.duration.fn.asWeeks=function(){return this.as("weeks")},vb.duration.fn.asMonths=function(){return this.as("M")},vb.duration.fn.asYears=function(){return this.as("y")},vb.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===C(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Lb?module.exports=vb:"function"==typeof define&&define.amd?(define(function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(zb.moment=wb),vb}),ub(!0)):ub()}).call(this);var nf=typeof nf!=="undefined"?nf:{};nf.utils=function(){var createRow=function(data,isSafeHTML,isHeader){var tr=document.createElement("tr");data.forEach(function(item){var nodeType=isHeader?"th":"td",td=document.createElement(nodeType);if(item instanceof HTMLElement||item instanceof DocumentFragment){td.appendChild(item)}else if(isSafeHTML){td.innerHTML=item}else{td.textContent=item}tr.appendChild(td)});return tr};var arrayToSet=function(array){var set=new Set;array.forEach(function(item){set.add(item)});return set};var setToArray=function(set){var array=[];set.forEach(function(item){array.push(item)});return array};var extend=function(objects){var extended={};var merge=function(obj){for(var prop in obj){if(Object.prototype.hasOwnProperty.call(obj,prop)){extended[prop]=obj[prop]}}};merge(arguments[0]);for(var i=1;i11){calendar.year+=Math.floor(Math.abs(calendar.month)/12);calendar.month-=12}return calendar},defaults={field:null,bound:undefined,position:"bottom left",format:null,inputFormats:null,defaultDate:null,setDefaultDate:false,firstDay:0,minDate:null,maxDate:null,yearRange:10,showWeekNumber:false,minYear:0,maxYear:9999,minMonth:undefined,maxMonth:undefined,isRTL:false,yearSuffix:"",showMonthAfterYear:false,numberOfMonths:1,showTime:true,showSeconds:false,use24hour:false,mainCalendar:"left",container:undefined,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],midnight:"Midnight",noon:"Noon"},onSelect:null,onOpen:null,onClose:null,onDraw:null},renderDayName=function(opts,day,abbr){day+=opts.firstDay;while(day>=7){day-=7}return abbr?opts.i18n.weekdaysShort[day]:opts.i18n.weekdays[day]},renderDay=function(d,m,y,isSelected,isToday,isDisabled,isEmpty){if(isEmpty){return' '}var arr=[];if(isDisabled){arr.push("is-disabled")}if(isToday){arr.push("is-today")}if(isSelected){arr.push("is-selected")}return''+''+d+" "+" "},renderWeek=function(d,m,y){var onejan=new Date(y,0,1),weekNum=Math.ceil(((new Date(y,m,d)-onejan)/864e5+onejan.getDay()+1)/7);return''+weekNum+" "},renderRow=function(days,isRTL){return""+(isRTL?days.reverse():days).join("")+" "},renderBody=function(rows){return""+rows.join("")+" "},renderHead=function(opts){var i,arr=[];if(opts.showWeekNumber){arr.push(" ")}for(i=0;i<7;i++){arr.push(''+renderDayName(opts,i,true)+" ")}return""+(opts.isRTL?arr.reverse():arr).join("")+" "},renderTitle=function(instance,c,year,month,refYear){var i,j,arr,opts=instance._o,isMinYear=year===opts.minYear,isMaxYear=year===opts.maxYear,html='',monthHtml,yearHtml,prev=true,next=true;for(arr=[],i=0;i<12;i++){arr.push('
opts.maxMonth?"disabled":"")+">"+opts.i18n.months[i]+" ")}monthHtml='
'+opts.i18n.months[month]+''+arr.join("")+"
";if(isArray(opts.yearRange)){i=opts.yearRange[0];j=opts.yearRange[1]+1}else{i=year-opts.yearRange;j=1+year+opts.yearRange}for(arr=[];i
=opts.minYear){arr.push('"+i+" ")}}yearHtml=''+year+opts.yearSuffix+''+arr.join("")+"
";if(opts.showMonthAfterYear){html+=yearHtml+monthHtml}else{html+=monthHtml+yearHtml}if(isMinYear&&(month===0||opts.minMonth>=month)){prev=false}if(isMaxYear&&(month===11||opts.maxMonth<=month)){next=false}if(c===0){html+=''+opts.i18n.previousMonth+" "}if(c===instance._o.numberOfMonths-1){html+=''+opts.i18n.nextMonth+" "}return html+=" "},renderTable=function(opts,data){return''+renderHead(opts)+renderBody(data)+"
"},renderTimePicker=function(num_options,selected_val,select_class,display_func){var to_return='';for(var i=0;i"+display_func(i)+""}to_return+=" ";return to_return},renderTime=function(hh,mm,ss,opts){var to_return=''+renderTimePicker(24,hh,"pika-select-hour",function(i){if(opts.use24hour){return i}else{var to_return=i%12+(i<12?" AM":" PM");if(to_return=="0 AM"){return opts.i18n.midnight}else if(to_return=="0 PM"){return opts.i18n.noon}else{return to_return}}})+": "+renderTimePicker(60,mm,"pika-select-minute",function(i){if(i<10)return"0"+i;return i});if(opts.showSeconds){to_return+=": "+renderTimePicker(60,ss,"pika-select-second",function(i){if(i<10)return"0"+i;return i})}return to_return+"
"},Pikaday=function(options){var self=this,opts=self.config(options);self._onMouseDown=function(e){if(!self._v){return}e=e||window.event;var target=e.target||e.srcElement;if(!target){return}if(!hasClass(target,"is-disabled")){if(hasClass(target,"pika-button")&&!hasClass(target,"is-empty")){var newDate=new Date(target.getAttribute("data-pika-year"),target.getAttribute("data-pika-month"),target.getAttribute("data-pika-day"));if(self._d&&opts.showTime){newDate.setHours(self._d.getHours());newDate.setMinutes(self._d.getMinutes())}self.setDate(newDate);if(opts.bound){sto(function(){self.hide();if(opts.field){opts.field.blur()}},100)}return}else if(hasClass(target,"pika-prev")){self.prevMonth()}else if(hasClass(target,"pika-next")){self.nextMonth()}}if(!hasClass(target,"pika-select")){if(e.preventDefault){e.preventDefault()}else{e.returnValue=false;return false}}else{self._c=true}};self._onChange=function(e){e=e||window.event;var target=e.target||e.srcElement;if(!target){return}if(hasClass(target,"pika-select-month")){self.gotoMonth(target.value)}else if(hasClass(target,"pika-select-year")){self.gotoYear(target.value)}else if(hasClass(target,"pika-select-hour")){self.setTime(target.value)}else if(hasClass(target,"pika-select-minute")){self.setTime(null,target.value)}else if(hasClass(target,"pika-select-second")){self.setTime(null,null,target.value)}};self._onInputChange=function(e){var date;if(e.firedBy===self){return}if(hasMoment){date=moment(opts.field.value,opts.inputFormats);date=date&&date.isValid()?date.toDate():null}else{date=new Date(Date.parse(opts.field.value))}self.setDate(isDate(date)?date:null);if(!self._v){self.show()}};self._onInputFocus=function(){self.show()};self._onInputClick=function(){self.show()};self._onInputBlur=function(){if(!self._c){self._b=sto(function(){self.hide()},50)}self._c=false};self._onClick=function(e){e=e||window.event;var target=e.target||e.srcElement,pEl=target;if(!target){return}if(!hasEventListeners&&hasClass(target,"pika-select")){if(!target.onchange){target.setAttribute("onchange","return;");addEvent(target,"change",self._onChange)}}do{if(hasClass(pEl,"pika-single")){return}}while(pEl=pEl.parentNode);if(self._v&&target!==opts.trigger){self.hide()}};self.el=document.createElement("div");self.el.className="pika-single"+(opts.isRTL?" is-rtl":"");addEvent(self.el,"mousedown",self._onMouseDown,true);addEvent(self.el,"change",self._onChange);if(opts.field){if(opts.container){opts.container.appendChild(self.el)}else if(opts.bound){document.body.appendChild(self.el)}else{opts.field.parentNode.insertBefore(self.el,opts.field.nextSibling)}addEvent(opts.field,"change",self._onInputChange);if(!opts.defaultDate){if(hasMoment&&opts.field.value){opts.defaultDate=moment(opts.field.value,opts.inputFormats).toDate()}else{opts.defaultDate=new Date(Date.parse(opts.field.value))}opts.setDefaultDate=true}}var defDate=opts.defaultDate;if(isDate(defDate)){if(opts.setDefaultDate){self.setDate(defDate,true)}else{self.gotoDate(defDate)}}else{self.gotoDate(new Date)}if(opts.bound){this.hide();self.el.className+=" is-bound";addEvent(opts.trigger,"click",self._onInputClick);addEvent(opts.trigger,"focus",self._onInputFocus);addEvent(opts.trigger,"blur",self._onInputBlur)}else{this.show()}};Pikaday.prototype={config:function(options){if(!this._o){this._o=extend({},defaults,true)}var opts=extend(this._o,options,true);opts.isRTL=!!opts.isRTL;opts.field=opts.field&&opts.field.nodeName?opts.field:null;opts.bound=!!(opts.bound!==undefined?opts.field&&opts.bound:opts.field);opts.trigger=opts.trigger&&opts.trigger.nodeName?opts.trigger:opts.field;var nom=parseInt(opts.numberOfMonths,10)||1;opts.numberOfMonths=nom>4?4:nom;if(!isDate(opts.minDate)){opts.minDate=false}if(!isDate(opts.maxDate)){opts.maxDate=false}if(opts.minDate&&opts.maxDate&&opts.maxDate100){opts.yearRange=100}}if(opts.format===null){opts.format="YYYY-MM-DD";if(opts.showTime){opts.format+=" HH:mm:ss"}}if(!opts.inputFormats){opts.inputFormats=opts.format}return opts},toString:function(format){return!isDate(this._d)?"":hasMoment?moment(this._d).format(format||this._o.format):this._o.showTime?this._d.toString():this._d.toDateString()},getMoment:function(){return hasMoment?moment(this._d):null},setMoment:function(date,preventOnSelect){if(hasMoment&&moment.isMoment(date)){this.setDate(date.toDate(),preventOnSelect)}},getDate:function(){return isDate(this._d)?new Date(this._d.getTime()):null},setTime:function(hours,minutes,seconds){if(!this._d){this._d=new Date;this._d.setHours(0,0,0,0)}if(hours){this._d.setHours(hours)}if(minutes){this._d.setMinutes(minutes)}if(seconds){this._d.setSeconds(seconds)}this.setDate(this._d)},setDate:function(date,preventOnSelect){if(!date){this._d=null;return this.draw()}if(typeof date==="string"){date=new Date(Date.parse(date))}if(!isDate(date)){return}var min=this._o.minDate,max=this._o.maxDate;if(isDate(min)&&datemax){date=max}this._d=new Date(date.getTime());if(this._o.showTime&&!this._o.showSeconds){this._d.setSeconds(0)}else if(!this._o.showTime){setToStartOfDay(this._d)}this.gotoDate(this._d);if(this._o.field){this._o.field.value=this.toString();fireEvent(this._o.field,"change",{firedBy:this})}if(!preventOnSelect&&typeof this._o.onSelect==="function"){this._o.onSelect.call(this,this.getDate())}},gotoDate:function(date){var newCalendar=true;if(!isDate(date)){return}if(this.calendars){var firstVisibleDate=new Date(this.calendars[0].year,this.calendars[0].month,1),lastVisibleDate=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),visibleDate=date.getTime();lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);lastVisibleDate.setDate(lastVisibleDate.getDate()-1);newCalendar=visibleDate=maxYear){this._y=maxYear;if(!isNaN(maxMonth)&&this._m>maxMonth){this._m=maxMonth}}for(var c=0;c'+renderTitle(this,c,this.calendars[c].year,this.calendars[c].month,this.calendars[0].year)+this.render(this.calendars[c].year,this.calendars[c].month)+"