From c258ad9e01e6b8b96af4a5a0b7ffd8d1b1c01836 Mon Sep 17 00:00:00 2001 From: Bl00dyMarie Date: Thu, 30 Aug 2018 11:47:15 +0200 Subject: [PATCH] Implements 2 improvements from MR comments: - Moves title of symptom in the header - Deletes additional comma out of cycle day overview --- .../app/src/main/assets/index.android.bundle | 125 +++++++++--------- components/cycle-day/cycle-day-overview.js | 3 +- components/cycle-day/symptoms/note.js | 2 +- components/cycle-day/symptoms/pain.js | 6 +- components/labels.js | 3 +- package-lock.json | 72 +++++----- 6 files changed, 105 insertions(+), 106 deletions(-) diff --git a/android/app/src/main/assets/index.android.bundle b/android/app/src/main/assets/index.android.bundle index 8880f69..729c46e 100644 --- a/android/app/src/main/assets/index.android.bundle +++ b/android/app/src/main/assets/index.android.bundle @@ -306,9 +306,9 @@ __d(function(r,t,e,a,n){'use strict';var i=t(n[0]).Vibration;t(n[1]);var o={vibr __d(function(t,i,o,n,r){'use strict';var s=i(r[0]),a={vibrate:function(){s('VibrationIOS is not supported on this platform!')}};o.exports=a},294,[16]); __d(function(e,n,t,l,r){'use strict';var s;s=(function(e){function n(){return babelHelpers.classCallCheck(this,n),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).apply(this,arguments))}return babelHelpers.createClass(n,[{key:"render",value:function(){return null}}],[{key:"ignoreWarnings",value:function(e){}},{key:"install",value:function(){}},{key:"uninstall",value:function(){}}]),babelHelpers.inherits(n,e),n})(n(r[0]).Component),t.exports=s},295,[25]); __d(function(n,o,e,t,d){var i=o(d[0]),r=o(d[1]);e.exports=function(n,o){return'number'!=typeof n&&'window'!==n&&(n=i.findNodeHandle(n)||'window'),r.__takeSnapshot(n,o)}},296,[95,49]); -__d(function(e,t,a,r,l){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=babelHelpers.interopRequireWildcard(t(l[0])),n=t(l[1]),s=babelHelpers.interopRequireDefault(t(l[2])),u=babelHelpers.interopRequireDefault(t(l[3])),b=babelHelpers.interopRequireDefault(t(l[4])),c=babelHelpers.interopRequireDefault(t(l[5])),o=babelHelpers.interopRequireDefault(t(l[6])),d=babelHelpers.interopRequireDefault(t(l[7])),p=babelHelpers.interopRequireDefault(t(l[8])),f=babelHelpers.interopRequireDefault(t(l[9])),h=babelHelpers.interopRequireDefault(t(l[10])),H=t(l[11]),v=function(e){return Object.keys(d.default).indexOf(e)>-1},g=(function(e){function t(e){var a;babelHelpers.classCallCheck(this,t),(a=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).call(this,e))).state={currentPage:'Home'};var r=function(){return'Home'!==this.state.currentPage&&(v(this.state.currentPage)?this.navigate('CycleDay',{cycleDay:this.state.currentProps.cycleDay}):this.navigate('Home'),!0)}.bind(babelHelpers.assertThisInitialized(babelHelpers.assertThisInitialized(a)));return a.backHandler=n.BackHandler.addEventListener('hardwareBackPress',r),a}return babelHelpers.createClass(t,[{key:"componentWillUnmount",value:function(){this.backHandler.remove()}},{key:"navigate",value:function(e,t){this.setState({currentPage:e,currentProps:t})}},{key:"render",value:function(){var e=babelHelpers.objectSpread({Home:b.default,Calendar:c.default,CycleDay:o.default,Chart:p.default,Settings:f.default,Stats:h.default},d.default)[this.state.currentPage];return i.default.createElement(n.View,{style:{flex:1}},'CycleDay'!=this.state.currentPage&&i.default.createElement(s.default,{title:H.headerTitles[this.state.currentPage]}),i.default.createElement(e,babelHelpers.objectSpread({navigate:this.navigate.bind(this)},this.state.currentProps)),!v(this.state.currentPage)&&i.default.createElement(u.default,{navigate:this.navigate.bind(this)}))}}]),babelHelpers.inherits(t,e),t})(i.Component);r.default=g},297,[26,1,298,467,468,496,533,537,585,605,626,614]); +__d(function(e,t,a,r,l){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=babelHelpers.interopRequireWildcard(t(l[0])),n=t(l[1]),s=babelHelpers.interopRequireDefault(t(l[2])),u=babelHelpers.interopRequireDefault(t(l[3])),b=babelHelpers.interopRequireDefault(t(l[4])),c=babelHelpers.interopRequireDefault(t(l[5])),o=babelHelpers.interopRequireDefault(t(l[6])),d=babelHelpers.interopRequireDefault(t(l[7])),p=babelHelpers.interopRequireDefault(t(l[8])),f=babelHelpers.interopRequireDefault(t(l[9])),h=babelHelpers.interopRequireDefault(t(l[10])),H=t(l[11]),v=function(e){return Object.keys(d.default).indexOf(e)>-1},g=(function(e){function t(e){var a;babelHelpers.classCallCheck(this,t),(a=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).call(this,e))).state={currentPage:'Home'};var r=function(){return'Home'!==this.state.currentPage&&(v(this.state.currentPage)?this.navigate('CycleDay',{cycleDay:this.state.currentProps.cycleDay}):this.navigate('Home'),!0)}.bind(babelHelpers.assertThisInitialized(babelHelpers.assertThisInitialized(a)));return a.backHandler=n.BackHandler.addEventListener('hardwareBackPress',r),a}return babelHelpers.createClass(t,[{key:"componentWillUnmount",value:function(){this.backHandler.remove()}},{key:"navigate",value:function(e,t){this.setState({currentPage:e,currentProps:t})}},{key:"render",value:function(){var e=babelHelpers.objectSpread({Home:b.default,Calendar:c.default,CycleDay:o.default,Chart:p.default,Settings:f.default,Stats:h.default},d.default)[this.state.currentPage];return i.default.createElement(n.View,{style:{flex:1}},'CycleDay'!=this.state.currentPage&&i.default.createElement(s.default,{title:H.headerTitles[this.state.currentPage]}),i.default.createElement(e,babelHelpers.objectSpread({navigate:this.navigate.bind(this)},this.state.currentProps)),!v(this.state.currentPage)&&i.default.createElement(u.default,{navigate:this.navigate.bind(this)}))}}]),babelHelpers.inherits(t,e),t})(i.Component);r.default=g},297,[26,1,298,467,468,496,533,537,589,608,631,581]); __d(function(e,t,r,l,a){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var s=babelHelpers.interopRequireWildcard(t(a[0])),n=t(a[1]),o=babelHelpers.interopRequireWildcard(t(a[2])),i=babelHelpers.interopRequireDefault(t(a[3])),u=t(a[4]),d=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"render",value:function(){var e=this;return this.props.isCycleDayOverView?s.default.createElement(n.View,{style:[o.default.header,o.default.headerCycleDay]},s.default.createElement(i.default,babelHelpers.extends({name:"arrow-left-drop-circle"},o.iconStyles.navigationArrow,{onPress:function(){return e.props.goToCycleDay('before')}})),s.default.createElement(n.View,null,s.default.createElement(n.Text,{style:o.default.dateHeader},(0,u.formatDateForViewHeader)(this.props.date)),this.props.cycleDayNumber&&s.default.createElement(n.Text,{style:o.default.cycleDayNumber},"Cycle day ",this.props.cycleDayNumber)),s.default.createElement(i.default,babelHelpers.extends({name:"arrow-right-drop-circle"},o.iconStyles.navigationArrow,{onPress:function(){return e.props.goToCycleDay('after')}}))):s.default.createElement(n.View,{style:o.default.header},s.default.createElement(n.Text,{style:o.default.dateHeader},this.props.title))}}]),babelHelpers.inherits(t,e),t})(s.Component);l.default=d},298,[26,1,299,300,465]); -__d(function(t,e,o,i,n){Object.defineProperty(i,"__esModule",{value:!0}),i.iconStyles=i.default=i.fontOnPrimaryColor=i.secondaryColor=i.primaryColor=void 0;var r=e(n[0]);i.primaryColor="#ff7e5f";i.secondaryColor="#351c4d";i.fontOnPrimaryColor="white";var a=r.StyleSheet.create({welcome:{fontSize:20,margin:30,textAlign:'center',textAlignVertical:'center'},dateHeader:{fontSize:18,fontWeight:'bold',color:"white",textAlign:'center'},cycleDayNumber:{fontSize:15,color:"white",textAlign:'center',marginLeft:15},symptomDayView:{fontSize:20,textAlignVertical:'center'},symptomBoxImage:{width:50,height:50},radioButton:{fontSize:18,margin:8,textAlign:'center',textAlignVertical:'center'},symptomBoxesView:{flexDirection:'row',flexWrap:'wrap',justifyContent:'space-evenly'},symptomBox:{borderColor:"#351c4d",borderStyle:'solid',borderWidth:1,borderTopLeftRadius:10,borderTopRightRadius:10,alignItems:'center',marginTop:'10%',paddingVertical:'6%',marginHorizontal:1,width:110,height:80},symptomBoxActive:{backgroundColor:"#351c4d"},symptomTextActive:{color:"white"},symptomDataBox:{borderColor:"#351c4d",borderStyle:'solid',borderLeftWidth:1,borderRightWidth:1,borderBottomWidth:1,borderBottomLeftRadius:10,borderBottomRightRadius:10,alignItems:'center',justifyContent:'center',padding:'3%',marginHorizontal:1,width:110,height:50},symptomDataText:{fontSize:12},symptomEditRow:{justifyContent:'space-between',marginBottom:10},symptomViewRowInline:{flexDirection:'row',justifyContent:'space-between',marginBottom:10,alignItems:'center',height:50},header:{backgroundColor:"#ff7e5f",paddingVertical:18,paddingHorizontal:15,alignItems:'center',justifyContent:'center'},menu:{backgroundColor:"#ff7e5f",alignItems:'center',justifyContent:'space-between',flexDirection:'row'},menuItem:{alignItems:'center',flex:1,paddingVertical:15},menuText:{color:"white"},menuTextInActive:{color:'lightgrey'},headerCycleDay:{flexDirection:'row',justifyContent:'space-between'},navigationArrow:{fontSize:60,color:"white"},homeButtons:{marginHorizontal:15},homeButton:{marginBottom:15},temperatureTextInput:{width:80,textAlign:'center',fontSize:20},actionButtonRow:{flexDirection:'row',justifyContent:'space-evenly',marginTop:50},symptomEditButton:{width:130},radioButtonRow:{marginTop:15,marginLeft:'auto',marginRight:'auto'},statsIntro:{fontSize:18,margin:10,textAlign:'left',textAlignVertical:'center'},statsRow:{flexDirection:'row',width:'100%'},statsLabelLeft:{fontSize:18,width:'60%',textAlign:'left',textAlignVertical:'center',marginLeft:10},statsLabelRight:{fontSize:18,textAlign:'left',textAlignVertical:'center'},menuLabel:{fontSize:15,color:"white"}});i.default=a;var l={navigationArrow:{size:45,color:"white"},symptomBox:{size:40},symptomBoxActive:{color:"white"},menuIcon:{size:20,color:"white"},menuIconInactive:{color:'lightgrey'}};i.iconStyles=l},299,[1]); +__d(function(t,e,o,i,n){Object.defineProperty(i,"__esModule",{value:!0}),i.iconStyles=i.default=i.fontOnPrimaryColor=i.secondaryColor=i.primaryColor=void 0;var r=e(n[0]);i.primaryColor="#ff7e5f";i.secondaryColor="#351c4d";i.fontOnPrimaryColor="white";var a=r.StyleSheet.create({welcome:{fontSize:20,margin:30,textAlign:'center',textAlignVertical:'center'},dateHeader:{fontSize:18,fontWeight:'bold',color:"white",textAlign:'center'},cycleDayNumber:{fontSize:15,color:"white",textAlign:'center',marginLeft:15},symptomDayView:{fontSize:20,textAlignVertical:'center'},symptomBoxImage:{width:50,height:50},radioButton:{fontSize:18,margin:8,textAlign:'center',textAlignVertical:'center'},symptomBoxesView:{flexDirection:'row',flexWrap:'wrap',justifyContent:'space-evenly'},symptomBox:{borderColor:"#351c4d",borderStyle:'solid',borderWidth:1,borderTopLeftRadius:10,borderTopRightRadius:10,alignItems:'center',marginTop:'10%',paddingVertical:'6%',marginHorizontal:1,width:110,height:80},symptomBoxActive:{backgroundColor:"#351c4d"},symptomTextActive:{color:"white"},symptomDataBox:{borderColor:"#351c4d",borderStyle:'solid',borderLeftWidth:1,borderRightWidth:1,borderBottomWidth:1,borderBottomLeftRadius:10,borderBottomRightRadius:10,alignItems:'center',justifyContent:'center',padding:'3%',marginHorizontal:1,width:110,height:50},symptomDataText:{fontSize:12},symptomEditRow:{justifyContent:'space-between',marginBottom:10},symptomViewRowInline:{flexDirection:'row',justifyContent:'space-between',marginBottom:10,alignItems:'center',height:50},header:{backgroundColor:"#ff7e5f",paddingHorizontal:15,alignItems:'center',justifyContent:'center',height:'10%'},menu:{backgroundColor:"#ff7e5f",alignItems:'center',justifyContent:'space-between',flexDirection:'row',height:'12%'},menuItem:{alignItems:'center',flex:1,paddingVertical:15},menuText:{color:"white"},menuTextInActive:{color:'lightgrey'},headerCycleDay:{flexDirection:'row',justifyContent:'space-between',height:'15%'},navigationArrow:{fontSize:60,color:"white"},homeButtons:{marginHorizontal:15},homeButton:{marginBottom:15},temperatureTextInput:{fontSize:20,color:'black'},temperatureTextInputSuggestion:{color:'#939393'},actionButtonRow:{flexDirection:'row',justifyContent:'space-evenly',marginTop:50},symptomEditButton:{width:130},radioButtonRow:{marginTop:15,marginLeft:'auto',marginRight:'auto'},statsIntro:{fontSize:18,margin:10,textAlign:'left',textAlignVertical:'center'},settingsSegment:{backgroundColor:'lightgrey',padding:10,marginBottom:10},settingsSegmentTitle:{fontWeight:'bold'},settingsButton:{backgroundColor:"#351c4d",padding:10,alignItems:'center',margin:10},settingsButtonText:{color:"white"},statsRow:{flexDirection:'row',width:'100%'},statsLabelLeft:{fontSize:18,width:'60%',textAlign:'left',textAlignVertical:'center',marginLeft:10},statsLabelRight:{fontSize:18,textAlign:'left',textAlignVertical:'center'},menuLabel:{fontSize:15,color:"white"}});i.default=a;var l={navigationArrow:{size:45,color:"white"},symptomBox:{size:40},symptomBoxActive:{color:"white"},menuIcon:{size:20,color:"white"},menuIconInactive:{color:'lightgrey'}};i.iconStyles=l},299,[1]); __d(function(e,a,r,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.getImageSource=t.ToolbarAndroid=t.TabBarItemIOS=t.TabBarItem=t.Button=t.default=void 0;var u=babelHelpers.interopRequireDefault(a(o[0])),l=babelHelpers.interopRequireDefault(a(o[1])),n=(0,u.default)(l.default,'Material Design Icons','MaterialCommunityIcons.ttf'),b=n;t.default=b;var d=n.Button;t.Button=d;var i=n.TabBarItem;t.TabBarItem=i;var I=n.TabBarItemIOS;t.TabBarItemIOS=I;var m=n.ToolbarAndroid;t.ToolbarAndroid=m;var f=n.getImageSource;t.getImageSource=f},300,[301,464]); __d(function(e,t,r,o,n){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(e,t,r,o){var n=r?r.replace(/\.(otf|ttf)$/,''):t,v=l.default.oneOf(Object.keys(e)),h=(function(t){function r(){var e,t,o;babelHelpers.classCallCheck(this,r);for(var n=arguments.length,a=new Array(n),l=0;l1&&void 0!==arguments[1]?arguments[1]:b,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;(0,u.default)();var a=e[t]||'?';'number'==typeof a&&(a=String.fromCharCode(a));var l=(0,i.processColor)(o),s=a+":"+r+":"+l,f=i.PixelRatio.get();return new Promise(function(e,t){var o=y[s];void 0!==o?!o||o instanceof Error?t(o):e({uri:o,scale:f}):p.getImageForFont(n,a,r,l,function(r,o){var n='string'==typeof r?new Error(r):r;y[s]=o||n||!1,!n&&o?e({uri:o,scale:f}):t(n)})})}return h.Button=(0,s.default)(h),h.TabBarItem=(0,f.default)(v,m),h.TabBarItemIOS=h.TabBarItem,h.ToolbarAndroid=(0,c.default)(v,m),h.getImageSource=m,h.loadFont=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0],Promise.resolve()},h.hasIcon=function(t){return Object.prototype.hasOwnProperty.call(e,t)},h.getRawGlyphMap=function(){return e},h.getFontFamily=function(){return n},h},o.DEFAULT_ICON_COLOR=o.DEFAULT_ICON_SIZE=o.NativeIconAPI=void 0;var a=babelHelpers.interopRequireWildcard(t(n[0])),l=babelHelpers.interopRequireDefault(t(n[1])),i=t(n[2]),u=babelHelpers.interopRequireDefault(t(n[3])),s=babelHelpers.interopRequireDefault(t(n[4])),f=babelHelpers.interopRequireDefault(t(n[5])),c=babelHelpers.interopRequireDefault(t(n[6])),p=i.NativeModules.RNVectorIconsManager||i.NativeModules.RNVectorIconsModule;o.NativeIconAPI=p;var b=12;o.DEFAULT_ICON_SIZE=b;var d='black';o.DEFAULT_ICON_COLOR=d},301,[26,43,302,303,304,449,463]); __d(function(e,t,n,r,u){Object.defineProperty(r,"__esModule",{value:!0});var o=t(u[0]);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}})})},302,[1]); @@ -492,9 +492,9 @@ __d(function(e,t,r,s,o){'use strict';Object.defineProperty(s,"__esModule",{value __d(function(e,t,r,s,o){'use strict';Object.defineProperty(s,"__esModule",{value:!0}),s.createResults=function(e,t){return(0,l.createCollection)(n.prototype,e,t)},s.default=void 0;var l=babelHelpers.interopRequireWildcard(t(o[0])),i=t(o[1]),a=t(o[2]),n=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.inherits(t,e),t})(l.default);s.default=n,(0,a.createMethods)(n.prototype,i.objectTypes.RESULTS,['filtered','sorted','snapshot','subscribe','isValid','indexOf','min','max','sum','avg','addListener','removeListener','removeAllListeners']),(0,a.createMethods)(n.prototype,i.objectTypes.RESULTS,['update'],!0)},480,[475,474,476]); __d(function(e,t,r,o,n){'use strict';Object.defineProperty(o,"__esModule",{value:!0}),o.clearRegisteredConstructors=function(){i={},a={}},o.createObject=function(e,t){var r=t.schema,o=a[e],n=(i[o]||{})[r.name],l=Object.create(n?n.prototype:u.prototype);if(l[c.keys.realm]=e,l[c.keys.id]=t.id,l[c.keys.type]=t.type,r.properties.forEach(function(e){Object.defineProperty(l,e,{enumerable:!0,get:(0,s.getterForProperty)(e),set:(0,s.setterForProperty)(e)})}),n){var f=n.call(l);if(null!=f&&f!=l)throw new Error('Realm object constructor must not return another value')}return l},o.registerConstructors=function(e,t,r){a[e]=t,r&&(i[t]=r)},o.typeForConstructor=function(e,t){var r=a[e],o=i[r];for(var n in o)if(o[n]==t)return n;throw new Error("Constructor was not registered in the schema for this Realm")},o.default=void 0;var c=t(n[0]),s=t(n[1]),i={},a={},u=function e(){babelHelpers.classCallCheck(this,e)};o.default=u,(0,s.createMethods)(u.prototype,c.objectTypes.OBJECT,['isValid','objectSchema','linkingObjects','linkingObjectsCount','_objectId','_isSameObject'])},481,[474,476]); __d(function(e,t,r,o,s){'use strict';Object.defineProperty(o,"__esModule",{value:!0}),o.createUser=function(e,t){var r=Object.create(l.prototype);return r[a.keys.realm]="(User object)",r[a.keys.id]=t.id,r[a.keys.type]=a.objectTypes.USER,babelHelpers.extends(r,t.data),r},o.default=void 0;var n=t(s[0]),a=t(s[1]),i=t(s[2]),l=(function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"createUser",value:function(e,t,r,o,s){return(0,n.createUser)(Array.from(arguments))}},{key:"_adminUser",value:function(e,t){return(0,n._adminUser)(Array.from(arguments))}},{key:"_getExistingUser",value:function(e,t){return(0,n._getExistingUser)(Array.from(arguments))}},{key:"all",get:function(){return(0,n.getAllUsers)()}}]),e})();o.default=l,Object.defineProperties(l.prototype,{token:{get:(0,i.getterForProperty)('token')},server:{get:(0,i.getterForProperty)('server')},identity:{get:(0,i.getterForProperty)('identity')}}),(0,i.createMethods)(l.prototype,a.objectTypes.USER,['_logout','_sessionForOnDiskPath'])},482,[477,474,476]); -__d(function(e,t,r,o,s){'use strict';Object.defineProperty(o,"__esModule",{value:!0}),o.createSession=function(e,t){var r=Object.create(d.prototype);return r[i.keys.realm]="(Session object)",r[i.keys.id]=t.id,r[i.keys.type]=i.objectTypes.SESSION,r.user=(0,c.deserialize)(e,t.data.user),r.config=(0,c.deserialize)(e,t.data.config),r},o.default=void 0;var i=t(s[0]),a=t(s[1]),c=t(s[2]),d=function e(){babelHelpers.classCallCheck(this,e)};o.default=d,Object.defineProperties(d.prototype,{url:{get:(0,a.getterForProperty)('url')},state:{get:(0,a.getterForProperty)('state')}}),(0,a.createMethods)(d.prototype,i.objectTypes.SESSION,['_refreshAccessToken','_simulateError','addProgressNotification','removeProgressNotification'])},483,[474,476,477]); +__d(function(e,t,o,r,i){'use strict';Object.defineProperty(r,"__esModule",{value:!0}),r.createSession=function(e,t){var o=Object.create(n.prototype);return o[s.keys.realm]="(Session object)",o[s.keys.id]=t.id,o[s.keys.type]=s.objectTypes.SESSION,o.user=(0,c.deserialize)(e,t.data.user),o.config=(0,c.deserialize)(e,t.data.config),o},r.default=void 0;var s=t(i[0]),a=t(i[1]),c=t(i[2]),n=function e(){babelHelpers.classCallCheck(this,e)};r.default=n,Object.defineProperties(n.prototype,{url:{get:(0,a.getterForProperty)('url')},state:{get:(0,a.getterForProperty)('state')}}),(0,a.createMethods)(n.prototype,s.objectTypes.SESSION,['_refreshAccessToken','_simulateError','addProgressNotification','removeProgressNotification','addConnectionNotification','removeConnectionNotification','isConnected'])},483,[474,476,477]); __d(function(e,t,r,o,s){'use strict';Object.defineProperty(o,"__esModule",{value:!0}),o.createSubscription=function(e,t){var r=Object.create(p.prototype);return r[c.keys.realm]="(Subscription object)",r[c.keys.id]=t.id,r[c.keys.type]=c.objectTypes.SUBSCRIPTION,r},o.default=void 0;var c=t(s[0]),i=t(s[1]),p=(t(s[2]),function e(){babelHelpers.classCallCheck(this,e)});o.default=p,Object.defineProperties(p.prototype,{error:{get:(0,i.getterForProperty)('error')},state:{get:(0,i.getterForProperty)('state')}}),(0,i.createMethods)(p.prototype,c.objectTypes.SUBSCRIPTION,['unsubscribe','addListener','removeListener'])},484,[474,476,477]); -__d(function(e,t,n,r,o){'use strict';var s=t(o[0]).AuthError,i=t(o[1]),a=t(o[2]),c=t,u=t(o[3]);function f(e,t){e=Array.prototype.slice.call(e);for(var n=0;nn&&typeof e[n]!==t[n])throw new TypeError('param '+n+' must be of type '+t[n])}var h,d,l,p,v=(h='undefined'==typeof fetch?c('node-fetch'):fetch,d=[],l=0,p=function e(){if(!(l>=5)){var t=d.shift();if(t){var n=babelHelpers.slicedToArray(t,4),r=n[0],o=n[1],s=n[2],i=n[3];++l,h(r,o).then(function(t){--l,e(),s(t)}).catch(function(t){--l,e(),i(t)})}}},function(e,t){return new Promise(function(n,r){d.push([e,t,n,r]),p()})}),g=t(o[3]),m={'content-type':'application/json;charset=utf-8',accept:'application/json'};function w(e,t){return e+('/'!=e.charAt(e.length-1)?'/':'')+t}function y(e,t,n,r){var o=r-Date.now()-1e4;setTimeout(function(){return j(e,t,n)},o)}function k(){(console.error||console.log).apply(console,arguments)}function _(e,t,n,r){var o=e._sessionForOnDiskPath(t);if(o){var i=o.config.error;if(200==n.status){if('invalid'!==o.state)return o}else{var a=new s(r);i?i(o,a):k("Unhandled session token refresh error for user "+e.identity+" at path "+t,a)}}else k("Unhandled session token refresh error: could not look up session for user "+e.identity+" at path "+t)}function b(e,t,n){var r=e.token,o=e.server,s=g(n),i=w(e.server,'realms/files/'+encodeURIComponent(s.pathname));v(i,{method:'GET',timeout:1e4,headers:{Authorization:e.token}}).then(function(e){return 404===e.status||503===e.status?{response:{status:200},json:{path:s.pathname,syncLabel:'_direct'}}:e.json().then(function(t){return{response:e,json:t}})}).then(function(n){var i=n.response,a=n.json,c=_(e.constructor.adminUser(r,o),t,i,a);c&&(s.set('pathname',a.path),c._refreshAccessToken(e.token,s.href,a.syncLabel))}).catch(function(r){k(r),setTimeout(function(){return j(e,t,n)},1e4)})}function j(e,t,n){if(!e.server)throw new Error("Server for user must be specified");var r=g(n);if(e.isAdminToken)return b(e,t,n);var o=w(e.server,'auth'),s={method:'POST',body:JSON.stringify({data:e.token,path:r.pathname,provider:'realm',app_id:''}),headers:m,timeout:1e4};v(o,s).then(function(e){return e.json().then(function(t){return{response:e,json:t}})}).then(function(o){var s=o.response,i=o.json,a=e.constructor._getExistingUser(e.server,e.identity);if(a){var c=_(a,t,s,i);if(c){var u=i.access_token.token_data;r.set('pathname',u.path),c._refreshAccessToken(i.access_token.token,r.href,u.sync_label);var f=c.config.error;f&&f._notifyOnAccessTokenRefreshed&&f(c,f._notifyOnAccessTokenRefreshed);var h=new Date(1e3*u.expires);y(a,t,n,h)}}}).catch(function(r){k(r),setTimeout(function(){return j(e,t,n)},1e4)})}function T(e,t,n,r){n.app_id='';var o=w(t,'auth'),i={method:'POST',body:JSON.stringify(n),headers:m,open_timeout:5e3},a=v(o,i).then(function(n){return-1===n.headers.get('Content-Type').indexOf('application/json')?n.text().then(function(e){throw new s({title:"Could not authenticate: Realm Object Server didn't respond with valid JSON",body:e})}):n.ok?n.json().then(function(n){var r=n.refresh_token.token,o=n.refresh_token.token_data.identity,s=n.refresh_token.token_data.is_admin;return e.createUser(t,o,r,!1,s)}):n.json().then(function(e){return Promise.reject(new s(e))})});if(!r)return a;a.then(function(e){r(null,e)}).catch(function(e){r(e)})}function O(e,t,n){var r=w(t,'auth/password/updateAccount'),o={method:'POST',body:JSON.stringify(n),headers:m,open_timeout:5e3};return v(r,o).then(function(e){return-1===e.headers.get('Content-Type').indexOf('application/json')?e.text().then(function(e){throw new s({title:"Could not update user account: Realm Object Server didn't respond with valid JSON",body:e})}):e.ok?void 0:e.json().then(function(e){return Promise.reject(new s(e))})})}var S={get current(){var e=this.all,t=Object.keys(e);if(0!==t.length){if(t.length>1)throw new Error("Multiple users are logged in");return e[t[0]]}},adminUser:function(e,t){return f(arguments,['string','string']),this._adminUser(t,e)},register:function(e,t,n,r){f(arguments,['string','string','string','function']);var o={provider:'password',user_info:{password:n,register:!0},data:t};if(r){(console.warn||console.log).call(console,"register(..., callback) is now deprecated in favor of register(): Promise. This function argument will be removed in future versions.")}return T(this,e,o,r)},login:function(e,t,n,r){f(arguments,['string','string','string','function']);var o={provider:'password',user_info:{password:n,register:!1},data:t};if(r){(console.warn||console.log).call(console,"login(..., callback) is now deprecated in favor of login(): Promise. This function argument will be removed in future versions.")}return T(this,e,o,r)},registerWithProvider:function(e,t,n){4===arguments.length?(f(arguments,['string','string','string','function']),t={provider:arguments[1],providerToken:arguments[2]},n=arguments[3]):f(arguments,['string','object','function']);var r={provider:t.provider,data:t.providerToken};if(t.userInfo&&(r.user_info=t.userInfo),n){(console.warn||console.log).call(console,"registerWithProvider(..., callback) is now deprecated in favor of registerWithProvider(): Promise. This function argument will be removed in future versions.")}return T(this,e,r,n)},authenticate:function(e,t,n){f(arguments,['string','string','object']);var r={};switch(t.toLowerCase()){case'jwt':r.provider='jwt',r.token=n.token;break;case'password':r.provider='password',r.user_info={password:n.password},r.data=n.username;break;default:babelHelpers.extends(r,n),r.provider=t}return T(this,e,r)},requestPasswordReset:function(e,t){return f(arguments,['string','string']),O(0,e,{provider_id:t,data:{action:'reset_password'}})},completePasswordReset:function(e,t,n){return f(arguments,['string','string']),O(0,e,{data:{action:'complete_reset',token:t,new_password:n}})},requestEmailConfirmation:function(e,t){return f(arguments,['string','string']),O(0,e,{provider_id:t,data:{action:'request_email_confirmation'}})},confirmEmail:function(e,t){return f(arguments,['string','string']),O(0,e,{data:{action:'confirm_email',token:t}})},_refreshAccessToken:j},P={logout:function(){this._logout();var e=g(this.server);e.set('pathname','/auth/revoke');var t={method:'POST',headers:{Authorization:this.token},body:JSON.stringify({token:this.token}),open_timeout:5e3};v(e.href,t).then(function(){return console.log('User is logged out')}).catch(function(e){return k(e)})},openManagementRealm:function(){var e=g(this.server);if('http:'===e.protocol)e.set('protocol','realm:');else{if('https:'!==e.protocol)throw new Error("Unexpected user auth url: "+this.server);e.set('protocol','realms:')}return e.set('pathname','/~/__management'),new this.constructor._realmConstructor({schema:t(o[4]),sync:{user:this,url:e.href}})},retrieveAccount:function(e,t){f(arguments,['string','string']);var n=g(this.server);n.set('pathname',"/auth/users/"+e+"/"+t);var r={method:'GET',headers:{Authorization:this.token},open_timeout:5e3};return v(n.href,r).then(function(e){return 200!==e.status?e.json().then(function(e){throw new s(e)}):e.json()})},createConfiguration:function(e){if(e&&e.sync&&(void 0!==console.warn&&console.warn("'user' property will be overridden by "+this.identity),void 0!==e.sync.partial&&void 0!==e.sync.fullSynchronization))throw new Error("'partial' and 'fullSynchronization' were both set. 'partial' has been deprecated, use only 'fullSynchronization'");var t=new u(this.server),n='https:'===t.protocol?'s':'',r=void 0===t.port?'9080':t.port,o={sync:{user:this,url:"realm"+n+"://"+t.hostname+":"+r+"/default"}};e&&e.sync&&e.sync.partial||(o.sync.fullSynchronization=!1);var s=void 0===e?o:a(o,e);return s.sync.user=this,s}};babelHelpers.extends(P,i),n.exports={static:S,instance:P}},485,[486,487,492,488,491]); +__d(function(e,t,n,r,o){'use strict';var s=t(o[0]).AuthError,i=t(o[1]),a=t(o[2]),c=t,u=t(o[3]);function f(e,t){e=Array.prototype.slice.call(e);for(var n=0;nn&&typeof e[n]!==t[n])throw new TypeError('param '+n+' must be of type '+t[n])}var h,l,d,p,v=(h='undefined'==typeof fetch?c('node-fetch'):fetch,l=[],d=0,p=function e(){if(!(d>=5)){var t=l.shift();if(t){var n=babelHelpers.slicedToArray(t,4),r=n[0],o=n[1],s=n[2],i=n[3];++d,h(r,o).then(function(t){--d,e(),s(t)}).catch(function(t){--d,e(),i(t)})}}},function(e,t){return new Promise(function(n,r){l.push([e,t,n,r]),p()})}),m=t(o[3]),g={'content-type':'application/json;charset=utf-8',accept:'application/json'};function w(e,t){return e+('/'!=e.charAt(e.length-1)?'/':'')+t}function y(e,t,n,r){var o=r-Date.now()-1e4;setTimeout(function(){return j(e,t,n)},o)}function k(){(console.error||console.log).apply(console,arguments)}function _(e,t,n,r){var o=e._sessionForOnDiskPath(t);if(o){var i=o.config.error;if(200==n.status){if('invalid'!==o.state)return o}else{var a=new s(r);i?i(o,a):k("Unhandled session token refresh error for user "+e.identity+" at path "+t,a)}}else k("Unhandled session token refresh error: could not look up session for user "+e.identity+" at path "+t)}function b(e,t,n){var r=e.token,o=e.server,s=m(n),i=w(e.server,'realms/files/'+encodeURIComponent(s.pathname));v(i,{method:'GET',timeout:1e4,headers:{Authorization:e.token}}).then(function(e){return 404===e.status||503===e.status?{response:{status:200},json:{path:s.pathname,syncLabel:'_direct'}}:e.json().then(function(t){return{response:e,json:t}})}).then(function(n){var i=n.response,a=n.json,c=_(e.constructor.adminUser(r,o),t,i,a);c&&(s.set('pathname',a.path),c._refreshAccessToken(e.token,s.href,a.syncLabel))}).catch(function(r){k(r),setTimeout(function(){return j(e,t,n)},1e4)})}function j(e,t,n){if(!e.server)throw new Error("Server for user must be specified");var r=m(n);if(e.isAdminToken)return b(e,t,n);var o=w(e.server,'auth'),s={method:'POST',body:JSON.stringify({data:e.token,path:r.pathname,provider:'realm',app_id:''}),headers:g,timeout:1e4};v(o,s).then(function(e){return e.json().then(function(t){return{response:e,json:t}})}).then(function(o){var s=o.response,i=o.json,a=e.constructor._getExistingUser(e.server,e.identity);if(a){var c=_(a,t,s,i);if(c){var u=i.access_token.token_data;r.set('pathname',u.path),c._refreshAccessToken(i.access_token.token,r.href,u.sync_label);var f=c.config.error;f&&f._notifyOnAccessTokenRefreshed&&f(c,f._notifyOnAccessTokenRefreshed);var h=new Date(1e3*u.expires);y(a,t,n,h)}}}).catch(function(r){k(r),setTimeout(function(){return j(e,t,n)},1e4)})}function T(e,t,n,r){n.app_id='';var o=w(t,'auth'),i={method:'POST',body:JSON.stringify(n),headers:g,open_timeout:5e3},a=v(o,i).then(function(n){return-1===n.headers.get('Content-Type').indexOf('application/json')?n.text().then(function(e){throw new s({title:"Could not authenticate: Realm Object Server didn't respond with valid JSON",body:e})}):n.ok?n.json().then(function(n){var r=n.refresh_token.token,o=n.refresh_token.token_data.identity,s=n.refresh_token.token_data.is_admin;return e.createUser(t,o,r,!1,s)}):n.json().then(function(e){return Promise.reject(new s(e))})});if(!r)return a;a.then(function(e){r(null,e)}).catch(function(e){r(e)})}function P(e,t,n){var r=w(t,'auth/password/updateAccount'),o={method:'POST',body:JSON.stringify(n),headers:g,open_timeout:5e3};return v(r,o).then(function(e){return-1===e.headers.get('Content-Type').indexOf('application/json')?e.text().then(function(e){throw new s({title:"Could not update user account: Realm Object Server didn't respond with valid JSON",body:e})}):e.ok?void 0:e.json().then(function(e){return Promise.reject(new s(e))})})}var O={get current(){var e=this.all,t=Object.keys(e);if(0!==t.length){if(t.length>1)throw new Error("Multiple users are logged in");return e[t[0]]}},adminUser:function(e,t){return f(arguments,['string','string']),this._adminUser(t,e)},register:function(e,t,n,r){f(arguments,['string','string','string','function']);var o={provider:'password',user_info:{password:n,register:!0},data:t};if(r){(console.warn||console.log).call(console,"register(..., callback) is now deprecated in favor of register(): Promise. This function argument will be removed in future versions.")}return T(this,e,o,r)},login:function(e,t,n,r){f(arguments,['string','string','string','function']);var o={provider:'password',user_info:{password:n,register:!1},data:t};if(r){(console.warn||console.log).call(console,"login(..., callback) is now deprecated in favor of login(): Promise. This function argument will be removed in future versions.")}return T(this,e,o,r)},registerWithProvider:function(e,t,n){4===arguments.length?(f(arguments,['string','string','string','function']),t={provider:arguments[1],providerToken:arguments[2]},n=arguments[3]):f(arguments,['string','object','function']);var r={provider:t.provider,data:t.providerToken};if(t.userInfo&&(r.user_info=t.userInfo),n){(console.warn||console.log).call(console,"registerWithProvider(..., callback) is now deprecated in favor of registerWithProvider(): Promise. This function argument will be removed in future versions.")}return T(this,e,r,n)},authenticate:function(e,t,n){f(arguments,['string','string','object']);var r={};switch(t.toLowerCase()){case'jwt':r.provider='jwt',r.token=n.token;break;case'password':r.provider='password',r.user_info={password:n.password},r.data=n.username;break;default:babelHelpers.extends(r,n),r.provider=t}return T(this,e,r)},requestPasswordReset:function(e,t){return f(arguments,['string','string']),P(0,e,{provider_id:t,data:{action:'reset_password'}})},completePasswordReset:function(e,t,n){return f(arguments,['string','string']),P(0,e,{data:{action:'complete_reset',token:t,new_password:n}})},requestEmailConfirmation:function(e,t){return f(arguments,['string','string']),P(0,e,{provider_id:t,data:{action:'request_email_confirmation'}})},confirmEmail:function(e,t){return f(arguments,['string','string']),P(0,e,{data:{action:'confirm_email',token:t}})},_refreshAccessToken:j},S={logout:function(){this._logout();var e=m(this.server);e.set('pathname','/auth/revoke');var t={method:'POST',headers:{Authorization:this.token},body:JSON.stringify({token:this.token}),open_timeout:5e3};v(e.href,t).then(function(){return console.log('User is logged out')}).catch(function(e){return k(e)})},openManagementRealm:function(){var e=m(this.server);if('http:'===e.protocol)e.set('protocol','realm:');else{if('https:'!==e.protocol)throw new Error("Unexpected user auth url: "+this.server);e.set('protocol','realms:')}return e.set('pathname','/~/__management'),new this.constructor._realmConstructor({schema:t(o[4]),sync:{user:this,url:e.href}})},retrieveAccount:function(e,t){f(arguments,['string','string']);var n=m(this.server);n.set('pathname',"/auth/users/"+e+"/"+t);var r={method:'GET',headers:{Authorization:this.token},open_timeout:5e3};return v(n.href,r).then(function(e){return 200!==e.status?e.json().then(function(e){throw new s(e)}):e.json()})},createConfiguration:function(e){if(e&&e.sync&&(void 0!==console.warn&&console.warn("'user' property will be overridden by "+this.identity),void 0!==e.sync.partial&&void 0!==e.sync.fullSynchronization))throw new Error("'partial' and 'fullSynchronization' were both set. 'partial' has been deprecated, use only 'fullSynchronization'");var t=new u(this.server),n='https:'===t.protocol?'s':'',r=void 0===t.port?'9080':t.port,o={sync:{user:this,url:"realm"+n+"://"+t.hostname+":"+r+"/default"},schema:[]};e&&e.sync&&e.sync.partial||(o.sync.fullSynchronization=!1),(!1===o.sync.fullSynchronization||e&&e.sync&&!0===e.sync.partial)&&(o.schema=[Realm.Permissions.Class,Realm.Permissions.Permission,Realm.Permissions.Role,Realm.Permissions.User]);var s=void 0===e?o:a(o,e);return s.sync.user=this,s}};babelHelpers.extends(S,i),n.exports={static:O,instance:S}},485,[486,487,492,488,491]); __d(function(r,t,o,s,e){'use strict';function _(r){var t=Error.call(this,r.title);this.name='AuthError',this.message=t.message,this.stack=t.stack,babelHelpers.extends(this,r)}_.__proto__=Error,_.prototype.__proto__=Error.prototype,s.AuthError=_},486,[]); __d(function(e,r,t,n,i){'use strict';var a=r(i[0]),o=r(i[1]);function s(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(e){var r=16*Math.random()|0;return('x'==e?r:3&r|8).toString(16)})}var u=[{name:'Permission',properties:{userId:{type:'string'},path:{type:'string'},mayRead:{type:'bool',optional:!1},mayWrite:{type:'bool',optional:!1},mayManage:{type:'bool',optional:!1},updatedAt:{type:'date',optional:!1}}}],m='_specialPurposeRealms';function c(e,r,t){if(e.hasOwnProperty(m)||(e[m]={}),e[m].hasOwnProperty(r))return Promise.resolve(e[m][r]);var n=a(e.server);if('http:'===n.protocol)n.set('protocol','realm:');else{if('https:'!==n.protocol)throw new Error("Unexpected user auth url: "+e.server);n.set('protocol','realms:')}n.set('pathname',"/~/"+r);var i={schema:t,sync:{user:e,url:n.href,fullSynchronization:!0}};return e.constructor._realmConstructor.open(i).then(function(t){return e[m][r]=t,t})}function f(e,r,t){return c(e,'__management',o).then(function(e){return new Promise(function(n,i){try{var a;e.addListener('change',function r(){if(a){var t=a.statusCode;if('number'==typeof t)if(e.removeListener('change',r),0===t)setTimeout(function(){return n(a)},1);else{var o=new Error(a.statusMessage);o.statusCode=t,o.managementObject=a,setTimeout(function(){return i(o)},1)}}}),e.write(function(){a=e.create(r,t)})}catch(e){i(e)}})})}var d=['none','read','write','admin'],l=['read','write','admin'];t.exports={getGrantedPermissions:function(e){var r=this;return e&&-1===['currentUser','otherUser','any'].indexOf(e)?Promise.reject(new Error("'"+e+"' is not a valid recipient type. Must be 'any', 'currentUser' or 'otherUser'.")):c(this,'__permission',u).then(function(t){var n=t.objects('Permission').filtered('NOT path ENDSWITH "__permission" AND NOT path ENDSWITH "__management"');return'currentUser'===e?n=n.filtered('userId = $0',r.identity):'otherUser'===e&&(n=n.filtered('userId != $0',r.identity)),n})},applyPermissions:function(e,r,t){if(!r)return Promise.reject(new Error('realmUrl must be specified'));if(-1===d.indexOf(t))return Promise.reject(new Error("'"+t+"' is not a valid access level. Must be "+d.join(', ')+"."));var n='read'===t||'write'===t||'admin'===t,i='write'===t||'admin'===t,a='admin'===t,o={id:s(),createdAt:new Date,updatedAt:new Date,realmUrl:r,mayRead:n,mayWrite:i,mayManage:a};return e.hasOwnProperty('userId')?o.userId=e.userId:(o.userId='',o.metadataKey=e.metadataKey,o.metadataValue=e.metadataValue),f(this,'PermissionChange',o)},offerPermissions:function(e,r,t){if(!e)return Promise.reject(new Error('realmUrl must be specified'));if(-1===l.indexOf(r))return Promise.reject(new Error("'"+r+"' is not a valid access level. Must be "+l.join(', ')+"."));var n='write'===r||'admin'===r,i='admin'===r;return f(this,'PermissionOffer',{id:s(),createdAt:new Date,updatedAt:new Date,expiresAt:t,realmUrl:e,mayRead:!0,mayWrite:n,mayManage:i}).then(function(e){return e.token})},acceptPermissionOffer:function(e){return e?f(this,'PermissionOfferResponse',{id:s(),createdAt:new Date,updatedAt:new Date,token:e}).then(function(e){return e.realmUrl}):Promise.reject(new Error('Offer token must be specified'))},invalidatePermissionOffer:function(e){return c(this,'__management',o).then(function(r){var t;if('string'==typeof e){var n=r.objects('PermissionOffer').filtered('token = $0',e);if(0===n.length)throw new Error("No permission offers with the given token were found");t=n[0]}else t=e;r.write(function(){t.expiresAt=new Date})})}}},487,[488,491]); __d(function(t,e,o,s,r){'use strict';var a=e(r[0]),n=e(r[1]),h=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,i=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,p=[['#','hash'],['?','query'],function(t){return t.replace('\\','/')},['/','pathname'],['@','auth',1],[NaN,'host',void 0,1,1],[/:(\d+)$/,'port',void 0,1],[NaN,'hostname',void 0,1,1]],c={hash:1,query:1};function l(e){var o,s=t&&t.location||{},r={},a=typeof(e=e||s);if('blob:'===e.protocol)r=new m(unescape(e.pathname),{});else if('string'===a)for(o in r=new m(e,{}),c)delete r[o];else if('object'===a){for(o in e)o in c||(r[o]=e[o]);void 0===r.slashes&&(r.slashes=i.test(e.href))}return r}function u(t){var e=h.exec(t);return{protocol:e[1]?e[1].toLowerCase():'',slashes:!!e[2],rest:e[3]}}function f(t,e){for(var o=(e||'/').split('/').slice(0,-1).concat(t.split('/')),s=o.length,r=o[s-1],a=!1,n=0;s--;)'.'===o[s]?o.splice(s,1):'..'===o[s]?(o.splice(s,1),n++):n&&(0===s&&(a=!0),o.splice(s,1),n--);return a&&o.unshift(''),'.'!==r&&'..'!==r||o.push(''),o.join('/')}function m(t,e,o){if(!(this instanceof m))return new m(t,e,o);var s,r,h,i,c,y,d=p.slice(),g=typeof e,v=this,b=0;for('object'!==g&&'string'!==g&&(o=e,e=null),o&&'function'!=typeof o&&(o=n.parse),e=l(e),s=!(r=u(t||'')).protocol&&!r.slashes,v.slashes=r.slashes||s&&e.slashes,v.protocol=r.protocol||e.protocol||'',t=r.rest,r.slashes||(d[3]=[/(.*)/,'pathname']);b=t.length)return t=null,{done:!0,value:void 0};var n;switch(e){case'entries':n=[r,t[r]];break;case'keys':n=r;break;default:n=t[r]}return r++,{done:!1,value:n}}}})},configurable:!0,writable:!0}}),n["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=n.values},494,[]); __d(function(e,t,u,r,a){function m(e){var t={date:e.date};return e.temperature&&(t.temperature={value:e.temperature,exclude:!1}),e.mucus&&(t.mucus={value:e.mucus,exclude:!1,feeling:e.mucus,texture:e.mucus}),e.bleeding&&(t.bleeding={value:e.bleeding,exclude:!1}),t}Object.defineProperty(r,"__esModule",{value:!0}),r.cycleWithTempAndNoMucusShift=r.longAndComplicatedCycle=r.cycleWithFhm=void 0;var d=[{date:'2018-07-01',bleeding:2},{date:'2018-07-02',bleeding:1},{date:'2018-07-06',temperature:36.2},{date:'2018-07-07',temperature:36.35},{date:'2018-07-09',temperature:36.6},{date:'2018-07-10',temperature:36.45},{date:'2018-07-12',temperature:36.7,mucus:0},{date:'2018-07-13',temperature:36.8,mucus:4},{date:'2018-07-15',temperature:36.9,mucus:2},{date:'2018-07-16',temperature:36.95,mucus:2},{date:'2018-07-17',temperature:36.9,mucus:2},{date:'2018-07-18',temperature:36.9,mucus:2}].map(m).reverse();r.cycleWithFhm=d;var c=[{date:'2018-06-01',temperature:36.6,bleeding:2},{date:'2018-06-02',temperature:36.65},{date:'2018-06-04',temperature:36.6},{date:'2018-06-05',temperature:36.55},{date:'2018-06-06',temperature:36.7,mucus:0},{date:'2018-06-09',temperature:36.5,mucus:4},{date:'2018-06-10',temperature:36.4,mucus:2},{date:'2018-06-13',temperature:36.45,mucus:3},{date:'2018-06-14',temperature:36.5,mucus:4},{date:'2018-06-15',temperature:36.55,mucus:4},{date:'2018-06-16',temperature:36.7,mucus:3},{date:'2018-06-17',temperature:36.65,mucus:3},{date:'2018-06-18',temperature:36.75,mucus:4},{date:'2018-06-19',temperature:36.8,mucus:1},{date:'2018-06-20',temperature:36.85,mucus:2},{date:'2018-06-21',temperature:36.8,mucus:2},{date:'2018-06-22',temperature:36.9,mucus:2},{date:'2018-06-25',temperature:36.9,mucus:1},{date:'2018-06-26',temperature:36.8,mucus:1},{date:'2018-06-27',temperature:36.9,mucus:1}].map(m).reverse();r.longAndComplicatedCycle=c;var p=[{date:'2018-05-01',temperature:36.6,bleeding:2},{date:'2018-05-02',temperature:36.65},{date:'2018-05-05',temperature:36.55},{date:'2018-05-06',temperature:36.7,mucus:0},{date:'2018-05-08',temperature:36.45,mucus:1},{date:'2018-05-09',temperature:36.5,mucus:4},{date:'2018-05-10',temperature:36.4,mucus:2},{date:'2018-05-11',temperature:36.5,mucus:3},{date:'2018-05-13',temperature:36.45,mucus:3},{date:'2018-05-14',temperature:36.5,mucus:4},{date:'2018-05-15',temperature:36.55,mucus:4},{date:'2018-05-16',temperature:36.7,mucus:3},{date:'2018-05-17',temperature:36.65,mucus:3},{date:'2018-05-18',temperature:36.75,mucus:4},{date:'2018-05-19',temperature:36.8,mucus:4},{date:'2018-05-20',temperature:36.85,mucus:4},{date:'2018-05-23',temperature:36.9,mucus:3},{date:'2018-05-24',temperature:36.85,mucus:4},{date:'2018-05-26',temperature:36.8,mucus:4},{date:'2018-05-27',temperature:36.9,mucus:4}].map(m).reverse();r.cycleWithTempAndNoMucusShift=p},495,[]); __d(function(e,t,a,r,n){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=babelHelpers.interopRequireWildcard(t(n[0])),l=t(n[1]),i=t(n[2]),o=(function(e){function t(e){var a,r;return babelHelpers.classCallCheck(this,t),(a=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).call(this,e))).state={bleedingDaysInCalFormat:d(i.bleedingDaysSortedByDate)},a.setStateWithCalFormattedDays=(r=babelHelpers.assertThisInitialized(babelHelpers.assertThisInitialized(a)),function(e,t){Object.values(t).every(function(e){return e&&!e.length})||r.setState({bleedingDaysInCalFormat:d(i.bleedingDaysSortedByDate)})}),i.bleedingDaysSortedByDate.addListener(a.setStateWithCalFormattedDays),a}return babelHelpers.createClass(t,[{key:"componentWillUnmount",value:function(){i.bleedingDaysSortedByDate.removeListener(this.setStateWithCalFormattedDays)}},{key:"passDateToDayView",value:function(e){var t=(0,i.getOrCreateCycleDay)(e.dateString);(0,this.props.navigate)('CycleDay',{cycleDay:t})}},{key:"render",value:function(){return s.default.createElement(l.CalendarList,{onDayPress:this.passDateToDayView.bind(this),markedDates:this.state.bleedingDaysInCalFormat,markingType:'period'})}}]),babelHelpers.inherits(t,e),t})(s.Component);function d(e){var t=['#ffbaba','#ff7b7b','#ff5252','#ff0000'];return e.reduce(function(e,a){return e[a.date]={startingDay:!0,endingDay:!0,color:t[a.bleeding.value]},e},{})}r.default=o},496,[26,497,471]); @@ -542,17 +542,17 @@ __d(function(e,o,t,a,r){Object.defineProperty(a,"__esModule",{value:!0}),a.defau __d(function(e,o,t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=babelHelpers.objectSpread({},n,e),t=(0,i.default)(o),r=t.knob,a=t.weekdays;return l.StyleSheet.create(babelHelpers.objectSpread({knob:r,weekdays:a,header:{overflow:'hidden',justifyContent:'flex-end',position:'absolute',height:'100%',width:'100%'},calendar:{flex:1,borderBottomWidth:1,borderColor:o.separatorColor},knobContainer:{flex:1,position:'absolute',left:0,right:0,height:24,bottom:0,alignItems:'center',backgroundColor:o.calendarBackground},weekday:{width:32,textAlign:'center',fontSize:13,color:o.textSectionTitleColor},reservations:{flex:1,marginTop:104,backgroundColor:o.backgroundColor}},e[d]||{}))};var l=o(a[0]),n=babelHelpers.interopRequireWildcard(o(a[1])),i=babelHelpers.interopRequireDefault(o(a[2])),d='stylesheet.agenda.main'},530,[1,503,531]); __d(function(o,e,n,t,d){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(o){return{knob:{width:38,height:7,marginTop:10,borderRadius:3,backgroundColor:o.agendaKnobColor},weekdays:{position:'absolute',left:0,right:0,top:0,flexDirection:'row',justifyContent:'space-between',paddingLeft:24,paddingRight:24,paddingTop:15,paddingBottom:7,backgroundColor:o.calendarBackground}}}},531,[]); __d(function(t,i,s,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e.VelocityTracker=void 0;var o=(function(){function t(){babelHelpers.classCallCheck(this,t),this.history=[],this.lastPosition=void 0,this.lastTimestamp=void 0}return babelHelpers.createClass(t,[{key:"add",value:function(t){var i=(new Date).valueOf();if(this.lastPosition&&i>this.lastTimestamp){var s=t-this.lastPosition;(s>.001||s<-.001)&&this.history.push(s/(i-this.lastTimestamp))}this.lastPosition=t,this.lastTimestamp=i}},{key:"estimateSpeed",value:function(){var t=this.history.slice(-3);return t.reduce(function(t,i){return t+i},0)/t.length}},{key:"reset",value:function(){this.history=[],this.lastPosition=void 0,this.lastTimestamp=void 0}}]),t})();e.VelocityTracker=o},532,[]); -__d(function(e,t,a,r,n){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var l=babelHelpers.interopRequireWildcard(t(n[0])),i=t(n[1]),u=t(n[2]),s=babelHelpers.interopRequireDefault(t(n[3])),o=t(n[4]),c=babelHelpers.interopRequireDefault(t(n[5])),p=babelHelpers.interopRequireDefault(t(n[6])),d=babelHelpers.interopRequireWildcard(t(n[7])),f=t(n[8]),m=(function(e){function t(e){var a;return babelHelpers.classCallCheck(this,t),(a=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).call(this,e))).state={cycleDay:e.cycleDay},a}return babelHelpers.createClass(t,[{key:"goToCycleDay",value:function(e){var t=u.LocalDate.parse(this.state.cycleDay.date),a='before'===e?t.minusDays(1).toString():t.plusDays(1).toString();this.setState({cycleDay:(0,o.getOrCreateCycleDay)(a)})}},{key:"navigate",value:function(e){this.props.navigate(e,{cycleDay:this.state.cycleDay})}},{key:"render",value:function(){var e=this,t=this.state.cycleDay,a=(0,(0,c.default)().getCycleDayNumber)(t.date);return l.default.createElement(i.View,{style:{flex:1}},l.default.createElement(s.default,{isCycleDayOverView:!0,cycleDayNumber:a,date:t.date,goToCycleDay:this.goToCycleDay.bind(this)}),l.default.createElement(i.ScrollView,null,l.default.createElement(i.View,{style:d.default.symptomBoxesView},l.default.createElement(b,{title:"Bleeding",onPress:function(){return e.navigate('BleedingEditView')},data:y('bleeding',t.bleeding)}),l.default.createElement(b,{title:"Temperature",onPress:function(){return e.navigate('TemperatureEditView')},data:y('temperature',t.temperature)}),l.default.createElement(b,{title:"Mucus",onPress:function(){return e.navigate('MucusEditView')},data:y('mucus',t.mucus)}),l.default.createElement(b,{title:"Cervix",onPress:function(){return e.navigate('CervixEditView')},data:y('cervix',t.cervix)}),l.default.createElement(b,{title:"Note",onPress:function(){return e.navigate('NoteEditView')},data:y('note',t.note)}),l.default.createElement(b,{title:"Desire",onPress:function(){return e.navigate('DesireEditView')},data:y('desire',t.desire)}),l.default.createElement(b,{title:"Sex",onPress:function(){return e.navigate('SexEditView')},data:y('sex',t.sex)}),l.default.createElement(b,{title:"Pain",onPress:function(){return e.navigate('PainEditView')},data:y('pain',t.pain)}),l.default.createElement(v,null))))}}]),babelHelpers.inherits(t,e),t})(l.Component);function y(e,t){if(t){var a={bleeding:function(e){if('number'==typeof e.value){var t=""+f.bleeding[e.value];return e.exclude&&(t="( "+t+" )"),t}},temperature:function(e){if('number'==typeof e.value){var t=e.value+" \xb0C - "+e.time;return e.exclude&&(t="( "+t+" )"),t}},mucus:function(e){if(['feeling','texture','value'].every(function(t){return'number'==typeof e[t]})){var t=[f.mucusFeeling[e.feeling],f.mucusTexture[e.texture]].join(', ');return t+="\n"+f.mucusNFP[e.value],e.exclude&&(t="("+t+")"),t}},cervix:function(e){var t=[];if(e.opening>-1&&e.firmness>-1)return t.push(f.cervixOpening[e.opening],f.cervixFirmness[e.firmness]),e.position>-1&&t.push(f.cervixPosition[e.position]),t=t.join(', '),e.exclude&&(t="("+t+")"),t},note:function(e){return e.value},desire:function(e){if('number'==typeof e.value)return""+f.intensity[e.value]},sex:function(e){var t=[];return(e.solo||e.partner)&&t.push('activity'),(e.condom||e.pill||e.iud||e.patch||e.ring||e.implant||e.other)&&t.push('contraceptive'),t.join(', ')},pain:function(e){var t=[];return e&&Object.values(e).some(function(e){return e})&&(Object.keys(e).forEach(function(t){e[t]&&f.pain.push(t)}),t=t.join(', '),e.exclude&&(t="("+t+")")),t}}[e](t);return a.length<45?a:a.slice(0,42)+'...'}}r.default=m;var b=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props.data,t=e?d.default.symptomBoxActive:{},a=e?d.iconStyles.symptomBoxActive:{},r=e?d.default.symptomTextActive:{},n=babelHelpers.extends({},d.default.symptomBox,t),u=babelHelpers.extends({},d.iconStyles.symptomBox,a);return l.default.createElement(i.TouchableOpacity,{onPress:this.props.onPress},l.default.createElement(i.View,{style:n},l.default.createElement(p.default,babelHelpers.extends({name:"thermometer"},u)),l.default.createElement(i.Text,{style:r},this.props.title)),l.default.createElement(i.View,{style:d.default.symptomDataBox},l.default.createElement(i.Text,{style:d.default.symptomDataText},this.props.data)))}}]),babelHelpers.inherits(t,e),t})(l.Component),v=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"render",value:function(){for(var e=i.Dimensions.get('window').width/d.default.symptomBox.width,t=[],a=0;a-1&&e.firmness>-1)return t.push(f.cervixOpening[e.opening],f.cervixFirmness[e.firmness]),e.position>-1&&t.push(f.cervixPosition[e.position]),t=t.join(', '),e.exclude&&(t="("+t+")"),t},note:function(e){return e.value},desire:function(e){if('number'==typeof e.value)return""+f.intensity[e.value]},sex:function(e){var t=[];return(e.solo||e.partner)&&t.push('activity'),(e.condom||e.pill||e.iud||e.patch||e.ring||e.implant||e.other)&&t.push('contraceptive'),t.join(', ')},pain:function(e){var t=[];return e&&Object.values(e).some(function(e){return e})&&(console.log(Object.values(e)),Object.keys(e).forEach(function(n){e[n]&&'note'!==n&&t.push(f.pain[n]),'note'===n&&e.note.length>1&&t.push(e.note)}),t=t.join(', '),e.exclude&&(t="("+t+")")),t}}[e](t);return n.length<45?n:n.slice(0,42)+'...'}}r.default=m;var b=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"render",value:function(){var e=this.props.data,t=e?d.default.symptomBoxActive:{},n=e?d.iconStyles.symptomBoxActive:{},r=e?d.default.symptomTextActive:{},a=babelHelpers.extends({},d.default.symptomBox,t),u=babelHelpers.extends({},d.iconStyles.symptomBox,n);return l.default.createElement(i.TouchableOpacity,{onPress:this.props.onPress},l.default.createElement(i.View,{style:a},l.default.createElement(p.default,babelHelpers.extends({name:"thermometer"},u)),l.default.createElement(i.Text,{style:r},this.props.title)),l.default.createElement(i.View,{style:d.default.symptomDataBox},l.default.createElement(i.Text,{style:d.default.symptomDataText},this.props.data)))}}]),babelHelpers.inherits(t,e),t})(l.Component),v=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"render",value:function(){for(var e=i.Dimensions.get('window').width/d.default.symptomBox.width,t=[],n=0;nl?e=m.temperature.outOfAbsoluteRangeWarning:(ts.max)&&(e=m.temperature.outOfRangeWarning),e?u.Alert.alert(f.shared.warning,e,[{text:f.shared.cancel},{text:f.shared.save,onPress:a.saveTemperature}]):a.saveTemperature()},a.cycleDay=e.cycleDay,a.makeActionButtons=e.makeActionButtons;var r=a.cycleDay.temperature;if(a.state={exclude:!!r&&r.exclude,time:r?r.time:c.LocalTime.now().truncatedTo(b).toString(),isTimePickerVisible:!1,outOfRange:null},r)a.state.temperature=r.value.toString(),r.value===Math.floor(r.value)&&(a.state.temperature=a.state.temperature+".0");else{var l=(0,n.getPreviousTemperature)(a.cycleDay);l&&(a.state.temperature=l.toString(),a.state.isSuggestion=!0)}return a}return babelHelpers.createClass(t,[{key:"render",value:function(){var e=this;return s.default.createElement(u.View,{style:{flex:1}},s.default.createElement(u.ScrollView,null,s.default.createElement(u.View,null,s.default.createElement(u.View,{style:o.default.symptomViewRowInline},s.default.createElement(u.Text,{style:o.default.symptomDayView},"Temperature (\xb0C)"),s.default.createElement(v,{value:this.state.temperature,setState:function(t){return e.setState(t)},isSuggestion:this.state.isSuggestion})),s.default.createElement(u.View,{style:o.default.symptomViewRowInline},s.default.createElement(u.Text,{style:o.default.symptomDayView},"Time"),s.default.createElement(u.TextInput,{style:o.default.temperatureTextInput,onFocus:function(){u.Keyboard.dismiss(),e.setState({isTimePickerVisible:!0})},value:this.state.time})),s.default.createElement(i.default,{mode:"time",isVisible:this.state.isTimePickerVisible,onConfirm:function(t){e.setState({time:t.getHours()+":"+t.getMinutes(),isTimePickerVisible:!1})},onCancel:function(){return e.setState({isTimePickerVisible:!1})}}),s.default.createElement(u.View,{style:o.default.symptomViewRowInline},s.default.createElement(u.Text,{style:o.default.symptomDayView},"Exclude"),s.default.createElement(u.Switch,{onValueChange:function(t){e.setState({exclude:t})},value:this.state.exclude})))),s.default.createElement(d.default,{symptom:"temperature",cycleDay:this.cycleDay,saveAction:function(){return e.checkRangeAndSave()},saveDisabled:''===this.state.temperature||isNaN(Number(this.state.temperature))||g(this.state.time),navigate:this.props.navigate,autoShowDayView:!1}))}}]),babelHelpers.inherits(t,e),t})(s.Component);r.default=h;var v=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"render",value:function(){var e=this,t=[o.default.temperatureTextInput];return this.props.isSuggestion&&t.push(o.default.temperatureTextInputSuggestion),s.default.createElement(u.TextInput,{style:t,onChangeText:function(t){isNaN(Number(t))||e.props.setState({temperature:t,isSuggestion:!1})},keyboardType:"numeric",value:this.props.value,onBlur:this.checkRange,autoFocus:!0})}}]),babelHelpers.inherits(t,e),t})(s.Component);function g(e){try{c.LocalTime.parse(e)}catch(e){return!0}return!1}},543,[26,1,544,471,299,469,536,578,581,542,580]); __d(function(e,l,t,u,a){Object.defineProperty(u,"__esModule",{value:!0}),u.default=void 0;l(a[0]);var r=babelHelpers.interopRequireDefault(l(a[1])),d=(babelHelpers.interopRequireDefault(l(a[2])),r.default);u.default=d},544,[1,545,549]); __d(function(e,t,r,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=babelHelpers.interopRequireWildcard(t(o[0])),i=babelHelpers.interopRequireDefault(t(o[1])),s=t(o[2]),d=babelHelpers.interopRequireDefault(t(o[3])),p=(function(e){function t(){var e,r,n;babelHelpers.classCallCheck(this,t);for(var o=arguments.length,a=new Array(o),i=0;i0?t[e-1]:void 0,a=e=t.status.phases.periOvulatory.start.date}function r(e){return Object.keys(t.status.phases).some(function(a){return t.status.phases[a].cycleDays.some(function(t){return t.temperature&&t.datee})}function s(t,e){return t||r(e)}return function(r,u){var o={drawLtlAt:null,drawFhmLine:!1};if(t.status||t.noMoreCycles||e(r),t.noMoreCycles)return o;if(r=i.start.date;return n=!i.end||e<=i.end.date,u&&n}),e,t):l.fertilityStatus.unknown},n.getCycleStatusForDay=c;var u=babelHelpers.interopRequireDefault(t(i[0])),a=babelHelpers.interopRequireDefault(t(i[1])),l=t(i[2]),f=(0,a.default)(),o=f.getCycleForDay,s=f.getCyclesBefore,y=f.getPreviousCycle;function c(e){var t=o(e);if(!t)return null;var r={cycle:p(t)},n=y(e);if(n){r.previousCycle=p(n);var i=s(n[0]);i&&(r.earlierCycles=i.map(p))}return(0,u.default)(r)}function v(e,t,r){return{preOvulatory:function(){return l.fertilityStatus.infertile},periOvulatory:function(e,t){var r=t.phases.periOvulatory.end;return r&&r.date===e?l.fertilityStatus.fertileUntilEvening:l.fertilityStatus.fertile},postOvulatory:function(){return l.fertilityStatus.infertile}}[e](t,r)}function p(e){return e.reverse(),e}},591,[592,470,536]); -__d(function(e,a,t,l,r){Object.defineProperty(l,"__esModule",{value:!0}),l.default=function e(a){var t=a.cycle,l=a.previousCycle,r=a.earlierCycles,n=void 0===r?[]:r;i([t].concat(babelHelpers.toConsumableArray(n)));var p={phases:{}};if(l){var y=e({cycle:l});if(y.temperatureShift){var f=(0,o.default)(t,[l].concat(babelHelpers.toConsumableArray(n)));if(f&&(p.phases.preOvulatory=f,p.phases.preOvulatory.cycleDays.length===t.length))return p}}p.phases.periOvulatory={start:{date:null},cycleDays:[]};var d=p.phases.periOvulatory;if(p.phases.preOvulatory){var v=p.phases.preOvulatory,b=c.LocalDate.parse(v.end.date).plusDays(1).toString();d.start.date=b;var m=v.cycleDays[v.cycleDays.length-1];d.cycleDays=t.slice(t.indexOf(m)+1)}else d.start.date=t[0].date,d.cycleDays=babelHelpers.toConsumableArray(t);var D=(0,u.default)(t);if(!D.detected)return p;var h=t.indexOf(D.evaluationCompleteDay);var O=(0,s.default)(t,h);if(!O.detected)return p;var C;var g=D.evaluationCompleteDay.date;var q=O.evaluationCompleteDay.date;C=g>q?D.evaluationCompleteDay:O.evaluationCompleteDay;var H=d.cycleDays;var k=H.indexOf(C);p.phases.postOvulatory={start:{date:C.date,time:'18:00'},cycleDays:H.slice(k)};d.cycleDays=H.slice(0,k+1);d.end=p.phases.postOvulatory.start;p.mucusShift=O;p.temperatureShift=D;return p};var u=babelHelpers.interopRequireDefault(a(r[0])),s=babelHelpers.interopRequireDefault(a(r[1])),o=babelHelpers.interopRequireDefault(a(r[2])),c=a(r[3]),n=babelHelpers.interopRequireDefault(a(r[4]));function i(e){e.forEach(function(e){n.default.ok(Array.isArray(e)),n.default.ok(e.length>0),n.default.ok(null!==e[0].bleeding),n.default.equal(typeof e[0].bleeding,'object'),n.default.equal(typeof e[0].bleeding.value,'number'),e.forEach(function(e){n.default.equal(typeof e.date,'string'),n.default.doesNotThrow(function(){return c.LocalDate.parse(e.date)}),e.temperature&&n.default.equal(typeof e.temperature.value,'number'),e.mucus&&n.default.equal(typeof e.mucus.value,'number'),e.mucus&&n.default.ok(e.mucus.value>=0),e.mucus&&n.default.ok(e.mucus.value<5)})})}},592,[593,594,595,469,597]); -__d(function(e,t,r,n,u){function a(e,t,r,n){if(t>r.length-3)return{detected:!1};var u=r.slice(t+1,t+4);return i(u,n)||l(u,n)||c(u,n)||{detected:!1}}function i(e,t){if(!e.every(function(e){return e.temp>t}))return!1;var r=e[1];return!(f(r.temp-t,.1)<.2)&&{detected:!0,rule:0,ltl:t,evaluationCompleteDay:r.originalCycleDay}}function l(e,t){if(e.length<3)return!1;if(!e.every(function(e){return e.temp>t}))return!1;var r=e[2];return!(r.temp<=t)&&{detected:!0,rule:1,ltl:t,evaluationCompleteDay:r.originalCycleDay}}function c(e,t){if(e.length<3)return!1;if(o(e,t)){var r=e[2];if(f(r.temp-t,.1)>=.2)return{detected:!0,rule:2,ltl:t,evaluationCompleteDay:r.originalCycleDay}}return!1}function o(e,t){var r=e[0].temp<=t,n=e[1].temp<=t;return!(!r&&!n||r&&n)}function f(e,t){var r=1/t;return Math.round(e*r)/r}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t=e.filter(function(e){return e.temperature&&!e.temperature.exclude}).map(function(e){return{originalCycleDay:e,temp:f(e.temperature.value,.05)}});function r(e){var r=t.slice(0,e).slice(-6),n=r.map(function(e){return e.temp});return Math.max.apply(Math,babelHelpers.toConsumableArray(n))}for(var n=0;nn&&(n=r.mucus.value),!(n<2)&&r.mucus.value===n){var l=t.slice(c+1,c+4);if(!(l.length<3)){var i=l.some(function(e){return e.mucus.value>=n});if(!i){var a=e.indexOf(r),f=e.slice(a+1,u+1).filter(function(e){return e.mucus&&!e.mucus.exclude}),s=f.every(function(e){return e.mucus.value1});return t>-1?e.slice(0,t):e}},595,[469,596]); -__d(function(e,t,r,a,n){Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var t=e.map(function(e){var t=(0,l.default)({cycle:e});if(t.temperatureShift){var r=t.temperatureShift.firstHighMeasurementDay,a=u.LocalDate.parse(e[0].date),n=u.LocalDate.parse(r.date);return n.compareTo(a)+1}return null}).filter(function(e){return'number'==typeof e}),r=Math.min.apply(Math,babelHelpers.toConsumableArray(t))-8;return r<5?r:t.length>=12?r:null};var u=t(n[0]),l=babelHelpers.interopRequireDefault(t(n[1]))},596,[469,592]); -__d(function(t,e,r,n,i){'use strict';function o(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0;f--)if(s[f]!==l[f])return!1;for(f=s.length-1;f>=0;f--)if(!m(t[u=s[f]],e[u],r,n))return!1;return!0}function w(t,e){if(!t||!e)return!1;if('[object RegExp]'==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function O(t){var e;try{t()}catch(t){e=t}return e}function S(t,e,r,n){var i;if('function'!=typeof e)throw new TypeError('"block" argument must be a function');'string'==typeof r&&(n=r,r=null),i=O(e),n=(r&&r.name?' ('+r.name+').':'.')+(n?' '+n:'.'),t&&!i&&v(i,r,'Missing expected exception'+n);var o='string'==typeof n,u=!t&&a.isError(i),f=!t&&i&&!r;if((u&&o&&w(i,r)||f)&&v(i,r,'Got unwanted exception'+n),t&&i&&r&&!w(i,r)||!t&&i)throw i}g.AssertionError=function(t){var e;this.name='AssertionError',this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=y(d((e=this).actual),128)+' '+e.operator+' '+y(d(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=E(r),u=i.indexOf('\n'+o);if(u>=0){var a=i.indexOf('\n',u+1);i=i.substring(a+1)}this.stack=i}}},a.inherits(g.AssertionError,Error),g.fail=v,g.ok=b,g.equal=function(t,e,r){t!=e&&v(t,e,r,'==',g.equal)},g.notEqual=function(t,e,r){t==e&&v(t,e,r,'!=',g.notEqual)},g.deepEqual=function(t,e,r){m(t,e,!1)||v(t,e,r,'deepEqual',g.deepEqual)},g.deepStrictEqual=function(t,e,r){m(t,e,!0)||v(t,e,r,'deepStrictEqual',g.deepStrictEqual)},g.notDeepEqual=function(t,e,r){m(t,e,!1)&&v(t,e,r,'notDeepEqual',g.notDeepEqual)},g.notDeepStrictEqual=function t(e,r,n){m(e,r,!0)&&v(e,r,n,'notDeepStrictEqual',t)},g.strictEqual=function(t,e,r){t!==e&&v(t,e,r,'===',g.strictEqual)},g.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,'!==',g.notStrictEqual)},g.throws=function(t,e,r){S(!0,t,e,r)},g.doesNotThrow=function(t,e,r){S(!1,t,e,r)},g.ifError=function(t){if(t)throw t};var A=Object.keys||function(t){var e=[];for(var r in t)f.call(t,r)&&e.push(r);return e}},597,[598]); -__d(function(e,t,n,r,o){var i=/%[sdj%]/g;r.format=function(e){if(!j(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(e){return'[Circular]'}default:return e}}),c=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(t)?n.showHidden=t:t&&r._extend(n,t),z(n.showHidden)&&(n.showHidden=!1),z(n.depth)&&(n.depth=2),z(n.colors)&&(n.colors=!1),z(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),f(n,e,n.depth)}function l(e,t){var n=s.styles[t];return n?"\x1b["+s.colors[n][0]+'m'+e+"\x1b["+s.colors[n][1]+'m':e}function a(e,t){return e}function p(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function f(e,t,n){if(e.customInspect&&t&&N(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return j(o)||(o=f(e,o,n)),o}var i=g(e,t);if(i)return i;var u=Object.keys(t),c=p(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(t)),D(t)&&(u.indexOf('message')>=0||u.indexOf('description')>=0))return y(t);if(0===u.length){if(N(t)){var s=t.name?': '+t.name:'';return e.stylize('[Function'+s+']','special')}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),'regexp');if(E(t))return e.stylize(Date.prototype.toString.call(t),'date');if(D(t))return y(t)}var l,a='',v=!1,O=['{','}'];(m(t)&&(v=!0,O=['[',']']),N(t))&&(a=' [Function'+(t.name?': '+t.name:'')+']');return w(t)&&(a=' '+RegExp.prototype.toString.call(t)),E(t)&&(a=' '+Date.prototype.toUTCString.call(t)),D(t)&&(a=' '+y(t)),0!==u.length||v&&0!=t.length?n<0?w(t)?e.stylize(RegExp.prototype.toString.call(t),'regexp'):e.stylize('[Object]','special'):(e.seen.push(t),l=v?d(e,t,n,c,u):u.map(function(r){return h(e,t,n,c,r,v)}),e.seen.pop(),b(l,a,O)):O[0]+a+O[1]}function g(e,t){if(z(t))return e.stylize('undefined','undefined');if(j(t)){var n='\''+JSON.stringify(t).replace(/^"|"$/g,'').replace(/'/g,"\\'").replace(/\\"/g,'"')+'\'';return e.stylize(n,'string')}return S(t)?e.stylize(''+t,'number'):v(t)?e.stylize(''+t,'boolean'):O(t)?e.stylize('null','null'):void 0}function y(e){return'['+Error.prototype.toString.call(e)+']'}function d(e,t,n,r,o){for(var i=[],u=0,c=t.length;u-1&&(c=i?c.split('\n').map(function(e){return' '+e}).join('\n').substr(2):'\n'+c.split('\n').map(function(e){return' '+e}).join('\n')):c=e.stylize('[Circular]','special')),z(u)){if(i&&o.match(/^\d+$/))return c;(u=JSON.stringify(''+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,'name')):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,'string'))}return u+': '+c}function b(e,t,n){return e.reduce(function(e,t){return 0,t.indexOf('\n')>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,'').length+1},0)>60?n[0]+(''===t?'':t+'\n ')+' '+e.join(',\n ')+' '+n[1]:n[0]+t+' '+e.join(', ')+' '+n[1]}function m(e){return Array.isArray(e)}function v(e){return'boolean'==typeof e}function O(e){return null===e}function S(e){return'number'==typeof e}function j(e){return'string'==typeof e}function z(e){return void 0===e}function w(e){return x(e)&&'[object RegExp]'===A(e)}function x(e){return'object'==typeof e&&null!==e}function E(e){return x(e)&&'[object Date]'===A(e)}function D(e){return x(e)&&('[object Error]'===A(e)||e instanceof Error)}function N(e){return'function'==typeof e}function A(e){return Object.prototype.toString.call(e)}function _(e){return e<10?'0'+e.toString(10):e.toString(10)}r.debuglog=function(e){if(z(u)&&(u=process.env.NODE_DEBUG||''),e=e.toUpperCase(),!c[e])if(new RegExp('\\b'+e+'\\b','i').test(u)){var t=process.pid;c[e]=function(){var n=r.format.apply(r,arguments);console.error('%s %d: %s',e,t,n)}}else c[e]=function(){};return c[e]},r.inspect=s,s.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]},s.styles={special:'cyan',number:'yellow',boolean:'yellow',undefined:'grey',null:'bold',string:'green',date:'magenta',regexp:'red'},r.isArray=m,r.isBoolean=v,r.isNull=O,r.isNullOrUndefined=function(e){return null==e},r.isNumber=S,r.isString=j,r.isSymbol=function(e){return'symbol'==typeof e},r.isUndefined=z,r.isRegExp=w,r.isObject=x,r.isDate=E,r.isError=D,r.isFunction=N,r.isPrimitive=function(e){return null===e||'boolean'==typeof e||'number'==typeof e||'string'==typeof e||'symbol'==typeof e||void 0===e},r.isBuffer=t(o[0]);var J=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log('%s - %s',(e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(':'),[e.getDate(),J[e.getMonth()],t].join(' ')),r.format.apply(r,arguments))},r.inherits=t(o[1]),r._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}},598,[599,600]); -__d(function(t,n,o,f,e){o.exports=function(t){return t&&'object'==typeof t&&'function'==typeof t.copy&&'function'==typeof t.fill&&'function'==typeof t.readUInt8}},599,[]); -__d(function(t,o,e,r,p){'function'==typeof Object.create?e.exports=function(t,o){t.super_=o,t.prototype=Object.create(o.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,o){t.super_=o;var e=function(){};e.prototype=o.prototype,t.prototype=new e,t.prototype.constructor=t}},600,[]); -__d(function(e,t,l,a,r){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=babelHelpers.interopRequireWildcard(t(r[0])),i=t(r[1]),n=babelHelpers.interopRequireDefault(t(r[2])),o=babelHelpers.interopRequireDefault(t(r[3])),s=babelHelpers.interopRequireDefault(t(r[4])),p=t(r[5]),d=babelHelpers.interopRequireDefault(t(r[6])),c=babelHelpers.interopRequireDefault(t(r[7])),f=(0,d.default)().getCycleDayNumber,b=o.default.column.label,y=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"passDateToDayView",value:function(e){var t=(0,p.getOrCreateCycleDay)(e);this.props.navigate('CycleDay',{cycleDay:t})}},{key:"shouldComponentUpdate",value:function(e){var t=this;return Object.keys(e).some(function(l){return e[l]!=t.props[l]})}},{key:"render",value:function(){var e=this,t=this.props,l=t.dateString,a=t.y,r=t.temperatureExclude,p=t.bleeding,d=t.mucus,y=t.drawFhmLine,m=t.drawLtlAt,h=t.rightY,g=t.rightTemperatureExclude,v=t.leftY,k=t.leftTemperatureExclude,D=[];if('number'==typeof p&&D.push(u.default.createElement(n.default,{name:"drop",position:"absolute",size:18,color:"#900",style:{marginTop:10,marginLeft:3},key:"bleeding"})),'number'==typeof d){var E=u.default.createElement(i.View,babelHelpers.extends({position:"absolute",top:40,left:s.default.columnMiddle-o.default.mucusIcon.width/2},o.default.mucusIcon,{backgroundColor:o.default.mucusIconShades[d],key:"mucus"}));D.push(E)}if(y){var H=u.default.createElement(i.View,babelHelpers.extends({position:"absolute",top:100,width:o.default.nfpLine.strokeWidth,height:200},o.default.nfpLine,{key:"fhm"}));D.push(H)}if(m){var w=u.default.createElement(i.View,babelHelpers.extends({position:"absolute",width:'100%',top:m},o.default.nfpLine,{key:"ltl"}));D.push(w)}a&&D.push(u.default.createElement(c.default,{y:a,exclude:r,rightY:h,rightTemperatureExclude:g,leftY:v,leftTemperatureExclude:k,key:"dotandline"}));var x=f(l),C=l.split('-').slice(1).join('-'),T=u.default.createElement(i.Text,{style:b.number,y:s.default.cycleDayNumberRowY},x),R=u.default.createElement(i.Text,{style:b.date,y:s.default.dateRowY},C);return D.push(u.default.createElement(i.View,{position:"absolute",bottom:0,key:"date"},T,R)),u.default.createElement(i.TouchableOpacity,{style:o.default.column.rect,key:this.props.index.toString(),onPress:function(){e.passDateToDayView(l)},activeOpacity:1},D)}}]),babelHelpers.inherits(t,e),t})(u.Component);a.default=y},601,[26,1,602,589,588,471,470,604]); -__d(function(e,a,t,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.getImageSource=r.ToolbarAndroid=r.TabBarItemIOS=r.TabBarItem=r.Button=r.default=void 0;var u=babelHelpers.interopRequireDefault(a(o[0])),l=babelHelpers.interopRequireDefault(a(o[1])),b=(0,u.default)(l.default,'Entypo','Entypo.ttf'),d=b;r.default=d;var n=b.Button;r.Button=n;var I=b.TabBarItem;r.TabBarItem=I;var i=b.TabBarItemIOS;r.TabBarItemIOS=i;var f=b.ToolbarAndroid;r.ToolbarAndroid=f;var m=b.getImageSource;r.getImageSource=m},602,[301,603]); -__d(function(e,r,o,i){o.exports={"500px":61696,"500px-with-circle":61697,"add-to-list":61698,"add-user":61699,address:61700,adjust:61701,air:61702,aircraft:61703,"aircraft-landing":61704,"aircraft-take-off":61705,"align-bottom":61706,"align-horizontal-middle":61707,"align-left":61708,"align-right":61709,"align-top":61710,"align-vertical-middle":61711,"app-store":61712,archive:61713,"area-graph":61714,"arrow-bold-down":61715,"arrow-bold-left":61716,"arrow-bold-right":61717,"arrow-bold-up":61718,"arrow-down":61719,"arrow-left":61720,"arrow-long-down":61721,"arrow-long-left":61722,"arrow-long-right":61723,"arrow-long-up":61724,"arrow-right":61725,"arrow-up":61726,"arrow-with-circle-down":61727,"arrow-with-circle-left":61728,"arrow-with-circle-right":61729,"arrow-with-circle-up":61730,attachment:61731,"awareness-ribbon":61732,back:61733,"back-in-time":61734,baidu:61735,"bar-graph":61736,basecamp:61737,battery:61738,"beamed-note":61739,behance:61740,bell:61741,blackboard:61742,block:61743,book:61744,bookmark:61745,bookmarks:61746,bowl:61747,box:61748,briefcase:61749,browser:61750,brush:61751,bucket:61752,bug:61753,cake:61754,calculator:61755,calendar:61756,camera:61757,ccw:61758,chat:61759,check:61760,"chevron-down":61761,"chevron-left":61762,"chevron-right":61763,"chevron-small-down":61764,"chevron-small-left":61765,"chevron-small-right":61766,"chevron-small-up":61767,"chevron-thin-down":61768,"chevron-thin-left":61769,"chevron-thin-right":61770,"chevron-thin-up":61771,"chevron-up":61772,"chevron-with-circle-down":61773,"chevron-with-circle-left":61774,"chevron-with-circle-right":61775,"chevron-with-circle-up":61776,circle:61777,"circle-with-cross":61778,"circle-with-minus":61779,"circle-with-plus":61780,"circular-graph":61781,clapperboard:61782,"classic-computer":61783,clipboard:61784,clock:61785,cloud:61786,code:61787,cog:61788,colours:61789,compass:61790,"controller-fast-backward":61791,"controller-fast-forward":61792,"controller-jump-to-start":61793,"controller-next":61794,"controller-paus":61795,"controller-play":61796,"controller-record":61797,"controller-stop":61798,"controller-volume":61799,copy:61800,"creative-cloud":61801,"creative-commons":61802,"creative-commons-attribution":61803,"creative-commons-noderivs":61804,"creative-commons-noncommercial-eu":61805,"creative-commons-noncommercial-us":61806,"creative-commons-public-domain":61807,"creative-commons-remix":61808,"creative-commons-share":61809,"creative-commons-sharealike":61810,credit:61811,"credit-card":61812,crop:61813,cross:61814,cup:61815,cw:61816,cycle:61817,database:61818,"dial-pad":61819,direction:61820,document:61821,"document-landscape":61822,documents:61823,"dot-single":61824,"dots-three-horizontal":61825,"dots-three-vertical":61826,"dots-two-horizontal":61827,"dots-two-vertical":61828,download:61829,dribbble:61830,"dribbble-with-circle":61831,drink:61832,drive:61833,drop:61834,dropbox:61835,edit:61836,email:61837,"emoji-flirt":61838,"emoji-happy":61839,"emoji-neutral":61840,"emoji-sad":61841,erase:61842,eraser:61843,evernote:61844,export:61845,eye:61846,"eye-with-line":61847,facebook:61848,"facebook-with-circle":61849,feather:61850,fingerprint:61851,flag:61852,flash:61853,flashlight:61854,"flat-brush":61855,flattr:61856,flickr:61857,"flickr-with-circle":61858,"flow-branch":61859,"flow-cascade":61860,"flow-line":61861,"flow-parallel":61862,"flow-tree":61863,flower:61864,folder:61865,"folder-images":61866,"folder-music":61867,"folder-video":61868,forward:61869,foursquare:61870,funnel:61871,"game-controller":61872,gauge:61873,github:61874,"github-with-circle":61875,globe:61876,"google-":61877,"google--with-circle":61878,"google-drive":61879,"google-hangouts":61880,"google-play":61881,"graduation-cap":61882,grid:61883,grooveshark:61884,"hair-cross":61885,hand:61886,heart:61887,"heart-outlined":61888,help:61889,"help-with-circle":61890,home:61891,"hour-glass":61892,houzz:61893,icloud:61894,image:61895,"image-inverted":61896,images:61897,inbox:61898,infinity:61899,info:61900,"info-with-circle":61901,instagram:61902,"instagram-with-circle":61903,install:61904,key:61905,keyboard:61906,"lab-flask":61907,landline:61908,language:61909,laptop:61910,lastfm:61911,"lastfm-with-circle":61912,layers:61913,leaf:61914,"level-down":61915,"level-up":61916,lifebuoy:61917,"light-bulb":61918,"light-down":61919,"light-up":61920,"line-graph":61921,link:61922,linkedin:61923,"linkedin-with-circle":61924,list:61925,location:61926,"location-pin":61927,lock:61928,"lock-open":61929,"log-out":61930,login:61931,loop:61932,magnet:61933,"magnifying-glass":61934,mail:61935,"mail-with-circle":61936,man:61937,map:61938,mask:61939,medal:61940,medium:61941,"medium-with-circle":61942,megaphone:61943,menu:61944,merge:61945,message:61946,mic:61947,minus:61948,mixi:61949,mobile:61950,"modern-mic":61951,moon:61952,mouse:61953,"mouse-pointer":61954,music:61955,network:61956,new:61957,"new-message":61958,news:61959,newsletter:61960,note:61961,notification:61962,"notifications-off":61963,"old-mobile":61964,"old-phone":61965,onedrive:61966,"open-book":61967,palette:61968,"paper-plane":61969,paypal:61970,pencil:61971,phone:61972,picasa:61973,"pie-chart":61974,pin:61975,pinterest:61976,"pinterest-with-circle":61977,plus:61978,popup:61979,"power-plug":61980,"price-ribbon":61981,"price-tag":61982,print:61983,"progress-empty":61984,"progress-full":61985,"progress-one":61986,"progress-two":61987,publish:61988,qq:61989,"qq-with-circle":61990,quote:61991,radio:61992,raft:61993,"raft-with-circle":61994,rainbow:61995,rdio:61996,"rdio-with-circle":61997,"remove-user":61998,renren:61999,reply:62e3,"reply-all":62001,"resize-100-":62002,"resize-full-screen":62003,retweet:62004,rocket:62005,"round-brush":62006,rss:62007,ruler:62008,save:62009,scissors:62010,scribd:62011,"select-arrows":62012,share:62013,"share-alternative":62014,shareable:62015,shield:62016,shop:62017,"shopping-bag":62018,"shopping-basket":62019,"shopping-cart":62020,shuffle:62021,signal:62022,"sina-weibo":62023,skype:62024,"skype-with-circle":62025,slideshare:62026,smashing:62027,sound:62028,"sound-mix":62029,"sound-mute":62030,soundcloud:62031,"sports-club":62032,spotify:62033,"spotify-with-circle":62034,spreadsheet:62035,"squared-cross":62036,"squared-minus":62037,"squared-plus":62038,star:62039,"star-outlined":62040,stopwatch:62041,stumbleupon:62042,"stumbleupon-with-circle":62043,suitcase:62044,swap:62045,swarm:62046,sweden:62047,switch:62048,tablet:62049,"tablet-mobile-combo":62050,tag:62051,text:62052,"text-document":62053,"text-document-inverted":62054,thermometer:62055,"thumbs-down":62056,"thumbs-up":62057,"thunder-cloud":62058,ticket:62059,"time-slot":62060,tools:62061,"traffic-cone":62062,trash:62063,tree:62064,"triangle-down":62065,"triangle-left":62066,"triangle-right":62067,"triangle-up":62068,tripadvisor:62069,trophy:62070,tumblr:62071,"tumblr-with-circle":62072,tv:62073,twitter:62074,"twitter-with-circle":62075,typing:62076,uninstall:62077,unread:62078,untag:62079,upload:62080,"upload-to-cloud":62081,user:62082,users:62083,"v-card":62084,video:62085,"video-camera":62086,vimeo:62087,"vimeo-with-circle":62088,vine:62089,"vine-with-circle":62090,vinyl:62091,vk:62092,"vk-alternitive":62093,"vk-with-circle":62094,voicemail:62095,wallet:62096,warning:62097,water:62098,"windows-store":62099,xing:62100,"xing-with-circle":62101,yelp:62102,youko:62103,"youko-with-circle":62104,youtube:62105,"youtube-with-circle":62106}},603,[]); -__d(function(e,t,r,l,s){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var o=babelHelpers.interopRequireWildcard(t(s[0])),i=t(s[1]),u=babelHelpers.interopRequireDefault(t(s[2])),a=babelHelpers.interopRequireDefault(t(s[3])),p=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"shouldComponentUpdate",value:function(e){var t=this;return Object.keys(e).some(function(r){return e[r]!=t.props[r]})}},{key:"render",value:function(){var e,t,r=this.props.y,l=this.props.exclude;this.props.leftY&&(t=n((this.props.leftY-r)/2+r,r,'left',this.props.leftTemperatureExclude||l));this.props.rightY&&(e=n(r,(r-this.props.rightY)/2+this.props.rightY,'right',this.props.rightTemperatureExclude||l));var s=l?u.default.curveDotsExcluded:u.default.curveDots;return[t,e,o.default.createElement(i.View,{position:"absolute",top:r-s.height/2,left:a.default.columnMiddle-s.width/2,style:s,key:"dot"})]}}]),babelHelpers.inherits(t,e),t})(o.Component);function n(e,t,r,l){var s=a.default.columnWidth,p=-e- -t,n=Math.atan2(p,s/2),d=l?u.default.curveExcluded:u.default.curve,h=s/2/Math.cos(n)+10,c=-(h-s)/2+('right'===r?s/4:-s/4);return o.default.createElement(i.View,babelHelpers.extends({width:h,position:"absolute",top:(e+t)/2-d.borderWidth/2,left:c,style:{transform:[{rotateZ:n+"rad"}]}},d,{key:r}))}l.default=p},604,[26,1,589,588]); -__d(function(e,t,r,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=babelHelpers.interopRequireWildcard(t(s[0])),i=t(s[1]),l=babelHelpers.interopRequireDefault(t(s[2])),u=t(s[3]),o=babelHelpers.interopRequireDefault(t(s[4])),c=babelHelpers.interopRequireDefault(t(s[5])),p=t(s[6]),f=babelHelpers.interopRequireDefault(t(s[7])),b=babelHelpers.interopRequireDefault(t(s[8])),d=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"render",value:function(){return a.default.createElement(i.ScrollView,null,a.default.createElement(i.View,{style:c.default.homeButtons},a.default.createElement(i.View,{style:c.default.homeButton},a.default.createElement(i.Button,{onPress:m,title:p.settings.export.button})),a.default.createElement(i.View,{style:c.default.homeButton},a.default.createElement(i.Button,{title:p.settings.import.button,onPress:g}))))}}]),babelHelpers.inherits(t,e),t})(a.Component);function m(){var e;return regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=(0,f.default)()){t.next=4;break}return t.abrupt("return",h(p.settings.errors.noData));case 4:t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(0),console.error(t.t0),t.abrupt("return",h(p.settings.errors.couldNotConvert));case 10:return t.prev=10,t.next=13,regeneratorRuntime.awrap(l.default.open({title:p.settings.export.title,url:e,subject:p.settings.export.subject,type:'text/csv',showAppsToView:!0}));case 13:t.next=19;break;case 15:return t.prev=15,t.t1=t.catch(10),console.error(t.t1),t.abrupt("return",h(p.settings.export.errors.problemSharing));case 19:case"end":return t.stop()}},null,this,[[0,6],[10,15]])}function g(){i.Alert.alert(p.settings.import.title,p.settings.import.message,[{text:p.settings.import.replaceOption,onPress:function(){return x({deleteExisting:!1})}},{text:p.settings.import.deleteOption,onPress:function(){return x({deleteExisting:!0})}},{text:p.settings.shared.cancel,style:'cancel',onPress:function(){}}])}function x(e){var t,r,n;return regeneratorRuntime.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.deleteExisting,s.prev=1,s.next=4,regeneratorRuntime.awrap(new Promise(function(e,t){u.DocumentPicker.show({filetype:[u.DocumentPickerUtil.allFiles()]},function(r,n){if(r)return t(r);e(n)})}));case 4:r=s.sent,s.next=10;break;case 7:return s.prev=7,s.t0=s.catch(1),s.abrupt("return");case 10:return s.prev=10,s.next=13,regeneratorRuntime.awrap(o.default.readFile(r.uri,'utf8'));case 13:n=s.sent,s.next=19;break;case 16:return s.prev=16,s.t1=s.catch(10),s.abrupt("return",v(p.settings.import.errors.couldNotOpenFile));case 19:return s.prev=19,s.next=22,regeneratorRuntime.awrap((0,b.default)(n,t));case 22:i.Alert.alert(p.settings.import.success.title,p.settings.import.success.message),s.next=28;break;case 25:s.prev=25,s.t2=s.catch(19),v(s.t2.message);case 28:case"end":return s.stop()}},null,this,[[1,7],[10,16],[19,25]])}function h(e){i.Alert.alert(p.settings.shared.errorTitle,e)}function v(e){h(e+"\n\n"+p.settings.import.errors.postFix)}n.default=d},605,[26,1,606,610,611,299,614,615,623]); -__d(function(e,r,t,n,a){var i=babelHelpers.interopRequireWildcard(r(a[0])),s=r(a[1]),o=babelHelpers.interopRequireDefault(r(a[2])),l=babelHelpers.interopRequireDefault(r(a[3])),u=babelHelpers.interopRequireDefault(r(a[4])),c=s.StyleSheet.create({actionSheetContainer:{flex:1,paddingTop:10,paddingBottom:0,justifyContent:'flex-end',backgroundColor:'rgba(0, 0, 0, 0.5)'},buttonContainer:{overflow:'hidden',backgroundColor:'white',paddingBottom:5,paddingTop:5}}),p=(function(e){function r(){return babelHelpers.classCallCheck(this,r),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(r).apply(this,arguments))}return babelHelpers.createClass(r,[{key:"componentDidMount",value:function(){this.backButtonHandler=this.backButtonHandler.bind(this),s.BackHandler.addEventListener('backPress',this.backButtonHandler)}},{key:"componentWillUnmount",value:function(){s.BackHandler.removeEventListener('backPress',this.backButtonHandler)}},{key:"backButtonHandler",value:function(){return!!this.props.visible&&(this.props.onCancel(),!0)}},{key:"render",value:function(){return i.createElement(o.default,babelHelpers.extends({visible:this.props.visible},this.props),i.createElement(s.View,{style:c.actionSheetContainer},i.createElement(s.TouchableOpacity,{style:{flex:1},onPress:this.props.onCancel}),i.createElement(l.default,{visible:this.props.visible},i.createElement(s.View,{style:c.buttonContainer},this.props.children))))}}]),babelHelpers.inherits(r,e),r})(i.Component),d=function(e){var r,t;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.url&&!e.urls){n.next=25;break}return r=e.urls||[e.url],n.prev=2,n.next=5,regeneratorRuntime.awrap(Promise.all(r.map(function(e){return new Promise(function(r,t){s.NativeModules.RNShare.isBase64File(e,function(e){t(e)},function(e){r(e)})})})));case 5:if(t=n.sent,t.includes(!0)){n.next=9;break}return n.abrupt("return",Promise.resolve(!0));case 9:return n.next=11,regeneratorRuntime.awrap(s.PermissionsAndroid.check(s.PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE));case 11:if(!n.sent){n.next=14;break}return n.abrupt("return",Promise.resolve(!0));case 14:return n.next=16,regeneratorRuntime.awrap(s.PermissionsAndroid.request(s.PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE));case 16:if(n.sent!==s.PermissionsAndroid.RESULTS.GRANTED){n.next=19;break}return n.abrupt("return",Promise.resolve());case 19:throw new Error('Write Permission not available');case 22:return n.prev=22,n.t0=n.catch(2),n.abrupt("return",Promise.reject(n.t0));case 25:return n.abrupt("return",Promise.resolve(!0));case 26:case"end":return n.stop()}},null,this,[[2,22]])},b=(function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"open",value:function(e){return new Promise(function(r,t){d(e).then(function(){s.NativeModules.RNShare.open(e,function(e){return t({error:e})},function(e){r({message:e})})}).catch(function(e){return t(e)})})}},{key:"shareSingle",value:function(e){return new Promise(function(r,t){d(e).then(function(){s.NativeModules.RNShare.shareSingle(e,function(e){return t({error:e})},function(e){return r({message:e})})}).catch(function(e){return t(e)})})}}]),e})();b.Social={FACEBOOK:s.NativeModules.RNShare.FACEBOOK||'facebook',PAGESMANAGER:s.NativeModules.RNShare.PAGESMANAGER||'pagesmanager',TWITTER:s.NativeModules.RNShare.TWITTER||'twitter',WHATSAPP:s.NativeModules.RNShare.WHATSAPP||'whatsapp',INSTAGRAM:s.NativeModules.RNShare.INSTAGRAM||'instagram',GOOGLEPLUS:s.NativeModules.RNShare.GOOGLEPLUS||'googleplus',EMAIL:s.NativeModules.RNShare.EMAIL||'email'},t.exports=b,t.exports.Overlay=o.default,t.exports.Sheet=l.default,t.exports.Button=u.default,t.exports.ShareSheet=p},606,[26,1,607,608,609]); -__d(function(e,t,l,a,r){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var i=babelHelpers.interopRequireWildcard(t(r[0])),n=t(r[1]),o=n.StyleSheet.create({fullOverlay:{top:0,bottom:0,left:0,right:0,backgroundColor:'transparent',position:'absolute'},emptyOverlay:{width:0,height:0,backgroundColor:'transparent',position:'absolute'}}),s=(function(e){function t(){var e,l,a;babelHelpers.classCallCheck(this,t);for(var r=arguments.length,i=new Array(r),s=0;s1&&void 0!==arguments[1]?arguments[1]:{};return i.mkdir(p(e),r).then(function(){})},moveFile:function(e,r){return i.moveFile(p(e),p(r)).then(function(){})},copyFile:function(e,r){return i.copyFile(p(e),p(r)).then(function(){})},pathForBundle:function(e){return i.pathForBundle(e)},pathForGroup:function(e){return i.pathForGroup(e)},getFSInfo:function(){return i.getFSInfo()},getAllExternalFilesDirs:function(){return i.getAllExternalFilesDirs()},unlink:function(e){return i.unlink(p(e)).then(function(){})},exists:function(e){return i.exists(p(e))},stopDownload:function(e){i.stopDownload(e)},resumeDownload:function(e){i.resumeDownload(e)},isResumable:function(e){return i.isResumable(e)},stopUpload:function(e){i.stopUpload(e)},completeHandlerIOS:function(e){return i.completeHandlerIOS(e)},readDir:function(e){return g(e,i.readDir)},readDirAssets:function(e){if(!i.readDirAssets)throw new Error('readDirAssets is not available on this platform');return g(e,i.readDirAssets)},existsAssets:function(e){if(!i.existsAssets)throw new Error('existsAssets is not available on this platform');return i.existsAssets(e)},readdir:function(e){return m.readDir(p(e)).then(function(e){return e.map(function(e){return e.name})})},setReadable:function(e,r,n){return i.setReadable(e,r,n).then(function(e){return e})},stat:function(e){return i.stat(p(e)).then(function(r){return{path:e,ctime:new Date(1e3*r.ctime),mtime:new Date(1e3*r.mtime),size:r.size,mode:r.mode,originalFilepath:r.originalFilepath,isFile:function(){return r.type===d},isDirectory:function(){return r.type===c}}})},readFile:function(e,r){return h(e,r,i.readFile)},read:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,t=arguments.length>3?arguments[3]:void 0,o={encoding:'utf8'};return t&&('string'==typeof t?o.encoding=t:'object'==typeof t&&(o=t)),i.read(p(e),r,n).then(function(e){var r;if('utf8'===o.encoding)r=l.decode(s.decode(e));else if('ascii'===o.encoding)r=s.decode(e);else{if('base64'!==o.encoding)throw new Error('Invalid encoding type "'+String(o.encoding)+'"');r=e}return r})},readFileAssets:function(e,r){if(!i.readFileAssets)throw new Error('readFileAssets is not available on this platform');return h(e,r,i.readFileAssets)},hash:function(e,r){return i.hash(p(e),r)},copyFileAssets:function(e,r){if(!i.copyFileAssets)throw new Error('copyFileAssets is not available on this platform');return i.copyFileAssets(p(e),p(r)).then(function(){})},copyAssetsFileIOS:function(e,r,n,t){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:'contain';return i.copyAssetsFileIOS(e,r,n,t,o,a,s)},copyAssetsVideoIOS:function(e,r){return i.copyAssetsVideoIOS(e,r)},writeFile:function(e,r,n){var t,o={encoding:'utf8'};if(n&&('string'==typeof n?o.encoding=n:'object'==typeof n&&(o=n)),'utf8'===o.encoding)t=s.encode(l.encode(r));else if('ascii'===o.encoding)t=s.encode(r);else{if('base64'!==o.encoding)throw new Error('Invalid encoding type "'+o.encoding+'"');t=r}return i.writeFile(p(e),t).then(function(){})},appendFile:function(e,r,n){var t,o={encoding:'utf8'};if(n&&('string'==typeof n?o.encoding=n:'object'==typeof n&&(o=n)),'utf8'===o.encoding)t=s.encode(l.encode(r));else if('ascii'===o.encoding)t=s.encode(r);else{if('base64'!==o.encoding)throw new Error('Invalid encoding type "'+o.encoding+'"');t=r}return i.appendFile(p(e),t)},write:function(e,r,n,t){var o,a={encoding:'utf8'};if(t&&('string'==typeof t?a.encoding=t:'object'==typeof t&&(a=t)),'utf8'===a.encoding)o=s.encode(l.encode(r));else if('ascii'===a.encoding)o=s.encode(r);else{if('base64'!==a.encoding)throw new Error('Invalid encoding type "'+a.encoding+'"');o=r}return void 0===n&&(n=-1),i.write(p(e),o,n).then(function(){})},downloadFile:function(e){if('object'!=typeof e)throw new Error('downloadFile: Invalid value for argument `options`');if('string'!=typeof e.fromUrl)throw new Error('downloadFile: Invalid value for property `fromUrl`');if('string'!=typeof e.toFile)throw new Error('downloadFile: Invalid value for property `toFile`');if(e.headers&&'object'!=typeof e.headers)throw new Error('downloadFile: Invalid value for property `headers`');if(e.background&&'boolean'!=typeof e.background)throw new Error('downloadFile: Invalid value for property `background`');if(e.progressDivider&&'number'!=typeof e.progressDivider)throw new Error('downloadFile: Invalid value for property `progressDivider`');if(e.readTimeout&&'number'!=typeof e.readTimeout)throw new Error('downloadFile: Invalid value for property `readTimeout`');if(e.connectionTimeout&&'number'!=typeof e.connectionTimeout)throw new Error('downloadFile: Invalid value for property `connectionTimeout`');var r=f(),n=[];e.begin&&n.push(a.addListener('DownloadBegin-'+r,e.begin)),e.progress&&n.push(a.addListener('DownloadProgress-'+r,e.progress)),e.resumable&&n.push(a.addListener('DownloadResumable-'+r,e.resumable));var t={jobId:r,fromUrl:e.fromUrl,toFile:p(e.toFile),headers:e.headers||{},background:!!e.background,progressDivider:e.progressDivider||0,readTimeout:e.readTimeout||15e3,connectionTimeout:e.connectionTimeout||5e3};return{jobId:r,promise:i.downloadFile(t).then(function(e){return n.forEach(function(e){return e.remove()}),e}).catch(function(e){return Promise.reject(e)})}},uploadFiles:function(e){if(!i.uploadFiles)return{jobId:-1,promise:Promise.reject(new Error('`uploadFiles` is unsupported on this platform'))};var r=f(),n=[];if('object'!=typeof e)throw new Error('uploadFiles: Invalid value for argument `options`');if('string'!=typeof e.toUrl)throw new Error('uploadFiles: Invalid value for property `toUrl`');if(!Array.isArray(e.files))throw new Error('uploadFiles: Invalid value for property `files`');if(e.headers&&'object'!=typeof e.headers)throw new Error('uploadFiles: Invalid value for property `headers`');if(e.fields&&'object'!=typeof e.fields)throw new Error('uploadFiles: Invalid value for property `fields`');if(e.method&&'string'!=typeof e.method)throw new Error('uploadFiles: Invalid value for property `method`');e.begin&&n.push(a.addListener('UploadBegin-'+r,e.begin)),e.beginCallback&&e.beginCallback instanceof Function&&n.push(a.addListener('UploadBegin-'+r,e.beginCallback)),e.progress&&n.push(a.addListener('UploadProgress-'+r,e.progress)),e.progressCallback&&e.progressCallback instanceof Function&&n.push(a.addListener('UploadProgress-'+r,e.progressCallback));var t={jobId:r,toUrl:e.toUrl,files:e.files,headers:e.headers||{},fields:e.fields||{},method:e.method||'POST'};return{jobId:r,promise:i.uploadFiles(t).then(function(e){return n.forEach(function(e){return e.remove()}),e})}},touch:function(e,r,n){if(n&&!(n instanceof Date))throw new Error('touch: Invalid value for argument `ctime`');if(r&&!(r instanceof Date))throw new Error('touch: Invalid value for argument `mtime`');return i.touch(p(e),r&&r.getTime(),0)},MainBundlePath:i.RNFSMainBundlePath,CachesDirectoryPath:i.RNFSCachesDirectoryPath,ExternalCachesDirectoryPath:i.RNFSExternalCachesDirectoryPath,DocumentDirectoryPath:i.RNFSDocumentDirectoryPath,ExternalDirectoryPath:i.RNFSExternalDirectoryPath,ExternalStorageDirectoryPath:i.RNFSExternalStorageDirectoryPath,TemporaryDirectoryPath:i.RNFSTemporaryDirectoryPath,LibraryDirectoryPath:i.RNFSLibraryDirectoryPath,PicturesDirectoryPath:i.RNFSPicturesDirectoryPath};n.exports=m},611,[1,612,613]); -__d(function(e,t,r,n,o){!(function(t){var o='object'==typeof n&&n,a='object'==typeof r&&r&&r.exports==o&&r,c='object'==typeof e&&e;c.global!==c&&c.window!==c||(t=c);var i=function(e){this.message=e};(i.prototype=new Error).name='InvalidCharacterError';var h=function(e){throw new i(e)},d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',f=/[\t\n\f\r ]/g,s={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&h("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,o,a=e.length%3,c='',i=-1,f=e.length-a;++i>18&63)+d.charAt(o>>12&63)+d.charAt(o>>6&63)+d.charAt(63&o);return 2==a?(t=e.charCodeAt(i)<<8,r=e.charCodeAt(++i),c+=d.charAt((o=t+r)>>10)+d.charAt(o>>4&63)+d.charAt(o<<2&63)+'='):1==a&&(o=e.charCodeAt(i),c+=d.charAt(o>>2)+d.charAt(o<<4&63)+'=='),c},decode:function(e){var t=(e=String(e).replace(f,'')).length;t%4==0&&(t=(e=e.replace(/==?$/,'')).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&h('Invalid character: the string to be decoded is not correctly encoded.');for(var r,n,o=0,a='',c=-1;++c>(-2*o&6)));return a},version:'0.1.0'};if('function'==typeof define&&'object'==typeof define.amd&&define.amd)define(function(){return s});else if(o&&!o.nodeType)if(a)a.exports=s;else for(var A in s)s.hasOwnProperty(A)&&(o[A]=s[A]);else t.base64=s})(this)},612,[]); -__d(function(r,n,t,e,o){!(function(n){var o='object'==typeof e&&e,i='object'==typeof t&&t&&t.exports==o&&t,f='object'==typeof r&&r;f.global!==f&&f.window!==f||(n=f);var u,a,c,d=String.fromCharCode;function h(r){for(var n,t,e=[],o=0,i=r.length;o=55296&&n<=56319&&o65535&&(o+=d((n-=65536)>>>10&1023|55296),n=56320|1023&n),o+=d(n);return o}function l(r){if(r>=55296&&r<=57343)throw Error('Lone surrogate U+'+r.toString(16).toUpperCase()+' is not a scalar value')}function s(r,n){return d(r>>n&63|128)}function p(r){if(0==(4294967168&r))return d(r);var n='';return 0==(4294965248&r)?n=d(r>>6&31|192):0==(4294901760&r)?(l(r),n=d(r>>12&15|224),n+=s(r,6)):0==(4292870144&r)&&(n=d(r>>18&7|240),n+=s(r,12),n+=s(r,6)),n+=d(63&r|128)}function y(){if(c>=a)throw Error('Invalid byte index');var r=255&u[c];if(c++,128==(192&r))return 63&r;throw Error('Invalid continuation byte')}function b(){var r,n;if(c>a)throw Error('Invalid byte index');if(c==a)return!1;if(r=255&u[c],c++,0==(128&r))return r;if(192==(224&r)){if((n=(31&r)<<6|y())>=128)return n;throw Error('Invalid continuation byte')}if(224==(240&r)){if((n=(15&r)<<12|y()<<6|y())>=2048)return l(n),n;throw Error('Invalid continuation byte')}if(240==(248&r)&&(n=(7&r)<<18|y()<<12|y()<<6|y())>=65536&&n<=1114111)return n;throw Error('Invalid UTF-8 detected')}var w={version:'2.1.2',encode:function(r){for(var n=h(r),t=n.length,e=-1,o='';++e>>6)+i(128|63&r):i(224|r>>>12&15)+i(128|r>>>6&63)+i(128|63&r);var r=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return i(240|r>>>18&7)+i(128|r>>>12&63)+i(128|r>>>6&63)+i(128|63&r)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(t){return t.replace(d,f)},h=function(t){var r=[0,2,1][t.length%3],e=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[u.charAt(e>>>18),u.charAt(e>>>12&63),r>=2?'=':u.charAt(e>>>6&63),r>=1?'=':u.charAt(63&e)].join('')},g=t.btoa?function(r){return t.btoa(r)}:function(t){return t.replace(/[\s\S]{1,3}/g,h)},p=n?n.from&&Uint8Array&&n.from!==Uint8Array.from?function(t){return(t.constructor===n.constructor?t:n.from(t)).toString('base64')}:function(t){return(t.constructor===n.constructor?t:new n(t)).toString('base64')}:function(t){return g(s(t))},A=function(t,r){return r?p(String(t)).replace(/[+\/]/g,function(t){return'+'==t?'-':'_'}).replace(/=/g,''):p(String(t))},l=new RegExp(['[\xc0-\xdf][\x80-\xbf]','[\xe0-\xef][\x80-\xbf]{2}','[\xf0-\xf7][\x80-\xbf]{3}'].join('|'),'g'),b=function(t){switch(t.length){case 4:var r=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return i(55296+(r>>>10))+i(56320+(1023&r));case 3:return i((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return i((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},y=function(t){return t.replace(l,b)},B=function(t){var r=t.length,e=r%4,n=(r>0?a[t.charAt(0)]<<18:0)|(r>1?a[t.charAt(1)]<<12:0)|(r>2?a[t.charAt(2)]<<6:0)|(r>3?a[t.charAt(3)]:0),o=[i(n>>>16),i(n>>>8&255),i(255&n)];return o.length-=[0,0,2,1][e],o.join('')},C=t.atob?function(r){return t.atob(r)}:function(t){return t.replace(/[\s\S]{1,4}/g,B)},v=n?n.from&&Uint8Array&&n.from!==Uint8Array.from?function(t){return(t.constructor===n.constructor?t:n.from(t,'base64')).toString()}:function(t){return(t.constructor===n.constructor?t:new n(t,'base64')).toString()}:function(t){return y(C(t))},S=function(t){return v(String(t).replace(/[-_]/g,function(t){return'-'==t?'+':'/'}).replace(/[^A-Za-z0-9\+\/]/g,''))};if(t.Base64={VERSION:"2.4.8",atob:C,btoa:g,fromBase64:S,toBase64:A,utob:s,encode:A,encodeURI:function(t){return A(t,!0)},btou:y,decode:S,noConflict:function(){var r=t.Base64;return t.Base64=c,r}},'function'==typeof Object.defineProperty){var m=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};t.Base64.extendString=function(){Object.defineProperty(String.prototype,'fromBase64',m(function(){return S(this)})),Object.defineProperty(String.prototype,'toBase64',m(function(t){return A(this,t)})),Object.defineProperty(String.prototype,'toBase64URI',m(function(){return A(this,!0)}))}}return t.Meteor&&(Base64=t.Base64),void 0!==e&&e.exports?e.exports.Base64=t.Base64:'function'==typeof define&&define.amd&&define([],function(){return t.Base64}),{Base64:t.Base64}})},617,[618]); -__d(function(t,r,e,n,i){'use strict';var o=r(i[0]),u=r(i[1]),s=r(i[2]);n.Buffer=a,n.SlowBuffer=function t(r,e){if(!(this instanceof t))return new t(r,e);var n=new a(r,e);delete n.parent;return n},n.INSPECT_MAX_BYTES=50,a.poolSize=8192;var h={};function f(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t){return this instanceof a?(a.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),'number'==typeof t?c(this,t):'string'==typeof t?l(this,t,arguments.length>1?arguments[1]:'utf8'):p(this,t)):arguments.length>1?new a(t,arguments[1]):new a(t)}function c(t,r){if(t=v(t,r<0?0:0|B(r)),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e>>1&&(t.parent=h),t}function B(t){if(t>=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+' bytes');return 0|t}function R(t,r){'string'!=typeof t&&(t=''+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case'ascii':case'binary':case'raw':case'raws':return e;case'utf8':case'utf-8':return K(t).length;case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return 2*e;case'hex':return e>>>1;case'base64':return W(t).length;default:if(n)return K(t).length;r=(''+r).toLowerCase(),n=!0}}function A(t,r,e){var n=!1;if(r|=0,e=void 0===e||e===1/0?this.length:0|e,t||(t='utf8'),r<0&&(r=0),e>this.length&&(e=this.length),e<=r)return'';for(;;)switch(t){case'hex':return C(this,r,e);case'utf8':case'utf-8':return m(this,r,e);case'ascii':return O(this,r,e);case'binary':return x(this,r,e);case'base64':return S(this,r,e);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return M(this,r,e);default:if(n)throw new TypeError('Unknown encoding: '+t);t=(t+'').toLowerCase(),n=!0}}function U(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new Error('Invalid hex string');n>o/2&&(n=o/2);for(var u=0;u239?4:f>223?3:f>191?2:1;if(i+c<=e)switch(c){case 1:f<128&&(a=f);break;case 2:128==(192&(o=t[i+1]))&&(h=(31&f)<<6|63&o)>127&&(a=h);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(h=(15&f)<<12|(63&o)<<6|63&u)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:o=t[i+1],u=t[i+2],s=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&s)&&(h=(15&f)<<18|(63&o)<<12|(63&u)<<6|63&s)>65535&&h<1114112&&(a=h)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return D(n)}a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:(function(){function t(){}try{var r=new Uint8Array(1);return r.foo=function(){return 42},r.constructor=t,42===r.foo()&&r.constructor===t&&'function'==typeof r.subarray&&0===r.subarray(1,1).byteLength}catch(t){return!1}})(),a.TYPED_ARRAY_SUPPORT?(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array):(a.prototype.length=void 0,a.prototype.parent=void 0),a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,r){if(!a.isBuffer(t)||!a.isBuffer(r))throw new TypeError('Arguments must be Buffers');if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString('hex',0,r).match(/.{2}/g).join(' '),this.length>r&&(t+=' ... ')),''},a.prototype.compare=function(t){if(!a.isBuffer(t))throw new TypeError('Argument must be a Buffer');return this===t?0:a.compare(this,t)},a.prototype.indexOf=function(t,r){if(r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(r<0&&(r=Math.max(this.length+r,0)),'string'==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(a.isBuffer(t))return e(this,t,r);if('number'==typeof t)return a.TYPED_ARRAY_SUPPORT&&'function'===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):e(this,[t],r);function e(t,r,e){for(var n=-1,i=0;e+io)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError('attempt to write outside buffer bounds');n||(n='utf8');for(var u=!1;;)switch(n){case'hex':return U(this,t,r,e);case'utf8':case'utf-8':return _(this,t,r,e);case'ascii':return P(this,t,r,e);case'binary':return b(this,t,r,e);case'base64':return T(this,t,r,e);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return L(this,t,r,e);default:if(u)throw new TypeError('Unknown encoding: '+n);n=(''+n).toLowerCase(),u=!0}},a.prototype.toJSON=function(){return{type:'Buffer',data:Array.prototype.slice.call(this._arr||this,0)}};var Y=4096;function D(t){var r=t.length;if(r<=Y)return String.fromCharCode.apply(String,t);for(var e='',n=0;nn)&&(e=n);for(var i='',o=r;oe)throw new RangeError('Trying to access beyond buffer length')}function k(t,r,e,n,i,o){if(!a.isBuffer(t))throw new TypeError('buffer must be a Buffer instance');if(r>i||rt.length)throw new RangeError('index out of range')}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function q(t,r,e,n,i,o){if(r>i||rt.length)throw new RangeError('index out of range');if(e<0)throw new RangeError('index out of range')}function J(t,r,e,n,i){return i||q(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),u.write(t,r,e,n,23,4),e+4}function X(t,r,e,n,i){return i||q(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),u.write(t,r,e,n,52,8),e+8}a.prototype.slice=function(t,r){var e,n=this.length;if(t=~~t,r=void 0===r?n:~~r,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},a.prototype.readUInt8=function(t,r){return r||F(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,r){return r||F(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,r){return r||F(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,r){return r||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,r){return r||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||F(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},a.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||F(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},a.prototype.readInt8=function(t,r){return r||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,r){r||F(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt16BE=function(t,r){r||F(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt32LE=function(t,r){return r||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,r){return r||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,r){return r||F(t,4,this.length),u.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,r){return r||F(t,4,this.length),u.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,r){return r||F(t,8,this.length),u.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,r){return r||F(t,8,this.length),u.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,r,e,n){t=+t,r|=0,e|=0,n||k(this,t,r,e,Math.pow(2,8*e),0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},a.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},a.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},a.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},a.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},a.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},a.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,s=t<0?1:0;for(this[r]=255&t;++o>0)-s&255;return r+e},a.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,s=t<0?1:0;for(this[r+o]=255&t;--o>=0&&(u*=256);)this[r+o]=(t/u>>0)-s&255;return r+e},a.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},a.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},a.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},a.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},a.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},a.prototype.writeFloatLE=function(t,r,e){return J(this,t,r,!0,e)},a.prototype.writeFloatBE=function(t,r,e){return J(this,t,r,!1,e)},a.prototype.writeDoubleLE=function(t,r,e){return X(this,t,r,!0,e)},a.prototype.writeDoubleBE=function(t,r,e){return X(this,t,r,!1,e)},a.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError('sourceStart out of bounds');if(n<0)throw new RangeError('sourceEnd out of bounds');n>this.length&&(n=this.length),t.length-r=0;i--)t[i+r]=this[i+e];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i=this.length)throw new RangeError('start out of bounds');if(e<0||e>this.length)throw new RangeError('end out of bounds');var n;if('number'==typeof t)for(n=r;n55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error('Invalid code point');if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function Q(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function W(t){return o.toByteArray($(t))}function tt(t,r,e,n){for(var i=0;i=r.length||i>=t.length);i++)r[i+e]=t[i];return i}},618,[619,620,621]); -__d(function(t,r,a,e,n){var h='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';!(function(t){'use strict';var r='undefined'!=typeof Uint8Array?Uint8Array:Array,a='+'.charCodeAt(0),e='/'.charCodeAt(0),n='0'.charCodeAt(0),c='a'.charCodeAt(0),A='A'.charCodeAt(0),o='-'.charCodeAt(0),i='_'.charCodeAt(0);function u(t){var r=t.charCodeAt(0);return r===a||r===o?62:r===e||r===i?63:r0)throw new Error('Invalid string. Length must be a multiple of 4');var o=t.length;c='='===t.charAt(o-2)?2:'='===t.charAt(o-1)?1:0,A=new r(3*t.length/4-c),n=c>0?t.length-4:t.length;var i=0;function d(t){A[i++]=t}for(a=0,e=0;a>16),d((65280&h)>>8),d(255&h);return 2===c?d(255&(h=u(t.charAt(a))<<2|u(t.charAt(a+1))>>4)):1===c&&(d((h=u(t.charAt(a))<<10|u(t.charAt(a+1))<<4|u(t.charAt(a+2))>>2)>>8&255),d(255&h)),A},t.fromByteArray=function(t){var r,a,e,n,c=t.length%3,A="";function o(t){return h.charAt(t)}for(r=0,e=t.length-c;r>18&63)+o(n>>12&63)+o(n>>6&63)+o(63&n);switch(c){case 1:A+=o((a=t[t.length-1])>>2),A+=o(a<<4&63),A+='==';break;case 2:A+=o((a=(t[t.length-2]<<8)+t[t.length-1])>>10),A+=o(a>>4&63),A+=o(a<<2&63),A+='='}return A}})(void 0===e?this.base64js={}:e)},619,[]); -__d(function(a,o,t,h,r){h.read=function(a,o,t,h,r){var M,f,w=8*r-h-1,p=(1<>1,n=-7,N=t?r-1:0,e=t?-1:1,u=a[o+N];for(N+=e,M=u&(1<<-n)-1,u>>=-n,n+=w;n>0;M=256*M+a[o+N],N+=e,n-=8);for(f=M&(1<<-n)-1,M>>=-n,n+=h;n>0;f=256*f+a[o+N],N+=e,n-=8);if(0===M)M=1-i;else{if(M===p)return f?NaN:1/0*(u?-1:1);f+=Math.pow(2,h),M-=i}return(u?-1:1)*f*Math.pow(2,M-h)},h.write=function(a,o,t,h,r,M){var f,w,p,i=8*M-r-1,n=(1<>1,e=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,u=h?0:M-1,s=h?1:-1,c=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,f=n):(f=Math.floor(Math.log(o)/Math.LN2),o*(p=Math.pow(2,-f))<1&&(f--,p*=2),(o+=f+N>=1?e/p:e*Math.pow(2,1-N))*p>=2&&(f++,p/=2),f+N>=n?(w=0,f=n):f+N>=1?(w=(o*p-1)*Math.pow(2,r),f+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,r),f=0));r>=8;a[t+u]=255&w,u+=s,w/=256,r-=8);for(f=f<0;a[t+u]=255&f,u+=s,f/=256,i-=8);a[t+u-s]|=128*c}},620,[]); -__d(function(r,t,n,a,o){var c={}.toString;n.exports=Array.isArray||function(r){return'[object Array]'==c.call(r)}},621,[]); -__d(function(e,r,n,u,t){Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(){return(function e(r,n){var u=a.schema[r];return Object.keys(u).reduce(function(r,t){var a=n?[n,t].join('.'):t,c=u[t].objectType;return c?(r.push.apply(r,babelHelpers.toConsumableArray(e(c,a))),r):(r.push(a),r)},[])})('CycleDay')};var a=r(t[0])},622,[471]); -__d(function(e,t,r,n,u){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var r,n,u,a;return regeneratorRuntime.async(function(p){for(;;)switch(p.prev=p.next){case 0:return r={bool:function(e){return'true'===e.toLowerCase()||'false'!==e.toLowerCase()&&e},int:n=function(e){return isNaN(Number(e))||isNaN(parseFloat(e))?e:Number(e)},float:n,double:n,string:function(e){return e}},u={ignoreEmpty:!0,colParser:(0,l.default)().reduce(function(e,t){var n=t.split('.'),u=s(i.schema.CycleDay,n);return e[t]=function(e){return''===e?null:r[u](e)},e},{})},p.next=5,regeneratorRuntime.awrap((0,o.default)(u).fromString(e).on('header',c));case 5:f(a=p.sent),t?(0,i.tryToImportWithDelete)(a):(0,i.tryToImportWithoutDelete)(a);case 8:case"end":return p.stop()}},null,this)};var o=babelHelpers.interopRequireDefault(t(u[0])),a=babelHelpers.interopRequireDefault(t(u[1])),i=t(u[2]),l=babelHelpers.interopRequireDefault(t(u[3]));function c(e){var t=(0,l.default)();if(!e.every(function(e){return t.indexOf(e)>-1})){var r="Expected CSV column titles to be "+t.join();throw new Error(r)}}function f(e){e.forEach(function e(t){Object.keys(t).forEach(function(r){(0,a.default)(t[r])&&(Object.values(t[r]).every(function(e){return null===e})?t[r]=null:e(t[r]))})})}function s(e,t){if(1===t.length)return e[t[0]].type;var r=e[t[0]].objectType;return s(i.schema[r],t.slice(1))}},623,[624,625,471,622]); -__d(function(t,e,r,n,i){r.exports=(function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&("function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag")&&Object.defineProperty(t,"function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag",{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=32)})([function(t,e){var r;r=(function(){return this})();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";var n=r(6),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(5);o.inherits=r(2);var s=r(22),a=r(13);o.inherits(f,s);for(var u=i(a.prototype),c=0;c=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return N(t).length;e=(""+e).toLowerCase(),n=!0}}function _(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o})(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return(function(t){var e=t.length;if(e<=j)return String.fromCharCode.apply(String,t);for(var r="",n=0;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return g(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function A(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function F(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function M(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return o||M(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return o||M(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||A(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(t){return n.toByteArray((function(t){if((t=(function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")})(t).replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t})(t))}function V(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(0))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!(function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}})();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(e=t.exports=r(22)).Stream=e,e.Readable=e,e.Writable=r(13),e.Duplex=r(1),e.Transform=r(27),e.PassThrough=r(45)},function(t,e,r){"use strict";(function(e,n,i){var o=r(6);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!(function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(void 0),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t})(e,t)}}t.exports=m;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;m.WritableState=y;var c=r(5);c.inherits=r(2);var l,f={deprecate:r(44)},h=r(23),p=r(7).Buffer,d=i.Uint8Array||function(){},_=r(24);function v(){}function y(t,e){a=a||r(1),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!(function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if((function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0})(r),e)!(function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),S(t,e))})(t,r,n,e,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?u(b,t,r,s,i):b(t,r,s,i)}})(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function m(t){if(a=a||r(1),!(l.call(m,this)||this instanceof a))return new m(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function g(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function b(t,e,r,n){r||(function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))})(t,e),e.pendingcb--,n(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,g(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(g(t,e,!1,e.objectMode?1:c.length,c,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function C(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(t,e){var r=E(e);return r&&((function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(C,t,e)):(e.prefinished=!0,t.emit("prefinish")))})(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(m,h),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},(function(){try{Object.defineProperty(y.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}})(),"function"!=typeof Symbol||"function"==typeof Symbol&&!Symbol.hasInstance||"function"!=typeof Function.prototype["function"==typeof Symbol?Symbol.hasInstance:"@@hasInstance"]?l=function(t){return t instanceof this}:(l=Function.prototype["function"==typeof Symbol?Symbol.hasInstance:"@@hasInstance"],Object.defineProperty(m,"function"==typeof Symbol?Symbol.hasInstance:"@@hasInstance",{value:function(t){return!!l.call(this,t)||this===m&&t&&t._writableState instanceof y}})),m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&(function(t){return p.isBuffer(t)||t instanceof d})(t);return s&&!p.isBuffer(t)&&(t=(function(t){return p.from(t)})(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=v),n.ended?(function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)})(this,r):(s||(function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i})(this,n,t,r))&&(n.pendingcb++,i=(function(t,e,r,n,i,o){if(!r){var s=(function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=p.from(e,r)),e})(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||(function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1})(this,n,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=_.destroy,m.prototype._undestroy=_.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(4),r(25).setImmediate,r(0))},function(t,e,r){(function(e,r,n){t.exports=(function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof _dereq_&&_dereq_;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){return i(e[s][1][t]||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},u.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},u.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},u.prototype._reset=function(){this._isTickUsed=!1},r.exports=u,r.exports.firstLineError=i},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=r(o),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var h={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,s,void 0,l,h),c._then(a,u,void 0,l,h),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var i=t("./promise")();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(t){}return i},e.exports=i},{"./promise":22}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){var r=t("./util"),n=r.canEvaluate;function i(t){return(function(t,n){var i;if(null!=t&&(i=t[n]),"function"!=typeof i){var o="Object "+r.classString(t)+" has no method '"+r.toString(n)+"'";throw new e.TypeError(o)}return i})(t,this.pop()).apply(t,this)}function o(t){return t[this]}function s(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}r.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(i,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=s;else if(n){var r=(void 0)(t);e=null!==r?r:o}else e=o;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,u=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=u,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){var i,o,s,a=r._getDomain,u=r._async,c=t("./errors").Warning,l=t("./util"),f=l.canAttachTrace,h=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,p=/\((?:timers\.js):\d+:\d+\)/,d=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,_=null,v=null,y=!1,m=!(0==l.env("BLUEBIRD_DEBUG")),g=!(0==l.env("BLUEBIRD_WARNINGS")||!m&&!l.env("BLUEBIRD_WARNINGS")),b=!(0==l.env("BLUEBIRD_LONG_STACK_TRACES")||!m&&!l.env("BLUEBIRD_LONG_STACK_TRACES")),w=0!=l.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(g||!!l.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},r.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},r.prototype._notifyUnhandledRejectionIsHandled=function(){q("rejectionHandled",i,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),q("unhandledRejection",o,t,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(t,e,r){return U(t,e,r||this)},r.onPossiblyUnhandledRejection=function(t){var e=a();o="function"==typeof t?null===e?t:l.domainBind(e,t):void 0},r.onUnhandledRejectionHandled=function(t){var e=a();i="function"==typeof t?null===e?t:l.domainBind(e,t):void 0};var E=function(){};r.longStackTraces=function(){if(u.haveItemsQueued()&&!J.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!J.longStackTraces&&Y()){var t=r.prototype._captureStackTrace,e=r.prototype._attachExtraTrace;J.longStackTraces=!0,E=function(){if(u.haveItemsQueued()&&!J.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=t,r.prototype._attachExtraTrace=e,n.deactivateLongStackTraces(),u.enableTrampoline(),J.longStackTraces=!1},r.prototype._captureStackTrace=D,r.prototype._attachExtraTrace=I,n.activateLongStackTraces(),u.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return J.longStackTraces&&Y()};var C=(function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return l.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!l.global.dispatchEvent(r)}}return"function"==typeof Event?(t=new Event("CustomEvent"),l.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!l.global.dispatchEvent(r)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),l.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!l.global.dispatchEvent(r)})}catch(t){}return function(){return!1}})(),S=l.isNode?function(){return e.emit.apply(e,arguments)}:l.global?function(t){var e="on"+t.toLowerCase(),r=l.global[e];return!!r&&(r.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function x(t,e){return{promise:e}}var j={promiseCreated:x,promiseFulfilled:x,promiseRejected:x,promiseResolved:x,promiseCancelled:x,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:x},R=function(t){var e=!1;try{e=S.apply(null,arguments)}catch(t){u.throwLater(t),e=!0}var r=!1;try{r=C(t,j[t].apply(null,arguments))}catch(t){u.throwLater(t),r=!0}return r||e};function k(){return!1}function T(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+l.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function P(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?l.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function O(){return this._onCancelField}function A(t){this._onCancelField=t}function F(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}r.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?r.longStackTraces():!t.longStackTraces&&r.hasLongStackTraces()&&E()),"warnings"in t){var e=t.warnings;J.warnings=!!e,w=J.warnings,l.isObject(e)&&"wForgottenReturn"in e&&(w=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!J.cancellation){if(u.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=F,r.prototype._propagateFrom=L,r.prototype._onCancel=O,r.prototype._setOnCancel=A,r.prototype._attachCancellationCallback=P,r.prototype._execute=T,M=L,J.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!J.monitoring?(J.monitoring=!0,r.prototype._fireEvent=R):!t.monitoring&&J.monitoring&&(J.monitoring=!1,r.prototype._fireEvent=k)),r},r.prototype._fireEvent=k,r.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(t){},r.prototype._attachCancellationCallback=function(t){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(t,e){};var M=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function B(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t}function D(){this._trace=new X(this._peekContext())}function I(t,e){if(f(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=H(t);l.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),l.notEnumerableProp(t,"__stackCleaned__",!0)}}}function U(t,e,n){if(J.warnings){var i,o=new c(t);if(e)n._attachExtraTrace(o);else if(J.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var s=H(o);o.stack=s.message+"\n"+s.stack.join("\n")}R("warning",o)||V(o,"",!0)}}function N(t){for(var e=[],r=0;r0?(function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e})(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:N(e)}}function V(t,e,r){if("undefined"!=typeof console){var n;if(l.isObject(t)){var i=t.stack;n=e+v(i,t)}else n=e+String(t);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function q(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){u.throwLater(t)}"unhandledRejection"===t?R(t,r,n)||i||V(r,"Unhandled rejection "):R(t,n)}function W(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():l.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+(function(t){return t.length<41?t:t.substr(0,38)+"..."})(e)+">, no stack trace)"}function Y(){return"function"==typeof G}var $=function(){return!1},z=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Q(t){var e=t.match(z);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function X(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);G(this,X),e>32&&this.uncycle()}l.inherits(X,Error),n.CapturedTrace=X,X.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;for(n=(t=this._length=n)-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var a=n>0?e[n-1]:this;s=0;--c)e[c]._length=u,u++;return}}}},X.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=H(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(N(i.stack.split("\n"))),i=i._parent;!(function(t){for(var e=t[0],r=1;r=0;--a)if(n[a]===o){s=a;break}for(a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}})(n),(function(t){for(var e=0;e=0)return _=/@/,v=e,y=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return"stack"in i||!n||"number"!=typeof Error.stackTraceLimit?(v=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?W(e):e.toString()},null):(_=t,v=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})})();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(t){console.warn(t)},l.isNode&&e.stderr.isTTY?s=function(t,e){var r=e?"\x1b[33m":"\x1b[31m";console.warn(r+t+"\x1b[0m\n")}:l.isNode||"string"!=typeof(new Error).stack||(s=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var J={warnings:g,longStackTraces:!1,cancellation:!1,monitoring:!1};return b&&r.longStackTraces(),{longStackTraces:function(){return J.longStackTraces},warnings:function(){return J.warnings},cancellation:function(){return J.cancellation},monitoring:function(){return J.monitoring},propagateFromFunction:function(){return M},boundValueFunction:function(){return B},checkForgottenReturns:function(t,e,r,n,i){if(void 0===t&&null!==e&&w){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),u=N(a),c=u.length-1;c>=0;--c){var l=u[c];if(!p.test(l)){var f=l.match(d);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0){var h=u[0];for(c=0;c0&&(s="\n"+a[c-1]);break}}}var _="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;n._warn(_,!0,e)}},setBounds:function(t,e){if(Y()){for(var r,n,i=t.stack.split("\n"),o=e.stack.split("\n"),s=-1,a=-1,u=0;u=a||($=function(t){if(h.test(t))return!0;var e=Q(t);return!!(e&&e.fileName===r&&s<=e.line&&e.line<=a)})}},warn:U,deprecated:function(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),U(r)},CapturedTrace:X,fireDomEvent:C,fireGlobalEvent:S}}},{"./errors":12,"./util":36}],10:[function(t,e,r){"use strict";e.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];return n instanceof t&&n.suppressUnhandledRejections(),this.caught(r,function(){return n})}}},{}],11:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.reduce,n=t.all;function i(){return n(this)}t.prototype.each=function(t){return r(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return r(t,n,e,e)}}},{}],12:[function(t,e,r){"use strict";var n,i,o=t("./es5"),s=o.freeze,a=t("./util"),u=a.inherits,c=a.notEnumerableProp;function l(t,e){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:e),c(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var f=l("Warning","warning"),h=l("CancellationError","cancellation error"),p=l("TimeoutError","timeout error"),d=l("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(t){n=l("TypeError","type error"),i=l("RangeError","range error")}for(var _="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v<_.length;++v)"function"==typeof Array.prototype[_[v]]&&(d.prototype[_[v]]=Array.prototype[_[v]]);o.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var y=0;function m(t){if(!(this instanceof m))return new m(t);c(this,"name","OperationalError"),c(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(c(this,"message",t.message),c(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+1).join(" ");for(var r=0;r1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function f(){return p.call(this,this.promise._target()._settledValue())}function h(t){if(!l(this,t))return s.e=t,s}function p(t){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),t);if(u===n)return u;if(void 0!==u){i._setReturnedNonUndefined();var p=r(u,i);if(p instanceof e){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new o("late cancellation observer");return i._attachExtraTrace(d),s.e=d,s}p.isPending()&&p._attachCancellationCallback(new c(this))}return p._then(f,h,void 0,this,void 0)}}}return i.isRejected()?(l(this),s.e=t,s):(l(this),t)}return u.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){l(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new u(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,p,p)},e.prototype.tap=function(t){return this._passThrough(t,1,p)},e.prototype.tapCatch=function(t){var r=arguments.length;if(1===r)return this._passThrough(t,1,void 0,p);var n,o=new Array(r-1),s=0;for(n=0;n0&&"function"==typeof arguments[e]&&(t=arguments[e]);var n=[].slice.call(arguments);t&&n.pop();var i=new r(n).promise();return void 0!==t?i.spread(t):i}}},{"./util":36}],18:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,s){var a=e._getDomain,u=t("./util"),c=u.tryCatch,l=u.errorObj,f=e._async;function h(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=a();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function p(t,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+u.classString(r));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return new h(t,r,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}u.inherits(h,r),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),a=this._preservedValues,u=this._limit;if(r<0){if(n[r=-1*r-1]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=t,this._queue.push(r),!1;null!==a&&(a[r]=t);var f=this._promise,h=this._callback,p=f._boundValue();f._pushContext();var d=c(h).call(p,t,r,o),_=f._popContext();if(s.checkForgottenReturns(d,_,null!==a?"Promise.filter":"Promise.map",f),d===l)return this._reject(d.e),!0;var v=i(d,this._promise);if(v instanceof e){var y=(v=v._target())._bitField;if(0==(50397184&y))return u>=1&&this._inFlight++,n[r]=v,v._proxy(this,-1*(r+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}n[r]=d}return++this._totalResolved>=o&&(null!==a?this._filter(n,a):this._resolve(n),!0)},h.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];n=s.isArray(c)?a(t).apply(l,c):a(t).call(l,c)}else n=a(t)();var f=u._popContext();return o.checkForgottenReturns(n,f,"Promise.try",u),u._resolveFromSyncValue(n),u},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){"use strict";var n=t("./util"),i=n.maybeWrapAsError,o=t("./errors").OperationalError,s=t("./es5"),a=/^(?:name|message|stack|cause)$/;function u(t){var e;if((function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype})(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=s.keys(t),i=0;i1){var r,n=new Array(e-1),i=0;for(r=0;r0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+c.classString(t);arguments.length>1&&(r+=", "+c.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},T.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},T.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+c.classString(t)):this.all()._then(t,void 0,void 0,y,void 0)},T.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},T.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new b(this).promise()},T.prototype.error=function(t){return this.caught(c.originatesFromRejection,t)},T.getNewLibraryCopy=r.exports,T.is=function(t){return t instanceof T},T.fromNode=T.fromCallback=function(t){var e=new T(v);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=k(t)(j(e,r));return n===R&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},T.all=function(t){return new b(t).promise()},T.cast=function(t){var e=g(t);return e instanceof T||((e=new T(v))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},T.resolve=T.fulfilled=T.cast,T.reject=T.rejected=function(t){var e=new T(v);return e._captureStackTrace(),e._rejectCallback(t,!0),e},T.setScheduler=function(t){if("function"!=typeof t)throw new d("expecting a function but got "+c.classString(t));return h.setScheduler(t)},T.prototype._then=function(t,e,r,n,i){var o=void 0!==i,s=o?i:new T(v),u=this._target(),l=u._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=a();if(0!=(50397184&l)){var p,d,y=u._settlePromiseCtx;0!=(33554432&l)?(d=u._rejectionHandler0,p=t):0!=(16777216&l)?(d=u._fulfillmentHandler0,p=e,u._unsetRejectionIsUnhandled()):(y=u._settlePromiseLateCancellationObserver,d=new _("late cancellation observer"),u._attachExtraTrace(d),p=e),h.invoke(y,u,{handler:null===f?p:"function"==typeof p&&c.domainBind(f,p),promise:s,receiver:n,value:d})}else u._addCallbacks(t,e,s,n,f);return s},T.prototype._length=function(){return 65535&this._bitField},T.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},T.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},T.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},T.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},T.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},T.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},T.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},T.prototype._isFinal=function(){return(4194304&this._bitField)>0},T.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},T.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},T.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},T.prototype._setAsyncGuaranteed=function(){h.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},T.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==u)return void 0===e&&this._isBound()?this._boundValue():e},T.prototype._promiseAt=function(t){return this[4*t-4+2]},T.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},T.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},T.prototype._boundValue=function(){},T.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=u),this._addCallbacks(e,r,n,i,null)},T.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=u),this._addCallbacks(r,n,i,o,null)},T.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:c.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:c.domainBind(i,e));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof t&&(this[s+0]=null===i?t:c.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:c.domainBind(i,e))}return this._setLength(o+1),o},T.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},T.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var r=g(t,this);if(!(r instanceof T))return this._fulfill(t);e&&this._propagateFrom(r,2);var i=r._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;a>>16)){if(t===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():h.settlePromises(this))}},T.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return h.fatalError(t,c.isNode);(65535&e)>0?h.settlePromises(this):this._ensurePossibleRejectionHandled()}},T.prototype._fulfillPromises=function(t,e){for(var r=1;r0){if(0!=(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},T.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},T.defer=T.pending=function(){return C.deprecated("Promise.defer","new Promise"),{promise:new T(v),resolve:P,reject:O}},c.notEnumerableProp(T,"_makeSelfResolutionError",n),t("./method")(T,v,g,o,C),t("./bind")(T,v,g,C),t("./cancel")(T,b,o,C),t("./direct_resolve")(T),t("./synchronous_inspection")(T),t("./join")(T,b,g,v,h,a),T.Promise=T,T.version="3.5.1",t("./map.js")(T,b,o,g,v,C),t("./call_get.js")(T),t("./using.js")(T,o,g,E,v,C),t("./timers.js")(T,v,C),t("./generators.js")(T,o,v,g,s,C),t("./nodeify.js")(T),t("./promisify.js")(T,v),t("./props.js")(T,b,g,o),t("./race.js")(T,v,g,o),t("./reduce.js")(T,b,o,g,v,C),t("./settle.js")(T,b,C),t("./some.js")(T,b,o),t("./filter.js")(T,v),t("./each.js")(T,v),t("./any.js")(T),c.toFastProperties(T),c.toFastProperties(T.prototype),A({a:1}),A({b:2}),A({c:3}),A(1),A(function(){}),A(void 0),A(!1),A(new T(v)),C.setBounds(f.firstLineError,c.lastLineError),T}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){var s=t("./util");function a(t){var n=this._promise=new e(r);t instanceof e&&n._propagateFrom(t,3),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.isArray,s.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function t(r,o){var a=n(this._values,this._promise);if(a instanceof e){var u=(a=a._target())._bitField;if(this._values=a,0==(50397184&u))return this._promise._setAsyncGuaranteed(),a._then(t,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve((function(t){switch(o){case-2:return[];case-3:return{};case-6:return new Map}})());else{var c=i("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(c,!1)}},a.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,s=null,a=0;a=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var r=0;r=this._length){var r;if(this._isMap)r=(function(t){for(var e=new o,r=t.length/2|0,n=0;n>1},e.prototype.props=function(){return f(this)},e.props=function(t){return f(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){"use strict";function n(t){this._capacity=t,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(t){return this._capacity=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){"use strict";e.exports=function(e,r,n){var i=t("./util"),o=t("./errors").RangeError,s=t("./errors").AggregateError,a=i.isArray,u={};function c(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(t),i=r.promise();return r.setHowMany(e),r.init(),i}i.inherits(c,r),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=a(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(t){this._howMany=t},c.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(t){this._values.push(t)},c.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return l(t,e)},e.prototype.some=function(t){return l(this,t)},e._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(t,e,r){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,r){"use strict";e.exports=function(e,r){var n=t("./util"),i=n.errorObj,o=n.isObject,s={}.hasOwnProperty;return function(t,a){if(o(t)){if(t instanceof e)return t;var u=(function(t){try{return(function(t){return t.then})(t)}catch(t){return i.e=t,i}})(t);if(u===i){a&&a._pushContext();var c=e.reject(u.e);return a&&a._popContext(),c}if("function"==typeof u)return(function(t){try{return s.call(t,"_promise0")}catch(t){return!1}})(t)?(c=new e(r),t._then(c._fulfill,c._reject,void 0,c,null),c):(function(t,o,s){var a=new e(r),u=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var c=!0,l=n.tryCatch(o).call(t,function(t){a&&(a._resolveCallback(t),a=null)},function(t){a&&(a._rejectCallback(t,c,!0),a=null)});return c=!1,a&&l===i&&(a._rejectCallback(l.e,!0,!0),a=null),u})(t,u,a)}return t}}},{"./util":36}],34:[function(t,e,r){"use strict";e.exports=function(e,r,n){var i=t("./util"),o=e.TimeoutError;function s(t){this.handle=t}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,i){var o,u;return void 0!==i?(o=e.resolve(i)._then(a,null,null,t,void 0),n.cancellation()&&i instanceof e&&o._setOnCancel(i)):(o=new e(r),u=setTimeout(function(){o._fulfill()},+t),n.cancellation()&&o._setOnCancel(new s(u)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};function c(t){return clearTimeout(this.handle),t}function l(t){throw clearTimeout(this.handle),t}e.prototype.delay=function(t){return u(t,this)},e.prototype.timeout=function(t,e){var r,a;t=+t;var u=new s(setTimeout(function(){r.isPending()&&(function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()})(r,e,a)},t));return n.cancellation()?(a=this.then(),(r=a._then(c,l,void 0,u,void 0))._setOnCancel(u)):r=this._then(c,l,void 0,u,void 0),r}}},{"./util":36}],35:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,s){var a=t("./util"),u=t("./errors").TypeError,c=t("./util").inherits,l=a.errorObj,f=a.tryCatch,h={};function p(t){setTimeout(function(){throw t},0)}function d(t,r){var i=0,s=t.length,a=new e(o);return(function o(){if(i>=s)return a._fulfill();var u=(function(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e})(t[i++]);if(u instanceof e&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),t.promise)}catch(t){return p(t)}if(u instanceof e)return u._then(o,p,null,null,null)}o()})(),a}function _(t,e,r){this._data=t,this._promise=e,this._context=r}function v(t,e,r){this.constructor$(t,e,r)}function y(t){return _.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function m(t){this.length=t,this.promise=null,this[t-1]=null}_.prototype.data=function(){return this._data},_.prototype.promise=function(){return this._promise},_.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},_.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==h?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},_.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},c(v,_),v.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},m.prototype._resultCancelled=function(){for(var t=this.length,r=0;r0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new v(t,this,i());throw new u}}},{"./errors":12,"./util":36}],36:[function(t,n,i){"use strict";var o,s=t("./es5"),a="undefined"==typeof navigator,u={e:{}},c="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r?r:void 0!==this?this:null;function l(){try{var t=o;return o=null,t.apply(this,arguments)}catch(t){return u.e=t,u}}function f(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function h(t,e,r){if(f(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return s.defineProperty(t,e,n),t}var p=(function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=d.test(t+"")&&s.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}},isIdentifier:function(t){return _.test(t)},inheritedDataKeys:p,getDataPropertyOrDefault:function(t,e,r){if(!s.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0},thrower:function(t){throw t},isArray:s.isArray,asArray:w,notEnumerableProp:h,isPrimitive:f,isObject:function(t){return"function"==typeof t||"object"==typeof t&&null!==t},isError:y,canEvaluate:a,errorObj:u,tryCatch:function(t){return o=t,l},inherits:function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype},withAppended:function(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r10||t[0]>0})(),x.isNode&&x.toFastProperties(e);try{throw new Error}catch(t){x.lastLineError=t}n.exports=x},{"./es5":13}]},{},[4])(4),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,r(4),r(0),r(25).setImmediate)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(!e.eol&&t)for(var r=0,n=t.length;r0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=(function(t){return c.from(t)})(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):j(t,s)):w(t,s,e,!1))):n||(s.reading=!1)),(function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=(function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t})(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(x,t):x(t))}function x(t){p("emit readable"),t.emit("readable"),P(t)}function j(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=(function(t,e,r){var n;return to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0==(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i})(t,e):(function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0==(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r})(t,e),n})(t,e.buffer,e.decoder),r);var r}function A(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function L(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?A(this):S(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&A(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&A(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=e&&!1===e.end||t===n.stdout||t===n.stderr?m:c;function c(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",function e(n,i){p("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",_),t.removeListener("unpipe",e),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",d),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())});var l=(function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,P(t))}})(r);t.on("drain",l);var f=!1,h=!1;function d(e){p("ondata"),h=!1,!1!==t.write(e)||h||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==L(o.pipes,t))&&!f&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function _(e){p("onerror",e),m(),t.removeListener("error",_),0===a(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),m()}function y(){p("onfinish"),t.removeListener("close",v),m()}function m(){p("unpipe"),r.unpipe(t)}return r.on("data",d),(function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)})(t,"error",_),t.once("close",v),t.once("finish",y),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},g.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(43),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(0))},function(t,e,r){"use strict";var n=r(7).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=(function(t){var e=(function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}})(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t})(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=(function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"\ufffd"}})(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0})(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=o;var n=r(1),i=r(5);function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length-1&&r.push(t[n]);return r},e.trimLeft=String.prototype.trimLeft?function(t){return t.trimLeft()}:function(t){return t.replace(/^\s+/,"")},e.trimRight=String.prototype.trimRight?function(t){return t.trimRight()}:function(t){return t.replace(/\s+$/,"")}}).call(this,r(3).Buffer)},function(t,e,r){"use strict";var n=this&&this.__extends||(function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=(function(t){function e(e,r,n){var i=t.call(this,"Error: "+e+". JSON Line number: "+r+(n?" near: "+n:""))||this;return i.err=e,i.line=r,i.extra=n,i.name="CSV Parse Error",i}return n(e,t),e.column_mismatched=function(t,r){return new e("column_mismatched",t,r)},e.unclosed_quote=function(t,r){return new e("unclosed_quote",t,r)},e.fromJSON=function(t){return new e(t.err,t.line,t.extra)},e.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},e})(Error);e.default=i},function(t,e,r){var n=r(17),i=r(68),o=r(69),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){t.exports=r(33)},function(t,e,r){"use strict";var n=r(34),i=function(t,e){return new n.Converter(t,e)};i.Converter=n.Converter,t.exports=i},function(t,e,r){"use strict";var n=this&&this.__extends||(function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}})(),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(35),s=r(50),a=r(51),u=i(r(14)),c=r(52),l=r(105),f=(function(t){function e(e,r){void 0===r&&(r={});var n=t.call(this,r)||this;return n.options=r,n.params=s.mergeParams(e),n.runtime=a.initParseRuntime(n),n.result=new l.Result(n),n.processor=new c.ProcessorLocal(n),n.once("error",function(t){setTimeout(function(){n.result.processError(t),n.emit("done",t)},0)}),n.once("done",function(){n.processor.destroy()}),n}return n(e,t),e.prototype.preRawData=function(t){return this.runtime.preRawDataHook=t,this},e.prototype.preFileLine=function(t){return this.runtime.preFileLineHook=t,this},e.prototype.subscribe=function(t,e,r){return this.parseRuntime.subscribe={onNext:t,onError:e,onCompleted:r},this},e.prototype.fromFile=function(t,e){var n=this,i=r(!(function(){var t=new Error("Cannot find module 'fs'");throw t.code="MODULE_NOT_FOUND",t})());return i.exists(t,function(r){r?i.createReadStream(t,e).pipe(n):n.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},e.prototype.fromStream=function(t){return t.pipe(this),this},e.prototype.fromString=function(t){t.toString();var e=new o.Readable,r=0;return e._read=function(e){if(r>=t.length)this.push(null);else{var n=t.substr(r,e);this.push(n),r+=e}},this.fromStream(e)},e.prototype.then=function(t,e){var r=this;return new u.default(function(n,i){r.parseRuntime.then={onfulfilled:function(e){n(t?t(e):e)},onrejected:function(t){e?n(e(t)):i(t)}}})},Object.defineProperty(e.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),e.prototype._transform=function(t,e,r){var n=this;this.processor.process(t).then(function(t){if(t.length>0)return n.runtime.started=!0,n.result.processResult(t)}).then(function(){n.emit("drained"),r()},function(t){n.runtime.hasError=!0,n.runtime.error=t,n.emit("error",t),r()})},e.prototype._flush=function(t){var e=this;this.processor.flush().then(function(t){if(t.length>0)return e.result.processResult(t)}).then(function(){e.processEnd(t)},function(r){e.emit("error",r),t()})},e.prototype.processEnd=function(t){this.result.endProcess(),this.emit("done"),t()},Object.defineProperty(e.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),e})(o.Transform);e.Converter=f},function(t,e,r){t.exports=i;var n=r(11).EventEmitter;function i(){n.call(this)}r(2)(i,n),i.Readable=r(12),i.Writable=r(46),i.Duplex=r(47),i.Transform=r(48),i.PassThrough=r(49),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",c),t.on("error",c),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){for(var e,r=c(t),n=r[0],s=r[1],a=new o(3*(n+s)/4-s),u=0,l=s>0?n-4:n,f=0;f>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===s&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,a[u++]=255&e),1===s&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function f(t,e,r){for(var n,i=[],o=e;o>1,l=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,_=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*_}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){},function(t,e,r){"use strict";var n=r(7).Buffer,i=r(42);function o(t,e,r){t.copy(e,r)}t.exports=(function(){function t(){!(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)o(r.data,e,i),i+=r.data.length,r=r.next;return e},t})(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t,e){!(function(t,r){"use strict";if(!t.setImmediate){var n,i=1,o={},s=!1,a=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){l(t)})}:(function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}})()?(function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&l(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(r){t.postMessage(e+r,"*")}})():t.MessageChannel?(function(){var t=new MessageChannel;t.port1.onmessage=function(t){l(t.data)},n=function(e){t.port2.postMessage(e)}})():a&&"onreadystatechange"in a.createElement("script")?(function(){var t=a.documentElement;n=function(e){var r=a.createElement("script");r.onreadystatechange=function(){l(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}})():n=function(t){setTimeout(l,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r0){var e=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(e,!0).then(function(e){return t.runtime.csvLineBuffer&&t.runtime.csvLineBuffer.length>0?s.default.reject(p.default.unclosed_quote(t.runtime.parsedLineNumber,t.runtime.csvLineBuffer.toString())):s.default.resolve(e)})}return s.default.resolve([])},r.prototype.destroy=function(){return s.default.resolve()},Object.defineProperty(r.prototype,"needEmitEol",{get:function(){return void 0===this._needEmitEol&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"needEmitHead",{get:function(){return void 0===this._needEmitHead&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),r.prototype.process=function(t,e){var r,n=this;return void 0===e&&(e=!1),r=e?t.toString():a.prepareData(t,this.converter.parseRuntime),s.default.resolve().then(function(){return n.runtime.preRawDataHook?n.runtime.preRawDataHook(r):r}).then(function(t){return t&&t.length>0?n.processCSV(t,e):s.default.resolve([])})},r.prototype.processCSV=function(t,e){var r=this,n=this.params,i=this.runtime;i.eol||u.default(t,i),this.needEmitEol&&!this.eolEmitted&&i.eol&&(this.converter.emit("eol",i.eol),this.eolEmitted=!0),n.ignoreEmpty&&!i.started&&(t=l.trimLeft(t));var o=c.stringToLines(t,i);return e?(o.lines.push(o.partial),o.partial=""):this.prependLeftBuf(l.bufFromString(o.partial)),o.lines.length>0?(i.preFileLineHook?this.runPreLineHook(o.lines):s.default.resolve(o.lines)).then(function(t){return i.started||r.runtime.headers?r.processCSVBody(t):r.processDataWithHead(t)}):s.default.resolve([])},r.prototype.processDataWithHead=function(t){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var e="",r=[];t.length;){var n=e+t.shift(),i=this.rowSplit.parse(n);if(i.closed){r=i.cells,e="";break}e=n+u.default(n,this.runtime)}if(this.prependLeftBuf(l.bufFromString(e)),0===r.length)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=r}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(t)},r.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var t=this.runtime.headers,e=0;e=e.length)i();else if(r.preFileLineHook){var o=e[n],s=r.preFileLineHook(o,r.parsedLineNumber+n);if(n++,s&&s.then)s.then(function(o){e[n-1]=o,t(e,r,n,i)});else{for(e[n-1]=s;n0?t.concat([r.csvLineBuffer,e]):e})(e,r);r.csvLineBuffer=void 0;var o=(function(t,e){var r=t.length-1;if(0!=(128&t[r])){for(;128==(192&t[r]);)r--;r--}return r!=t.length-1?(e.csvLineBuffer=t.slice(r+1),t.slice(0,r+1)):t})(n,r).toString("utf8");return!1===r.started?i.default(o):o}}).call(this,r(3).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(56);t.exports=function(t){return"string"==typeof t&&65279===t.charCodeAt(0)?t.slice(1):e.isBuffer(t)&&n(t)&&239===t[0]&&187===t[1]&&191===t[2]?t.slice(3):t}}).call(this,r(3).Buffer)},function(t,e){t.exports=function(t){for(var e=0;e0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),t.prototype.parse=function(t){if(0===t.length||this.conv.parseParam.ignoreEmpty&&0===t.trim().length)return{cells:[],closed:!0};var e=this.quote,r=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||"auto"===this.conv.parseRuntime.delimiter.toLowerCase())&&(this.conv.parseRuntime.delimiter=this.getDelimiter(t)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var n=this.conv.parseRuntime.delimiter,i=t.split(n);if("off"===e){if(r)for(var o=0;or&&(n=e,r=i)}),n},t.prototype.isQuoteOpen=function(t){var e=this.quote,r=this.escape;return t[0]===e&&(t[1]!==e||t[1]===r&&(t[2]===e||2===t.length))},t.prototype.isQuoteClose=function(t){var e=this.quote,r=this.escape;this.conv.parseParam.trim&&(t=o.trimRight(t));for(var n=0,i=t.length-1;t[i]===e||t[i]===r;)i--,n++;return n%2!=0},t.prototype.escapeQuote=function(t){var e="es|"+this.quote+"|"+this.escape;void 0===this.cachedRegExp[e]&&(this.cachedRegExp[e]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var r=this.cachedRegExp[e];return t.replace(r,this.quote)},t.prototype.parseMultiLines=function(t){for(var e=[],r="";t.length;){var n=r+t.shift(),s=this.parse(n);0===s.cells.length&&this.conv.parseParam.ignoreEmpty||(s.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?e.push(o.filterArray(s.cells,this.conv.parseRuntime.selectedColumns)):e.push(s.cells),r=""):r=n+(i.default(n,this.conv.parseRuntime)||"\n"))}return{rowsCells:e,partial:r}},t})();e.RowSplit=a},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(29)),o=n(r(60)),s=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function a(t,e,r){if(e.parseParam.checkColumn&&e.parseRuntime.headers&&t.length!==e.parseRuntime.headers.length)throw i.default.column_mismatched(e.parseRuntime.parsedLineNumber+r);return(function(t,e,r){for(var n=!1,i={},o=0,s=t.length;o-1?n.parseParam.colParser[e]&&n.parseParam.colParser[e].flat?n.parseRuntime.columnValueSetter[i]=f:n.parseRuntime.columnValueSetter[i]=h:n.parseRuntime.columnValueSetter[i]=f),n.parseRuntime.columnValueSetter[i](t,e,r)}function f(t,e,r){t[e]=r}function h(t,e,r){o.default(t,e,r)}function p(t,e,r,n){return n.parseRuntime.headerType[r]?n.parseRuntime.headerType[r]:e.indexOf("number#!")>-1?n.parseRuntime.headerType[r]=d:e.indexOf("string#!")>-1?n.parseRuntime.headerType[r]=_:n.parseParam.checkType?n.parseRuntime.headerType[r]=v:n.parseRuntime.headerType[r]=_}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function _(t){return t.toString()}function v(t){var e=t.trim();return""===e?_(t):s.test(e)?d(t):5===e.length&&"false"===e.toLowerCase()||4===e.length&&"true"===e.toLowerCase()?(function(t){var e=t.trim();return 5!==e.length||"false"!==e.toLowerCase()})(t):"{"===e[0]&&"}"===e[e.length-1]||"["===e[0]&&"]"===e[e.length-1]?(function(t){try{return JSON.parse(t)}catch(e){return t}})(t):_(t)}},function(t,e,r){var n=r(61);t.exports=function(t,e,r){return null==t?t:n(t,e,r)}},function(t,e,r){var n=r(62),i=r(74),o=r(103),s=r(19),a=r(104);t.exports=function(t,e,r,u){if(!s(t))return t;for(var c=-1,l=(e=i(e,t)).length,f=l-1,h=t;null!=h&&++c-1}},function(t,e,r){var n=r(9);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(16)(r(18),"Map");t.exports=n},function(t,e,r){var n=r(10);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(10);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e,r){var n=r(101);t.exports=function(t){return null==t?"":n(t)}},function(t,e,r){var n=r(17),i=r(102),o=r(20),s=r(21),a=n?n.prototype:void 0,u=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(s(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r-1&&t%1==0&&t0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then},enumerable:!0,configurable:!0}),t.prototype.processResult=function(t){var e=this;return this.converter.parseRuntime.parsedLineNumber,new i.default(function(r,n){e.needEmitLine?(function t(e,r,n,i,o){if(n>=e.length)o();else if(r.parseRuntime.subscribe&&r.parseRuntime.subscribe.onNext){var a=r.parseRuntime.subscribe.onNext,u=e[n],c=a(u,r.parseRuntime.parsedLineNumber+n);if(n++,c&&c.then)c.then(function(){!(function(e,r,n,i,o,a,u){o&&s(n,u),t(e,n,i,o,a)})(e,0,r,n,i,o,u)},o);else{for(i&&s(r,u);n1;return s&&(t=(e=c(l)).length)>1&&(a=(0,i.default)(e)),r.default.createElement(u.ScrollView,null,r.default.createElement(u.View,null,!s&&r.default.createElement(u.Text,{style:f.default.statsIntro},b.stats.emptyStats),s&&1===t&&r.default.createElement(u.Text,{style:f.default.statsIntro},b.stats.oneCycleStats(e[0])),s&&t>1&&r.default.createElement(u.View,null,r.default.createElement(u.Text,{style:f.default.statsIntro},b.stats.getBasisOfStats(t)),r.default.createElement(u.View,{style:f.default.statsRow},r.default.createElement(u.Text,{style:f.default.statsLabelLeft},b.stats.averageLabel),r.default.createElement(u.Text,{style:f.default.statsLabelRight},a.mean+' '+b.stats.daysLabel)),r.default.createElement(u.View,{style:f.default.statsRow},r.default.createElement(u.Text,{style:f.default.statsLabelLeft},b.stats.minLabel),r.default.createElement(u.Text,{style:f.default.statsLabelRight},a.minimum+' '+b.stats.daysLabel)),r.default.createElement(u.View,{style:f.default.statsRow},r.default.createElement(u.Text,{style:f.default.statsLabelLeft},b.stats.maxLabel),r.default.createElement(u.Text,{style:f.default.statsLabelRight},a.maximum+' '+b.stats.daysLabel)),r.default.createElement(u.View,{style:f.default.statsRow},r.default.createElement(u.Text,{style:f.default.statsLabelLeft},b.stats.stdLabel),r.default.createElement(u.Text,{style:f.default.statsLabelRight},a.stdDeviation+' '+b.stats.daysLabel)))))}}]),babelHelpers.inherits(t,e),t})(r.Component);function c(e){for(var t=[],a=0;a1){var r=e.map(function(e){return Math.pow(e-n.mean,2)}).reduce(l);n.stdDeviation=Math.round(100*Math.sqrt(r/(e.length-1)))/100}else n.stdDeviation=null;return n};var u=babelHelpers.interopRequireDefault(n(r[0]));function l(e,n){return e+n}function o(e){u.default.ok(Array.isArray(e),'Input should be an array.'),u.default.ok(e.length>0,'Input array should not be empty.'),e.forEach(function(e){u.default.equal(typeof e,'number','Elements in the array should be of type number.'),u.default.ok(!isNaN(e),'Elements of array should not be NaN.')})}},627,[597]); +__d(function(e,t,r,a,n){Object.defineProperty(a,"__esModule",{value:!0}),a.saveTempScale=function(e){return regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,regeneratorRuntime.awrap(s.AsyncStorage.setItem('tempScale',JSON.stringify(e)));case 2:l.set(e);case 3:case"end":return t.stop()}},null,this)},a.scaleObservable=void 0;var s=t(n[0]),u=babelHelpers.interopRequireDefault(t(n[1])),c=babelHelpers.interopRequireDefault(t(n[2])),l=(0,u.default)();a.scaleObservable=l,(function(){var e,t;regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,regeneratorRuntime.awrap(s.AsyncStorage.getItem('tempScale'));case 2:e=r.sent,t=e?JSON.parse(e):{min:c.default.temperatureScale.defaultLow,max:c.default.temperatureScale.defaultHigh},l.set(t);case 5:case"end":return r.stop()}},null,this)})()},578,[1,579,580]); +__d(function(n,u,t,r,f){t.exports=function(n){var u=null,t=[],r=[];function f(n){u=n;for(var f=t.length,e=0;e0?t[e-1]:void 0,l=e=e.status.phases.periOvulatory.start.date}function s(t){return Object.keys(e.status.phases).some(function(a){return e.status.phases[a].cycleDays.some(function(e){return e.temperature&&e.datet})}function o(t,e){return t||s(e)}return function(s,u){var l={drawLtlAt:null,drawFhmLine:!1};if(e.status||e.noMoreCycles||a(s),e.noMoreCycles)return l;if(s=i.start.date;return n=!i.end||e<=i.end.date,u&&n}),e,t):l.fertilityStatus.unknown},n.getCycleStatusForDay=c;var u=babelHelpers.interopRequireDefault(t(i[0])),a=babelHelpers.interopRequireDefault(t(i[1])),l=t(i[2]),f=(0,a.default)(),o=f.getCycleForDay,s=f.getCyclesBefore,y=f.getPreviousCycle;function c(e){var t=o(e);if(!t)return null;var r={cycle:p(t)},n=y(e);if(n){r.previousCycle=p(n);var i=s(n[0]);i&&(r.earlierCycles=i.map(p))}return(0,u.default)(r)}function v(e,t,r){return{preOvulatory:function(){return l.fertilityStatus.infertile},periOvulatory:function(e,t){var r=t.phases.periOvulatory.end;return r&&r.date===e?l.fertilityStatus.fertileUntilEvening:l.fertilityStatus.fertile},postOvulatory:function(){return l.fertilityStatus.infertile}}[e](t,r)}function p(e){return e.reverse(),e}},594,[595,470,536]); +__d(function(e,a,t,l,r){Object.defineProperty(l,"__esModule",{value:!0}),l.default=function e(a){var t=a.cycle,l=a.previousCycle,r=a.earlierCycles,n=void 0===r?[]:r;i([t].concat(babelHelpers.toConsumableArray(n)));var p={phases:{}};if(l){var y=e({cycle:l});if(y.temperatureShift){var f=(0,o.default)(t,[l].concat(babelHelpers.toConsumableArray(n)));if(f&&(p.phases.preOvulatory=f,p.phases.preOvulatory.cycleDays.length===t.length))return p}}p.phases.periOvulatory={start:{date:null},cycleDays:[]};var d=p.phases.periOvulatory;if(p.phases.preOvulatory){var v=p.phases.preOvulatory,b=c.LocalDate.parse(v.end.date).plusDays(1).toString();d.start.date=b;var m=v.cycleDays[v.cycleDays.length-1];d.cycleDays=t.slice(t.indexOf(m)+1)}else d.start.date=t[0].date,d.cycleDays=babelHelpers.toConsumableArray(t);var D=(0,u.default)(t);if(!D.detected)return p;var h=t.indexOf(D.evaluationCompleteDay);var O=(0,s.default)(t,h);if(!O.detected)return p;var C;var g=D.evaluationCompleteDay.date;var q=O.evaluationCompleteDay.date;C=g>q?D.evaluationCompleteDay:O.evaluationCompleteDay;var H=d.cycleDays;var k=H.indexOf(C);p.phases.postOvulatory={start:{date:C.date,time:'18:00'},cycleDays:H.slice(k)};d.cycleDays=H.slice(0,k+1);d.end=p.phases.postOvulatory.start;p.mucusShift=O;p.temperatureShift=D;return p};var u=babelHelpers.interopRequireDefault(a(r[0])),s=babelHelpers.interopRequireDefault(a(r[1])),o=babelHelpers.interopRequireDefault(a(r[2])),c=a(r[3]),n=babelHelpers.interopRequireDefault(a(r[4]));function i(e){e.forEach(function(e){n.default.ok(Array.isArray(e)),n.default.ok(e.length>0),n.default.ok(null!==e[0].bleeding),n.default.equal(typeof e[0].bleeding,'object'),n.default.equal(typeof e[0].bleeding.value,'number'),e.forEach(function(e){n.default.equal(typeof e.date,'string'),n.default.doesNotThrow(function(){return c.LocalDate.parse(e.date)}),e.temperature&&n.default.equal(typeof e.temperature.value,'number'),e.mucus&&n.default.equal(typeof e.mucus.value,'number'),e.mucus&&n.default.ok(e.mucus.value>=0),e.mucus&&n.default.ok(e.mucus.value<5)})})}},595,[596,597,598,469,600]); +__d(function(e,t,r,n,u){function a(e,t,r,n){if(t>r.length-3)return{detected:!1};var u=r.slice(t+1,t+4);return i(u,n)||l(u,n)||c(u,n)||{detected:!1}}function i(e,t){if(!e.every(function(e){return e.temp>t}))return!1;var r=e[1];return!(f(r.temp-t,.1)<.2)&&{detected:!0,rule:0,ltl:t,evaluationCompleteDay:r.originalCycleDay}}function l(e,t){if(e.length<3)return!1;if(!e.every(function(e){return e.temp>t}))return!1;var r=e[2];return!(r.temp<=t)&&{detected:!0,rule:1,ltl:t,evaluationCompleteDay:r.originalCycleDay}}function c(e,t){if(e.length<3)return!1;if(o(e,t)){var r=e[2];if(f(r.temp-t,.1)>=.2)return{detected:!0,rule:2,ltl:t,evaluationCompleteDay:r.originalCycleDay}}return!1}function o(e,t){var r=e[0].temp<=t,n=e[1].temp<=t;return!(!r&&!n||r&&n)}function f(e,t){var r=1/t;return Math.round(e*r)/r}Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t=e.filter(function(e){return e.temperature&&!e.temperature.exclude}).map(function(e){return{originalCycleDay:e,temp:f(e.temperature.value,.05)}});function r(e){var r=t.slice(0,e).slice(-6),n=r.map(function(e){return e.temp});return Math.max.apply(Math,babelHelpers.toConsumableArray(n))}for(var n=0;nn&&(n=r.mucus.value),!(n<2)&&r.mucus.value===n){var l=t.slice(c+1,c+4);if(!(l.length<3)){var i=l.some(function(e){return e.mucus.value>=n});if(!i){var a=e.indexOf(r),f=e.slice(a+1,u+1).filter(function(e){return e.mucus&&!e.mucus.exclude}),s=f.every(function(e){return e.mucus.value1});return t>-1?e.slice(0,t):e}},598,[469,599]); +__d(function(e,t,r,a,n){Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var t=e.map(function(e){var t=(0,l.default)({cycle:e});if(t.temperatureShift){var r=t.temperatureShift.firstHighMeasurementDay,a=u.LocalDate.parse(e[0].date),n=u.LocalDate.parse(r.date);return n.compareTo(a)+1}return null}).filter(function(e){return'number'==typeof e}),r=Math.min.apply(Math,babelHelpers.toConsumableArray(t))-8;return r<5?r:t.length>=12?r:null};var u=t(n[0]),l=babelHelpers.interopRequireDefault(t(n[1]))},599,[469,595]); +__d(function(t,e,r,n,i){'use strict';function o(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0;f--)if(s[f]!==l[f])return!1;for(f=s.length-1;f>=0;f--)if(!m(t[u=s[f]],e[u],r,n))return!1;return!0}function w(t,e){if(!t||!e)return!1;if('[object RegExp]'==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function O(t){var e;try{t()}catch(t){e=t}return e}function S(t,e,r,n){var i;if('function'!=typeof e)throw new TypeError('"block" argument must be a function');'string'==typeof r&&(n=r,r=null),i=O(e),n=(r&&r.name?' ('+r.name+').':'.')+(n?' '+n:'.'),t&&!i&&v(i,r,'Missing expected exception'+n);var o='string'==typeof n,u=!t&&a.isError(i),f=!t&&i&&!r;if((u&&o&&w(i,r)||f)&&v(i,r,'Got unwanted exception'+n),t&&i&&r&&!w(i,r)||!t&&i)throw i}g.AssertionError=function(t){var e;this.name='AssertionError',this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=y(d((e=this).actual),128)+' '+e.operator+' '+y(d(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=E(r),u=i.indexOf('\n'+o);if(u>=0){var a=i.indexOf('\n',u+1);i=i.substring(a+1)}this.stack=i}}},a.inherits(g.AssertionError,Error),g.fail=v,g.ok=b,g.equal=function(t,e,r){t!=e&&v(t,e,r,'==',g.equal)},g.notEqual=function(t,e,r){t==e&&v(t,e,r,'!=',g.notEqual)},g.deepEqual=function(t,e,r){m(t,e,!1)||v(t,e,r,'deepEqual',g.deepEqual)},g.deepStrictEqual=function(t,e,r){m(t,e,!0)||v(t,e,r,'deepStrictEqual',g.deepStrictEqual)},g.notDeepEqual=function(t,e,r){m(t,e,!1)&&v(t,e,r,'notDeepEqual',g.notDeepEqual)},g.notDeepStrictEqual=function t(e,r,n){m(e,r,!0)&&v(e,r,n,'notDeepStrictEqual',t)},g.strictEqual=function(t,e,r){t!==e&&v(t,e,r,'===',g.strictEqual)},g.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,'!==',g.notStrictEqual)},g.throws=function(t,e,r){S(!0,t,e,r)},g.doesNotThrow=function(t,e,r){S(!1,t,e,r)},g.ifError=function(t){if(t)throw t};var A=Object.keys||function(t){var e=[];for(var r in t)f.call(t,r)&&e.push(r);return e}},600,[601]); +__d(function(e,t,n,r,o){var i=/%[sdj%]/g;r.format=function(e){if(!j(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(e){return'[Circular]'}default:return e}}),c=r[n];n=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(t)?n.showHidden=t:t&&r._extend(n,t),z(n.showHidden)&&(n.showHidden=!1),z(n.depth)&&(n.depth=2),z(n.colors)&&(n.colors=!1),z(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),f(n,e,n.depth)}function l(e,t){var n=s.styles[t];return n?"\x1b["+s.colors[n][0]+'m'+e+"\x1b["+s.colors[n][1]+'m':e}function a(e,t){return e}function p(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function f(e,t,n){if(e.customInspect&&t&&N(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(n,e);return j(o)||(o=f(e,o,n)),o}var i=g(e,t);if(i)return i;var u=Object.keys(t),c=p(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(t)),D(t)&&(u.indexOf('message')>=0||u.indexOf('description')>=0))return y(t);if(0===u.length){if(N(t)){var s=t.name?': '+t.name:'';return e.stylize('[Function'+s+']','special')}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),'regexp');if(E(t))return e.stylize(Date.prototype.toString.call(t),'date');if(D(t))return y(t)}var l,a='',v=!1,O=['{','}'];(m(t)&&(v=!0,O=['[',']']),N(t))&&(a=' [Function'+(t.name?': '+t.name:'')+']');return w(t)&&(a=' '+RegExp.prototype.toString.call(t)),E(t)&&(a=' '+Date.prototype.toUTCString.call(t)),D(t)&&(a=' '+y(t)),0!==u.length||v&&0!=t.length?n<0?w(t)?e.stylize(RegExp.prototype.toString.call(t),'regexp'):e.stylize('[Object]','special'):(e.seen.push(t),l=v?d(e,t,n,c,u):u.map(function(r){return h(e,t,n,c,r,v)}),e.seen.pop(),b(l,a,O)):O[0]+a+O[1]}function g(e,t){if(z(t))return e.stylize('undefined','undefined');if(j(t)){var n='\''+JSON.stringify(t).replace(/^"|"$/g,'').replace(/'/g,"\\'").replace(/\\"/g,'"')+'\'';return e.stylize(n,'string')}return S(t)?e.stylize(''+t,'number'):v(t)?e.stylize(''+t,'boolean'):O(t)?e.stylize('null','null'):void 0}function y(e){return'['+Error.prototype.toString.call(e)+']'}function d(e,t,n,r,o){for(var i=[],u=0,c=t.length;u-1&&(c=i?c.split('\n').map(function(e){return' '+e}).join('\n').substr(2):'\n'+c.split('\n').map(function(e){return' '+e}).join('\n')):c=e.stylize('[Circular]','special')),z(u)){if(i&&o.match(/^\d+$/))return c;(u=JSON.stringify(''+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,'name')):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,'string'))}return u+': '+c}function b(e,t,n){return e.reduce(function(e,t){return 0,t.indexOf('\n')>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,'').length+1},0)>60?n[0]+(''===t?'':t+'\n ')+' '+e.join(',\n ')+' '+n[1]:n[0]+t+' '+e.join(', ')+' '+n[1]}function m(e){return Array.isArray(e)}function v(e){return'boolean'==typeof e}function O(e){return null===e}function S(e){return'number'==typeof e}function j(e){return'string'==typeof e}function z(e){return void 0===e}function w(e){return x(e)&&'[object RegExp]'===A(e)}function x(e){return'object'==typeof e&&null!==e}function E(e){return x(e)&&'[object Date]'===A(e)}function D(e){return x(e)&&('[object Error]'===A(e)||e instanceof Error)}function N(e){return'function'==typeof e}function A(e){return Object.prototype.toString.call(e)}function _(e){return e<10?'0'+e.toString(10):e.toString(10)}r.debuglog=function(e){if(z(u)&&(u=process.env.NODE_DEBUG||''),e=e.toUpperCase(),!c[e])if(new RegExp('\\b'+e+'\\b','i').test(u)){var t=process.pid;c[e]=function(){var n=r.format.apply(r,arguments);console.error('%s %d: %s',e,t,n)}}else c[e]=function(){};return c[e]},r.inspect=s,s.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]},s.styles={special:'cyan',number:'yellow',boolean:'yellow',undefined:'grey',null:'bold',string:'green',date:'magenta',regexp:'red'},r.isArray=m,r.isBoolean=v,r.isNull=O,r.isNullOrUndefined=function(e){return null==e},r.isNumber=S,r.isString=j,r.isSymbol=function(e){return'symbol'==typeof e},r.isUndefined=z,r.isRegExp=w,r.isObject=x,r.isDate=E,r.isError=D,r.isFunction=N,r.isPrimitive=function(e){return null===e||'boolean'==typeof e||'number'==typeof e||'string'==typeof e||'symbol'==typeof e||void 0===e},r.isBuffer=t(o[0]);var J=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log('%s - %s',(e=new Date,t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(':'),[e.getDate(),J[e.getMonth()],t].join(' ')),r.format.apply(r,arguments))},r.inherits=t(o[1]),r._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}},601,[602,603]); +__d(function(t,n,o,f,e){o.exports=function(t){return t&&'object'==typeof t&&'function'==typeof t.copy&&'function'==typeof t.fill&&'function'==typeof t.readUInt8}},602,[]); +__d(function(t,o,e,r,p){'function'==typeof Object.create?e.exports=function(t,o){t.super_=o,t.prototype=Object.create(o.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,o){t.super_=o;var e=function(){};e.prototype=o.prototype,t.prototype=new e,t.prototype.constructor=t}},603,[]); +__d(function(e,t,l,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var u=babelHelpers.interopRequireWildcard(t(a[0])),n=t(a[1]),i=babelHelpers.interopRequireDefault(t(a[2])),o=babelHelpers.interopRequireDefault(t(a[3])),s=babelHelpers.interopRequireDefault(t(a[4])),d=t(a[5]),c=babelHelpers.interopRequireDefault(t(a[6])),p=babelHelpers.interopRequireDefault(t(a[7])),f=(0,c.default)().getCycleDayNumber,b=o.default.column.label,y=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"passDateToDayView",value:function(e){var t=(0,d.getOrCreateCycleDay)(e);this.props.navigate('CycleDay',{cycleDay:t})}},{key:"shouldComponentUpdate",value:function(e){var t=this;return Object.keys(e).some(function(l){return e[l]!=t.props[l]})}},{key:"render",value:function(){var e=this,t=this.props,l=t.dateString,r=t.y,a=t.temperatureExclude,d=t.bleeding,c=t.mucus,y=t.drawFhmLine,m=t.drawLtlAt,h=t.rightY,g=t.rightTemperatureExclude,H=t.leftY,C=t.leftTemperatureExclude,E=t.chartHeight,v=E*s.default.columnHeightPercentage,x=E*s.default.xAxisHeightPercentage,D=E*s.default.symptomRowHeightPercentage,w=[];if(m){var k=u.default.createElement(n.View,babelHelpers.extends({position:"absolute",width:'100%',top:m},o.default.nfpLine,{key:"ltl"}));w.push(k)}r&&w.push(u.default.createElement(p.default,{y:r,exclude:a,rightY:h,rightTemperatureExclude:g,leftY:H,leftTemperatureExclude:C,key:"dotandline"}));var R=f(l),T=l.split('-').slice(1).join('-'),L=u.default.createElement(n.Text,{style:b.number},R),V=u.default.createElement(n.Text,{style:b.date},T),q={height:v,borderLeftColor:'grey',borderRightColor:'grey'};y&&(q.borderLeftColor=o.default.nfpLine.borderColor,q.borderLeftWidth=3);var O=u.default.createElement(n.TouchableOpacity,{style:[o.default.column.rect,q],key:this.props.index.toString(),onPress:function(){e.passDateToDayView(l)},activeOpacity:1},w);return u.default.createElement(n.View,null,u.default.createElement(n.View,{style:[o.default.symptomRow,{height:D}]},'number'==typeof c&&u.default.createElement(n.View,babelHelpers.extends({},o.default.mucusIcon,{backgroundColor:o.default.mucusIconShades[c],key:"mucus"})),'number'==typeof d&&u.default.createElement(i.default,{name:"drop",size:18,color:"#900",key:"bleeding"})),O,u.default.createElement(n.View,{style:{height:x}},L,V))}}]),babelHelpers.inherits(t,e),t})(u.Component);r.default=y},604,[26,1,605,592,580,471,470,607]); +__d(function(e,a,t,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.getImageSource=r.ToolbarAndroid=r.TabBarItemIOS=r.TabBarItem=r.Button=r.default=void 0;var u=babelHelpers.interopRequireDefault(a(o[0])),l=babelHelpers.interopRequireDefault(a(o[1])),b=(0,u.default)(l.default,'Entypo','Entypo.ttf'),d=b;r.default=d;var n=b.Button;r.Button=n;var I=b.TabBarItem;r.TabBarItem=I;var i=b.TabBarItemIOS;r.TabBarItemIOS=i;var f=b.ToolbarAndroid;r.ToolbarAndroid=f;var m=b.getImageSource;r.getImageSource=m},605,[301,606]); +__d(function(e,r,o,i){o.exports={"500px":61696,"500px-with-circle":61697,"add-to-list":61698,"add-user":61699,address:61700,adjust:61701,air:61702,aircraft:61703,"aircraft-landing":61704,"aircraft-take-off":61705,"align-bottom":61706,"align-horizontal-middle":61707,"align-left":61708,"align-right":61709,"align-top":61710,"align-vertical-middle":61711,"app-store":61712,archive:61713,"area-graph":61714,"arrow-bold-down":61715,"arrow-bold-left":61716,"arrow-bold-right":61717,"arrow-bold-up":61718,"arrow-down":61719,"arrow-left":61720,"arrow-long-down":61721,"arrow-long-left":61722,"arrow-long-right":61723,"arrow-long-up":61724,"arrow-right":61725,"arrow-up":61726,"arrow-with-circle-down":61727,"arrow-with-circle-left":61728,"arrow-with-circle-right":61729,"arrow-with-circle-up":61730,attachment:61731,"awareness-ribbon":61732,back:61733,"back-in-time":61734,baidu:61735,"bar-graph":61736,basecamp:61737,battery:61738,"beamed-note":61739,behance:61740,bell:61741,blackboard:61742,block:61743,book:61744,bookmark:61745,bookmarks:61746,bowl:61747,box:61748,briefcase:61749,browser:61750,brush:61751,bucket:61752,bug:61753,cake:61754,calculator:61755,calendar:61756,camera:61757,ccw:61758,chat:61759,check:61760,"chevron-down":61761,"chevron-left":61762,"chevron-right":61763,"chevron-small-down":61764,"chevron-small-left":61765,"chevron-small-right":61766,"chevron-small-up":61767,"chevron-thin-down":61768,"chevron-thin-left":61769,"chevron-thin-right":61770,"chevron-thin-up":61771,"chevron-up":61772,"chevron-with-circle-down":61773,"chevron-with-circle-left":61774,"chevron-with-circle-right":61775,"chevron-with-circle-up":61776,circle:61777,"circle-with-cross":61778,"circle-with-minus":61779,"circle-with-plus":61780,"circular-graph":61781,clapperboard:61782,"classic-computer":61783,clipboard:61784,clock:61785,cloud:61786,code:61787,cog:61788,colours:61789,compass:61790,"controller-fast-backward":61791,"controller-fast-forward":61792,"controller-jump-to-start":61793,"controller-next":61794,"controller-paus":61795,"controller-play":61796,"controller-record":61797,"controller-stop":61798,"controller-volume":61799,copy:61800,"creative-cloud":61801,"creative-commons":61802,"creative-commons-attribution":61803,"creative-commons-noderivs":61804,"creative-commons-noncommercial-eu":61805,"creative-commons-noncommercial-us":61806,"creative-commons-public-domain":61807,"creative-commons-remix":61808,"creative-commons-share":61809,"creative-commons-sharealike":61810,credit:61811,"credit-card":61812,crop:61813,cross:61814,cup:61815,cw:61816,cycle:61817,database:61818,"dial-pad":61819,direction:61820,document:61821,"document-landscape":61822,documents:61823,"dot-single":61824,"dots-three-horizontal":61825,"dots-three-vertical":61826,"dots-two-horizontal":61827,"dots-two-vertical":61828,download:61829,dribbble:61830,"dribbble-with-circle":61831,drink:61832,drive:61833,drop:61834,dropbox:61835,edit:61836,email:61837,"emoji-flirt":61838,"emoji-happy":61839,"emoji-neutral":61840,"emoji-sad":61841,erase:61842,eraser:61843,evernote:61844,export:61845,eye:61846,"eye-with-line":61847,facebook:61848,"facebook-with-circle":61849,feather:61850,fingerprint:61851,flag:61852,flash:61853,flashlight:61854,"flat-brush":61855,flattr:61856,flickr:61857,"flickr-with-circle":61858,"flow-branch":61859,"flow-cascade":61860,"flow-line":61861,"flow-parallel":61862,"flow-tree":61863,flower:61864,folder:61865,"folder-images":61866,"folder-music":61867,"folder-video":61868,forward:61869,foursquare:61870,funnel:61871,"game-controller":61872,gauge:61873,github:61874,"github-with-circle":61875,globe:61876,"google-":61877,"google--with-circle":61878,"google-drive":61879,"google-hangouts":61880,"google-play":61881,"graduation-cap":61882,grid:61883,grooveshark:61884,"hair-cross":61885,hand:61886,heart:61887,"heart-outlined":61888,help:61889,"help-with-circle":61890,home:61891,"hour-glass":61892,houzz:61893,icloud:61894,image:61895,"image-inverted":61896,images:61897,inbox:61898,infinity:61899,info:61900,"info-with-circle":61901,instagram:61902,"instagram-with-circle":61903,install:61904,key:61905,keyboard:61906,"lab-flask":61907,landline:61908,language:61909,laptop:61910,lastfm:61911,"lastfm-with-circle":61912,layers:61913,leaf:61914,"level-down":61915,"level-up":61916,lifebuoy:61917,"light-bulb":61918,"light-down":61919,"light-up":61920,"line-graph":61921,link:61922,linkedin:61923,"linkedin-with-circle":61924,list:61925,location:61926,"location-pin":61927,lock:61928,"lock-open":61929,"log-out":61930,login:61931,loop:61932,magnet:61933,"magnifying-glass":61934,mail:61935,"mail-with-circle":61936,man:61937,map:61938,mask:61939,medal:61940,medium:61941,"medium-with-circle":61942,megaphone:61943,menu:61944,merge:61945,message:61946,mic:61947,minus:61948,mixi:61949,mobile:61950,"modern-mic":61951,moon:61952,mouse:61953,"mouse-pointer":61954,music:61955,network:61956,new:61957,"new-message":61958,news:61959,newsletter:61960,note:61961,notification:61962,"notifications-off":61963,"old-mobile":61964,"old-phone":61965,onedrive:61966,"open-book":61967,palette:61968,"paper-plane":61969,paypal:61970,pencil:61971,phone:61972,picasa:61973,"pie-chart":61974,pin:61975,pinterest:61976,"pinterest-with-circle":61977,plus:61978,popup:61979,"power-plug":61980,"price-ribbon":61981,"price-tag":61982,print:61983,"progress-empty":61984,"progress-full":61985,"progress-one":61986,"progress-two":61987,publish:61988,qq:61989,"qq-with-circle":61990,quote:61991,radio:61992,raft:61993,"raft-with-circle":61994,rainbow:61995,rdio:61996,"rdio-with-circle":61997,"remove-user":61998,renren:61999,reply:62e3,"reply-all":62001,"resize-100-":62002,"resize-full-screen":62003,retweet:62004,rocket:62005,"round-brush":62006,rss:62007,ruler:62008,save:62009,scissors:62010,scribd:62011,"select-arrows":62012,share:62013,"share-alternative":62014,shareable:62015,shield:62016,shop:62017,"shopping-bag":62018,"shopping-basket":62019,"shopping-cart":62020,shuffle:62021,signal:62022,"sina-weibo":62023,skype:62024,"skype-with-circle":62025,slideshare:62026,smashing:62027,sound:62028,"sound-mix":62029,"sound-mute":62030,soundcloud:62031,"sports-club":62032,spotify:62033,"spotify-with-circle":62034,spreadsheet:62035,"squared-cross":62036,"squared-minus":62037,"squared-plus":62038,star:62039,"star-outlined":62040,stopwatch:62041,stumbleupon:62042,"stumbleupon-with-circle":62043,suitcase:62044,swap:62045,swarm:62046,sweden:62047,switch:62048,tablet:62049,"tablet-mobile-combo":62050,tag:62051,text:62052,"text-document":62053,"text-document-inverted":62054,thermometer:62055,"thumbs-down":62056,"thumbs-up":62057,"thunder-cloud":62058,ticket:62059,"time-slot":62060,tools:62061,"traffic-cone":62062,trash:62063,tree:62064,"triangle-down":62065,"triangle-left":62066,"triangle-right":62067,"triangle-up":62068,tripadvisor:62069,trophy:62070,tumblr:62071,"tumblr-with-circle":62072,tv:62073,twitter:62074,"twitter-with-circle":62075,typing:62076,uninstall:62077,unread:62078,untag:62079,upload:62080,"upload-to-cloud":62081,user:62082,users:62083,"v-card":62084,video:62085,"video-camera":62086,vimeo:62087,"vimeo-with-circle":62088,vine:62089,"vine-with-circle":62090,vinyl:62091,vk:62092,"vk-alternitive":62093,"vk-with-circle":62094,voicemail:62095,wallet:62096,warning:62097,water:62098,"windows-store":62099,xing:62100,"xing-with-circle":62101,yelp:62102,youko:62103,"youko-with-circle":62104,youtube:62105,"youtube-with-circle":62106}},606,[]); +__d(function(e,t,r,l,s){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var o=babelHelpers.interopRequireWildcard(t(s[0])),i=t(s[1]),u=babelHelpers.interopRequireDefault(t(s[2])),a=babelHelpers.interopRequireDefault(t(s[3])),p=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"shouldComponentUpdate",value:function(e){var t=this;return Object.keys(e).some(function(r){return e[r]!=t.props[r]})}},{key:"render",value:function(){var e,t,r=this.props.y,l=this.props.exclude;this.props.leftY&&(t=n((this.props.leftY-r)/2+r,r,'left',this.props.leftTemperatureExclude||l));this.props.rightY&&(e=n(r,(r-this.props.rightY)/2+this.props.rightY,'right',this.props.rightTemperatureExclude||l));var s=l?u.default.curveDotsExcluded:u.default.curveDots;return[t,e,o.default.createElement(i.View,{position:"absolute",top:r-s.height/2,left:a.default.columnMiddle-s.width/2,style:s,key:"dot"})]}}]),babelHelpers.inherits(t,e),t})(o.Component);function n(e,t,r,l){var s=a.default.columnWidth,p=-e- -t,n=Math.atan2(p,s/2),d=l?u.default.curveExcluded:u.default.curve,h=s/2/Math.cos(n)+10,c=-(h-s)/2+('right'===r?s/4:-s/4);return o.default.createElement(i.View,babelHelpers.extends({width:h,position:"absolute",top:(e+t)/2-d.borderWidth/2,left:c,style:{transform:[{rotateZ:n+"rad"}]}},d,{key:r}))}l.default=p},607,[26,1,592,580]); +__d(function(e,t,r,n,s){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=babelHelpers.interopRequireWildcard(t(s[0])),l=t(s[1]),i=babelHelpers.interopRequireDefault(t(s[2])),u=babelHelpers.interopRequireDefault(t(s[3])),o=t(s[4]),c=babelHelpers.interopRequireDefault(t(s[5])),p=babelHelpers.interopRequireWildcard(t(s[6])),m=babelHelpers.interopRequireDefault(t(s[7])),f=t(s[8]),g=babelHelpers.interopRequireDefault(t(s[9])),d=babelHelpers.interopRequireDefault(t(s[10])),b=t(s[11]),x=(function(e){function t(){return babelHelpers.classCallCheck(this,t),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))}return babelHelpers.createClass(t,[{key:"render",value:function(){return a.default.createElement(l.ScrollView,null,a.default.createElement(l.View,{style:p.default.settingsSegment},a.default.createElement(l.Text,{style:p.default.settingsSegmentTitle},f.settings.tempScale.segmentTitle),a.default.createElement(l.Text,null,f.settings.tempScale.segmentExplainer),a.default.createElement(h,null)),a.default.createElement(l.View,{style:p.default.settingsSegment},a.default.createElement(l.Text,{style:p.default.settingsSegmentTitle},f.settings.export.button),a.default.createElement(l.Text,null,f.settings.export.segmentExplainer),a.default.createElement(l.TouchableOpacity,{onPress:y,style:p.default.settingsButton},a.default.createElement(l.Text,{style:p.default.settingsButtonText},f.settings.export.button))),a.default.createElement(l.View,{style:p.default.settingsSegment},a.default.createElement(l.Text,{style:p.default.settingsSegmentTitle},f.settings.import.button),a.default.createElement(l.Text,null,f.settings.import.segmentExplainer),a.default.createElement(l.TouchableOpacity,{onPress:v,style:p.default.settingsButton},a.default.createElement(l.Text,{style:p.default.settingsButtonText},f.settings.import.button))))}}]),babelHelpers.inherits(t,e),t})(a.Component);n.default=x;var h=(function(e){function t(e){var r;return babelHelpers.classCallCheck(this,t),(r=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).call(this,e))).onValuesChange=function(e){r.setState({min:e[0],max:e[1]})},r.onValuesChangeFinish=function(e){r.setState({min:e[0],max:e[1]});try{(0,b.saveTempScale)(r.state)}catch(e){T(f.settings.tempScale.saveError)}},r.state=babelHelpers.extends({},b.scaleObservable.value),r}return babelHelpers.createClass(t,[{key:"render",value:function(){return a.default.createElement(l.View,{style:{alignItems:'center'}},a.default.createElement(l.Text,null,f.settings.tempScale.min+" "+this.state.min),a.default.createElement(l.Text,null,f.settings.tempScale.max+" "+this.state.max),a.default.createElement(i.default,{values:[this.state.min,this.state.max],min:m.default.temperatureScale.min,max:m.default.temperatureScale.max,step:.5,onValuesChange:this.onValuesChange,onValuesChangeFinish:this.onValuesChangeFinish,selectedStyle:{backgroundColor:'darkgrey'},unselectedStyle:{backgroundColor:'silver'},trackStyle:{height:10},markerStyle:{backgroundColor:p.secondaryColor,height:20,width:20,borderRadius:100,marginTop:10}}))}}]),babelHelpers.inherits(t,e),t})(a.Component);function y(){var e;return regeneratorRuntime.async(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,e=(0,g.default)()){t.next=4;break}return t.abrupt("return",T(f.settings.errors.noData));case 4:t.next=10;break;case 6:return t.prev=6,t.t0=t.catch(0),console.error(t.t0),t.abrupt("return",T(f.settings.errors.couldNotConvert));case 10:return t.prev=10,t.next=13,regeneratorRuntime.awrap(u.default.open({title:f.settings.export.title,url:e,subject:f.settings.export.subject,type:'text/csv',showAppsToView:!0}));case 13:t.next=19;break;case 15:return t.prev=15,t.t1=t.catch(10),console.error(t.t1),t.abrupt("return",T(f.settings.export.errors.problemSharing));case 19:case"end":return t.stop()}},null,this,[[0,6],[10,15]])}function v(){l.Alert.alert(f.settings.import.title,f.settings.import.message,[{text:f.settings.import.replaceOption,onPress:function(){return E({deleteExisting:!1})}},{text:f.settings.import.deleteOption,onPress:function(){return E({deleteExisting:!0})}},{text:f.shared.cancel,style:'cancel',onPress:function(){}}])}function E(e){var t,r,n;return regeneratorRuntime.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t=e.deleteExisting,s.prev=1,s.next=4,regeneratorRuntime.awrap(new Promise(function(e,t){o.DocumentPicker.show({filetype:[o.DocumentPickerUtil.allFiles()]},function(r,n){if(r)return t(r);e(n)})}));case 4:r=s.sent,s.next=10;break;case 7:return s.prev=7,s.t0=s.catch(1),s.abrupt("return");case 10:return s.prev=10,s.next=13,regeneratorRuntime.awrap(c.default.readFile(r.uri,'utf8'));case 13:n=s.sent,s.next=19;break;case 16:return s.prev=16,s.t1=s.catch(10),s.abrupt("return",S(f.settings.import.errors.couldNotOpenFile));case 19:return s.prev=19,s.next=22,regeneratorRuntime.awrap((0,d.default)(n,t));case 22:l.Alert.alert(f.shared.successTitle,f.settings.import.success.message),s.next=28;break;case 25:s.prev=25,s.t2=s.catch(19),S(s.t2.message);case 28:case"end":return s.stop()}},null,this,[[1,7],[10,16],[19,25]])}function T(e){l.Alert.alert(f.shared.errorTitle,e)}function S(e){T(e+"\n\n"+f.settings.import.errors.postFix)}},608,[26,1,609,612,616,617,299,580,581,620,628,578]); +__d(function(e,t,s,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=babelHelpers.interopRequireDefault(t(a[0])),o=babelHelpers.interopRequireDefault(t(a[1])),l=t(a[2]),i=babelHelpers.interopRequireDefault(t(a[3])),p=t(a[4]),u=t(a[2]).ViewPropTypes||l.View.propTypes,d=(function(e){function t(e){var s;babelHelpers.classCallCheck(this,t),(s=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).call(this,e))).startOne=function(){s.props.enabledOne&&(s.props.onValuesChangeStart(),s.setState({onePressed:!s.state.onePressed}))},s.startTwo=function(){s.props.enabledTwo&&(s.props.onValuesChangeStart(),s.setState({twoPressed:!s.state.twoPressed}))},s.moveOne=function(e){if(s.props.enabledOne){var t=l.I18nManager.isRTL?s.state.pastOne-e.dx:e.dx+s.state.pastOne,r=s.state.positionTwo-(s.props.allowOverlap?0:s.stepLength),a=0===r?0:r||s.props.sliderLength,n=t<0?0:t>a?a:t,o=s.props.touchDimensions.slipDisplacement;if(Math.abs(e.dy)a?a:t,o=s.props.touchDimensions.slipDisplacement;if(Math.abs(e.dy)p/2&&h.topMarkerContainer]},n.default.createElement(l.View,babelHelpers.extends({style:[h.touch,P],ref:function(t){return e._markerOne=t}},this._panResponderOne.panHandlers),!1===b?n.default.createElement(S,{enabled:this.props.enabledOne,pressed:this.state.onePressed,markerStyle:[h.marker,this.props.markerStyle],pressedMarkerStyle:this.props.pressedMarkerStyle,currentValue:this.state.valueOne,valuePrefix:this.props.valuePrefix,valueSuffix:this.props.valueSuffix}):n.default.createElement(T,{enabled:this.props.enabledOne,pressed:this.state.onePressed,markerStyle:[h.marker,this.props.markerStyle],pressedMarkerStyle:this.props.pressedMarkerStyle,currentValue:this.state.valueOne,valuePrefix:this.props.valuePrefix,valueSuffix:this.props.valueSuffix}))),f&&s!==this.props.sliderLength&&n.default.createElement(l.View,{style:[h.markerContainer,x,this.props.markerContainerStyle]},n.default.createElement(l.View,babelHelpers.extends({style:[h.touch,P],ref:function(t){return e._markerTwo=t}},this._panResponderTwo.panHandlers),!1===b?n.default.createElement(S,{pressed:this.state.twoPressed,markerStyle:this.props.markerStyle,pressedMarkerStyle:this.props.pressedMarkerStyle,currentValue:this.state.valueTwo,enabled:this.props.enabledTwo,valuePrefix:this.props.valuePrefix,valueSuffix:this.props.valueSuffix}):n.default.createElement(k,{pressed:this.state.twoPressed,markerStyle:this.props.markerStyle,pressedMarkerStyle:this.props.pressedMarkerStyle,currentValue:this.state.valueTwo,enabled:this.props.enabledTwo,valuePrefix:this.props.valuePrefix,valueSuffix:this.props.valueSuffix})))))}}]),babelHelpers.inherits(t,e),t})(n.default.Component);r.default=d,d.propTypes={values:o.default.arrayOf(o.default.number),onValuesChangeStart:o.default.func,onValuesChange:o.default.func,onValuesChangeFinish:o.default.func,sliderLength:o.default.number,touchDimensions:o.default.object,customMarker:o.default.func,customMarkerLeft:o.default.func,customMarkerRight:o.default.func,isMarkersSeparated:o.default.bool,min:o.default.number,max:o.default.number,step:o.default.number,optionsArray:o.default.array,containerStyle:u.style,trackStyle:u.style,selectedStyle:u.style,unselectedStyle:u.style,markerContainerStyle:u.style,markerStyle:u.style,pressedMarkerStyle:u.style,valuePrefix:o.default.string,valueSuffix:o.default.string,enabledOne:o.default.bool,enabledTwo:o.default.bool,onToggleOne:o.default.func,onToggleTwo:o.default.func,allowOverlap:o.default.bool,snapped:o.default.bool,markerOffsetX:o.default.number,markerOffsetY:o.default.number},d.defaultProps={values:[0],onValuesChangeStart:function(){},onValuesChange:function(e){},onValuesChangeFinish:function(e){},step:1,min:0,max:10,touchDimensions:{height:50,width:50,borderRadius:15,slipDisplacement:200},customMarker:i.default,customMarkerLeft:i.default,customMarkerRight:i.default,markerOffsetX:0,markerOffsetY:0,sliderLength:280,onToggleOne:void 0,onToggleTwo:void 0,enabledOne:!0,enabledTwo:!0,allowOverlap:!1,snapped:!1};var h=l.StyleSheet.create({container:{position:'relative',height:50,justifyContent:'center'},fullTrack:{flexDirection:'row'},track:babelHelpers.objectSpread({},{height:2,backgroundColor:'#CECECE'}),selectedTrack:babelHelpers.objectSpread({},{backgroundColor:'#0D8675'}),markerContainer:{position:'absolute',width:48,height:48,backgroundColor:'transparent',justifyContent:'center',alignItems:'center'},topMarkerContainer:{zIndex:1},touch:{backgroundColor:'transparent',justifyContent:'center',alignItems:'center',alignSelf:'stretch'}})},609,[26,43,1,610,611]); +__d(function(e,r,l,t,s){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=babelHelpers.interopRequireDefault(r(s[0])),p=babelHelpers.interopRequireDefault(r(s[1])),d=r(s[2]),o=r(s[2]).ViewPropTypes||d.View.propTypes,i=(function(e){function r(){return babelHelpers.classCallCheck(this,r),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(r).apply(this,arguments))}return babelHelpers.createClass(r,[{key:"render",value:function(){return a.default.createElement(d.TouchableHighlight,null,a.default.createElement(d.View,{style:this.props.enabled?[u.markerStyle,this.props.markerStyle,this.props.pressed&&u.pressedMarkerStyle,this.props.pressed&&this.props.pressedMarkerStyle]:[u.markerStyle,u.disabled]}))}}]),babelHelpers.inherits(r,e),r})(a.default.Component);t.default=i,i.propTypes={pressed:p.default.bool,pressedMarkerStyle:o.style,markerStyle:o.style,enabled:p.default.bool,currentValue:p.default.number,valuePrefix:p.default.string,valueSuffix:p.default.string};var u=d.StyleSheet.create({markerStyle:babelHelpers.objectSpread({},{height:12,width:12,borderRadius:12,backgroundColor:'#0D8675'}),pressedMarkerStyle:babelHelpers.objectSpread({},{height:20,width:20,borderRadius:20}),disabled:{backgroundColor:'#d3d3d3'}})},610,[26,43,1]); +__d(function(r,n,t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e.valueToPosition=function(r,n,t){var e=u(n,r),a=n.length-1;return t*(-1===e?a:e)/a},e.positionToValue=function(r,n,t){var e,a;return r<0||t0?-1:1,o=[];if(t){for(a=Math.abs((r-n)/t)+1,e=0;en)return t;if(r[e]n?e=u:a=-1}return a}return-1}},611,[]); +__d(function(e,r,t,n,a){var i=babelHelpers.interopRequireWildcard(r(a[0])),s=r(a[1]),o=babelHelpers.interopRequireDefault(r(a[2])),l=babelHelpers.interopRequireDefault(r(a[3])),u=babelHelpers.interopRequireDefault(r(a[4])),c=s.StyleSheet.create({actionSheetContainer:{flex:1,paddingTop:10,paddingBottom:0,justifyContent:'flex-end',backgroundColor:'rgba(0, 0, 0, 0.5)'},buttonContainer:{overflow:'hidden',backgroundColor:'white',paddingBottom:5,paddingTop:5}}),p=(function(e){function r(){return babelHelpers.classCallCheck(this,r),babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(r).apply(this,arguments))}return babelHelpers.createClass(r,[{key:"componentDidMount",value:function(){this.backButtonHandler=this.backButtonHandler.bind(this),s.BackHandler.addEventListener('backPress',this.backButtonHandler)}},{key:"componentWillUnmount",value:function(){s.BackHandler.removeEventListener('backPress',this.backButtonHandler)}},{key:"backButtonHandler",value:function(){return!!this.props.visible&&(this.props.onCancel(),!0)}},{key:"render",value:function(){return i.createElement(o.default,babelHelpers.extends({visible:this.props.visible},this.props),i.createElement(s.View,{style:c.actionSheetContainer},i.createElement(s.TouchableOpacity,{style:{flex:1},onPress:this.props.onCancel}),i.createElement(l.default,{visible:this.props.visible},i.createElement(s.View,{style:c.buttonContainer},this.props.children))))}}]),babelHelpers.inherits(r,e),r})(i.Component),d=function(e){var r,t;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.url&&!e.urls){n.next=25;break}return r=e.urls||[e.url],n.prev=2,n.next=5,regeneratorRuntime.awrap(Promise.all(r.map(function(e){return new Promise(function(r,t){s.NativeModules.RNShare.isBase64File(e,function(e){t(e)},function(e){r(e)})})})));case 5:if(t=n.sent,t.includes(!0)){n.next=9;break}return n.abrupt("return",Promise.resolve(!0));case 9:return n.next=11,regeneratorRuntime.awrap(s.PermissionsAndroid.check(s.PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE));case 11:if(!n.sent){n.next=14;break}return n.abrupt("return",Promise.resolve(!0));case 14:return n.next=16,regeneratorRuntime.awrap(s.PermissionsAndroid.request(s.PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE));case 16:if(n.sent!==s.PermissionsAndroid.RESULTS.GRANTED){n.next=19;break}return n.abrupt("return",Promise.resolve());case 19:throw new Error('Write Permission not available');case 22:return n.prev=22,n.t0=n.catch(2),n.abrupt("return",Promise.reject(n.t0));case 25:return n.abrupt("return",Promise.resolve(!0));case 26:case"end":return n.stop()}},null,this,[[2,22]])},b=(function(){function e(){babelHelpers.classCallCheck(this,e)}return babelHelpers.createClass(e,null,[{key:"open",value:function(e){return new Promise(function(r,t){d(e).then(function(){s.NativeModules.RNShare.open(e,function(e){return t({error:e})},function(e){r({message:e})})}).catch(function(e){return t(e)})})}},{key:"shareSingle",value:function(e){return new Promise(function(r,t){d(e).then(function(){s.NativeModules.RNShare.shareSingle(e,function(e){return t({error:e})},function(e){return r({message:e})})}).catch(function(e){return t(e)})})}}]),e})();b.Social={FACEBOOK:s.NativeModules.RNShare.FACEBOOK||'facebook',PAGESMANAGER:s.NativeModules.RNShare.PAGESMANAGER||'pagesmanager',TWITTER:s.NativeModules.RNShare.TWITTER||'twitter',WHATSAPP:s.NativeModules.RNShare.WHATSAPP||'whatsapp',INSTAGRAM:s.NativeModules.RNShare.INSTAGRAM||'instagram',GOOGLEPLUS:s.NativeModules.RNShare.GOOGLEPLUS||'googleplus',EMAIL:s.NativeModules.RNShare.EMAIL||'email'},t.exports=b,t.exports.Overlay=o.default,t.exports.Sheet=l.default,t.exports.Button=u.default,t.exports.ShareSheet=p},612,[26,1,613,614,615]); +__d(function(e,t,l,a,r){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var i=babelHelpers.interopRequireWildcard(t(r[0])),n=t(r[1]),o=n.StyleSheet.create({fullOverlay:{top:0,bottom:0,left:0,right:0,backgroundColor:'transparent',position:'absolute'},emptyOverlay:{width:0,height:0,backgroundColor:'transparent',position:'absolute'}}),s=(function(e){function t(){var e,l,a;babelHelpers.classCallCheck(this,t);for(var r=arguments.length,i=new Array(r),s=0;s1&&void 0!==arguments[1]?arguments[1]:{};return i.mkdir(p(e),r).then(function(){})},moveFile:function(e,r){return i.moveFile(p(e),p(r)).then(function(){})},copyFile:function(e,r){return i.copyFile(p(e),p(r)).then(function(){})},pathForBundle:function(e){return i.pathForBundle(e)},pathForGroup:function(e){return i.pathForGroup(e)},getFSInfo:function(){return i.getFSInfo()},getAllExternalFilesDirs:function(){return i.getAllExternalFilesDirs()},unlink:function(e){return i.unlink(p(e)).then(function(){})},exists:function(e){return i.exists(p(e))},stopDownload:function(e){i.stopDownload(e)},resumeDownload:function(e){i.resumeDownload(e)},isResumable:function(e){return i.isResumable(e)},stopUpload:function(e){i.stopUpload(e)},completeHandlerIOS:function(e){return i.completeHandlerIOS(e)},readDir:function(e){return g(e,i.readDir)},readDirAssets:function(e){if(!i.readDirAssets)throw new Error('readDirAssets is not available on this platform');return g(e,i.readDirAssets)},existsAssets:function(e){if(!i.existsAssets)throw new Error('existsAssets is not available on this platform');return i.existsAssets(e)},readdir:function(e){return m.readDir(p(e)).then(function(e){return e.map(function(e){return e.name})})},setReadable:function(e,r,n){return i.setReadable(e,r,n).then(function(e){return e})},stat:function(e){return i.stat(p(e)).then(function(r){return{path:e,ctime:new Date(1e3*r.ctime),mtime:new Date(1e3*r.mtime),size:r.size,mode:r.mode,originalFilepath:r.originalFilepath,isFile:function(){return r.type===d},isDirectory:function(){return r.type===c}}})},readFile:function(e,r){return h(e,r,i.readFile)},read:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,t=arguments.length>3?arguments[3]:void 0,o={encoding:'utf8'};return t&&('string'==typeof t?o.encoding=t:'object'==typeof t&&(o=t)),i.read(p(e),r,n).then(function(e){var r;if('utf8'===o.encoding)r=l.decode(s.decode(e));else if('ascii'===o.encoding)r=s.decode(e);else{if('base64'!==o.encoding)throw new Error('Invalid encoding type "'+String(o.encoding)+'"');r=e}return r})},readFileAssets:function(e,r){if(!i.readFileAssets)throw new Error('readFileAssets is not available on this platform');return h(e,r,i.readFileAssets)},hash:function(e,r){return i.hash(p(e),r)},copyFileAssets:function(e,r){if(!i.copyFileAssets)throw new Error('copyFileAssets is not available on this platform');return i.copyFileAssets(p(e),p(r)).then(function(){})},copyAssetsFileIOS:function(e,r,n,t){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:'contain';return i.copyAssetsFileIOS(e,r,n,t,o,a,s)},copyAssetsVideoIOS:function(e,r){return i.copyAssetsVideoIOS(e,r)},writeFile:function(e,r,n){var t,o={encoding:'utf8'};if(n&&('string'==typeof n?o.encoding=n:'object'==typeof n&&(o=n)),'utf8'===o.encoding)t=s.encode(l.encode(r));else if('ascii'===o.encoding)t=s.encode(r);else{if('base64'!==o.encoding)throw new Error('Invalid encoding type "'+o.encoding+'"');t=r}return i.writeFile(p(e),t).then(function(){})},appendFile:function(e,r,n){var t,o={encoding:'utf8'};if(n&&('string'==typeof n?o.encoding=n:'object'==typeof n&&(o=n)),'utf8'===o.encoding)t=s.encode(l.encode(r));else if('ascii'===o.encoding)t=s.encode(r);else{if('base64'!==o.encoding)throw new Error('Invalid encoding type "'+o.encoding+'"');t=r}return i.appendFile(p(e),t)},write:function(e,r,n,t){var o,a={encoding:'utf8'};if(t&&('string'==typeof t?a.encoding=t:'object'==typeof t&&(a=t)),'utf8'===a.encoding)o=s.encode(l.encode(r));else if('ascii'===a.encoding)o=s.encode(r);else{if('base64'!==a.encoding)throw new Error('Invalid encoding type "'+a.encoding+'"');o=r}return void 0===n&&(n=-1),i.write(p(e),o,n).then(function(){})},downloadFile:function(e){if('object'!=typeof e)throw new Error('downloadFile: Invalid value for argument `options`');if('string'!=typeof e.fromUrl)throw new Error('downloadFile: Invalid value for property `fromUrl`');if('string'!=typeof e.toFile)throw new Error('downloadFile: Invalid value for property `toFile`');if(e.headers&&'object'!=typeof e.headers)throw new Error('downloadFile: Invalid value for property `headers`');if(e.background&&'boolean'!=typeof e.background)throw new Error('downloadFile: Invalid value for property `background`');if(e.progressDivider&&'number'!=typeof e.progressDivider)throw new Error('downloadFile: Invalid value for property `progressDivider`');if(e.readTimeout&&'number'!=typeof e.readTimeout)throw new Error('downloadFile: Invalid value for property `readTimeout`');if(e.connectionTimeout&&'number'!=typeof e.connectionTimeout)throw new Error('downloadFile: Invalid value for property `connectionTimeout`');var r=f(),n=[];e.begin&&n.push(a.addListener('DownloadBegin-'+r,e.begin)),e.progress&&n.push(a.addListener('DownloadProgress-'+r,e.progress)),e.resumable&&n.push(a.addListener('DownloadResumable-'+r,e.resumable));var t={jobId:r,fromUrl:e.fromUrl,toFile:p(e.toFile),headers:e.headers||{},background:!!e.background,progressDivider:e.progressDivider||0,readTimeout:e.readTimeout||15e3,connectionTimeout:e.connectionTimeout||5e3};return{jobId:r,promise:i.downloadFile(t).then(function(e){return n.forEach(function(e){return e.remove()}),e}).catch(function(e){return Promise.reject(e)})}},uploadFiles:function(e){if(!i.uploadFiles)return{jobId:-1,promise:Promise.reject(new Error('`uploadFiles` is unsupported on this platform'))};var r=f(),n=[];if('object'!=typeof e)throw new Error('uploadFiles: Invalid value for argument `options`');if('string'!=typeof e.toUrl)throw new Error('uploadFiles: Invalid value for property `toUrl`');if(!Array.isArray(e.files))throw new Error('uploadFiles: Invalid value for property `files`');if(e.headers&&'object'!=typeof e.headers)throw new Error('uploadFiles: Invalid value for property `headers`');if(e.fields&&'object'!=typeof e.fields)throw new Error('uploadFiles: Invalid value for property `fields`');if(e.method&&'string'!=typeof e.method)throw new Error('uploadFiles: Invalid value for property `method`');e.begin&&n.push(a.addListener('UploadBegin-'+r,e.begin)),e.beginCallback&&e.beginCallback instanceof Function&&n.push(a.addListener('UploadBegin-'+r,e.beginCallback)),e.progress&&n.push(a.addListener('UploadProgress-'+r,e.progress)),e.progressCallback&&e.progressCallback instanceof Function&&n.push(a.addListener('UploadProgress-'+r,e.progressCallback));var t={jobId:r,toUrl:e.toUrl,files:e.files,headers:e.headers||{},fields:e.fields||{},method:e.method||'POST'};return{jobId:r,promise:i.uploadFiles(t).then(function(e){return n.forEach(function(e){return e.remove()}),e})}},touch:function(e,r,n){if(n&&!(n instanceof Date))throw new Error('touch: Invalid value for argument `ctime`');if(r&&!(r instanceof Date))throw new Error('touch: Invalid value for argument `mtime`');return i.touch(p(e),r&&r.getTime(),0)},MainBundlePath:i.RNFSMainBundlePath,CachesDirectoryPath:i.RNFSCachesDirectoryPath,ExternalCachesDirectoryPath:i.RNFSExternalCachesDirectoryPath,DocumentDirectoryPath:i.RNFSDocumentDirectoryPath,ExternalDirectoryPath:i.RNFSExternalDirectoryPath,ExternalStorageDirectoryPath:i.RNFSExternalStorageDirectoryPath,TemporaryDirectoryPath:i.RNFSTemporaryDirectoryPath,LibraryDirectoryPath:i.RNFSLibraryDirectoryPath,PicturesDirectoryPath:i.RNFSPicturesDirectoryPath};n.exports=m},617,[1,618,619]); +__d(function(e,t,r,n,o){!(function(t){var o='object'==typeof n&&n,a='object'==typeof r&&r&&r.exports==o&&r,c='object'==typeof e&&e;c.global!==c&&c.window!==c||(t=c);var i=function(e){this.message=e};(i.prototype=new Error).name='InvalidCharacterError';var h=function(e){throw new i(e)},d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',f=/[\t\n\f\r ]/g,s={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&h("The string to be encoded contains characters outside of the Latin1 range.");for(var t,r,n,o,a=e.length%3,c='',i=-1,f=e.length-a;++i>18&63)+d.charAt(o>>12&63)+d.charAt(o>>6&63)+d.charAt(63&o);return 2==a?(t=e.charCodeAt(i)<<8,r=e.charCodeAt(++i),c+=d.charAt((o=t+r)>>10)+d.charAt(o>>4&63)+d.charAt(o<<2&63)+'='):1==a&&(o=e.charCodeAt(i),c+=d.charAt(o>>2)+d.charAt(o<<4&63)+'=='),c},decode:function(e){var t=(e=String(e).replace(f,'')).length;t%4==0&&(t=(e=e.replace(/==?$/,'')).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&h('Invalid character: the string to be decoded is not correctly encoded.');for(var r,n,o=0,a='',c=-1;++c>(-2*o&6)));return a},version:'0.1.0'};if('function'==typeof define&&'object'==typeof define.amd&&define.amd)define(function(){return s});else if(o&&!o.nodeType)if(a)a.exports=s;else for(var A in s)s.hasOwnProperty(A)&&(o[A]=s[A]);else t.base64=s})(this)},618,[]); +__d(function(r,n,t,e,o){!(function(n){var o='object'==typeof e&&e,i='object'==typeof t&&t&&t.exports==o&&t,f='object'==typeof r&&r;f.global!==f&&f.window!==f||(n=f);var u,a,c,d=String.fromCharCode;function h(r){for(var n,t,e=[],o=0,i=r.length;o=55296&&n<=56319&&o65535&&(o+=d((n-=65536)>>>10&1023|55296),n=56320|1023&n),o+=d(n);return o}function l(r){if(r>=55296&&r<=57343)throw Error('Lone surrogate U+'+r.toString(16).toUpperCase()+' is not a scalar value')}function s(r,n){return d(r>>n&63|128)}function p(r){if(0==(4294967168&r))return d(r);var n='';return 0==(4294965248&r)?n=d(r>>6&31|192):0==(4294901760&r)?(l(r),n=d(r>>12&15|224),n+=s(r,6)):0==(4292870144&r)&&(n=d(r>>18&7|240),n+=s(r,12),n+=s(r,6)),n+=d(63&r|128)}function y(){if(c>=a)throw Error('Invalid byte index');var r=255&u[c];if(c++,128==(192&r))return 63&r;throw Error('Invalid continuation byte')}function b(){var r,n;if(c>a)throw Error('Invalid byte index');if(c==a)return!1;if(r=255&u[c],c++,0==(128&r))return r;if(192==(224&r)){if((n=(31&r)<<6|y())>=128)return n;throw Error('Invalid continuation byte')}if(224==(240&r)){if((n=(15&r)<<12|y()<<6|y())>=2048)return l(n),n;throw Error('Invalid continuation byte')}if(240==(248&r)&&(n=(7&r)<<18|y()<<12|y()<<6|y())>=65536&&n<=1114111)return n;throw Error('Invalid UTF-8 detected')}var w={version:'2.1.2',encode:function(r){for(var n=h(r),t=n.length,e=-1,o='';++e>>6)+i(128|63&r):i(224|r>>>12&15)+i(128|r>>>6&63)+i(128|63&r);var r=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return i(240|r>>>18&7)+i(128|r>>>12&63)+i(128|r>>>6&63)+i(128|63&r)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(t){return t.replace(d,f)},h=function(t){var r=[0,2,1][t.length%3],e=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[u.charAt(e>>>18),u.charAt(e>>>12&63),r>=2?'=':u.charAt(e>>>6&63),r>=1?'=':u.charAt(63&e)].join('')},g=t.btoa?function(r){return t.btoa(r)}:function(t){return t.replace(/[\s\S]{1,3}/g,h)},p=n?n.from&&Uint8Array&&n.from!==Uint8Array.from?function(t){return(t.constructor===n.constructor?t:n.from(t)).toString('base64')}:function(t){return(t.constructor===n.constructor?t:new n(t)).toString('base64')}:function(t){return g(s(t))},A=function(t,r){return r?p(String(t)).replace(/[+\/]/g,function(t){return'+'==t?'-':'_'}).replace(/=/g,''):p(String(t))},l=new RegExp(['[\xc0-\xdf][\x80-\xbf]','[\xe0-\xef][\x80-\xbf]{2}','[\xf0-\xf7][\x80-\xbf]{3}'].join('|'),'g'),b=function(t){switch(t.length){case 4:var r=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return i(55296+(r>>>10))+i(56320+(1023&r));case 3:return i((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return i((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},y=function(t){return t.replace(l,b)},B=function(t){var r=t.length,e=r%4,n=(r>0?a[t.charAt(0)]<<18:0)|(r>1?a[t.charAt(1)]<<12:0)|(r>2?a[t.charAt(2)]<<6:0)|(r>3?a[t.charAt(3)]:0),o=[i(n>>>16),i(n>>>8&255),i(255&n)];return o.length-=[0,0,2,1][e],o.join('')},C=t.atob?function(r){return t.atob(r)}:function(t){return t.replace(/[\s\S]{1,4}/g,B)},v=n?n.from&&Uint8Array&&n.from!==Uint8Array.from?function(t){return(t.constructor===n.constructor?t:n.from(t,'base64')).toString()}:function(t){return(t.constructor===n.constructor?t:new n(t,'base64')).toString()}:function(t){return y(C(t))},S=function(t){return v(String(t).replace(/[-_]/g,function(t){return'-'==t?'+':'/'}).replace(/[^A-Za-z0-9\+\/]/g,''))};if(t.Base64={VERSION:"2.4.8",atob:C,btoa:g,fromBase64:S,toBase64:A,utob:s,encode:A,encodeURI:function(t){return A(t,!0)},btou:y,decode:S,noConflict:function(){var r=t.Base64;return t.Base64=c,r}},'function'==typeof Object.defineProperty){var m=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};t.Base64.extendString=function(){Object.defineProperty(String.prototype,'fromBase64',m(function(){return S(this)})),Object.defineProperty(String.prototype,'toBase64',m(function(t){return A(this,t)})),Object.defineProperty(String.prototype,'toBase64URI',m(function(){return A(this,!0)}))}}return t.Meteor&&(Base64=t.Base64),void 0!==e&&e.exports?e.exports.Base64=t.Base64:'function'==typeof define&&define.amd&&define([],function(){return t.Base64}),{Base64:t.Base64}})},622,[623]); +__d(function(t,r,e,n,i){'use strict';var o=r(i[0]),u=r(i[1]),s=r(i[2]);n.Buffer=a,n.SlowBuffer=function t(r,e){if(!(this instanceof t))return new t(r,e);var n=new a(r,e);delete n.parent;return n},n.INSPECT_MAX_BYTES=50,a.poolSize=8192;var h={};function f(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t){return this instanceof a?(a.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),'number'==typeof t?c(this,t):'string'==typeof t?l(this,t,arguments.length>1?arguments[1]:'utf8'):p(this,t)):arguments.length>1?new a(t,arguments[1]):new a(t)}function c(t,r){if(t=v(t,r<0?0:0|B(r)),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e>>1&&(t.parent=h),t}function B(t){if(t>=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+' bytes');return 0|t}function R(t,r){'string'!=typeof t&&(t=''+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case'ascii':case'binary':case'raw':case'raws':return e;case'utf8':case'utf-8':return K(t).length;case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return 2*e;case'hex':return e>>>1;case'base64':return W(t).length;default:if(n)return K(t).length;r=(''+r).toLowerCase(),n=!0}}function A(t,r,e){var n=!1;if(r|=0,e=void 0===e||e===1/0?this.length:0|e,t||(t='utf8'),r<0&&(r=0),e>this.length&&(e=this.length),e<=r)return'';for(;;)switch(t){case'hex':return C(this,r,e);case'utf8':case'utf-8':return m(this,r,e);case'ascii':return O(this,r,e);case'binary':return x(this,r,e);case'base64':return S(this,r,e);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return M(this,r,e);default:if(n)throw new TypeError('Unknown encoding: '+t);t=(t+'').toLowerCase(),n=!0}}function U(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new Error('Invalid hex string');n>o/2&&(n=o/2);for(var u=0;u239?4:f>223?3:f>191?2:1;if(i+c<=e)switch(c){case 1:f<128&&(a=f);break;case 2:128==(192&(o=t[i+1]))&&(h=(31&f)<<6|63&o)>127&&(a=h);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(h=(15&f)<<12|(63&o)<<6|63&u)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:o=t[i+1],u=t[i+2],s=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&s)&&(h=(15&f)<<18|(63&o)<<12|(63&u)<<6|63&s)>65535&&h<1114112&&(a=h)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return D(n)}a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:(function(){function t(){}try{var r=new Uint8Array(1);return r.foo=function(){return 42},r.constructor=t,42===r.foo()&&r.constructor===t&&'function'==typeof r.subarray&&0===r.subarray(1,1).byteLength}catch(t){return!1}})(),a.TYPED_ARRAY_SUPPORT?(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array):(a.prototype.length=void 0,a.prototype.parent=void 0),a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,r){if(!a.isBuffer(t)||!a.isBuffer(r))throw new TypeError('Arguments must be Buffers');if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString('hex',0,r).match(/.{2}/g).join(' '),this.length>r&&(t+=' ... ')),''},a.prototype.compare=function(t){if(!a.isBuffer(t))throw new TypeError('Argument must be a Buffer');return this===t?0:a.compare(this,t)},a.prototype.indexOf=function(t,r){if(r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(r<0&&(r=Math.max(this.length+r,0)),'string'==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(a.isBuffer(t))return e(this,t,r);if('number'==typeof t)return a.TYPED_ARRAY_SUPPORT&&'function'===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):e(this,[t],r);function e(t,r,e){for(var n=-1,i=0;e+io)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError('attempt to write outside buffer bounds');n||(n='utf8');for(var u=!1;;)switch(n){case'hex':return U(this,t,r,e);case'utf8':case'utf-8':return _(this,t,r,e);case'ascii':return P(this,t,r,e);case'binary':return b(this,t,r,e);case'base64':return T(this,t,r,e);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return L(this,t,r,e);default:if(u)throw new TypeError('Unknown encoding: '+n);n=(''+n).toLowerCase(),u=!0}},a.prototype.toJSON=function(){return{type:'Buffer',data:Array.prototype.slice.call(this._arr||this,0)}};var Y=4096;function D(t){var r=t.length;if(r<=Y)return String.fromCharCode.apply(String,t);for(var e='',n=0;nn)&&(e=n);for(var i='',o=r;oe)throw new RangeError('Trying to access beyond buffer length')}function k(t,r,e,n,i,o){if(!a.isBuffer(t))throw new TypeError('buffer must be a Buffer instance');if(r>i||rt.length)throw new RangeError('index out of range')}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function q(t,r,e,n,i,o){if(r>i||rt.length)throw new RangeError('index out of range');if(e<0)throw new RangeError('index out of range')}function J(t,r,e,n,i){return i||q(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),u.write(t,r,e,n,23,4),e+4}function X(t,r,e,n,i){return i||q(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),u.write(t,r,e,n,52,8),e+8}a.prototype.slice=function(t,r){var e,n=this.length;if(t=~~t,r=void 0===r?n:~~r,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),r<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},a.prototype.readUInt8=function(t,r){return r||F(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,r){return r||F(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,r){return r||F(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,r){return r||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,r){return r||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||F(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},a.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||F(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},a.prototype.readInt8=function(t,r){return r||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,r){r||F(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt16BE=function(t,r){r||F(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},a.prototype.readInt32LE=function(t,r){return r||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,r){return r||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,r){return r||F(t,4,this.length),u.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,r){return r||F(t,4,this.length),u.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,r){return r||F(t,8,this.length),u.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,r){return r||F(t,8,this.length),u.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,r,e,n){t=+t,r|=0,e|=0,n||k(this,t,r,e,Math.pow(2,8*e),0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},a.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},a.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},a.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},a.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},a.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},a.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,s=t<0?1:0;for(this[r]=255&t;++o>0)-s&255;return r+e},a.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,s=t<0?1:0;for(this[r+o]=255&t;--o>=0&&(u*=256);)this[r+o]=(t/u>>0)-s&255;return r+e},a.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},a.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},a.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},a.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},a.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},a.prototype.writeFloatLE=function(t,r,e){return J(this,t,r,!0,e)},a.prototype.writeFloatBE=function(t,r,e){return J(this,t,r,!1,e)},a.prototype.writeDoubleLE=function(t,r,e){return X(this,t,r,!0,e)},a.prototype.writeDoubleBE=function(t,r,e){return X(this,t,r,!1,e)},a.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError('sourceStart out of bounds');if(n<0)throw new RangeError('sourceEnd out of bounds');n>this.length&&(n=this.length),t.length-r=0;i--)t[i+r]=this[i+e];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i=this.length)throw new RangeError('start out of bounds');if(e<0||e>this.length)throw new RangeError('end out of bounds');var n;if('number'==typeof t)for(n=r;n55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error('Invalid code point');if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function Q(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function W(t){return o.toByteArray($(t))}function tt(t,r,e,n){for(var i=0;i=r.length||i>=t.length);i++)r[i+e]=t[i];return i}},623,[624,625,626]); +__d(function(t,r,a,e,n){var h='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';!(function(t){'use strict';var r='undefined'!=typeof Uint8Array?Uint8Array:Array,a='+'.charCodeAt(0),e='/'.charCodeAt(0),n='0'.charCodeAt(0),c='a'.charCodeAt(0),A='A'.charCodeAt(0),o='-'.charCodeAt(0),i='_'.charCodeAt(0);function u(t){var r=t.charCodeAt(0);return r===a||r===o?62:r===e||r===i?63:r0)throw new Error('Invalid string. Length must be a multiple of 4');var o=t.length;c='='===t.charAt(o-2)?2:'='===t.charAt(o-1)?1:0,A=new r(3*t.length/4-c),n=c>0?t.length-4:t.length;var i=0;function d(t){A[i++]=t}for(a=0,e=0;a>16),d((65280&h)>>8),d(255&h);return 2===c?d(255&(h=u(t.charAt(a))<<2|u(t.charAt(a+1))>>4)):1===c&&(d((h=u(t.charAt(a))<<10|u(t.charAt(a+1))<<4|u(t.charAt(a+2))>>2)>>8&255),d(255&h)),A},t.fromByteArray=function(t){var r,a,e,n,c=t.length%3,A="";function o(t){return h.charAt(t)}for(r=0,e=t.length-c;r>18&63)+o(n>>12&63)+o(n>>6&63)+o(63&n);switch(c){case 1:A+=o((a=t[t.length-1])>>2),A+=o(a<<4&63),A+='==';break;case 2:A+=o((a=(t[t.length-2]<<8)+t[t.length-1])>>10),A+=o(a>>4&63),A+=o(a<<2&63),A+='='}return A}})(void 0===e?this.base64js={}:e)},624,[]); +__d(function(a,o,t,h,r){h.read=function(a,o,t,h,r){var M,f,w=8*r-h-1,p=(1<>1,n=-7,N=t?r-1:0,e=t?-1:1,u=a[o+N];for(N+=e,M=u&(1<<-n)-1,u>>=-n,n+=w;n>0;M=256*M+a[o+N],N+=e,n-=8);for(f=M&(1<<-n)-1,M>>=-n,n+=h;n>0;f=256*f+a[o+N],N+=e,n-=8);if(0===M)M=1-i;else{if(M===p)return f?NaN:1/0*(u?-1:1);f+=Math.pow(2,h),M-=i}return(u?-1:1)*f*Math.pow(2,M-h)},h.write=function(a,o,t,h,r,M){var f,w,p,i=8*M-r-1,n=(1<>1,e=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,u=h?0:M-1,s=h?1:-1,c=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,f=n):(f=Math.floor(Math.log(o)/Math.LN2),o*(p=Math.pow(2,-f))<1&&(f--,p*=2),(o+=f+N>=1?e/p:e*Math.pow(2,1-N))*p>=2&&(f++,p/=2),f+N>=n?(w=0,f=n):f+N>=1?(w=(o*p-1)*Math.pow(2,r),f+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,r),f=0));r>=8;a[t+u]=255&w,u+=s,w/=256,r-=8);for(f=f<0;a[t+u]=255&f,u+=s,f/=256,i-=8);a[t+u-s]|=128*c}},625,[]); +__d(function(r,t,n,a,o){var c={}.toString;n.exports=Array.isArray||function(r){return'[object Array]'==c.call(r)}},626,[]); +__d(function(e,r,n,u,t){Object.defineProperty(u,"__esModule",{value:!0}),u.default=function(){return(function e(r,n){var u=a.schema[r];return Object.keys(u).reduce(function(r,t){var a=n?[n,t].join('.'):t,c=u[t].objectType;return c?(r.push.apply(r,babelHelpers.toConsumableArray(e(c,a))),r):(r.push(a),r)},[])})('CycleDay')};var a=r(t[0])},627,[471]); +__d(function(e,t,r,n,u){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){var r,n,u,a;return regeneratorRuntime.async(function(p){for(;;)switch(p.prev=p.next){case 0:return r={bool:function(e){return'true'===e.toLowerCase()||'false'!==e.toLowerCase()&&e},int:n=function(e){return isNaN(Number(e))||isNaN(parseFloat(e))?e:Number(e)},float:n,double:n,string:function(e){return e}},u={ignoreEmpty:!0,colParser:(0,l.default)().reduce(function(e,t){var n=t.split('.'),u=s(i.schema.CycleDay,n);return e[t]=function(e){return''===e?null:r[u](e)},e},{})},p.next=5,regeneratorRuntime.awrap((0,o.default)(u).fromString(e).on('header',c));case 5:f(a=p.sent),t?(0,i.tryToImportWithDelete)(a):(0,i.tryToImportWithoutDelete)(a);case 8:case"end":return p.stop()}},null,this)};var o=babelHelpers.interopRequireDefault(t(u[0])),a=babelHelpers.interopRequireDefault(t(u[1])),i=t(u[2]),l=babelHelpers.interopRequireDefault(t(u[3]));function c(e){var t=(0,l.default)();if(!e.every(function(e){return t.indexOf(e)>-1})){var r="Expected CSV column titles to be "+t.join();throw new Error(r)}}function f(e){e.forEach(function e(t){Object.keys(t).forEach(function(r){(0,a.default)(t[r])&&(Object.values(t[r]).every(function(e){return null===e})?t[r]=null:e(t[r]))})})}function s(e,t){if(1===t.length)return e[t[0]].type;var r=e[t[0]].objectType;return s(i.schema[r],t.slice(1))}},628,[629,630,471,627]); +__d(function(t,e,r,n,i){r.exports=(function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&("function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag")&&Object.defineProperty(t,"function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag",{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=32)})([function(t,e){var r;r=(function(){return this})();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";var n=r(6),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(5);o.inherits=r(2);var s=r(22),a=r(13);o.inherits(f,s);for(var u=i(a.prototype),c=0;c=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return N(t).length;e=(""+e).toLowerCase(),n=!0}}function _(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o})(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return(function(t){var e=t.length;if(e<=j)return String.fromCharCode.apply(String,t);for(var r="",n=0;nthis.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return g(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function A(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function F(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function M(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return o||M(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return o||M(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||A(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);A(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(t){return n.toByteArray((function(t){if((t=(function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")})(t).replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t})(t))}function V(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(0))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!(function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}})();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r0&&this._events[t].length>s&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){(e=t.exports=r(22)).Stream=e,e.Readable=e,e.Writable=r(13),e.Duplex=r(1),e.Transform=r(27),e.PassThrough=r(45)},function(t,e,r){"use strict";(function(e,n,i){var o=r(6);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!(function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(void 0),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t})(e,t)}}t.exports=m;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;m.WritableState=y;var c=r(5);c.inherits=r(2);var l,f={deprecate:r(44)},h=r(23),p=r(7).Buffer,d=i.Uint8Array||function(){},_=r(24);function v(){}function y(t,e){a=a||r(1),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!(function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if((function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0})(r),e)!(function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),S(t,e))})(t,r,n,e,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?u(b,t,r,s,i):b(t,r,s,i)}})(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function m(t){if(a=a||r(1),!(l.call(m,this)||this instanceof a))return new m(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function g(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function b(t,e,r,n){r||(function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))})(t,e),e.pendingcb--,n(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,g(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(g(t,e,!1,e.objectMode?1:c.length,c,l,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function C(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(t,e){var r=E(e);return r&&((function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(C,t,e)):(e.prefinished=!0,t.emit("prefinish")))})(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(m,h),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},(function(){try{Object.defineProperty(y.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}})(),"function"!=typeof Symbol||"function"==typeof Symbol&&!Symbol.hasInstance||"function"!=typeof Function.prototype["function"==typeof Symbol?Symbol.hasInstance:"@@hasInstance"]?l=function(t){return t instanceof this}:(l=Function.prototype["function"==typeof Symbol?Symbol.hasInstance:"@@hasInstance"],Object.defineProperty(m,"function"==typeof Symbol?Symbol.hasInstance:"@@hasInstance",{value:function(t){return!!l.call(this,t)||this===m&&t&&t._writableState instanceof y}})),m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&(function(t){return p.isBuffer(t)||t instanceof d})(t);return s&&!p.isBuffer(t)&&(t=(function(t){return p.from(t)})(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=v),n.ended?(function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)})(this,r):(s||(function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i})(this,n,t,r))&&(n.pendingcb++,i=(function(t,e,r,n,i,o){if(!r){var s=(function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=p.from(e,r)),e})(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||(function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1})(this,n,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=_.destroy,m.prototype._undestroy=_.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(4),r(25).setImmediate,r(0))},function(t,e,r){(function(e,r,n){t.exports=(function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof _dereq_&&_dereq_;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){return i(e[s][1][t]||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},u.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},u.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},u.prototype._reset=function(){this._isTickUsed=!1},r.exports=u,r.exports.firstLineError=i},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=r(o),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var h={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,s,void 0,l,h),c._then(a,u,void 0,l,h),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var i=t("./promise")();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(t){}return i},e.exports=i},{"./promise":22}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){var r=t("./util"),n=r.canEvaluate;function i(t){return(function(t,n){var i;if(null!=t&&(i=t[n]),"function"!=typeof i){var o="Object "+r.classString(t)+" has no method '"+r.toString(n)+"'";throw new e.TypeError(o)}return i})(t,this.pop()).apply(t,this)}function o(t){return t[this]}function s(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}r.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(i,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=s;else if(n){var r=(void 0)(t);e=null!==r?r:o}else e=o;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,u=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=u,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){var i,o,s,a=r._getDomain,u=r._async,c=t("./errors").Warning,l=t("./util"),f=l.canAttachTrace,h=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,p=/\((?:timers\.js):\d+:\d+\)/,d=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,_=null,v=null,y=!1,m=!(0==l.env("BLUEBIRD_DEBUG")),g=!(0==l.env("BLUEBIRD_WARNINGS")||!m&&!l.env("BLUEBIRD_WARNINGS")),b=!(0==l.env("BLUEBIRD_LONG_STACK_TRACES")||!m&&!l.env("BLUEBIRD_LONG_STACK_TRACES")),w=0!=l.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(g||!!l.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},r.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},r.prototype._notifyUnhandledRejectionIsHandled=function(){q("rejectionHandled",i,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),q("unhandledRejection",o,t,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(t,e,r){return U(t,e,r||this)},r.onPossiblyUnhandledRejection=function(t){var e=a();o="function"==typeof t?null===e?t:l.domainBind(e,t):void 0},r.onUnhandledRejectionHandled=function(t){var e=a();i="function"==typeof t?null===e?t:l.domainBind(e,t):void 0};var E=function(){};r.longStackTraces=function(){if(u.haveItemsQueued()&&!J.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!J.longStackTraces&&Y()){var t=r.prototype._captureStackTrace,e=r.prototype._attachExtraTrace;J.longStackTraces=!0,E=function(){if(u.haveItemsQueued()&&!J.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=t,r.prototype._attachExtraTrace=e,n.deactivateLongStackTraces(),u.enableTrampoline(),J.longStackTraces=!1},r.prototype._captureStackTrace=D,r.prototype._attachExtraTrace=I,n.activateLongStackTraces(),u.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return J.longStackTraces&&Y()};var C=(function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return l.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!l.global.dispatchEvent(r)}}return"function"==typeof Event?(t=new Event("CustomEvent"),l.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!l.global.dispatchEvent(r)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),l.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!l.global.dispatchEvent(r)})}catch(t){}return function(){return!1}})(),S=l.isNode?function(){return e.emit.apply(e,arguments)}:l.global?function(t){var e="on"+t.toLowerCase(),r=l.global[e];return!!r&&(r.apply(l.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function x(t,e){return{promise:e}}var j={promiseCreated:x,promiseFulfilled:x,promiseRejected:x,promiseResolved:x,promiseCancelled:x,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:x},R=function(t){var e=!1;try{e=S.apply(null,arguments)}catch(t){u.throwLater(t),e=!0}var r=!1;try{r=C(t,j[t].apply(null,arguments))}catch(t){u.throwLater(t),r=!0}return r||e};function k(){return!1}function T(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+l.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function P(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?l.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function O(){return this._onCancelField}function A(t){this._onCancelField=t}function F(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}r.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?r.longStackTraces():!t.longStackTraces&&r.hasLongStackTraces()&&E()),"warnings"in t){var e=t.warnings;J.warnings=!!e,w=J.warnings,l.isObject(e)&&"wForgottenReturn"in e&&(w=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!J.cancellation){if(u.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=F,r.prototype._propagateFrom=L,r.prototype._onCancel=O,r.prototype._setOnCancel=A,r.prototype._attachCancellationCallback=P,r.prototype._execute=T,M=L,J.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!J.monitoring?(J.monitoring=!0,r.prototype._fireEvent=R):!t.monitoring&&J.monitoring&&(J.monitoring=!1,r.prototype._fireEvent=k)),r},r.prototype._fireEvent=k,r.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(t){},r.prototype._attachCancellationCallback=function(t){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(t,e){};var M=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function B(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t}function D(){this._trace=new X(this._peekContext())}function I(t,e){if(f(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=H(t);l.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),l.notEnumerableProp(t,"__stackCleaned__",!0)}}}function U(t,e,n){if(J.warnings){var i,o=new c(t);if(e)n._attachExtraTrace(o);else if(J.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var s=H(o);o.stack=s.message+"\n"+s.stack.join("\n")}R("warning",o)||V(o,"",!0)}}function N(t){for(var e=[],r=0;r0?(function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e})(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:N(e)}}function V(t,e,r){if("undefined"!=typeof console){var n;if(l.isObject(t)){var i=t.stack;n=e+v(i,t)}else n=e+String(t);"function"==typeof s?s(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function q(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){u.throwLater(t)}"unhandledRejection"===t?R(t,r,n)||i||V(r,"Unhandled rejection "):R(t,n)}function W(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():l.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+(function(t){return t.length<41?t:t.substr(0,38)+"..."})(e)+">, no stack trace)"}function Y(){return"function"==typeof G}var $=function(){return!1},z=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Q(t){var e=t.match(z);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function X(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);G(this,X),e>32&&this.uncycle()}l.inherits(X,Error),n.CapturedTrace=X,X.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;for(n=(t=this._length=n)-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var a=n>0?e[n-1]:this;s=0;--c)e[c]._length=u,u++;return}}}},X.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=H(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(N(i.stack.split("\n"))),i=i._parent;!(function(t){for(var e=t[0],r=1;r=0;--a)if(n[a]===o){s=a;break}for(a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}})(n),(function(t){for(var e=0;e=0)return _=/@/,v=e,y=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return"stack"in i||!n||"number"!=typeof Error.stackTraceLimit?(v=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?W(e):e.toString()},null):(_=t,v=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})})();"undefined"!=typeof console&&void 0!==console.warn&&(s=function(t){console.warn(t)},l.isNode&&e.stderr.isTTY?s=function(t,e){var r=e?"\x1b[33m":"\x1b[31m";console.warn(r+t+"\x1b[0m\n")}:l.isNode||"string"!=typeof(new Error).stack||(s=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var J={warnings:g,longStackTraces:!1,cancellation:!1,monitoring:!1};return b&&r.longStackTraces(),{longStackTraces:function(){return J.longStackTraces},warnings:function(){return J.warnings},cancellation:function(){return J.cancellation},monitoring:function(){return J.monitoring},propagateFromFunction:function(){return M},boundValueFunction:function(){return B},checkForgottenReturns:function(t,e,r,n,i){if(void 0===t&&null!==e&&w){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),u=N(a),c=u.length-1;c>=0;--c){var l=u[c];if(!p.test(l)){var f=l.match(d);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0){var h=u[0];for(c=0;c0&&(s="\n"+a[c-1]);break}}}var _="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;n._warn(_,!0,e)}},setBounds:function(t,e){if(Y()){for(var r,n,i=t.stack.split("\n"),o=e.stack.split("\n"),s=-1,a=-1,u=0;u=a||($=function(t){if(h.test(t))return!0;var e=Q(t);return!!(e&&e.fileName===r&&s<=e.line&&e.line<=a)})}},warn:U,deprecated:function(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),U(r)},CapturedTrace:X,fireDomEvent:C,fireGlobalEvent:S}}},{"./errors":12,"./util":36}],10:[function(t,e,r){"use strict";e.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];return n instanceof t&&n.suppressUnhandledRejections(),this.caught(r,function(){return n})}}},{}],11:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.reduce,n=t.all;function i(){return n(this)}t.prototype.each=function(t){return r(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return r(t,n,e,e)}}},{}],12:[function(t,e,r){"use strict";var n,i,o=t("./es5"),s=o.freeze,a=t("./util"),u=a.inherits,c=a.notEnumerableProp;function l(t,e){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:e),c(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var f=l("Warning","warning"),h=l("CancellationError","cancellation error"),p=l("TimeoutError","timeout error"),d=l("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(t){n=l("TypeError","type error"),i=l("RangeError","range error")}for(var _="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v<_.length;++v)"function"==typeof Array.prototype[_[v]]&&(d.prototype[_[v]]=Array.prototype[_[v]]);o.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var y=0;function m(t){if(!(this instanceof m))return new m(t);c(this,"name","OperationalError"),c(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(c(this,"message",t.message),c(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+1).join(" ");for(var r=0;r1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function f(){return p.call(this,this.promise._target()._settledValue())}function h(t){if(!l(this,t))return s.e=t,s}function p(t){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),t);if(u===n)return u;if(void 0!==u){i._setReturnedNonUndefined();var p=r(u,i);if(p instanceof e){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new o("late cancellation observer");return i._attachExtraTrace(d),s.e=d,s}p.isPending()&&p._attachCancellationCallback(new c(this))}return p._then(f,h,void 0,this,void 0)}}}return i.isRejected()?(l(this),s.e=t,s):(l(this),t)}return u.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){l(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new u(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,p,p)},e.prototype.tap=function(t){return this._passThrough(t,1,p)},e.prototype.tapCatch=function(t){var r=arguments.length;if(1===r)return this._passThrough(t,1,void 0,p);var n,o=new Array(r-1),s=0;for(n=0;n0&&"function"==typeof arguments[e]&&(t=arguments[e]);var n=[].slice.call(arguments);t&&n.pop();var i=new r(n).promise();return void 0!==t?i.spread(t):i}}},{"./util":36}],18:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,s){var a=e._getDomain,u=t("./util"),c=u.tryCatch,l=u.errorObj,f=e._async;function h(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=a();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function p(t,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+u.classString(r));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return new h(t,r,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}u.inherits(h,r),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),a=this._preservedValues,u=this._limit;if(r<0){if(n[r=-1*r-1]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=t,this._queue.push(r),!1;null!==a&&(a[r]=t);var f=this._promise,h=this._callback,p=f._boundValue();f._pushContext();var d=c(h).call(p,t,r,o),_=f._popContext();if(s.checkForgottenReturns(d,_,null!==a?"Promise.filter":"Promise.map",f),d===l)return this._reject(d.e),!0;var v=i(d,this._promise);if(v instanceof e){var y=(v=v._target())._bitField;if(0==(50397184&y))return u>=1&&this._inFlight++,n[r]=v,v._proxy(this,-1*(r+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}n[r]=d}return++this._totalResolved>=o&&(null!==a?this._filter(n,a):this._resolve(n),!0)},h.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];n=s.isArray(c)?a(t).apply(l,c):a(t).call(l,c)}else n=a(t)();var f=u._popContext();return o.checkForgottenReturns(n,f,"Promise.try",u),u._resolveFromSyncValue(n),u},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){"use strict";var n=t("./util"),i=n.maybeWrapAsError,o=t("./errors").OperationalError,s=t("./es5"),a=/^(?:name|message|stack|cause)$/;function u(t){var e;if((function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype})(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=s.keys(t),i=0;i1){var r,n=new Array(e-1),i=0;for(r=0;r0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+c.classString(t);arguments.length>1&&(r+=", "+c.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},T.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},T.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+c.classString(t)):this.all()._then(t,void 0,void 0,y,void 0)},T.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},T.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new b(this).promise()},T.prototype.error=function(t){return this.caught(c.originatesFromRejection,t)},T.getNewLibraryCopy=r.exports,T.is=function(t){return t instanceof T},T.fromNode=T.fromCallback=function(t){var e=new T(v);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=k(t)(j(e,r));return n===R&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},T.all=function(t){return new b(t).promise()},T.cast=function(t){var e=g(t);return e instanceof T||((e=new T(v))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},T.resolve=T.fulfilled=T.cast,T.reject=T.rejected=function(t){var e=new T(v);return e._captureStackTrace(),e._rejectCallback(t,!0),e},T.setScheduler=function(t){if("function"!=typeof t)throw new d("expecting a function but got "+c.classString(t));return h.setScheduler(t)},T.prototype._then=function(t,e,r,n,i){var o=void 0!==i,s=o?i:new T(v),u=this._target(),l=u._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=a();if(0!=(50397184&l)){var p,d,y=u._settlePromiseCtx;0!=(33554432&l)?(d=u._rejectionHandler0,p=t):0!=(16777216&l)?(d=u._fulfillmentHandler0,p=e,u._unsetRejectionIsUnhandled()):(y=u._settlePromiseLateCancellationObserver,d=new _("late cancellation observer"),u._attachExtraTrace(d),p=e),h.invoke(y,u,{handler:null===f?p:"function"==typeof p&&c.domainBind(f,p),promise:s,receiver:n,value:d})}else u._addCallbacks(t,e,s,n,f);return s},T.prototype._length=function(){return 65535&this._bitField},T.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},T.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},T.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},T.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},T.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},T.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},T.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},T.prototype._isFinal=function(){return(4194304&this._bitField)>0},T.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},T.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},T.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},T.prototype._setAsyncGuaranteed=function(){h.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},T.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==u)return void 0===e&&this._isBound()?this._boundValue():e},T.prototype._promiseAt=function(t){return this[4*t-4+2]},T.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},T.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},T.prototype._boundValue=function(){},T.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=u),this._addCallbacks(e,r,n,i,null)},T.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=u),this._addCallbacks(r,n,i,o,null)},T.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:c.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:c.domainBind(i,e));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof t&&(this[s+0]=null===i?t:c.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:c.domainBind(i,e))}return this._setLength(o+1),o},T.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},T.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var r=g(t,this);if(!(r instanceof T))return this._fulfill(t);e&&this._propagateFrom(r,2);var i=r._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;a>>16)){if(t===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():h.settlePromises(this))}},T.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return h.fatalError(t,c.isNode);(65535&e)>0?h.settlePromises(this):this._ensurePossibleRejectionHandled()}},T.prototype._fulfillPromises=function(t,e){for(var r=1;r0){if(0!=(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},T.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},T.defer=T.pending=function(){return C.deprecated("Promise.defer","new Promise"),{promise:new T(v),resolve:P,reject:O}},c.notEnumerableProp(T,"_makeSelfResolutionError",n),t("./method")(T,v,g,o,C),t("./bind")(T,v,g,C),t("./cancel")(T,b,o,C),t("./direct_resolve")(T),t("./synchronous_inspection")(T),t("./join")(T,b,g,v,h,a),T.Promise=T,T.version="3.5.1",t("./map.js")(T,b,o,g,v,C),t("./call_get.js")(T),t("./using.js")(T,o,g,E,v,C),t("./timers.js")(T,v,C),t("./generators.js")(T,o,v,g,s,C),t("./nodeify.js")(T),t("./promisify.js")(T,v),t("./props.js")(T,b,g,o),t("./race.js")(T,v,g,o),t("./reduce.js")(T,b,o,g,v,C),t("./settle.js")(T,b,C),t("./some.js")(T,b,o),t("./filter.js")(T,v),t("./each.js")(T,v),t("./any.js")(T),c.toFastProperties(T),c.toFastProperties(T.prototype),A({a:1}),A({b:2}),A({c:3}),A(1),A(function(){}),A(void 0),A(!1),A(new T(v)),C.setBounds(f.firstLineError,c.lastLineError),T}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){var s=t("./util");function a(t){var n=this._promise=new e(r);t instanceof e&&n._propagateFrom(t,3),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.isArray,s.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function t(r,o){var a=n(this._values,this._promise);if(a instanceof e){var u=(a=a._target())._bitField;if(this._values=a,0==(50397184&u))return this._promise._setAsyncGuaranteed(),a._then(t,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve((function(t){switch(o){case-2:return[];case-3:return{};case-6:return new Map}})());else{var c=i("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(c,!1)}},a.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,s=null,a=0;a=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var r=0;r=this._length){var r;if(this._isMap)r=(function(t){for(var e=new o,r=t.length/2|0,n=0;n>1},e.prototype.props=function(){return f(this)},e.props=function(t){return f(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){"use strict";function n(t){this._capacity=t,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(t){return this._capacity=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){"use strict";e.exports=function(e,r,n){var i=t("./util"),o=t("./errors").RangeError,s=t("./errors").AggregateError,a=i.isArray,u={};function c(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(t),i=r.promise();return r.setHowMany(e),r.init(),i}i.inherits(c,r),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=a(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(t){this._howMany=t},c.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(t){this._values.push(t)},c.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return l(t,e)},e.prototype.some=function(t){return l(this,t)},e._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(t,e,r){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,r){"use strict";e.exports=function(e,r){var n=t("./util"),i=n.errorObj,o=n.isObject,s={}.hasOwnProperty;return function(t,a){if(o(t)){if(t instanceof e)return t;var u=(function(t){try{return(function(t){return t.then})(t)}catch(t){return i.e=t,i}})(t);if(u===i){a&&a._pushContext();var c=e.reject(u.e);return a&&a._popContext(),c}if("function"==typeof u)return(function(t){try{return s.call(t,"_promise0")}catch(t){return!1}})(t)?(c=new e(r),t._then(c._fulfill,c._reject,void 0,c,null),c):(function(t,o,s){var a=new e(r),u=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var c=!0,l=n.tryCatch(o).call(t,function(t){a&&(a._resolveCallback(t),a=null)},function(t){a&&(a._rejectCallback(t,c,!0),a=null)});return c=!1,a&&l===i&&(a._rejectCallback(l.e,!0,!0),a=null),u})(t,u,a)}return t}}},{"./util":36}],34:[function(t,e,r){"use strict";e.exports=function(e,r,n){var i=t("./util"),o=e.TimeoutError;function s(t){this.handle=t}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,i){var o,u;return void 0!==i?(o=e.resolve(i)._then(a,null,null,t,void 0),n.cancellation()&&i instanceof e&&o._setOnCancel(i)):(o=new e(r),u=setTimeout(function(){o._fulfill()},+t),n.cancellation()&&o._setOnCancel(new s(u)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};function c(t){return clearTimeout(this.handle),t}function l(t){throw clearTimeout(this.handle),t}e.prototype.delay=function(t){return u(t,this)},e.prototype.timeout=function(t,e){var r,a;t=+t;var u=new s(setTimeout(function(){r.isPending()&&(function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()})(r,e,a)},t));return n.cancellation()?(a=this.then(),(r=a._then(c,l,void 0,u,void 0))._setOnCancel(u)):r=this._then(c,l,void 0,u,void 0),r}}},{"./util":36}],35:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,s){var a=t("./util"),u=t("./errors").TypeError,c=t("./util").inherits,l=a.errorObj,f=a.tryCatch,h={};function p(t){setTimeout(function(){throw t},0)}function d(t,r){var i=0,s=t.length,a=new e(o);return(function o(){if(i>=s)return a._fulfill();var u=(function(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e})(t[i++]);if(u instanceof e&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),t.promise)}catch(t){return p(t)}if(u instanceof e)return u._then(o,p,null,null,null)}o()})(),a}function _(t,e,r){this._data=t,this._promise=e,this._context=r}function v(t,e,r){this.constructor$(t,e,r)}function y(t){return _.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function m(t){this.length=t,this.promise=null,this[t-1]=null}_.prototype.data=function(){return this._data},_.prototype.promise=function(){return this._promise},_.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},_.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==h?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},_.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},c(v,_),v.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},m.prototype._resultCancelled=function(){for(var t=this.length,r=0;r0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new v(t,this,i());throw new u}}},{"./errors":12,"./util":36}],36:[function(t,n,i){"use strict";var o,s=t("./es5"),a="undefined"==typeof navigator,u={e:{}},c="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r?r:void 0!==this?this:null;function l(){try{var t=o;return o=null,t.apply(this,arguments)}catch(t){return u.e=t,u}}function f(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function h(t,e,r){if(f(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return s.defineProperty(t,e,n),t}var p=(function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=d.test(t+"")&&s.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}},isIdentifier:function(t){return _.test(t)},inheritedDataKeys:p,getDataPropertyOrDefault:function(t,e,r){if(!s.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0},thrower:function(t){throw t},isArray:s.isArray,asArray:w,notEnumerableProp:h,isPrimitive:f,isObject:function(t){return"function"==typeof t||"object"==typeof t&&null!==t},isError:y,canEvaluate:a,errorObj:u,tryCatch:function(t){return o=t,l},inherits:function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype},withAppended:function(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r10||t[0]>0})(),x.isNode&&x.toFastProperties(e);try{throw new Error}catch(t){x.lastLineError=t}n.exports=x},{"./es5":13}]},{},[4])(4),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,r(4),r(0),r(25).setImmediate)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(!e.eol&&t)for(var r=0,n=t.length;r0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=(function(t){return c.from(t)})(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):j(t,s)):w(t,s,e,!1))):n||(s.reading=!1)),(function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=(function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t})(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(x,t):x(t))}function x(t){p("emit readable"),t.emit("readable"),P(t)}function j(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=(function(t,e,r){var n;return to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0==(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i})(t,e):(function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0==(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r})(t,e),n})(t,e.buffer,e.decoder),r);var r}function A(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function L(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?A(this):S(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&A(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&A(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=e&&!1===e.end||t===n.stdout||t===n.stderr?m:c;function c(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",function e(n,i){p("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",_),t.removeListener("unpipe",e),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",d),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())});var l=(function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,P(t))}})(r);t.on("drain",l);var f=!1,h=!1;function d(e){p("ondata"),h=!1,!1!==t.write(e)||h||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==L(o.pipes,t))&&!f&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function _(e){p("onerror",e),m(),t.removeListener("error",_),0===a(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),m()}function y(){p("onfinish"),t.removeListener("close",v),m()}function m(){p("unpipe"),r.unpipe(t)}return r.on("data",d),(function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)})(t,"error",_),t.once("close",v),t.once("finish",y),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},g.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(43),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(0))},function(t,e,r){"use strict";var n=r(7).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=(function(t){var e=(function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}})(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t})(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=(function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"\ufffd"}})(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0})(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=o;var n=r(1),i=r(5);function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length-1&&r.push(t[n]);return r},e.trimLeft=String.prototype.trimLeft?function(t){return t.trimLeft()}:function(t){return t.replace(/^\s+/,"")},e.trimRight=String.prototype.trimRight?function(t){return t.trimRight()}:function(t){return t.replace(/\s+$/,"")}}).call(this,r(3).Buffer)},function(t,e,r){"use strict";var n=this&&this.__extends||(function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}})();Object.defineProperty(e,"__esModule",{value:!0});var i=(function(t){function e(e,r,n){var i=t.call(this,"Error: "+e+". JSON Line number: "+r+(n?" near: "+n:""))||this;return i.err=e,i.line=r,i.extra=n,i.name="CSV Parse Error",i}return n(e,t),e.column_mismatched=function(t,r){return new e("column_mismatched",t,r)},e.unclosed_quote=function(t,r){return new e("unclosed_quote",t,r)},e.fromJSON=function(t){return new e(t.err,t.line,t.extra)},e.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},e})(Error);e.default=i},function(t,e,r){var n=r(17),i=r(68),o=r(69),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){t.exports=r(33)},function(t,e,r){"use strict";var n=r(34),i=function(t,e){return new n.Converter(t,e)};i.Converter=n.Converter,t.exports=i},function(t,e,r){"use strict";var n=this&&this.__extends||(function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}})(),i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=r(35),s=r(50),a=r(51),u=i(r(14)),c=r(52),l=r(105),f=(function(t){function e(e,r){void 0===r&&(r={});var n=t.call(this,r)||this;return n.options=r,n.params=s.mergeParams(e),n.runtime=a.initParseRuntime(n),n.result=new l.Result(n),n.processor=new c.ProcessorLocal(n),n.once("error",function(t){setTimeout(function(){n.result.processError(t),n.emit("done",t)},0)}),n.once("done",function(){n.processor.destroy()}),n}return n(e,t),e.prototype.preRawData=function(t){return this.runtime.preRawDataHook=t,this},e.prototype.preFileLine=function(t){return this.runtime.preFileLineHook=t,this},e.prototype.subscribe=function(t,e,r){return this.parseRuntime.subscribe={onNext:t,onError:e,onCompleted:r},this},e.prototype.fromFile=function(t,e){var n=this,i=r(!(function(){var t=new Error("Cannot find module 'fs'");throw t.code="MODULE_NOT_FOUND",t})());return i.exists(t,function(r){r?i.createReadStream(t,e).pipe(n):n.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},e.prototype.fromStream=function(t){return t.pipe(this),this},e.prototype.fromString=function(t){t.toString();var e=new o.Readable,r=0;return e._read=function(e){if(r>=t.length)this.push(null);else{var n=t.substr(r,e);this.push(n),r+=e}},this.fromStream(e)},e.prototype.then=function(t,e){var r=this;return new u.default(function(n,i){r.parseRuntime.then={onfulfilled:function(e){n(t?t(e):e)},onrejected:function(t){e?n(e(t)):i(t)}}})},Object.defineProperty(e.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),e.prototype._transform=function(t,e,r){var n=this;this.processor.process(t).then(function(t){if(t.length>0)return n.runtime.started=!0,n.result.processResult(t)}).then(function(){n.emit("drained"),r()},function(t){n.runtime.hasError=!0,n.runtime.error=t,n.emit("error",t),r()})},e.prototype._flush=function(t){var e=this;this.processor.flush().then(function(t){if(t.length>0)return e.result.processResult(t)}).then(function(){e.processEnd(t)},function(r){e.emit("error",r),t()})},e.prototype.processEnd=function(t){this.result.endProcess(),this.emit("done"),t()},Object.defineProperty(e.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),e})(o.Transform);e.Converter=f},function(t,e,r){t.exports=i;var n=r(11).EventEmitter;function i(){n.call(this)}r(2)(i,n),i.Readable=r(12),i.Writable=r(46),i.Duplex=r(47),i.Transform=r(48),i.PassThrough=r(49),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",c),t.on("error",c),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){for(var e,r=c(t),n=r[0],s=r[1],a=new o(3*(n+s)/4-s),u=0,l=s>0?n-4:n,f=0;f>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===s&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,a[u++]=255&e),1===s&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t){return n[t>>18&63]+n[t>>12&63]+n[t>>6&63]+n[63&t]}function f(t,e,r){for(var n,i=[],o=e;o>1,l=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,_=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*_}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){},function(t,e,r){"use strict";var n=r(7).Buffer,i=r(42);function o(t,e,r){t.copy(e,r)}t.exports=(function(){function t(){!(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)o(r.data,e,i),i+=r.data.length,r=r.next;return e},t})(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t,e){!(function(t,r){"use strict";if(!t.setImmediate){var n,i=1,o={},s=!1,a=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){l(t)})}:(function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}})()?(function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&l(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(r){t.postMessage(e+r,"*")}})():t.MessageChannel?(function(){var t=new MessageChannel;t.port1.onmessage=function(t){l(t.data)},n=function(e){t.port2.postMessage(e)}})():a&&"onreadystatechange"in a.createElement("script")?(function(){var t=a.documentElement;n=function(e){var r=a.createElement("script");r.onreadystatechange=function(){l(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}})():n=function(t){setTimeout(l,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r0){var e=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(e,!0).then(function(e){return t.runtime.csvLineBuffer&&t.runtime.csvLineBuffer.length>0?s.default.reject(p.default.unclosed_quote(t.runtime.parsedLineNumber,t.runtime.csvLineBuffer.toString())):s.default.resolve(e)})}return s.default.resolve([])},r.prototype.destroy=function(){return s.default.resolve()},Object.defineProperty(r.prototype,"needEmitEol",{get:function(){return void 0===this._needEmitEol&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"needEmitHead",{get:function(){return void 0===this._needEmitHead&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),r.prototype.process=function(t,e){var r,n=this;return void 0===e&&(e=!1),r=e?t.toString():a.prepareData(t,this.converter.parseRuntime),s.default.resolve().then(function(){return n.runtime.preRawDataHook?n.runtime.preRawDataHook(r):r}).then(function(t){return t&&t.length>0?n.processCSV(t,e):s.default.resolve([])})},r.prototype.processCSV=function(t,e){var r=this,n=this.params,i=this.runtime;i.eol||u.default(t,i),this.needEmitEol&&!this.eolEmitted&&i.eol&&(this.converter.emit("eol",i.eol),this.eolEmitted=!0),n.ignoreEmpty&&!i.started&&(t=l.trimLeft(t));var o=c.stringToLines(t,i);return e?(o.lines.push(o.partial),o.partial=""):this.prependLeftBuf(l.bufFromString(o.partial)),o.lines.length>0?(i.preFileLineHook?this.runPreLineHook(o.lines):s.default.resolve(o.lines)).then(function(t){return i.started||r.runtime.headers?r.processCSVBody(t):r.processDataWithHead(t)}):s.default.resolve([])},r.prototype.processDataWithHead=function(t){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var e="",r=[];t.length;){var n=e+t.shift(),i=this.rowSplit.parse(n);if(i.closed){r=i.cells,e="";break}e=n+u.default(n,this.runtime)}if(this.prependLeftBuf(l.bufFromString(e)),0===r.length)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=r}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(t)},r.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var t=this.runtime.headers,e=0;e=e.length)i();else if(r.preFileLineHook){var o=e[n],s=r.preFileLineHook(o,r.parsedLineNumber+n);if(n++,s&&s.then)s.then(function(o){e[n-1]=o,t(e,r,n,i)});else{for(e[n-1]=s;n0?t.concat([r.csvLineBuffer,e]):e})(e,r);r.csvLineBuffer=void 0;var o=(function(t,e){var r=t.length-1;if(0!=(128&t[r])){for(;128==(192&t[r]);)r--;r--}return r!=t.length-1?(e.csvLineBuffer=t.slice(r+1),t.slice(0,r+1)):t})(n,r).toString("utf8");return!1===r.started?i.default(o):o}}).call(this,r(3).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(56);t.exports=function(t){return"string"==typeof t&&65279===t.charCodeAt(0)?t.slice(1):e.isBuffer(t)&&n(t)&&239===t[0]&&187===t[1]&&191===t[2]?t.slice(3):t}}).call(this,r(3).Buffer)},function(t,e){t.exports=function(t){for(var e=0;e0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),t.prototype.parse=function(t){if(0===t.length||this.conv.parseParam.ignoreEmpty&&0===t.trim().length)return{cells:[],closed:!0};var e=this.quote,r=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||"auto"===this.conv.parseRuntime.delimiter.toLowerCase())&&(this.conv.parseRuntime.delimiter=this.getDelimiter(t)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var n=this.conv.parseRuntime.delimiter,i=t.split(n);if("off"===e){if(r)for(var o=0;or&&(n=e,r=i)}),n},t.prototype.isQuoteOpen=function(t){var e=this.quote,r=this.escape;return t[0]===e&&(t[1]!==e||t[1]===r&&(t[2]===e||2===t.length))},t.prototype.isQuoteClose=function(t){var e=this.quote,r=this.escape;this.conv.parseParam.trim&&(t=o.trimRight(t));for(var n=0,i=t.length-1;t[i]===e||t[i]===r;)i--,n++;return n%2!=0},t.prototype.escapeQuote=function(t){var e="es|"+this.quote+"|"+this.escape;void 0===this.cachedRegExp[e]&&(this.cachedRegExp[e]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var r=this.cachedRegExp[e];return t.replace(r,this.quote)},t.prototype.parseMultiLines=function(t){for(var e=[],r="";t.length;){var n=r+t.shift(),s=this.parse(n);0===s.cells.length&&this.conv.parseParam.ignoreEmpty||(s.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?e.push(o.filterArray(s.cells,this.conv.parseRuntime.selectedColumns)):e.push(s.cells),r=""):r=n+(i.default(n,this.conv.parseRuntime)||"\n"))}return{rowsCells:e,partial:r}},t})();e.RowSplit=a},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(29)),o=n(r(60)),s=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function a(t,e,r){if(e.parseParam.checkColumn&&e.parseRuntime.headers&&t.length!==e.parseRuntime.headers.length)throw i.default.column_mismatched(e.parseRuntime.parsedLineNumber+r);return(function(t,e,r){for(var n=!1,i={},o=0,s=t.length;o-1?n.parseParam.colParser[e]&&n.parseParam.colParser[e].flat?n.parseRuntime.columnValueSetter[i]=f:n.parseRuntime.columnValueSetter[i]=h:n.parseRuntime.columnValueSetter[i]=f),n.parseRuntime.columnValueSetter[i](t,e,r)}function f(t,e,r){t[e]=r}function h(t,e,r){o.default(t,e,r)}function p(t,e,r,n){return n.parseRuntime.headerType[r]?n.parseRuntime.headerType[r]:e.indexOf("number#!")>-1?n.parseRuntime.headerType[r]=d:e.indexOf("string#!")>-1?n.parseRuntime.headerType[r]=_:n.parseParam.checkType?n.parseRuntime.headerType[r]=v:n.parseRuntime.headerType[r]=_}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function _(t){return t.toString()}function v(t){var e=t.trim();return""===e?_(t):s.test(e)?d(t):5===e.length&&"false"===e.toLowerCase()||4===e.length&&"true"===e.toLowerCase()?(function(t){var e=t.trim();return 5!==e.length||"false"!==e.toLowerCase()})(t):"{"===e[0]&&"}"===e[e.length-1]||"["===e[0]&&"]"===e[e.length-1]?(function(t){try{return JSON.parse(t)}catch(e){return t}})(t):_(t)}},function(t,e,r){var n=r(61);t.exports=function(t,e,r){return null==t?t:n(t,e,r)}},function(t,e,r){var n=r(62),i=r(74),o=r(103),s=r(19),a=r(104);t.exports=function(t,e,r,u){if(!s(t))return t;for(var c=-1,l=(e=i(e,t)).length,f=l-1,h=t;null!=h&&++c-1}},function(t,e,r){var n=r(9);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(16)(r(18),"Map");t.exports=n},function(t,e,r){var n=r(10);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(10);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e,r){var n=r(101);t.exports=function(t){return null==t?"":n(t)}},function(t,e,r){var n=r(17),i=r(102),o=r(20),s=r(21),a=n?n.prototype:void 0,u=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(s(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r-1&&t%1==0&&t0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then},enumerable:!0,configurable:!0}),t.prototype.processResult=function(t){var e=this;return this.converter.parseRuntime.parsedLineNumber,new i.default(function(r,n){e.needEmitLine?(function t(e,r,n,i,o){if(n>=e.length)o();else if(r.parseRuntime.subscribe&&r.parseRuntime.subscribe.onNext){var a=r.parseRuntime.subscribe.onNext,u=e[n],c=a(u,r.parseRuntime.parsedLineNumber+n);if(n++,c&&c.then)c.then(function(){!(function(e,r,n,i,o,a,u){o&&s(n,u),t(e,n,i,o,a)})(e,0,r,n,i,o,u)},o);else{for(i&&s(r,u);n1;return s&&(t=(e=c(l)).length)>1&&(a=(0,i.default)(e)),r.default.createElement(u.ScrollView,null,r.default.createElement(u.View,null,!s&&r.default.createElement(u.Text,{style:f.default.statsIntro},b.stats.emptyStats),s&&1===t&&r.default.createElement(u.Text,{style:f.default.statsIntro},b.stats.oneCycleStats(e[0])),s&&t>1&&r.default.createElement(u.View,null,r.default.createElement(u.Text,{style:f.default.statsIntro},b.stats.getBasisOfStats(t)),r.default.createElement(u.View,{style:f.default.statsRow},r.default.createElement(u.Text,{style:f.default.statsLabelLeft},b.stats.averageLabel),r.default.createElement(u.Text,{style:f.default.statsLabelRight},a.mean+' '+b.stats.daysLabel)),r.default.createElement(u.View,{style:f.default.statsRow},r.default.createElement(u.Text,{style:f.default.statsLabelLeft},b.stats.minLabel),r.default.createElement(u.Text,{style:f.default.statsLabelRight},a.minimum+' '+b.stats.daysLabel)),r.default.createElement(u.View,{style:f.default.statsRow},r.default.createElement(u.Text,{style:f.default.statsLabelLeft},b.stats.maxLabel),r.default.createElement(u.Text,{style:f.default.statsLabelRight},a.maximum+' '+b.stats.daysLabel)),r.default.createElement(u.View,{style:f.default.statsRow},r.default.createElement(u.Text,{style:f.default.statsLabelLeft},b.stats.stdLabel),r.default.createElement(u.Text,{style:f.default.statsLabelRight},a.stdDeviation+' '+b.stats.daysLabel)))))}}]),babelHelpers.inherits(t,e),t})(r.Component);function c(e){for(var t=[],a=0;a1){var r=e.map(function(e){return Math.pow(e-n.mean,2)}).reduce(l);n.stdDeviation=Math.round(100*Math.sqrt(r/(e.length-1)))/100}else n.stdDeviation=null;return n};var u=babelHelpers.interopRequireDefault(n(r[0]));function l(e,n){return e+n}function o(e){u.default.ok(Array.isArray(e),'Input should be an array.'),u.default.ok(e.length>0,'Input array should not be empty.'),e.forEach(function(e){u.default.equal(typeof e,'number','Elements in the array should be of type number.'),u.default.ok(!isNaN(e),'Elements of array should not be NaN.')})}},632,[600]); require(97); require(0); \ No newline at end of file diff --git a/components/cycle-day/cycle-day-overview.js b/components/cycle-day/cycle-day-overview.js index 163423d..52fc4bf 100644 --- a/components/cycle-day/cycle-day-overview.js +++ b/components/cycle-day/cycle-day-overview.js @@ -98,6 +98,7 @@ export default class CycleDayOverView extends Component { this.navigate('PainEditView')} + data={getLabel('pain', cycleDay.pain)} /> {/* this is just to make the last row adhere to the grid (and) because there are no pseudo properties in RN */} @@ -178,7 +179,7 @@ function getLabel(symptomName, symptom) { if(pain[key] && key !== 'note') { painLabel.push(painLabels[key]) } - if(key === 'note'){ + if(key === "note" && pain.note) { painLabel.push(pain.note) } }) diff --git a/components/cycle-day/symptoms/note.js b/components/cycle-day/symptoms/note.js index 6bf0cb6..40ce6b5 100644 --- a/components/cycle-day/symptoms/note.js +++ b/components/cycle-day/symptoms/note.js @@ -9,7 +9,7 @@ import styles from '../../../styles' import { saveSymptom } from '../../../db' import ActionButtonFooter from './action-button-footer' -export default class Temp extends Component { +export default class Note extends Component { constructor(props) { super(props) this.cycleDay = props.cycleDay diff --git a/components/cycle-day/symptoms/pain.js b/components/cycle-day/symptoms/pain.js index fc21c01..5a7c0bd 100644 --- a/components/cycle-day/symptoms/pain.js +++ b/components/cycle-day/symptoms/pain.js @@ -1,10 +1,10 @@ import React, { Component } from 'react' import { CheckBox, + ScrollView, Text, TextInput, - View, - ScrollView + View } from 'react-native' import styles from '../../../styles' import { saveSymptom } from '../../../db' @@ -27,13 +27,11 @@ export default class Pain extends Component { } render() { - return ( - PAIN {painLabels.cramps}