From 521ed039be0eeadebe6ddff6b4c921df0f068fc6 Mon Sep 17 00:00:00 2001 From: Javi Velasco Date: Sun, 1 Nov 2015 22:46:46 +0100 Subject: [PATCH] Updates --- docs.js | 103 +++++++++++++++++++++++++++-------------------------- index.html | 4 +-- 2 files changed, 54 insertions(+), 53 deletions(-) diff --git a/docs.js b/docs.js index bd78f45a..600c1a0f 100644 --- a/docs.js +++ b/docs.js @@ -1,6 +1,6 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(170)},function(e,t,n){"use strict";e.exports=n(40)},function(e,t,n){"use strict";var r=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[c++]}))}throw l.framesToPop=1,l}};e.exports=r},function(e,t){"use strict";function n(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,i=1;ir;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function i(e){return e?e.nodeType===W?e.documentElement:e.firstChild:null}function o(e){var t=i(e);return t&&J.getID(t)}function a(e){var t=s(e);if(t)if(U.hasOwnProperty(t)){var n=U[t];n!==e&&(p(n,t)?L(!1):void 0,U[t]=e)}else U[t]=e;return t}function s(e){return e&&e.getAttribute&&e.getAttribute(R)||""}function l(e,t){var n=s(e);n!==t&&delete U[n],e.setAttribute(R,t),U[t]=e}function u(e){return U.hasOwnProperty(e)&&p(U[e],e)||(U[e]=J.findReactNodeByID(e)),U[e]}function c(e){var t=k.get(e)._rootNodeID;return C.isNullComponentID(t)?null:(U.hasOwnProperty(t)&&p(U[t],t)||(U[t]=J.findReactNodeByID(t)),U[t])}function p(e,t){if(e){s(e)!==t?L(!1):void 0;var n=J.findReactContainerForID(t);if(n&&F(n,e))return!0}return!1}function f(e){delete U[e]}function d(e){var t=U[e];return t&&p(t,e)?void(K=t):!1}function h(e){K=null,S.traverseAncestors(e,d);var t=K;return K=null,t}function m(e,t,n,r,i,o){E.useCreateElement&&(o=O({},o),n.nodeType===W?o[H]=n:o[H]=n.ownerDocument);var a=P.mountComponent(e,t,r,o);e._renderedComponent._topLevelWrapper=e,J._mountImageIntoNode(a,n,i,r)}function y(e,t,n,r,i){var o=I.ReactReconcileTransaction.getPooled(r);o.perform(m,null,e,t,n,o,r,i),I.ReactReconcileTransaction.release(o)}function g(e,t){for(P.unmountComponent(e),t.nodeType===W&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function v(e){var t=o(e);return t?t!==S.getReactRootIDFromNodeID(t):!1}function b(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=s(e);if(t){var n,r=S.getReactRootIDFromNodeID(t),i=e;do if(n=s(i),i=i.parentNode,null==i)return null;while(n!==r);if(i===G[r])return e}}return null}var _=n(32),x=n(41),E=(n(13),n(113)),w=n(7),C=n(120),S=n(24),k=n(35),D=n(123),A=n(9),P=n(25),T=n(71),I=n(8),O=n(3),M=n(36),F=n(137),N=n(77),L=n(2),j=n(57),B=n(80),R=(n(82),n(4),_.ID_ATTRIBUTE_NAME),U={},V=1,W=9,q=11,H="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),z={},G={},Y=[],K=null,X=function(){};X.prototype.isReactComponent={},X.prototype.render=function(){return this.props};var J={TopLevelWrapper:X,_instancesByReactRootID:z,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return J.scrollMonitor(n,function(){T.enqueueElementInternal(e,t),r&&T.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==V&&t.nodeType!==W&&t.nodeType!==q?L(!1):void 0,x.ensureScrollValueMonitoring();var n=J.registerContainer(t);return z[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var i=N(e,null),o=J._registerComponent(i,t);return I.batchedUpdates(y,i,o,t,n,r),i},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?L(!1):void 0,J._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){w.isValidElement(t)?void 0:L(!1);var a=new w(X,null,null,null,null,null,t),l=z[o(n)];if(l){var u=l._currentElement,c=u.props;if(B(c,t)){var p=l._renderedComponent.getPublicInstance(),f=r&&function(){r.call(p)};return J._updateRootComponent(l,a,n,f),p}J.unmountComponentAtNode(n)}var d=i(n),h=d&&!!s(d),m=v(n),y=h&&!l&&!m,g=J._renderNewRootComponent(a,n,y,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):M)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return J._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=o(e);return t&&(t=S.getReactRootIDFromNodeID(t)),t||(t=S.createReactRootID()),G[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==V&&e.nodeType!==W&&e.nodeType!==q?L(!1):void 0;var t=o(e),n=z[t];if(!n){var r=(v(e),s(e));r&&r===S.getReactRootIDFromNodeID(r);return!1}return I.batchedUpdates(g,n,e),delete z[t],delete G[t],!0},findReactContainerForID:function(e){var t=S.getReactRootIDFromNodeID(e),n=G[t];return n},findReactNodeByID:function(e){var t=J.findReactContainerForID(e);return J.findComponentRoot(t,e)},getFirstReactDOM:function(e){return b(e)},findComponentRoot:function(e,t){var n=Y,r=0,i=h(t)||e;for(n[0]=i.firstChild,n.length=1;r1){for(var d=Array(f),h=0;f>h;h++)d[h]=arguments[h+2];o.children=d}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)"undefined"==typeof o[i]&&(o[i]=m[i])}return s(e,l,u,c,p,r.current,o)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceKey=function(e,t){var n=s(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},s.cloneAndReplaceProps=function(e,t){var n=s(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},s.cloneElement=function(e,t,n){var o,l=i({},e.props),u=e.key,c=e.ref,p=e._self,f=e._source,d=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,d=r.current),void 0!==t.key&&(u=""+t.key);for(o in t)t.hasOwnProperty(o)&&!a.hasOwnProperty(o)&&(l[o]=t[o])}var h=arguments.length-2;if(1===h)l.children=n;else if(h>1){for(var m=Array(h),y=0;h>y;y++)m[y]=arguments[y+2];l.children=m}return s(e.type,u,c,p,f,d,l)},s.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},e.exports=s},function(e,t,n){"use strict";function r(){k.ReactReconcileTransaction&&_?void 0:y(!1)}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=k.ReactReconcileTransaction.getPooled(!1)}function o(e,t,n,i,o,a){r(),_.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?y(!1):void 0,g.sort(a);for(var n=0;t>n;n++){var r=g[n],i=r._pendingCallbacks;if(r._pendingCallbacks=null,d.performUpdateIfNecessary(r,e.reconcileTransaction),i)for(var o=0;oi?360+i:i},range:function r(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n=arguments.length<=2||void 0===arguments[2]?1:arguments[2],i=0,o=e;null!==t&&(i=e,o=t);for(var a=Math.max(Math.ceil((o-i)/n),0),r=Array(a),s=0;a>s;s++,i+=n)r[s]=i;return r},round:function(e,t){if(!isNaN(parseFloat(e))&&isFinite(e)){var n=Math.pow(10,t);return Math.round(parseFloat(e)*n)/n}return NaN},getViewport:function(){return{height:window.innerHeight||document.documentElement.offsetHeight,width:window.innerWidth||document.documentElement.offsetWidth}},events:n(26),prefixer:n(160),time:n(27),testing:n(354)}},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var i="POP";t.POP=i,t["default"]={PUSH:n,REPLACE:r,POP:i}},function(e,t,n){"use strict";function r(e,t,n){return e[t]?new Error("<"+n+'> should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.falsy=r;var i=n(1),o=i.PropTypes.func,a=i.PropTypes.object,s=i.PropTypes.arrayOf,l=i.PropTypes.oneOfType,u=i.PropTypes.element,c=i.PropTypes.shape,p=i.PropTypes.string,f=c({listen:o.isRequired,pushState:o.isRequired,replaceState:o.isRequired,go:o.isRequired});t.history=f;var d=c({pathname:p.isRequired,search:p.isRequired,state:a,action:p.isRequired,key:p});t.location=d;var h=l([o,p]);t.component=h;var m=l([h,a]);t.components=m;var y=l([a,u]);t.route=y;var g=l([y,s(y)]);t.routes=g,t["default"]={falsy:r,history:f,location:d,component:h,components:m,route:y}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return null==e||d["default"].isValidElement(e)}function o(e){return i(e)||Array.isArray(e)&&e.every(i)}function a(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var i=t[r](n,r,e);i instanceof Error&&m["default"](!1,i.message)}}function s(e,t){return p({},e,t)}function l(e){var t=e.type,n=s(t.defaultProps,e.props);if(t.propTypes&&a(t.displayName||t.name,t.propTypes,n),n.children){var r=u(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function u(e,t){var n=[];return d["default"].Children.forEach(e,function(e){if(d["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(l(e))}),n}function c(e){return o(e)?e=u(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var p=Object.assign||function(e){for(var t=1;t=a;a++)if(i(e,a)&&i(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return o(s)?void 0:f(!1),s}function c(e,t,n,r,i,o){e=e||"",t=t||"",e===t?f(!1):void 0;var u=a(t,e);u||a(e,t)?void 0:f(!1);for(var c=0,p=u?s:l,d=e;;d=p(d,t)){var h;if(i&&d===e||o&&d===t||(h=n(d,u,r)),h===!1||d===t)break;c++1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,i){var o=u(e,t);o!==e&&c(e,o,n,r,!1,!0),o!==t&&c(o,t,n,i,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:u,_getNextDescendantID:l,isAncestorIDOf:a,SEPARATOR:d};e.exports=y},function(e,t,n){"use strict";function r(){i.attachRefs(this,this._currentElement)}var i=n(288),o={mountComponent:function(e,t,n,i){var o=e.mountComponent(t,n,i);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),o},unmountComponent:function(e){i.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,o){var a=e._currentElement;if(t!==a||o!==e._context){var s=i.shouldUpdateRefs(a,t);s&&i.detachRefs(e,a),e.receiveComponent(t,n,o),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=o},function(e,t){"use strict";e.exports={getMousePosition:function(e){return{x:e.pageX,y:e.pageY}},getTouchPosition:function(e){return{x:e.touches[0].pageX,y:e.touches[0].pageY}},pauseEvent:function(e){e.stopPropagation(),e.preventDefault(),e.returnValue=!1,e.cancelBubble=!0},addEventsToDocument:function(e){for(var t in e)document.addEventListener(t,e[t],!1)},removeEventsFromDocument:function(e){for(var t in e)document.removeEventListener(t,e[t],!1)},targetIsDescendant:function(e,t){for(var n=e.target;null!==n;){if(n===t)return!0;n=n.parentNode}return!1}}},function(e,t){"use strict";e.exports={getDaysInMonth:function(e){var t=this.getFirstDayOfMonth(e);return t.setMonth(t.getMonth()+1),t.setDate(t.getDate()-1),t.getDate()},getFirstDayOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth(),1)},getFirstWeekDay:function(e){return this.getFirstDayOfMonth(e).getDay()},getTimeMode:function(e){return e.getHours()>=12?"pm":"am"},getFullMonth:function(e){var t=e.getMonth();switch(t){default:return"Unknown";case 0:return"January";case 1:return"February";case 2:return"March";case 3:return"April";case 4:return"May";case 5:return"June";case 6:return"July";case 7:return"August";case 8:return"September";case 9:return"October";case 10:return"November";case 11:return"December"}},getShortMonth:function(e){var t=e.getMonth();switch(t){default:return"Unknown";case 0:return"Jan";case 1:return"Feb";case 2:return"Mar";case 3:return"Apr";case 4:return"May";case 5:return"Jun";case 6:return"Jul";case 7:return"Aug";case 8:return"Sep";case 9:return"Oct";case 10:return"Nov";case 11:return"Dec"}},getFullDayOfWeek:function(e){switch(e){default:return"Unknown";case 0:return"Sunday";case 1:return"Monday";case 2:return"Tuesday";case 3:return"Wednesday";case 4:return"Thursday";case 5:return"Friday";case 6:return"Saturday"}},getShortDayOfWeek:function(e){switch(e){default:return"Unknown";case 0:return"Sun";case 1:return"Mon";case 2:return"Tue";case 3:return"Wed";case 4:return"Thu";case 5:return"Fri";case 6:return"Sat"}},clone:function(e){return new Date(e.getTime())},cloneAsDate:function(e){var t=this.clone(e);return t.setHours(0,0,0,0),t},isDateObject:function(e){return e instanceof Date},addDays:function(e,t){var n=this.clone(e);return n.setDate(e.getDate()+t),n},addMonths:function(e,t){var n=this.clone(e);return n.setMonth(e.getMonth()+t),n},addYears:function(e,t){var n=this.clone(e);return n.setFullYear(e.getFullYear()+t),n},setDay:function(e,t){var n=this.clone(e);return n.setDate(t),n},setMonth:function(e,t){var n=this.clone(e);return n.setMonth(t),n},setYear:function(e,t){var n=this.clone(e);return n.setFullYear(t),n},setHours:function(e,t){var n=this.clone(e);return n.setHours(t),n},setMinutes:function(e,t){var n=this.clone(e);return n.setMinutes(t),n},toggleTimeMode:function(e){var t=this.clone(e),n=t.getHours();return t.setHours(n-(n>12?-12:12)),t},formatTime:function(e,t){var n=e.getHours(),r=e.getMinutes().toString();if("ampm"===t){var i=12>n,o=i?" am":" pm";return n%=12,n=(n||12).toString(),r.length<2&&(r="0"+r),n+("00"===r?"":":"+r)+o}return n=n.toString(),n.length<2&&(n="0"+n),r.length<2&&(r="0"+r),n+":"+r}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(332),o=r(i),a=n(333),s=r(a),l=n(143),u=r(l),c=n(43),p=r(c),f=n(334),d=r(f),h=n(83),m=r(h),y=n(144),g=r(y),v=n(84),b=r(v),_=n(339),x=r(_),E=n(145),w=r(E),C=n(14),S=r(C),k=n(340),D=r(k),A=n(37),P=r(A),T=n(146),I=r(T),O=n(343),M=r(O),F=n(148),N=r(F),L=n(342),j=r(L),B=n(341),R=r(B),U=n(344),V=r(U),W=n(149),q=r(W),H=n(150),z=r(H),G=n(346),Y=r(G),K=n(345),X=r(K),J=n(151),$=r(J),Q=n(152),Z=r(Q),ee=n(154),te=r(ee),ne=n(153),re=r(ne),ie=n(11),oe=r(ie),ae=n(155),se=r(ae),le=n(347),ue=r(le),ce=n(156),pe=r(ce),fe=n(348),de=r(fe),he=n(349),me=r(he),ye=n(159),ge=r(ye);t["default"]={App:o["default"],AppBar:s["default"],Autocomplete:u["default"],Button:p["default"],Card:d["default"],Checkbox:m["default"],DatePicker:g["default"],Dialog:b["default"],Drawer:x["default"],Dropdown:w["default"],FontIcon:S["default"],Form:D["default"],Input:P["default"],Link:I["default"],List:M["default"],ListItem:N["default"],ListDivider:j["default"],ListCheckbox:R["default"],ListSubHeader:V["default"],Menu:q["default"],MenuItem:z["default"],MenuDivider:Y["default"],IconMenu:X["default"],Navigation:$["default"],ProgressBar:Z["default"],RadioGroup:te["default"],RadioButton:re["default"],Ripple:oe["default"],Slider:se["default"],Snackbar:ue["default"],Switch:pe["default"],Tab:de["default"],Tabs:me["default"],TimePicker:ge["default"]},e.exports=t["default"]},function(e,t){e.exports={list:"style__list___LxJo5",subheader:"style__subheader___2TCQt",divider:"style__divider___f3z9G",inset:"style__inset___k0vR6","list-item":"style__list-item___3rQ4w",item:"style__item___2kY7u",selectable:"style__selectable___1MSON",disabled:"style__disabled___66HaW","with-legend":"style__with-legend___2c33c","checkbox-item":"style__checkbox-item___3YC-7",checkbox:"style__checkbox___lVBAk",ripple:"style__ripple___3iApY",text:"style__text___1RryH",caption:"style__caption___3E0Qf",legend:"style__legend___2V1TI",avatar:"style__avatar___3cWNe",right:"style__right___1_LpP",left:"style__left___1Dvvp",icon:"style__icon___2BB-a"}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=n(2),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=o,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){s.properties.hasOwnProperty(p)?i(!1):void 0;var f=p.toLowerCase(),d=n[p],h={attributeName:f,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseAttribute:r(d,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(d,t.MUST_USE_PROPERTY),hasSideEffects:r(d,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.mustUseAttribute&&h.mustUseProperty?i(!1):void 0,!h.mustUseProperty&&h.hasSideEffects?i(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:i(!1),l.hasOwnProperty(p)){var m=l[p];h.attributeName=m}a.hasOwnProperty(p)&&(h.attributeNamespace=a[p]),u.hasOwnProperty(p)&&(h.propertyName=u[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),s.properties[p]=h}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t0&&(e+=" "+f["default"].filled),this.props.multiline?c["default"].createElement("textarea",a({ref:"input",role:"input"},this.props,{className:e,onChange:this.onChange,value:this.state.value})):c["default"].createElement("input",a({ref:"input",role:"input"},this.props,{className:e,value:this.state.value,onChange:this.onChange}))}},{key:"render",value:function(){var e=f["default"].root,t=f["default"].label;return this.props.error&&(e+=" "+f["default"].errored),this.props.disabled&&(e+=" "+f["default"].disabled),this.props.className&&(e+=" "+this.props.className),"hidden"===this.props.type&&(e+=" "+f["default"].hidden),this.props.icon&&(e+=" "+f["default"]["with-icon"]),this.props.floating||(t+=" "+f["default"].fixed),c["default"].createElement("div",{"data-react-toolbox":"input",className:e},this.renderInput(),this.props.icon?c["default"].createElement(h["default"],{className:f["default"].icon,value:this.props.icon}):null,c["default"].createElement("span",{className:f["default"].bar}),this.props.label?c["default"].createElement("label",{className:t},this.props.label):null,this.props.error?c["default"].createElement("span",{className:f["default"].error},this.props.error):null)}},{key:"blur",value:function(){this.refs.input.blur()}},{key:"focus",value:function(){this.refs.input.focus()}},{key:"getValue",value:function(){return this.state.value}},{key:"setValue",value:function(e){this.setState({value:e})}}],[{key:"propTypes",value:{className:c["default"].PropTypes.string,disabled:c["default"].PropTypes.bool,error:c["default"].PropTypes.string,floating:c["default"].PropTypes.bool,icon:c["default"].PropTypes.string,label:c["default"].PropTypes.string,multiline:c["default"].PropTypes.bool,onBlur:c["default"].PropTypes.func,onChange:c["default"].PropTypes.func,onFocus:c["default"].PropTypes.func,onKeyPress:c["default"].PropTypes.func,required:c["default"].PropTypes.bool,type:c["default"].PropTypes.string,value:c["default"].PropTypes.any},enumerable:!0},{key:"defaultProps",value:{className:"",disabled:!1,floating:!0,multiline:!1,required:!1,type:"text"},enumerable:!0}]),t}(c["default"].Component);t["default"]=m,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function o(e){return i(e).replace(/\/+/g,"/+")}function a(e){for(var t="",n=[],r=[],i=void 0,a=0,s=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*|\(|\)/g;i=s.exec(e);)i.index!==a&&(r.push(e.slice(a,i.index)),t+=o(e.slice(a,i.index))),i[1]?(t+="([^/?#]+)",n.push(i[1])):"*"===i[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]&&(t+=")?"),r.push(i[0]),a=s.lastIndex;return a!==e.length&&(r.push(e.slice(a,e.length)),t+=o(e.slice(a,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function s(e){return e in h||(h[e]=a(e)),h[e]}function l(e,t){var n=s(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;r+="/*";var a="*"!==o[o.length-1];a&&(r+="([\\s\\S]*?)");var l=t.match(new RegExp("^"+r+"$","i")),u=void 0,c=void 0;return null!=l?(c=Array.prototype.slice.call(l,1).map(function(e){return null!=e?decodeURIComponent(e.replace(/\+/g,"%20")):e}),u=a?c.pop():t.replace(l[0],"")):u=c=null,{remainingPathname:u,paramNames:i,paramValues:c}}function u(e){return s(e).paramNames}function c(e,t){var n=l(e,t),r=n.paramNames,i=n.paramValues;return null!=i?r.reduce(function(e,t,n){return e[t]=i[n],e},{}):null}function p(e,t){t=t||{};for(var n=s(e),r=n.tokens,i=0,o="",a=0,l=void 0,u=void 0,c=void 0,p=0,f=r.length;f>p;++p)l=r[p],"*"===l?(c=Array.isArray(t.splat)?t.splat[a++]:t.splat,d["default"](null!=c||i>0,'Missing splat #%s for path "%s"',a,e),null!=c&&(o+=encodeURI(c).replace(/%20/g,"+"))):"("===l?i+=1:")"===l?i-=1:":"===l.charAt(0)?(u=l.substring(1),c=t[u],d["default"](null!=c||i>0,'Missing "%s" parameter for path "%s"',u,e),null!=c&&(o+=encodeURIComponent(c).replace(/%20/g,"+"))):o+=l;return o.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=s,t.matchPattern=l,t.getParamNames=u,t.getParams=c,t.formatPattern=p;var f=n(16),d=r(f),h={}},function(e,t,n){"use strict";var r=n(49),i=n(279),o=n(284),a=n(3),s=n(310),l={};a(l,o),a(l,{findDOMNode:s("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:s("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:s("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:s("renderToString","ReactDOMServer","react-dom/server",i,i.renderToString),renderToStaticMarkup:s("renderToStaticMarkup","ReactDOMServer","react-dom/server",i,i.renderToStaticMarkup)}),l.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,e.exports=l},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,y)||(e[y]=h++,f[e[y]]={}),f[e[y]]}var i=n(12),o=n(33),a=n(108),s=n(281),l=n(9),u=n(129),c=n(3),p=n(78),f={},d=!1,h=0,m={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},y="_reactListenersID"+String(Math.random()).slice(2),g=c({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),s=a.registrationNameDependencies[e],l=i.topLevelTypes,u=0;u=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t":">","<":"<",'"':""","'":"'"},o=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";function r(e){return null==e?null:1===e.nodeType?e:i.has(e)?o.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render?a(!1):void 0,void a(!1))}var i=(n(13),n(35)),o=n(6),a=n(2);n(4);e.exports=r},function(e,t,n){"use strict";var r=n(5),i=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t,n){"use strict";var r=n(2),i=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=i},function(e,t){e.exports={root:"style__root___M5QUD",prev:"style__prev___24x4e",next:"style__next___2NSbk",title:"style__title___19cM6",years:"style__years___1_Jht",active:"style__active___FiGXm",week:"style__week___3msRI",days:"style__days___3GRyI",day:"style__day___yRRaq",month:"style__month___3uqPm",ripple:"style__ripple___pf0y1"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:(s["default"](!1,'A path must be pathname + search + hash only, not a fully qualified URL like "%s"',e),e.substring(t[0].length))}function o(e){var t=i(e),n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substring(o),t=t.substring(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substring(a),t=t.substring(0,a)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0;var a=n(30),s=r(a);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var r=e(t,n);e.length<2?n(r):a["default"](void 0===r,'You should not "return" in a transition hook with a callback argument; call the callback instead')}t.__esModule=!0;var o=n(30),a=r(o);t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return c["default"].stringify(e,{arrayFormat:"brackets"})}function a(e){return c["default"].parse(e)}function s(e){return function(){function t(e){return null==e.query&&(e.query=v(e.search.substring(1))),e}function n(e,t){var n=void 0;if(!t||""===(n=g(t)))return e;"string"==typeof e&&(e=h["default"](e));var r=e.search+(e.search?"&":"?")+n;return l({},e,{search:r})}function r(e){return _.listenBefore(function(n,r){f["default"](e,t(n),r)})}function s(e){return _.listen(function(n){e(t(n))})}function u(e,t,r){return _.pushState(e,n(t,r))}function c(e,t,r){return _.replaceState(e,n(t,r))}function p(e,t){return _.createPath(n(e,t))}function d(e,t){return _.createHref(n(e,t))}function m(){return t(_.createLocation.apply(_,arguments))}var y=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],g=y.stringifyQuery,v=y.parseQueryString,b=i(y,["stringifyQuery","parseQueryString"]),_=e(b);return"function"!=typeof g&&(g=o),"function"!=typeof v&&(v=a),l({},_,{listenBefore:r,listen:s,pushState:u,replaceState:c,createPath:p,createHref:d,createLocation:m})}}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;to?t.call(this,o++,i,r):r.apply(this,arguments))}var o=0,a=!1;i()}function r(e,t,n){function r(e,t,r){a||(t?(a=!0,n(t)):(o[e]=r,a=++s===i,a&&n(null,o)))}var i=e.length,o=[];if(0===i)return n(null,o);var a=!1,s=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0,t.loopAsync=n,t.mapAsync=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){for(var t in e)if(e.hasOwnProperty(t))return!0;return!1}function a(e){return function(){function t(e,t){var n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];return g["default"](e,t,n,k.location,k.routes,k.params)}function n(e){var t=e.pathname,n=e.query,r=e.state;return S.createLocation(S.createPath(t,n),r,c.REPLACE)}function r(e,t){D&&D.location===e?a(D,t):x["default"](w,e,function(n,r){n?t(n):r?a(s({},r,{location:e}),t):t()})}function a(e,t){var r=h["default"](k,e),i=r.leaveRoutes,o=r.enterRoutes;m.runLeaveHooks(i),m.runEnterHooks(o,e,function(r,i){r?t(r):i?t(null,n(i)):b["default"](e,function(n,r){n?t(n):t(null,null,k=s({},e,{components:r}))})})}function l(e){return e.__id__||(e.__id__=A++)}function p(e){return e.reduce(function(e,t){return e.push.apply(e,P[l(t)]),e},[])}function d(e,t){x["default"](w,e,function(n,r){if(null==r)return void t();D=s({},r,{location:e});for(var i=p(h["default"](k,r).leaveRoutes),o=void 0,a=0,l=i.length;null==o&&l>a;++a)o=i[a](e);t(o)})}function y(){if(k.routes){for(var e=p(k.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function v(e,t){var n=l(e),r=P[n];if(null==r){var i=!o(P);r=P[n]=[t],i&&(T=S.listenBefore(d),S.listenBeforeUnload&&(I=S.listenBeforeUnload(y)))}else-1===r.indexOf(t)&&r.push(t);return function(){var e=P[n];if(null!=e){var r=e.filter(function(e){return e!==t});0===r.length?(delete P[n],o(P)||(T&&(T(),T=null),I&&(I(),I=null))):P[n]=r}}}function _(e){return S.listen(function(t){k.location===t?e(null,k):r(t,function(n,r,i){n?e(n):r?S.transitionTo(r):i?e(null,i):u["default"](!1,'Location "%s" did not match any routes',t.pathname+t.search+t.hash)})})}var E=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],w=E.routes,C=i(E,["routes"]),S=f["default"](e)(C),k={},D=void 0,A=1,P={},T=void 0,I=void 0;return s({},S,{isActive:t,match:r,listenBeforeLeavingRoute:v,listen:_})}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;tt||e.hasOverloadedBooleanValue&&t===!1}var o=n(32),a=n(9),s=n(313),l=(n(4),/^[a-zA-Z_][\w\.\-]*$/),u={},c={},p={createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(o.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(n){if(i(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+s(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var r=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else if(i(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var s=r.attributeName,l=r.attributeNamespace;l?e.setAttributeNS(l,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}else{var u=r.propertyName;r.hasSideEffects&&""+e[u]==""+n||(e[u]=n)}}else o.isCustomAttribute(t)&&p.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var i=n.propertyName,a=o.getDefaultValueForProperty(e.nodeName,i);n.hasSideEffects&&""+e[i]===a||(e[i]=a)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}};a.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=p},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?u(!1):void 0}function i(e){r(e),null!=e.value||null!=e.onChange?u(!1):void 0}function o(e){r(e),null!=e.checked||null!=e.onChange?u(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=n(127),l=n(51),u=n(2),c=(n(4),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func},f={},d={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var i=p[r](t,r,e,l.prop);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;a(n)}}},getValue:function(e){return e.valueLink?(i(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(o(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){ -return e.valueLink?(i(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(o(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(70),i=n(6),o={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){i.purgeID(e)}};e.exports=o},function(e,t,n){"use strict";var r=n(2),i=!1,o={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){i?r(!1):void 0,o.unmountIDFromEnvironment=e.unmountIDFromEnvironment,o.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,o.processChildrenUpdates=e.processChildrenUpdates,i=!0}}};e.exports=o},function(e,t,n){"use strict";var r=n(107),i=n(66),o=n(6),a=n(9),s=n(2),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},u={updatePropertyByID:function(e,t,n){var r=o.getNode(e);l.hasOwnProperty(t)?s(!1):void 0,null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=o.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return r?!!n[r]:!1}function r(e){return n}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[i]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e){var t;if(null===e||e===!1)t=new a(i);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?u(!1):void 0,t="string"==typeof n.type?s.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):u(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var o=n(112),a=n(119),s=n(125),l=n(3),u=n(2),c=(n(4),function(){});l(c.prototype,o.Mixin,{_instantiateReactComponent:i}),e.exports=i},function(e,t,n){"use strict";/** +!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(170)},function(e,t,n){"use strict";e.exports=n(40)},function(e,t,n){"use strict";var r=function(e,t,n,r,i,a,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,a,o,s],c=0;l=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return u[c++]}))}throw l.framesToPop=1,l}};e.exports=r},function(e,t){"use strict";function n(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,i=1;ir;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function i(e){return e?e.nodeType===W?e.documentElement:e.firstChild:null}function a(e){var t=i(e);return t&&J.getID(t)}function o(e){var t=s(e);if(t)if(U.hasOwnProperty(t)){var n=U[t];n!==e&&(p(n,t)?N(!1):void 0,U[t]=e)}else U[t]=e;return t}function s(e){return e&&e.getAttribute&&e.getAttribute(R)||""}function l(e,t){var n=s(e);n!==t&&delete U[n],e.setAttribute(R,t),U[t]=e}function u(e){return U.hasOwnProperty(e)&&p(U[e],e)||(U[e]=J.findReactNodeByID(e)),U[e]}function c(e){var t=k.get(e)._rootNodeID;return C.isNullComponentID(t)?null:(U.hasOwnProperty(t)&&p(U[t],t)||(U[t]=J.findReactNodeByID(t)),U[t])}function p(e,t){if(e){s(e)!==t?N(!1):void 0;var n=J.findReactContainerForID(t);if(n&&j(n,e))return!0}return!1}function f(e){delete U[e]}function d(e){var t=U[e];return t&&p(t,e)?void(K=t):!1}function h(e){K=null,S.traverseAncestors(e,d);var t=K;return K=null,t}function m(e,t,n,r,i,a){E.useCreateElement&&(a=O({},a),n.nodeType===W?a[H]=n:a[H]=n.ownerDocument);var o=T.mountComponent(e,t,r,a);e._renderedComponent._topLevelWrapper=e,J._mountImageIntoNode(o,n,i,r)}function y(e,t,n,r,i){var a=I.ReactReconcileTransaction.getPooled(r);a.perform(m,null,e,t,n,a,r,i),I.ReactReconcileTransaction.release(a)}function g(e,t){for(T.unmountComponent(e),t.nodeType===W&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function v(e){var t=a(e);return t?t!==S.getReactRootIDFromNodeID(t):!1}function b(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=s(e);if(t){var n,r=S.getReactRootIDFromNodeID(t),i=e;do if(n=s(i),i=i.parentNode,null==i)return null;while(n!==r);if(i===G[r])return e}}return null}var _=n(32),x=n(41),E=(n(13),n(113)),w=n(7),C=n(120),S=n(24),k=n(35),D=n(123),A=n(9),T=n(25),P=n(71),I=n(8),O=n(3),M=n(36),j=n(137),F=n(77),N=n(2),L=n(57),B=n(80),R=(n(82),n(4),_.ID_ATTRIBUTE_NAME),U={},V=1,W=9,q=11,H="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),z={},G={},Y=[],K=null,X=function(){};X.prototype.isReactComponent={},X.prototype.render=function(){return this.props};var J={TopLevelWrapper:X,_instancesByReactRootID:z,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return J.scrollMonitor(n,function(){P.enqueueElementInternal(e,t),r&&P.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==V&&t.nodeType!==W&&t.nodeType!==q?N(!1):void 0,x.ensureScrollValueMonitoring();var n=J.registerContainer(t);return z[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var i=F(e,null),a=J._registerComponent(i,t);return I.batchedUpdates(y,i,a,t,n,r),i},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?N(!1):void 0,J._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){w.isValidElement(t)?void 0:N(!1);var o=new w(X,null,null,null,null,null,t),l=z[a(n)];if(l){var u=l._currentElement,c=u.props;if(B(c,t)){var p=l._renderedComponent.getPublicInstance(),f=r&&function(){r.call(p)};return J._updateRootComponent(l,o,n,f),p}J.unmountComponentAtNode(n)}var d=i(n),h=d&&!!s(d),m=v(n),y=h&&!l&&!m,g=J._renderNewRootComponent(o,n,y,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):M)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return J._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=a(e);return t&&(t=S.getReactRootIDFromNodeID(t)),t||(t=S.createReactRootID()),G[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==V&&e.nodeType!==W&&e.nodeType!==q?N(!1):void 0;var t=a(e),n=z[t];if(!n){var r=(v(e),s(e));r&&r===S.getReactRootIDFromNodeID(r);return!1}return I.batchedUpdates(g,n,e),delete z[t],delete G[t],!0},findReactContainerForID:function(e){var t=S.getReactRootIDFromNodeID(e),n=G[t];return n},findReactNodeByID:function(e){var t=J.findReactContainerForID(e);return J.findComponentRoot(t,e)},getFirstReactDOM:function(e){return b(e)},findComponentRoot:function(e,t){var n=Y,r=0,i=h(t)||e;for(n[0]=i.firstChild,n.length=1;r1){for(var d=Array(f),h=0;f>h;h++)d[h]=arguments[h+2];a.children=d}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)"undefined"==typeof a[i]&&(a[i]=m[i])}return s(e,l,u,c,p,r.current,a)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceKey=function(e,t){var n=s(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},s.cloneAndReplaceProps=function(e,t){var n=s(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},s.cloneElement=function(e,t,n){var a,l=i({},e.props),u=e.key,c=e.ref,p=e._self,f=e._source,d=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,d=r.current),void 0!==t.key&&(u=""+t.key);for(a in t)t.hasOwnProperty(a)&&!o.hasOwnProperty(a)&&(l[a]=t[a])}var h=arguments.length-2;if(1===h)l.children=n;else if(h>1){for(var m=Array(h),y=0;h>y;y++)m[y]=arguments[y+2];l.children=m}return s(e.type,u,c,p,f,d,l)},s.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},e.exports=s},function(e,t,n){"use strict";function r(){k.ReactReconcileTransaction&&_?void 0:y(!1)}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=k.ReactReconcileTransaction.getPooled(!1)}function a(e,t,n,i,a,o){r(),_.batchedUpdates(e,t,n,i,a,o)}function o(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?y(!1):void 0,g.sort(o);for(var n=0;t>n;n++){var r=g[n],i=r._pendingCallbacks;if(r._pendingCallbacks=null,d.performUpdateIfNecessary(r,e.reconcileTransaction),i)for(var a=0;ai?360+i:i},range:function r(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n=arguments.length<=2||void 0===arguments[2]?1:arguments[2],i=0,a=e;null!==t&&(i=e,a=t);for(var o=Math.max(Math.ceil((a-i)/n),0),r=Array(o),s=0;o>s;s++,i+=n)r[s]=i;return r},round:function(e,t){if(!isNaN(parseFloat(e))&&isFinite(e)){var n=Math.pow(10,t);return Math.round(parseFloat(e)*n)/n}return NaN},getViewport:function(){return{height:window.innerHeight||document.documentElement.offsetHeight,width:window.innerWidth||document.documentElement.offsetWidth}},events:n(26),prefixer:n(160),time:n(27),testing:n(376)}},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var i="POP";t.POP=i,t["default"]={PUSH:n,REPLACE:r,POP:i}},function(e,t,n){"use strict";function r(e,t,n){return e[t]?new Error("<"+n+'> should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.falsy=r;var i=n(1),a=i.PropTypes.func,o=i.PropTypes.object,s=i.PropTypes.arrayOf,l=i.PropTypes.oneOfType,u=i.PropTypes.element,c=i.PropTypes.shape,p=i.PropTypes.string,f=c({listen:a.isRequired,pushState:a.isRequired,replaceState:a.isRequired,go:a.isRequired});t.history=f;var d=c({pathname:p.isRequired,search:p.isRequired,state:o,action:p.isRequired,key:p});t.location=d;var h=l([a,p]);t.component=h;var m=l([h,o]);t.components=m;var y=l([o,u]);t.route=y;var g=l([y,s(y)]);t.routes=g,t["default"]={falsy:r,history:f,location:d,component:h,components:m,route:y}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return null==e||d["default"].isValidElement(e)}function a(e){return i(e)||Array.isArray(e)&&e.every(i)}function o(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var i=t[r](n,r,e);i instanceof Error&&m["default"](!1,i.message)}}function s(e,t){return p({},e,t)}function l(e){var t=e.type,n=s(t.defaultProps,e.props);if(t.propTypes&&o(t.displayName||t.name,t.propTypes,n),n.children){var r=u(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function u(e,t){var n=[];return d["default"].Children.forEach(e,function(e){if(d["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(l(e))}),n}function c(e){return a(e)?e=u(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var p=Object.assign||function(e){for(var t=1;t=o;o++)if(i(e,o)&&i(t,o))r=o;else if(e.charAt(o)!==t.charAt(o))break;var s=e.substr(0,r);return a(s)?void 0:f(!1),s}function c(e,t,n,r,i,a){e=e||"",t=t||"",e===t?f(!1):void 0;var u=o(t,e);u||o(e,t)?void 0:f(!1);for(var c=0,p=u?s:l,d=e;;d=p(d,t)){var h;if(i&&d===e||a&&d===t||(h=n(d,u,r)),h===!1||d===t)break;c++1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,i){var a=u(e,t);a!==e&&c(e,a,n,r,!1,!0),a!==t&&c(a,t,n,i,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:u,_getNextDescendantID:l,isAncestorIDOf:o,SEPARATOR:d};e.exports=y},function(e,t,n){"use strict";function r(){i.attachRefs(this,this._currentElement)}var i=n(310),a={mountComponent:function(e,t,n,i){var a=e.mountComponent(t,n,i);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),a},unmountComponent:function(e){i.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,a){var o=e._currentElement;if(t!==o||a!==e._context){var s=i.shouldUpdateRefs(o,t);s&&i.detachRefs(e,o),e.receiveComponent(t,n,a),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=a},function(e,t){"use strict";e.exports={getMousePosition:function(e){return{x:e.pageX,y:e.pageY}},getTouchPosition:function(e){return{x:e.touches[0].pageX,y:e.touches[0].pageY}},pauseEvent:function(e){e.stopPropagation(),e.preventDefault(),e.returnValue=!1,e.cancelBubble=!0},addEventsToDocument:function(e){for(var t in e)document.addEventListener(t,e[t],!1)},removeEventsFromDocument:function(e){for(var t in e)document.removeEventListener(t,e[t],!1)},targetIsDescendant:function(e,t){for(var n=e.target;null!==n;){if(n===t)return!0;n=n.parentNode}return!1}}},function(e,t){"use strict";e.exports={getDaysInMonth:function(e){var t=this.getFirstDayOfMonth(e);return t.setMonth(t.getMonth()+1),t.setDate(t.getDate()-1),t.getDate()},getFirstDayOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth(),1)},getFirstWeekDay:function(e){return this.getFirstDayOfMonth(e).getDay()},getTimeMode:function(e){return e.getHours()>=12?"pm":"am"},getFullMonth:function(e){var t=e.getMonth();switch(t){default:return"Unknown";case 0:return"January";case 1:return"February";case 2:return"March";case 3:return"April";case 4:return"May";case 5:return"June";case 6:return"July";case 7:return"August";case 8:return"September";case 9:return"October";case 10:return"November";case 11:return"December"}},getShortMonth:function(e){var t=e.getMonth();switch(t){default:return"Unknown";case 0:return"Jan";case 1:return"Feb";case 2:return"Mar";case 3:return"Apr";case 4:return"May";case 5:return"Jun";case 6:return"Jul";case 7:return"Aug";case 8:return"Sep";case 9:return"Oct";case 10:return"Nov";case 11:return"Dec"}},getFullDayOfWeek:function(e){switch(e){default:return"Unknown";case 0:return"Sunday";case 1:return"Monday";case 2:return"Tuesday";case 3:return"Wednesday";case 4:return"Thursday";case 5:return"Friday";case 6:return"Saturday"}},getShortDayOfWeek:function(e){switch(e){default:return"Unknown";case 0:return"Sun";case 1:return"Mon";case 2:return"Tue";case 3:return"Wed";case 4:return"Thu";case 5:return"Fri";case 6:return"Sat"}},clone:function(e){return new Date(e.getTime())},cloneAsDate:function(e){var t=this.clone(e);return t.setHours(0,0,0,0),t},isDateObject:function(e){return e instanceof Date},addDays:function(e,t){var n=this.clone(e);return n.setDate(e.getDate()+t),n},addMonths:function(e,t){var n=this.clone(e);return n.setMonth(e.getMonth()+t),n},addYears:function(e,t){var n=this.clone(e);return n.setFullYear(e.getFullYear()+t),n},setDay:function(e,t){var n=this.clone(e);return n.setDate(t),n},setMonth:function(e,t){var n=this.clone(e);return n.setMonth(t),n},setYear:function(e,t){var n=this.clone(e);return n.setFullYear(t),n},setHours:function(e,t){var n=this.clone(e);return n.setHours(t),n},setMinutes:function(e,t){var n=this.clone(e);return n.setMinutes(t),n},toggleTimeMode:function(e){var t=this.clone(e),n=t.getHours();return t.setHours(n-(n>12?-12:12)),t},formatTime:function(e,t){var n=e.getHours(),r=e.getMinutes().toString();if("ampm"===t){var i=12>n,a=i?" am":" pm";return n%=12,n=(n||12).toString(),r.length<2&&(r="0"+r),n+("00"===r?"":":"+r)+a}return n=n.toString(),n.length<2&&(n="0"+n),r.length<2&&(r="0"+r),n+":"+r}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(354),a=r(i),o=n(355),s=r(o),l=n(143),u=r(l),c=n(43),p=r(c),f=n(356),d=r(f),h=n(83),m=r(h),y=n(144),g=r(y),v=n(84),b=r(v),_=n(361),x=r(_),E=n(145),w=r(E),C=n(14),S=r(C),k=n(362),D=r(k),A=n(37),T=r(A),P=n(146),I=r(P),O=n(365),M=r(O),j=n(148),F=r(j),N=n(364),L=r(N),B=n(363),R=r(B),U=n(366),V=r(U),W=n(149),q=r(W),H=n(150),z=r(H),G=n(368),Y=r(G),K=n(367),X=r(K),J=n(151),$=r(J),Q=n(152),Z=r(Q),ee=n(154),te=r(ee),ne=n(153),re=r(ne),ie=n(11),ae=r(ie),oe=n(155),se=r(oe),le=n(369),ue=r(le),ce=n(156),pe=r(ce),fe=n(370),de=r(fe),he=n(371),me=r(he),ye=n(159),ge=r(ye);t["default"]={App:a["default"],AppBar:s["default"],Autocomplete:u["default"],Button:p["default"],Card:d["default"],Checkbox:m["default"],DatePicker:g["default"],Dialog:b["default"],Drawer:x["default"],Dropdown:w["default"],FontIcon:S["default"],Form:D["default"],Input:T["default"],Link:I["default"],List:M["default"],ListItem:F["default"],ListDivider:L["default"],ListCheckbox:R["default"],ListSubHeader:V["default"],Menu:q["default"],MenuItem:z["default"],MenuDivider:Y["default"],IconMenu:X["default"],Navigation:$["default"],ProgressBar:Z["default"],RadioGroup:te["default"],RadioButton:re["default"],Ripple:ae["default"],Slider:se["default"],Snackbar:ue["default"],Switch:pe["default"],Tab:de["default"],Tabs:me["default"],TimePicker:ge["default"]},e.exports=t["default"]},function(e,t){e.exports={list:"style__list___LxJo5",subheader:"style__subheader___2TCQt",divider:"style__divider___f3z9G",inset:"style__inset___k0vR6","list-item":"style__list-item___3rQ4w",item:"style__item___2kY7u",selectable:"style__selectable___1MSON",disabled:"style__disabled___66HaW","with-legend":"style__with-legend___2c33c","checkbox-item":"style__checkbox-item___3YC-7",checkbox:"style__checkbox___lVBAk",ripple:"style__ripple___3iApY",text:"style__text___1RryH",caption:"style__caption___3E0Qf",legend:"style__legend___2V1TI",avatar:"style__avatar___3cWNe",right:"style__right___1_LpP",left:"style__left___1Dvvp",icon:"style__icon___2BB-a"}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=n(2),a={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=a,n=e.Properties||{},o=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){s.properties.hasOwnProperty(p)?i(!1):void 0;var f=p.toLowerCase(),d=n[p],h={attributeName:f,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseAttribute:r(d,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(d,t.MUST_USE_PROPERTY),hasSideEffects:r(d,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.mustUseAttribute&&h.mustUseProperty?i(!1):void 0,!h.mustUseProperty&&h.hasSideEffects?i(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:i(!1),l.hasOwnProperty(p)){var m=l[p];h.attributeName=m}o.hasOwnProperty(p)&&(h.attributeNamespace=o[p]),u.hasOwnProperty(p)&&(h.propertyName=u[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),s.properties[p]=h}}},o={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t0&&(e+=" "+f["default"].filled),this.props.multiline?c["default"].createElement("textarea",o({ref:"input",role:"input"},this.props,{className:e,onChange:this.onChange,value:this.state.value})):c["default"].createElement("input",o({ref:"input",role:"input"},this.props,{className:e,value:this.state.value,onChange:this.onChange}))}},{key:"render",value:function(){var e=f["default"].root,t=f["default"].label;return this.props.error&&(e+=" "+f["default"].errored),this.props.disabled&&(e+=" "+f["default"].disabled),this.props.className&&(e+=" "+this.props.className),"hidden"===this.props.type&&(e+=" "+f["default"].hidden),this.props.icon&&(e+=" "+f["default"]["with-icon"]),this.props.floating||(t+=" "+f["default"].fixed),c["default"].createElement("div",{"data-react-toolbox":"input",className:e},this.renderInput(),this.props.icon?c["default"].createElement(h["default"],{className:f["default"].icon,value:this.props.icon}):null,c["default"].createElement("span",{className:f["default"].bar}),this.props.label?c["default"].createElement("label",{className:t},this.props.label):null,this.props.error?c["default"].createElement("span",{className:f["default"].error},this.props.error):null)}},{key:"blur",value:function(){this.refs.input.blur()}},{key:"focus",value:function(){this.refs.input.focus()}},{key:"getValue",value:function(){return this.state.value}},{key:"setValue",value:function(e){this.setState({value:e})}}],[{key:"propTypes",value:{className:c["default"].PropTypes.string,disabled:c["default"].PropTypes.bool,error:c["default"].PropTypes.string,floating:c["default"].PropTypes.bool,icon:c["default"].PropTypes.string,label:c["default"].PropTypes.string,multiline:c["default"].PropTypes.bool,onBlur:c["default"].PropTypes.func,onChange:c["default"].PropTypes.func,onFocus:c["default"].PropTypes.func,onKeyPress:c["default"].PropTypes.func,required:c["default"].PropTypes.bool,type:c["default"].PropTypes.string,value:c["default"].PropTypes.any},enumerable:!0},{key:"defaultProps",value:{className:"",disabled:!1,floating:!0,multiline:!1,required:!1,type:"text"},enumerable:!0}]),t}(c["default"].Component);t["default"]=m,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function a(e){return i(e).replace(/\/+/g,"/+")}function o(e){for(var t="",n=[],r=[],i=void 0,o=0,s=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*|\(|\)/g;i=s.exec(e);)i.index!==o&&(r.push(e.slice(o,i.index)),t+=a(e.slice(o,i.index))),i[1]?(t+="([^/?#]+)",n.push(i[1])):"*"===i[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]&&(t+=")?"),r.push(i[0]),o=s.lastIndex;return o!==e.length&&(r.push(e.slice(o,e.length)),t+=a(e.slice(o,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function s(e){return e in h||(h[e]=o(e)),h[e]}function l(e,t){var n=s(e),r=n.regexpSource,i=n.paramNames,a=n.tokens;r+="/*";var o="*"!==a[a.length-1];o&&(r+="([\\s\\S]*?)");var l=t.match(new RegExp("^"+r+"$","i")),u=void 0,c=void 0;return null!=l?(c=Array.prototype.slice.call(l,1).map(function(e){return null!=e?decodeURIComponent(e.replace(/\+/g,"%20")):e}),u=o?c.pop():t.replace(l[0],"")):u=c=null,{remainingPathname:u,paramNames:i,paramValues:c}}function u(e){return s(e).paramNames}function c(e,t){var n=l(e,t),r=n.paramNames,i=n.paramValues;return null!=i?r.reduce(function(e,t,n){return e[t]=i[n],e},{}):null}function p(e,t){t=t||{};for(var n=s(e),r=n.tokens,i=0,a="",o=0,l=void 0,u=void 0,c=void 0,p=0,f=r.length;f>p;++p)l=r[p],"*"===l?(c=Array.isArray(t.splat)?t.splat[o++]:t.splat,d["default"](null!=c||i>0,'Missing splat #%s for path "%s"',o,e),null!=c&&(a+=encodeURI(c).replace(/%20/g,"+"))):"("===l?i+=1:")"===l?i-=1:":"===l.charAt(0)?(u=l.substring(1),c=t[u],d["default"](null!=c||i>0,'Missing "%s" parameter for path "%s"',u,e),null!=c&&(a+=encodeURIComponent(c).replace(/%20/g,"+"))):a+=l;return a.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=s,t.matchPattern=l,t.getParamNames=u,t.getParams=c,t.formatPattern=p;var f=n(16),d=r(f),h={}},function(e,t,n){"use strict";var r=n(49),i=n(301),a=n(306),o=n(3),s=n(332),l={};o(l,a),o(l,{findDOMNode:s("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:s("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:s("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:s("renderToString","ReactDOMServer","react-dom/server",i,i.renderToString),renderToStaticMarkup:s("renderToStaticMarkup","ReactDOMServer","react-dom/server",i,i.renderToStaticMarkup)}),l.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,e.exports=l},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,y)||(e[y]=h++,f[e[y]]={}),f[e[y]]}var i=n(12),a=n(33),o=n(108),s=n(303),l=n(9),u=n(129),c=n(3),p=n(78),f={},d=!1,h=0,m={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},y="_reactListenersID"+String(Math.random()).slice(2),g=c({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,a=r(n),s=o.registrationNameDependencies[e],l=i.topLevelTypes,u=0;u=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t":">","<":"<",'"':""","'":"'"},a=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";function r(e){return null==e?null:1===e.nodeType?e:i.has(e)?a.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render?o(!1):void 0,void o(!1))}var i=(n(13),n(35)),a=n(6),o=n(2);n(4);e.exports=r},function(e,t,n){"use strict";var r=n(5),i=/^[ \r\n\t\f]/,a=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,o=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(o=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(o=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&a.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=o},function(e,t,n){"use strict";var r=n(2),i=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=i},function(e,t){e.exports={root:"style__root___M5QUD",prev:"style__prev___24x4e",next:"style__next___2NSbk",title:"style__title___19cM6",years:"style__years___1_Jht",active:"style__active___FiGXm",week:"style__week___3msRI",days:"style__days___3GRyI",day:"style__day___yRRaq",month:"style__month___3uqPm",ripple:"style__ripple___pf0y1"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:(s["default"](!1,'A path must be pathname + search + hash only, not a fully qualified URL like "%s"',e),e.substring(t[0].length))}function a(e){var t=i(e),n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substring(a),t=t.substring(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substring(o),t=t.substring(0,o)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0;var o=n(30),s=r(o);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){var r=e(t,n);e.length<2?n(r):o["default"](void 0===r,'You should not "return" in a transition hook with a callback argument; call the callback instead')}t.__esModule=!0;var a=n(30),o=r(a);t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return c["default"].stringify(e,{arrayFormat:"brackets"})}function o(e){return c["default"].parse(e)}function s(e){return function(){function t(e){return null==e.query&&(e.query=v(e.search.substring(1))),e}function n(e,t){var n=void 0;if(!t||""===(n=g(t)))return e;"string"==typeof e&&(e=h["default"](e));var r=e.search+(e.search?"&":"?")+n;return l({},e,{search:r})}function r(e){return _.listenBefore(function(n,r){f["default"](e,t(n),r)})}function s(e){return _.listen(function(n){e(t(n))})}function u(e,t,r){return _.pushState(e,n(t,r))}function c(e,t,r){return _.replaceState(e,n(t,r))}function p(e,t){return _.createPath(n(e,t))}function d(e,t){return _.createHref(n(e,t))}function m(){return t(_.createLocation.apply(_,arguments))}var y=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],g=y.stringifyQuery,v=y.parseQueryString,b=i(y,["stringifyQuery","parseQueryString"]),_=e(b);return"function"!=typeof g&&(g=a),"function"!=typeof v&&(v=o),l({},_,{listenBefore:r,listen:s,pushState:u,replaceState:c,createPath:p,createHref:d,createLocation:m})}}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;ta?t.call(this,a++,i,r):r.apply(this,arguments))}var a=0,o=!1;i()}function r(e,t,n){function r(e,t,r){o||(t?(o=!0,n(t)):(a[e]=r,o=++s===i,o&&n(null,a)))}var i=e.length,a=[];if(0===i)return n(null,a);var o=!1,s=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0,t.loopAsync=n,t.mapAsync=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){for(var t in e)if(e.hasOwnProperty(t))return!0;return!1}function o(e){return function(){function t(e,t){var n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];return g["default"](e,t,n,k.location,k.routes,k.params)}function n(e){var t=e.pathname,n=e.query,r=e.state;return S.createLocation(S.createPath(t,n),r,c.REPLACE)}function r(e,t){D&&D.location===e?o(D,t):x["default"](w,e,function(n,r){n?t(n):r?o(s({},r,{location:e}),t):t()})}function o(e,t){var r=h["default"](k,e),i=r.leaveRoutes,a=r.enterRoutes;m.runLeaveHooks(i),m.runEnterHooks(a,e,function(r,i){r?t(r):i?t(null,n(i)):b["default"](e,function(n,r){n?t(n):t(null,null,k=s({},e,{components:r}))})})}function l(e){return e.__id__||(e.__id__=A++)}function p(e){return e.reduce(function(e,t){return e.push.apply(e,T[l(t)]),e},[])}function d(e,t){x["default"](w,e,function(n,r){if(null==r)return void t();D=s({},r,{location:e});for(var i=p(h["default"](k,r).leaveRoutes),a=void 0,o=0,l=i.length;null==a&&l>o;++o)a=i[o](e);t(a)})}function y(){if(k.routes){for(var e=p(k.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function v(e,t){var n=l(e),r=T[n];if(null==r){var i=!a(T);r=T[n]=[t],i&&(P=S.listenBefore(d),S.listenBeforeUnload&&(I=S.listenBeforeUnload(y)))}else-1===r.indexOf(t)&&r.push(t);return function(){var e=T[n];if(null!=e){var r=e.filter(function(e){return e!==t});0===r.length?(delete T[n],a(T)||(P&&(P(),P=null),I&&(I(),I=null))):T[n]=r}}}function _(e){return S.listen(function(t){k.location===t?e(null,k):r(t,function(n,r,i){n?e(n):r?S.transitionTo(r):i?e(null,i):u["default"](!1,'Location "%s" did not match any routes',t.pathname+t.search+t.hash)})})}var E=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],w=E.routes,C=i(E,["routes"]),S=f["default"](e)(C),k={},D=void 0,A=1,T={},P=void 0,I=void 0;return s({},S,{isActive:t,match:r,listenBeforeLeavingRoute:v,listen:_})}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;tt||e.hasOverloadedBooleanValue&&t===!1}var a=n(32),o=n(9),s=n(335),l=(n(4),/^[a-zA-Z_][\w\.\-]*$/),u={},c={},p={createMarkupForID:function(e){return a.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(a.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(n){if(i(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+s(t)}return a.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var r=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(r){var o=r.mutationMethod;if(o)o(e,n);else if(i(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var s=r.attributeName,l=r.attributeNamespace;l?e.setAttributeNS(l,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}else{var u=r.propertyName;r.hasSideEffects&&""+e[u]==""+n||(e[u]=n)}}else a.isCustomAttribute(t)&&p.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var i=n.propertyName,o=a.getDefaultValueForProperty(e.nodeName,i);n.hasSideEffects&&""+e[i]===o||(e[i]=o)}}else a.isCustomAttribute(t)&&e.removeAttribute(t)}};o.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=p},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?u(!1):void 0}function i(e){r(e),null!=e.value||null!=e.onChange?u(!1):void 0}function a(e){r(e),null!=e.checked||null!=e.onChange?u(!1):void 0}function o(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=n(127),l=n(51),u=n(2),c=(n(4),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func},f={},d={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var i=p[r](t,r,e,l.prop);if(i instanceof Error&&!(i.message in f)){f[i.message]=!0;o(n)}}},getValue:function(e){return e.valueLink?(i(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){ +return e.valueLink?(i(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(70),i=n(6),a={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){i.purgeID(e)}};e.exports=a},function(e,t,n){"use strict";var r=n(2),i=!1,a={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){i?r(!1):void 0,a.unmountIDFromEnvironment=e.unmountIDFromEnvironment,a.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,a.processChildrenUpdates=e.processChildrenUpdates,i=!0}}};e.exports=a},function(e,t,n){"use strict";var r=n(107),i=n(66),a=n(6),o=n(9),s=n(2),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},u={updatePropertyByID:function(e,t,n){var r=a.getNode(e);l.hasOwnProperty(t)?s(!1):void 0,null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return r?!!n[r]:!1}function r(e){return n}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[i]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e){var t;if(null===e||e===!1)t=new o(i);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?u(!1):void 0,t="string"==typeof n.type?s.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):u(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var a=n(112),o=n(119),s=n(125),l=n(3),u=n(2),c=(n(4),function(){});l(c.prototype,a.Mixin,{_instantiateReactComponent:i}),e.exports=i},function(e,t,n){"use strict";/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, @@ -14,65 +14,66 @@ return e.valueLink?(i(e),e.valueLink.requestChange(t.target.value)):e.checkedLin * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ -function r(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&i&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(5);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(5),i=n(55),o=n(57),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){o(e,i(t))})),e.exports=a},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var i=typeof e,o=typeof t;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e){return m[e]}function i(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function o(e){return(""+e).replace(y,r)}function a(e){return"$"+o(e)}function s(e,t,n,r){var o=typeof e;if(("undefined"===o||"boolean"===o)&&(e=null),null===e||"string"===o||"number"===o||u.isValidElement(e))return n(r,e,""===t?d+i(e,0):t),1;var l,c,m=0,y=""===t?d:t+h;if(Array.isArray(e))for(var g=0;gbo&&setTimeout(function(){l.display.input.reset(!0)},20),Vt(this),Ki(),bt(this),this.curOp.forceUpdate=!0,Xr(this,i),r.autofocus&&!Ao||l.hasFocus()?setTimeout(ji(yn,this),20):gn(this);for(var c in Zo)Zo.hasOwnProperty(c)&&Zo[c](this,r[c],ea);E(this),r.finishInit&&r.finishInit(this);for(var p=0;pbo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),_o||mo&&Ao||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Be(e,100),e.state.modeGen++,e.curOp&&Ft(e)}function i(e){e.options.lineWrapping?(Ja(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Xa(e.display.wrapper,"CodeMirror-wrap"),f(e)),a(e),Ft(e),at(e),setTimeout(function(){v(e)},100)}function o(e){var t=gt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/vt(e.display)-3);return function(i){if(xr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;at.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function d(e){var t=Oi(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qe(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+ze(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=Vi("div",[Vi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Vi("div",[Vi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Aa(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Aa(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedOverlay=!1,vo&&8>bo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function y(){}function g(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Xa(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Aa(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?rn(t,e):nn(t,e)},t),t.display.scrollbars.addClass&&Ja(t.display.wrapper,t.display.scrollbars.addClass)}function v(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&I(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function _(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-We(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ti(t,r),a=ti(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=ti(t,ni(Jr(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=ti(t,ni(Jr(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function x(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=C(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ut(e))return!1;E(e)&&(Lt(e),t.dims=M(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),No&&(o=br(e.doc,o),a=_r(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Rt(e,o,a),n.viewOffset=ni(Jr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Ut(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Hi();return l>4&&(n.lineDiv.style.display="none"),F(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Hi()!=u&&u.offsetHeight&&u.focus(),Wi(n.cursorDiv),Wi(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Be(e,400)),n.updateLineNumbers=null,!0}function A(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ge(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qe(e.display)-Ye(e),n.top)}),t.visible=_(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&D(e,t);r=!1){I(e);var i=h(e);Me(e),T(e,i),v(e,i); -}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function P(e,t){var n=new S(e,t);if(D(e,n)){I(e),A(e,n);var r=h(e);Me(e),T(e,r),v(e,r),n.finish()}}function T(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+ze(e),t.clientHeight)+"px"}function I(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rbo){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var l=o.line.height-i;if(2>i&&(i=gt(t)),(l>.001||-.001>l)&&(Zr(o.line,i),O(o.line),o.rest))for(var u=0;u=t&&p.lineNumber;p.changes&&(Oi(p.changes,"gutter")>-1&&(f=!1),N(e,p,u,n)),f&&(Wi(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(w(e.options,u)))),s=p.node.nextSibling}else{var d=q(e,p,u,n);a.insertBefore(d,s)}u+=p.size}for(;s;)s=r(s)}function N(e,t,n,r){for(var i=0;ibo&&(e.node.style.zIndex=2)),e.node}function j(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=L(e);e.background=n.insertBefore(Vi("div",null,t),n.firstChild)}}function B(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):jr(e,t)}function R(e,t){var n=t.text.className,r=B(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,U(t)):n&&(t.text.className=n)}function U(e){j(e),e.line.wrapClass?L(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function V(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=L(t);t.gutterBackground=Vi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=L(t),a=t.gutter=Vi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),i.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Vi("div",w(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s1)if(Bo&&Bo.join("\n")==t){if(r.ranges.length%Bo.length==0){l=[];for(var u=0;u=0;u--){var c=r.ranges[u],p=c.from(),f=c.to();c.empty()&&(n&&n>0?p=Lo(p.line,p.ch-n):e.state.overwrite&&!a&&(f=Lo(f.line,Math.min(Jr(o,f.line).text.length,f.ch+Ii(s).length))));var d=e.curOp.updateInput,h={from:p,to:f,text:l?l[u%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Sn(e.doc,h),wi(e,"inputRead",e,h)}t&&!a&&ee(e,t),jn(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),$(t)||t.options.disableInput||At(t,function(){Q(t,n,0,null,"paste")}),!0):void 0}function ee(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Rn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Jr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Rn(e,i.head.line,"smart"));a&&wi(e,"electricInput",e,i.head.line)}}}function te(e){for(var t=[],n=[],r=0;ri?u.map:c[i],a=0;ai?e.line:e.rest[i]),p=o[a]+r;return(0>r||s!=t)&&(p=o[a+(r?1:0)]),Lo(l,p)}}}var i=e.text.firstChild,o=!1;if(!t||!Ga(i,t))return se(Lo(ei(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Ii(e.rest):e.line;return se(Lo(ei(a),a.text.length),o)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var u=e.measure,c=u.maps,p=r(s,l,n);if(p)return se(p,o);for(var f=l.nextSibling,d=s?s.nodeValue.length-n:0;f;f=f.nextSibling){if(p=r(f,f.firstChild,0))return se(Lo(p.line,p.ch-d),o);d+=f.textContent.length}for(var h=l.previousSibling,d=n;h;h=h.previousSibling){if(p=r(h,h.firstChild,-1))return se(Lo(p.line,p.ch+d),o);d+=f.textContent.length}}function ce(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var c,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(Lo(r,0),Lo(i+1,0),o(+p));return void(f.length&&(c=f[0].find())&&(s+=$r(e.doc,c.from,c.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var a=X(o.from(),i.from()),s=K(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new fe(l?s:a,l?a:s))}}return new pe(e,t)}function he(e,t){return new pe([new fe(e,t||e)],0)}function me(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ye(e,t){if(t.linen?Lo(n,Jr(e,n).text.length):ge(t,Jr(e,t.line).text.length)}function ge(e,t){var n=e.ch;return null==n||n>t?Lo(e.line,t):0>n?Lo(e.line,0):e}function ve(e,t){return t>=e.first&&t=o.ch:u.to>o.ch))){if(r&&(Ia(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var p=c.find(0>a?-1:1);if(0==jo(p,o)&&(p.ch+=a,p.ch<0?p=p.line>e.first?ye(e,Lo(p.line-1)):null:p.ch>s.text.length&&(p=p.linet&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(Vi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return pt(e,Lo(t,n),"div",p,r)}var s,l,p=Jr(a,t),f=p.text.length;return Zi(ri(p),n||0,null==i?f:i,function(e,t,a){var p,d,h,m=o(e,"left");if(e==t)p=m,d=h=m.left;else{if(p=o(t-1,"right"),"rtl"==a){var y=m;m=p,p=y}d=m.left,h=p.right}null==n&&0==e&&(d=u),p.top-m.top>3&&(r(d,m.top,null,m.bottom),d=u,m.bottoml.bottom||p.bottom==l.bottom&&p.right>l.right)&&(l=p),u+1>d&&(d=u),r(d,p.top,h-d,p.bottom)}),{start:s,end:l}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),l=He(e.display),u=l.left,c=Math.max(o.sizerWidth,Ge(e)-o.sizer.offsetLeft)-l.right,p=t.from(),f=t.to();if(p.line==f.line)i(p.line,p.ch,f.ch);else{var d=Jr(a,p.line),h=Jr(a,f.line),m=gr(d)==gr(h),y=i(p.line,p.ch,m?d.text.length+1:null).end,g=i(f.line,m?0:null,f.ch).start;m&&(y.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Be(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=aa(t.mode,Ve(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength,l=Mr(e,o,s?aa(t.mode,r):r,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var p=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!p&&fn?(Be(e,e.options.workDelay),!0):void 0}),i.length&&At(e,function(){for(var t=0;ta;--s){if(s<=o.first)return o.first;var l=Jr(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=Ba(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Ve(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Ue(e,t,n),a=o>r.first&&Jr(r,o-1).stateAfter;return a=a?aa(r.mode,a):sa(r.mode),r.iter(o,t,function(n){Nr(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Xe(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Je(e,t){t=gr(t);var n=ei(t),r=e.display.externalMeasured=new Ot(e.doc,t,n);r.lineN=n;var i=r.built=jr(e,r);return r.text=i.pre,qi(e.display.lineMeasure,i.pre),r}function $e(e,t,n,r){return et(e,Ze(e,t),n,r)}function Qe(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,a="left"):u>t?(i=t-l,o=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(o=u-l,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],a="left";if("right"==n&&i==u-l)for(;sc;c++){for(;s&&Ui(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+lbo&&0==s&&l==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(vo&&e.options.lineWrapping){var p=Wa(a,s,l).getClientRects();i=p.length?p["right"==r?p.length-1:0]:Wo}else i=Wa(a,s,l).getBoundingClientRect()||Wo;if(i.left||i.right||0==s)break;l=s,s-=1,u="right"}vo&&11>bo&&(i=rt(e.display.measure,i))}else{s>0&&(u=r="right");var p;i=e.options.lineWrapping&&(p=a.getClientRects()).length>1?p["right"==r?p.length-1:0]:a.getBoundingClientRect()}if(vo&&9>bo&&!s&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+vt(e.display),top:f.top,bottom:f.bottom}:Wo}for(var d=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(d+h)/2,y=t.view.measure.heights,c=0;cn.from?a(e-1):a(e,r)}r=r||Jr(e.doc,t.line),i||(i=Ze(e,r));var l=ri(r),u=t.ch;if(!l)return a(u);var c=lo(l,u),p=s(u,c);return null!=is&&(p.other=s(u,is)),p}function dt(e,t){var n=0,t=ye(e.doc,t);e.options.lineWrapping||(n=vt(e.display)*t.ch);var r=Jr(e.doc,t.line),i=ni(r)+We(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function ht(e,t,n,r){var i=Lo(e,t);return i.xRel=r,n&&(i.outside=!0),i}function mt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return ht(r.first,0,!0,-1);var i=ti(r,n),o=r.first+r.size-1;if(i>o)return ht(r.first+r.size-1,Jr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Jr(r,i);;){var s=yt(e,a,i,t,n),l=mr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=ei(a=u.to.line)}}function yt(e,t,n,r,i){function o(r){var i=ft(e,Lo(n,r),"line",t,u);return s=!0,a>i.bottom?i.left-l:ay)return ht(n,d,g,1);for(;;){if(c?d==f||d==co(t,f,1):1>=d-f){for(var v=h>r||y-r>=r-h?f:d,b=r-(v==f?h:y);Ui(t.text.charAt(v));)++v;var _=ht(n,v,v==f?m:g,-1>b?-1:b>1?1:0);return _}var x=Math.ceil(p/2),E=f+x;if(c){E=f;for(var w=0;x>w;++w)E=co(t,E,1)}var C=o(E);C>r?(d=E,y=C,(g=s)&&(y+=1e3),p=x):(f=E,h=C,m=s,p-=x)}}function gt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ro){Ro=Vi("pre");for(var t=0;49>t;++t)Ro.appendChild(document.createTextNode("x")),Ro.appendChild(Vi("br"));Ro.appendChild(document.createTextNode("x"))}qi(e.measure,Ro);var n=Ro.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Wi(e.measure),n||1}function vt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Vi("span","xxxxxxxxxx"),n=Vi("pre",[t]);qi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function bt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ho},qo?qo.ops.push(e.curOp):e.curOp.ownsGroup=qo={ops:[e.curOp],delayedCallbacks:[]}}function _t(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new S(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&D(e.cm,e.update)}function St(e){var t=e.cm,n=t.display;e.updatedDisplay&&I(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=$e(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+ze(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ge(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function kt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var a=new Ot(e.doc,Jr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Ft(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)No&&br(e.doc,t)i.viewFrom?Lt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Lt(e);else if(t<=i.viewFrom){var o=Bt(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Lt(e)}else if(n>=i.viewTo){var o=Bt(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Lt(e)}else{var a=Bt(e,t,t,-1),s=Bt(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Mt(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Lt(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var o=r.view[jt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Oi(a,n)&&a.push(n)}}}function Lt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function jt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Bt(e,t,n,r){var i,o=jt(e,t),a=e.display.view;if(!No||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;br(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function Rt(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,jt(e,n)))), -r.viewTo=n}function Ut(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Aa(i.scroller,"mousedown",Pt(e,Gt)),vo&&11>bo?Aa(i.scroller,"dblclick",Pt(e,function(t){if(!Si(e,t)){var n=zt(e,t);if(n&&!$t(e,t)&&!Ht(e.display,t)){Sa(t);var r=e.findWordAt(n);xe(e.doc,r.anchor,r.head)}}})):Aa(i.scroller,"dblclick",function(t){Si(e,t)||Sa(t)}),Mo||Aa(i.scroller,"contextmenu",function(t){vn(e,t)});var o,a={end:0};Aa(i.scroller,"touchstart",function(e){if(!n(e)){clearTimeout(o);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-a.end<=300?a:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),Aa(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Aa(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Ht(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new fe(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new fe(Lo(s.line,0),ye(e.doc,Lo(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Sa(n)}t()}),Aa(i.scroller,"touchcancel",t),Aa(i.scroller,"scroll",function(){i.scroller.clientHeight&&(nn(e,i.scroller.scrollTop),rn(e,i.scroller.scrollLeft,!0),Ia(e,"scroll",e))}),Aa(i.scroller,"mousewheel",function(t){on(e,t)}),Aa(i.scroller,"DOMMouseScroll",function(t){on(e,t)}),Aa(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Si(e,t)||Da(t)},over:function(t){Si(e,t)||(en(e,t),Da(t))},start:function(t){Zt(e,t)},drop:Pt(e,Qt),leave:function(){tn(e)}};var s=i.input.getField();Aa(s,"keyup",function(t){dn.call(e,t)}),Aa(s,"keydown",Pt(e,pn)),Aa(s,"keypress",Pt(e,hn)),Aa(s,"focus",ji(yn,e)),Aa(s,"blur",ji(gn,e))}function Wt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?Aa:Ta;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.enter),a(t.display.scroller,"dragover",o.over),a(t.display.scroller,"dragleave",o.leave),a(t.display.scroller,"drop",o.drop)}}function qt(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Ht(e,t){for(var n=_i(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function zt(e,t,n,r){var i=e.display;if(!n&&"true"==_i(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=mt(e,o,a);if(r&&1==u.xRel&&(l=Jr(e.doc,u.line).text).length==u.ch){var c=Ba(l,l.length,e.options.tabSize)-l.length;u=Lo(u.line,Math.max(0,Math.round((o-He(e.display).left)/vt(e.display))-c))}return u}function Gt(e){var t=this,n=t.display;if(!(n.activeTouch&&n.input.supportsTouch()||Si(t,e))){if(n.shift=e.shiftKey,Ht(n,e))return void(_o||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!$t(t,e)){var r=zt(t,e);switch(window.focus(),xi(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Yt(t,e,r):_i(e)==n.scroller&&Sa(e);break;case 2:_o&&(t.state.lastMiddleDown=+new Date),r&&xe(t.doc,r),setTimeout(function(){n.input.focus()},20),Sa(e);break;case 3:Mo?vn(t,e):mn(t)}}}}function Yt(e,t,n){vo?setTimeout(ji(J,e),0):e.curOp.focus=Hi();var r,i=+new Date;Vo&&Vo.time>i-400&&0==jo(Vo.pos,n)?r="triple":Uo&&Uo.time>i-400&&0==jo(Uo.pos,n)?(r="double",Vo={time:i,pos:n}):(r="single",Uo={time:i,pos:n});var o,a=e.doc.sel,s=Po?t.metaKey:t.ctrlKey;e.options.dragDrop&&Qa&&!$(e)&&"single"==r&&(o=a.contains(n))>-1&&(jo((o=a.ranges[o]).from(),n)<0||n.xRel>0)&&(jo(o.to(),n)>0||n.xRel<0)?Kt(e,t,n,s):Xt(e,t,n,r,s)}function Kt(e,t,n,r){var i=e.display,o=+new Date,a=Pt(e,function(s){_o&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ta(document,"mouseup",a),Ta(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Sa(s),!r&&+new Date-200=h;h++){var g=Jr(u,h).text,v=Ra(g,l,o);l==d?i.push(new fe(Lo(h,v),Lo(h,v))):g.length>v&&i.push(new fe(Lo(h,v),Lo(h,Ra(g,d,o))))}i.length||i.push(new fe(n,n)),De(u,de(f.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,_=b.anchor,x=t;if("single"!=r){if("double"==r)var E=e.findWordAt(t);else var E=new fe(Lo(t.line,0),ye(u,Lo(t.line+1,0)));jo(E.anchor,_)>0?(x=E.head,_=X(b.from(),E.anchor)):(x=E.anchor,_=K(b.to(),E.head))}var i=f.ranges.slice(0);i[p]=new fe(ye(u,_),x),De(u,de(i,p),La)}}function a(t){var n=++v,i=zt(e,t,!0,"rect"==r);if(i)if(0!=jo(i,y)){e.curOp.focus=Hi(),o(i);var s=_(l,u);(i.line>=s.to||i.lineg.bottom?20:0;c&&setTimeout(Pt(e,function(){v==n&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(t){e.state.selectingText=!1,v=1/0,Sa(t),l.input.focus(),Ta(document,"mousemove",b),Ta(document,"mouseup",x),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;Sa(t);var c,p,f=u.sel,d=f.ranges;if(i&&!t.shiftKey?(p=u.sel.contains(n),c=p>-1?d[p]:new fe(n,n)):(c=u.sel.primary(),p=u.sel.primIndex),t.altKey)r="rect",i||(c=new fe(n,n)),n=zt(e,t,!0,!0),p=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||u.extend?_e(u,c,h.anchor,h.head):h}else if("triple"==r){var m=new fe(Lo(n.line,0),ye(u,Lo(n.line+1,0)));c=e.display.shift||u.extend?_e(u,c,m.anchor,m.head):m}else c=_e(u,c,n);i?-1==p?(p=d.length,De(u,de(d.concat([c]),p),{scroll:!1,origin:"*mouse"})):d.length>1&&d[p].empty()&&"single"==r&&!t.shiftKey?(De(u,de(d.slice(0,p).concat(d.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),f=u.sel):we(u,p,c,La):(p=0,De(u,new pe([c],0),La),f=u.sel);var y=n,g=l.wrapper.getBoundingClientRect(),v=0,b=Pt(e,function(e){xi(e)?a(e):s(e)}),x=Pt(e,s);e.state.selectingText=x,Aa(document,"mousemove",b),Aa(document,"mouseup",x)}function Jt(e,t,n,r,i){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Sa(t);var s=e.display,l=s.lineDiv.getBoundingClientRect();if(a>l.bottom||!Di(e,n))return bi(t);a-=l.top-s.viewOffset;for(var u=0;u=o){var p=ti(e.doc,a),f=e.options.gutters[u];return i(e,n,e,p,f,t),bi(t)}}}function $t(e,t){return Jt(e,t,"gutterClick",!0,wi)}function Qt(e){var t=this;if(tn(t),!Si(t,e)&&!Ht(t.display,e)){Sa(e),vo&&(zo=+new Date);var n=zt(t,e,!0),r=e.dataTransfer.files;if(n&&!$(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){if(!t.options.allowDropFileTypes||-1!=Oi(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=Pt(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++a==i){n=ye(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Sn(t.doc,l),ke(t.doc,he(n,$o(l)))}}),s.readAsText(e)}},l=0;i>l;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Po?e.altKey:e.ctrlKey))var u=t.listSelections();if(Ae(t.doc,he(n,n)),u)for(var l=0;la.clientWidth,l=a.scrollHeight>a.clientHeight;if(r&&s||i&&l){if(i&&Po&&_o)e:for(var u=t.target,c=o.view;u!=a;u=u.parentNode)for(var p=0;pf?d=Math.max(0,d+f-50):h=Math.min(e.doc.height,h+f+50),P(e,{top:d,bottom:h})}20>Go&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Yo=(Yo*Go+n)/(Go+1),++Go)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function an(e,t,n){if("string"==typeof t&&(t=la[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{$(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Fa}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function sn(e,t,n){for(var r=0;rbo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=un(t,e);wo&&(Jo=r?n:null,!r&&88==n&&!ts&&(Po?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||fn(t)}}function fn(e){function t(e){18!=e.keyCode&&e.altKey||(Xa(n,"CodeMirror-crosshair"),Ta(document,"keyup",t),Ta(document,"mouseover",t))}var n=e.display.lineDiv;Ja(n,"CodeMirror-crosshair"),Aa(document,"keyup",t),Aa(document,"mouseover",t)}function dn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Si(this,e)}function hn(e){var t=this;if(!(Ht(t.display,e)||Si(t,e)||e.ctrlKey&&!e.altKey||Po&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(wo&&n==Jo)return Jo=null,void Sa(e);if(!wo||e.which&&!(e.which<10)||!un(t,e)){var i=String.fromCharCode(null==r?n:r);cn(t,e,i)||t.display.input.onKeyPress(e)}}}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,gn(e))},100)}function yn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ia(e,"focus",e),e.state.focused=!0,Ja(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),_o&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),je(e))}function gn(e){e.state.delayingBlurEvent||(e.state.focused&&(Ia(e,"blur",e),e.state.focused=!1,Xa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function vn(e,t){Ht(e.display,t)||bn(e,t)||Si(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function bn(e,t){return Di(e,"gutterContextMenu")?Jt(e,t,"gutterContextMenu",!1,Ia):!1}function _n(e,t){if(jo(e,t.from)<0)return e;if(jo(e,t.to)<=0)return $o(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=$o(t).ch-t.to.ch),Lo(n,r)}function xn(e,t){for(var n=[],r=0;r=0;--i)kn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else kn(e,t)}}function kn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=jo(t.from,t.to)){var n=xn(e,t);li(e,t,n,e.cm?e.cm.curOp.id:NaN),Pn(e,t,n,ir(e,t));var r=[];Kr(e,function(e,n){n||-1!=Oi(r,e.history)||(vi(e.history,t),r.push(e.history)),Pn(e,t,null,ir(e,t))})}}function Dn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--l){var p=r.changes[l];if(p.origin=t,c&&!Cn(e,p,!1))return void(a.length=0);u.push(oi(e,p));var f=l?xn(e,p):Ii(a);Pn(e,p,f,ar(e,p)),!l&&e.cm&&e.cm.scrollIntoView({from:p.from,to:$o(p)});var d=[];Kr(e,function(e,t){t||-1!=Oi(d,e.history)||(vi(e.history,p),d.push(e.history)),Pn(e,p,null,ar(e,p))})}}}}function An(e,t){if(0!=t&&(e.first+=t,e.sel=new pe(Mi(e.sel.ranges,function(e){return new fe(Lo(e.anchor.line+t,e.anchor.ch),Lo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Ft(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Lo(o,Jr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$r(e,t.from,t.to),n||(n=xn(e,t)),e.cm?Tn(e.cm,t,r):zr(e,t,r),Ae(e,n,Na)}}function Tn(e,t,n){var r=e.doc,i=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=ei(gr(Jr(r,a.line))),r.iter(u,s.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&ki(e),zr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(e){var t=p(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),Be(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Ft(e):a.line!=s.line||1!=t.text.length||Hr(e.doc,t)?Ft(e,a.line,s.line+1,c):Nt(e,a.line,"text");var f=Di(e,"changes"),d=Di(e,"change");if(d||f){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&wi(e,"change",e,h),f&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function In(e,t,n,r,i){if(r||(r=n),jo(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Sn(e,{from:n,to:r,text:t,origin:i})}function On(e,t){if(!Si(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!ko){var o=Vi("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-We(e.display))+"px; height: "+(t.bottom-t.top+ze(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Mn(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=ft(e,t),s=n&&n!=t?ft(e,n):a,l=Nn(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(nn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(rn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function Fn(e,t,n,r,i){var o=Nn(e,t,n,r,i);null!=o.scrollTop&&nn(e,o.scrollTop),null!=o.scrollLeft&&rn(e,o.scrollLeft)}function Nn(e,t,n,r,i){var o=e.display,a=gt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Ye(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+qe(o),p=a>n,f=i>c-a;if(s>n)u.scrollTop=p?0:n;else if(i>s+l){var d=Math.min(n,(f?c:i)-l);d!=s&&(u.scrollTop=d)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=Ge(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),y=r-t>m;return y&&(r=t+m),10>t?u.scrollLeft=0:h>t?u.scrollLeft=Math.max(0,t-(y?0:10)):r>m+h-3&&(u.scrollLeft=r+(y?0:10)-m),u}function Ln(e,t,n){(null!=t||null!=n)&&Bn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function jn(e){Bn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Lo(t.line,t.ch-1):t,r=Lo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Bn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dt(e,t.from),r=dt(e,t.to),i=Nn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Rn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ve(e,t):n="prev");var a=e.options.tabSize,s=Jr(o,t),l=Ba(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==Fa||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Ba(Jr(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var p="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/a);d;--d)f+=a,p+=" ";if(u>f&&(p+=Ti(u-f)),p!=c)return In(o,p,Lo(t,0),Lo(t,c.length),"+input"),s.stateAfter=null,!0;for(var d=0;d=0;t--)In(e.doc,"",r[t].from,r[t].to,"+delete");jn(e)})}function Wn(e,t,n,r,i){function o(){var t=s+n;return t=e.first+e.size?p=!1:(s=t,c=Jr(e,t))}function a(e){var t=(i?co:po)(c,l,n,!0);if(null==t){if(e||!o())return p=!1;l=i?(0>n?ro:no)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Jr(e,s),p=!0;if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var f=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),m=!0;!(0>n)||a(!m);m=!1){var y=c.text.charAt(l)||"\n",g=Bi(y,h)?"w":d&&"\n"==y?"n":!d||/\s/.test(y)?null:"p";if(!d||m||g||(g="s"),f&&f!=g){0>n&&(n=1,a());break}if(g&&(f=g),n>0&&!a(!m))break}var v=Oe(e,Lo(s,l),u,!0);return p||(v.hitSide=!0),v}function qn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*gt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=mt(e,a,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function Hn(t,n,r,i){e.defaults[t]=n,r&&(Zo[t]=i?function(e,t,n){n!=ea&&r(e,t,n)}:r)}function zn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Vi("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(yr(e,t.line,t,n,o)||t.line!=n.line&&yr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");No=!0}o.addToHistory&&li(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&gr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Zr(e,0),tr(e,new Qn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){xr(e,t)&&Zr(t,0)}),o.clearOnEnter&&Aa(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Fo=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ha,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Ft(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)Nt(u,c,"text");o.atomic&&Te(u.doc),wi(u,"markerAdded",u,o)}return o}function Kn(e,t,n,r,i){r=Li(r),r.shared=!1;var o=[Yn(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Kr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Yn(e,ye(e,t),ye(e,n),r,i));for(var l=0;l=t:o.to>t);(r||(r=[])).push(new Qn(a,o.from,l?null:o.to))}}return r}function rr(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var p=0;pp;++p)h.push(m);h.push(l)}return h}function or(e){for(var t=0;t0)){var c=[l,1],p=jo(u.from,s.from),f=jo(u.to,s.to);(0>p||!a.inclusiveLeft&&!p)&&c.push({from:u.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function lr(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=p||0>=c&&p>=0)&&(0>=c&&(jo(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(jo(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function gr(e){for(var t;t=hr(e);)e=t.find(-1,!0).line;return e}function vr(e){for(var t,n;t=mr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function br(e,t){var n=Jr(e,t),r=gr(n);return n==r?t:ei(r)}function _r(e,t){if(t>e.lastLine())return t;var n,r=Jr(e,t);if(!xr(e,r))return t;for(;n=mr(r);)r=n.find(1,!0).line;return ei(r)+1}function xr(e,t){var n=No&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Ir(e,t,n,r){function i(e){return{start:p.start,end:p.pos,string:p.current(),type:o||null,state:e?aa(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=ye(a,t);var l,u=Jr(a,t.line),c=Ve(e,t.line,n),p=new da(u.text,e.options.tabSize);for(r&&(l=[]);(r||p.pose.options.maxHighlightLength?(s=!1,a&&Nr(e,t,r,p.pos),p.pos=t.length,l=null):l=Ar(Tr(n,p,r,f),o),f){var d=f[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||c!=l){for(;uu;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Fr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ve(e,ei(t)),i=Mr(e,t,t.text.length>e.options.maxHighlightLength?aa(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Nr(e,t,n,r){var i=e.doc.mode,o=new da(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Pr(i,n);!o.eol();)Tr(i,o,n),o.start=o.pos}function Lr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?_a:ba;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function jr(e,t){var n=Vi("span",null,null,_o?"padding-right: .1px":null),r={pre:Vi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(vo||_o)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Rr,$i(e.display.measure)&&(o=ri(a))&&(r.addToken=Vr(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&ei(a);qr(a,r,Fr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=Gi(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=Gi(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ji(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return _o&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),Ia(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Gi(r.pre.className,r.textClass||"")),r}function Br(e){var t=Vi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Rr(e,t,n,r,i,o,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,Ur):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),p=0;;){l.lastIndex=p;var f=l.exec(t),d=f?f.index-p:t.length-p;if(d){var h=document.createTextNode(s.slice(p,p+d));vo&&9>bo?c.appendChild(Vi("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+d,h),e.col+=d,e.pos+=d}if(!f)break;if(p+=d+1," "==f[0]){var m=e.cm.options.tabSize,y=m-e.col%m,h=c.appendChild(Vi("span",Ti(y),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=y}else if("\r"==f[0]||"\n"==f[0]){var h=c.appendChild(Vi("span","\r"==f[0]?"␍":"␤","cm-invalidchar"));h.setAttribute("cm-text",f[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(f[0]);h.setAttribute("cm-text",f[0]),vo&&9>bo?c.appendChild(Vi("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),vo&&9>bo&&(u=!0),e.pos+=t.length}if(n||r||i||u||a){var g=n||"";r&&(g+=r),i&&(g+=i);var v=Vi("span",[c],g,a);return o&&(v.title=o),e.content.appendChild(v)}e.content.appendChild(c)}}function Ur(e){for(var t=" ",n=0;nu&&f.from<=u)break}if(f.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,f.to-u),i,o,null,s,l),o=null,r=r.slice(f.to-u),u=f.to}}}function Wr(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function qr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,p,f,d=i.length,h=0,m=1,y="",g=0;;){if(g==h){l=u=c=p=s="",f=null,g=1/0;for(var v=[],b=0;bh||x.collapsed&&_.to==h&&_.from==h)?(null!=_.to&&_.to!=h&&g>_.to&&(g=_.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=x.css),x.startStyle&&_.from==h&&(c+=" "+x.startStyle),x.endStyle&&_.to==g&&(u+=" "+x.endStyle),x.title&&!p&&(p=x.title),x.collapsed&&(!f||fr(f.marker,x)<0)&&(f=_)):_.from>h&&g>_.from&&(g=_.from)}if(f&&(f.from||0)==h){if(Wr(t,(null==f.to?d+1:f.to)-h,f.marker,null==f.from),null==f.to)return;f.to==h&&(f=!1)}if(!f&&v.length)for(var b=0;b=d)break;for(var E=Math.min(d,g);;){if(y){var w=h+y.length;if(!f){var C=w>E?y.slice(0,E-h):y;t.addToken(t,C,a?a+l:l,c,h+C.length==g?u:"",p,s)}if(w>=E){y=y.slice(E-h),h=E;break}h=w,c=""}y=i.slice(o,o=n[m++]),a=Lr(n[m++],t.cm.options)}}else for(var m=1;mn;++n)o.push(new va(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=Jr(e,s.line),p=Jr(e,l.line),f=Ii(u),d=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Hr(e,t)){var m=a(0,u.length-1);o(p,p.text,d),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(c==p)if(1==u.length)o(c,c.text.slice(0,s.ch)+f+c.text.slice(l.ch),d);else{var m=a(1,u.length-1);m.push(new va(f+c.text.slice(l.ch),d,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,m)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+p.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(p,f+p.text.slice(l.ch),d);var m=a(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,m)}wi(e,"change",e,t)}function Gr(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function $r(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Qr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function Zr(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ei(e){if(null==e.parent)return null;for(var t=e.parent,n=Oi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ti(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=s}return n+r}function ni(e){e=gr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Ii(e.done)):void 0}function li(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=si(i,i.lastOp==r))){var s=Ii(o.changes);0==jo(t.from,t.to)&&0==jo(t.from,s.to)?s.to=$o(t):o.changes.push(oi(e,t))}else{var l=Ii(i.done);for(l&&l.ranges||pi(e.sel,i.done),o={changes:[oi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Ia(e,"historyAdded")}function ui(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ci(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ui(e,o,Ii(i.done),t))?i.done[i.done.length-1]=t:pi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&ai(i.undone)}function pi(e,t){var n=Ii(t);n&&n.ranges&&n.equals(e)||t.push(e)}function fi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function di(e){if(!e)return null;for(var t,n=0;n-1&&(Ii(s)[p]=c[p],delete c[p])}}}return i}function yi(e,t,n,r){n0?r.slice():Pa:r||Pa}function wi(e,t){function n(e){return function(){e.apply(null,o)}}var r=Ei(e,t,!1);if(r.length){var i,o=Array.prototype.slice.call(arguments,2);qo?i=qo.delayedCallbacks:Oa?i=Oa:(i=Oa=[],setTimeout(Ci,0));for(var a=0;a0}function Ai(e){e.prototype.on=function(e,t){Aa(this,e,t)},e.prototype.off=function(e,t){Ta(this,e,t)}}function Pi(){this.id=null}function Ti(e){for(;Ua.length<=e;)Ua.push(Ii(Ua)+" ");return Ua[e]}function Ii(e){return e[e.length-1]}function Oi(e,t){for(var n=0;n-1&&Ha(e)?!0:t.test(e):Ha(e)}function Ri(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Ui(e){return e.charCodeAt(0)>=768&&za.test(e)}function Vi(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function qi(e,t){return Wi(e).appendChild(t)}function Hi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function zi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Gi(e,t){for(var n=e.split(" "),r=0;r2&&!(vo&&8>bo))}var n=Ya?Vi("span","​"):Vi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function $i(e){if(null!=Ka)return Ka;var t=qi(e,document.createTextNode("AخA")),n=Wa(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Wa(t,1,2).getBoundingClientRect();return Ka=r.right-n.right<3}function Qi(e){if(null!=ns)return ns;var t=qi(e,Vi("span","x")),n=t.getBoundingClientRect(),r=Wa(t,0,1).getBoundingClientRect();return ns=Math.abs(n.left-r.left)>1}function Zi(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function eo(e){return e.level%2?e.to:e.from}function to(e){return e.level%2?e.from:e.to}function no(e){var t=ri(e);return t?eo(t[0]):0}function ro(e){var t=ri(e);return t?to(Ii(t)):e.text.length}function io(e,t){var n=Jr(e.doc,t),r=gr(n);r!=n&&(t=ei(r));var i=ri(r),o=i?i[0].level%2?ro(r):no(r):0;return Lo(t,o)}function oo(e,t){for(var n,r=Jr(e.doc,t);n=mr(r);)r=n.find(1,!0).line,t=null;var i=ri(r),o=i?i[0].level%2?no(r):ro(r):r.text.length;return Lo(null==t?ei(r):t,o)}function ao(e,t){var n=io(e,t.line),r=Jr(e.doc,n.line),i=ri(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Lo(n.line,a?0:o)}return n}function so(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function lo(e,t){is=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return so(e,i.level,e[n].level)?(i.from!=i.to&&(is=n),r):(i.from!=i.to&&(is=r),n);n=r}}return n}function uo(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Ui(e.text.charAt(t)));return t}function co(e,t,n,r){var i=ri(e);if(!i)return po(e,t,n,r);for(var o=lo(i,t),a=i[o],s=uo(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?uo(e,a.to,-1,r):uo(e,a.from,1,r)}}function po(e,t,n,r){var i=t+n;if(r)for(;i>0&&Ui(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var fo=navigator.userAgent,ho=navigator.platform,mo=/gecko\/\d/i.test(fo),yo=/MSIE \d/.test(fo),go=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fo),vo=yo||go,bo=vo&&(yo?document.documentMode||6:go[1]),_o=/WebKit\//.test(fo),xo=_o&&/Qt\/\d+\.\d+/.test(fo),Eo=/Chrome\//.test(fo),wo=/Opera\//.test(fo),Co=/Apple Computer/.test(navigator.vendor),So=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(fo),ko=/PhantomJS/.test(fo),Do=/AppleWebKit/.test(fo)&&/Mobile\/\w+/.test(fo),Ao=Do||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(fo),Po=Do||/Mac/.test(ho),To=/win/i.test(ho),Io=wo&&fo.match(/Version\/(\d*\.\d*)/);Io&&(Io=Number(Io[1])),Io&&Io>=15&&(wo=!1,_o=!0);var Oo=Po&&(xo||wo&&(null==Io||12.11>Io)),Mo=mo||vo&&bo>=9,Fo=!1,No=!1;m.prototype=Li({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=Po&&!So?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){_i(e)!=t.vert&&_i(e)!=t.horiz&&Pt(t.cm,Gt)(e)};Aa(this.vert,"mousedown",n),Aa(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),y.prototype=Li({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},y.prototype),e.scrollbarModel={"native":m,"null":y},S.prototype.signal=function(e,t){Di(e,t)&&this.events.push(arguments)},S.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Aa(o,"paste",function(e){return Z(e,r)?!0:(r.state.pasteIncoming=!0,void n.fastPoll())}),Aa(o,"cut",t),Aa(o,"copy",t),Aa(e.scroller,"paste",function(t){Ht(e,t)||(r.state.pasteIncoming=!0,n.focus())}),Aa(e.lineSpace,"selectstart",function(t){Ht(e,t)||Sa(t)}),Aa(o,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Aa(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=Fe(e);if(e.options.moveInputWithCursor){var i=ft(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;qi(n.cursorDiv,e.cursors),qi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=ts&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&Va(this.textarea),vo&&bo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",vo&&bo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ao||Hi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||es(t)&&!n&&!this.composing||$(e)||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(vo&&bo>=9&&this.hasSelection===r||Po&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var s=this;return At(e,function(){Q(e,r.slice(o),n.length-o,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){vo&&bo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",a.style.cssText=c,vo&&9>bo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!vo||vo&&9>bo)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Pt(i,la.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=zt(i,e),l=o.scroller.scrollTop;if(s&&!wo){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Pt(i,De)(i.doc,he(s),Na);var c=a.style.cssText;if(r.wrapper.style.position="absolute",a.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(vo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",_o)var p=window.scrollY;if(o.input.focus(),_o&&window.scrollTo(null,p),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),vo&&bo>=9&&t(),Mo){Da(e);var f=function(){Ta(window,"mouseup",f),setTimeout(n,20)};Aa(window,"mouseup",f)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Fi,needsContentAttribute:!1},re.prototype),oe.prototype=Li({init:function(e){function t(e){if(r.somethingSelected())Bo=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=te(r);Bo=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Na),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Do)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Bo.join("\n"));else{var n=ie(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Bo.join("\n");var o=document.activeElement;Va(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}var n=this,r=n.cm,i=n.div=e.lineDiv;ne(i),Aa(i,"paste",function(e){Z(e,r)}),Aa(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=he(Lo(i.head.line,a),Lo(i.head.line,a+t.length)))}}),Aa(i,"compositionupdate",function(e){n.composing.data=e.data}),Aa(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Aa(i,"touchstart",function(){n.forceCompositionEnd()}),Aa(i,"input",function(){n.composing||($(r)||!n.pollContent())&&At(n.cm,function(){Ft(r)})}),Aa(i,"copy",t),Aa(i,"cut",t)},prepareSelection:function(){var e=Fe(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=le(this.cm,e.anchorNode,e.anchorOffset),r=le(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=jo(X(n,r),t.from())||0!=jo(K(n,r),t.to())){var i=ae(this.cm,t.from()),o=ae(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var c=Wa(i.node,i.offset,o.offset,o.node)}catch(p){}c&&(e.removeAllRanges(),e.addRange(c),s&&null==e.anchorNode?e.addRange(s):mo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){qi(this.cm.display.cursorDiv,e.cursors),qi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ga(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():At(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=le(t,e.anchorNode,e.anchorOffset),r=le(t,e.focusNode,e.focusOffset);n&&r&&At(t,function(){De(t.doc,he(n,r),Na),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=jt(e,r.line)))var a=ei(t.view[0].line),s=t.view[0].node;else var a=ei(t.view[o].line),s=t.view[o-1].node.nextSibling;var l=jt(e,i.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.lineDiv.lastChild;else var u=ei(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var p=e.doc.splitLines(ce(e,s,c,a,u)),f=$r(e.doc,Lo(a,0),Lo(u,Jr(e.doc,u).text.length));p.length>1&&f.length>1;)if(Ii(p)==Ii(f))p.pop(),f.pop(),u--;else{if(p[0]!=f[0])break;p.shift(),f.shift(),a++}for(var d=0,h=0,m=p[0],y=f[0],g=Math.min(m.length,y.length);g>d&&m.charCodeAt(d)==y.charCodeAt(d);)++d;for(var v=Ii(p),b=Ii(f),_=Math.min(v.length-(1==p.length?d:0),b.length-(1==f.length?d:0));_>h&&v.charCodeAt(v.length-h-1)==b.charCodeAt(b.length-h-1);)++h;p[p.length-1]=v.slice(0,v.length-h),p[0]=p[0].slice(d);var x=Lo(a,d),E=Lo(u,f.length?Ii(f).length-h:0);return p.length>1||p[0]||jo(x,E)?(In(e.doc,p,x,E,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){$(this.cm)?Pt(this.cm,Ft)(this.cm):e.data&&e.data!=e.startData&&Pt(this.cm,Q)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),$(this.cm)||Pt(this.cm,Q)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Fi,resetPosition:Fi,needsContentAttribute:!0},oe.prototype),e.inputStyles={textarea:re,contenteditable:oe},pe.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&jo(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Ro,Uo,Vo,Wo={left:0,right:0,top:0,bottom:0},qo=null,Ho=0,zo=0,Go=0,Yo=null;vo?Yo=-.53:mo?Yo=15:Eo?Yo=-.7:Co&&(Yo=-1/3);var Ko=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Ko(e);return t.x*=Yo,t.y*=Yo,t};var Xo=new Pi,Jo=null,$o=e.changeEnd=function(e){return e.text?Lo(e.from.line+e.text.length-1,Ii(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,Zo.hasOwnProperty(e)&&Pt(this,Zo[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Gn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Rn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&jn(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)Rn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&we(this.doc,r,new fe(o,u[r].to()),Na)}}}),getTokenAt:function(e,t){return Ir(this,e,t)},getLineTokens:function(e,t){return Ir(this,Lo(e),t,!0)},getTokenTypeAt:function(e){e=ye(this.doc,e);var t,n=Fr(this,Jr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!oa.hasOwnProperty(t))return n;var r=oa[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Jr(this.doc,e)}else n=e;return ut(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ni(n):0)},defaultTextHeight:function(){return gt(this.display)},defaultCharWidth:function(){return vt(this.display)},setGutterMarker:Tt(function(e,t,n){return Un(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Ri(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Tt(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Nt(t,r,"gutter"),Ri(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Jr(this.doc,e),!e)return null}else{var t=ei(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=ft(this,ye(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Fn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Tt(pn),triggerOnKeyPress:Tt(hn),triggerOnKeyUp:dn,execCommand:function(e){return la.hasOwnProperty(e)?la[e].call(null,this):void 0},triggerElectric:Tt(function(e){ee(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=ye(this.doc,e);t>o&&(a=Wn(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Tt(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Wn(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},ja)}),deleteH:Tt(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Vn(this,function(n){var i=Wn(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,s=ye(this.doc,e);t>a;++a){var l=ft(this,s,"div");if(null==o?o=l.left:l.left=o,s=qn(this,l,i,n),s.hitSide)break}return s},moveV:Tt(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=ft(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=qn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Ln(n,null,pt(n,l,"div").top-s.top),l},ja),i.length)for(var a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&a(this),Ia(this,"refresh",this)}),swapDoc:Tt(function(e){var t=this.doc;return t.cm=null,Xr(this,e),at(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wi(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ai(e);var Qo=e.defaults={},Zo=e.optionHandlers={},ea=e.Init={toString:function(){return"CodeMirror.Init"}};Hn("value","",function(e,t){e.setValue(t)},!0),Hn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Hn("indentUnit",2,n,!0),Hn("indentWithTabs",!1),Hn("smartIndent",!0),Hn("tabSize",4,function(e){r(e),at(e),Ft(e)},!0),Hn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Lo(r,o))}r++});for(var i=n.length-1;i>=0;i--)In(e.doc,t,n[i],Lo(n[i].line,n[i].ch+t.length))}}),Hn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Hn("specialCharPlaceholder",Br,function(e){e.refresh()},!0),Hn("electricChars",!0),Hn("inputStyle",Ao?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Hn("rtlMoveVisually",!To),Hn("wholeLineUpdateBefore",!0),Hn("theme","default",function(e){s(e),l(e)},!0),Hn("keyMap","default",function(t,n,r){var i=Gn(n),o=r!=e.Init&&Gn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Hn("extraKeys",null),Hn("lineWrapping",!1,i,!0),Hn("gutters",[],function(e){d(e.options),l(e)},!0),Hn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?C(e.display)+"px":"0",e.refresh()},!0),Hn("coverGutterNextToScrollbar",!1,function(e){v(e)},!0),Hn("scrollbarStyle","native",function(e){g(e),v(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Hn("lineNumbers",!1,function(e){d(e.options),l(e)},!0),Hn("firstLineNumber",1,l,!0),Hn("lineNumberFormatter",function(e){return e},l,!0),Hn("showCursorWhenSelecting",!1,Me,!0),Hn("resetSelectionOnContextMenu",!0),Hn("lineWiseCopyCut",!0),Hn("readOnly",!1,function(e,t){"nocursor"==t?(gn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Hn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Hn("dragDrop",!0,Wt),Hn("allowDropFileTypes",null),Hn("cursorBlinkRate",530),Hn("cursorScrollMargin",0),Hn("cursorHeight",1,Me,!0),Hn("singleCursorHeightPerLine",!0,Me,!0),Hn("workTime",100),Hn("workDelay",100),Hn("flattenSpans",!0,r,!0),Hn("addModeClass",!1,r,!0),Hn("pollInterval",100),Hn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Hn("historyEventDelay",1250),Hn("viewportMargin",10,function(e){e.refresh()},!0),Hn("maxHighlightLength",1e4,r,!0),Hn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Hn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Hn("autofocus",null);var ta=e.modes={},na=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),ta[t]=n},e.defineMIME=function(e,t){na[e]=t},e.resolveMode=function(t){if("string"==typeof t&&na.hasOwnProperty(t))t=na[t];else if(t&&"string"==typeof t.name&&na.hasOwnProperty(t.name)){var n=na[t.name];"string"==typeof n&&(n={name:n}),t=Ni(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=ta[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(ra.hasOwnProperty(n.name)){var o=ra[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ra=e.modeExtensions={};e.extendMode=function(e,t){var n=ra.hasOwnProperty(e)?ra[e]:ra[e]={};Li(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Ea.prototype[e]=t},e.defineOption=Hn;var ia=[];e.defineInitHook=function(e){ia.push(e)};var oa=e.helpers={};e.registerHelper=function(t,n,r){oa.hasOwnProperty(t)||(oa[t]=e[t]={_global:[]}),oa[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),oa[t]._global.push({pred:r,val:i})};var aa=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},sa=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var la=e.commands={selectAll:function(e){e.setSelection(Lo(e.firstLine(),0),Lo(e.lastLine()),Na)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Na)},killLine:function(e){Vn(e,function(t){if(t.empty()){var n=Jr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Lo(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Lo(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Jr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Lo(i.line-1,a.length-1),Lo(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){At(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}jn(e)})},toggleOverwrite:function(e){e.toggleOverwrite()}},ua=e.keyMap={};ua.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ua.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ua.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ua.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ua["default"]=Po?ua.macDefault:ua.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Mi(n.split(" "),zn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ha=0,ma=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ha};Ai(ma),ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bt(e),Di(this,"clear")){var n=this.find();n&&wi(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Ft(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Te(e.doc)),e&&wi(e,"markerCleared",e,this),t&&xt(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Dr(i),wi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},Yr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Gr))){var s=[];this.collapse(s),this.children=[new Gr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),s=new Gr(a);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Yr(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Oi(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Yr(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var xa=0,Ea=e.Doc=function(e,t,n,r){if(!(this instanceof Ea))return new Ea(e,t,n,r);null==n&&(n=0),Yr.call(this,[new Gr([new va("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=Lo(n,0);this.sel=he(i),this.history=new ii(null),this.id=++xa,this.modeOption=t,this.lineSep=r,"string"==typeof e&&(e=this.splitLines(e)),zr(this,{from:i,to:i,text:e}),De(this,he(i),Na)};Ea.prototype=Ni(Yr.prototype,{constructor:Ea,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)Sn(this,r[o]);s?ke(this,s):this.cm&&jn(this.cm)}),undo:It(function(){Dn(this,"undo")}),redo:It(function(){Dn(this,"redo")}),undoSelection:It(function(){Dn(this,"undo",!0)}),redoSelection:It(function(){Dn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ye(this,e),t=ye(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;sl.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),ye(this,Lo(n,t))},indexFromPos:function(e){e=ye(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.tos||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},Ra=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}},Ua=[""],Va=function(e){e.select()};Do?Va=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:vo&&(Va=function(e){try{e.select()}catch(t){}});var Wa,qa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ha=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||qa.test(e))},za=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Wa=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ga=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};vo&&11>bo&&(Hi=function(){try{return document.activeElement}catch(e){return document.body}});var Ya,Ka,Xa=e.rmClass=function(e,t){var n=e.className,r=zi(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Ja=e.addClass=function(e,t){var n=e.className;zi(t).test(n)||(e.className+=(n?" ":"")+t)},$a=!1,Qa=function(){if(vo&&9>bo)return!1;var e=Vi("div");return"draggable"in e||"dragDrop"in e}(),Za=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},es=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},ts=function(){var e=Vi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ns=null,rs=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)rs[e+48]=rs[e+96]=String(e);for(var e=65;90>=e;e++)rs[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)rs[e+111]=rs[e+63235]="F"+e}();var is,os=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,p=[],f=0;c>f;++f)p.push(r=e(n.charCodeAt(f)));for(var f=0,d=u;c>f;++f){var r=p[f];"m"==r?p[f]=d:d=r}for(var f=0,h=u;c>f;++f){var r=p[f];"1"==r&&"r"==h?p[f]="n":a.test(r)&&(h=r,"r"==r&&(p[f]="R"))}for(var f=1,d=p[0];c-1>f;++f){var r=p[f];"+"==r&&"1"==d&&"1"==p[f+1]?p[f]="1":","!=r||d!=p[f+1]||"1"!=d&&"n"!=d||(p[f]=d),d=r}for(var f=0;c>f;++f){var r=p[f];if(","==r)p[f]="N";else if("%"==r){for(var m=f+1;c>m&&"%"==p[m];++m);for(var y=f&&"!"==p[f-1]||c>m&&"1"==p[m]?"1":"N",g=f;m>g;++g)p[g]=y;f=m-1}}for(var f=0,h=u;c>f;++f){var r=p[f];"L"==h&&"1"==r?p[f]="L":a.test(r)&&(h=r)}for(var f=0;c>f;++f)if(o.test(p[f])){for(var m=f+1;c>m&&o.test(p[m]);++m);for(var v="L"==(f?p[f-1]:u),b="L"==(c>m?p[m]:u),y=v||b?"L":"R",g=f;m>g;++g)p[g]=y;f=m-1}for(var _,x=[],f=0;c>f;)if(s.test(p[f])){var E=f;for(++f;c>f&&s.test(p[f]);++f);x.push(new t(0,E,f))}else{var w=f,C=x.length;for(++f;c>f&&"L"!=p[f];++f);for(var g=w;f>g;)if(l.test(p[g])){g>w&&x.splice(C,0,new t(1,w,g));var S=g;for(++g;f>g&&l.test(p[g]);++g);x.splice(C,0,new t(2,S,g)),w=g}else++g;f>w&&x.splice(C,0,new t(1,w,f))}return 1==x[0].level&&(_=n.match(/^\s+/))&&(x[0].from=_[0].length,x.unshift(new t(0,0,_[0].length))),1==Ii(x).level&&(_=n.match(/\s+$/))&&(Ii(x).to-=_[0].length,x.push(new t(0,c-_[0].length,c))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Ii(x).level&&x.push(new t(x[0].level,c,c)),x}}();return e.version="5.8.0",e})},function(e,t){e.exports={input:"style__input___-5wtK",header:"style__header___3HY2K",weekday:"style__weekday___aVmx6",month:"style__month___1TYi0",day:"style__day___38YhH",year:"style__year___mgUXp",wrapper:"style__wrapper___1e0Q3","display-years":"style__display-years___1-kIR","display-months":"style__display-months___8TM5f",dialog:"style__dialog___1K0QB",button:"style__button___3nwWZ"}},function(e,t){e.exports={root:"style__root___l67Fg",navigation:"style__navigation___3AeWt",label:"style__label___3pDnh",active:"style__active___1P7dt",disabled:"style__disabled___3zDPk",hidden:"style__hidden___YFhoi",pointer:"style__pointer___2yswv",tab:"style__tab___3H57r"}},function(e,t){e.exports={input:"style__input___2wDBo",header:"style__header___27KxH",hours:"style__hours___bh9kc",minutes:"style__minutes___2_O7G",separator:"style__separator___22VrP",ampm:"style__ampm___1Sb1x",am:"style__am___1F8JZ",pm:"style__pm___2LtFs",dialog:"style__dialog___2NNYy",button:"style__button___21dFg","display-hours":"style__display-hours___375-j","display-minutes":"style__display-minutes___3pGuR","format-am":"style__format-am___hbpFN","format-pm":"style__format-pm___1Lswh"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return u+e}function o(e,t){try{window.sessionStorage.setItem(i(e),JSON.stringify(t))}catch(n){if(n.name===c||0===window.sessionStorage.length)return void l["default"](!1,"[history] Unable to save state; sessionStorage is not available in Safari private mode");throw n}}function a(e){var t=window.sessionStorage.getItem(i(e));if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=o,t.readState=a;var s=n(30),l=r(s),u="@@History/",c="QuotaExceededError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){return s["default"](l.canUseDOM,"DOM history needs a DOM"),n.listen(e)}var n=p["default"](o({getUserConfirmation:u.getUserConfirmation},e,{go:u.go}));return o({},n,{listen:t})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0&&t=0&&m= 0 and < %s, was %s",h.length,m);var y=i(h);return f}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return function(){function t(e){return y&&null==e.basename&&(0===e.pathname.indexOf(y)?(e.pathname=e.pathname.substring(y.length),e.basename=y,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!y)return e;"string"==typeof e&&(e=p["default"](e));var t=e.pathname,n="/"===y.slice(-1)?y:y+"/",r="/"===t.charAt(0)?t.slice(1):t,i=n+r;return a({},e,{pathname:i})}function r(e){return v.listenBefore(function(n,r){u["default"](e,t(n),r)})}function o(e){return v.listen(function(n){e(t(n))})}function l(e,t){v.pushState(e,n(t))}function c(e,t){v.replaceState(e,n(t))}function f(e){return v.createPath(n(e))}function d(e){return v.createHref(n(e))}function h(){return t(v.createLocation.apply(v,arguments))}var m=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],y=m.basename,g=i(m,["basename"]),v=e(g);if(null==y&&s.canUseDOM){var b=document.getElementsByTagName("base")[0];b&&(y=b.href)}return a({},v,{listenBefore:r,listen:o,pushState:l,replaceState:c,createPath:f,createHref:d,createLocation:h})}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;tt;++t)e=d[t].call();return e}function r(e){return d.push(e),1===d.length&&(u.canUseDOM?p=i(n):l["default"](!1,"listenBeforeUnload only works in DOM environments")),function(){d=d.filter(function(t){return t!==e}),0===d.length&&p&&(p(),p=null)}}function o(e){u.canUseDOM&&-1===d.indexOf(e)&&(d.push(e),1===d.length&&(p=i(n)))}function s(e){d.length>0&&(d=d.filter(function(t){return t!==e}),0===d.length&&p())}var c=e(t),p=void 0,d=[];return a({},c,{listenBeforeUnload:r,registerBeforeUnloadHook:f["default"](o,"registerBeforeUnloadHook is deprecated; use listenBeforeUnload instead"),unregisterBeforeUnloadHook:f["default"](s,"unregisterBeforeUnloadHook is deprecated; use the callback returned from listenBeforeUnload instead")})}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;tr;++r)n.hexTable[r]="%"+((16>r?"0":"")+r.toString(16)).toUpperCase();t.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},r=0,i=e.length;i>r;++r)"undefined"!=typeof e[r]&&(n[r]=e[r]);return n},t.merge=function(e,n,r){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):"object"==typeof e?e[n]=!0:e=[e,n],e;if("object"!=typeof e)return e=[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e,r));for(var i=Object.keys(n),o=0,a=i.length;a>o;++o){var s=i[o],l=n[s];Object.prototype.hasOwnProperty.call(e,s)?e[s]=t.merge(e[s],l,r):e[s]=l}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;"string"!=typeof e&&(e=""+e);for(var t="",r=0,i=e.length;i>r;++r){var o=e.charCodeAt(r);45===o||46===o||95===o||126===o||o>=48&&57>=o||o>=65&&90>=o||o>=97&&122>=o?t+=e[r]:128>o?t+=n.hexTable[o]:2048>o?t+=n.hexTable[192|o>>6]+n.hexTable[128|63&o]:55296>o||o>=57344?t+=n.hexTable[224|o>>12]+n.hexTable[128|o>>6&63]+n.hexTable[128|63&o]:(++r,o=65536+((1023&o)<<10|1023&e.charCodeAt(r)),t+=n.hexTable[240|o>>18]+n.hexTable[128|o>>12&63]+n.hexTable[128|o>>6&63]+n.hexTable[128|63&o])}return t},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var r=n.indexOf(e);if(-1!==r)return n[r];if(n.push(e),Array.isArray(e)){for(var i=[],o=0,a=e.length;a>o;++o)"undefined"!=typeof e[o]&&i.push(e[o]);return i}var s=Object.keys(e);for(o=0,a=s.length;a>o;++o){var l=s[o];e[l]=t.compact(e[l],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return 0===e.button}function l(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function u(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t=0;r--){var i=e[r],o=i.path||"";if(n=o.replace(/\/*$/,"/")+n,0===o.indexOf("/"))break}return"/"+n},t.prototype.render=function(){c["default"](!1," elements are for router configuration only and should not be rendered")},a(t,null,[{key:"propTypes",value:{path:m,from:m,to:m.isRequired,query:y,state:y,onEnter:d.falsy,children:d.falsy},enumerable:!0}]),t}(l["default"].Component);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var i=n(263),o=n(124),a=n(9),s=n(57),l=n(79),u=n(2),c={dangerouslyReplaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,updateTextContent:l,processUpdates:function(e,t){for(var n,a=null,c=null,p=0;p-1?void 0:a(!1),!u.plugins[n]){t.extractEvents?void 0:a(!1),u.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:a(!1)}}}function i(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?a(!1):void 0,u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){u.registrationNameModules[e]?a(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(2),s=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s?a(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];l.hasOwnProperty(n)&&l[n]===i||(l[n]?a(!1):void 0,l[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=u},function(e,t,n){"use strict";function r(e){return(""+e).replace(_,"//")}function i(e,t){this.func=e,this.context=t,this.count=0}function o(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=i.getPooled(t,n);g(e,o,r),i.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function l(e,t,n){var i=e.result,o=e.keyPrefix,a=e.func,s=e.context,l=a.call(s,t,e.count++);Array.isArray(l)?u(l,i,n,y.thatReturnsArgument):null!=l&&(m.isValidElement(l)&&(l=m.cloneAndReplaceKey(l,o+(l!==t?r(l.key||"")+"/":"")+n)),i.push(l))}function u(e,t,n,i,o){var a="";null!=n&&(a=r(n)+"/");var u=s.getPooled(t,a,i,o);g(e,l,u),s.release(u)}function c(e,t,n){if(null==e)return e;var r=[];return u(e,r,null,t,n),r}function p(e,t,n){return null}function f(e,t){return g(e,p,null)}function d(e){var t=[];return u(e,t,null,y.thatReturnsArgument),t}var h=n(17),m=n(7),y=n(10),g=n(81),v=h.twoArgumentPooler,b=h.fourArgumentPooler,_=/\/(?!\/)/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(i,v),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,b);var x={forEach:a,map:c,mapIntoWithKeyPrefixInternal:u,count:f,toArray:d};e.exports=x},function(e,t,n){"use strict";function r(e,t){var n=E.hasOwnProperty(t)?E[t]:null;C.hasOwnProperty(t)&&(n!==_.OVERRIDE_BASE?y(!1):void 0),e.hasOwnProperty(t)&&(n!==_.DEFINE_MANY&&n!==_.DEFINE_MANY_MERGED?y(!1):void 0)}function i(e,t){if(t){"function"==typeof t?y(!1):void 0,f.isValidElement(t)?y(!1):void 0;var n=e.prototype;t.hasOwnProperty(b)&&w.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==b){var o=t[i];if(r(n,i),w.hasOwnProperty(i))w[i](e,o);else{var a=E.hasOwnProperty(i),u=n.hasOwnProperty(i),c="function"==typeof o,p=c&&!a&&!u&&t.autobind!==!1;if(p)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[i]=o,n[i]=o;else if(u){var d=E[i];!a||d!==_.DEFINE_MANY_MERGED&&d!==_.DEFINE_MANY?y(!1):void 0,d===_.DEFINE_MANY_MERGED?n[i]=s(n[i],o):d===_.DEFINE_MANY&&(n[i]=l(n[i],o))}else n[i]=o}}}}function o(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in w;i?y(!1):void 0;var o=n in e;o?y(!1):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:y(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?y(!1):void 0,e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return a(i,n),a(i,r),i}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=u(e,n)}}var p=n(111),f=n(7),d=(n(51),n(50),n(126)),h=n(3),m=n(36),y=n(2),g=n(58),v=n(19),b=(n(4),v({mixins:null})),_=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),x=[],E={mixins:_.DEFINE_MANY,statics:_.DEFINE_MANY,propTypes:_.DEFINE_MANY,contextTypes:_.DEFINE_MANY,childContextTypes:_.DEFINE_MANY,getDefaultProps:_.DEFINE_MANY_MERGED,getInitialState:_.DEFINE_MANY_MERGED,getChildContext:_.DEFINE_MANY_MERGED,render:_.DEFINE_ONCE,componentWillMount:_.DEFINE_MANY,componentDidMount:_.DEFINE_MANY,componentWillReceiveProps:_.DEFINE_MANY,shouldComponentUpdate:_.DEFINE_ONCE,componentWillUpdate:_.DEFINE_MANY,componentDidUpdate:_.DEFINE_MANY,componentWillUnmount:_.DEFINE_MANY,updateComponent:_.OVERRIDE_BASE},w={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n"+s+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var i=a.getNode(this._rootNodeID);r.updateTextContent(i,n)}}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(8),o=n(53),a=n(3),s=n(10),l={initialize:s,close:function(){f.isBatchingUpdates=!1}},u={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[u,l];a(r.prototype,o.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=f.isBatchingUpdates;f.isBatchingUpdates=!0,a?e(t,n,r,i,o):p.perform(e,null,t,n,r,i,o)}};e.exports=f},function(e,t,n){"use strict";function r(){if(!S){S=!0,g.EventEmitter.injectReactEventListener(y),g.EventPluginHub.injectEventPluginOrder(s),g.EventPluginHub.injectInstanceHandle(v),g.EventPluginHub.injectMount(b),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:w,EnterLeaveEventPlugin:l,ChangeEventPlugin:o,SelectEventPlugin:x,BeforeInputEventPlugin:i}),g.NativeComponent.injectGenericComponentClass(h),g.NativeComponent.injectTextComponentClass(m),g.Class.injectMixin(p),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(C),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(_),g.Updates.injectBatchingStrategy(d),g.RootIndex.injectCreateReactRootIndex(u.canUseDOM?a.createReactRootIndex:E.createReactRootIndex),g.Component.injectEnvironment(f)}}var i=n(259),o=n(261),a=n(262),s=n(264),l=n(265),u=n(5),c=n(268),p=n(269),f=n(68),d=n(116),h=n(274),m=n(115),y=n(282),g=n(283),v=n(24),b=n(6),_=n(287),x=n(297),E=n(298),w=n(299),C=n(296),S=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){if(p.current){var e=p.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;o("uniqueKey",e,t)}}function o(e,t,n){var i=r();if(!i){var o="string"==typeof n?n:n.displayName||n.name;o&&(i=" Check the top-level render call using <"+o+">.")}var a=h[e]||(h[e]={});if(a[i])return null;a[i]=!0;var s={parentOrOwner:i,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==p.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function a(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n/,o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(i," "+o.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=o},function(e,t,n){"use strict";var r=n(58),i=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=i},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=u(t)),n}function i(e){return c?void 0:l(!1),new c(e.type,e.props)}function o(e){return new f(e)}function a(e){return e instanceof f}var s=n(3),l=n(2),u=null,c=null,p={},f=null,d={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){s(p,e)}},h={getComponentClassForElement:r,createInternalComponent:i,createInstanceForText:o,isTextComponent:a,injection:d};e.exports=h},function(e,t,n){"use strict";function r(e,t){}var i=(n(4),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});e.exports=i},function(e,t,n){"use strict";function r(e){function t(t,n,r,i,o,a){if(i=i||E,a=a||r,null==n[r]){var s=b[o];return t?new Error("Required "+s+" `"+a+"` was not specified in "+("`"+i+"`.")):null}return e(n,r,i,o,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,i,o){var a=t[n],s=m(a);if(s!==e){var l=b[i],u=y(a);return new Error("Invalid "+l+" `"+o+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function o(){return r(_.thatReturns(null))}function a(e){function t(t,n,r,i,o){var a=t[n];if(!Array.isArray(a)){var s=b[i],l=m(a);return new Error("Invalid "+s+" `"+o+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u>"}var v=n(7),b=n(50),_=n(10),x=n(76),E="<>",w={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:o(),arrayOf:a,element:s(),instanceOf:l,node:f(),objectOf:c,oneOf:u,oneOfType:p,shape:d};e.exports=w},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(null==t?i(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var i=n(2);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=e,i=void 0===r[n];i&&null!=t&&(r[n]=t)}function i(e){if(null==e)return e;var t={};return o(e,r,t),t}var o=n(81);n(4);e.exports=i},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(5),o=null;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o(!1),e}var i=n(7),o=n(2);e.exports=r},function(e,t,n){"use strict";var r=n(10),i={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=i},function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,o=t;if(n=!1,r&&o){if(r===o)return!0;if(i(r))return!1;if(i(o)){e=r,t=o.parentNode,n=!0;continue e}return r.contains?r.contains(o):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(o)):!1}return!1}}var i=n(324);e.exports=r},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(e){return a?void 0:o(!1),f.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?f[e]:null}var i=n(5),o=n(2),a=i.canUseDOM?document.createElement("div"):null,s={},l=[1,'"],u=[1,"","
"],c=[3,"","
"],p=[1,'',""],f={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(e){f[e]=p,s[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o=r.bind(t),a=0;a1?arguments[1]:"utf8"):l(this,t)):arguments.length>1?new e(t,arguments[1]):new e(t)}function a(t,n){if(t=m(t,0>n?0:0|y(n)),!e.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)t[r]=0;return t}function s(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|v(t,n);return e=m(e,r),e.write(t,n),e}function l(t,n){if(e.isBuffer(n))return u(t,n);if(J(n))return c(t,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return p(t,n);if(n instanceof ArrayBuffer)return f(t,n)}return n.length?d(t,n):h(t,n)}function u(e,t){var n=0|y(t.length);return e=m(e,n),t.copy(e,0,0,n),e}function c(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function f(t,n){return e.TYPED_ARRAY_SUPPORT?(n.byteLength,t=e._augment(new Uint8Array(n))):t=p(t,new Uint8Array(n)),t}function d(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(e,t){var n,r=0;"Buffer"===t.type&&J(t.data)&&(n=t.data,r=0|y(n.length)),e=m(e,r);for(var i=0;r>i;i+=1)e[i]=255&n[i];return e}function m(t,n){e.TYPED_ARRAY_SUPPORT?(t=e._augment(new Uint8Array(n)),t.__proto__=e.prototype):(t.length=n,t._isBuffer=!0);var r=0!==n&&n<=e.poolSize>>>1;return r&&(t.parent=$),t}function y(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function g(t,n){if(!(this instanceof g))return new g(t,n);var r=new e(t,n);return delete r.parent,r}function v(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function b(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return P(this,t,n);case"binary":return T(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+a]=s}return a}function x(e,t,n,r){return Y(q(t,e.length-n),e,n,r)}function E(e,t,n,r){return Y(H(t),e,n,r)}function w(e,t,n,r){return E(e,t,n,r)}function C(e,t,n,r){return Y(G(t),e,n,r)}function S(e,t,n,r){return Y(z(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var l,u,c,p;switch(s){case 1:128>o&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(p=(31&o)<<6|63&l,p>127&&(a=p));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(p=(15&o)<<12|(63&l)<<6|63&u,p>2047&&(55296>p||p>57343)&&(a=p));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&1114112>p&&(a=p))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function I(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;o++)i+=W(e[o]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",o=0;oe)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function F(t,n,r,i,o,a){if(!e.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(n>o||a>n)throw new RangeError("value is out of bounds");if(r+i>t.length)throw new RangeError("index out of range")}function N(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);o>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);o>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(t>i||o>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function B(e,t,n,r,i){return i||j(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,i){return i||j(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,n,r,52,8),n+8}function U(e){if(e=V(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function V(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return 16>e?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;r>a;a++){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(e){return K.toByteArray(U(e))}function Y(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}/*! +function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var o=document.createElement("div");o.setAttribute(n,"return;"),r="function"==typeof o[n]}return!r&&i&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,a=n(5);a.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(5),i=n(55),a=n(57),o=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(o=function(e,t){a(e,i(t))})),e.exports=o},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var i=typeof e,a=typeof t;return"string"===i||"number"===i?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e){return m[e]}function i(e,t){return e&&null!=e.key?o(e.key):t.toString(36)}function a(e){return(""+e).replace(y,r)}function o(e){return"$"+a(e)}function s(e,t,n,r){var a=typeof e;if(("undefined"===a||"boolean"===a)&&(e=null),null===e||"string"===a||"number"===a||u.isValidElement(e))return n(r,e,""===t?d+i(e,0):t),1;var l,c,m=0,y=""===t?d:t+h;if(Array.isArray(e))for(var g=0;gva&&setTimeout(function(){l.display.input.reset(!0)},20),Vt(this),Ki(),bt(this),this.curOp.forceUpdate=!0,Xr(this,i),r.autofocus&&!Da||l.hasFocus()?setTimeout(Li(yn,this),20):gn(this);for(var c in Qa)Qa.hasOwnProperty(c)&&Qa[c](this,r[c],Za);E(this),r.finishInit&&r.finishInit(this);for(var p=0;pva&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),ba||ha&&Da||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Be(e,100),e.state.modeGen++,e.curOp&&jt(e)}function i(e){e.options.lineWrapping?(Jo(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Xo(e.display.wrapper,"CodeMirror-wrap"),f(e)),o(e),jt(e),ot(e),setTimeout(function(){v(e)},100)}function a(e){var t=gt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/vt(e.display)-3);return function(i){if(xr(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function d(e){var t=Oi(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qe(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+ze(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=Vi("div",[Vi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Vi("div",[Vi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ao(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ao(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedOverlay=!1,ga&&8>va&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function y(){}function g(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Xo(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ao(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?rn(t,e):nn(t,e)},t),t.display.scrollbars.addClass&&Jo(t.display.wrapper,t.display.scrollbars.addClass)}function v(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&I(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function _(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-We(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,a=ti(t,r),o=ti(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;a>s?(a=s,o=ti(t,ni(Jr(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(a=ti(t,ni(Jr(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function x(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=C(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;o=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ut(e))return!1;E(e)&&(Nt(e),t.dims=M(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),ja&&(a=br(e.doc,a),o=_r(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Rt(e,a,o),n.viewOffset=ni(Jr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Ut(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Hi();return l>4&&(n.lineDiv.style.display="none"),j(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Hi()!=u&&u.offsetHeight&&u.focus(),Wi(n.cursorDiv),Wi(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Be(e,400)),n.updateLineNumbers=null,!0}function A(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ge(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qe(e.display)-Ye(e),n.top)}),t.visible=_(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&D(e,t);r=!1){I(e);var i=h(e);Me(e),P(e,i),v(e,i)}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function T(e,t){var n=new S(e,t);if(D(e,n)){I(e),A(e,n);var r=h(e);Me(e),P(e,r),v(e,r),n.finish()}}function P(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+ze(e),t.clientHeight)+"px"}function I(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rva){var o=a.node.offsetTop+a.node.offsetHeight;i=o-n,n=o}else{var s=a.node.getBoundingClientRect();i=s.bottom-s.top}var l=a.line.height-i;if(2>i&&(i=gt(t)),(l>.001||-.001>l)&&(Zr(a.line,i),O(a.line),a.rest))for(var u=0;u=t&&p.lineNumber;p.changes&&(Oi(p.changes,"gutter")>-1&&(f=!1),F(e,p,u,n)),f&&(Wi(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(w(e.options,u)))),s=p.node.nextSibling}else{var d=q(e,p,u,n);o.insertBefore(d,s)}u+=p.size}for(;s;)s=r(s)}function F(e,t,n,r){for(var i=0;iva&&(e.node.style.zIndex=2)),e.node}function L(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass; +if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=N(e);e.background=n.insertBefore(Vi("div",null,t),n.firstChild)}}function B(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Lr(e,t)}function R(e,t){var n=t.text.className,r=B(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,U(t)):n&&(t.text.className=n)}function U(e){L(e),e.line.wrapClass?N(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function V(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=N(t);t.gutterBackground=Vi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var i=N(t),o=t.gutter=Vi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(o),i.insertBefore(o,t.text),t.line.gutterClass&&(o.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=o.appendChild(Vi("div",w(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var s=0;s1)if(La&&La.join("\n")==t){if(r.ranges.length%La.length==0){l=[];for(var u=0;u=0;u--){var c=r.ranges[u],p=c.from(),f=c.to();c.empty()&&(n&&n>0?p=Fa(p.line,p.ch-n):e.state.overwrite&&!o&&(f=Fa(f.line,Math.min(Jr(a,f.line).text.length,f.ch+Ii(s).length))));var d=e.curOp.updateInput,h={from:p,to:f,text:l?l[u%l.length]:s,origin:i||(o?"paste":e.state.cutIncoming?"cut":"+input")};Sn(e.doc,h),wi(e,"inputRead",e,h)}t&&!o&&ee(e,t),Ln(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),$(t)||t.options.disableInput||At(t,function(){Q(t,n,0,null,"paste")}),!0):void 0}function ee(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Rn(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Jr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Rn(e,i.head.line,"smart"));o&&wi(e,"electricInput",e,i.head.line)}}}function te(e){for(var t=[],n=[],r=0;ri?u.map:c[i],o=0;oi?e.line:e.rest[i]),p=a[o]+r;return(0>r||s!=t)&&(p=a[o+(r?1:0)]),Fa(l,p)}}}var i=e.text.firstChild,a=!1;if(!t||!Go(i,t))return se(Fa(ei(e.line),0),!0);if(t==i&&(a=!0,t=i.childNodes[n],n=0,!t)){var o=e.rest?Ii(e.rest):e.line;return se(Fa(ei(o),o.text.length),a)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var u=e.measure,c=u.maps,p=r(s,l,n);if(p)return se(p,a);for(var f=l.nextSibling,d=s?s.nodeValue.length-n:0;f;f=f.nextSibling){if(p=r(f,f.firstChild,0))return se(Fa(p.line,p.ch-d),a);d+=f.textContent.length}for(var h=l.previousSibling,d=n;h;h=h.previousSibling){if(p=r(h,h.firstChild,-1))return se(Fa(p.line,p.ch+d),a);d+=f.textContent.length}}function ce(e,t,n,r,i){function a(e){return function(t){return t.id==e}}function o(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var c,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(Fa(r,0),Fa(i+1,0),a(+p));return void(f.length&&(c=f[0].find())&&(s+=$r(e.doc,c.from,c.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var o=X(a.from(),i.from()),s=K(a.to(),i.to()),l=a.empty()?i.from()==i.head:a.from()==a.head;t>=r&&--t,e.splice(--r,2,new fe(l?s:o,l?o:s))}}return new pe(e,t)}function he(e,t){return new pe([new fe(e,t||e)],0)}function me(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ye(e,t){if(t.linen?Fa(n,Jr(e,n).text.length):ge(t,Jr(e,t.line).text.length)}function ge(e,t){var n=e.ch;return null==n||n>t?Fa(e.line,t):0>n?Fa(e.line,0):e}function ve(e,t){return t>=e.first&&t=a.ch:u.to>a.ch))){if(r&&(Io(c,"beforeCursorEnter"),c.explicitlyCleared)){if(s.markedSpans){--l;continue}break}if(!c.atomic)continue;var p=c.find(0>o?-1:1);if(0==Na(p,a)&&(p.ch+=o,p.ch<0?p=p.line>e.first?ye(e,Fa(p.line-1)):null:p.ch>s.text.length&&(p=p.linet&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(Vi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function a(n,r){return pt(e,Fa(t,n),"div",p,r)}var s,l,p=Jr(o,t),f=p.text.length;return Zi(ri(p),n||0,null==i?f:i,function(e,t,o){var p,d,h,m=a(e,"left");if(e==t)p=m,d=h=m.left;else{if(p=a(t-1,"right"),"rtl"==o){var y=m;m=p,p=y}d=m.left,h=p.right}null==n&&0==e&&(d=u),p.top-m.top>3&&(r(d,m.top,null,m.bottom),d=u,m.bottoml.bottom||p.bottom==l.bottom&&p.right>l.right)&&(l=p),u+1>d&&(d=u),r(d,p.top,h-d,p.bottom)}),{start:s,end:l}}var a=e.display,o=e.doc,s=document.createDocumentFragment(),l=He(e.display),u=l.left,c=Math.max(a.sizerWidth,Ge(e)-a.sizer.offsetLeft)-l.right,p=t.from(),f=t.to();if(p.line==f.line)i(p.line,p.ch,f.ch);else{var d=Jr(o,p.line),h=Jr(o,f.line),m=gr(d)==gr(h),y=i(p.line,p.ch,m?d.text.length+1:null).end,g=i(f.line,m?0:null,f.ch).start;m&&(y.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Be(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ao(t.mode,Ve(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(t.frontier>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength,l=Mr(e,a,s?ao(t.mode,r):r,!0);a.styles=l.styles;var u=a.styleClasses,c=l.classes;c?a.styleClasses=c:u&&(a.styleClasses=null);for(var p=!o||o.length!=a.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!p&&fn?(Be(e,e.options.workDelay),!0):void 0}),i.length&&At(e,function(){for(var t=0;to;--s){if(s<=a.first)return a.first;var l=Jr(a,s-1);if(l.stateAfter&&(!n||s<=a.frontier))return s;var u=Bo(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function Ve(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var a=Ue(e,t,n),o=a>r.first&&Jr(r,a-1).stateAfter;return o=o?ao(r.mode,o):oo(r.mode),r.iter(a,t,function(n){Fr(e,n.text,o);var s=a==t-1||a%5==0||a>=i.viewFrom&&a2&&a.push((l.bottom+u.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Xe(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Je(e,t){t=gr(t);var n=ei(t),r=e.display.externalMeasured=new Ot(e.doc,t,n);r.lineN=n;var i=r.built=Lr(e,r);return r.text=i.pre,qi(e.display.lineMeasure,i.pre),r}function $e(e,t,n,r){return et(e,Ze(e,t),n,r)}function Qe(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,a=1,o="left"):u>t?(i=t-l,a=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(a=u-l,i=a-1,t>=u&&(o="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],o="left";if("right"==n&&i==u-l)for(;sc;c++){for(;s&&Ui(t.line.text.charAt(a.coverStart+s));)--s;for(;a.coverStart+lva&&0==s&&l==a.coverEnd-a.coverStart)i=o.parentNode.getBoundingClientRect();else if(ga&&e.options.lineWrapping){var p=Wo(o,s,l).getClientRects();i=p.length?p["right"==r?p.length-1:0]:Va}else i=Wo(o,s,l).getBoundingClientRect()||Va;if(i.left||i.right||0==s)break;l=s,s-=1,u="right"}ga&&11>va&&(i=rt(e.display.measure,i))}else{s>0&&(u=r="right");var p;i=e.options.lineWrapping&&(p=o.getClientRects()).length>1?p["right"==r?p.length-1:0]:o.getBoundingClientRect()}if(ga&&9>va&&!s&&(!i||!i.left&&!i.right)){var f=o.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+vt(e.display),top:f.top,bottom:f.bottom}:Va}for(var d=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(d+h)/2,y=t.view.measure.heights,c=0;cn.from?o(e-1):o(e,r)}r=r||Jr(e.doc,t.line),i||(i=Ze(e,r));var l=ri(r),u=t.ch;if(!l)return o(u);var c=la(l,u),p=s(u,c);return null!=is&&(p.other=s(u,is)),p}function dt(e,t){var n=0,t=ye(e.doc,t);e.options.lineWrapping||(n=vt(e.display)*t.ch);var r=Jr(e.doc,t.line),i=ni(r)+We(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function ht(e,t,n,r){var i=Fa(e,t);return i.xRel=r,n&&(i.outside=!0),i}function mt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return ht(r.first,0,!0,-1);var i=ti(r,n),a=r.first+r.size-1;if(i>a)return ht(r.first+r.size-1,Jr(r,a).text.length,!0,1);0>t&&(t=0);for(var o=Jr(r,i);;){var s=yt(e,o,i,t,n),l=mr(o),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=ei(o=u.to.line)}}function yt(e,t,n,r,i){function a(r){var i=ft(e,Fa(n,r),"line",t,u);return s=!0,o>i.bottom?i.left-l:oy)return ht(n,d,g,1);for(;;){if(c?d==f||d==ca(t,f,1):1>=d-f){for(var v=h>r||y-r>=r-h?f:d,b=r-(v==f?h:y);Ui(t.text.charAt(v));)++v;var _=ht(n,v,v==f?m:g,-1>b?-1:b>1?1:0);return _}var x=Math.ceil(p/2),E=f+x;if(c){E=f;for(var w=0;x>w;++w)E=ca(t,E,1)}var C=a(E);C>r?(d=E,y=C,(g=s)&&(y+=1e3),p=x):(f=E,h=C,m=s,p-=x)}}function gt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ba){Ba=Vi("pre");for(var t=0;49>t;++t)Ba.appendChild(document.createTextNode("x")),Ba.appendChild(Vi("br"));Ba.appendChild(document.createTextNode("x"))}qi(e.measure,Ba);var n=Ba.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Wi(e.measure),n||1}function vt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Vi("span","xxxxxxxxxx"),n=Vi("pre",[t]);qi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function bt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qa},Wa?Wa.ops.push(e.curOp):e.curOp.ownsGroup=Wa={ops:[e.curOp],delayedCallbacks:[]}}function _t(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new S(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&D(e.cm,e.update)}function St(e){var t=e.cm,n=t.display;e.updatedDisplay&&I(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=$e(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+ze(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ge(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function kt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefta;a=r){var o=new Ot(e.doc,Jr(e.doc,a),a);r=a+o.size,i.push(o)}return i}function jt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)ja&&br(e.doc,t)i.viewFrom?Nt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Nt(e);else if(t<=i.viewFrom){var a=Bt(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):Nt(e)}else if(n>=i.viewTo){var a=Bt(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Nt(e)}else{var o=Bt(e,t,t,-1),s=Bt(e,n,n+r,1);o&&s?(i.view=i.view.slice(0,o.index).concat(Mt(e,o.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Nt(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var a=r.view[Lt(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==Oi(o,n)&&o.push(n)}}}function Nt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Lt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Bt(e,t,n,r){var i,a=Lt(e,t),o=e.display.view;if(!ja||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=0,l=e.display.viewFrom;a>s;s++)l+=o[s].size;if(l!=t){if(r>0){if(a==o.length-1)return null;i=l+o[a].size-t,a++}else i=l-t;t+=i,n+=i}for(;br(e.doc,n)!=n;){if(a==(0>r?0:o.length-1))return null;n+=r*o[a-(0>r?1:0)].size,a+=r}return{index:a,lineN:n}}function Rt(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Mt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Mt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Lt(e,n)))),r.viewTo=n}function Ut(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Ao(i.scroller,"mousedown",Tt(e,Gt)),ga&&11>va?Ao(i.scroller,"dblclick",Tt(e,function(t){if(!Si(e,t)){var n=zt(e,t);if(n&&!$t(e,t)&&!Ht(e.display,t)){So(t);var r=e.findWordAt(n);xe(e.doc,r.anchor,r.head)}}})):Ao(i.scroller,"dblclick",function(t){Si(e,t)||So(t)}),Oa||Ao(i.scroller,"contextmenu",function(t){vn(e,t)});var a,o={end:0};Ao(i.scroller,"touchstart",function(e){if(!n(e)){clearTimeout(a);var t=+new Date;i.activeTouch={start:t,moved:!1,prev:t-o.end<=300?o:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),Ao(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ao(i.scroller,"touchend",function(n){var a=i.activeTouch;if(a&&!Ht(i,n)&&null!=a.left&&!a.moved&&new Date-a.start<300){var o,s=e.coordsChar(i.activeTouch,"page");o=!a.prev||r(a,a.prev)?new fe(s,s):!a.prev.prev||r(a,a.prev.prev)?e.findWordAt(s):new fe(Fa(s.line,0),ye(e.doc,Fa(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),So(n)}t()}),Ao(i.scroller,"touchcancel",t),Ao(i.scroller,"scroll",function(){i.scroller.clientHeight&&(nn(e,i.scroller.scrollTop),rn(e,i.scroller.scrollLeft,!0),Io(e,"scroll",e))}),Ao(i.scroller,"mousewheel",function(t){an(e,t)}),Ao(i.scroller,"DOMMouseScroll",function(t){an(e,t)}),Ao(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Si(e,t)||Do(t)},over:function(t){Si(e,t)||(en(e,t),Do(t))},start:function(t){Zt(e,t)},drop:Tt(e,Qt),leave:function(){tn(e)}};var s=i.input.getField();Ao(s,"keyup",function(t){dn.call(e,t)}),Ao(s,"keydown",Tt(e,pn)),Ao(s,"keypress",Tt(e,hn)),Ao(s,"focus",Li(yn,e)),Ao(s,"blur",Li(gn,e))}function Wt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var a=t.display.dragFunctions,o=n?Ao:Po;o(t.display.scroller,"dragstart",a.start),o(t.display.scroller,"dragenter",a.enter),o(t.display.scroller,"dragover",a.over),o(t.display.scroller,"dragleave",a.leave),o(t.display.scroller,"drop",a.drop); +}}function qt(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Ht(e,t){for(var n=_i(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function zt(e,t,n,r){var i=e.display;if(!n&&"true"==_i(t).getAttribute("cm-not-content"))return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(t){return null}var l,u=mt(e,a,o);if(r&&1==u.xRel&&(l=Jr(e.doc,u.line).text).length==u.ch){var c=Bo(l,l.length,e.options.tabSize)-l.length;u=Fa(u.line,Math.max(0,Math.round((a-He(e.display).left)/vt(e.display))-c))}return u}function Gt(e){var t=this,n=t.display;if(!(n.activeTouch&&n.input.supportsTouch()||Si(t,e))){if(n.shift=e.shiftKey,Ht(n,e))return void(ba||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!$t(t,e)){var r=zt(t,e);switch(window.focus(),xi(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Yt(t,e,r):_i(e)==n.scroller&&So(e);break;case 2:ba&&(t.state.lastMiddleDown=+new Date),r&&xe(t.doc,r),setTimeout(function(){n.input.focus()},20),So(e);break;case 3:Oa?vn(t,e):mn(t)}}}}function Yt(e,t,n){ga?setTimeout(Li(J,e),0):e.curOp.focus=Hi();var r,i=+new Date;Ua&&Ua.time>i-400&&0==Na(Ua.pos,n)?r="triple":Ra&&Ra.time>i-400&&0==Na(Ra.pos,n)?(r="double",Ua={time:i,pos:n}):(r="single",Ra={time:i,pos:n});var a,o=e.doc.sel,s=Aa?t.metaKey:t.ctrlKey;e.options.dragDrop&&Qo&&!$(e)&&"single"==r&&(a=o.contains(n))>-1&&(Na((a=o.ranges[a]).from(),n)<0||n.xRel>0)&&(Na(a.to(),n)>0||n.xRel<0)?Kt(e,t,n,s):Xt(e,t,n,r,s)}function Kt(e,t,n,r){var i=e.display,a=+new Date,o=Tt(e,function(s){ba&&(i.scroller.draggable=!1),e.state.draggingText=!1,Po(document,"mouseup",o),Po(i.scroller,"drop",o),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(So(s),!r&&+new Date-200=h;h++){var g=Jr(u,h).text,v=Ro(g,l,a);l==d?i.push(new fe(Fa(h,v),Fa(h,v))):g.length>v&&i.push(new fe(Fa(h,v),Fa(h,Ro(g,d,a))))}i.length||i.push(new fe(n,n)),De(u,de(f.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,_=b.anchor,x=t;if("single"!=r){if("double"==r)var E=e.findWordAt(t);else var E=new fe(Fa(t.line,0),ye(u,Fa(t.line+1,0)));Na(E.anchor,_)>0?(x=E.head,_=X(b.from(),E.anchor)):(x=E.anchor,_=K(b.to(),E.head))}var i=f.ranges.slice(0);i[p]=new fe(ye(u,_),x),De(u,de(i,p),No)}}function o(t){var n=++v,i=zt(e,t,!0,"rect"==r);if(i)if(0!=Na(i,y)){e.curOp.focus=Hi(),a(i);var s=_(l,u);(i.line>=s.to||i.lineg.bottom?20:0;c&&setTimeout(Tt(e,function(){v==n&&(l.scroller.scrollTop+=c,o(t))}),50)}}function s(t){e.state.selectingText=!1,v=1/0,So(t),l.input.focus(),Po(document,"mousemove",b),Po(document,"mouseup",x),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;So(t);var c,p,f=u.sel,d=f.ranges;if(i&&!t.shiftKey?(p=u.sel.contains(n),c=p>-1?d[p]:new fe(n,n)):(c=u.sel.primary(),p=u.sel.primIndex),t.altKey)r="rect",i||(c=new fe(n,n)),n=zt(e,t,!0,!0),p=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||u.extend?_e(u,c,h.anchor,h.head):h}else if("triple"==r){var m=new fe(Fa(n.line,0),ye(u,Fa(n.line+1,0)));c=e.display.shift||u.extend?_e(u,c,m.anchor,m.head):m}else c=_e(u,c,n);i?-1==p?(p=d.length,De(u,de(d.concat([c]),p),{scroll:!1,origin:"*mouse"})):d.length>1&&d[p].empty()&&"single"==r&&!t.shiftKey?(De(u,de(d.slice(0,p).concat(d.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),f=u.sel):we(u,p,c,No):(p=0,De(u,new pe([c],0),No),f=u.sel);var y=n,g=l.wrapper.getBoundingClientRect(),v=0,b=Tt(e,function(e){xi(e)?o(e):s(e)}),x=Tt(e,s);e.state.selectingText=x,Ao(document,"mousemove",b),Ao(document,"mouseup",x)}function Jt(e,t,n,r,i){try{var a=t.clientX,o=t.clientY}catch(t){return!1}if(a>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&So(t);var s=e.display,l=s.lineDiv.getBoundingClientRect();if(o>l.bottom||!Di(e,n))return bi(t);o-=l.top-s.viewOffset;for(var u=0;u=a){var p=ti(e.doc,o),f=e.options.gutters[u];return i(e,n,e,p,f,t),bi(t)}}}function $t(e,t){return Jt(e,t,"gutterClick",!0,wi)}function Qt(e){var t=this;if(tn(t),!Si(t,e)&&!Ht(t.display,e)){So(e),ga&&(Ha=+new Date);var n=zt(t,e,!0),r=e.dataTransfer.files;if(n&&!$(t))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),o=0,s=function(e,r){if(!t.options.allowDropFileTypes||-1!=Oi(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=Tt(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),a[r]=e,++o==i){n=ye(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(a.join(t.doc.lineSeparator())),origin:"paste"};Sn(t.doc,l),ke(t.doc,he(n,Ja(l)))}}),s.readAsText(e)}},l=0;i>l;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var a=e.dataTransfer.getData("Text");if(a){if(t.state.draggingText&&!(Aa?e.altKey:e.ctrlKey))var u=t.listSelections();if(Ae(t.doc,he(n,n)),u)for(var l=0;lo.clientWidth,l=o.scrollHeight>o.clientHeight;if(r&&s||i&&l){if(i&&Aa&&ba)e:for(var u=t.target,c=a.view;u!=o;u=u.parentNode)for(var p=0;pf?d=Math.max(0,d+f-50):h=Math.min(e.doc.height,h+f+50),T(e,{top:d,bottom:h})}20>za&&(null==a.wheelStartX?(a.wheelStartX=o.scrollLeft,a.wheelStartY=o.scrollTop,a.wheelDX=r,a.wheelDY=i,setTimeout(function(){if(null!=a.wheelStartX){var e=o.scrollLeft-a.wheelStartX,t=o.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(Ga=(Ga*za+n)/(za+1),++za)}},200)):(a.wheelDX+=r,a.wheelDY+=i))}}function on(e,t,n){if("string"==typeof t&&(t=so[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{$(e)&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=jo}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function sn(e,t,n){for(var r=0;rva&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=un(t,e);Ea&&(Xa=r?n:null,!r&&88==n&&!ts&&(Aa?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||fn(t)}}function fn(e){function t(e){18!=e.keyCode&&e.altKey||(Xo(n,"CodeMirror-crosshair"),Po(document,"keyup",t),Po(document,"mouseover",t))}var n=e.display.lineDiv;Jo(n,"CodeMirror-crosshair"),Ao(document,"keyup",t),Ao(document,"mouseover",t)}function dn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Si(this,e)}function hn(e){var t=this;if(!(Ht(t.display,e)||Si(t,e)||e.ctrlKey&&!e.altKey||Aa&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(Ea&&n==Xa)return Xa=null,void So(e);if(!Ea||e.which&&!(e.which<10)||!un(t,e)){var i=String.fromCharCode(null==r?n:r);cn(t,e,i)||t.display.input.onKeyPress(e)}}}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,gn(e))},100)}function yn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Io(e,"focus",e),e.state.focused=!0,Jo(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),ba&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Le(e))}function gn(e){e.state.delayingBlurEvent||(e.state.focused&&(Io(e,"blur",e),e.state.focused=!1,Xo(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function vn(e,t){Ht(e.display,t)||bn(e,t)||Si(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function bn(e,t){return Di(e,"gutterContextMenu")?Jt(e,t,"gutterContextMenu",!1,Io):!1}function _n(e,t){if(Na(e,t.from)<0)return e;if(Na(e,t.to)<=0)return Ja(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ja(t).ch-t.to.ch),Fa(n,r)}function xn(e,t){for(var n=[],r=0;r=0;--i)kn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else kn(e,t)}}function kn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Na(t.from,t.to)){var n=xn(e,t);li(e,t,n,e.cm?e.cm.curOp.id:NaN),Tn(e,t,n,ir(e,t));var r=[];Kr(e,function(e,n){n||-1!=Oi(r,e.history)||(vi(e.history,t),r.push(e.history)),Tn(e,t,null,ir(e,t))})}}function Dn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,a=e.sel,o="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--l){var p=r.changes[l];if(p.origin=t,c&&!Cn(e,p,!1))return void(o.length=0);u.push(ai(e,p));var f=l?xn(e,p):Ii(o);Tn(e,p,f,or(e,p)),!l&&e.cm&&e.cm.scrollIntoView({from:p.from,to:Ja(p)});var d=[];Kr(e,function(e,t){t||-1!=Oi(d,e.history)||(vi(e.history,p),d.push(e.history)),Tn(e,p,null,or(e,p))})}}}}function An(e,t){if(0!=t&&(e.first+=t,e.sel=new pe(Mi(e.sel.ranges,function(e){return new fe(Fa(e.anchor.line+t,e.anchor.ch),Fa(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){jt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linea&&(t={from:t.from,to:Fa(a,Jr(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$r(e,t.from,t.to),n||(n=xn(e,t)),e.cm?Pn(e.cm,t,r):zr(e,t,r),Ae(e,n,Fo)}}function Pn(e,t,n){var r=e.doc,i=e.display,o=t.from,s=t.to,l=!1,u=o.line;e.options.lineWrapping||(u=ei(gr(Jr(r,o.line))),r.iter(u,s.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&ki(e),zr(r,t,n,a(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,function(e){var t=p(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,o.line),Be(e,400);var c=t.text.length-(s.line-o.line)-1;t.full?jt(e):o.line!=s.line||1!=t.text.length||Hr(e.doc,t)?jt(e,o.line,s.line+1,c):Ft(e,o.line,"text");var f=Di(e,"changes"),d=Di(e,"change");if(d||f){var h={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&wi(e,"change",e,h),f&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function In(e,t,n,r,i){if(r||(r=n),Na(r,n)<0){var a=r;r=n,n=a}"string"==typeof t&&(t=e.splitLines(t)),Sn(e,{from:n,to:r,text:t,origin:i})}function On(e,t){if(!Si(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Sa){var a=Vi("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-We(e.display))+"px; height: "+(t.bottom-t.top+ze(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}function Mn(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var a=!1,o=ft(e,t),s=n&&n!=t?ft(e,n):o,l=Fn(e,Math.min(o.left,s.left),Math.min(o.top,s.top)-r,Math.max(o.left,s.left),Math.max(o.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(nn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=l.scrollLeft&&(rn(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(a=!0)),!a)break}return o}function jn(e,t,n,r,i){var a=Fn(e,t,n,r,i);null!=a.scrollTop&&nn(e,a.scrollTop),null!=a.scrollLeft&&rn(e,a.scrollLeft)}function Fn(e,t,n,r,i){var a=e.display,o=gt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:a.scroller.scrollTop,l=Ye(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+qe(a),p=o>n,f=i>c-o;if(s>n)u.scrollTop=p?0:n;else if(i>s+l){var d=Math.min(n,(f?c:i)-l);d!=s&&(u.scrollTop=d)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:a.scroller.scrollLeft,m=Ge(e)-(e.options.fixedGutter?a.gutters.offsetWidth:0),y=r-t>m;return y&&(r=t+m),10>t?u.scrollLeft=0:h>t?u.scrollLeft=Math.max(0,t-(y?0:10)):r>m+h-3&&(u.scrollLeft=r+(y?0:10)-m),u}function Nn(e,t,n){(null!=t||null!=n)&&Bn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Ln(e){Bn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Fa(t.line,t.ch-1):t,r=Fa(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Bn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=dt(e,t.from),r=dt(e,t.to),i=Fn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Rn(e,t,n,r){var i,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?i=Ve(e,t):n="prev");var o=e.options.tabSize,s=Jr(a,t),l=Bo(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=a.mode.indent(i,s.text.slice(c.length),s.text),u==jo||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>a.first?Bo(Jr(a,t-1).text,null,o):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var p="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/o);d;--d)f+=o,p+=" ";if(u>f&&(p+=Pi(u-f)),p!=c)return In(a,p,Fa(t,0),Fa(t,c.length),"+input"),s.stateAfter=null,!0;for(var d=0;d=0;t--)In(e.doc,"",r[t].from,r[t].to,"+delete");Ln(e)})}function Wn(e,t,n,r,i){function a(){var t=s+n;return t=e.first+e.size?p=!1:(s=t,c=Jr(e,t))}function o(e){var t=(i?ca:pa)(c,l,n,!0);if(null==t){if(e||!a())return p=!1;l=i?(0>n?ra:na)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Jr(e,s),p=!0;if("char"==r)o();else if("column"==r)o(!0);else if("word"==r||"group"==r)for(var f=null,d="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),m=!0;!(0>n)||o(!m);m=!1){var y=c.text.charAt(l)||"\n",g=Bi(y,h)?"w":d&&"\n"==y?"n":!d||/\s/.test(y)?null:"p";if(!d||m||g||(g="s"),f&&f!=g){0>n&&(n=1,o());break}if(g&&(f=g),n>0&&!o(!m))break}var v=Oe(e,Fa(s,l),u,!0);return p||(v.hitSide=!0),v}function qn(e,t,n,r){var i,a=e.doc,o=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*gt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=mt(e,o,i);if(!l.outside)break;if(0>n?0>=i:i>=a.height){l.hitSide=!0;break}i+=5*n}return l}function Hn(t,n,r,i){e.defaults[t]=n,r&&(Qa[t]=i?function(e,t,n){n!=Za&&r(e,t,n)}:r)}function zn(e){for(var t,n,r,i,a=e.split(/-(?!$)/),e=a[a.length-1],o=0;o0||0==o&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=Vi("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(yr(e,t.line,t,n,a)||t.line!=n.line&&yr(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");ja=!0}a.addToHistory&&li(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&a.collapsed&&!u.options.lineWrapping&&gr(e)==u.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Zr(e,0),tr(e,new Qn(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),a.collapsed&&e.iter(t.line,n.line+1,function(t){xr(e,t)&&Zr(t,0)}),a.clearOnEnter&&Ao(a,"beforeCursorEnter",function(){a.clear()}),a.readOnly&&(Ma=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ho,a.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),a.collapsed)jt(u,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var c=t.line;c<=n.line;c++)Ft(u,c,"text");a.atomic&&Pe(u.doc),wi(u,"markerAdded",u,a)}return a}function Kn(e,t,n,r,i){r=Ni(r),r.shared=!1;var a=[Yn(e,t,n,r,i)],o=a[0],s=r.widgetNode;return Kr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),a.push(Yn(e,ye(e,t),ye(e,n),r,i));for(var l=0;l=t:a.to>t);(r||(r=[])).push(new Qn(o,a.from,l?null:a.to))}}return r}function rr(e,t,n){if(e)for(var r,i=0;i=t:a.to>t);if(s||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var l=null==a.from||(o.inclusiveLeft?a.from<=t:a.from0&&s)for(var p=0;pp;++p)h.push(m);h.push(l)}return h}function ar(e){for(var t=0;t0)){var c=[l,1],p=Na(u.from,s.from),f=Na(u.to,s.to);(0>p||!o.inclusiveLeft&&!p)&&c.push({from:u.from,to:s.from}),(f>0||!o.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function lr(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=p||0>=c&&p>=0)&&(0>=c&&(Na(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Na(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function gr(e){for(var t;t=hr(e);)e=t.find(-1,!0).line;return e}function vr(e){for(var t,n;t=mr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function br(e,t){var n=Jr(e,t),r=gr(n);return n==r?t:ei(r)}function _r(e,t){if(t>e.lastLine())return t;var n,r=Jr(e,t);if(!xr(e,r))return t;for(;n=mr(r);)r=n.find(1,!0).line;return ei(r)+1}function xr(e,t){var n=ja&&t.markedSpans;if(n)for(var r,i=0;ia;a++){i&&(i[0]=e.innerMode(t,r).mode);var o=t.token(n,r);if(n.pos>n.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}function Ir(e,t,n,r){function i(e){return{start:p.start,end:p.pos,string:p.current(),type:a||null,state:e?ao(o.mode,c):c}}var a,o=e.doc,s=o.mode;t=ye(o,t);var l,u=Jr(o,t.line),c=Ve(e,t.line,n),p=new fo(u.text,e.options.tabSize);for(r&&(l=[]);(r||p.pose.options.maxHighlightLength?(s=!1,o&&Fr(e,t,r,p.pos),p.pos=t.length,l=null):l=Ar(Pr(n,p,r,f),a),f){var d=f[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||c!=l){for(;uu;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var a=i[n+1];i[n+1]=(a?a+" ":"")+"cm-overlay "+t}},a)}return{styles:i,classes:a.bgClass||a.textClass?a:null}}function jr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Ve(e,ei(t)),i=Mr(e,t,t.text.length>e.options.maxHighlightLength?ao(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Fr(e,t,n,r){var i=e.doc.mode,a=new fo(t,e.options.tabSize);for(a.start=a.pos=r||0,""==t&&Tr(i,n);!a.eol();)Pr(i,a,n),a.start=a.pos}function Nr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?_o:bo;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Lr(e,t){var n=Vi("span",null,null,ba?"padding-right: .1px":null),r={pre:Vi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(ga||ba)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a,o=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Rr,$i(e.display.measure)&&(a=ri(o))&&(r.addToken=Vr(r.addToken,a)),r.map=[];var s=t!=e.display.externalMeasured&&ei(o);qr(o,r,jr(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=Gi(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=Gi(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ji(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({})); +}return ba&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),Io(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Gi(r.pre.className,r.textClass||"")),r}function Br(e){var t=Vi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Rr(e,t,n,r,i,a,o){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,Ur):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),p=0;;){l.lastIndex=p;var f=l.exec(t),d=f?f.index-p:t.length-p;if(d){var h=document.createTextNode(s.slice(p,p+d));ga&&9>va?c.appendChild(Vi("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+d,h),e.col+=d,e.pos+=d}if(!f)break;if(p+=d+1," "==f[0]){var m=e.cm.options.tabSize,y=m-e.col%m,h=c.appendChild(Vi("span",Pi(y),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=y}else if("\r"==f[0]||"\n"==f[0]){var h=c.appendChild(Vi("span","\r"==f[0]?"␍":"␤","cm-invalidchar"));h.setAttribute("cm-text",f[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(f[0]);h.setAttribute("cm-text",f[0]),ga&&9>va?c.appendChild(Vi("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),ga&&9>va&&(u=!0),e.pos+=t.length}if(n||r||i||u||o){var g=n||"";r&&(g+=r),i&&(g+=i);var v=Vi("span",[c],g,o);return a&&(v.title=a),e.content.appendChild(v)}e.content.appendChild(c)}}function Ur(e){for(var t=" ",n=0;nu&&f.from<=u)break}if(f.to>=c)return e(n,r,i,a,o,s,l);e(n,r.slice(0,f.to-u),i,a,null,s,l),a=null,r=r.slice(f.to-u),u=f.to}}}function Wr(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function qr(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,u,c,p,f,d=i.length,h=0,m=1,y="",g=0;;){if(g==h){l=u=c=p=s="",f=null,g=1/0;for(var v=[],b=0;bh||x.collapsed&&_.to==h&&_.from==h)?(null!=_.to&&_.to!=h&&g>_.to&&(g=_.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=x.css),x.startStyle&&_.from==h&&(c+=" "+x.startStyle),x.endStyle&&_.to==g&&(u+=" "+x.endStyle),x.title&&!p&&(p=x.title),x.collapsed&&(!f||fr(f.marker,x)<0)&&(f=_)):_.from>h&&g>_.from&&(g=_.from)}if(f&&(f.from||0)==h){if(Wr(t,(null==f.to?d+1:f.to)-h,f.marker,null==f.from),null==f.to)return;f.to==h&&(f=!1)}if(!f&&v.length)for(var b=0;b=d)break;for(var E=Math.min(d,g);;){if(y){var w=h+y.length;if(!f){var C=w>E?y.slice(0,E-h):y;t.addToken(t,C,o?o+l:l,c,h+C.length==g?u:"",p,s)}if(w>=E){y=y.slice(E-h),h=E;break}h=w,c=""}y=i.slice(a,a=n[m++]),o=Nr(n[m++],t.cm.options)}}else for(var m=1;mn;++n)a.push(new vo(u[n],i(n),r));return a}var s=t.from,l=t.to,u=t.text,c=Jr(e,s.line),p=Jr(e,l.line),f=Ii(u),d=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,o(0,u.length)),e.remove(u.length,e.size-u.length);else if(Hr(e,t)){var m=o(0,u.length-1);a(p,p.text,d),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(c==p)if(1==u.length)a(c,c.text.slice(0,s.ch)+f+c.text.slice(l.ch),d);else{var m=o(1,u.length-1);m.push(new vo(f+c.text.slice(l.ch),d,r)),a(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,m)}else if(1==u.length)a(c,c.text.slice(0,s.ch)+u[0]+p.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{a(c,c.text.slice(0,s.ch)+u[0],i(0)),a(p,f+p.text.slice(l.ch),d);var m=o(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,m)}wi(e,"change",e,t)}function Gr(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(a>t){n=i;break}t-=a}return n.lines[t]}function $r(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var a=e.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i}),r}function Qr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function Zr(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ei(e){if(null==e.parent)return null;for(var t=e.parent,n=Oi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ti(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=s}return n+r}function ni(e){e=gr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Ii(e.done)):void 0}function li(e,t,n,r){var i=e.history;i.undone.length=0;var a,o=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>o-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(a=si(i,i.lastOp==r))){var s=Ii(a.changes);0==Na(t.from,t.to)&&0==Na(t.from,s.to)?s.to=Ja(t):a.changes.push(ai(e,t))}else{var l=Ii(i.done);for(l&&l.ranges||pi(e.sel,i.done),a={changes:[ai(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Io(e,"historyAdded")}function ui(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ci(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ui(e,a,Ii(i.done),t))?i.done[i.done.length-1]=t:pi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&oi(i.undone)}function pi(e,t){var n=Ii(t);n&&n.ranges&&n.equals(e)||t.push(e)}function fi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a})}function di(e){if(!e)return null;for(var t,n=0;n-1&&(Ii(s)[p]=c[p],delete c[p])}}}return i}function yi(e,t,n,r){n0?r.slice():To:r||To}function wi(e,t){function n(e){return function(){e.apply(null,a)}}var r=Ei(e,t,!1);if(r.length){var i,a=Array.prototype.slice.call(arguments,2);Wa?i=Wa.delayedCallbacks:Oo?i=Oo:(i=Oo=[],setTimeout(Ci,0));for(var o=0;o0}function Ai(e){e.prototype.on=function(e,t){Ao(this,e,t)},e.prototype.off=function(e,t){Po(this,e,t)}}function Ti(){this.id=null}function Pi(e){for(;Uo.length<=e;)Uo.push(Ii(Uo)+" ");return Uo[e]}function Ii(e){return e[e.length-1]}function Oi(e,t){for(var n=0;n-1&&Ho(e)?!0:t.test(e):Ho(e)}function Ri(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Ui(e){return e.charCodeAt(0)>=768&&zo.test(e)}function Vi(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a0;--t)e.removeChild(e.firstChild);return e}function qi(e,t){return Wi(e).appendChild(t)}function Hi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function zi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Gi(e,t){for(var n=e.split(" "),r=0;r2&&!(ga&&8>va))}var n=Yo?Vi("span","​"):Vi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function $i(e){if(null!=Ko)return Ko;var t=qi(e,document.createTextNode("AخA")),n=Wo(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Wo(t,1,2).getBoundingClientRect();return Ko=r.right-n.right<3}function Qi(e){if(null!=ns)return ns;var t=qi(e,Vi("span","x")),n=t.getBoundingClientRect(),r=Wo(t,0,1).getBoundingClientRect();return ns=Math.abs(n.left-r.left)>1}function Zi(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,a=0;at||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function ea(e){return e.level%2?e.to:e.from}function ta(e){return e.level%2?e.from:e.to}function na(e){var t=ri(e);return t?ea(t[0]):0}function ra(e){var t=ri(e);return t?ta(Ii(t)):e.text.length}function ia(e,t){var n=Jr(e.doc,t),r=gr(n);r!=n&&(t=ei(r));var i=ri(r),a=i?i[0].level%2?ra(r):na(r):0;return Fa(t,a)}function aa(e,t){for(var n,r=Jr(e.doc,t);n=mr(r);)r=n.find(1,!0).line,t=null;var i=ri(r),a=i?i[0].level%2?na(r):ra(r):r.text.length;return Fa(null==t?ei(r):t,a)}function oa(e,t){var n=ia(e,t.line),r=Jr(e.doc,n.line),i=ri(r);if(!i||0==i[0].level){var a=Math.max(0,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return Fa(n.line,o?0:a)}return n}function sa(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function la(e,t){is=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return sa(e,i.level,e[n].level)?(i.from!=i.to&&(is=n),r):(i.from!=i.to&&(is=r),n);n=r}}return n}function ua(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Ui(e.text.charAt(t)));return t}function ca(e,t,n,r){var i=ri(e);if(!i)return pa(e,t,n,r);for(var a=la(i,t),o=i[a],s=ua(e,t,o.level%2?-n:n,r);;){if(s>o.from&&s0==o.level%2?o.to:o.from);if(o=i[a+=n],!o)return null;s=n>0==o.level%2?ua(e,o.to,-1,r):ua(e,o.from,1,r)}}function pa(e,t,n,r){var i=t+n;if(r)for(;i>0&&Ui(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var fa=navigator.userAgent,da=navigator.platform,ha=/gecko\/\d/i.test(fa),ma=/MSIE \d/.test(fa),ya=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fa),ga=ma||ya,va=ga&&(ma?document.documentMode||6:ya[1]),ba=/WebKit\//.test(fa),_a=ba&&/Qt\/\d+\.\d+/.test(fa),xa=/Chrome\//.test(fa),Ea=/Opera\//.test(fa),wa=/Apple Computer/.test(navigator.vendor),Ca=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(fa),Sa=/PhantomJS/.test(fa),ka=/AppleWebKit/.test(fa)&&/Mobile\/\w+/.test(fa),Da=ka||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(fa),Aa=ka||/Mac/.test(da),Ta=/win/i.test(da),Pa=Ea&&fa.match(/Version\/(\d*\.\d*)/);Pa&&(Pa=Number(Pa[1])),Pa&&Pa>=15&&(Ea=!1,ba=!0);var Ia=Aa&&(_a||Ea&&(null==Pa||12.11>Pa)),Oa=ha||ga&&va>=9,Ma=!1,ja=!1;m.prototype=Ni({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+a+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedOverlay&&e.clientHeight>0&&(0==r&&this.overlayHack(),this.checkedOverlay=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e)},overlayHack:function(){var e=Aa&&!Ca?"12px":"18px";this.horiz.style.minHeight=this.vert.style.minWidth=e;var t=this,n=function(e){_i(e)!=t.vert&&_i(e)!=t.horiz&&Tt(t.cm,Gt)(e)};Ao(this.vert,"mousedown",n),Ao(this.horiz,"mousedown",n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),y.prototype=Ni({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},y.prototype),e.scrollbarModel={"native":m,"null":y},S.prototype.signal=function(e,t){Di(e,t)&&this.events.push(arguments)},S.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ao(a,"paste",function(e){return Z(e,r)?!0:(r.state.pasteIncoming=!0,void n.fastPoll())}),Ao(a,"cut",t),Ao(a,"copy",t),Ao(e.scroller,"paste",function(t){Ht(e,t)||(r.state.pasteIncoming=!0,n.focus())}),Ao(e.lineSpace,"selectstart",function(t){Ht(e,t)||So(t)}),Ao(a,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ao(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=je(e);if(e.options.moveInputWithCursor){var i=ft(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;qi(n.cursorDiv,e.cursors),qi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var a=i.sel.primary();t=ts&&(a.to().line-a.from().line>100||(n=r.getSelection()).length>1e3);var o=t?"-":n||r.getSelection();this.textarea.value=o,r.state.focused&&Vo(this.textarea),ga&&va>=9&&(this.hasSelection=o)}else e||(this.prevInput=this.textarea.value="",ga&&va>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Da||Hi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||es(t)&&!n&&!this.composing||$(e)||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(ga&&va>=9&&this.hasSelection===r||Aa&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var a=0,o=Math.min(n.length,r.length);o>a&&n.charCodeAt(a)==r.charCodeAt(a);)++a;var s=this;return At(e,function(){Q(e,r.slice(a),n.length-a,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){ga&&va>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=o.selectionStart){var e=i.somethingSelected(),t="​"+(e?o.value:"");o.value="⇚",o.value=t,r.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=t.length,a.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",o.style.cssText=c,ga&&9>va&&a.scrollbars.setScrollTop(a.scroller.scrollTop=l),null!=o.selectionStart){(!ga||ga&&9>va)&&t();var e=0,n=function(){a.selForContextMenu==i.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==r.prevInput?Tt(i,so.selectAll)(i):e++<10?a.detectingSelectAll=setTimeout(n,500):a.input.reset()};a.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,a=i.display,o=r.textarea,s=zt(i,e),l=a.scroller.scrollTop;if(s&&!Ea){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Tt(i,De)(i.doc,he(s),Fo);var c=o.style.cssText;if(r.wrapper.style.position="absolute",o.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(ga?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",ba)var p=window.scrollY;if(a.input.focus(),ba&&window.scrollTo(null,p),a.input.reset(),i.somethingSelected()||(o.value=r.prevInput=" "),r.contextMenuPending=!0,a.selForContextMenu=i.doc.sel,clearTimeout(a.detectingSelectAll),ga&&va>=9&&t(),Oa){Do(e);var f=function(){Po(window,"mouseup",f),setTimeout(n,20)};Ao(window,"mouseup",f)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:ji,needsContentAttribute:!1},re.prototype),ae.prototype=Ni({init:function(e){function t(e){if(r.somethingSelected())La=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=te(r);La=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Fo),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!ka)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",La.join("\n"));else{var n=ie(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=La.join("\n");var a=document.activeElement;Vo(i),setTimeout(function(){r.display.lineSpace.removeChild(n),a.focus()},50)}}var n=this,r=n.cm,i=n.div=e.lineDiv;ne(i),Ao(i,"paste",function(e){Z(e,r)}),Ao(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),a=r.getLine(i.head.line),o=a.indexOf(t,Math.max(0,i.head.ch-t.length));o>-1&&o<=i.head.ch&&(n.composing.sel=he(Fa(i.head.line,o),Fa(i.head.line,o+t.length)))}}),Ao(i,"compositionupdate",function(e){n.composing.data=e.data}),Ao(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ao(i,"touchstart",function(){n.forceCompositionEnd()}),Ao(i,"input",function(){n.composing||($(r)||!n.pollContent())&&At(n.cm,function(){jt(r)})}),Ao(i,"copy",t),Ao(i,"cut",t)},prepareSelection:function(){var e=je(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=le(this.cm,e.anchorNode,e.anchorOffset),r=le(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Na(X(n,r),t.from())||0!=Na(K(n,r),t.to())){var i=oe(this.cm,t.from()),a=oe(this.cm,t.to());if(i||a){var o=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!a){var l=o[o.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;a={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:o[0].measure.map[2],offset:0};try{var c=Wo(i.node,i.offset,a.offset,a.node)}catch(p){}c&&(e.removeAllRanges(),e.addRange(c),s&&null==e.anchorNode?e.addRange(s):ha&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){qi(this.cm.display.cursorDiv,e.cursors),qi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Go(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():At(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=le(t,e.anchorNode,e.anchorOffset),r=le(t,e.focusNode,e.focusOffset);n&&r&&At(t,function(){De(t.doc,he(n,r),Fo),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var a;if(r.line==t.viewFrom||0==(a=Lt(e,r.line)))var o=ei(t.view[0].line),s=t.view[0].node;else var o=ei(t.view[a].line),s=t.view[a-1].node.nextSibling;var l=Lt(e,i.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.lineDiv.lastChild;else var u=ei(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var p=e.doc.splitLines(ce(e,s,c,o,u)),f=$r(e.doc,Fa(o,0),Fa(u,Jr(e.doc,u).text.length));p.length>1&&f.length>1;)if(Ii(p)==Ii(f))p.pop(),f.pop(),u--;else{if(p[0]!=f[0])break;p.shift(),f.shift(),o++}for(var d=0,h=0,m=p[0],y=f[0],g=Math.min(m.length,y.length);g>d&&m.charCodeAt(d)==y.charCodeAt(d);)++d;for(var v=Ii(p),b=Ii(f),_=Math.min(v.length-(1==p.length?d:0),b.length-(1==f.length?d:0));_>h&&v.charCodeAt(v.length-h-1)==b.charCodeAt(b.length-h-1);)++h;p[p.length-1]=v.slice(0,v.length-h),p[0]=p[0].slice(d);var x=Fa(o,d),E=Fa(u,f.length?Ii(f).length-h:0);return p.length>1||p[0]||Na(x,E)?(In(e.doc,p,x,E,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){$(this.cm)?Tt(this.cm,jt)(this.cm):e.data&&e.data!=e.startData&&Tt(this.cm,Q)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),$(this.cm)||Tt(this.cm,Q)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:ji,resetPosition:ji,needsContentAttribute:!0},ae.prototype),e.inputStyles={textarea:re,contenteditable:ae},pe.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Na(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return K(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Ba,Ra,Ua,Va={left:0,right:0,top:0,bottom:0},Wa=null,qa=0,Ha=0,za=0,Ga=null;ga?Ga=-.53:ha?Ga=15:xa?Ga=-.7:wa&&(Ga=-1/3);var Ya=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Ya(e);return t.x*=Ga,t.y*=Ga,t};var Ka=new Ti,Xa=null,Ja=e.changeEnd=function(e){return e.text?Fa(e.from.line+e.text.length-1,Ii(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,Qa.hasOwnProperty(e)&&Tt(this,Qa[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Gn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Rn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Ln(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;n>l;++l)Rn(this,l,e);var u=this.doc.sel.ranges;0==a.ch&&t.length==u.length&&u[r].from().ch>0&&we(this.doc,r,new fe(a,u[r].to()),Fo)}}}),getTokenAt:function(e,t){ +return Ir(this,e,t)},getLineTokens:function(e,t){return Ir(this,Fa(e),t,!0)},getTokenTypeAt:function(e){e=ye(this.doc,e);var t,n=jr(this,Jr(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!io.hasOwnProperty(t))return n;var r=io[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var a=0;ai&&(e=i,r=!0),n=Jr(this.doc,e)}else n=e;return ut(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ni(n):0)},defaultTextHeight:function(){return gt(this.display)},defaultCharWidth:function(){return vt(this.display)},setGutterMarker:Pt(function(e,t,n){return Un(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Ri(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Pt(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Ft(t,r,"gutter"),Ri(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Jr(this.doc,e),!e)return null}else{var t=ei(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a=this.display;e=ft(this,ye(this.doc,e));var o=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==r)o=e.top;else if("above"==r||"near"==r){var l=Math.max(a.wrapper.clientHeight,this.doc.height),u=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(o=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=o+"px",t.style.left=t.style.right="","right"==i?(s=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&jn(this,s,o,s+t.offsetWidth,o+t.offsetHeight)},triggerOnKeyDown:Pt(pn),triggerOnKeyPress:Pt(hn),triggerOnKeyUp:dn,execCommand:function(e){return so.hasOwnProperty(e)?so[e].call(null,this):void 0},triggerElectric:Pt(function(e){ee(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var a=0,o=ye(this.doc,e);t>a&&(o=Wn(this.doc,o,i,n,r),!o.hitSide);++a);return o},moveH:Pt(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Wn(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Lo)}),deleteH:Pt(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Vn(this,function(n){var i=Wn(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,a=r;0>t&&(i=-1,t=-t);for(var o=0,s=ye(this.doc,e);t>o;++o){var l=ft(this,s,"div");if(null==a?a=l.left:l.left=a,s=qn(this,l,i,n),s.hitSide)break}return s},moveV:Pt(function(e,t){var n=this,r=this.doc,i=[],a=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(o){if(a)return 0>e?o.from():o.to();var s=ft(n,o.head,"div");null!=o.goalColumn&&(s.left=o.goalColumn),i.push(s.left);var l=qn(n,s,e,t);return"page"==t&&o==r.sel.primary()&&Nn(n,null,pt(n,l,"div").top-s.top),l},Lo),i.length)for(var o=0;o0&&s(n.charAt(r-1));)--r;for(;i.5)&&o(this),Io(this,"refresh",this)}),swapDoc:Pt(function(e){var t=this.doc;return t.cm=null,Xr(this,e),ot(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wi(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ai(e);var $a=e.defaults={},Qa=e.optionHandlers={},Za=e.Init={toString:function(){return"CodeMirror.Init"}};Hn("value","",function(e,t){e.setValue(t)},!0),Hn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Hn("indentUnit",2,n,!0),Hn("indentWithTabs",!1),Hn("smartIndent",!0),Hn("tabSize",4,function(e){r(e),ot(e),jt(e)},!0),Hn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(Fa(r,a))}r++});for(var i=n.length-1;i>=0;i--)In(e.doc,t,n[i],Fa(n[i].line,n[i].ch+t.length))}}),Hn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Hn("specialCharPlaceholder",Br,function(e){e.refresh()},!0),Hn("electricChars",!0),Hn("inputStyle",Da?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Hn("rtlMoveVisually",!Ta),Hn("wholeLineUpdateBefore",!0),Hn("theme","default",function(e){s(e),l(e)},!0),Hn("keyMap","default",function(t,n,r){var i=Gn(n),a=r!=e.Init&&Gn(r);a&&a.detach&&a.detach(t,i),i.attach&&i.attach(t,a||null)}),Hn("extraKeys",null),Hn("lineWrapping",!1,i,!0),Hn("gutters",[],function(e){d(e.options),l(e)},!0),Hn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?C(e.display)+"px":"0",e.refresh()},!0),Hn("coverGutterNextToScrollbar",!1,function(e){v(e)},!0),Hn("scrollbarStyle","native",function(e){g(e),v(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Hn("lineNumbers",!1,function(e){d(e.options),l(e)},!0),Hn("firstLineNumber",1,l,!0),Hn("lineNumberFormatter",function(e){return e},l,!0),Hn("showCursorWhenSelecting",!1,Me,!0),Hn("resetSelectionOnContextMenu",!0),Hn("lineWiseCopyCut",!0),Hn("readOnly",!1,function(e,t){"nocursor"==t?(gn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Hn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Hn("dragDrop",!0,Wt),Hn("allowDropFileTypes",null),Hn("cursorBlinkRate",530),Hn("cursorScrollMargin",0),Hn("cursorHeight",1,Me,!0),Hn("singleCursorHeightPerLine",!0,Me,!0),Hn("workTime",100),Hn("workDelay",100),Hn("flattenSpans",!0,r,!0),Hn("addModeClass",!1,r,!0),Hn("pollInterval",100),Hn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Hn("historyEventDelay",1250),Hn("viewportMargin",10,function(e){e.refresh()},!0),Hn("maxHighlightLength",1e4,r,!0),Hn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Hn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Hn("autofocus",null);var eo=e.modes={},to=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),eo[t]=n},e.defineMIME=function(e,t){to[e]=t},e.resolveMode=function(t){if("string"==typeof t&&to.hasOwnProperty(t))t=to[t];else if(t&&"string"==typeof t.name&&to.hasOwnProperty(t.name)){var n=to[t.name];"string"==typeof n&&(n={name:n}),t=Fi(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=eo[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(no.hasOwnProperty(n.name)){var a=no[n.name];for(var o in a)a.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=a[o])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var o in n.modeProps)i[o]=n.modeProps[o];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var no=e.modeExtensions={};e.extendMode=function(e,t){var n=no.hasOwnProperty(e)?no[e]:no[e]={};Ni(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Eo.prototype[e]=t},e.defineOption=Hn;var ro=[];e.defineInitHook=function(e){ro.push(e)};var io=e.helpers={};e.registerHelper=function(t,n,r){io.hasOwnProperty(t)||(io[t]=e[t]={_global:[]}),io[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),io[t]._global.push({pred:r,val:i})};var ao=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},oo=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var so=e.commands={selectAll:function(e){e.setSelection(Fa(e.firstLine(),0),Fa(e.lastLine()),Fo)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Fo)},killLine:function(e){Vn(e,function(t){if(t.empty()){var n=Jr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Fa(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Fa(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Jr(e.doc,i.line-1).text;o&&e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Fa(i.line-1,o.length-1),Fa(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){At(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}Ln(e)})},toggleOverwrite:function(e){e.toggleOverwrite()}},lo=e.keyMap={};lo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},lo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},lo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},lo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},lo["default"]=Aa?lo.macDefault:lo.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Mi(n.split(" "),zn),a=0;a=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},a=this.string.substr(this.pos,e.length);return i(a)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ho=0,mo=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ho};Ai(mo),mo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bt(e),Di(this,"clear")){var n=this.find();n&&wi(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;ae.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&jt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Pe(e.doc)),e&&wi(e,"markerCleared",e,this),t&&xt(e),this.parent&&this.parent.clear()}},mo.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Dr(i),wi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},Yr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),0==(t-=a))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Gr))){var s=[];this.collapse(s),this.children=[new Gr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var o=i.lines.splice(i.lines.length-25,25),s=new Gr(o);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Yr(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Oi(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Yr(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if(0==(t-=o))break;e=0}else e-=a}}};var xo=0,Eo=e.Doc=function(e,t,n,r){if(!(this instanceof Eo))return new Eo(e,t,n,r);null==n&&(n=0),Yr.call(this,[new Gr([new vo("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=Fa(n,0);this.sel=he(i),this.history=new ii(null),this.id=++xo,this.modeOption=t,this.lineSep=r,"string"==typeof e&&(e=this.splitLines(e)),zr(this,{from:i,to:i,text:e}),De(this,he(i),Fo)};Eo.prototype=Fi(Yr.prototype,{constructor:Eo,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;a--)Sn(this,r[a]);s?ke(this,s):this.cm&&Ln(this.cm)}),undo:It(function(){Dn(this,"undo")}),redo:It(function(){Dn(this,"redo")}),undoSelection:It(function(){Dn(this,"undo",!0)}),redoSelection:It(function(){Dn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ye(this,e),t=ye(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;sl.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),ye(this,Fa(n,t))},indexFromPos:function(e){e=ye(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.tos||s>=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}},Ro=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(" ",r);-1==a&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}},Uo=[""],Vo=function(e){e.select()};ka?Vo=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ga&&(Vo=function(e){try{e.select()}catch(t){}});var Wo,qo=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ho=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||qo.test(e))},zo=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Wo=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Go=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};ga&&11>va&&(Hi=function(){try{return document.activeElement}catch(e){return document.body}});var Yo,Ko,Xo=e.rmClass=function(e,t){var n=e.className,r=zi(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Jo=e.addClass=function(e,t){var n=e.className;zi(t).test(n)||(e.className+=(n?" ":"")+t)},$o=!1,Qo=function(){if(ga&&9>va)return!1;var e=Vi("div");return"draggable"in e||"dragDrop"in e}(),Zo=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},es=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},ts=function(){var e=Vi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ns=null,rs=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)rs[e+48]=rs[e+96]=String(e);for(var e=65;90>=e;e++)rs[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)rs[e+111]=rs[e+63235]="F"+e}();var is,as=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,a=/[stwN]/,o=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,p=[],f=0;c>f;++f)p.push(r=e(n.charCodeAt(f)));for(var f=0,d=u;c>f;++f){var r=p[f];"m"==r?p[f]=d:d=r}for(var f=0,h=u;c>f;++f){var r=p[f];"1"==r&&"r"==h?p[f]="n":o.test(r)&&(h=r,"r"==r&&(p[f]="R"))}for(var f=1,d=p[0];c-1>f;++f){var r=p[f];"+"==r&&"1"==d&&"1"==p[f+1]?p[f]="1":","!=r||d!=p[f+1]||"1"!=d&&"n"!=d||(p[f]=d),d=r}for(var f=0;c>f;++f){var r=p[f];if(","==r)p[f]="N";else if("%"==r){for(var m=f+1;c>m&&"%"==p[m];++m);for(var y=f&&"!"==p[f-1]||c>m&&"1"==p[m]?"1":"N",g=f;m>g;++g)p[g]=y;f=m-1}}for(var f=0,h=u;c>f;++f){var r=p[f];"L"==h&&"1"==r?p[f]="L":o.test(r)&&(h=r)}for(var f=0;c>f;++f)if(a.test(p[f])){for(var m=f+1;c>m&&a.test(p[m]);++m);for(var v="L"==(f?p[f-1]:u),b="L"==(c>m?p[m]:u),y=v||b?"L":"R",g=f;m>g;++g)p[g]=y;f=m-1}for(var _,x=[],f=0;c>f;)if(s.test(p[f])){var E=f;for(++f;c>f&&s.test(p[f]);++f);x.push(new t(0,E,f))}else{var w=f,C=x.length;for(++f;c>f&&"L"!=p[f];++f);for(var g=w;f>g;)if(l.test(p[g])){g>w&&x.splice(C,0,new t(1,w,g));var S=g;for(++g;f>g&&l.test(p[g]);++g);x.splice(C,0,new t(2,S,g)),w=g}else++g;f>w&&x.splice(C,0,new t(1,w,f))}return 1==x[0].level&&(_=n.match(/^\s+/))&&(x[0].from=_[0].length,x.unshift(new t(0,0,_[0].length))),1==Ii(x).level&&(_=n.match(/\s+$/))&&(Ii(x).to-=_[0].length,x.push(new t(0,c-_[0].length,c))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Ii(x).level&&x.push(new t(x[0].level,c,c)),x}}();return e.version="5.8.0",e})},function(e,t){e.exports={input:"style__input___-5wtK",header:"style__header___3HY2K",weekday:"style__weekday___aVmx6",month:"style__month___1TYi0",day:"style__day___38YhH",year:"style__year___mgUXp",wrapper:"style__wrapper___1e0Q3","display-years":"style__display-years___1-kIR","display-months":"style__display-months___8TM5f",dialog:"style__dialog___1K0QB",button:"style__button___3nwWZ"}},function(e,t){e.exports={root:"style__root___l67Fg",navigation:"style__navigation___3AeWt",label:"style__label___3pDnh",active:"style__active___1P7dt",disabled:"style__disabled___3zDPk",hidden:"style__hidden___YFhoi",pointer:"style__pointer___2yswv",tab:"style__tab___3H57r"}},function(e,t){e.exports={input:"style__input___2wDBo",header:"style__header___27KxH",hours:"style__hours___bh9kc",minutes:"style__minutes___2_O7G",separator:"style__separator___22VrP",ampm:"style__ampm___1Sb1x",am:"style__am___1F8JZ",pm:"style__pm___2LtFs",dialog:"style__dialog___2NNYy",button:"style__button___21dFg","display-hours":"style__display-hours___375-j","display-minutes":"style__display-minutes___3pGuR","format-am":"style__format-am___hbpFN","format-pm":"style__format-pm___1Lswh"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return u+e}function a(e,t){try{window.sessionStorage.setItem(i(e),JSON.stringify(t))}catch(n){if(n.name===c||0===window.sessionStorage.length)return void l["default"](!1,"[history] Unable to save state; sessionStorage is not available in Safari private mode");throw n}}function o(e){var t=window.sessionStorage.getItem(i(e));if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=a,t.readState=o;var s=n(30),l=r(s),u="@@History/",c="QuotaExceededError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){return s["default"](l.canUseDOM,"DOM history needs a DOM"),n.listen(e)}var n=p["default"](a({getUserConfirmation:u.getUserConfirmation},e,{go:u.go}));return a({},n,{listen:t})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0&&t=0&&m= 0 and < %s, was %s",h.length,m);var y=i(h);return f}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return function(){function t(e){return y&&null==e.basename&&(0===e.pathname.indexOf(y)?(e.pathname=e.pathname.substring(y.length),e.basename=y,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!y)return e;"string"==typeof e&&(e=p["default"](e));var t=e.pathname,n="/"===y.slice(-1)?y:y+"/",r="/"===t.charAt(0)?t.slice(1):t,i=n+r;return o({},e,{pathname:i})}function r(e){return v.listenBefore(function(n,r){u["default"](e,t(n),r)})}function a(e){return v.listen(function(n){e(t(n))})}function l(e,t){v.pushState(e,n(t))}function c(e,t){v.replaceState(e,n(t))}function f(e){return v.createPath(n(e))}function d(e){return v.createHref(n(e))}function h(){return t(v.createLocation.apply(v,arguments))}var m=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],y=m.basename,g=i(m,["basename"]),v=e(g);if(null==y&&s.canUseDOM){var b=document.getElementsByTagName("base")[0];b&&(y=b.href)}return o({},v,{listenBefore:r,listen:a,pushState:l,replaceState:c,createPath:f,createHref:d,createLocation:h})}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;tt;++t)e=d[t].call();return e}function r(e){return d.push(e),1===d.length&&(u.canUseDOM?p=i(n):l["default"](!1,"listenBeforeUnload only works in DOM environments")),function(){d=d.filter(function(t){return t!==e}),0===d.length&&p&&(p(),p=null)}}function a(e){u.canUseDOM&&-1===d.indexOf(e)&&(d.push(e),1===d.length&&(p=i(n)))}function s(e){d.length>0&&(d=d.filter(function(t){return t!==e}),0===d.length&&p())}var c=e(t),p=void 0,d=[];return o({},c,{listenBeforeUnload:r,registerBeforeUnloadHook:f["default"](a,"registerBeforeUnloadHook is deprecated; use listenBeforeUnload instead"),unregisterBeforeUnloadHook:f["default"](s,"unregisterBeforeUnloadHook is deprecated; use the callback returned from listenBeforeUnload instead")})}}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;tr;++r)n.hexTable[r]="%"+((16>r?"0":"")+r.toString(16)).toUpperCase();t.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},r=0,i=e.length;i>r;++r)"undefined"!=typeof e[r]&&(n[r]=e[r]);return n},t.merge=function(e,n,r){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):"object"==typeof e?e[n]=!0:e=[e,n],e;if("object"!=typeof e)return e=[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e,r));for(var i=Object.keys(n),a=0,o=i.length;o>a;++a){var s=i[a],l=n[s];Object.prototype.hasOwnProperty.call(e,s)?e[s]=t.merge(e[s],l,r):e[s]=l}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;"string"!=typeof e&&(e=""+e);for(var t="",r=0,i=e.length;i>r;++r){var a=e.charCodeAt(r);45===a||46===a||95===a||126===a||a>=48&&57>=a||a>=65&&90>=a||a>=97&&122>=a?t+=e[r]:128>a?t+=n.hexTable[a]:2048>a?t+=n.hexTable[192|a>>6]+n.hexTable[128|63&a]:55296>a||a>=57344?t+=n.hexTable[224|a>>12]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a]:(++r,a=65536+((1023&a)<<10|1023&e.charCodeAt(r)),t+=n.hexTable[240|a>>18]+n.hexTable[128|a>>12&63]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a])}return t},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var r=n.indexOf(e);if(-1!==r)return n[r];if(n.push(e),Array.isArray(e)){for(var i=[],a=0,o=e.length;o>a;++a)"undefined"!=typeof e[a]&&i.push(e[a]);return i}var s=Object.keys(e);for(a=0,o=s.length;o>a;++a){var l=s[a];e[l]=t.compact(e[l],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return 0===e.button}function l(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function u(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t=0;r--){var i=e[r],a=i.path||"";if(n=a.replace(/\/*$/,"/")+n,0===a.indexOf("/"))break}return"/"+n},t.prototype.render=function(){c["default"](!1," elements are for router configuration only and should not be rendered")},o(t,null,[{key:"propTypes",value:{path:m,from:m,to:m.isRequired,query:y,state:y,onEnter:d.falsy,children:d.falsy},enumerable:!0}]),t}(l["default"].Component);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var o=function(){function e(e,t){for(var n=0;n=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var i=n(285),a=n(124),o=n(9),s=n(57),l=n(79),u=n(2),c={dangerouslyReplaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,updateTextContent:l,processUpdates:function(e,t){for(var n,o=null,c=null,p=0;p-1?void 0:o(!1),!u.plugins[n]){t.extractEvents?void 0:o(!1),u.plugins[n]=t;var r=t.eventTypes;for(var a in r)i(r[a],t,a)?void 0:o(!1)}}}function i(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?o(!1):void 0,u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];a(s,t,n)}return!0}return e.registrationName?(a(e.registrationName,t,n),!0):!1}function a(e,t,n){u.registrationNameModules[e]?o(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var o=n(2),s=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s?o(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];l.hasOwnProperty(n)&&l[n]===i||(l[n]?o(!1):void 0,l[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=u},function(e,t,n){"use strict";function r(e){return(""+e).replace(_,"//")}function i(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function o(e,t,n){if(null==e)return e;var r=i.getPooled(t,n);g(e,a,r),i.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function l(e,t,n){var i=e.result,a=e.keyPrefix,o=e.func,s=e.context,l=o.call(s,t,e.count++);Array.isArray(l)?u(l,i,n,y.thatReturnsArgument):null!=l&&(m.isValidElement(l)&&(l=m.cloneAndReplaceKey(l,a+(l!==t?r(l.key||"")+"/":"")+n)),i.push(l))}function u(e,t,n,i,a){var o="";null!=n&&(o=r(n)+"/");var u=s.getPooled(t,o,i,a);g(e,l,u),s.release(u)}function c(e,t,n){if(null==e)return e;var r=[];return u(e,r,null,t,n),r}function p(e,t,n){return null}function f(e,t){return g(e,p,null)}function d(e){var t=[];return u(e,t,null,y.thatReturnsArgument),t}var h=n(17),m=n(7),y=n(10),g=n(81),v=h.twoArgumentPooler,b=h.fourArgumentPooler,_=/\/(?!\/)/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(i,v),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,b);var x={forEach:o,map:c,mapIntoWithKeyPrefixInternal:u,count:f,toArray:d};e.exports=x},function(e,t,n){"use strict";function r(e,t){var n=E.hasOwnProperty(t)?E[t]:null;C.hasOwnProperty(t)&&(n!==_.OVERRIDE_BASE?y(!1):void 0),e.hasOwnProperty(t)&&(n!==_.DEFINE_MANY&&n!==_.DEFINE_MANY_MERGED?y(!1):void 0)}function i(e,t){if(t){"function"==typeof t?y(!1):void 0,f.isValidElement(t)?y(!1):void 0;var n=e.prototype;t.hasOwnProperty(b)&&w.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==b){var a=t[i];if(r(n,i),w.hasOwnProperty(i))w[i](e,a);else{var o=E.hasOwnProperty(i),u=n.hasOwnProperty(i),c="function"==typeof a,p=c&&!o&&!u&&t.autobind!==!1;if(p)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[i]=a,n[i]=a;else if(u){var d=E[i];!o||d!==_.DEFINE_MANY_MERGED&&d!==_.DEFINE_MANY?y(!1):void 0,d===_.DEFINE_MANY_MERGED?n[i]=s(n[i],a):d===_.DEFINE_MANY&&(n[i]=l(n[i],a))}else n[i]=a}}}}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in w;i?y(!1):void 0;var a=n in e;a?y(!1):void 0,e[n]=r}}}function o(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:y(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?y(!1):void 0,e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return o(i,n),o(i,r),i}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=u(e,n)}}var p=n(111),f=n(7),d=(n(51),n(50),n(126)),h=n(3),m=n(36),y=n(2),g=n(58),v=n(19),b=(n(4),v({mixins:null})),_=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),x=[],E={mixins:_.DEFINE_MANY,statics:_.DEFINE_MANY,propTypes:_.DEFINE_MANY,contextTypes:_.DEFINE_MANY,childContextTypes:_.DEFINE_MANY,getDefaultProps:_.DEFINE_MANY_MERGED,getInitialState:_.DEFINE_MANY_MERGED,getChildContext:_.DEFINE_MANY_MERGED,render:_.DEFINE_ONCE,componentWillMount:_.DEFINE_MANY,componentDidMount:_.DEFINE_MANY,componentWillReceiveProps:_.DEFINE_MANY,shouldComponentUpdate:_.DEFINE_ONCE,componentWillUpdate:_.DEFINE_MANY,componentDidUpdate:_.DEFINE_MANY,componentWillUnmount:_.DEFINE_MANY,updateComponent:_.OVERRIDE_BASE},w={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n"+s+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var i=o.getNode(this._rootNodeID);r.updateTextContent(i,n)}}},unmountComponent:function(){a.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(8),a=n(53),o=n(3),s=n(10),l={initialize:s,close:function(){f.isBatchingUpdates=!1}},u={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[u,l];o(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,a){var o=f.isBatchingUpdates;f.isBatchingUpdates=!0,o?e(t,n,r,i,a):p.perform(e,null,t,n,r,i,a)}};e.exports=f},function(e,t,n){"use strict";function r(){if(!S){S=!0,g.EventEmitter.injectReactEventListener(y),g.EventPluginHub.injectEventPluginOrder(s),g.EventPluginHub.injectInstanceHandle(v),g.EventPluginHub.injectMount(b),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:w,EnterLeaveEventPlugin:l,ChangeEventPlugin:a,SelectEventPlugin:x,BeforeInputEventPlugin:i}),g.NativeComponent.injectGenericComponentClass(h),g.NativeComponent.injectTextComponentClass(m),g.Class.injectMixin(p),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(C),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(_),g.Updates.injectBatchingStrategy(d),g.RootIndex.injectCreateReactRootIndex(u.canUseDOM?o.createReactRootIndex:E.createReactRootIndex),g.Component.injectEnvironment(f)}}var i=n(281),a=n(283),o=n(284),s=n(286),l=n(287),u=n(5),c=n(290),p=n(291),f=n(68),d=n(116),h=n(296),m=n(115),y=n(304),g=n(305),v=n(24),b=n(6),_=n(309),x=n(319),E=n(320),w=n(321),C=n(318),S=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){if(p.current){var e=p.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;a("uniqueKey",e,t)}}function a(e,t,n){var i=r();if(!i){var a="string"==typeof n?n:n.displayName||n.name;a&&(i=" Check the top-level render call using <"+a+">.")}var o=h[e]||(h[e]={});if(o[i])return null;o[i]=!0;var s={parentOrOwner:i,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==p.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function o(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=a},function(e,t,n){"use strict";var r=n(58),i=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=i},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=u(t)),n}function i(e){return c?void 0:l(!1),new c(e.type,e.props)}function a(e){return new f(e)}function o(e){return e instanceof f}var s=n(3),l=n(2),u=null,c=null,p={},f=null,d={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){s(p,e)}},h={getComponentClassForElement:r,createInternalComponent:i,createInstanceForText:a,isTextComponent:o,injection:d};e.exports=h},function(e,t,n){"use strict";function r(e,t){}var i=(n(4),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});e.exports=i},function(e,t,n){"use strict";function r(e){function t(t,n,r,i,a,o){if(i=i||E,o=o||r,null==n[r]){var s=b[a];return t?new Error("Required "+s+" `"+o+"` was not specified in "+("`"+i+"`.")):null}return e(n,r,i,a,o)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,i,a){var o=t[n],s=m(o);if(s!==e){var l=b[i],u=y(o);return new Error("Invalid "+l+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function a(){return r(_.thatReturns(null))}function o(e){function t(t,n,r,i,a){var o=t[n];if(!Array.isArray(o)){var s=b[i],l=m(o);return new Error("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u>"}var v=n(7),b=n(50),_=n(10),x=n(76),E="<>",w={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:a(),arrayOf:o,element:s(),instanceOf:l,node:f(),objectOf:c,oneOf:u,oneOfType:p,shape:d};e.exports=w},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(null==t?i(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var i=n(2);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=e,i=void 0===r[n];i&&null!=t&&(r[n]=t)}function i(e){if(null==e)return e;var t={};return a(e,r,t),t}var a=n(81);n(4);e.exports=i},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(){return!a&&i.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var i=n(5),a=null;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:a(!1),e}var i=n(7),a=n(2);e.exports=r},function(e,t,n){"use strict";var r=n(10),i={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=i},function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,a=t;if(n=!1,r&&a){if(r===a)return!0;if(i(r))return!1;if(i(a)){e=r,t=a.parentNode,n=!0;continue e}return r.contains?r.contains(a):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(a)):!1; +}return!1}}var i=n(346);e.exports=r},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(e){return o?void 0:a(!1),f.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?o.innerHTML="":o.innerHTML="<"+e+">",s[e]=!o.firstChild),s[e]?f[e]:null}var i=n(5),a=n(2),o=i.canUseDOM?document.createElement("div"):null,s={},l=[1,'"],u=[1,"","
"],c=[3,"","
"],p=[1,'',""],f={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(e){f[e]=p,s[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=r.bind(t),o=0;o1?arguments[1]:"utf8"):l(this,t)):arguments.length>1?new e(t,arguments[1]):new e(t)}function o(t,n){if(t=m(t,0>n?0:0|y(n)),!e.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)t[r]=0;return t}function s(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|v(t,n);return e=m(e,r),e.write(t,n),e}function l(t,n){if(e.isBuffer(n))return u(t,n);if(J(n))return c(t,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return p(t,n);if(n instanceof ArrayBuffer)return f(t,n)}return n.length?d(t,n):h(t,n)}function u(e,t){var n=0|y(t.length);return e=m(e,n),t.copy(e,0,0,n),e}function c(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function f(t,n){return e.TYPED_ARRAY_SUPPORT?(n.byteLength,t=e._augment(new Uint8Array(n))):t=p(t,new Uint8Array(n)),t}function d(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(e,t){var n,r=0;"Buffer"===t.type&&J(t.data)&&(n=t.data,r=0|y(n.length)),e=m(e,r);for(var i=0;r>i;i+=1)e[i]=255&n[i];return e}function m(t,n){e.TYPED_ARRAY_SUPPORT?(t=e._augment(new Uint8Array(n)),t.__proto__=e.prototype):(t.length=n,t._isBuffer=!0);var r=0!==n&&n<=e.poolSize>>>1;return r&&(t.parent=$),t}function y(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function g(t,n){if(!(this instanceof g))return new g(t,n);var r=new e(t,n);return delete r.parent,r}function v(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function b(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return T(this,t,n);case"binary":return P(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;r>o;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+o]=s}return o}function x(e,t,n,r){return Y(q(t,e.length-n),e,n,r)}function E(e,t,n,r){return Y(H(t),e,n,r)}function w(e,t,n,r){return E(e,t,n,r)}function C(e,t,n,r){return Y(G(t),e,n,r)}function S(e,t,n,r){return Y(z(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n>=i+s){var l,u,c,p;switch(s){case 1:128>a&&(o=a);break;case 2:l=e[i+1],128===(192&l)&&(p=(31&a)<<6|63&l,p>127&&(o=p));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(p=(15&a)<<12|(63&l)<<6|63&u,p>2047&&(55296>p||p>57343)&&(o=p));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&1114112>p&&(o=p))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return A(r)}function A(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function I(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",a=t;n>a;a++)i+=W(e[a]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",a=0;ae)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(t,n,r,i,a,o){if(!e.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(n>a||o>n)throw new RangeError("value is out of bounds");if(r+i>t.length)throw new RangeError("index out of range")}function F(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);a>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);a>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function L(e,t,n,r,i,a){if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function B(e,t,n,r,i){return i||L(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,i){return i||L(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,n,r,52,8),n+8}function U(e){if(e=V(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function V(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return 16>e?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;r>o;o++){if(n=e.charCodeAt(o),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;a.push(n)}else if(2048>n){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function H(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function G(e){return K.toByteArray(U(e))}function Y(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var K=n(328),X=n(329),J=n(330);t.Buffer=e,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,e.poolSize=8192;var $={};e.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),e.TYPED_ARRAY_SUPPORT&&(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array),e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,n){if(!e.isBuffer(t)||!e.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,i=n.length,o=0,a=Math.min(r,i);a>o&&t[o]===n[o];)++o;return o!==a&&(r=t[o],i=n[o]),i>r?-1:r>i?1:0},e.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,n){if(!J(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new e(0);var r;if(void 0===n)for(n=0,r=0;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},e.prototype.compare=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:e.compare(this,t)},e.prototype.indexOf=function(t,n){function r(e,t,n){for(var r=-1,i=0;n+i2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,n);if(e.isBuffer(t))return r(this,t,n);if("number"==typeof t)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,n):r(this,[t],n);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},e.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},e.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=t,t=0|n,n=i}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return E(this,e,t,n);case"binary":return w(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;e.prototype.slice=function(t,n){var r=this.length;t=~~t,n=void 0===n?r:~~n,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),t>n&&(n=t);var i;if(e.TYPED_ARRAY_SUPPORT)i=e._augment(this.subarray(t,n));else{var o=n-t;i=new e(o,void 0);for(var a=0;o>a;a++)i[a]=this[a+t]}return i.length&&(i.parent=this.parent||this),i},e.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o0&&(i*=256);)r+=this[e+--t]*i;return r},e.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},e.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},e.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},e.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),X.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),X.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),X.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),X.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||F(this,e,t,n,Math.pow(2,8*n),0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},e.prototype.writeUInt8=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},e.prototype.writeUInt16LE=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):N(this,t,n,!0),n+2},e.prototype.writeUInt16BE=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):N(this,t,n,!1),n+2},e.prototype.writeUInt32LE=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):L(this,t,n,!0),n+4},e.prototype.writeUInt32BE=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):L(this,t,n,!1),n+4},e.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=0,a=1,s=0>e?1:0;for(this[t]=255&e;++o>0)-s&255;return t+n},e.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0>e?1:0;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=(e/a>>0)-s&255;return t+n},e.prototype.writeInt8=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[n]=255&t,n+1},e.prototype.writeInt16LE=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):N(this,t,n,!0),n+2},e.prototype.writeInt16BE=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):N(this,t,n,!1),n+2},e.prototype.writeInt32LE=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):L(this,t,n,!0),n+4},e.prototype.writeInt32BE=function(t,n,r){return t=+t,n=0|n,r||F(this,t,n,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):L(this,t,n,!1),n+4},e.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},e.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},e.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},e.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},e.prototype.copy=function(t,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=t.length&&(n=t.length),n||(n=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-nr&&i>n)for(o=a-1;o>=0;o--)t[o+n]=this[o+r];else if(1e3>a||!e.TYPED_ARRAY_SUPPORT)for(o=0;a>o;o++)t[o+n]=this[o+r];else t._set(this.subarray(r,r+a),n);return a},e.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var i=q(e.toString()),o=i.length;for(r=t;n>r;r++)this[r]=i[r%o]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var t=new Uint8Array(this.length),n=0,r=t.length;r>n;n+=1)t[n]=this[n];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=e.prototype;e._augment=function(t){return t.constructor=e,t._isBuffer=!0,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.equals=Z.equals,t.compare=Z.compare,t.indexOf=Z.indexOf,t.copy=Z.copy,t.slice=Z.slice,t.readUIntLE=Z.readUIntLE,t.readUIntBE=Z.readUIntBE,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readIntLE=Z.readIntLE,t.readIntBE=Z.readIntBE,t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUIntLE=Z.writeUIntLE,t.writeUIntBE=Z.writeUIntBE,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeIntLE=Z.writeIntLE,t.writeIntBE=Z.writeIntBE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,n(142).Buffer,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tr&&(r=n.length-1),r>=n.length&&(r=0),e.setState({active:n[r]})}},this.handleFocus=function(){var t=event.target.getBoundingClientRect(),n=window.innerHeight||document.documentElement.offsetHeight;e.refs.suggestions.scrollTop=0,e.setState({active:"",up:t.top>n/2+t.height,focus:!0})},this.handleBlur=function(){e.state.focus&&e.setState({focus:!1})},this.handleHover=function(t){e.setState({active:t.target.getAttribute("id")})},this.handleSelect=function(t){_["default"].events.pauseEvent(t),e._selectOption(t.target.getAttribute("id"))},this.handleUnselect=function(t){e._unselectOption(t.target.getAttribute("id"))}}return a(t,e),u(t,[{key:"componentDidMount",value:function(){this.props.value&&this.setValue(this.props.value),this.setState({width:h["default"].findDOMNode(this).getBoundingClientRect().width})}},{key:"componentWillReceiveProps",value:function(e){e.dataSource&&this.setState({dataSource:this._indexDataSource(e.dataSource)})}},{key:"componentWillUpdate",value:function(e,t){this.refs.input.setValue(t.query)}},{key:"renderLabel",value:function(){return this.props.label?f["default"].createElement("label",{"data-role":"label",className:v["default"].label},this.props.label):void 0}},{key:"renderSelected",value:function(){return this.props.multiple?f["default"].createElement("ul",{className:v["default"].values,"data-role":"selections",onClick:this.handleUnselect},[].concat(i(this.state.values)).map(function(e){var t=l(e,2),n=t[0],r=t[1];return f["default"].createElement("li",{key:n,id:n,"data-role":"selection",className:v["default"].value},r)})):void 0}},{key:"renderSuggestions",value:function(){var e=this;return[].concat(i(this._getSuggestions())).map(function(t){var n=l(t,2),r=n[0],i=n[1],o=v["default"].suggestion;return e.state.active===r&&(o+=" "+v["default"].active),f["default"].createElement("li",{id:r,key:r,"data-role":"suggestion",className:o},i)})}},{key:"render",value:function(){var e=v["default"].root;this.props.className&&(e+=" "+this.props.className),this.state.focus&&(e+=" "+v["default"].focus);var t=v["default"].suggestions;this.state.up&&(t+=" "+v["default"].up);var n={width:this.state.width};return f["default"].createElement("div",{"data-react-toolbox":"autocomplete",className:e},this.renderLabel(),this.renderSelected(),f["default"].createElement(y["default"],s({ref:"input"},this.props,{label:"",value:"","data-role":"input",className:v["default"].input,onBlur:this.handleBlur,onChange:this.handleQueryChange,onFocus:this.handleFocus,onKeyUp:this.handleKeyPress})),f["default"].createElement("ul",{ref:"suggestions","data-role":"suggestions",className:t,onMouseDown:this.handleSelect,onMouseOver:this.handleHover,style:n},this.renderSuggestions()))}},{key:"_indexDataSource",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return e.length?new Map(e.map(function(e){return[e,e]})):new Map(Object.keys(e).map(function(t){return[t,e[t]]}))}},{key:"_getSuggestions",value:function(){var e=this.state.query.toLowerCase().trim()||"",t=new Map,n=!0,r=!1,i=void 0;try{for(var o,a=this.state.dataSource[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=l(o.value,2),u=s[0],c=s[1];!this.state.values.has(u)&&c.toLowerCase().trim().startsWith(e)&&t.set(u,c)}}catch(p){r=!0,i=p}finally{try{!n&&a["return"]&&a["return"]()}finally{if(r)throw i}}return t}},{key:"_selectOption",value:function(e){var t=this,n=this.state.dataSource,r=this.state.values,i=this.props.multiple?"":n.get(e);r=new Map(r),this.props.multiple||r.clear(),r.set(e,n.get(e)),this.setState({focus:!1,query:i,values:r},function(){t.refs.input.blur(),t.props.onChange&&t.props.onChange(t)})}},{key:"_unselectOption",value:function(e){var t=this;if(e){var n=new Map(this.state.values);n["delete"](e),this.setState({focus:!1,values:n},function(){t.props.onChange&&t.props.onChange(t)})}}},{key:"getValue",value:function(){var e=[].concat(i(this.state.values.keys()));return this.props.multiple?e:e.length>0?e[0]:null}},{key:"setValue",value:function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=new Map,n="string"==typeof e?[e]:e,r=!0,i=!1,o=void 0;try{for(var a,s=this.state.dataSource[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=l(a.value,2),c=u[0],p=u[1];-1!==n.indexOf(c)&&t.set(c,p)}}catch(f){i=!0,o=f}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}this.setState({values:t,query:this.props.multiple?"":t.get(n[0])})}}],[{key:"propTypes",value:{className:f["default"].PropTypes.string,dataSource:f["default"].PropTypes.any,disabled:f["default"].PropTypes.bool,error:f["default"].PropTypes.string,label:f["default"].PropTypes.string,multiple:f["default"].PropTypes.bool,onChange:f["default"].PropTypes.func,required:f["default"].PropTypes.bool,value:f["default"].PropTypes.any},enumerable:!0},{key:"defaultProps",value:{className:"",dataSource:{},multiple:!0},enumerable:!0}]),t}(f["default"].Component);t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nr/2+n.height:!1;e.setState({active:!0,up:i})},this.handleClickValue=function(t){if(!e.props.disabled){var n=t.toString(),r=!0,i=!1,o=void 0;try{for(var a,s=e.props.dataSource[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value;if(l.value.toString()===n){e.setState({active:!1,selected:l});break}}}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}}}}return o(t,e),a(t,[{key:"componentDidMount",value:function(){this.setState({width:p["default"].findDOMNode(this).getBoundingClientRect().width})}},{key:"componentDidUpdate",value:function(e,t){this.props.onChange&&t.selected!==this.state.selected&&t.active&&this.props.onChange(this)}},{key:"renderValues",value:function(){var e=this,t=this.props.dataSource.map(function(t,n){var r=void 0;return t.value===e.state.selected.value&&(r=" "+m["default"].selected),u["default"].createElement("li",{key:n,className:r,id:t.value,onClick:e.handleClickValue.bind(e,t.value)},e.props.template?e.props.template(t):t.label,u["default"].createElement(d["default"],{className:m["default"].ripple}))}),n=m["default"].values,r={width:this.state.width};return this.state.up&&(n+=" "+m["default"].up),u["default"].createElement("ul",{ref:"values",className:n,style:r},t)}},{key:"render",value:function(){var e=m["default"].root;return this.props.className&&(e+=" "+this.props.className),this.props.disabled&&(e+=" "+m["default"].disabled),this.state.active&&(e+=" "+m["default"].active),u["default"].createElement("div",{"data-react-toolbox":"dropdown",className:e},this.props.label?u["default"].createElement("label",{className:m["default"].label},this.props.label):null,this.renderValues(),u["default"].createElement("div",{ref:"value",className:m["default"].value,onClick:this.handleClick},this.props.template?this.props.template(this.state.selected):u["default"].createElement("span",null,this.state.selected.label)))}},{key:"getValue",value:function(){return this.state.selected.value}},{key:"setValue",value:function(e){this.setState({selected:e})}}],[{key:"propTypes",value:{auto:u["default"].PropTypes.bool,className:u["default"].PropTypes.string,dataSource:u["default"].PropTypes.array.isRequired,disabled:u["default"].PropTypes.bool,label:u["default"].PropTypes.string,onChange:u["default"].PropTypes.func,template:u["default"].PropTypes.func,value:u["default"].PropTypes.string},enumerable:!0},{key:"defaultProps",value:{auto:!0,className:"",disabled:!1},enumerable:!0}]),t}(u["default"].Component);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;tt,u=s/2-i/2>n;return(l?"top":"bottom")+"-"+(u?"left":"right")}},{key:"getRootStyle",value:function(){return this.state.position!==v.STATIC?{width:this.state.width,height:this.state.height}:void 0}},{key:"getMenuStyle",value:function(){var e=this.state,t=e.width,n=e.height,r=e.position;if(r!==v.STATIC){if(this.state.active)return{clip:"rect(0 "+t+"px "+n+"px 0)"};if(r===v.TOP_RIGHT)return{clip:"rect(0 "+t+"px 0 "+t+"px)"};if(r===v.BOTTOM_RIGHT)return{clip:"rect("+n+"px "+t+"px "+n+"px "+t+"px)"};if(r===v.BOTTOM_LEFT)return{clip:"rect("+n+"px 0 "+n+"px 0)"};if(r===v.TOP_LEFT)return{clip:"rect(0 0 0 0)"}}}},{key:"renderItems",value:function(){var e=this;return u["default"].Children.map(this.props.children,function(t){return t.type===d["default"]?u["default"].cloneElement(t,{ripple:t.props.ripple||e.props.ripple,selected:t.props.value&&e.props.selectable&&t.props.value===e.state.value,onClick:e.handleSelect.bind(e,t)}):u["default"].cloneElement(t)})}},{key:"render",value:function(){var e={width:this.state.width,height:this.state.height},t=g["default"].root+" "+g["default"][this.state.position];return this.state.active&&(t+=" "+g["default"].active),this.state.rippled&&(t+=" "+g["default"].rippled),this.props.className&&(t+=" "+this.props.className),u["default"].createElement("div",{className:t,style:this.getRootStyle()},this.props.outline?u["default"].createElement("div",{className:g["default"].outline,style:e}):null,u["default"].createElement("ul",{ref:"menu",className:g["default"].menu,style:this.getMenuStyle()},this.renderItems()))}},{key:"getValue",value:function(){return this.state.value}},{key:"setValue",value:function(e){this.setState({value:e})}},{key:"show",value:function(){this.setState({active:!0})}},{key:"hide",value:function(){this.setState({active:!1})}}],[{key:"propTypes",value:{active:u["default"].PropTypes.bool,className:u["default"].PropTypes.string,onHide:u["default"].PropTypes.func,onSelect:u["default"].PropTypes.func,onShow:u["default"].PropTypes.func,outline:u["default"].PropTypes.bool,position:u["default"].PropTypes.string,ripple:u["default"].PropTypes.bool,selectable:u["default"].PropTypes.bool,value:u["default"].PropTypes.any},enumerable:!0},{key:"defaultProps",value:{active:!1,outline:!0,position:v.STATIC,ripple:!0,selectable:!0},enumerable:!0}]),t}(u["default"].Component);t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;nthis.props.max?1:(e-this.props.min)/(this.props.max-this.props.min)}},{key:"circularStyle",value:function(){return"indeterminate"!==this.props.mode?{strokeDasharray:2*Math.PI*25*this.calculateRatio(this.props.value)+", 400"}:void 0}},{key:"renderCircular",value:function(){return u["default"].createElement("svg",{className:p["default"].circle},u["default"].createElement("circle",{className:p["default"].path,style:this.circularStyle(),cx:"30",cy:"30",r:"25"}))}},{key:"linearStyle",value:function(){return"indeterminate"!==this.props.mode?{buffer:d["default"]({transform:"scaleX("+this.calculateRatio(this.props.buffer)+")"}),value:d["default"]({transform:"scaleX("+this.calculateRatio(this.props.value)+")"})}:{}}},{key:"renderLinear",value:function(){var e=this.linearStyle(),t=e.buffer,n=e.value;return u["default"].createElement("div",null,u["default"].createElement("span",{ref:"buffer","data-ref":"buffer",className:p["default"].buffer,style:t}),u["default"].createElement("span",{ref:"value","data-ref":"value",className:p["default"].value,style:n}))}},{key:"render",value:function(){var e="linear"===this.props.type?p["default"].linear:p["default"].circular;return this.props.mode&&(e+=" "+p["default"][this.props.mode]),this.props.multicolor&&(e+=" "+p["default"].multicolor),this.props.className&&(e+=" "+this.props.className),u["default"].createElement("div",{"data-react-toolbox":"progress-bar",className:e,"aria-valuenow":this.props.value,"aria-valuemin":this.props.min,"aria-valuemax":this.props.max},"circular"===this.props.type?this.renderCircular():this.renderLinear())}}],[{key:"propTypes",value:{buffer:u["default"].PropTypes.number,className:u["default"].PropTypes.string,max:u["default"].PropTypes.number,min:u["default"].PropTypes.number,mode:u["default"].PropTypes.string,multicolor:u["default"].PropTypes.bool,type:u["default"].PropTypes.string,value:u["default"].PropTypes.number},enumerable:!0},{key:"defaultProps",value:{buffer:0,className:"",max:100,min:0,mode:"indeterminate",multicolor:!1,type:"linear",value:0},enumerable:!0}]),t}(u["default"].Component);t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;tthis.props.max?this.props.max:m["default"].round(e,this.stepDecimals())}},{key:"stepDecimals",value:function(){return(this.props.step.toString().split(".")[1]||[]).length}},{key:"addToValue",value:function(e){this.setState({value:this.trimValue(this.state.value+e)})}},{key:"valueForInput",value:function(e){var t=this.stepDecimals();return t>0?e.toFixed(t):e.toString()}},{key:"knobOffset",value:function(){var e=this.props,t=e.max,n=e.min;return this.state.sliderLength*(this.state.value-n)/(t-n)}},{key:"renderSnaps",value:function(){return this.props.snaps?u["default"].createElement("div",{ref:"snaps",className:d["default"].snaps},m["default"].range(0,(this.props.max-this.props.min)/this.props.step).map(function(e){return u["default"].createElement("div",{key:"span-"+e,className:d["default"].snap})})):void 0}},{key:"renderInput",value:function(){return this.props.editable?u["default"].createElement(b["default"],{ref:"input",className:d["default"].input,onChange:this.handleInputChange,value:this.valueForInput(this.state.value)}):void 0}},{key:"render",value:function(){var e=m["default"].prefixer({transform:"translateX("+this.knobOffset()+"px)"}),t=this.props.className;return this.props.editable&&(t+=" "+d["default"].editable),this.props.pinned&&(t+=" "+d["default"].pinned),this.state.pressed&&(t+=" "+d["default"].pressed),this.state.value===this.props.min&&(t+=" "+d["default"].ring),u["default"].createElement("div",{"data-react-toolbox":"slider",className:d["default"].root+t,tabIndex:"0",onFocus:this.handleSliderFocus,onBlur:this.handleSliderBlur},u["default"].createElement("div",{ref:"slider",className:d["default"].container,onTouchStart:this.handleTouchStart,onMouseDown:this.handleMouseDown},u["default"].createElement("div",{ref:"knob",className:d["default"].knob,style:e,onMouseDown:this.handleMouseDown,onTouchStart:this.handleTouchStart},u["default"].createElement("div",{className:d["default"].innerknob,"data-value":parseInt(this.state.value)})),u["default"].createElement("div",{className:d["default"].progress},u["default"].createElement(g["default"],{ref:"progressbar",mode:"determinate",className:d["default"].innerprogress,value:this.state.value,max:this.props.max,min:this.props.min}),this.renderSnaps())),this.renderInput())}},{key:"getValue",value:function(){return this.state.value}},{key:"setValue",value:function(e){this.setState({value:e})}}],[{key:"propTypes",value:{className:u["default"].PropTypes.string,editable:u["default"].PropTypes.bool,max:u["default"].PropTypes.number,min:u["default"].PropTypes.number,onChange:u["default"].PropTypes.func,pinned:u["default"].PropTypes.bool,snaps:u["default"].PropTypes.bool,step:u["default"].PropTypes.number,value:u["default"].PropTypes.number},enumerable:!0},{key:"defaultProps",value:{className:"",editable:!1,max:100,min:0,pinned:!1,snaps:!1,step:.01,value:0},enumerable:!0}]),t}(u["default"].Component);t["default"]=_,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(i=a[o],!l(e[i],t[i]))return!1;return!0}function p(e,t){return e&&t?"[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t?!0:t.call({},e)===!0?!0:!1:!1}function f(e,t,n,r){var i;d.isString(n)&&(r=n,n=null);try{t()}catch(o){i=o}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&a(i,n,"Missing expected exception"+r),!e&&p(i,n)&&a(i,n,"Got unwanted exception"+r),e&&i&&n&&!p(i,n)||!e&&i)throw i}var d=e(13),h=Array.prototype.slice,m=Object.prototype.hasOwnProperty,y=t.exports=s;y.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},d.inherits(y.AssertionError,Error),y.fail=a,y.ok=s,y.equal=function(e,t,n){e!=t&&a(e,t,n,"==",y.equal)},y.notEqual=function(e,t,n){e==t&&a(e,t,n,"!=",y.notEqual)},y.deepEqual=function(e,t,n){l(e,t)||a(e,t,n,"deepEqual",y.deepEqual)},y.notDeepEqual=function(e,t,n){l(e,t)&&a(e,t,n,"notDeepEqual",y.notDeepEqual)},y.strictEqual=function(e,t,n){e!==t&&a(e,t,n,"===",y.strictEqual)},y.notStrictEqual=function(e,t,n){e===t&&a(e,t,n,"!==",y.notStrictEqual)},y["throws"]=function(e,t,n){f.apply(this,[!0].concat(h.call(arguments)))},y.doesNotThrow=function(e,t){f.apply(this,[!1].concat(h.call(arguments)))},y.ifError=function(e){if(e)throw e};var g=Object.keys||function(e){var t=[];for(var n in e)m.call(e,n)&&t.push(n);return t}},{13:13}],3:[function(e,n,r){(function(t){function n(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(n){return!1}}function i(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e){return this instanceof o?(this.length=0,this.parent=void 0,"number"==typeof e?a(this,e):"string"==typeof e?s(this,e,arguments.length>1?arguments[1]:"utf8"):l(this,e)):arguments.length>1?new o(e,arguments[1]):new o(e)}function a(e,t){if(e=m(e,0>t?0:0|y(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function s(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|v(t,n);return e=m(e,r),e.write(t,n),e}function l(e,t){if(o.isBuffer(t))return u(e,t);if(J(t))return c(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return p(e,t);if(t instanceof ArrayBuffer)return f(e,t)}return t.length?d(e,t):h(e,t)}function u(e,t){var n=0|y(t.length);return e=m(e,n),t.copy(e,0,0,n),e}function c(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function f(e,t){return o.TYPED_ARRAY_SUPPORT?(t.byteLength,e=o._augment(new Uint8Array(t))):e=p(e,new Uint8Array(t)),e}function d(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(e,t){var n,r=0;"Buffer"===t.type&&J(t.data)&&(n=t.data,r=0|y(n.length)),e=m(e,r);for(var i=0;r>i;i+=1)e[i]=255&n[i];return e}function m(e,t){o.TYPED_ARRAY_SUPPORT?(e=o._augment(new Uint8Array(t)),e.__proto__=o.prototype):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=o.poolSize>>>1;return n&&(e.parent=$),e}function y(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e,t){if(!(this instanceof g))return new g(e,t);var n=new o(e,t);return delete n.parent,n}function v(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function b(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return P(this,t,n);case"binary":return T(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+a]=s}return a}function x(e,t,n,r){return Y(q(t,e.length-n),e,n,r)}function E(e,t,n,r){return Y(H(t),e,n,r)}function w(e,t,n,r){return E(e,t,n,r)}function C(e,t,n,r){return Y(G(t),e,n,r)}function S(e,t,n,r){return Y(z(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(n>=i+s){var l,u,c,p;switch(s){case 1:128>o&&(a=o);break;case 2:l=e[i+1],128===(192&l)&&(p=(31&o)<<6|63&l,p>127&&(a=p));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(p=(15&o)<<12|(63&l)<<6|63&u,p>2047&&(55296>p||p>57343)&&(a=p));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&1114112>p&&(a=p))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function I(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;o++)i+=W(e[o]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",o=0;oe)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range")}function N(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);o>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);o>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(t>i||o>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function B(e,t,n,r,i){return i||j(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,i){return i||j(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,n,r,52,8),n+8}function U(e){if(e=V(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function V(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return 16>e?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;r>a;a++){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(e){return K.toByteArray(U(e))}function Y(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}/*! +var K=n(350),X=n(351),J=n(352);t.Buffer=e,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,e.poolSize=8192;var $={};e.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),e.TYPED_ARRAY_SUPPORT&&(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array),e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,n){if(!e.isBuffer(t)||!e.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var r=t.length,i=n.length,a=0,o=Math.min(r,i);o>a&&t[a]===n[a];)++a;return a!==o&&(r=t[a],i=n[a]),i>r?-1:r>i?1:0},e.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,n){if(!J(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new e(0);var r;if(void 0===n)for(n=0,r=0;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},e.prototype.compare=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:e.compare(this,t)},e.prototype.indexOf=function(t,n){function r(e,t,n){for(var r=-1,i=0;n+i2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,n);if(e.isBuffer(t))return r(this,t,n);if("number"==typeof t)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,n):r(this,[t],n);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},e.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},e.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=t,t=0|n,n=i}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return E(this,e,t,n);case"binary":return w(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;e.prototype.slice=function(t,n){var r=this.length;t=~~t,n=void 0===n?r:~~n,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),t>n&&(n=t);var i;if(e.TYPED_ARRAY_SUPPORT)i=e._augment(this.subarray(t,n));else{var a=n-t;i=new e(a,void 0);for(var o=0;a>o;o++)i[o]=this[o+t]}return i.length&&(i.parent=this.parent||this),i},e.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a0&&(i*=256);)r+=this[e+--t]*i;return r},e.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},e.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},e.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},e.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},e.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),X.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),X.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),X.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),X.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||j(this,e,t,n,Math.pow(2,8*n),0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},e.prototype.writeUInt8=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},e.prototype.writeUInt16LE=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):F(this,t,n,!0),n+2},e.prototype.writeUInt16BE=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):F(this,t,n,!1),n+2},e.prototype.writeUInt32LE=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):N(this,t,n,!0),n+4},e.prototype.writeUInt32BE=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):N(this,t,n,!1),n+4},e.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var a=0,o=1,s=0>e?1:0;for(this[t]=255&e;++a>0)-s&255;return t+n},e.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0>e?1:0;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=(e/o>>0)-s&255;return t+n},e.prototype.writeInt8=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[n]=255&t,n+1},e.prototype.writeInt16LE=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):F(this,t,n,!0),n+2},e.prototype.writeInt16BE=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):F(this,t,n,!1),n+2},e.prototype.writeInt32LE=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):N(this,t,n,!0),n+4},e.prototype.writeInt32BE=function(t,n,r){return t=+t,n=0|n,r||j(this,t,n,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):N(this,t,n,!1),n+4},e.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},e.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},e.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},e.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},e.prototype.copy=function(t,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=t.length&&(n=t.length),n||(n=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-nr&&i>n)for(a=o-1;a>=0;a--)t[a+n]=this[a+r];else if(1e3>o||!e.TYPED_ARRAY_SUPPORT)for(a=0;o>a;a++)t[a+n]=this[a+r];else t._set(this.subarray(r,r+o),n);return o},e.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var i=q(e.toString()),a=i.length;for(r=t;n>r;r++)this[r]=i[r%a]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var t=new Uint8Array(this.length),n=0,r=t.length;r>n;n+=1)t[n]=this[n];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=e.prototype;e._augment=function(t){return t.constructor=e,t._isBuffer=!0,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.equals=Z.equals,t.compare=Z.compare,t.indexOf=Z.indexOf,t.copy=Z.copy,t.slice=Z.slice,t.readUIntLE=Z.readUIntLE,t.readUIntBE=Z.readUIntBE,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readIntLE=Z.readIntLE,t.readIntBE=Z.readIntBE,t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUIntLE=Z.writeUIntLE,t.writeUIntBE=Z.writeUIntBE,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeIntLE=Z.writeIntLE,t.writeIntBE=Z.writeIntBE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,n(142).Buffer,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tr&&(r=n.length-1),r>=n.length&&(r=0),e.setState({active:n[r]})}},this.handleFocus=function(){var t=event.target.getBoundingClientRect(),n=window.innerHeight||document.documentElement.offsetHeight;e.refs.suggestions.scrollTop=0,e.setState({active:"",up:t.top>n/2+t.height,focus:!0})},this.handleBlur=function(){e.state.focus&&e.setState({focus:!1})},this.handleHover=function(t){e.setState({active:t.target.getAttribute("id")})},this.handleSelect=function(t){_["default"].events.pauseEvent(t),e._selectOption(t.target.getAttribute("id"))},this.handleUnselect=function(t){e._unselectOption(t.target.getAttribute("id"))}}return o(t,e),u(t,[{key:"componentDidMount",value:function(){this.props.value&&this.setValue(this.props.value),this.setState({width:h["default"].findDOMNode(this).getBoundingClientRect().width})}},{key:"componentWillReceiveProps",value:function(e){e.dataSource&&this.setState({dataSource:this._indexDataSource(e.dataSource)})}},{key:"componentWillUpdate",value:function(e,t){this.refs.input.setValue(t.query)}},{key:"renderLabel",value:function(){return this.props.label?f["default"].createElement("label",{"data-role":"label",className:v["default"].label},this.props.label):void 0}},{key:"renderSelected",value:function(){return this.props.multiple?f["default"].createElement("ul",{className:v["default"].values,"data-role":"selections",onClick:this.handleUnselect},[].concat(i(this.state.values)).map(function(e){var t=l(e,2),n=t[0],r=t[1];return f["default"].createElement("li",{key:n,id:n,"data-role":"selection",className:v["default"].value},r)})):void 0}},{key:"renderSuggestions",value:function(){var e=this;return[].concat(i(this._getSuggestions())).map(function(t){var n=l(t,2),r=n[0],i=n[1],a=v["default"].suggestion;return e.state.active===r&&(a+=" "+v["default"].active),f["default"].createElement("li",{id:r,key:r,"data-role":"suggestion",className:a},i)})}},{key:"render",value:function(){var e=v["default"].root;this.props.className&&(e+=" "+this.props.className),this.state.focus&&(e+=" "+v["default"].focus);var t=v["default"].suggestions;this.state.up&&(t+=" "+v["default"].up);var n={width:this.state.width};return f["default"].createElement("div",{"data-react-toolbox":"autocomplete",className:e},this.renderLabel(),this.renderSelected(),f["default"].createElement(y["default"],s({ref:"input"},this.props,{label:"",value:"","data-role":"input",className:v["default"].input,onBlur:this.handleBlur,onChange:this.handleQueryChange,onFocus:this.handleFocus,onKeyUp:this.handleKeyPress})),f["default"].createElement("ul",{ref:"suggestions","data-role":"suggestions",className:t,onMouseDown:this.handleSelect,onMouseOver:this.handleHover,style:n},this.renderSuggestions()))}},{key:"_indexDataSource",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return e.length?new Map(e.map(function(e){return[e,e]})):new Map(Object.keys(e).map(function(t){return[t,e[t]]}))}},{key:"_getSuggestions",value:function(){var e=this.state.query.toLowerCase().trim()||"",t=new Map,n=!0,r=!1,i=void 0;try{for(var a,o=this.state.dataSource[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=l(a.value,2),u=s[0],c=s[1];!this.state.values.has(u)&&c.toLowerCase().trim().startsWith(e)&&t.set(u,c)}}catch(p){r=!0,i=p}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw i}}return t}},{key:"_selectOption",value:function(e){var t=this,n=this.state.dataSource,r=this.state.values,i=this.props.multiple?"":n.get(e);r=new Map(r),this.props.multiple||r.clear(),r.set(e,n.get(e)),this.setState({focus:!1,query:i,values:r},function(){t.refs.input.blur(),t.props.onChange&&t.props.onChange(t)})}},{key:"_unselectOption",value:function(e){var t=this;if(e){var n=new Map(this.state.values);n["delete"](e),this.setState({focus:!1,values:n},function(){t.props.onChange&&t.props.onChange(t)})}}},{key:"getValue",value:function(){var e=[].concat(i(this.state.values.keys()));return this.props.multiple?e:e.length>0?e[0]:null}},{key:"setValue",value:function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=new Map,n="string"==typeof e?[e]:e,r=!0,i=!1,a=void 0;try{for(var o,s=this.state.dataSource[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=l(o.value,2),c=u[0],p=u[1];-1!==n.indexOf(c)&&t.set(c,p)}}catch(f){i=!0,a=f}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw a}}this.setState({values:t,query:this.props.multiple?"":t.get(n[0])})}}],[{key:"propTypes",value:{className:f["default"].PropTypes.string,dataSource:f["default"].PropTypes.any,disabled:f["default"].PropTypes.bool,error:f["default"].PropTypes.string,label:f["default"].PropTypes.string,multiple:f["default"].PropTypes.bool,onChange:f["default"].PropTypes.func,required:f["default"].PropTypes.bool,value:f["default"].PropTypes.any},enumerable:!0},{key:"defaultProps",value:{className:"",dataSource:{},multiple:!0},enumerable:!0}]),t}(f["default"].Component);t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nr/2+n.height:!1;e.setState({active:!0,up:i})},this.handleClickValue=function(t){if(!e.props.disabled){var n=t.toString(),r=!0,i=!1,a=void 0;try{for(var o,s=e.props.dataSource[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=o.value;if(l.value.toString()===n){e.setState({active:!1,selected:l});break}}}catch(u){i=!0,a=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw a}}}}}return a(t,e),o(t,[{key:"componentDidMount",value:function(){this.setState({width:p["default"].findDOMNode(this).getBoundingClientRect().width})}},{key:"componentDidUpdate",value:function(e,t){this.props.onChange&&t.selected!==this.state.selected&&t.active&&this.props.onChange(this)}},{key:"renderValues",value:function(){var e=this,t=this.props.dataSource.map(function(t,n){var r=void 0;return t.value===e.state.selected.value&&(r=" "+m["default"].selected),u["default"].createElement("li",{key:n,className:r,id:t.value,onClick:e.handleClickValue.bind(e,t.value)},e.props.template?e.props.template(t):t.label,u["default"].createElement(d["default"],{className:m["default"].ripple}))}),n=m["default"].values,r={width:this.state.width};return this.state.up&&(n+=" "+m["default"].up),u["default"].createElement("ul",{ref:"values",className:n,style:r},t)}},{key:"render",value:function(){var e=m["default"].root;return this.props.className&&(e+=" "+this.props.className),this.props.disabled&&(e+=" "+m["default"].disabled),this.state.active&&(e+=" "+m["default"].active),u["default"].createElement("div",{"data-react-toolbox":"dropdown",className:e},this.props.label?u["default"].createElement("label",{className:m["default"].label},this.props.label):null,this.renderValues(),u["default"].createElement("div",{ref:"value",className:m["default"].value,onClick:this.handleClick},this.props.template?this.props.template(this.state.selected):u["default"].createElement("span",null,this.state.selected.label)))}},{key:"getValue",value:function(){return this.state.selected.value}},{key:"setValue",value:function(e){this.setState({selected:e})}}],[{key:"propTypes",value:{auto:u["default"].PropTypes.bool,className:u["default"].PropTypes.string,dataSource:u["default"].PropTypes.array.isRequired,disabled:u["default"].PropTypes.bool,label:u["default"].PropTypes.string,onChange:u["default"].PropTypes.func,template:u["default"].PropTypes.func,value:u["default"].PropTypes.string},enumerable:!0},{key:"defaultProps",value:{auto:!0,className:"",disabled:!1},enumerable:!0}]),t}(u["default"].Component);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;tt,u=s/2-i/2>n;return(l?"top":"bottom")+"-"+(u?"left":"right")}},{key:"getRootStyle",value:function(){return this.state.position!==v.STATIC?{width:this.state.width,height:this.state.height}:void 0}},{key:"getMenuStyle",value:function(){var e=this.state,t=e.width,n=e.height,r=e.position;if(r!==v.STATIC){if(this.state.active)return{clip:"rect(0 "+t+"px "+n+"px 0)"};if(r===v.TOP_RIGHT)return{clip:"rect(0 "+t+"px 0 "+t+"px)"};if(r===v.BOTTOM_RIGHT)return{clip:"rect("+n+"px "+t+"px "+n+"px "+t+"px)"};if(r===v.BOTTOM_LEFT)return{clip:"rect("+n+"px 0 "+n+"px 0)"};if(r===v.TOP_LEFT)return{clip:"rect(0 0 0 0)"}}}},{key:"renderItems",value:function(){var e=this;return u["default"].Children.map(this.props.children,function(t){return t.type===d["default"]?u["default"].cloneElement(t,{ripple:t.props.ripple||e.props.ripple,selected:t.props.value&&e.props.selectable&&t.props.value===e.state.value,onClick:e.handleSelect.bind(e,t)}):u["default"].cloneElement(t)})}},{key:"render",value:function(){var e={width:this.state.width,height:this.state.height},t=g["default"].root+" "+g["default"][this.state.position];return this.state.active&&(t+=" "+g["default"].active),this.state.rippled&&(t+=" "+g["default"].rippled),this.props.className&&(t+=" "+this.props.className),u["default"].createElement("div",{className:t,style:this.getRootStyle()},this.props.outline?u["default"].createElement("div",{className:g["default"].outline,style:e}):null,u["default"].createElement("ul",{ref:"menu",className:g["default"].menu,style:this.getMenuStyle()},this.renderItems()))}},{key:"getValue",value:function(){return this.state.value}},{key:"setValue",value:function(e){this.setState({value:e})}},{key:"show",value:function(){this.setState({active:!0})}},{key:"hide",value:function(){this.setState({active:!1})}}],[{key:"propTypes",value:{active:u["default"].PropTypes.bool,className:u["default"].PropTypes.string,onHide:u["default"].PropTypes.func,onSelect:u["default"].PropTypes.func,onShow:u["default"].PropTypes.func,outline:u["default"].PropTypes.bool,position:u["default"].PropTypes.string,ripple:u["default"].PropTypes.bool,selectable:u["default"].PropTypes.bool,value:u["default"].PropTypes.any},enumerable:!0},{key:"defaultProps",value:{active:!1,outline:!0,position:v.STATIC,ripple:!0,selectable:!0},enumerable:!0}]),t}(u["default"].Component);t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;nthis.props.max?1:(e-this.props.min)/(this.props.max-this.props.min)}},{key:"circularStyle",value:function(){return"indeterminate"!==this.props.mode?{strokeDasharray:2*Math.PI*25*this.calculateRatio(this.props.value)+", 400"}:void 0}},{key:"renderCircular",value:function(){return u["default"].createElement("svg",{className:p["default"].circle},u["default"].createElement("circle",{className:p["default"].path,style:this.circularStyle(),cx:"30",cy:"30",r:"25"}))}},{key:"linearStyle",value:function(){return"indeterminate"!==this.props.mode?{buffer:d["default"]({transform:"scaleX("+this.calculateRatio(this.props.buffer)+")"}),value:d["default"]({transform:"scaleX("+this.calculateRatio(this.props.value)+")"})}:{}}},{key:"renderLinear",value:function(){var e=this.linearStyle(),t=e.buffer,n=e.value;return u["default"].createElement("div",null,u["default"].createElement("span",{ref:"buffer","data-ref":"buffer",className:p["default"].buffer,style:t}),u["default"].createElement("span",{ref:"value","data-ref":"value",className:p["default"].value,style:n}))}},{key:"render",value:function(){var e="linear"===this.props.type?p["default"].linear:p["default"].circular;return this.props.mode&&(e+=" "+p["default"][this.props.mode]),this.props.multicolor&&(e+=" "+p["default"].multicolor),this.props.className&&(e+=" "+this.props.className),u["default"].createElement("div",{"data-react-toolbox":"progress-bar",className:e,"aria-valuenow":this.props.value,"aria-valuemin":this.props.min,"aria-valuemax":this.props.max},"circular"===this.props.type?this.renderCircular():this.renderLinear())}}],[{key:"propTypes",value:{buffer:u["default"].PropTypes.number,className:u["default"].PropTypes.string,max:u["default"].PropTypes.number,min:u["default"].PropTypes.number,mode:u["default"].PropTypes.string,multicolor:u["default"].PropTypes.bool,type:u["default"].PropTypes.string,value:u["default"].PropTypes.number},enumerable:!0},{key:"defaultProps",value:{buffer:0,className:"",max:100,min:0,mode:"indeterminate",multicolor:!1,type:"linear",value:0},enumerable:!0}]),t}(u["default"].Component);t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;tthis.props.max?this.props.max:m["default"].round(e,this.stepDecimals())}},{key:"stepDecimals",value:function(){return(this.props.step.toString().split(".")[1]||[]).length}},{key:"addToValue",value:function(e){this.setState({value:this.trimValue(this.state.value+e)})}},{key:"valueForInput",value:function(e){var t=this.stepDecimals();return t>0?e.toFixed(t):e.toString()}},{key:"knobOffset",value:function(){var e=this.props,t=e.max,n=e.min;return this.state.sliderLength*(this.state.value-n)/(t-n)}},{key:"renderSnaps",value:function(){return this.props.snaps?u["default"].createElement("div",{ref:"snaps",className:d["default"].snaps},m["default"].range(0,(this.props.max-this.props.min)/this.props.step).map(function(e){return u["default"].createElement("div",{key:"span-"+e,className:d["default"].snap})})):void 0}},{key:"renderInput",value:function(){return this.props.editable?u["default"].createElement(b["default"],{ref:"input",className:d["default"].input,onChange:this.handleInputChange,value:this.valueForInput(this.state.value)}):void 0}},{key:"render",value:function(){var e=m["default"].prefixer({transform:"translateX("+this.knobOffset()+"px)"}),t=this.props.className;return this.props.editable&&(t+=" "+d["default"].editable),this.props.pinned&&(t+=" "+d["default"].pinned),this.state.pressed&&(t+=" "+d["default"].pressed),this.state.value===this.props.min&&(t+=" "+d["default"].ring),u["default"].createElement("div",{"data-react-toolbox":"slider",className:d["default"].root+t,tabIndex:"0",onFocus:this.handleSliderFocus,onBlur:this.handleSliderBlur},u["default"].createElement("div",{ref:"slider",className:d["default"].container,onTouchStart:this.handleTouchStart,onMouseDown:this.handleMouseDown},u["default"].createElement("div",{ref:"knob",className:d["default"].knob,style:e,onMouseDown:this.handleMouseDown,onTouchStart:this.handleTouchStart},u["default"].createElement("div",{className:d["default"].innerknob,"data-value":parseInt(this.state.value)})),u["default"].createElement("div",{className:d["default"].progress},u["default"].createElement(g["default"],{ref:"progressbar",mode:"determinate",className:d["default"].innerprogress,value:this.state.value,max:this.props.max,min:this.props.min}),this.renderSnaps())),this.renderInput())}},{key:"getValue",value:function(){return this.state.value}},{key:"setValue",value:function(e){this.setState({value:e})}}],[{key:"propTypes",value:{className:u["default"].PropTypes.string,editable:u["default"].PropTypes.bool,max:u["default"].PropTypes.number,min:u["default"].PropTypes.number,onChange:u["default"].PropTypes.func,pinned:u["default"].PropTypes.bool,snaps:u["default"].PropTypes.bool,step:u["default"].PropTypes.number,value:u["default"].PropTypes.number},enumerable:!0},{key:"defaultProps",value:{className:"",editable:!1,max:100,min:0,pinned:!1,snaps:!1,step:.01,value:0},enumerable:!0}]),t}(u["default"].Component);t["default"]=_,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0;a--)if(o[a]!=s[a])return!1;for(a=o.length-1;a>=0;a--)if(i=o[a],!l(e[i],t[i]))return!1;return!0}function p(e,t){return e&&t?"[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t?!0:t.call({},e)===!0?!0:!1:!1}function f(e,t,n,r){var i;d.isString(n)&&(r=n,n=null);try{t()}catch(a){i=a}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&o(i,n,"Missing expected exception"+r),!e&&p(i,n)&&o(i,n,"Got unwanted exception"+r),e&&i&&n&&!p(i,n)||!e&&i)throw i}var d=e(13),h=Array.prototype.slice,m=Object.prototype.hasOwnProperty,y=t.exports=s;y.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=a(this),this.generatedMessage=!0);var t=e.stackStartFunction||o;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,s=r.indexOf("\n"+i);if(s>=0){var l=r.indexOf("\n",s+1);r=r.substring(l+1)}this.stack=r}}},d.inherits(y.AssertionError,Error),y.fail=o,y.ok=s,y.equal=function(e,t,n){e!=t&&o(e,t,n,"==",y.equal)},y.notEqual=function(e,t,n){e==t&&o(e,t,n,"!=",y.notEqual)},y.deepEqual=function(e,t,n){l(e,t)||o(e,t,n,"deepEqual",y.deepEqual)},y.notDeepEqual=function(e,t,n){l(e,t)&&o(e,t,n,"notDeepEqual",y.notDeepEqual)},y.strictEqual=function(e,t,n){e!==t&&o(e,t,n,"===",y.strictEqual)},y.notStrictEqual=function(e,t,n){e===t&&o(e,t,n,"!==",y.notStrictEqual)},y["throws"]=function(e,t,n){f.apply(this,[!0].concat(h.call(arguments)))},y.doesNotThrow=function(e,t){f.apply(this,[!1].concat(h.call(arguments)))},y.ifError=function(e){if(e)throw e};var g=Object.keys||function(e){var t=[];for(var n in e)m.call(e,n)&&t.push(n);return t}},{13:13}],3:[function(e,n,r){(function(t){function n(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(n){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e){return this instanceof a?(this.length=0,this.parent=void 0,"number"==typeof e?o(this,e):"string"==typeof e?s(this,e,arguments.length>1?arguments[1]:"utf8"):l(this,e)):arguments.length>1?new a(e,arguments[1]):new a(e)}function o(e,t){if(e=m(e,0>t?0:0|y(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function s(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|v(t,n);return e=m(e,r),e.write(t,n),e}function l(e,t){if(a.isBuffer(t))return u(e,t);if(J(t))return c(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return p(e,t);if(t instanceof ArrayBuffer)return f(e,t)}return t.length?d(e,t):h(e,t)}function u(e,t){var n=0|y(t.length);return e=m(e,n),t.copy(e,0,0,n),e}function c(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function f(e,t){return a.TYPED_ARRAY_SUPPORT?(t.byteLength,e=a._augment(new Uint8Array(t))):e=p(e,new Uint8Array(t)),e}function d(e,t){var n=0|y(t.length);e=m(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function h(e,t){var n,r=0;"Buffer"===t.type&&J(t.data)&&(n=t.data,r=0|y(n.length)),e=m(e,r);for(var i=0;r>i;i+=1)e[i]=255&n[i];return e}function m(e,t){a.TYPED_ARRAY_SUPPORT?(e=a._augment(new Uint8Array(t)),e.__proto__=a.prototype):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=a.poolSize>>>1;return n&&(e.parent=$),e}function y(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e,t){if(!(this instanceof g))return new g(e,t);var n=new a(e,t);return delete n.parent,n}function v(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function b(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return D(this,t,n);case"ascii":return T(this,t,n);case"binary":return P(this,t,n);case"base64":return k(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;r>o;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+o]=s}return o}function x(e,t,n,r){return Y(q(t,e.length-n),e,n,r)}function E(e,t,n,r){return Y(H(t),e,n,r)}function w(e,t,n,r){return E(e,t,n,r)}function C(e,t,n,r){return Y(G(t),e,n,r)}function S(e,t,n,r){return Y(z(t,e.length-n),e,n,r)}function k(e,t,n){return 0===t&&n===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,n))}function D(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n>=i+s){var l,u,c,p;switch(s){case 1:128>a&&(o=a);break;case 2:l=e[i+1],128===(192&l)&&(p=(31&a)<<6|63&l,p>127&&(o=p));break;case 3:l=e[i+1],u=e[i+2],128===(192&l)&&128===(192&u)&&(p=(15&a)<<12|(63&l)<<6|63&u,p>2047&&(55296>p||p>57343)&&(o=p));break;case 4:l=e[i+1],u=e[i+2],c=e[i+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&1114112>p&&(o=p))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return A(r)}function A(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function I(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",a=t;n>a;a++)i+=W(e[a]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",a=0;ae)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||o>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range")}function F(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);a>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);a>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function L(e,t,n,r,i,a){if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function B(e,t,n,r,i){return i||L(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,i){return i||L(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,n,r,52,8),n+8}function U(e){if(e=V(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function V(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return 16>e?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;r>o;o++){if(n=e.charCodeAt(o),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;a.push(n)}else if(2048>n){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function H(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function G(e){return K.toByteArray(U(e))}function Y(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var K=e(4),X=e(5),J=e(6);r.Buffer=o,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,o.poolSize=8192;var $={};o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array),o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);a>i&&e[i]===t[i];)++i;return i!==a&&(n=e[i],r=t[i]),r>n?-1:n>r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!J(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new o(0);var n;if(void 0===t)for(t=0,n=0;n0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},o.prototype.compare=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:o.compare(this,e)},o.prototype.indexOf=function(e,t){function n(e,t,n){for(var r=-1,i=0;n+i2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(o.isBuffer(e))return n(this,e,t);if("number"==typeof e)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},o.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},o.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=t,t=0|n,n=i}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return E(this,e,t,n);case"binary":return w(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(o.TYPED_ARRAY_SUPPORT)r=o._augment(this.subarray(e,t));else{var i=t-e;r=new o(i,void 0);for(var a=0;i>a;a++)r[a]=this[a+e]}return r.length&&(r.parent=this.parent||this),r},o.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||M(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),X.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),X.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),X.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),X.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||F(this,e,t,n,Math.pow(2,8*n),0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=0,a=1,s=0>e?1:0;for(this[t]=255&e;++o>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0>e?1:0;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||F(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-tn&&r>t)for(i=a-1;i>=0;i--)e[i+t]=this[i+n];else if(1e3>a||!o.TYPED_ARRAY_SUPPORT)for(i=0;a>i;i++)e[i+t]=this[i+n];else e._set(this.subarray(n,n+a),t);return a},o.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var i=q(e.toString()),o=i.length;for(r=t;n>r;r++)this[r]=i[r%o]}return this}},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o.TYPED_ARRAY_SUPPORT)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=o.prototype;o._augment=function(e){return e.constructor=o,e._isBuffer=!0,e._set=e.set,e.get=Z.get,e.set=Z.set,e.write=Z.write,e.toString=Z.toString,e.toLocaleString=Z.toString,e.toJSON=Z.toJSON,e.equals=Z.equals,e.compare=Z.compare,e.indexOf=Z.indexOf,e.copy=Z.copy,e.slice=Z.slice,e.readUIntLE=Z.readUIntLE,e.readUIntBE=Z.readUIntBE,e.readUInt8=Z.readUInt8,e.readUInt16LE=Z.readUInt16LE,e.readUInt16BE=Z.readUInt16BE,e.readUInt32LE=Z.readUInt32LE,e.readUInt32BE=Z.readUInt32BE,e.readIntLE=Z.readIntLE,e.readIntBE=Z.readIntBE,e.readInt8=Z.readInt8,e.readInt16LE=Z.readInt16LE,e.readInt16BE=Z.readInt16BE,e.readInt32LE=Z.readInt32LE,e.readInt32BE=Z.readInt32BE,e.readFloatLE=Z.readFloatLE,e.readFloatBE=Z.readFloatBE,e.readDoubleLE=Z.readDoubleLE,e.readDoubleBE=Z.readDoubleBE,e.writeUInt8=Z.writeUInt8,e.writeUIntLE=Z.writeUIntLE,e.writeUIntBE=Z.writeUIntBE,e.writeUInt16LE=Z.writeUInt16LE,e.writeUInt16BE=Z.writeUInt16BE,e.writeUInt32LE=Z.writeUInt32LE,e.writeUInt32BE=Z.writeUInt32BE,e.writeIntLE=Z.writeIntLE,e.writeIntBE=Z.writeIntBE,e.writeInt8=Z.writeInt8,e.writeInt16LE=Z.writeInt16LE,e.writeInt16BE=Z.writeInt16BE,e.writeInt32LE=Z.writeInt32LE,e.writeInt32BE=Z.writeInt32BE,e.writeFloatLE=Z.writeFloatLE,e.writeFloatBE=Z.writeFloatBE,e.writeDoubleLE=Z.writeDoubleLE,e.writeDoubleBE=Z.writeDoubleBE,e.fill=Z.fill,e.inspect=Z.inspect,e.toArrayBuffer=Z.toArrayBuffer,e};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{4:4,5:5,6:6}],4:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===a||t===p?62:t===s||t===f?63:l>t?-1:l+10>t?t-l+26+26:c+26>t?t-c:u+26>t?t-u+26:void 0}function n(e){function n(e){u[p++]=e}var r,i,a,s,l,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;l="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,u=new o(3*e.length/4-l),a=l>0?e.length-4:e.length;var p=0;for(r=0,i=0;a>r;r+=4,i+=3)s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===l?(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&s)):1===l&&(s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function i(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,a,s=e.length%3,l="";for(i=0,a=e.length-s;a>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],l+=n(o);switch(s){case 1:o=e[e.length-1],l+=t(o>>2),l+=t(o<<4&63),l+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],l+=t(o>>10),l+=t(o>>4&63),l+=t(o<<2&63),l+="="}return l}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),l="0".charCodeAt(0),u="a".charCodeAt(0),c="A".charCodeAt(0),p="-".charCodeAt(0),f="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],5:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,p=n?i-1:0,f=n?-1:1,d=e[t+p];for(p+=f,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+p],p+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+p],p+=f,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,h=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+p>=1?f/l:f*Math.pow(2,1-p),t*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(t*l-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=h,s/=256,i-=8);for(a=a<0;e[n+d]=255&a,d+=h,a/=256,u-=8);e[n+d-h]|=128*m}},{}],6:[function(e,t,n){var r=Array.isArray,i=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==i.call(e)}},{}],7:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],8:[function(e,t,n){n.endianness=function(){return"LE"},n.hostname=function(){return"undefined"!=typeof location?location.hostname:""},n.loadavg=function(){return[]},n.uptime=function(){return 0},n.freemem=function(){return Number.MAX_VALUE},n.totalmem=function(){return Number.MAX_VALUE},n.cpus=function(){return[]},n.type=function(){return"Browser"},n.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},n.networkInterfaces=n.getNetworkInterfaces=function(){return{}},n.arch=function(){return"javascript"},n.platform=function(){return"browser"},n.tmpdir=n.tmpDir=function(){return"/tmp"},n.EOL="\n"},{}],9:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),o="/"===a(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),a=Math.min(i.length,o.length),s=a,l=0;a>l;l++)if(i[l]!==o[l]){s=l;break}for(var u=[],l=s;lt&&(t=e.length+t),e.substr(t,n)}}).call(this,e(10))},{10:10}],10:[function(e,t,n){function r(){c=!1,s.length?u=s.concat(u):p=-1,u.length&&i()}function i(){if(!c){var e=setTimeout(r);c=!0;for(var t=u.length;t;){for(s=u,u=[];++p1)for(var n=1;n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),l(n,e,n.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function l(e,t,n){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return b(i)||(i=l(e,i,n)),i}var o=u(e,t);if(o)return o;var a=Object.keys(t),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),S(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(t);if(0===a.length){if(k(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(C(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return c(t)}var g="",v=!1,_=["{","}"];if(h(t)&&(v=!0,_=["[","]"]),k(t)){var x=t.name?": "+t.name:"";g=" [Function"+x+"]"}if(E(t)&&(g=" "+RegExp.prototype.toString.call(t)),C(t)&&(g=" "+Date.prototype.toUTCString.call(t)),S(t)&&(g=" "+c(t)),0===a.length&&(!v||0==t.length))return _[0]+g+_[1];if(0>n)return E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var w;return w=v?p(e,t,n,m,a):a.map(function(r){return f(e,t,n,m,r,v)}),e.seen.pop(),d(w,g,_)}function u(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return v(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;s>a;++a)I(t,String(a))?o.push(f(e,t,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(e,t,n,r,i,!0))}),o}function f(e,t,n,r,i,o){var a,s,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),I(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=y(n)?l(e,u.value,null):l(e,u.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return null==e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function _(e){return"symbol"==typeof e}function x(e){return void 0===e}function E(e){return w(e)&&"[object RegExp]"===A(e)}function w(e){return"object"==typeof e&&null!==e}function C(e){return w(e)&&"[object Date]"===A(e)}function S(e){return w(e)&&("[object Error]"===A(e)||e instanceof Error)}function k(e){return"function"==typeof e}function D(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function A(e){return Object.prototype.toString.call(e)}function P(e){return 10>e?"0"+e.toString(10):e.toString(10)}function T(){var e=new Date,t=[P(e.getHours()),P(e.getMinutes()),P(e.getSeconds())].join(":");return[e.getDate(),N[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O=/%[sdj%]/g;r.format=function(e){if(!b(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),s=r[n];o>n;s=r[++n])a+=y(s)||!w(s)?" "+s:" "+i(s);return a},r.deprecate=function(e,i){function o(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}if(x(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var a=!1;return o};var M,F={};r.debuglog=function(e){if(x(M)&&(M=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!F[e])if(new RegExp("\\b"+e+"\\b","i").test(M)){var n=t.pid;F[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else F[e]=function(){};return F[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=m,r.isNull=y,r.isNullOrUndefined=g,r.isNumber=v,r.isString=b,r.isSymbol=_,r.isUndefined=x,r.isRegExp=E,r.isObject=w,r.isDate=C,r.isError=S,r.isFunction=k,r.isPrimitive=D,r.isBuffer=e(12);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=e(7),r._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e(10),"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{10:10,12:12,7:7}],14:[function(e,n,r){(function(t){"use strict";e(15);var r=n.exports=e(66);r.options=e(49),r.version=e(603).version,r.transform=r,r.run=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.sourceMaps="inline",new Function(r(e,t).code)()},r.load=function(e,n,i,o){void 0===i&&(i={}),i.filename=i.filename||e;var a=t.ActiveXObject?new t.ActiveXObject("Microsoft.XMLHTTP"):new t.XMLHttpRequest;a.open("GET",e,!0),"overrideMimeType"in a&&a.overrideMimeType("text/plain"),a.onreadystatechange=function(){if(4===a.readyState){var t=a.status;if(0!==t&&200!==t)throw new Error("Could not load "+e);var s=[a.responseText,i];o||r.run.apply(r,s),n&&n(s)}},a.send(null)};var i=function(){for(var e=[],n=["text/ecmascript-6","text/6to5","text/babel","module"],i=0,o=function c(){var t=e[i];t instanceof Array&&(r.run.apply(r,t),i++,c())},a=function(t,n){var i={};t.src?r.load(t.src,function(t){e[n]=t,o()},i,!0):(i.filename="embedded",e[n]=[t.innerHTML,i])},s=t.document.getElementsByTagName("script"),l=0;l=0&&e.push(u)}for(l in e)a(e[l],l);o()};t.addEventListener?t.addEventListener("DOMContentLoaded",i,!1):t.attachEvent&&t.attachEvent("onload",i)}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{15:15,49:49,603:603,66:66}],15:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e["default"]:e}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(t){var n=e(17);return null!=t&&n(t),n}function s(){e(44)}function l(e,t,n){f["default"](t)&&(n=t,t={}),t.filename=e,_["default"].readFile(e,function(e,r){if(e)return n(e);var i;try{i=h["default"](r,t)}catch(e){return n(e)}n(null,i)})}function u(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.filename=e,h["default"](_["default"].readFileSync(e,"utf8"),t)}function c(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.allowHashBang=!0,t.sourceType="module",t.ecmaVersion=1/0,t.plugins={jsx:!0,flow:!0},t.features={};for(var n in h["default"].pipeline.transformers)t.features[n]=!0;var r=y.parse(e,t);if(t.onToken){var i;(i=t.onToken).push.apply(i,r.tokens)}if(t.onComment){var o;(o=t.onComment).push.apply(o,r.comments)}return r.program}n.__esModule=!0,n.register=a,n.polyfill=s,n.transformFile=l,n.transformFileSync=u,n.parse=c;var p=e(500),f=o(p),d=e(66),h=o(d),m=e(605),y=i(m),g=e(182),v=i(g),b=e(1),_=o(b),x=e(179),E=i(x);n.util=v,n.acorn=y,n.transform=h["default"],n.pipeline=d.pipeline,n.canCompile=g.canCompile;var w=e(46);n.File=r(w);var C=e(48);n.options=r(C);var S=e(82);n.Plugin=r(S);var k=e(83);n.Transformer=r(k);var D=e(80);n.Pipeline=r(D);var A=e(148);n.traverse=r(A);var P=e(45);n.buildExternalHelpers=r(P);var T=e(603);n.version=T.version,n.types=E},{1:1,148:148,17:17,179:179,182:182,44:44,45:45,46:46,48:48,500:500,603:603,605:605,66:66,80:80,82:82,83:83}],16:[function(e,t,n){"use strict";n.__esModule=!0,e(44),n["default"]=function(){},t.exports=n["default"]},{44:44}],17:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e["default"]:e}n.__esModule=!0,e(44);var i=e(16);n["default"]=r(i),t.exports=n["default"]},{16:16,44:44}],18:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=e(584),a=r(o),s=e(601),l=r(s),u=e(498),c=r(u),p=e(413),f=r(p),d=e(502),h=r(d),m=function(){function e(t,n){i(this,e),this.parenPushNewlineState=null,this.position=t,this._indent=n.indent.base,this.format=n,this.buf=""}return e.prototype.get=function(){return l["default"](this.buf)},e.prototype.getIndent=function(){return this.format.compact||this.format.concise?"":a["default"](this.format.indent.style,this._indent)},e.prototype.indentSize=function(){return this.getIndent().length},e.prototype.indent=function(){this._indent++},e.prototype.dedent=function(){this._indent--},e.prototype.semicolon=function(){this.push(";")},e.prototype.ensureSemicolon=function(){this.isLast(";")||this.semicolon()},e.prototype.rightBrace=function(){this.newline(!0),this.push("}")},e.prototype.keyword=function(e){this.push(e),this.space()},e.prototype.space=function(e){(e||!this.format.compact)&&(e||this.buf&&!this.isLast(" ")&&!this.isLast("\n"))&&this.push(" ")},e.prototype.removeLast=function(e){return this.format.compact?void 0:this._removeLast(e)},e.prototype._removeLast=function(e){this._isLast(e)&&(this.buf=this.buf.substr(0,this.buf.length-1),this.position.unshift(e))},e.prototype.startTerminatorless=function(){return this.parenPushNewlineState={printed:!1}},e.prototype.endTerminatorless=function(e){e.printed&&(this.dedent(),this.newline(),this.push(")"))},e.prototype.newline=function(e,t){if(!this.format.compact&&!this.format.retainLines){if(this.format.concise)return void this.space();if(t=t||!1,h["default"](e)){if(e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,0>=e)return;for(;e>0;)this._newline(t),e--}else c["default"](e)&&(t=e),this._newline(t)}},e.prototype._newline=function(e){this.endsWith("\n\n")||(e&&this.isLast("\n")&&this.removeLast("\n"),this.removeLast(" "),this._removeSpacesAfterLastNewline(),this._push("\n"))},e.prototype._removeSpacesAfterLastNewline=function(){var e=this.buf.lastIndexOf("\n");if(-1!==e){for(var t=this.buf.length-1;t>e&&" "===this.buf[t];)t--;t===e&&(this.buf=this.buf.substring(0,t+1))}},e.prototype.push=function(e,t){if(!this.format.compact&&this._indent&&!t&&"\n"!==e){var n=this.getIndent();e=e.replace(/\n/g,"\n"+n),this.isLast("\n")&&this._push(n)}this._push(e)},e.prototype._push=function(e){var t=this.parenPushNewlineState;if(t)for(var n=0;n")),this.space(),t.plain(e.returnType)}function d(e,t){t.plain(e.name),e.optional&&this.push("?"),this.push(":"),this.space(),t.plain(e.typeAnnotation)}function h(e,t){t.plain(e.id),t.plain(e.typeParameters)}function m(e,t){t.plain(e.id),t.plain(e.typeParameters),e["extends"].length&&(this.push(" extends "),t.join(e["extends"],{separator:", "})),this.space(),t.plain(e.body)}function y(e,t){this.push("interface "),this._interfaceish(e,t)}function g(e,t){t.join(e.types,{separator:" & "})}function v(){this.push("mixed")}function b(e,t){this.push("?"),t.plain(e.typeAnnotation)}function _(){this.push("number")}function x(e){this.push(this._stringLiteral(e.value))}function E(){this.push("string")}function w(e,t){this.push("["),t.join(e.types,{separator:", "}),this.push("]")}function C(e,t){this.push("typeof "),t.plain(e.argument)}function S(e,t){this.push("type "),t.plain(e.id),t.plain(e.typeParameters),this.space(),this.push("="),this.space(),t.plain(e.right),this.semicolon()}function k(e,t){this.push(":"),this.space(),e.optional&&this.push("?"),t.plain(e.typeAnnotation)}function D(e,t){this.push("<"),t.join(e.params,{separator:", ",iterator:function(e){t.plain(e.typeAnnotation)}}),this.push(">")}function A(e,t){var n=this;this.push("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),t.list(r,{separator:!1,indent:!0,iterator:function(){1!==r.length&&(n.semicolon(),n.space())}}),this.space()),this.push("}")}function P(e,t){e["static"]&&this.push("static "),t.plain(e.value)}function T(e,t){e["static"]&&this.push("static "),this.push("["),t.plain(e.id),this.push(":"),this.space(),t.plain(e.key),this.push("]"),this.push(":"),this.space(),t.plain(e.value)}function I(e,t){e["static"]&&this.push("static "),t.plain(e.key),e.optional&&this.push("?"),j.isFunctionTypeAnnotation(e.value)||(this.push(":"),this.space()),t.plain(e.value)}function O(e,t){t.plain(e.qualification),this.push("."),t.plain(e.id)}function M(e,t){t.join(e.types,{separator:" | "})}function F(e,t){this.push("("),t.plain(e.expression),t.plain(e.typeAnnotation),this.push(")")}function N(){this.push("void")}n.__esModule=!0,n.AnyTypeAnnotation=i,n.ArrayTypeAnnotation=o,n.BooleanTypeAnnotation=a,n.BooleanLiteralTypeAnnotation=s,n.DeclareClass=l,n.DeclareFunction=u,n.DeclareModule=c,n.DeclareVariable=p,n.FunctionTypeAnnotation=f,n.FunctionTypeParam=d,n.InterfaceExtends=h,n._interfaceish=m,n.InterfaceDeclaration=y,n.IntersectionTypeAnnotation=g,n.MixedTypeAnnotation=v,n.NullableTypeAnnotation=b,n.NumberTypeAnnotation=_,n.StringLiteralTypeAnnotation=x,n.StringTypeAnnotation=E,n.TupleTypeAnnotation=w,n.TypeofTypeAnnotation=C,n.TypeAlias=S,n.TypeAnnotation=k,n.TypeParameterInstantiation=D,n.ObjectTypeAnnotation=A,n.ObjectTypeCallProperty=P,n.ObjectTypeIndexer=T,n.ObjectTypeProperty=I,n.QualifiedTypeIdentifier=O,n.UnionTypeAnnotation=M,n.TypeCastExpression=F,n.VoidTypeAnnotation=N;var L=e(179),j=r(L);n.ClassImplements=h,n.GenericTypeAnnotation=h;var B=e(29);n.NumberLiteralTypeAnnotation=B.Literal,n.TypeParameterDeclaration=D},{179:179,29:29}],24:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){t.plain(e.name),e.value&&(this.push("="),t.plain(e.value))}function o(e){this.push(e.name)}function a(e,t){t.plain(e.namespace),this.push(":"),t.plain(e.name)}function s(e,t){t.plain(e.object),this.push("."),t.plain(e.property)}function l(e,t){this.push("{..."),t.plain(e.argument),this.push("}")}function u(e,t){this.push("{"),t.plain(e.expression),this.push("}")}function c(e,t){var n=e.openingElement;if(t.plain(n),!n.selfClosing){this.indent();for(var r=e.children,i=0;i0&&(this.push(" "),t.join(e.attributes,{separator:" "})),this.push(e.selfClosing?" />":">")}function f(e,t){this.push("")}function d(){}n.__esModule=!0,n.JSXAttribute=i,n.JSXIdentifier=o,n.JSXNamespacedName=a,n.JSXMemberExpression=s,n.JSXSpreadAttribute=l,n.JSXExpressionContainer=u,n.JSXElement=c,n.JSXOpeningElement=p,n.JSXClosingElement=f,n.JSXEmptyExpression=d;var h=e(179),m=r(h)},{179:179}],25:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){var n=this;t.plain(e.typeParameters),this.push("("),t.list(e.params,{iterator:function(e){e.optional&&n.push("?"),t.plain(e.typeAnnotation)}}),this.push(")"),e.returnType&&t.plain(e.returnType)}function o(e,t){var n=e.value,r=e.kind,i=e.key;("method"===r||"init"===r)&&n.generator&&this.push("*"),("get"===r||"set"===r)&&this.push(r+" "),n.async&&this.push("async "),e.computed?(this.push("["),t.plain(i),this.push("]")):t.plain(i),this._params(n,t),this.space(),t.plain(n.body)}function a(e,t){e.async&&this.push("async "),this.push("function"),e.generator&&this.push("*"),e.id?(this.push(" "),t.plain(e.id)):this.space(),this._params(e,t),this.space(),t.plain(e.body)}function s(e,t){e.async&&this.push("async "),1===e.params.length&&u.isIdentifier(e.params[0])?t.plain(e.params[0]):this._params(e,t),this.push(" => ");var n=u.isObjectExpression(e.body);n&&this.push("("),t.plain(e.body),n&&this.push(")")}n.__esModule=!0,n._params=i,n._method=o,n.FunctionExpression=a,n.ArrowFunctionExpression=s;var l=e(179),u=r(l);n.FunctionDeclaration=a},{179:179}],26:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){t.plain(e.imported),e.local&&e.local.name!==e.imported.name&&(this.push(" as "),t.plain(e.local))}function o(e,t){t.plain(e.local)}function a(e,t){t.plain(e.exported)}function s(e,t){t.plain(e.local),e.exported&&e.local.name!==e.exported.name&&(this.push(" as "),t.plain(e.exported))}function l(e,t){this.push("* as "),t.plain(e.exported)}function u(e,t){this.push("export *"),e.exported&&(this.push(" as "),t.plain(e.exported)),this.push(" from "),t.plain(e.source),this.semicolon()}function c(e,t){this.push("export "),f.call(this,e,t)}function p(e,t){this.push("export default "),f.call(this,e,t)}function f(e,t){var n=e.specifiers;if(e.declaration){var r=e.declaration;if(t.plain(r),y.isStatement(r)||y.isFunction(r)||y.isClass(r))return}else{"type"===e.exportKind&&this.push("type ");var i=n[0],o=!1;(y.isExportDefaultSpecifier(i)||y.isExportNamespaceSpecifier(i))&&(o=!0,t.plain(n.shift()),n.length&&this.push(", ")),(n.length||!n.length&&!o)&&(this.push("{"),n.length&&(this.space(),t.join(n,{separator:", "}),this.space()),this.push("}")),e.source&&(this.push(" from "),t.plain(e.source))}this.ensureSemicolon()}function d(e,t){this.push("import "),("type"===e.importKind||"typeof"===e.importKind)&&this.push(e.importKind+" ");var n=e.specifiers;if(n&&n.length){var r=e.specifiers[0];(y.isImportDefaultSpecifier(r)||y.isImportNamespaceSpecifier(r))&&(t.plain(e.specifiers.shift()),e.specifiers.length&&this.push(", ")),e.specifiers.length&&(this.push("{"),this.space(),t.join(e.specifiers,{separator:", "}),this.space(),this.push("}")),this.push(" from ")}t.plain(e.source),this.semicolon()}function h(e,t){this.push("* as "),t.plain(e.local)}n.__esModule=!0,n.ImportSpecifier=i,n.ImportDefaultSpecifier=o,n.ExportDefaultSpecifier=a,n.ExportSpecifier=s,n.ExportNamespaceSpecifier=l,n.ExportAllDeclaration=u,n.ExportNamedDeclaration=c,n.ExportDefaultDeclaration=p,n.ImportDeclaration=d,n.ImportNamespaceSpecifier=h;var m=e(179),y=r(m)},{179:179}],27:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){this.keyword("with"),this.push("("),t.plain(e.object),this.push(")"),t.block(e.body)}function a(e,t){this.keyword("if"),this.push("("),t.plain(e.test),this.push(")"),this.space(),t.indentOnComments(e.consequent),e.alternate&&(this.isLast("}")&&this.space(),this.push("else "),t.indentOnComments(e.alternate))}function s(e,t){this.keyword("for"),this.push("("),this._inForStatementInit=!0,t.plain(e.init),this._inForStatementInit=!1,this.push(";"),e.test&&(this.space(),t.plain(e.test)),this.push(";"),e.update&&(this.space(),t.plain(e.update)),this.push(")"),t.block(e.body)}function l(e,t){this.keyword("while"),this.push("("),t.plain(e.test),this.push(")"),t.block(e.body)}function u(e,t){this.push("do "),t.plain(e.body),this.space(),this.keyword("while"),this.push("("),t.plain(e.test),this.push(");")}function c(e,t){t.plain(e.label),this.push(": "),t.plain(e.body)}function p(e,t){this.keyword("try"),t.plain(e.block),this.space(),e.handlers?t.plain(e.handlers[0]):t.plain(e.handler),e.finalizer&&(this.space(),this.push("finally "),t.plain(e.finalizer))}function f(e,t){this.keyword("catch"),this.push("("),t.plain(e.param),this.push(") "),t.plain(e.body)}function d(e,t){this.keyword("switch"),this.push("("),t.plain(e.discriminant),this.push(")"),this.space(),this.push("{"),t.sequence(e.cases,{indent:!0,addNewlines:function(t,n){return t||e.cases[e.cases.length-1]!==n?void 0:-1}}),this.push("}")}function h(e,t){e.test?(this.push("case "),t.plain(e.test),this.push(":")):this.push("default:"),e.consequent.length&&(this.newline(),t.sequence(e.consequent,{indent:!0}))}function m(){this.push("debugger;")}function y(e,t,n){this.push(e.kind+" ");var r=!1;if(!x.isFor(n))for(var i=e.declarations,o=0;oi;i++)t.plain(n[i]),r>i+1&&(this.push("${ "),t.plain(e.expressions[i]),this.push(" }"));this._push("`")}n.__esModule=!0,n.TaggedTemplateExpression=r,n.TemplateElement=i,n.TemplateLiteral=o},{}],29:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){this.push(e.name)}function o(e,t){this.push("..."),t.plain(e.argument)}function a(e,t){var n=e.properties;this.push("{"),t.printInnerComments(),n.length&&(this.space(),t.list(n,{indent:!0}),this.space()),this.push("}")}function s(e,t){if(t.list(e.decorators,{separator:""}),e.method||"get"===e.kind||"set"===e.kind)this._method(e,t);else{if(e.computed)this.push("["),t.plain(e.key),this.push("]");else{if(d.isAssignmentPattern(e.value)&&d.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void t.plain(e.value);if(t.plain(e.key),e.shorthand&&d.isIdentifier(e.key)&&d.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.push(":"),this.space(),t.plain(e.value)}}function l(e,t){var n=e.elements,r=n.length;this.push("["),t.printInnerComments();for(var i=0;i0&&this.space(),t.plain(o),r-1>i&&this.push(",")):this.push(",")}this.push("]")}function u(e){this.push(""),this._push(this._Literal(e))}function c(e){var t=e.value;if(e.regex)return"/"+e.regex.pattern+"/"+e.regex.flags;if(null!=e.raw&&null!=e.rawValue&&t===e.rawValue)return e.raw;switch(typeof t){case"string":return this._stringLiteral(t);case"number":return t+"";case"boolean":return t?"true":"false";default:if(null===t)return"null";throw new Error("Invalid Literal type")}}function p(e){return e=JSON.stringify(e),e=e.replace(/[\u000A\u000D\u2028\u2029]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}),"single"===this.format.quotes&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"'),e=e.replace(/'/g,"\\'"),e="'"+e+"'"),e}n.__esModule=!0,n.Identifier=i,n.RestElement=o,n.ObjectExpression=a,n.Property=s,n.ArrayExpression=l,n.Literal=u,n._Literal=c,n._stringLiteral=p;var f=e(179),d=r(f);n.SpreadElement=o,n.SpreadProperty=o,n.ObjectPattern=a,n.ArrayPattern=l},{179:179}],30:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=function(){function e(e,t){for(var n=0;n1e5,a.compact&&console.error("[BABEL] "+_.get("codeGeneratorDeopt",n.filename,"100KB"))),a.compact&&(a.indent.adjustMultilineComment=!1),a},t.findCommonStringDelimiter=function(e,t){for(var n={single:0,"double":0},r=0,i=0;i=3)break}}return n.single>n["double"]?"single":"double"},t.prototype.generate=function(){var e=this.ast;if(this.print(e),e.comments){for(var t=[],n=e.comments,r=0;ra&&n.push(r.separator)}},a=0;a=0||e.value.indexOf("@preserve")>=0?!0:this.format.comments},t.prototype._printComments=function(e){if(e&&e.length)for(var t=e,n=0;no)return!0;if(r===o&&t.right===e&&!_.isLogicalExpression(t))return!0}}function u(e,t){if("in"===e.operator){if(_.isVariableDeclarator(t))return!0;if(_.isFor(t))return!0}}function c(e,t){return _.isForStatement(t)?!1:_.isExpressionStatement(t)&&t.expression===e?!1:_.isReturnStatement(t)?!1:!0}function p(e,t){return _.isBinary(t)||_.isUnaryLike(t)||_.isCallExpression(t)||_.isMemberExpression(t)||_.isNewExpression(t)||_.isConditionalExpression(t)||_.isYieldExpression(t)}function f(e,t){return _.isExpressionStatement(t)}function d(e,t){return _.isMemberExpression(t)&&t.object===e}function h(e,t){return _.isExpressionStatement(t)?!0:_.isMemberExpression(t)&&t.object===e?!0:_.isCallExpression(t)&&t.callee===e?!0:void 0}function m(e,t){return _.isUnaryLike(t)?!0:_.isBinary(t)?!0:(_.isCallExpression(t)||_.isNewExpression(t))&&t.callee===e?!0:_.isConditionalExpression(t)&&t.test===e?!0:_.isMemberExpression(t)&&t.object===e?!0:!1}function y(e){return _.isObjectPattern(e.left)?!0:m.apply(void 0,arguments)}n.__esModule=!0,n.NullableTypeAnnotation=o,n.UpdateExpression=a,n.ObjectExpression=s,n.Binary=l,n.BinaryExpression=u,n.SequenceExpression=c,n.YieldExpression=p,n.ClassExpression=f,n.UnaryLike=d,n.FunctionExpression=h,n.ConditionalExpression=m,n.AssignmentExpression=y;var g=e(411),v=i(g),b=e(179),_=r(b),x={};v["default"]([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(e,t){v["default"](e,function(e){x[e]=t})}),n.FunctionTypeAnnotation=o},{179:179,411:411}],33:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function e(t,n){r(this,e),this.generator=t,this.parent=n}return e.prototype.printInnerComments=function(){if(this.parent.innerComments){var e=this.generator;e.indent(),e._printComments(this.parent.innerComments),e.dedent()}},e.prototype.plain=function(e,t){return this.generator.print(e,this.parent,t)},e.prototype.sequence=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.statement=!0,this.generator.printJoin(this,e,t)},e.prototype.join=function(e,t){return this.generator.printJoin(this,e,t)},e.prototype.list=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return null==t.separator&&(t.separator=",",this.generator.format.compact||(t.separator+=" ")),this.join(e,t)},e.prototype.block=function(e){return this.generator.printBlock(this,e)},e.prototype.indentOnComments=function(e){return this.generator.printAndIndentOnComments(this,e)},e}();n["default"]=i,t.exports=n["default"]},{}],34:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return m.isMemberExpression(e)?(o(e.object,t),e.computed&&o(e.property,t)):m.isBinary(e)||m.isAssignmentExpression(e)?(o(e.left,t),o(e.right,t)):m.isCallExpression(e)?(t.hasCall=!0,o(e.callee,t)):m.isFunction(e)?t.hasFunction=!0:m.isIdentifier(e)&&(t.hasHelper=t.hasHelper||a(e.callee)),t}function a(e){return m.isMemberExpression(e)?a(e.object)||a(e.property):m.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:m.isCallExpression(e)?a(e.callee):m.isBinary(e)||m.isAssignmentExpression(e)?m.isIdentifier(e.left)&&a(e.left)||a(e.right):!1}function s(e){return m.isLiteral(e)||m.isObjectExpression(e)||m.isArrayExpression(e)||m.isIdentifier(e)||m.isMemberExpression(e)}var l=e(498),u=i(l),c=e(411),p=i(c),f=e(414),d=i(f),h=e(179),m=r(h);n.nodes={AssignmentExpression:function(e){var t=o(e.right);return t.hasCall&&t.hasHelper||t.hasFunction?{before:t.hasFunction,after:!0}:void 0},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){return m.isFunction(e.left)||m.isFunction(e.right)?{after:!0}:void 0},Literal:function(e){return"use strict"===e.value?{after:!0}:void 0},CallExpression:function(e){return m.isFunction(e.callee)||a(e)?{before:!0,after:!0}:void 0},VariableDeclaration:function(e){for(var t=0;t=n&&(e-=n),e}n.__esModule=!0;var o=function(){function e(t){r(this,e),this.tokens=t,this.used={},this._lastFoundIndex=0}return e.prototype.getNewlinesBefore=function(e){for(var t,n,r=this.tokens,o=0;oo;o++)"undefined"==typeof this.used[o]&&(this.used[o]=!0,i++);return i},e}();n["default"]=o,t.exports=n["default"]},{}],38:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=p["default"].matchToToken(e);if("name"===t.type&&d["default"].keyword.isReservedWordES6(t.value))return"keyword";if("punctuator"===t.type)switch(t.value){case"{":case"}":return"curly";case"(":case")":return"parens";case"[":case"]":return"square"}return t.type}function o(e){return e.replace(p["default"],function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var r=i(t),o=y[r];return o?t[0].split(g).map(function(e){return o(e)}).join("\n"):t[0]})}n.__esModule=!0;var a=e(403),s=r(a),l=e(584),u=r(l),c=e(401),p=r(c),f=e(395),d=r(f),h=e(200),m=r(h),y={string:m["default"].red,punctuator:m["default"].bold,curly:m["default"].green,parens:m["default"].blue.bold,square:m["default"].yellow,keyword:m["default"].cyan,number:m["default"].magenta,regex:m["default"].magenta,comment:m["default"].grey,invalid:m["default"].inverse},g=/\r\n|[\n\r\u2028\u2029]/;n["default"]=function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];n=Math.max(n,0);var i=r.highlightCode&&m["default"].supportsColor;i&&(e=o(e)),e=e.split(g);var a=Math.max(t-3,0),l=Math.min(e.length,t+3);t||n||(a=0,l=e.length);var c=s["default"](e.slice(a,l),{start:a+1,before:" ",after:" | ",transform:function(e){e.number===t&&(n&&(e.line+="\n"+e.before+u["default"](" ",e.width)+e.after+u["default"](" ",n-1)+"^"),e.before=e.before.replace(/^./,">"))}}).join("\n");return i?m["default"].reset(c):c},t.exports=n["default"]},{200:200,395:395,401:401,403:403,584:584}],39:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var i=e(515),o=r(i);n["default"]=function(e,t){return e&&t?o["default"](e,t,function(e,t){if(t&&Array.isArray(e)){for(var n=e.slice(0),r=t,i=Array.isArray(r),o=0,r=i?r:r[Symbol.iterator]();;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if(o=r.next(),o.done)break;a=o.value}var s=a;e.indexOf(s)<0&&n.push(s)}return n}}):void 0},t.exports=n["default"]},{515:515}],40:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(179),o=r(i);n["default"]=function(e,t,n){if(e&&"Program"===e.type)return o.file(e,t||[],n||[]);throw new Error("Not a valid ast?")},t.exports=n["default"]},{179:179}],41:[function(e,t,n){"use strict";n.__esModule=!0,n["default"]=function(){return Object.create(null)},t.exports=n["default"]},{}],42:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(605),o=r(i);n["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n={allowImportExportEverywhere:t.looseModules,allowReturnOutsideFunction:t.looseModules,allowHashBang:!0,ecmaVersion:6,strictMode:t.strictMode,sourceType:t.sourceType,locations:!0,features:t.features||{},plugins:t.plugins||{}};return t.nonStandard&&(n.plugins.jsx=!0,n.plugins.flow=!0),o.parse(e,n)},t.exports=n["default"]},{605:605}],43:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];var i=l[e];if(!i)throw new ReferenceError("Unknown message "+JSON.stringify(e));return n=o(n),i.replace(/\$(\d+)/g,function(e,t){return n[--t]})}function o(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return JSON.stringify(e)||e+""}catch(t){return s.inspect(e)}})}n.__esModule=!0,n.get=i,n.parseArgs=o;var a=e(13),s=r(a),l={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginIllegalKind:"Illegal kind $1 for plugin $2",pluginIllegalPosition:"Illegal position $1 for plugin $2",pluginKeyCollision:"The plugin $1 collides with another of the same name",pluginNotTransformer:"The plugin $1 didn't export a Plugin instance",pluginUnknown:"Unknown plugin $1",pluginNotFile:"Plugin $1 is resolving to a different Babel version than what is performing the transformation.",pluginInvalidProperty:"Plugin $1 provided an invalid property of $2.",pluginInvalidPropertyVisitor:'Define your visitor methods inside a `visitor` property like so:\n\n new Plugin("foobar", {\n visitor: {\n // define your visitor methods here!\n }\n });\n'};n.MESSAGES=l},{13:13}],44:[function(e,n,r){(function(t){"use strict";if(e(387),e(577),t._babelPolyfill)throw new Error("only one instance of babel/polyfill is allowed");t._babelPolyfill=!0}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{387:387,577:577}],45:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=[],r=_.functionExpression(null,[_.identifier("global")],_.blockStatement(n)),i=_.program([_.expressionStatement(_.callExpression(r,[h.template("helper-self-global")]))]);return n.push(_.variableDeclaration("var",[_.variableDeclarator(e,_.assignmentExpression("=",_.memberExpression(_.identifier("global"),e),_.objectExpression([])))])),t(n),i}function a(e,t){var n=[];n.push(_.variableDeclaration("var",[_.variableDeclarator(e,_.identifier("global"))])),t(n);var r=h.template("umd-commonjs-strict",{FACTORY_PARAMETERS:_.identifier("global"),BROWSER_ARGUMENTS:_.assignmentExpression("=",_.memberExpression(_.identifier("root"),e),_.objectExpression({})),COMMON_ARGUMENTS:_.identifier("exports"),AMD_ARGUMENTS:_.arrayExpression([_.literal("exports")]),FACTORY_BODY:n,UMD_ROOT:_.identifier("this")});return _.program([r])}function s(e,t){var n=[];return n.push(_.variableDeclaration("var",[_.variableDeclarator(e,_.objectExpression({}))])),t(n),_.program(n)}function l(e,t,n){v["default"](y["default"].helpers,function(r){if(!n||-1!==n.indexOf(r)){var i=_.identifier(_.toIdentifier(r));e.push(_.expressionStatement(_.assignmentExpression("=",_.memberExpression(t,i),h.template("helper-"+r))))}})}n.__esModule=!0;var u=e(30),c=i(u),p=e(43),f=r(p),d=e(182),h=r(d),m=e(46),y=i(m),g=e(411),v=i(g),b=e(179),_=r(b);n["default"]=function(e){var t,n=arguments.length<=1||void 0===arguments[1]?"global":arguments[1],r=_.identifier("babelHelpers"),i=function(t){return l(t,r,e)},u={global:o,umd:a,"var":s}[n];if(!u)throw new Error(f.get("unsupportedOutputType",n));return t=u(r,i),c["default"](t).code},t.exports=n["default"]},{179:179,182:182,30:30,411:411,43:43,46:46}],46:[function(e,t,n){(function(r){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var s=function(){function e(e,t){for(var n=0;n=0)){var a=o.plugin.metadata.group;if(o.canTransform()&&a){for(var s=[],l=e,u=0;u=0||(u.push(e),console.error(e)))},e.prototype.verbose=function(e){s.enabled&&s(this._buildMessage(e))},e.prototype.debug=function(e){l.enabled&&l(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();n["default"]=c,t.exports=n["default"]},{389:389}],48:[function(e,t,n){t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},extra:{hidden:!0,"default":{}},env:{hidden:!0,"default":{}},moduleId:{description:"specify a custom name for module ids",type:"string"},getModuleId:{hidden:!0},retainLines:{type:"boolean","default":!1,description:"retain line numbers - will result in really ugly code"},nonStandard:{type:"boolean","default":!0,description:"enable/disable support for JSX and Flow (on by default)"},experimental:{type:"boolean",description:"allow use of experimental transformers","default":!1},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":!0},suppressDeprecationMessages:{type:"boolean","default":!1,hidden:!0},resolveModuleSource:{hidden:!0},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b","default":[]},whitelist:{type:"transformerList",optional:!0,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable","default":[]},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":!1,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:"","default":[]},ignore:{type:"list",description:"list of glob paths to **not** compile","default":[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,"default":!0,type:"boolean"},metadata:{hidden:!0,"default":!0,type:"boolean"},ast:{hidden:!0,"default":!0,type:"boolean"},comments:{type:"boolean","default":!0,description:"strip/output comments in generated output (on by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":!1,shorthand:"k"},auxiliaryComment:{deprecated:"renamed to auxiliaryCommentBefore",shorthand:"a",alias:"auxiliaryCommentBefore"},auxiliaryCommentBefore:{type:"string","default":"",description:"attach a comment before all helper declarations and auxiliary code"},auxiliaryCommentAfter:{type:"string","default":"",description:"attach a comment after all helper declarations and auxiliary code"},externalHelpers:{type:"boolean","default":!1,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{deprecated:"Not required anymore as this is enabled by default",type:"boolean","default":!1,hidden:!0},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":!1,shorthand:"s"},sourceMapName:{alias:"sourceMapTarget",description:"DEPRECATED - Please use sourceMapTarget"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":!1,hidden:!0,description:"stop trying to load .babelrc files"},babelrc:{description:"Specify a custom list of babelrc files to use",type:"list"},sourceType:{description:"","default":"module"}}},{}],49:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e,t,n){var r=c["default"][e],i=r&&l[r.type];return i&&i.validate?i.validate(e,t,n):t}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];for(var t in e){var n=e[t];if(null!=n){var r=c["default"][t];if(r){var i=l[r.type];i&&(n=i(n)),e[t]=n}}}return e}n.__esModule=!0,n.validateOption=o,n.normaliseOptions=a;var s=e(51),l=i(s),u=e(48),c=r(u);n.config=c["default"]},{48:48,51:51}],50:[function(e,t,n){(function(r){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=C[e];return null!=t?t:C[e]=d["default"].sync(e)}n.__esModule=!0;var s=e(49),l=e(402),u=i(l),c=e(527),p=i(c),f=e(526),d=i(f),h=e(494),m=i(h),y=e(39),g=i(y),v=e(48),b=i(v),_=e(9),x=i(_),E=e(1),w=i(E),C={},S={},k=".babelignore",D=".babelrc",A="package.json",P=function(){function e(t,n){o(this,e),this.resolvedConfigs=[],this.options=e.createBareOptions(),this.pipeline=n,this.log=t}return e.createBareOptions=function(){var e={};for(var t in b["default"]){var n=b["default"][t];e[t]=m["default"](n["default"])}return e},e.prototype.addConfig=function(e,t){var n=arguments.length<=2||void 0===arguments[2]?u["default"]:arguments[2];if(!(this.resolvedConfigs.indexOf(e)>=0)){var r,i=w["default"].readFileSync(e,"utf8");try{r=S[i]=S[i]||n.parse(i),t&&(r=r[t])}catch(o){throw o.message=e+": Error while parsing JSON - "+o.message,o}this.mergeOptions(r,e),this.resolvedConfigs.push(e)}},e.prototype.mergeOptions=function(e){var t=arguments.length<=1||void 0===arguments[1]?"foreign":arguments[1];if(e){for(var n in e)if("_"!==n[0]){var r=b["default"][n];r||this.log.error("Unknown option: "+t+"."+n,ReferenceError)}s.normaliseOptions(e),g["default"](this.options,e)}},e.prototype.addIgnoreConfig=function(e){var t=w["default"].readFileSync(e,"utf8"),n=t.split("\n");n=n.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e}),this.mergeOptions({ignore:n},e)},e.prototype.findConfigs=function(e){if(e)for(p["default"](e)||(e=x["default"].join(r.cwd(),e));e!==(e=x["default"].dirname(e));){if(this.options.breakConfig)return;var t=x["default"].join(e,D);a(t)&&this.addConfig(t);var n=x["default"].join(e,A);a(n)&&this.addConfig(n,"babel",JSON);var i=x["default"].join(e,k);a(i)&&this.addIgnoreConfig(i)}},e.prototype.normaliseOptions=function(){var e=this.options;for(var t in b["default"]){var n=b["default"][t],r=e[t];(r||!n.optional)&&(this.log&&r&&n.deprecated&&this.log.deprecate("Deprecated option "+t+": "+n.deprecated),this.pipeline&&r&&(r=s.validateOption(t,r,this.pipeline)),n.alias?e[n.alias]=e[n.alias]||r:e[t]=r)}},e.prototype.init=function(e){if(this.mergeOptions(e,"direct"),e.babelrc)for(var t=e.babelrc,n=0;n=0||t.indexOf(!0)>=0)&&(t=Object.keys(n.transformers)),n._ensureTransformerNames(e,t)};var h=p["default"];n.filename=h},{182:182,588:588}],52:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var a=function(){function e(e,t){for(var n=0;n=3&&(t._prettyCall=!0),h.inherits(t,e)}},t},t.exports=n["default"]},{179:179,395:395,43:43,506:506,62:62}],56:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(179),o=r(i),a={enter:function(e,t,n,r){(this.isThisExpression()||this.isReferencedIdentifier({name:"arguments"}))&&(r.found=!0,this.stop())},Function:function(){this.skip()}};n["default"]=function(e,t){var n=o.functionExpression(null,[],e.body,e.generator,e.async),r=n,i=[],s={found:!1};t.traverse(e,a,s),s.found&&(r=o.memberExpression(n,o.identifier("apply")),i=[o.thisExpression(),o.identifier("arguments")]);var l=o.callExpression(r,i);return e.generator&&(l=o.yieldExpression(l,!0)),o.returnStatement(l)},t.exports=n["default"]},{179:179}],57:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n,r){var i=m.toKeyAlias(t),o={};if(d["default"](e,i)&&(o=e[i]),e[i]=o,o._inherits=o._inherits||[],o._inherits.push(t),o._key=t.key,t.computed&&(o._computed=!0),t.decorators){var a=o.decorators=o.decorators||m.arrayExpression([]);a.elements=a.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(o.value||o.initializer)throw r.errorWithNode(t,"Key conflict with sibling node");return t.value&&("init"===t.kind&&(n="value"),"get"===t.kind&&(n="get"),"set"===t.kind&&(n="set"),m.inheritsComments(t.value,t),o[n]=t.value),o}function a(e){for(var t in e)if(e[t]._computed)return!0;return!1}function s(e){for(var t=m.arrayExpression([]),n=0;ns;s++)a.push(r.generateUidIdentifier("x"));return o}r.rename(n.name)}t.id=n,r.getProgramParent().references[n.name]=!0},g=function(e,t,n){var r={selfAssignment:!1,selfReference:!1,outerDeclar:n.getBindingIdentifier(t),references:[],name:t},i=n.getOwnBinding(t);return i?"param"===i.kind&&(r.selfReference=!0):(r.outerDeclar||n.hasGlobal(t))&&n.traverse(e,m,r),r}},{179:179,182:182,59:59}],62:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&/^[a-z]|\-/.test(e)}function o(e,t){for(var n=e.value.split(/\r\n|\n|\r/),r=0,i=0;i=0}function a(e,t){var n=e.regex.flags.split("");e.regex.flags.indexOf(t)<0||(l["default"](n,t),e.regex.flags=n.join(""))}n.__esModule=!0,n.is=o,n.pullFlag=a;var s=e(408),l=i(s),u=e(179),c=r(u)},{179:179,408:408}],64:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(179),o=r(i),a={Function:function(){this.skip()},AwaitExpression:function(e){e.type="YieldExpression",e.all&&(e.all=!1,e.argument=o.callExpression(o.memberExpression(o.identifier("Promise"),o.identifier("all")),[e.argument]))}},s={ReferencedIdentifier:function(e,t,n,r){var i=r.id.name;return e.name===i&&n.bindingIdentifierEquals(i,r.id)?r.ref=r.ref||n.generateUidIdentifier(i):void 0}};n["default"]=function(e,t){var n=e.node;n.async=!1,n.generator=!0,e.traverse(a,u);var r=o.callExpression(t,[n]),i=n.id;if(n.id=null,o.isFunctionDeclaration(n)){var l=o.variableDeclaration("let",[o.variableDeclarator(i,r)]);return l._blockHoist=!0,l}if(i){var u={id:i};if(e.traverse(s,u),u.ref)return e.scope.parent.push({id:u.ref}),o.assignmentExpression("=",u.ref,r)}return r},t.exports=n["default"]},{179:179}],65:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return c.isSuper(e)?c.isMemberExpression(t,{computed:!1})?!1:c.isCallExpression(t,{callee:e})?!1:!0:!1}function a(e){return c.isMemberExpression(e)&&c.isSuper(e.object)}n.__esModule=!0;var s=e(43),l=r(s),u=e(179),c=r(u),p={enter:function(e,t,n,r){var i=r.topLevel,o=r.self;if(c.isFunction(e)&&!c.isArrowFunctionExpression(e))return o.traverseLevel(this,!1),this.skip();if(c.isProperty(e,{method:!0})||c.isMethodDefinition(e))return this.skip();var a=i?c.thisExpression:o.getThisReference.bind(o),s=o.specHandle;o.isLoose&&(s=o.looseHandle);var l=s.call(o,this,a);return l&&(this.hasSuper=!0),l!==!0?l:void 0}},f=function(){function e(t){var n=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];i(this,e),this.topLevelThisReference=t.topLevelThisReference,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=n,this.isLoose=t.isLoose,this.scope=t.scope,this.file=t.file,this.opts=t}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,n,r){return c.callExpression(this.file.addHelper("set"),[c.callExpression(c.memberExpression(c.identifier("Object"),c.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():c.memberExpression(this.getObjectRef(),c.identifier("prototype"))]),n?e:c.literal(e.name),t,r])},e.prototype.getSuperProperty=function(e,t,n){return c.callExpression(this.file.addHelper("get"),[c.callExpression(c.memberExpression(c.identifier("Object"),c.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():c.memberExpression(this.getObjectRef(),c.identifier("prototype"))]),t?e:c.literal(e.name),n])},e.prototype.replace=function(){this.traverseLevel(this.methodPath.get("value"),!0)},e.prototype.traverseLevel=function(e,t){var n={self:this,topLevel:t};e.traverse(p,n)},e.prototype.getThisReference=function(){if(this.topLevelThisReference)return this.topLevelThisReference;var e=this.topLevelThisReference=this.scope.generateUidIdentifier("this");return this.methodNode.value.body.body.unshift(c.variableDeclaration("var",[c.variableDeclarator(this.topLevelThisReference,c.thisExpression())])),e},e.prototype.getLooseSuperProperty=function(e,t){var n=this.methodNode,r=n.key,i=this.superRef||c.identifier("Function");return t.property===e?void 0:c.isCallExpression(t,{callee:e})?(t.arguments.unshift(c.thisExpression()),"constructor"===r.name?2===t.arguments.length&&c.isSpreadElement(t.arguments[1])&&c.isIdentifier(t.arguments[1].argument,{name:"arguments"})?(t.arguments[1]=t.arguments[1].argument,c.memberExpression(i,c.identifier("apply"))):c.memberExpression(i,c.identifier("call")):(e=i,n["static"]||(e=c.memberExpression(e,c.identifier("prototype"))),e=c.memberExpression(e,r,n.computed),c.memberExpression(e,c.identifier("call")))):c.isMemberExpression(t)&&!n["static"]?c.memberExpression(i,c.identifier("prototype")):i},e.prototype.looseHandle=function(e,t){var n=e.node;if(e.isSuper())return this.getLooseSuperProperty(n,e.parent);if(e.isCallExpression()){var r=n.callee;if(!c.isMemberExpression(r))return;if(!c.isSuper(r.object))return;return c.appendToMemberExpression(r,c.identifier("call")),n.arguments.unshift(t()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,n,r){return"="===n.operator?this.setSuperProperty(n.left.property,n.right,n.left.computed,r()):(e=e||t.scope.generateUidIdentifier("ref"),[c.variableDeclaration("var",[c.variableDeclarator(e,n.left)]),c.expressionStatement(c.assignmentExpression("=",n.left,c.binaryExpression(n.operator[0],e,n.right)))])},e.prototype.specHandle=function(e,t){var n,r,i,s,u=this.methodNode,p=e.parent,f=e.node;if(o(f,p))throw e.errorWithNode(l.get("classesIllegalBareSuper"));if(c.isCallExpression(f)){var d=f.callee;if(c.isSuper(d)){if(n=u.key,r=u.computed,i=f.arguments,"constructor"!==u.key.name||!this.inClass){var h=u.key.name||"METHOD_NAME";throw this.file.errorWithNode(f,l.get("classesIllegalSuperCall",h))}}else a(d)&&(n=d.property,r=d.computed,i=f.arguments)}else if(c.isMemberExpression(f)&&c.isSuper(f.object))n=f.property,r=f.computed;else{if(c.isUpdateExpression(f)&&a(f.argument)){var m=c.binaryExpression(f.operator[0],f.argument,c.literal(1));if(f.prefix)return this.specHandleAssignmentExpression(null,e,m,t);var y=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(y,e,m,t).concat(c.expressionStatement(y))}if(c.isAssignmentExpression(f)&&a(f.left))return this.specHandleAssignmentExpression(null,e,f,t)}if(n){s=t();var g=this.getSuperProperty(n,r,s);return i?1===i.length&&c.isSpreadElement(i[0])?c.callExpression(c.memberExpression(g,c.identifier("apply")),[s,i[0].argument]):c.callExpression(c.memberExpression(g,c.identifier("call")),[s].concat(i)):g}},e}();n["default"]=f,t.exports=n["default"]},{179:179,43:43}],66:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var o=e(80),a=i(o),s=e(126),l=i(s),u=e(85),c=i(u),p=e(84),f=i(p),d=e(125),h=r(d),m=new a["default"];for(var y in l["default"]){var g=l["default"][y];if("object"==typeof g){var v=g.metadata=g.metadata||{};v.group=v.group||"builtin-basic"}}m.addTransformers(l["default"]),m.addDeprecated(c["default"]),m.addAliases(f["default"]),m.addFilter(h.internal),m.addFilter(h.blacklist),m.addFilter(h.whitelist),m.addFilter(h.stage),m.addFilter(h.optional);var b=m.transform.bind(m);b.fromAst=m.transformFromAst.bind(m),b.pipeline=m,n["default"]=b,t.exports=n["default"]},{125:125,126:126,80:80,84:84,85:85}],67:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var a=e(75),s=i(a),l=e(43),u=i(l),c=e(76),p=r(c),f=e(41),d=r(f),h=e(182),m=i(h),y=e(179),g=i(y),v=function(){function e(t){o(this,e),this.sourceScopes=d["default"](),this.defaultIds=d["default"](),this.ids=d["default"](),this.remaps=new p["default"](t,this),this.scope=t.scope,this.file=t,this.hasNonDefaultExports=!1,this.hasLocalExports=!1,this.hasLocalImports=!1,this.localExports=d["default"](),this.localImports=d["default"](),this.metadata=t.metadata.modules,this.getMetadata()}return e.prototype.addScope=function(e){var t=e.node.source&&e.node.source.value;if(t){var n=this.sourceScopes[t];if(n&&n!==e.scope)throw e.errorWithNode(u.get("modulesDuplicateDeclarations"));this.sourceScopes[t]=e.scope}},e.prototype.isModuleType=function(e,t){var n=this.file.dynamicImportTypes[t];return n&&n.indexOf(e)>=0},e.prototype.transform=function(){this.remapAssignments()},e.prototype.doDefaultExportInterop=function(e){return(g.isExportDefaultDeclaration(e)||g.isSpecifierDefault(e))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports},e.prototype.getMetadata=function(){for(var e=!1,t=this.file.ast.program.body,n=0;n=0)){var r="pluginInvalidProperty";throw b.TYPES.indexOf(n)>=0&&(r="pluginInvalidPropertyVisitor"),new Error(u.get(r,e,n))}for(var n in t.metadata)if(!(x.indexOf(n)>=0))throw new Error(u.get("pluginInvalidProperty",e,"metadata."+n))},e.prototype.normalize=function(e){return p["default"].explode(e),e},e.prototype.buildPass=function(e){if(!(e instanceof g["default"]))throw new TypeError(u.get("pluginNotFile",this.key));return new s["default"](e,this)},e}();n["default"]=E,t.exports=n["default"]},{148:148,179:179,43:43,46:46,494:494,509:509,81:81}],83:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=e(82),a=r(o),s=function l(e,t){i(this,l);var n={};return n.metadata=t.metadata,delete t.metadata,n.visitor=t,new a["default"](e,n)};n["default"]=s,t.exports=n["default"]},{82:82}],84:[function(e,t,n){t.exports={useStrict:"strict","es5.runtime":"runtime","es6.runtime":"runtime","minification.inlineExpressions":"minification.constantFolding"}},{}],85:[function(e,t,n){t.exports={selfContained:"runtime","unicode-regex":"regex.unicode","spec.typeofSymbol":"es6.spec.symbols","es6.symbols":"es6.spec.symbols","es6.blockScopingTDZ":"es6.spec.blockScoping","utility.inlineExpressions":"minification.constantFolding","utility.deadCodeElimination":"minification.deadCodeElimination","utility.removeConsoleCalls":"minification.removeConsole","utility.removeDebugger":"minification.removeDebugger","es6.parameters.rest":"es6.parameters","es6.parameters.default":"es6.parameters"}},{}],86:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(179),o=r(i),a={group:"builtin-trailing"};n.metadata=a;var s={MemberExpression:{exit:function(e){var t=e.property;e.computed||!o.isIdentifier(t)||o.isValidIdentifier(t.name)||(e.property=o.literal(t.name),e.computed=!0)}}};n.visitor=s},{179:179}],87:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(179),o=r(i),a={group:"builtin-trailing"};n.metadata=a;var s={Property:{exit:function(e){var t=e.key;e.computed||!o.isIdentifier(t)||o.isValidIdentifier(t.name)||(e.key=o.literal(t.name))}}};n.visitor=s},{179:179}],88:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(57),o=r(i),a=e(179),s=r(a),l={ObjectExpression:function(e,t,n,r){for(var i=!1,a=e.properties,l=0;l=0)return;o=o+"|"+e.label.name}else{if(r.ignoreLabeless)return;if(r.inSwitchCase)return;if(b.isBreakStatement(e)&&b.isSwitchCase(t))return}r.hasBreakContinue=!0,r.map[o]=e,i=b.literal(o)}return this.isReturnStatement()&&(r.hasReturn=!0,i=b.objectExpression([b.property("init",b.identifier("v"),e.argument||b.identifier("undefined"))])),i?(i=b.returnStatement(i),this.skip(),b.inherits(i,e)):void 0}},F=function(){function e(t,n,r,i,a){o(this,e),this.parent=r,this.scope=i,this.file=a,this.blockPath=n,this.block=n.node,this.outsideLetReferences=m["default"](),this.hasLetReferences=!1,this.letReferences=this.block._letReferences=m["default"](),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=b.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(!b.isFunction(this.parent)&&!b.isProgram(this.block)&&this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.loopLabel&&!b.isLabeledStatement(this.loopParent)?b.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.remap=function(){var e=!1,t=this.letReferences,n=this.scope,r=m["default"]();for(var i in t){var o=t[i];if(n.parentHasBinding(i)||n.hasGlobal(i)){var a=n.generateUidIdentifier(o.name).name;o.name=a,e=!0,r[i]=r[a]={binding:o,uid:a}}}if(e){var s=this.loop;s&&(p(s.right,s,n,r),p(s.test,s,n,r),p(s.update,s,n,r)),this.blockPath.traverse(k,r)}},e.prototype.wrapClosure=function(){var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var n in t){var r=t[n];(this.scope.hasGlobal(r.name)||this.scope.parentHasBinding(r.name))&&(delete t[r.name],delete this.letReferences[r.name],this.scope.rename(r.name),this.letReferences[r.name]=r,t[r.name]=r)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=x["default"](t),o=x["default"](t),a=b.functionExpression(null,i,b.blockStatement(e.body));a.shadow=!0,this.addContinuations(a),e.body=this.body;var s=a;this.loop&&(s=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(b.variableDeclaration("var",[b.variableDeclarator(s,a)])));var l=b.callExpression(s,o),u=this.scope.generateUidIdentifier("ret"),c=d["default"].hasType(a.body,this.scope,"YieldExpression",b.FUNCTION_TYPES);c&&(a.generator=!0,l=b.yieldExpression(l,!0));var p=d["default"].hasType(a.body,this.scope,"AwaitExpression",b.FUNCTION_TYPES);p&&(a.async=!0,l=b.awaitExpression(l)),this.buildClosure(u,l)},e.prototype.buildClosure=function(e,t){var n=this.has;n.hasReturn||n.hasBreakContinue?this.buildHas(e,t):this.body.push(b.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,I,t);for(var n=0;n=r)break;if(!c.isSpreadProperty(a)){var s=a.key;c.isIdentifier(s)&&!a.computed&&(s=c.literal(a.key.name)),i.push(s)}}i=c.arrayExpression(i);var l=c.callExpression(this.file.addHelper("object-without-properties"),[t,i]);this.nodes.push(this.buildVariableAssignment(n.argument,l))},e.prototype.pushObjectProperty=function(e,t){c.isLiteral(e.key)&&(e.computed=!0);var n=e.value,r=c.memberExpression(t,e.key,e.computed);c.isPattern(n)?this.push(n,r):this.nodes.push(this.buildVariableAssignment(n,r))},e.prototype.pushObjectPattern=function(e,t){if(e.properties.length||this.nodes.push(c.expressionStatement(c.callExpression(this.file.addHelper("object-destructuring-empty"),[t]))),e.properties.length>1&&!this.scope.isStatic(t)){var n=this.scope.generateUidIdentifierBasedOnNode(t);this.nodes.push(this.buildVariableDeclaration(n,t)),t=n}for(var r=0;rt.elements.length)){if(e.elements.length0&&(s=c.callExpression(c.memberExpression(s,c.identifier("slice")),[c.literal(i)])),o=o.argument):s=c.memberExpression(t,c.literal(i),!0),this.push(o,s)}}}},e.prototype.init=function(e,t){if(!c.isArrayExpression(t)&&!c.isMemberExpression(t)){var n=this.scope.maybeGenerateMemoised(t,!0);n&&(this.nodes.push(this.buildVariableDeclaration(n,t)),t=n)}return this.push(e,t),this.nodes},e}()},{179:179,43:43}],96:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){var n=[],r=e.right;if(!c.isIdentifier(r)||!t.hasBinding(r.name)){var i=t.generateUidIdentifier("arr");n.push(c.variableDeclaration("var",[c.variableDeclarator(i,r)])),r=i}var o=t.generateUidIdentifier("i"),a=l.template("for-of-array",{BODY:e.body,KEY:o,ARR:r});c.inherits(a,e),c.ensureBlock(a);var s=c.memberExpression(r,o,!0),u=e.left;return c.isVariableDeclaration(u)?(u.declarations[0].init=s,a.body.body.unshift(u)):a.body.body.unshift(c.expressionStatement(c.assignmentExpression("=",u,s))),this.parentPath.isLabeledStatement()&&(a=c.labeledStatement(this.parentPath.node.label,a)),n.push(a),n}n.__esModule=!0,n._ForOfStatementArray=i;var o=e(43),a=r(o),s=e(182),l=r(s),u=e(179),c=r(u),p={ForOfStatement:function(e,t,n,r){if(this.get("right").isArrayExpression())return i.call(this,e,n,r);var o=d;r.isLoose("es6.forOf")&&(o=f);var a=o(e,t,n,r),s=a.declar,l=a.loop,u=l.body;return this.ensureBlock(),s&&u.body.push(s),u.body=u.body.concat(e.body.body),c.inherits(l,e),c.inherits(l.body,e.body),a.replaceParent?(this.parentPath.replaceWithMultiple(a.node),void this.dangerouslyRemove()):a.node}};n.visitor=p;var f=function(e,t,n,r){var i,o,s=e.left;if(c.isIdentifier(s)||c.isPattern(s)||c.isMemberExpression(s))o=s;else{if(!c.isVariableDeclaration(s))throw r.errorWithNode(s,a.get("unknownForHead",s.type));o=n.generateUidIdentifier("ref"),i=c.variableDeclaration(s.kind,[c.variableDeclarator(s.declarations[0].id,o)])}var u=n.generateUidIdentifier("iterator"),p=n.generateUidIdentifier("isArray"),f=l.template("for-of-loose",{LOOP_OBJECT:u,IS_ARRAY:p,OBJECT:e.right,INDEX:n.generateUidIdentifier("i"),ID:o});return i||f.body.body.shift(),{declar:i,node:f,loop:f}},d=function(e,t,n,r){var i,o=e.left,s=n.generateUidIdentifier("step"),u=c.memberExpression(s,c.identifier("value"));if(c.isIdentifier(o)||c.isPattern(o)||c.isMemberExpression(o))i=c.expressionStatement(c.assignmentExpression("=",o,u));else{if(!c.isVariableDeclaration(o))throw r.errorWithNode(o,a.get("unknownForHead",o.type));i=c.variableDeclaration(o.kind,[c.variableDeclarator(o.declarations[0].id,u)])}var p=n.generateUidIdentifier("iterator"),f=l.template("for-of",{ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:p,STEP_KEY:s,OBJECT:e.right,BODY:null}),d=c.isLabeledStatement(t),h=f[3].block.body,m=h[0];return d&&(h[0]=c.labeledStatement(t.label,m)),{replaceParent:d,declar:i,loop:m,node:f}}},{179:179,182:182,43:43}],97:[function(e,t,n){"use strict";n.__esModule=!0;var r={group:"builtin-pre"};n.metadata=r;var i={Literal:function(e){"number"==typeof e.value&&/^0[ob]/i.test(e.raw)&&(e.raw=void 0),"string"==typeof e.value&&/\\[u]/gi.test(e.raw)&&(e.raw=void 0)}};n.visitor=i},{}],98:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){if(e._blockHoist)for(var n=0;nm}if(d(e)){this.ensureBlock();var s={iife:!1,scope:n},u=[],p=f.identifier("arguments");p._shadowedFunctionLiteral=this;for(var m=l["default"](e),y=this.get("params"),g=0;g",y,h),u.binaryExpression("-",y,h),u.literal(0)));var b=s.template("rest",{ARRAY_TYPE:r.typeAnnotation,ARGUMENTS:l,ARRAY_KEY:g,ARRAY_LEN:v,START:h,ARRAY:a,KEY:m,LEN:y});if(d.deopted)b._blockHoist=e.params.length+1,e.body.body.unshift(b);else{b._blockHoist=1;var _,x=this.getEarliestCommonAncestorFrom(d.references).getStatementParent();x.findParent(function(e){if(e.isLoop())_=e;else if(e.isFunction())return!0}),_&&(x=_),x.insertBefore(b)}}else if(d.candidates.length)for(var E=d.candidates,w=0;w=0){var i=this.getOpposite();if(i.isLiteral()&&"symbol"!==i.node.value&&"object"!==i.node.value)return}if("typeof"===e.operator){var a=o.callExpression(r.addHelper("typeof"),[e.argument]);if(this.get("argument").isIdentifier()){var s=o.literal("undefined"),l=o.unaryExpression("typeof",e.argument);return l._ignoreSpecSymbols=!0,o.conditionalExpression(o.binaryExpression("===",l,s),s,a)}return a}}},BinaryExpression:function(e,t,n,r){return"instanceof"===e.operator?o.callExpression(r.addHelper("instanceof"),[e.left,e.right]):void 0},"VariableDeclaration|FunctionDeclaration":function(e){e._generated&&this.skip()}};n.visitor=s},{179:179}],111:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(179),o=r(i),a={optional:!0,group:"builtin-pre"};n.metadata=a;var s={TemplateLiteral:function(e,t){if(!o.isTaggedTemplateExpression(t))for(var n=0;n0){var a=v.variableDeclaration("var",o);a._blockHoist=1/0,n.unshift(a)}n.unshift(v.expressionStatement(v.assignmentExpression("=",this.getAgainId(),v.literal(!1)))),e.body=h.template("tail-call-body",{FUNCTION_ID:this.getFunctionId(),AGAIN_ID:this.getAgainId(),BLOCK:e.body});var s=[];if(this.needsThis){for(var l=this.thisPaths,u=0;u0&&e.body.body.unshift(v.variableDeclaration("var",s))}},e.prototype.subTransform=function(e){if(e){var t=this["subTransform"+e.type];return t?t.call(this,e):void 0}},e.prototype.subTransformConditionalExpression=function(e){var t=this.subTransform(e.consequent),n=this.subTransform(e.alternate);return t||n?(e.type="IfStatement",e.consequent=t?v.toBlock(t):a(e.consequent),n?e.alternate=v.isIfStatement(n)?n:v.toBlock(n):e.alternate=a(e.alternate),[e]):void 0},e.prototype.subTransformLogicalExpression=function(e){var t=this.subTransform(e.right);if(t){var n=this.getLeftId(),r=v.assignmentExpression("=",n,e.left);return"&&"===e.operator&&(r=v.unaryExpression("!",r)),[v.ifStatement(r,a(n))].concat(t)}},e.prototype.subTransformSequenceExpression=function(e){var t=e.expressions,n=this.subTransform(t[t.length-1]);return n?(1===--t.length&&(e=t[0]),[v.expressionStatement(e)].concat(n)):void 0},e.prototype.subTransformCallExpression=function(e){var t,n,r=e.callee;if(v.isMemberExpression(r,{computed:!1})&&v.isIdentifier(r.property)){switch(r.property.name){case"call":n=v.arrayExpression(e.arguments.slice(1));break;case"apply":n=e.arguments[1]||v.identifier("undefined"),this.needsArguments=!0;break;default:return}t=e.arguments[0],r=r.object}if(v.isIdentifier(r)&&this.scope.bindingIdentifierEquals(r.name,this.ownerId)&&(this.hasTailRecursion=!0,!this.hasDeopt())){var i=[];this.needsThis&&!v.isThisExpression(t)&&i.push(v.expressionStatement(v.assignmentExpression("=",this.getThisId(),t||v.identifier("undefined")))),n||(n=v.arrayExpression(e.arguments));var o=this.getArgumentsId(),a=this.getParams();if(this.needsArguments&&i.push(v.expressionStatement(v.assignmentExpression("=",o,n))),v.isArrayExpression(n)){for(var s=n.elements;s.length0){var m=f["default"](y["default"](this.vars,function(e){return e.declarations})),g=l["default"](m,function(e,t){return v.assignmentExpression("=",t.id,e)},v.identifier("undefined")),b=v.expressionStatement(g);i.push(b)}return i.push(v.continueStatement(this.getFunctionId())),i}},e}()},{179:179,182:182,406:406,414:414,415:415,43:43}],114:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return s.isLiteral(e)&&"string"==typeof e.value}function o(e,t){var n=s.binaryExpression("+",e,t);return n._templateLiteralProduced=!0,n}n.__esModule=!0;var a=e(179),s=r(a),l={group:"builtin-pre"};n.metadata=l;var u={TaggedTemplateExpression:function(e,t,n,r){for(var i=e.quasi,o=[],a=[],l=[],u=i.quasis,c=0;c1))return a[0];for(var f=o(a.shift(),a.shift()),d=a,h=0;h=1&&r.push(e),r):void 0}};n.visitor=l},{179:179}],122:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){var t=e.path.getData("functionBind");return t?t:(t=e.generateDeclaredUidIdentifier("context"),e.path.setData("functionBind",t))}function o(e,t){var n=e.object||e.callee.object;return t.isStatic(n)&&n}function a(e,t){var n=o(e,t);if(n)return n;var r=i(t);return e.object?e.callee=l.sequenceExpression([l.assignmentExpression("=",r,e.object),e.callee]):e.callee.object=l.assignmentExpression("=",r,e.callee.object),r}n.__esModule=!0;var s=e(179),l=r(s),u={optional:!0,stage:0};n.metadata=u;var c={CallExpression:function(e,t,n){var r=e.callee;if(l.isBindExpression(r)){var i=a(r,n);e.callee=l.memberExpression(r.callee,l.identifier("call")),e.arguments.unshift(i)}},BindExpression:function(e,t,n){var r=a(e,n);return l.callExpression(l.memberExpression(e.callee,l.identifier("bind")),[r])}};n.visitor=c},{179:179}],123:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(179),o=r(i),a={stage:2,dependencies:["es6.destructuring"]};n.metadata=a;var s=function(e){for(var t=0;t=t.stage?!0:void 0}function l(e,t){return e.metadata.optional&&!c["default"](t.optional,e.key)?!1:void 0}n.__esModule=!0,n.internal=i,n.blacklist=o,n.whitelist=a,n.stage=s,n.optional=l;var u=e(413),c=r(u)},{413:413}],126:[function(e,t,n){"use strict";n.__esModule=!0,n["default"]={"minification.constantFolding":e(183),strict:e(142),eval:e(185),_validation:e(132),_hoistDirectives:e(128),"minification.removeDebugger":e(194),"minification.removeConsole":e(193),"utility.inlineEnvironmentVariables":e(186),"minification.deadCodeElimination":e(184),_modules:e(130),"react.displayName":e(192),"es6.spec.modules":e(109),"es6.spec.arrowFunctions":e(107),"es6.spec.templateLiterals":e(111),"es6.templateLiterals":e(114),"es6.literals":e(97),"validation.undeclaredVariableCheck":e(197),"spec.functionName":e(144),"es7.classProperties":e(116),"es7.trailingFunctionCommas":e(124),"es7.asyncFunctions":e(115),"es7.decorators":e(118),"validation.react":e(145),"es6.arrowFunctions":e(89),"spec.blockScopedFunctions":e(143),"optimisation.react.constantElements":e(191),"optimisation.react.inlineElements":e(135),"es7.comprehensions":e(117),"es6.classes":e(91),asyncToGenerator:e(136),bluebirdCoroutines:e(137),"es6.objectSuper":e(99),"es7.objectRestSpread":e(123),"es7.exponentiationOperator":e(120),"es5.properties.mutators":e(88),"es6.properties.shorthand":e(104),"es6.properties.computed":e(103),"optimisation.flow.forOf":e(133),"es6.forOf":e(96),"es6.regex.sticky":e(105),"es6.regex.unicode":e(106),"es6.constants":e(94),"es7.exportExtensions":e(121),"spec.protoToAssign":e(190),"es7.doExpressions":e(119),"es6.spec.symbols":e(110),"es7.functionBind":e(122),"spec.undefinedToVoid":e(199),"es6.spread":e(112),"es6.parameters":e(101),"es6.destructuring":e(95),"es6.blockScoping":e(90),"es6.spec.blockScoping":e(108),reactCompat:e(139),react:e(140),regenerator:e(141),runtime:e(196),"es6.modules":e(98),_moduleFormatter:e(129),"es6.tailCall":e(113),_shadowFunctions:e(131),"es3.propertyLiterals":e(87),"es3.memberExpressionLiterals":e(86),"minification.memberExpressionLiterals":e(188),"minification.propertyLiterals":e(189),_blockHoist:e(127),jscript:e(187),flow:e(138),"optimisation.modules.system":e(134)},t.exports=n["default"]},{101:101,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,127:127,128:128,129:129,130:130,131:131,132:132,133:133,134:134,135:135,136:136,137:137,138:138,139:139,140:140,141:141,142:142,143:143,144:144,145:145,183:183,184:184,185:185,186:186,187:187,188:188,189:189,190:190,191:191,192:192,193:193,194:194,196:196,197:197,199:199,86:86,87:87,88:88,89:89,90:90,91:91,94:94,95:95,96:96,97:97,98:98,99:99}],127:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var i=e(417),o=r(i),a={group:"builtin-trailing"};n.metadata=a;var s={Block:{exit:function(e){for(var t=!1,n=0;n=0&&(a.value=a.value.replace(s,""),a.value.replace(/\*/g,"").trim()||(a._displayed=!0))}},Flow:function(){this.dangerouslyRemove()},ClassProperty:function(e){e.typeAnnotation=null,e.value||this.dangerouslyRemove()},Class:function(e){e["implements"]=null},Function:function(e){for(var t=0;t0;)a=a.get(n.pop());return a}n.__esModule=!0;var a=e(535),s=i(a),l=e(179),u=r(l),c=s["default"].types.NodePath,p={group:"builtin-advanced"};n.metadata=p;var f={Function:{exit:function(e){(e.async||e.generator)&&s["default"].transform(o(this))}}};n.visitor=f},{179:179,535:535}],142:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]); -return t["default"]=e,t}function i(e){return a.isLiteral(e)?e.raw&&e.rawValue===e.value?"use strict"===e.rawValue:"use strict"===e.value:!1}n.__esModule=!0;var o=e(179),a=r(o),s={group:"builtin-pre"};n.metadata=s;var l=["FunctionExpression","FunctionDeclaration","ClassProperty"],u={Program:{enter:function(e){var t,n=e.body[0];a.isExpressionStatement(n)&&i(n.expression)?t=n:(t=a.expressionStatement(a.literal("use strict")),this.unshiftContainer("body",t),n&&(t.leadingComments=n.leadingComments,n.leadingComments=[])),t._blockHoist=1/0}},ThisExpression:function(){return this.findParent(function(e){return!e.is("shadow")&&l.indexOf(e.type)>=0})?void 0:a.identifier("undefined")}};n.visitor=u},{179:179}],143:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){for(var n=t.get(e),r=0;r=0)&&(r.push(c.node),c.visit())){o=!0;break}}for(var p=i,f=0;fc&&(r=l)}else r=l}return r})}function u(e,t){var n=this;if(!e.length)return this;if(1===e.length)return e[0];var r,i,o=1/0,a=e.map(function(e){var t=[];do t.unshift(e);while((e=e.parentPath)&&e!==n);return t.lengthl;l++){for(var u=s[l],c=a,p=0;p-1}function a(){if(this.isBlacklisted())return!1;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return!1;if(this.call("enter"),this.shouldSkip)return this.shouldStop;var e=this.node,t=this.opts;if(e)if(Array.isArray(e))for(var n=0;ny;case">":return y>v;case"<=":return v>=y;case">=":return y>=v;case"==":return y==v;case"!=":return y!=v;case"===":return y===v;case"!==":return y!==v;case"|":return y|v;case"&":return y&v;case"^":return y^v;case"<<":return y<>":return y>>v;case">>>":return y>>>v}}if(r.isCallExpression()){var x,E,w=r.get("callee");if(w.isIdentifier()&&!r.scope.getBinding(w.node.name,!0)&&i.indexOf(w.node.name)>=0&&(E=e[o.callee.name]),w.isMemberExpression()){var l=w.get("object"),C=w.get("property");if(l.isIdentifier()&&C.isIdentifier()&&i.indexOf(l.node.name)>=0&&(x=e[l.node.name],E=x[C.node.name]),l.isLiteral()&&C.isIdentifier()){var c=typeof l.node.value;("string"===c||"number"===c)&&(x=l.node.value,E=x[C.node.name])}}if(E){var S=r.get("arguments").map(t);if(!n)return;return E.apply(x,S)}}n=!1}}var n=!0,r=t(this);return n||(r=void 0),{confident:n,value:r}}r.__esModule=!0,r.evaluateTruthy=t,r.evaluate=n;var i=["String","Number","Math"]}).call(this,"undefined"!=typeof t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],154:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function a(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function s(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function l(e){return h["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function u(e,t){t===!0&&(t=this.context);var n=e.split(".");return 1===n.length?this._getKey(e,t):this._getPattern(n,t)}function c(e,t){var n=this,r=this.node,i=r[e];return Array.isArray(i)?i.map(function(o,a){return h["default"].get({listKey:e,parentPath:n,parent:r,container:i,key:a}).setContext(t)}):h["default"].get({parentPath:this,parent:r,container:r,key:e}).setContext(t)}function p(e,t){for(var n=this,r=e,i=0;i=0)&&(f.push(y),a.push(m),y===e.scope)){a=[m];break}}a=a.concat(i);for(var g=a,v=0;v=0?c.numberTypeAnnotation():void 0;if("==="===r){var a,s;if(o.isUnaryExpression({operator:"typeof"})?(a=o,s=i):i.isUnaryExpression({operator:"typeof"})&&(a=i,s=o),(s||a)&&(s=s.resolve(),s.isLiteral())){var l=s.node.value;if("string"==typeof l&&a.get("argument").isIdentifier({name:e}))return c.createTypeAnnotationBasedOnTypeof(s.node.value)}}}function s(e){for(var t;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function l(e,t){var n=s(e);if(n){var r=n.get("test"),i=[r],o=[];do{var u=i.shift().resolve();if(u.isLogicalExpression()&&(i.push(u.get("left")),i.push(u.get("right"))),u.isBinaryExpression()){var p=a(t,u);p&&o.push(p)}}while(i.length);return o.length?{typeAnnotation:c.createUnionTypeAnnotation(o),ifStatement:n}:l(n,t)}}n.__esModule=!0;var u=e(179),c=r(u);n["default"]=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:i(this,e.name):"undefined"===e.name?c.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?c.numberTypeAnnotation():void("arguments"===e.name)}},t.exports=n["default"]},{179:179}],158:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e["default"]:e}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(){var e=this.get("id");return e.isIdentifier()?this.get("init").getTypeAnnotation():void 0}function a(e){return e.typeAnnotation}function s(e){return this.get("callee").isIdentifier()?S.genericTypeAnnotation(e.callee):void 0}function l(){return S.stringTypeAnnotation()}function u(e){var t=e.operator;return"void"===t?S.voidTypeAnnotation():S.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?S.numberTypeAnnotation():S.STRING_UNARY_OPERATORS.indexOf(t)>=0?S.stringTypeAnnotation():S.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?S.booleanTypeAnnotation():void 0}function c(e){var t=e.operator;if(S.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return S.numberTypeAnnotation();if(S.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return S.booleanTypeAnnotation();if("+"===t){var n=this.get("right"),r=this.get("left");return r.isBaseType("number")&&n.isBaseType("number")?S.numberTypeAnnotation():r.isBaseType("string")||n.isBaseType("string")?S.stringTypeAnnotation():S.unionTypeAnnotation([S.stringTypeAnnotation(),S.numberTypeAnnotation()])}}function p(){return S.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function f(){return S.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function d(){return this.get("expressions").pop().getTypeAnnotation()}function h(){return this.get("right").getTypeAnnotation()}function m(e){var t=e.operator;return"++"===t||"--"===t?S.numberTypeAnnotation():void 0}function y(e){var t=e.value;return"string"==typeof t?S.stringTypeAnnotation():"number"==typeof t?S.numberTypeAnnotation():"boolean"==typeof t?S.booleanTypeAnnotation():null===t?S.voidTypeAnnotation():e.regex?S.genericTypeAnnotation(S.identifier("RegExp")):void 0}function g(){return S.genericTypeAnnotation(S.identifier("Object"))}function v(){return S.genericTypeAnnotation(S.identifier("Array"))}function b(){return v()}function _(){return S.genericTypeAnnotation(S.identifier("Function"))}function x(){return w(this.get("callee"))}function E(){return w(this.get("tag"))}function w(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?S.genericTypeAnnotation(S.identifier("AsyncIterator")):S.genericTypeAnnotation(S.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}n.__esModule=!0,n.VariableDeclarator=o,n.TypeCastExpression=a,n.NewExpression=s,n.TemplateLiteral=l,n.UnaryExpression=u,n.BinaryExpression=c,n.LogicalExpression=p,n.ConditionalExpression=f,n.SequenceExpression=d,n.AssignmentExpression=h,n.UpdateExpression=m,n.Literal=y,n.ObjectExpression=g,n.ArrayExpression=v,n.RestElement=b,n.CallExpression=x,n.TaggedTemplateExpression=E;var C=e(179),S=i(C),k=e(157);n.Identifier=r(k),a.validParent=!0,b.validParent=!0,n.Function=_,n.Class=_},{157:157,179:179}],159:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){function n(e){var t=r[o];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var r=e.split("."),i=[this.node],o=0;i.length;){var a=i.shift();if(t&&o===r.length)return!0;if(w.isIdentifier(a)){if(!n(a.name))return!1}else if(w.isLiteral(a)){if(!n(a.value))return!1}else{if(w.isMemberExpression(a)){if(a.computed&&!w.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!w.isThisExpression(a))return!1;if(!n("this"))return!1}if(++o>r.length)return!1}return o===r.length}function a(e){var t=this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function s(e){return!this.has(e)}function l(e,t){return this.node[e]===t}function u(e){return w.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function p(e){return"body"===this.key&&this.parentPath.isArrowFunctionExpression()?this.isExpression()?w.isBlockStatement(e):this.isBlockStatement()?w.isExpression(e):!1:!1}function f(e){var t=this,n=!0;do{var r=t.container;if(t.isFunction()&&!n)return!!e;if(n=!1,Array.isArray(r)&&t.key!==r.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function d(){return this.parentPath.isLabeledStatement()||w.isBlockStatement(this.container)?!1:x["default"](w.STATEMENT_OR_BLOCK_KEYS,this.key)}function h(e,t){if(!this.isReferencedIdentifier())return!1;var n=this.scope.getBinding(this.node.name);if(!n||"module"!==n.kind)return!1;var r=n.path,i=r.parentPath;return i.isImportDeclaration()?i.node.source.value!==e?!1:t?r.isImportDefaultSpecifier()&&"default"===t?!0:r.isImportNamespaceSpecifier()&&"*"===t?!0:r.isImportSpecifier()&&r.node.imported.name===t?!0:!1:!0:!1}function m(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function y(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),n=this.scope.getFunctionParent();if(t!==n)return"function";var r,i,o,a=e.getAncestry(),s=this.getAncestry();for(o=0;o=0){r=l;break}}if(!r)return"before";var u=a[i-1],c=s[o-1];if(!u||!c)return"before";if(u.listKey&&u.container===c.container)return u.key>c.key?"before":"after";var p=w.VISITOR_KEYS[u.type].indexOf(u.key),f=w.VISITOR_KEYS[c.type].indexOf(c.key);return p>f?"before":"after"}function v(e,t){return this._resolve(e,t)||this}function b(e,t){if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this)return n.path.resolve(e,t)}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var r=this.toComputedKey();if(!w.isLiteral(r))return;var i=r.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var a=o.get("properties"),s=a,l=0;l=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeStatementParent()}return t.path.isProgram()?this.getNextScopeStatementParent():void 0}},e.prototype.getNextScopeStatementParent=function(){var e=this.scopes.pop();return e?e.path.getStatementParent():void 0},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var n=this.bindings[t];if("param"===n.kind)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(u,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var n=t.scope.generateUidIdentifier("ref");t.insertBefore([l.variableDeclaration("var",[l.variableDeclarator(n,this.path.node)])]);var r=this.path.parentPath;r.isJSXElement()&&this.path.container===r.node.children&&(n=l.JSXExpressionContainer(n)), -this.path.replaceWith(n)}}},e}();n["default"]=c,t.exports=n["default"]},{179:179,62:62}],161:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(179),o=r(i),a=[function(e){return"body"===e.key&&(e.isBlockStatement()||e.isClassBody())?(e.node.body=[],!0):void 0},function(e,t){var n=!1;return n=n||"body"===e.key&&t.isArrowFunctionExpression(),n=n||"argument"===e.key&&t.isThrowStatement(),n?(e.replaceWith(o.identifier("undefined")),!0):void 0}];n.pre=a;var s=[function(e,t){var n=!1;return n=n||"test"===e.key&&(t.isWhile()||t.isSwitchCase()),n=n||"declaration"===e.key&&t.isExportDeclaration(),n=n||"body"===e.key&&t.isLabeledStatement(),n=n||"declarations"===e.listKey&&t.isVariableDeclaration()&&0===t.node.declarations.length,n=n||"expression"===e.key&&t.isExpressionStatement(),n=n||"test"===e.key&&t.isIfStatement(),n?(t.dangerouslyRemove(),!0):void 0},function(e,t){return t.isSequenceExpression()&&1===t.node.expressions.length?(t.replaceWith(t.node.expressions[0]),!0):void 0},function(e,t){return t.isBinary()?("left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0):void 0}];n.post=s},{179:179}],162:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}n.__esModule=!0;var i=e(62),o=r(i),a=e(179),s=r(a),l={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var n=e.node,r=e.parent;if(!s.isIdentifier(n,t)){if(!s.isJSXIdentifier(n,t))return!1;if(o.isCompatTag(n.name))return!1}return s.isReferenced(n,r)}};n.ReferencedIdentifier=l;var u={types:["Identifier"],checkPath:function(e){var t=e.node,n=e.parent;return s.isBinding(t,n)}};n.BindingIdentifier=u;var c={types:["Statement"],checkPath:function(e){var t=e.node,n=e.parent;if(s.isStatement(t)){if(s.isVariableDeclaration(t)){if(s.isForXStatement(n,{left:t}))return!1;if(s.isForStatement(n,{init:t}))return!1}return!0}return!1}};n.Statement=c;var p={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():s.isExpression(e.node)}};n.Expression=p;var f={types:["Scopable"],checkPath:function(e){return s.isScope(e.node,e.parent)}};n.Scope=f;var d={checkPath:function(e){return s.isReferenced(e.node,e.parent)}};n.Referenced=d;var h={checkPath:function(e){return s.isBlockScoped(e.node)}};n.BlockScoped=h;var m={types:["VariableDeclaration"],checkPath:function(e){return s.isVar(e.node)}};n.Var=m;var y={types:["Literal"],checkPath:function(e){return e.isLiteral()&&e.parentPath.isExpressionStatement()}};n.DirectiveLiteral=y;var g={types:["ExpressionStatement"],checkPath:function(e){return e.get("expression").isLiteral()}};n.Directive=g;var v={checkPath:function(e){return e.node&&!!e.node.loc}};n.User=v;var b={checkPath:function(e){return!e.isUser()}};n.Generated=b;var _={types:["Flow","ImportDeclaration","ExportDeclaration"],checkPath:function(e){var t=e.node;return s.isFlow(t)?!0:s.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:s.isExportDeclaration(t)?"type"===t.exportKind:!1}};n.Flow=_},{179:179,62:62}],163:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this.node=this.container[this.key]=x.blockStatement(e)}return[this]}function a(e,t){this.updateSiblingKeys(e,t.length);for(var n=[],r=0;r=e&&(i.key+=t)}}function f(e){e.constructor!==Array&&(e=[e]);for(var t=0;t1&&(n+=t),"_"+n},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var n=e;A.isAssignmentExpression(e)?n=e.left:A.isVariableDeclarator(e)?n=e.id:A.isProperty(n)&&(n=n.key);var r=[],i=function a(e){if(A.isModuleDeclaration(e))if(e.source)a(e.source);else if(e.specifiers&&e.specifiers.length)for(var t=e.specifiers,n=0;n=f.length)break;m=f[h++]}else{if(h=f.next(),h.done)break;m=h.value}var y=m,g=y.getBindingIdentifiers(),v=void 0;for(var b in g)y.scope.getBinding(b)||(v=v||y.scope.getProgramParent(),v.addGlobal(g[b]));y.scope.registerConstantViolation(y)}for(var _=p.references,x=Array.isArray(_),E=0,_=x?_:_[Symbol.iterator]();;){var w;if(x){if(E>=_.length)break;w=_[E++]}else{if(E=_.next(),E.done)break;w=E.value}var S=w,D=S.scope.getBinding(S.node.name);D?D.reference(S):S.scope.getProgramParent().addGlobal(S.node)}for(var T=p.constantViolations,I=Array.isArray(T),O=0,T=I?T:T[Symbol.iterator]();;){var M;if(I){if(O>=T.length)break;M=T[O++]}else{if(O=T.next(),O.done)break;M=O.value}var F=M;F.scope.registerConstantViolation(F)}}},e.prototype.push=function(e){var t=this.path;t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(A.ensureBlock(t.node),t=t.get("body")),t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path);var n=e.unique,r=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,o="declaration:"+r+":"+i,a=!n&&t.getData(o);if(!a){var s=A.variableDeclaration(r,[]);s._generated=!0,s._blockHoist=i,this.hub.file.attachAuxiliaryComment(s);var l=t.unshiftContainer("body",[s]);a=l[0],n||t.setData(o,a)}var u=A.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(r,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do if(e.path.isProgram())return e;while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do if(e.path.isFunctionParent())return e;while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do if(e.path.isBlockParent())return e;while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=k["default"](),t=this;do h["default"](e,t.bindings),t=t.parent;while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=k["default"](),t=arguments,n=0;n=0)){if(l.isAnyTypeAnnotation(s))return[s];if(l.isFlowBaseAnnotation(s))n[s.type]=s;else if(l.isUnionTypeAnnotation(s))r.indexOf(s.types)<0&&(e=e.concat(s.types),r.push(s.types));else if(l.isGenericTypeAnnotation(s)){var u=s.id.name;if(t[u]){var c=t[u];c.typeParameters?s.typeParameters&&(c.typeParameters.params=o(c.typeParameters.params.concat(s.typeParameters.params))):c=s.typeParameters}else t[u]=s}else i.push(s)}}for(var p in n)i.push(n[p]);for(var f in t)i.push(t[f]);return i}function a(e){if("string"===e)return l.stringTypeAnnotation();if("number"===e)return l.numberTypeAnnotation();if("undefined"===e)return l.voidTypeAnnotation();if("boolean"===e)return l.booleanTypeAnnotation();if("function"===e)return l.genericTypeAnnotation(l.identifier("Function"));if("object"===e)return l.genericTypeAnnotation(l.identifier("Object"));if("symbol"===e)return l.genericTypeAnnotation(l.identifier("Symbol"));throw new Error("Invalid typeof value")}n.__esModule=!0,n.createUnionTypeAnnotation=i,n.removeTypeDuplicates=o,n.createTypeAnnotationBasedOnTypeof=a;var s=e(179),l=r(s)},{179:179}],179:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n=O["is"+e]=function(n,r){return O.is(e,n,r,t)};O["assert"+e]=function(t,r){if(r=r||{},!n(t,r))throw new Error("Expected type "+JSON.stringify(e)+" with option "+JSON.stringify(r))}}function o(e,t,n,r){if(!t)return!1;var i=a(t.type,e);return i?"undefined"==typeof n?!0:O.shallowEqual(t,n):!1}function a(e,t){if(e===t)return!0;var n=O.FLIPPED_ALIAS_KEYS[t];if(n){if(n[0]===e)return!0;for(var r=n,i=0;in.length)return!1}return!0}}function h(e){for(var t=L,n=0;n","<",">=","<="];n.BOOLEAN_NUMBER_BINARY_OPERATORS=B;var R=["==","===","!=","!=="];n.EQUALITY_BINARY_OPERATORS=R;var U=R.concat(["in","instanceof"]);n.COMPARISON_BINARY_OPERATORS=U;var V=[].concat(U,B);n.BOOLEAN_BINARY_OPERATORS=V;var W=["-","/","*","**","&","|",">>",">>>","<<","^"];n.NUMBER_BINARY_OPERATORS=W;var q=["delete","!"];n.BOOLEAN_UNARY_OPERATORS=q;var H=["+","-","++","--","~"];n.NUMBER_UNARY_OPERATORS=H;var z=["typeof"];n.STRING_UNARY_OPERATORS=z,n.VISITOR_KEYS=I.VISITOR_KEYS,n.BUILDER_KEYS=I.BUILDER_KEYS,n.ALIAS_KEYS=I.ALIAS_KEYS,A["default"](O.VISITOR_KEYS,function(e,t){i(t,!0)}),O.FLIPPED_ALIAS_KEYS={},A["default"](O.ALIAS_KEYS,function(e,t){A["default"](e,function(e){var n=O.FLIPPED_ALIAS_KEYS[e]=O.FLIPPED_ALIAS_KEYS[e]||[];n.push(t)})}),A["default"](O.FLIPPED_ALIAS_KEYS,function(e,t){O[t.toUpperCase()+"_TYPES"]=e,i(t,!1)});var G=Object.keys(O.VISITOR_KEYS).concat(Object.keys(O.FLIPPED_ALIAS_KEYS));n.TYPES=G,A["default"](O.VISITOR_KEYS,function(e,t){if(!O.BUILDER_KEYS[t]){var n={};A["default"](e,function(e){n[e]=null}),O.BUILDER_KEYS[t]=n}}),A["default"](O.BUILDER_KEYS,function(e,t){var n=function(){var n={};n.type=t;var r=0;for(var i in e){var o=arguments[r++];void 0===o&&(o=e[i]),n[i]=o}return n};O[t]=n,O[t[0].toLowerCase()+t.slice(1)]=n}),E["default"](O),E["default"](O.VISITOR_KEYS),k["default"](O,e(180)),k["default"](O,e(181)),k["default"](O,e(169)),k["default"](O,e(178))},{169:169,174:174,175:175,178:178,180:180,181:181,405:405,409:409,411:411,509:509,600:600}],180:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){for(var n=[].concat(e),r=Object.create(null);n.length;){var i=n.shift();if(i){var o=a.getBindingIdentifiers.keys[i.type];if(a.isIdentifier(i))if(t){var s=r[i.name]=r[i.name]||[];s.push(i)}else r[i.name]=i;else if(a.isExportDeclaration(i))a.isDeclaration(e.declaration)&&n.push(e.declaration);else if(o)for(var l=0;l=0)return!0}else if(o===e)return!0}return!1}function a(e,t){switch(t.type){case"MemberExpression":case"JSXMemberExpression":return t.property===e&&t.computed?!0:t.object===e?!0:!1;case"MetaProperty":return!1;case"Property":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var n=t.params,r=0;r1)return i.body;var o=i.body[0];return!r&&G.isExpressionStatement(o)?o.expression:o}function d(e,t){var n=B["default"](t,{filename:e,looseModules:!0}).program;return n=T["default"].removeProperties(n)}function h(){var e={},n=U["default"].join(t,"transformation/templates");if(!J["default"].sync(n))throw new ReferenceError(C.get("missingTemplatesDirectory"));for(var r=H["default"].readdirSync(n),i=0;i1)&&i.constant&&"param"!==i.kind&&"module"!==i.kind){var o=i.path.node;if(r.isVariableDeclarator(o)&&(o=o.init),o&&n.isPure(o,!0)&&(!r.isClass(o)&&!r.isFunction(o)||i.path.scope.parent===n)&&!this.findParent(function(e){return e.node===o}))return r.toExpression(o),n.removeBinding(e.name),i.path.dangerouslyRemove(),o}},"ClassDeclaration|FunctionDeclaration":function(e,t,n){var r=n.getBinding(e.id.name);r&&!r.referenced&&this.dangerouslyRemove()},VariableDeclarator:function(e,t,n){r.isIdentifier(e.id)&&n.isPure(e.init,!0)&&i["ClassDeclaration|FunctionDeclaration"].apply(this,arguments)},ConditionalExpression:function(e){var t=this.get("test").evaluateTruthy();return t===!0?e.consequent:t===!1?e.alternate:void 0},BlockStatement:function(){for(var e=this.get("body"),t=!1,n=0;n=c||c>3||l>=c||(a=u,l=c)}var p;throw p=a?n.get("undeclaredVariableSuggestion",e.name,a):n.get("undeclaredVariable",e.name),this.errorWithNode(p,ReferenceError)}}}})},t.exports=n["default"]},{198:198}],198:[function(e,t,n){"use strict";var r=[],i=[];t.exports=function(e,t){if(e===t)return 0;var n=e.length,o=t.length;if(0===n)return o;if(0===o)return n;for(var a,s,l,u,c=0,p=0;n>c;)i[c]=e.charCodeAt(c),r[c]=++c;for(;o>p;)for(a=t.charCodeAt(p),l=p++,s=p,c=0;n>c;c++)u=a===i[c]?l:l+1,l=r[c],s=r[c]=l>s?u>s?s+1:u:u>l?l+1:u;return s}},{}],199:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=function(e){var t=e.Plugin,n=e.types;return new t("undefined-to-void",{metadata:{group:"builtin-basic"},visitor:{ReferencedIdentifier:function(e,t){return"undefined"===e.name?n.unaryExpression("void",n.literal(0),!0):void 0}}})},t.exports=n["default"]},{}],200:[function(e,t,n){(function(n){"use strict";function r(e){this.enabled=e&&void 0!==e.enabled?e.enabled:p}function i(e){var t=function(){return o.apply(t,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=m,t}function o(){var e=arguments,t=e.length,n=0!==t&&String(arguments[0]);if(t>1)for(var r=1;t>r;r++)n+=" "+e[r];if(!this.enabled||!n)return n;var i=this._styles,o=i.length,a=l.dim.open;for(!d||-1===i.indexOf("gray")&&-1===i.indexOf("grey")||(l.dim.open="");o--;){var s=l[i[o]];n=s.open+n.replace(s.closeRe,s.open)+s.close}return l.dim.open=a,n}function a(){var e={};return Object.keys(h).forEach(function(t){e[t]={get:function(){return i.call(this,[t])}}}),e}var s=e(202),l=e(201),u=e(205),c=e(203),p=e(207),f=Object.defineProperties,d="win32"===n.platform&&!/^xterm/i.test(n.env.TERM);d&&(l.blue.open="");var h=function(){var e={};return Object.keys(l).forEach(function(t){l[t].closeRe=new RegExp(s(l[t].close),"g"),e[t]={get:function(){return i.call(this,this._styles.concat(t))}}}),e}(),m=f(function(){},h);f(r.prototype,a()),t.exports=new r,t.exports.styles=l,t.exports.hasColor=c,t.exports.stripColor=u,t.exports.supportsColor=p}).call(this,e(10))},{10:10,201:201,202:202,203:203,205:205,207:207}],201:[function(e,t,n){"use strict";function r(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var n=e[t];Object.keys(n).forEach(function(t){var r=n[t];e[t]=n[t]={open:"["+r[0]+"m",close:"["+r[1]+"m"}}),Object.defineProperty(e,t,{value:n,enumerable:!1})}),e}Object.defineProperty(t,"exports",{enumerable:!0,get:r})},{}],202:[function(e,t,n){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},{}],203:[function(e,t,n){"use strict";var r=e(204),i=new RegExp(r().source);t.exports=i.test.bind(i)},{204:204}],204:[function(e,t,n){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},{}],205:[function(e,t,n){"use strict";var r=e(206)();t.exports=function(e){return"string"==typeof e?e.replace(r,""):e}},{206:206}],206:[function(e,t,n){arguments[4][204][0].apply(n,arguments)},{204:204}],207:[function(e,t,n){(function(e){"use strict";var n=e.argv,r=n.indexOf("--"),i=function(e){e="--"+e;var t=n.indexOf(e);return-1!==t&&(-1!==r?r>t:!0)};t.exports=function(){return"FORCE_COLOR"in e.env?!0:i("no-color")||i("no-colors")||i("color=false")?!1:i("color")||i("colors")||i("color=true")||i("color=always")?!0:e.stdout&&!e.stdout.isTTY?!1:"win32"===e.platform?!0:"COLORTERM"in e.env?!0:"dumb"===e.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM)?!0:!1}()}).call(this,e(10))},{10:10}],208:[function(e,t,n){(function(t){"use strict";function r(e){return new t(e,"base64").toString()}function i(e){return e.split(",").pop()}function o(e,t){var n=p.exec(e);p.lastIndex=0;var r=n[1]||n[2],i=u.join(t,r);try{return l.readFileSync(i,"utf8")}catch(o){throw new Error("An error occurred while trying to read the map file at "+i+"\n"+o)}}function a(e,t){t=t||{},t.isFileComment&&(e=o(e,t.commentFileDir)),t.hasComment&&(e=i(e)),t.isEncoded&&(e=r(e)),(t.isJSON||t.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}function s(e){for(var t,r=e.split("\n"),i=r.length-1;i>0;i--)if(t=r[i],~t.indexOf("sourceMappingURL=data:"))return n.fromComment(t)}var l=e(1),u=e(9),c=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm,p=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;a.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},a.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},a.prototype.toComment=function(e){var t=this.toBase64(),n="sourceMappingURL=data:application/json;base64,"+t;return e&&e.multiline?"/*# "+n+" */":"//# "+n},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},a.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},a.prototype.getProperty=function(e){return this.sourcemap[e]},n.fromObject=function(e){return new a(e)},n.fromJSON=function(e){return new a(e,{isJSON:!0})},n.fromBase64=function(e){return new a(e,{isEncoded:!0})},n.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(e,{isEncoded:!0,hasComment:!0})},n.fromMapFileComment=function(e,t){return new a(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},n.fromSource=function(e,t){if(t)return s(e);var r=e.match(c);return c.lastIndex=0,r?n.fromComment(r.pop()):null},n.fromMapFileSource=function(e,t){var r=e.match(p);return p.lastIndex=0,r?n.fromMapFileComment(r.pop(),t):null},n.removeComments=function(e){return c.lastIndex=0,e.replace(c,"")},n.removeMapFileComments=function(e){return p.lastIndex=0,e.replace(p,"")},Object.defineProperty(n,"commentRegex",{get:function(){return c.lastIndex=0,c}}),Object.defineProperty(n,"mapFileCommentRegex",{get:function(){return p.lastIndex=0,p}})}).call(this,e(3).Buffer)},{1:1,3:3,9:9}],209:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],210:[function(e,t,n){var r=e(240);t.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},{240:240}],211:[function(e,t,n){var r=e(277),i=e(278),o=e(275);t.exports=function(e){return function(t,n,a){var s,l=r(t),u=i(l.length),c=o(a,u);if(e&&n!=n){for(;u>c;)if(s=l[c++],s!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c;return!e&&-1}}},{275:275,277:277,278:278}],212:[function(e,t,n){var r=e(221),i=e(237),o=e(279),a=e(278);t.exports=function(e){var t=1==e,n=2==e,s=3==e,l=4==e,u=6==e,c=5==e||u;return function(p,f,d){for(var h,m,y=o(p),g=i(y),v=r(f,d,3),b=a(g.length),_=0,x=t?Array(b):n?[]:void 0;b>_;_++)if((c||_ in g)&&(h=g[_],m=v(h,_,y),e))if(t)x[_]=m;else if(m)switch(e){case 3:return!0;case 5:return h;case 6:return _;case 2:x.push(h)}else if(l)return!1;return u?-1:s||l?l:x}}},{221:221,237:237,278:278,279:279}],213:[function(e,t,n){var r=e(279),i=e(237),o=e(225);t.exports=e(227)(function(){return Symbol()in Object.assign({})})?function(e,t){for(var n=r(e),a=arguments.length,s=1;a>s;)for(var l,u=i(arguments[s++]),c=o(u),p=c.length,f=0;p>f;)n[l=c[f++]]=u[l];return n}:Object.assign},{225:225,227:227,237:237,279:279}],214:[function(e,t,n){var r=e(215),i=e(282)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=(t=Object(e))[i])?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},{215:215,282:282}],215:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],216:[function(e,t,n){"use strict";var r=e(247),i=e(234),o=e(221),a=e(265),s=e(266),l=e(223),u=e(230),c=e(245),p=e(280)("id"),f=e(233),d=e(240),h=Object.isExtensible||d,m=e(272),y=m?"_s":"size",g=0,v=function(e,t){if(!d(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!f(e,p)){if(!h(e))return"F";if(!t)return"E";i(e,p,++g)}return"O"+e[p]},b=function(e,t){var n,r=v(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};t.exports={getConstructor:function(t,n,i,a){var c=t(function(e,t){s(e,c,n),e._i=r.create(null),e._f=void 0,e._l=void 0,e[y]=0,void 0!=t&&u(t,i,e[a],e)});return e(252)(c.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[y]=0},"delete":function(e){var t=this,n=b(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[y]--}return!!n},forEach:function(e){for(var t,n=o(e,arguments[1],3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!b(this,e)}}),m&&r.setDesc(c.prototype,"size",{get:function(){return l(this[y])}}),c},def:function(e,t,n){var r,i,o=b(e,t);return o?o.v=n:(e._l=o={i:i=v(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[y]++,"F"!==i&&(e._i[i]=o)),e},getEntry:b,setStrong:function(t,n,r){e(243)(t,n,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?c(0,n.k):"values"==t?c(0,n.v):c(0,[n.k,n.v]):(e._t=void 0,c(1))},r?"entries":"values",!r,!0),a(t),a(e(220)[n])}}},{220:220,221:221,223:223,230:230,233:233,234:234,240:240,243:243,245:245,247:247,252:252,265:265,266:266,272:272,280:280}],217:[function(e,t,n){var r=e(230),i=e(214);t.exports=function(e){return function(){if(i(this)!=e)throw TypeError(e+"#toJSON isn't generic");var t=[];return r(this,!1,t.push,t),t}}},{214:214,230:230}],218:[function(e,t,n){"use strict";var r=e(234),i=e(210),o=e(266),a=e(230),s=e(212),l=e(280)("weak"),u=e(240),c=e(233),p=Object.isExtensible||u,f=s(5),d=s(6),h=0,m=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return f(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=g(this,e);return t?t[1]:void 0},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(t,n,r,i){var s=t(function(e,t){o(e,s,n),e._i=h++,e._l=void 0,void 0!=t&&a(t,r,e[i],e)});return e(252)(s.prototype,{"delete":function(e){return u(e)?p(e)?c(e,l)&&c(e[l],this._i)&&delete e[l][this._i]:m(this)["delete"](e):!1},has:function(e){return u(e)?p(e)?c(e,l)&&c(e[l],this._i):m(this).has(e):!1}}),s},def:function(e,t,n){return p(i(t))?(c(t,l)||r(t,l,{}),t[l][e._i]=n):m(e).set(t,n),e},frozenStore:m,WEAK:l}},{210:210,212:212,230:230,233:233,234:234,240:240,252:252,266:266,280:280}],219:[function(e,t,n){"use strict";var r=e(232),i=e(222),o=e(230),a=e(266);t.exports=function(t,n,s,l,u,c){var p=r[t],f=p,d=u?"set":"add",h=f&&f.prototype,m={},y=function(t){var n=h[t];e(259)(h,t,"delete"==t?function(e){return n.call(this,0===e?0:e)}:"has"==t?function(e){return n.call(this,0===e?0:e)}:"get"==t?function(e){return n.call(this,0===e?0:e)}:"add"==t?function(e){return n.call(this,0===e?0:e),this}:function(e,t){return n.call(this,0===e?0:e,t),this})};if("function"==typeof f&&(c||h.forEach&&!e(227)(function(){(new f).entries().next()}))){var g,v=new f,b=v[d](c?{}:-0,1);e(244)(function(e){new f(e)})||(f=n(function(e,n){a(e,f,t);var r=new p;return void 0!=n&&o(n,u,r[d],r),r}),f.prototype=h,h.constructor=f),c||v.forEach(function(e,t){g=1/t===-(1/0)}),g&&(y("delete"),y("has"),u&&y("get")),(g||b!==v)&&y(d),c&&h.clear&&delete h.clear}else f=l.getConstructor(n,t,u,d),e(252)(f.prototype,s);return e(273)(f,t),m[t]=f,i(i.G+i.W+i.F*(f!=p),m),c||l.setStrong(f,t,u),f}},{222:222,227:227,230:230,232:232,244:244,252:252,259:259,266:266,273:273}],220:[function(e,t,n){var r=t.exports={};"number"==typeof __e&&(__e=r)},{}],221:[function(e,t,n){var r=e(209);t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{209:209}],222:[function(e,t,n){var r=e(232),i=e(220),o=e(234),a=e(259),s="prototype",l=function(e,t){return function(){return e.apply(t,arguments)}},u=function(e,t,n){var c,p,f,d,h=e&u.G,m=e&u.P,y=h?r:e&u.S?r[t]||(r[t]={}):(r[t]||{})[s],g=h?i:i[t]||(i[t]={});h&&(n=t);for(c in n)p=!(e&u.F)&&y&&c in y,f=(p?y:n)[c],d=e&u.B&&p?l(f,r):m&&"function"==typeof f?l(Function.call,f):f,y&&!p&&a(y,c,f),g[c]!=f&&o(g,c,d),m&&((g[s]||(g[s]={}))[c]=f)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,t.exports=u},{220:220,232:232,234:234,259:259}],223:[function(e,t,n){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],224:[function(e,t,n){var r=e(240),i=e(232).document,o=r(i)&&r(i.createElement);t.exports=function(e){return o?i.createElement(e):{}}},{232:232,240:240}],225:[function(e,t,n){var r=e(247);t.exports=function(e){var t=r.getKeys(e),n=r.getSymbols;if(n)for(var i,o=n(e),a=r.isEnum,s=0;o.length>s;)a.call(e,i=o[s++])&&t.push(i);return t}},{247:247}],226:[function(e,t,n){t.exports=Math.expm1||function(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:Math.exp(e)-1}},{}],227:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(t){return!0}}},{}],228:[function(e,t,n){"use strict";t.exports=function(t,n,r){var i=e(223),o=e(282)(t),a=""[t];e(227)(function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})&&(e(259)(String.prototype,t,r(i,o,a)),e(234)(RegExp.prototype,o,2==n?function(e,t){return a.call(e,this,t)}:function(e){return a.call(e,this)}))}},{223:223,227:227,234:234,259:259,282:282}],229:[function(e,t,n){"use strict";var r=e(210);t.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},{210:210}],230:[function(e,t,n){var r=e(221),i=e(241),o=e(238),a=e(210),s=e(278),l=e(283);t.exports=function(e,t,n,u){var c,p,f,d=l(e),h=r(n,u,t?2:1),m=0;if("function"!=typeof d)throw TypeError(e+" is not iterable!");if(o(d))for(c=s(e.length);c>m;m++)t?h(a(p=e[m])[0],p[1]):h(e[m]);else for(f=d.call(e);!(p=f.next()).done;)i(f,h,p.value,t)}},{210:210,221:221,238:238,241:241,278:278,283:283}],231:[function(e,t,n){var r={}.toString,i=e(277),o=e(247).getNames,a="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return o(e)}catch(t){return a.slice()}};t.exports.get=function(e){return a&&"[object Window]"==r.call(e)?s(e):o(i(e))}},{247:247,277:277}],232:[function(e,t,n){var r="undefined",i=t.exports=typeof window!=r&&window.Math==Math?window:typeof self!=r&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},{}],233:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],234:[function(e,t,n){var r=e(247),i=e(258);t.exports=e(272)?function(e,t,n){return r.setDesc(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},{247:247,258:258,272:272}],235:[function(e,t,n){t.exports=e(232).document&&document.documentElement},{232:232}],236:[function(e,t,n){t.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},{}],237:[function(e,t,n){var r=e(215);t.exports=0 in Object("z")?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{215:215}],238:[function(e,t,n){var r=e(246),i=e(282)("iterator");t.exports=function(e){return(r.Array||Array.prototype[i])===e}},{246:246,282:282}],239:[function(e,t,n){var r=e(240),i=Math.floor;t.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},{240:240}],240:[function(e,t,n){t.exports=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}},{}],241:[function(e,t,n){var r=e(210);t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(o){var a=e["return"];throw void 0!==a&&r(a.call(e)),o}}},{210:210}],242:[function(e,t,n){"use strict";var r=e(247),i={};e(234)(i,e(282)("iterator"),function(){return this}),t.exports=function(t,n,o){t.prototype=r.create(i,{next:e(258)(1,o)}),e(273)(t,n+" Iterator")}},{234:234,247:247,258:258,273:273,282:282}],243:[function(e,t,n){"use strict";var r=e(249),i=e(222),o=e(259),a=e(234),s=e(233),l=e(282)("iterator"),u=e(246),c=!([].keys&&"next"in[].keys()),p="@@iterator",f="keys",d="values",h=function(){return this};t.exports=function(t,n,m,y,g,v,b){e(242)(m,n,y);var _,x,E=function(e){switch(e){case f:return function(){return new m(this,e)};case d:return function(){return new m(this,e)}}return function(){return new m(this,e)}},w=n+" Iterator",C=t.prototype,S=C[l]||C[p]||g&&C[g],k=S||E(g);if(S){var D=e(247).getProto(k.call(new t));e(273)(D,w,!0),!r&&s(C,p)&&a(D,l,h)}if((!r||b)&&a(C,l,k),u[n]=k,u[w]=h,g)if(_={keys:v?k:E(f),values:g==d?k:E(d),entries:g!=d?k:E("entries")},b)for(x in _)x in C||o(C,x,_[x]);else i(i.P+i.F*c,n,_)}},{222:222,233:233,234:234,242:242,246:246,247:247,249:249,259:259,273:273,282:282}],244:[function(e,t,n){var r=e(282)("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(a){}t.exports=function(e){if(!i)return!1;var t=!1;try{var n=[7],o=n[r]();o.next=function(){t=!0},n[r]=function(){return o},e(n)}catch(a){}return t}},{282:282}],245:[function(e,t,n){t.exports=function(e,t){return{value:t,done:!!e}}},{}],246:[function(e,t,n){t.exports={}},{}],247:[function(e,t,n){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},{}],248:[function(e,t,n){var r=e(247),i=e(277);t.exports=function(e,t){for(var n,o=i(e),a=r.getKeys(o),s=a.length,l=0;s>l;)if(o[n=a[l++]]===t)return n}},{247:247,277:277}],249:[function(e,t,n){t.exports=!1},{}],250:[function(e,t,n){t.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:Math.log(1+e)}},{}],251:[function(e,t,n){var r,i,o,a=e(232),s=e(274).set,l=a.MutationObserver||a.WebKitMutationObserver,u=a.process,c="process"==e(215)(u),p=function(){var e,t;for(c&&(e=u.domain)&&(u.domain=null,e.exit());r;)t=r.domain,t&&t.enter(),r.fn.call(),t&&t.exit(),r=r.next;i=void 0,e&&e.enter()};if(c)o=function(){u.nextTick(p)};else if(l){var f=1,d=document.createTextNode("");new l(p).observe(d,{characterData:!0}),o=function(){d.data=f=-f}}else o=function(){s.call(a,p)};t.exports=function(e){var t={fn:e,next:void 0,domain:c&&u.domain};i&&(i.next=t),r||(r=t,o()),i=t}},{215:215,232:232,274:274}],252:[function(e,t,n){var r=e(259);t.exports=function(e,t){for(var n in t)r(e,n,t[n]);return e}},{259:259}],253:[function(e,t,n){t.exports=function(t,n){var r=e(222),i=(e(220).Object||{})[t]||Object[t],o={};o[t]=n(i),r(r.S+r.F*e(227)(function(){i(1)}),"Object",o)}},{220:220,222:222,227:227}],254:[function(e,t,n){var r=e(247),i=e(277);t.exports=function(e){return function(t){var n,o=i(t),a=r.getKeys(o),s=a.length,l=0,u=Array(s);if(e)for(;s>l;)u[l]=[n=a[l++],o[n]];else for(;s>l;)u[l]=o[a[l++]];return u}}},{247:247,277:277}],255:[function(e,t,n){var r=e(247),i=e(210),o=e(232).Reflect;t.exports=o&&o.ownKeys||function(e){var t=r.getNames(i(e)),n=r.getSymbols;return n?t.concat(n(e)):t}},{210:210,232:232,247:247}],256:[function(e,t,n){"use strict";var r=e(257),i=e(236),o=e(209);t.exports=function(){for(var e=o(this),t=arguments.length,n=Array(t),a=0,s=r._,l=!1;t>a;)(n[a]=arguments[a++])===s&&(l=!0);return function(){var r,o=this,a=arguments.length,u=0,c=0;if(!l&&!a)return i(e,n,o);if(r=n.slice(),l)for(;t>u;u++)r[u]===s&&(r[u]=arguments[c++]);for(;a>c;)r.push(arguments[c++]);return i(e,r,o)}}},{209:209,236:236,257:257}],257:[function(e,t,n){t.exports=e(232)},{232:232}],258:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],259:[function(e,t,n){var r=e(232),i=e(234),o=e(280)("src"),a="toString",s=Function[a],l=(""+s).split(a);e(220).inspectSource=function(e){return s.call(e)},(t.exports=function(e,t,n,a){"function"==typeof n&&(i(n,o,e[t]?""+e[t]:l.join(String(t))),"name"in n||(n.name=t)),e===r?e[t]=n:(a||delete e[t],i(e,t,n))})(Function.prototype,a,function(){return"function"==typeof this&&this[o]||s.call(this)})},{220:220,232:232,234:234,280:280}],260:[function(e,t,n){t.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},{}],261:[function(e,t,n){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},{}],262:[function(e,t,n){var r=e(247).getDesc,i=e(240),o=e(210),a=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n){try{n=e(221)(Function.call,r(Object.prototype,"__proto__").set,2),n({},[])}catch(i){t=!0}return function(e,r){return a(e,r),t?e.__proto__=r:n(e,r),e}}():void 0),check:a}},{210:210,221:221,240:240,247:247}],263:[function(e,t,n){var r=e(232),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(e){return o[e]||(o[e]={})}},{232:232}],264:[function(e,t,n){t.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1}},{}],265:[function(e,t,n){"use strict";var r=e(247),i=e(282)("species");t.exports=function(t){!e(272)||i in t||r.setDesc(t,i,{configurable:!0,get:function(){return this}})}},{247:247,272:272,282:282}],266:[function(e,t,n){t.exports=function(e,t,n){if(!(e instanceof t))throw TypeError(n+": use the 'new' operator!");return e}},{}],267:[function(e,t,n){var r=e(276),i=e(223); -t.exports=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),u=s.length;return 0>l||l>=u?e?"":void 0:(o=s.charCodeAt(l),55296>o||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):(o-55296<<10)+(a-56320)+65536)}}},{223:223,276:276}],268:[function(e,t,n){var r=e(223),i=e(215);t.exports=function(e,t,n){if("RegExp"==i(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(e))}},{215:215,223:223}],269:[function(e,t,n){var r=e(278),i=e(270),o=e(223);t.exports=function(e,t,n,a){var s=String(o(e)),l=s.length,u=void 0===n?" ":String(n),c=r(t);if(l>=c)return s;""==u&&(u=" ");var p=c-l,f=i.call(u,Math.ceil(p/u.length));return f.length>p&&(f=a?f.slice(f.length-p):f.slice(0,p)),a?f+s:s+f}},{223:223,270:270,278:278}],270:[function(e,t,n){"use strict";var r=e(276),i=e(223);t.exports=function(e){var t=String(i(this)),n="",o=r(e);if(0>o||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},{223:223,276:276}],271:[function(e,t,n){var r=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(c,"")),e},i=e(222),o=e(223),a=" \n \f\r   ᠎              \u2028\u2029\ufeff",s="["+a+"]",l="​…",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$");t.exports=function(t,n){var o={};o[t]=n(r),i(i.P+i.F*e(227)(function(){return!!a[t]()||l[t]()!=l}),"String",o)}},{222:222,223:223,227:227}],272:[function(e,t,n){t.exports=!e(227)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{227:227}],273:[function(e,t,n){var r=e(233),i=e(234),o=e(282)("toStringTag");t.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,t)}},{233:233,234:234,282:282}],274:[function(e,t,n){"use strict";var r,i,o,a=e(221),s=e(236),l=e(235),u=e(224),c=e(232),p=c.process,f=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,m=0,y={},g="onreadystatechange",v=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},b=function(e){v.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete y[e]},"process"==e(215)(p)?r=function(e){p.nextTick(a(v,e,1))}:h?(i=new h,o=i.port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScript?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r=g in u("script")?function(e){l.appendChild(u("script"))[g]=function(){l.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),t.exports={set:f,clear:d}},{215:215,221:221,224:224,232:232,235:235,236:236}],275:[function(e,t,n){var r=e(276),i=Math.max,o=Math.min;t.exports=function(e,t){return e=r(e),0>e?i(e+t,0):o(e,t)}},{276:276}],276:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},{}],277:[function(e,t,n){var r=e(237),i=e(223);t.exports=function(e){return r(i(e))}},{223:223,237:237}],278:[function(e,t,n){var r=e(276),i=Math.min;t.exports=function(e){return e>0?i(r(e),9007199254740991):0}},{276:276}],279:[function(e,t,n){var r=e(223);t.exports=function(e){return Object(r(e))}},{223:223}],280:[function(e,t,n){var r=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},{}],281:[function(e,t,n){var r=e(282)("unscopables");r in[]||e(234)(Array.prototype,r,{}),t.exports=function(e){[][r][e]=!0}},{234:234,282:282}],282:[function(e,t,n){var r=e(263)("wks"),i=e(232).Symbol;t.exports=function(t){return r[t]||(r[t]=i&&i[t]||(i||e(280))("Symbol."+t))}},{232:232,263:263,280:280}],283:[function(e,t,n){var r=e(214),i=e(282)("iterator"),o=e(246);t.exports=e(220).getIteratorMethod=function(e){return void 0!=e?e[i]||e["@@iterator"]||o[r(e)]:void 0}},{214:214,220:220,246:246,282:282}],284:[function(e,t,n){"use strict";var r,i=e(247),o=e(272),a=e(258),s=e(235),l=e(224),u=e(233),c=e(215),p=e(222),f=e(236),d=e(212),h=e(280)("__proto__"),m=e(240),y=e(210),g=e(209),v=e(279),b=e(277),_=e(276),x=e(275),E=e(278),w=e(237),C=e(227),S=Object.prototype,k=[],D=k.slice,A=k.join,P=i.setDesc,T=i.getDesc,I=i.setDescs,O=e(211)(!1),M={};o||(r=!C(function(){return 7!=P(l("div"),"a",{get:function(){return 7}}).a}),i.setDesc=function(e,t,n){if(r)try{return P(e,t,n)}catch(i){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(y(e)[t]=n.value),e},i.getDesc=function(e,t){if(r)try{return T(e,t)}catch(n){}return u(e,t)?a(!S.propertyIsEnumerable.call(e,t),e[t]):void 0},i.setDescs=I=function(e,t){y(e);for(var n,r=i.getKeys(t),o=r.length,a=0;o>a;)i.setDesc(e,n=r[a++],t[n]);return e}),p(p.S+p.F*!o,"Object",{getOwnPropertyDescriptor:i.getDesc,defineProperty:i.setDesc,defineProperties:I});var F="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),N=F.concat("length","prototype"),L=F.length,j=function(){var e,t=l("iframe"),n=L,r=">";for(t.style.display="none",s.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(" +