@@ -67,7 +67,7 @@ if(void 0!==t)throw new TypeError("Derived constructors may only return object o
return R ( e ) } function R ( e ) { if ( void 0 === e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
return e } function S ( e ) { return ( S = Object . setPrototypeOf ? Object . getPrototypeOf : function ( e ) { return e . _ _proto _ _ || Object . getPrototypeOf ( e ) } ) ( e ) } function M ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , { value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } function z ( e , t , n , r , o ) { var i = { }
return Object . keys ( r ) . forEach ( ( function ( e ) { i [ e ] = r [ e ] } ) ) , i . enumerable = ! ! i . enumerable , i . configurable = ! ! i . configurable , ( "value" in i || i . initializer ) && ( i . writable = ! 0 ) , i = n . slice ( ) . reverse ( ) . reduce ( ( function ( n , r ) { return r ( e , t , n ) || n } ) , i ) , o && void 0 !== i . initializer && ( i . value = i . initializer ? i . initializer . call ( o ) : void 0 , i . initializer = void 0 ) , void 0 === i . initializer && ( Object . defineProperty ( e , t , i ) , i = null ) , i } Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var B = ( o = Ember . _tracked , i = Ember . _tracked , u = Ember . _tracked , a = Ember . _tracked , s = Ember . _tracked , c = Ember . _tracked , l = Ember . _tracked , d = Ember . _action , f = Ember . _action , b = function ( e ) { ( function ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function" )
var A = ( o = Ember . _tracked , i = Ember . _tracked , u = Ember . _tracked , a = Ember . _tracked , s = Ember . _tracked , c = Ember . _tracked , l = Ember . _tracked , d = Ember . _action , f = Ember . _action , b = function ( e ) { ( function ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function" )
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , writable : ! 0 , configurable : ! 0 } } ) , Object . defineProperty ( e , "prototype" , { writable : ! 1 } ) , t && P ( e , t ) } ) ( a , e )
var t , o , i , u = E ( a )
function a ( ) { var e
@@ -77,40 +77,58 @@ return O(R(e=u.call.apply(u,[this].concat(r))),"amount",p,R(e)),O(R(e),"currency
t . forEach ( ( function ( e ) { return e . classList . remove ( "invalid" ) } ) )
var n = ! 0
return this . isValidAmount || ( document . querySelector ( "input[name=expense-amount]" ) . classList . add ( "invalid" ) , n = ! 1 ) , e . checkValidity ( ) || t . forEach ( ( function ( e ) { e . validity . valid || ( e . classList . add ( "invalid" ) , n = ! 1 ) } ) ) , n } } , { key : "updateCurrency" , value : function ( e ) { this . currency = e . target . value } } , { key : "submit" , value : function ( e ) { e . preventDefault ( )
var t = k ( ( this . date instanceof Array ? this . date [ 0 ] : this . date ) . toISOString ( ) . split ( "T" ) , 1 ) [ 0 ]
var t = this . date instanceof Array ? this . date [ 0 ] : this . date , r = k ( ( 0 , n . default ) ( t ) . utcOffset ( 0 , ! 0 ) . toISOString ( ) . split ( "T" ) , 1 ) [ 0 ]
if ( ! this . validateForm ( ) ) return ! 1
var n = { amount : parseFloat ( this . amount ) , currency : this . currency , date : t , title : this . title , description : Ember . isPresent ( this . description ) ? this . description : void 0 , url : Ember . isPresent ( this . url ) ? this . url : void 0 }
Ember . isPresent ( this . tags ) && ( n . tags = this . tags . split ( "," ) . map ( ( function ( e ) { return e . trim ( ) } ) ) ) , this . args . addExpenseItem ( n ) } } ] ) && j ( t . prototype , o ) , i && j ( t , i ) , Object . defineProperty ( t , "prototype" , { writable : ! 1 } ) , a } ( t . default ) , p = z ( b . prototype , "amount" , [ o ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "0" } } ) , m = z ( b . prototype , "currency" , [ i ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "EUR" } } ) , h = z ( b . prototype , "date" , [ u ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return ( 0 , n . default ) ( ) . startOf ( "hour" ) . toDate ( ) } } ) , y = z ( b . prototype , "title" , [ a ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , v = z ( b . prototype , "description" , [ s ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , g = z ( b . prototype , "url" , [ c ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , w = z ( b . prototype , "tags" , [ l ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , z ( b . prototype , "updateCurrency" , [ d ] , Object . getOwnPropertyDescriptor ( b . prototype , "updateCurrency" ) , b . prototype ) , z ( b . prototype , "submit" , [ f ] , Object . getOwnPropertyDescriptor ( b . prototype , "submit" ) , b . prototype ) , b )
e . default = B } ) ) , define ( "kredits-web/components/add-expense-item/template" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var o = { amount : parseFloat ( this . amount ) , currency : this . currency , date : r , title : this . title , description : Ember . isPresent ( this . description ) ? this . description : void 0 , url : Ember . isPresent ( this . url ) ? this . url : void 0 }
Ember . isPresent ( this . tags ) && ( o . tags = this . tags . split ( "," ) . map ( ( function ( e ) { return e . trim ( ) } ) ) . filter ( ( function ( e ) { return e . length > 0 } ) ) ) , this . args . addExpenseItem ( o ) } } ] ) && j ( t . prototype , o ) , i && j ( t , i ) , Object . defineProperty ( t , "prototype" , { writable : ! 1 } ) , a } ( t . default ) , p = z ( b . prototype , "amount" , [ o ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "0" } } ) , m = z ( b . prototype , "currency" , [ i ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "EUR" } } ) , h = z ( b . prototype , "date" , [ u ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return ( 0 , n . default ) ( ) . startOf ( "hour" ) . toDate ( ) } } ) , y = z ( b . prototype , "title" , [ a ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , v = z ( b . prototype , "description" , [ s ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , g = z ( b . prototype , "url" , [ c ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , w = z ( b . prototype , "tags" , [ l ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , z ( b . prototype , "updateCurrency" , [ d ] , Object . getOwnPropertyDescriptor ( b . prototype , "updateCurrency" ) , b . prototype ) , z ( b . prototype , "submit" , [ f ] , Object . getOwnPropertyDescriptor ( b . prototype , "submit" ) , b . prototype ) , b )
e . default = A } ) ) , define ( "kredits-web/components/add-expense-item/template" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var t = Ember . HTMLBars . template ( { id : "xrdEJbVd" , block : '{"symbols":["currency"],"statements":[[11,"form"],[24,1,"add-expense-item"],[24,"novalidate",""],[4,[38,1],["submit",[32,0,["submit"]]],null],[12],[2,"\\n "],[10,"fieldset"],[14,0,"horizontal"],[12],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Amount:"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@name","@type","@placeholder","@value","@required","@pattern","@class"],["expense-amount","text","10",[32,0,["amount"]],true,"([0-9]*[.])?[0-9]+",[32,0,["amountInputClass"]]]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Currency:"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[11,"select"],[24,"required",""],[24,3,"expense-currency"],[4,[38,1],["change",[32,0,["updateCurrency"]]],null],[12],[2,"\\n "],[10,"option"],[14,2,""],[14,"selected",""],[14,"disabled",""],[14,"hidden",""],[12],[13],[2,"\\n"],[6,[37,3],[[30,[36,2],[[30,[36,2],[[32,0,["currencies"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"option"],[15,2,[32,1,["code"]]],[15,"selected",[30,[36,0],[[32,0,["currency"]],[32,1,["code"]]],null]],[12],[1,[32,1,["code"]]],[13],[2,"\\n"]],"parameters":[1]}]]],[2," "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Date:"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"ember-flatpickr",[],[["@date","@defaultDate","@maxDate","@enableTime","@onChange"],[[32,0,["date"]],[32,0,["defaultDate"]],[32,0,["defaultDate"]],false,[30,[36,5],[[30,[36,4],[[32,0,["date"]]],null]],null]]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Title:"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@name","@type","@value","@required"],["expense-title","text",[32,0,["title"]],true]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Description (optional):"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@name","@type","@value"],["expense-description","text",[32,0,["description"]]]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"URL (optional):"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@name","@type","@value"],["expense-url","url",[32,0,["url"]]]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Tags (comma-separated, optional):"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@name","@type","@value"],["expense-tags","text",[32,0,["tags"]]]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n\\n "],[10,"p"],[14,0,"actions"],[12],[2,"\\n "],[8,"input",[],[["@type","@value","@class","@title"],["submit","Add","green","Add item to reimbursement"]],null],[2,"\\n "],[13],[2,"\\n"],[13]],"hasEval":false,"upvars":["eq","on","-track-array","each","mut","fn"]}' , meta : { moduleName : "kredits-web/components/add-expense-item/template.hbs" } } )
e . default = t } ) ) , define ( "kredits-web/components/add-reimbursement/component" , [ "exports" , "@glimmer/component" , "kredits-web/utils/is-valid-amount" , "kredits-web/config/environment" ] , ( function ( e , t , n , r ) { var o , i , u , a , s , c , l , d , f , b , p , m , h , y , v , g , w , k , x , O , _ , j , P , E
function C ( e , t , n , r ) { n && Object . defineProperty ( e , t , { enumerable : n . enumerable , configurable : n . configurable , writable : n . writable , value : n . initializer ? n . initializer . call ( r ) : void 0 } ) } function R ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function S ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } function M ( e , t ) { return ( M = Object . setPrototypeOf || function ( e , t ) { return e . _ _proto _ _ = t , e } ) ( e , t ) } function z ( e ) { var t = function ( ) { if ( "undefined" == typeof Reflect || ! Reflect . construct ) return ! 1
e . default = t } ) ) , define ( "kredits-web/components/add-reimbursement/component" , [ "exports" , "@glimmer/component" , "kredits-web/utils/is-valid-amount" , "kredits-web/utils/read-file-content" , "kredits-web/ config/environment"] , ( function ( e , t , n , r , o ) { var i , u , a , s , c , l , d , f , b , p , m , h , y , v , g , w , k , x , O , _ , j , P , E , C , R
function S ( e , t ) { var n = "undefined" != typeof Symbol && e [ Symbol . iterator ] || e [ "@@iterator" ]
if ( ! n ) { if ( Array . isArray ( e ) || ( n = function ( e , t ) { if ( ! e ) return
if ( "string" == typeof e ) return M ( e , t )
var n = Object . prototype . toString . call ( e ) . slice ( 8 , - 1 )
"Object" === n && e . constructor && ( n = e . constructor . name )
if ( "Map" === n || "Set" === n ) return Array . from ( e )
if ( "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( n ) ) return M ( e , t ) } ( e ) ) || t && e && "number" == typeof e . length ) { n && ( e = n )
var r = 0 , o = function ( ) { }
return { s : o , n : function ( ) { return r >= e . length ? { done : ! 0 } : { done : ! 1 , value : e [ r ++ ] } } , e : function ( e ) { throw e } , f : o } } throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) } var i , u = ! 0 , a = ! 1
return { s : function ( ) { n = n . call ( e ) } , n : function ( ) { var e = n . next ( )
return u = e . done , e } , e : function ( e ) { a = ! 0 , i = e } , f : function ( ) { try { u || null == n . return || n . return ( ) } finally { if ( a ) throw i } } } } function M ( e , t ) { ( null == t || t > e . length ) && ( t = e . length )
for ( var n = 0 , r = new Array ( t ) ; n < t ; n ++ ) r [ n ] = e [ n ]
return r } function z ( e , t , n , r , o , i , u ) { try { var a = e [ i ] ( u ) , s = a . value } catch ( c ) { return void n ( c ) } a . done ? t ( s ) : Promise . resolve ( s ) . then ( r , o ) } function A ( e , t , n , r ) { n && Object . defineProperty ( e , t , { enumerable : n . enumerable , configurable : n . configurable , writable : n . writable , value : n . initializer ? n . initializer . call ( r ) : void 0 } ) } function B ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function T ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } function I ( e , t ) { return ( I = Object . setPrototypeOf || function ( e , t ) { return e . _ _proto _ _ = t , e } ) ( e , t ) } function U ( e ) { var t = function ( ) { if ( "undefined" == typeof Reflect || ! Reflect . construct ) return ! 1
if ( Reflect . construct . sham ) return ! 1
if ( "function" == typeof Proxy ) return ! 0
try { return Boolean . prototype . valueOf . call ( Reflect . construct ( Boolean , [ ] , ( function ( ) { } ) ) ) , ! 0 } catch ( e ) { return ! 1 } } ( )
return function ( ) { var n , r = T ( e )
if ( t ) { var o = T ( this ) . constructor
return function ( ) { var n , r = N ( e )
if ( t ) { var o = N ( this ) . constructor
n = Reflect . construct ( r , arguments , o ) } else n = r . apply ( this , arguments )
return B ( this , n ) } } function B ( e , t ) { if ( t && ( "object" === _typeof ( t ) || "function" == typeof t ) ) return t
return D ( this , n ) } } function D ( e , t ) { if ( t && ( "object" === _typeof ( t ) || "function" == typeof t ) ) return t
if ( void 0 !== t ) throw new TypeError ( "Derived constructors may only return object or undefined" )
return A ( e ) } function A ( e ) { if ( void 0 === e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
return e } function T ( e ) { return ( T = Object . setPrototypeOf ? Object . getPrototypeOf : function ( e ) { return e . _ _proto _ _ || Object . getPrototypeOf ( e ) } ) ( e ) } function I ( e , t , n , r , o ) { var i = { }
return F ( e ) } function F ( e ) { if ( void 0 === e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
return e } function N ( e ) { return ( N = Object . setPrototypeOf ? Object . getPrototypeOf : function ( e ) { return e . _ _proto _ _ || Object . getPrototypeOf ( e ) } ) ( e ) } function L ( e , t , n , r , o ) { var i = { }
return Object . keys ( r ) . forEach ( ( function ( e ) { i [ e ] = r [ e ] } ) ) , i . enumerable = ! ! i . enumerable , i . configurable = ! ! i . configurable , ( "value" in i || i . initializer ) && ( i . writable = ! 0 ) , i = n . slice ( ) . reverse ( ) . reduce ( ( function ( n , r ) { return r ( e , t , n ) || n } ) , i ) , o && void 0 !== i . initializer && ( i . value = i . initializer ? i . initializer . call ( o ) : void 0 , i . initializer = void 0 ) , void 0 === i . initializer && ( Object . defineProperty ( e , t , i ) , i = null ) , i } Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var U = ( o = Ember . inject . service , i = Ember . inject . service , u = Ember . inject . service , a = Ember . computed . alias ( "kredits.contributorsSorted" ) , s = Ember . _tracked , c = Ember . _tracked , l = Ember . _tracked , d = Ember . _tracked , f = Ember . _tracked , b = Ember . _action , p = Ember . _action , m = Ember . _action , h = Ember . _action , y = Ember . _action , v = function ( e ) { ( function ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function" )
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , writable : ! 0 , configurable : ! 0 } } ) , Object . defineProperty ( e , "prototype" , { writable : ! 1 } ) , t && M ( e , t ) } ) ( a , e )
var t , o , i , u = z ( a )
function a ( ) { var e
return R ( this , a ) , C ( A ( e = u . apply ( this , arguments ) ) , "router" , g , A ( e ) ) , C ( A ( e ) , "kredits" , w , A ( e ) ) , C ( A ( e ) , "exchangeRates" , k , A ( e ) ) , C ( A ( e ) , "contributors" , x , A ( e ) ) , C ( A ( e ) , "recipientId" , O , A ( e ) ) , C ( A ( e ) , "title" , _ , A ( e ) ) , C ( A ( e ) , "total" , j , A ( e ) ) , C ( A ( e ) , "expenses" , P , A ( e ) ) , C ( A ( e ) , "expenseFormVisible" , E , A ( e ) ) , e . exchangeRates . fetchRates ( ) , e } return t = a , ( o = [ { key : "isValidTotal" , get : function ( ) { return ( 0 , n . default ) ( this . total ) } } , { key : "totalInputClass" , get : function ( ) { return this . isValidTotal ? "valid" : "" } } , { key : "totalEUR" , get : function ( ) { var e = this . expenses . filterBy ( "currency" , "EUR" )
var H = ( i = Ember . inject . service , u = Ember . inject . service , a = Ember . inject . service , s = Ember . computed . alias ( "kredits.contributorsSorted" ) , c = Ember . _tracked , l = Ember . _tracked , d = Ember . _tracked , f = Ember . _tracked , b = Ember . _tracked , p = Ember . _action , m = Ember . _action , h = Ember . _action , y = Ember . _action , v = Ember . _action , g = Ember . _action , w = function ( e ) { ( function ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function" )
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , writable : ! 0 , configurable : ! 0 } } ) , Object . defineProperty ( e , "prototype" , { writable : ! 1 } ) , t && I ( e , t ) } ) ( l , e )
var t , i , u , a , s , c = U ( l )
function l ( ) { var e
return B ( this , l ) , A ( F ( e = c . apply ( this , arguments ) ) , "router" , k , F ( e ) ) , A ( F ( e ) , "kredits" , x , F ( e ) ) , A ( F ( e ) , "exchangeRates" , O , F ( e ) ) , A ( F ( e ) , "contributors" , _ , F ( e ) ) , A ( F ( e ) , "recipientId" , j , F ( e ) ) , A ( F ( e ) , "title" , P , F ( e ) ) , A ( F ( e ) , "total" , E , F ( e ) ) , A ( F ( e ) , "expenses" , C , F ( e ) ) , A ( F ( e ) , "expenseFormVisible" , R , F ( e ) ) , e . exchangeRates . fetchRates ( ) , e } return t = l , ( i = [ { key : "isValidTotal" , get : function ( ) { return ( 0 , n . default ) ( this . total ) } } , { key : "totalInputClass" , get : function ( ) { return this . isValidTotal ? "valid" : "" } } , { key : "totalEUR" , get : function ( ) { var e = this . expenses . filterBy ( "currency" , "EUR" )
return e . length > 0 ? e . mapBy ( "amount" ) . reduce ( ( function ( e , t ) { return e + t } ) ) : 0 } } , { key : "totalUSD" , get : function ( ) { var e = this . expenses . filterBy ( "currency" , "USD" )
return e . length > 0 ? e . mapBy ( "amount" ) . reduce ( ( function ( e , t ) { return e + t } ) ) : 0 } } , { key : "submitButtonEnabled" , get : function ( ) { return this . isValidTotal && this . expenses . length > 0 } } , { key : "submitButtonDisabled" , get : function ( ) { return ! this . submitButtonEnabled } } , { key : "scrollToExpenseItemForm" , value : function ( ) { document . getElementById ( "new-expense-item" ) . scrollIntoView ( ) } } , { key : "updateTotalAmountFromFiat" , value : function ( ) { var e = parseFloat ( this . total )
this . exchangeRates . btceur > 0 && this . totalEUR > 0 && ( e += this . totalEUR / this . exchangeRates . btceur ) , this . exchangeRates . btcusd > 0 && this . totalUSD > 0 && ( e += this . totalUSD / this . exchangeRates . btcusd ) , 0 === this . totalUSD && 0 === this . totalEUR && ( e = 0 ) , this . total = e . toFixed ( 8 ) } } , { key : "updateContributor" , value : function ( e ) { this . recipientId = e . target . value } } , { key : "showExpenseForm ", value : function ( ) { this . expenseFormVisible = ! 0 , Ember . run . scheduleOnce ( "afterRender" , this , this . scrollToExpenseItemForm ) } } , { key : "addExpenseItem" , value : function ( e ) { this . expenses . pushObject ( e ) , this . updateTotalAmountFromFiat ( ) , this . expenseFormVisible = ! 1 } } , { key : "removeExpenseItem" , value : function ( e ) { this . expenses . removeObject ( e ) , this . updateTotalAmountFromFiat ( ) , 0 === this . expenses . length && ( this . expenseFormVisible = ! 0 ) } } , { key : "submit" , value : function ( e ) { var t = this
this . exchangeRates . btceur > 0 && this . totalEUR > 0 && ( e += this . totalEUR / this . exchangeRates . btceur ) , this . exchangeRates . btcusd > 0 && this . totalUSD > 0 && ( e += this . totalUSD / this . exchangeRates . btcusd ) , 0 === this . totalUSD && 0 === this . totalEUR && ( e = 0 ) , this . total = e . toFixed ( 8 ) } } , { key : "addExpensesFromFile " , value : ( a = regeneratorRuntime . mark ( ( function e ( t ) { var n , o , i , u , a
return regeneratorRuntime . wrap ( ( function ( e ) { for ( ; ; ) switch ( e . prev = e . next ) { case 0 : return e . next = 2 , ( 0 , r . default ) ( t . target . files [ 0 ] )
case 2 : if ( n = e . sent , ( o = JSON . parse ( n ) ) instanceof Array ) { i = S ( o )
try { for ( i . s ( ) ; ! ( u = i . n ( ) ) . done ; ) a = u . value , this . addExpenseItem ( a ) } catch ( s ) { i . e ( s ) } finally { i . f ( ) } } else console . warn ( "Expenses in file must be a list of items:" ) , console . debug ( n )
case 5 : case "end" : return e . stop ( ) } } ) , e , this ) } ) ) , s = function ( ) { var e = this , t = arguments
return new Promise ( ( function ( n , r ) { var o = a . apply ( e , t )
function i ( e ) { z ( o , n , r , i , u , "next" , e ) } function u ( e ) { z ( o , n , r , i , u , "throw" , e ) } i ( void 0 ) } ) ) } , function ( e ) { return s . apply ( this , arguments ) } ) } , { key : "updateContributor" , value : function ( e ) { this . recipientId = e . target . value } } , { key : "showExpenseForm" , value : function ( ) { this . expenseFormVisible = ! 0 , Ember . run . scheduleOnce ( "afterRender" , this , this . scrollToExpenseItemForm ) } } , { key : "addExpenseItem" , value : function ( e ) { this . expenses . pushObject ( e ) , this . updateTotalAmountFromFiat ( ) , this . expenseFormVisible = ! 1 } } , { key : "removeExpenseItem" , value : function ( e ) { this . expenses . removeObject ( e ) , this . updateTotalAmountFromFiat ( ) , 0 === this . expenses . length && ( this . expenseFormVisible = ! 0 ) } } , { key : "submit" , value : function ( e ) { var t = this
if ( e . preventDefault ( ) , ! this . kredits . currentUser ) return window . alert ( "You need to connect your RSK account first." ) , ! 1
if ( ! this . kredits . currentUserIsCore ) return window . alert ( "Only core contributors can submit reimbursements." ) , ! 1
var n = this . contributors . findBy ( "id" , parseInt ( this . recipientId ) ) , o = { amount : parseInt ( 1e8 * parseFloat ( this . total ) ) , token : r . default . tokens . BTC , recipientId : parseInt ( this . recipientId ) , title : "Expenses covered by " . concat ( n . name ) , description : this . description , url : this . url , expenses : JSON . parse ( JSON . stringify ( this . expenses ) ) }
this . inProgress = ! 0 , this . kredits . addReimbursement ( o ) . then ( ( function ( ) { t . router . transitionTo ( "budget" ) } ) ) . catch ( ( function ( e ) { console . error ( "Could not add reimbursement:" , e ) , window . alert ( "Something went wrong. Please check the browser console." ) } ) ) . finally ( ( function ( ) { t . inProgress = ! 1 } ) ) } } ] ) && S ( t . prototype , o ) , i && S ( t , i ) , Object . defineProperty ( t , "prototype" , { writable : ! 1 } ) , a } ( t . default ) , g = I ( v . prototype , "router" , [ o ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , w = I ( v . prototype , "kredits" , [ i ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , k = I ( v . prototype , "exchangeRates" , [ u ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , x = I ( v . prototype , "contributors" , [ a ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , O = I ( v . prototype , "recipientId" , [ s ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return null } } ) , _ = I ( v . prototype , "title" , [ c ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , j = I ( v . prototype , "total" , [ l ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "0" } } ) , P = I ( v . prototype , "expenses" , [ d ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return Ember . A ( [ ] ) } } ) , E = I ( v . prototype , "expenseFormVisible" , [ f ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return ! 0 } } ) , I ( v . prototype , "updateContributor" , [ b ] , Object . getOwnPropertyDescriptor ( v . prototype , "updateContributor" ) , v . prototype ) , I ( v . prototype , "showExpenseForm" , [ p ] , Object . getOwnPropertyDescriptor ( v . prototype , "showExpenseForm" ) , v . prototype ) , I ( v . prototype , "addExpenseItem" , [ m ] , Object . getOwnPropertyDescriptor ( v . prototype , "addExpenseItem" ) , v . prototype ) , I ( v . prototype , "removeExpenseItem" , [ h ] , Object . getOwnPropertyDescriptor ( v . prototype , "removeExpenseItem" ) , v . prototype ) , I ( v . prototype , "submit" , [ y ] , Object . getOwnPropertyDescriptor ( v . prototype , "submit" ) , v . prototype ) , v )
e . default = U } ) ) , define ( "kredits-web/components/add-reimbursement/template" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var t = Ember . HTMLBars . template ( { id : "aBifjeXZ " , block : '{"symbols":["expense","contributor"],"statements":[[11,"form"],[24,"novalidate",""],[4,[38,2],["submit",[32,0,["submit"]]],null],[12],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Contributor:"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[11,"select"],[24,"required",""],[4,[38,2],["change",[32,0,["updateContributor"]]],null],[12],[2,"\\n "],[10,"option"],[14,2,""],[14,"selected",""],[14,"disabled",""],[14,"hidden",""],[12],[13],[2,"\\n"],[6,[37,4],[[30,[36,3],[[30,[36,3],[[32,0,["contributors"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"option"],[15,2,[32,2,["id"]]],[15,"selected",[30,[36,5],[[32,0,["contributorId"]],[32,2,["id"]]],null]],[12],[1,[32,2,["name"]]],[13],[2,"\\n"]],"parameters":[2]}]]],[2," "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"fieldset"],[14,0,"horizontal thirds total-amounts"],[12],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Total amount (BTC):"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@type","@placeholder","@value","@required","@pattern","@class"],["text","0.0015",[32,0,["total"]],true,"([0-9]*[.])?[0-9]+",[32,0,["totalInputClass"]]]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"EUR total"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@type","@name","@value","@disabled"],["text","total-eur",[32,0,["totalEUR"]],true]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"USD total"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@type","@name","@value","@disabled"],["text","total-usd",[32,0,["totalUSD"]],true]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n\\n "],[10,"h3"],[12],[2,"Expense items"],[13],[2,"\\n"],[6,[37,6],[[32,0,["expenses"]]],null,[["default","else"],[{"statements":[[2," "],[10,"ul"],[14,0,"expense-list"],[12],[2,"\\n"],[6,[37,4],[[30,[36,3],[[30,[36,3],[[32,0,["expenses"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"li"],[12],[2,"\\n "],[10,"div"],[14,0,"description"],[14,"rowspan","2"],[12],[2,"\\n "],[10,"h4"],[12],[2,"\\n "],[10,"span"],[14,0,"date"],[12],[1,[32,1,["date"]]],[2,":"],[13],[2,"\\n "],[10,"span"],[14,0,"title"],[12],[1,[32,1,["title"]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"p"],[14,0,"description"],[12],[1,[32,1,["description"]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"amount"],[12],[2,"\\n "],[1,[30,[36,1],[[32,1,["amount"]],[32,1,["currency"]]],null]],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"actions"],[12],[2,"\\n "],[11,"button"],[24,0,"danger small"],[24,4,"button"],[4,[38,2],["click",[30,[36,0],[[32,0,["removeExpenseItem"]],[32,1]],null]],null],[12],[2,"delete"],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[1]}]]],[2," "],[13],[2,"\\n "],[10,"p"],[14,0,"actions"],[12],[2,"\\n "],[11,"button"],[24,0,"green small"],[24,4,"button"],[4,[38,2],["click",[32,0,["showExpenseForm"]]],null],[12],[2,"+ Add another item"],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[]},{"statements":[[2," "],[10,"p"],[12],[2,"No line items yet."],[13],[2,"\\n"]],"parameters":[]}]]],[2,"\\n "],[10,"p"],[14,0,"actions"],[12],[2,"\\n"],[6,[37,6],[[32,0,["inProgress"]]],null,[["default","else"],[{"statements":[[2," "],[8,"input",[],[["@type","@value","@disabled","@title"],["submit","Submitting...",true,"Submit/propose this reimbursement"]],null],[2,"\\n"]],"parameters":[]},{"statements":[[2," "],[8,"input",[],[["@type","@value","@disabled","@title"],["submit","Submit",[32,0,["submitButtonDisabled"]],"Submit/propose this reimbursement"]],null],[2,"\\n"]],"parameters":[]}]]],[2," "],[13],[2,"\\n\\n"],[6,[37,6],[[32,0,["expenseFormVisible"]]],null,[["default"],[{"statements":[[2," "],[10,"h3"],[14,1,"new-expense-item"],[12],[2,"New expense item"],[13],[2,"\\n "],[8,"add-expense-item",[],[["@addExpenseItem"],[[30,[36,0],[[32,0,["addExpenseItem"]]],null]]],null],[2,"\\n"]],"parameters":[]}]]],[13],[2,"\\n"]],"hasEval":false,"upvars":["fn","fmt-fiat-currency","on","-track-array","each","eq","if"]}' , meta : { moduleName : "kredits-web/components/add-reimbursement/template.hbs" } } )
var n = this . contributors . findBy ( "id" , parseInt ( this . recipientId ) ) , r = { amount : parseInt ( 1e8 * parseFloat ( this . total ) ) , token : o . default . tokens . BTC , recipientId : parseInt ( this . recipientId ) , title : "Expenses covered by " . concat ( n . name ) , description : this . description , url : this . url , expenses : JSON . parse ( JSON . stringify ( this . expenses ) ) }
this . inProgress = ! 0 , this . kredits . addReimbursement ( r ) . then ( ( function ( ) { t . router . transitionTo ( "budget" ) } ) ) . catch ( ( function ( e ) { console . error ( "Could not add reimbursement:" , e ) , window . alert ( "Something went wrong. Please check the browser console." ) } ) ) . finally ( ( function ( ) { t . inProgress = ! 1 } ) ) } } ] ) && T ( t . prototype , i ) , u && T ( t , u ) , Object . defineProperty ( t , "prototype" , { writable : ! 1 } ) , l } ( t . default ) , k = L ( w . prototype , "router" , [ i ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , x = L ( w . prototype , "kredits" , [ u ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , O = L ( w . prototype , "exchangeRates" , [ a ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , _ = L ( w . prototype , "contributors" , [ s ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , j = L ( w . prototype , "recipientId" , [ c ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return null } } ) , P = L ( w . prototype , "title" , [ l ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "" } } ) , E = L ( w . prototype , "total" , [ d ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return "0" } } ) , C = L ( w . prototype , "expenses" , [ f ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return Ember . A ( [ ] ) } } ) , R = L ( w . prototype , "expenseFormVisible" , [ b ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : function ( ) { return ! 0 } } ) , L ( w . prototype , "addExpensesFromFile" , [ p ] , Object . getOwnPropertyDescriptor ( w . prototype , "addExpensesFromFile" ) , w . prototype ) , L ( w . prototype , "updateContributor" , [ m ] , Object . getOwnPropertyDescriptor ( w . prototype , "updateContributor" ) , w . prototype ) , L ( w . prototype , "showExpenseForm" , [ h ] , Object . getOwnPropertyDescriptor ( w . prototype , "showExpenseForm" ) , w . prototype ) , L ( w . prototype , "addExpenseItem" , [ y ] , Object . getOwnPropertyDescriptor ( w . prototype , "addExpenseItem" ) , w . prototype ) , L ( w . prototype , "removeExpenseItem" , [ v ] , Object . getOwnPropertyDescriptor ( w . prototype , "removeExpenseItem" ) , w . prototype ) , L ( w . prototype , "submit" , [ g ] , Object . getOwnPropertyDescriptor ( w . prototype , "submit" ) , w . prototype ) , w )
e . default = H } ) ) , define ( "kredits-web/components/add-reimbursement/template" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var t = Ember . HTMLBars . template ( { id : "/KpWtL2A " , block : '{"symbols":["expense","contributor"],"statements":[[11,"form"],[24,"novalidate",""],[4,[38,2],["submit",[32,0,["submit"]]],null],[12],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Contributor:"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[11,"select"],[24,"required",""],[4,[38,2],["change",[32,0,["updateContributor"]]],null],[12],[2,"\\n "],[10,"option"],[14,2,""],[14,"selected",""],[14,"disabled",""],[14,"hidden",""],[12],[13],[2,"\\n"],[6,[37,4],[[30,[36,3],[[30,[36,3],[[32,0,["contributors"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"option"],[15,2,[32,2,["id"]]],[15,"selected",[30,[36,5],[[32,0,["contributorId"]],[32,2,["id"]]],null]],[12],[1,[32,2,["name"]]],[13],[2,"\\n"]],"parameters":[2]}]]],[2," "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"fieldset"],[14,0,"horizontal thirds total-amounts"],[12],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"Total amount (BTC):"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@type","@placeholder","@value","@required","@pattern","@class"],["text","0.0015",[32,0,["total"]],true,"([0-9]*[.])?[0-9]+",[32,0,["totalInputClass"]]]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"EUR total"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@type","@name","@value","@disabled"],["text","total-eur",[32,0,["totalEUR"]],true]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[10,"label"],[12],[2,"\\n "],[10,"p"],[14,0,"label"],[12],[2,"USD total"],[13],[2,"\\n "],[10,"p"],[12],[2,"\\n "],[8,"input",[],[["@type","@name","@value","@disabled"],["text","total-usd",[32,0,["totalUSD"]],true]],null],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n\\n "],[10,"h3"],[12],[2,"Expense items"],[13],[2,"\\n"],[6,[37,6],[[32,0,["expenses"]]],null,[["default","else"],[{"statements":[[2," "],[10,"ul"],[14,0,"expense-list"],[12],[2,"\\n"],[6,[37,4],[[30,[36,3],[[30,[36,3],[[32,0,["expenses"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"li"],[12],[2,"\\n "],[10,"div"],[14,0,"description"],[14,"rowspan","2"],[12],[2,"\\n "],[10,"h4"],[12],[2,"\\n "],[10,"span"],[14,0,"date"],[12],[1,[32,1,["date"]]],[2,":"],[13],[2,"\\n "],[10,"span"],[14,0,"title"],[12],[1,[32,1,["title"]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"p"],[14,0,"description"],[12],[1,[32,1,["description"]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"amount"],[12],[2,"\\n "],[1,[30,[36,1],[[32,1,["amount"]],[32,1,["currency"]]],null]],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"actions"],[12],[2,"\\n "],[11,"button"],[24,0,"danger small"],[24,4,"button"],[4,[38,2],["click",[30,[36,0],[[32,0,["removeExpenseItem"]],[32,1]],null]],null],[12],[2,"delete"],[13],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[1]}]]],[2," "],[13],[2,"\\n "],[10,"p"],[14,0,"actions"],[12],[2,"\\n "],[11,"button"],[24,0,"green small"],[24,4,"button"],[4,[38,2],["click",[32,0,["showExpenseForm"]]],null],[12],[2,"+ Add another item"],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[]},{"statements":[[2," "],[10,"p"],[12],[2,"No line items yet."],[13],[2,"\\n"]],"parameters":[]}]]],[2,"\\n "],[10,"p"],[14,0,"actions"],[12],[2,"\\n"],[6,[37,6],[[32,0,["inProgress"]]],null,[["default","else"],[{"statements":[[2," "],[8,"input",[],[["@type","@value","@disabled","@title"],["submit","Submitting...",true,"Submit/propose this reimbursement"]],null],[2,"\\n"]],"parameters":[]},{"statements":[[2," "],[8,"input",[],[["@type","@value","@disabled","@title"],["submit","Submit",[32,0,["submitButtonDisabled"]],"Submit/propose this reimbursement"]],null],[2,"\\n"]],"parameters":[]}]]],[2," "],[13],[2,"\\n\\n"],[6,[37,6],[[32,0,["expenseFormVisible"]]],null,[["default"],[{"statements":[[2," "],[10,"h3"],[14,1,"new-expense-item"],[12],[2,"New expense item"],[13],[2,"\\n "],[8,"add-expense-item",[],[["@addExpenseItem"],[[30,[36,0],[[32,0,["addExpenseItem"]]],null]]],null],[2,"\\n"]],"parameters":[]}]]],[13],[2,"\\n"],[10,"form"],[14,1,"add-expenses-from-file"],[12],[2,"\\n "],[10,"h3"],[12],[2,"Add expense items from file"],[13],[2,"\\n "],[10,"input"],[14,"multiple","false"],[15,"onchange",[30,[36,0],[[32,0,["addExpensesFromFile"]]],null]],[14,"accept","application/json"],[14,4,"file"],[12],[13],[2,"\\n"],[13],[2,"\\n"] ],"hasEval":false,"upvars":["fn","fmt-fiat-currency","on","-track-array","each","eq","if"]}' , meta : { moduleName : "kredits-web/components/add-reimbursement/template.hbs" } } )
e . default = t } ) ) , define ( "kredits-web/components/budget-balances/component" , [ "exports" , "@glimmer/component" ] , ( function ( e , t ) { var n , r , o , i , u
function a ( e , t , n , r ) { n && Object . defineProperty ( e , t , { enumerable : n . enumerable , configurable : n . configurable , writable : n . writable , value : n . initializer ? n . initializer . call ( r ) : void 0 } ) } function s ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function c ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } function l ( e , t ) { return ( l = Object . setPrototypeOf || function ( e , t ) { return e . _ _proto _ _ = t , e } ) ( e , t ) } function d ( e ) { var t = function ( ) { if ( "undefined" == typeof Reflect || ! Reflect . construct ) return ! 1
@@ -160,28 +178,29 @@ e.default=t})),define("kredits-web/components/loading-spinner/component",["expor
var t = Ember . Component . extend ( { classNames : [ "loading-spinner" ] } )
e . default = t } ) ) , define ( "kredits-web/components/loading-spinner/template" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var t = Ember . HTMLBars . template ( { id : "RDvW8Yf/" , block : '{"symbols":[],"statements":[[10,"p"],[12],[2,"\\n "],[10,"svg"],[14,"xmlns","http://www.w3.org/2000/svg","http://www.w3.org/2000/xmlns/"],[14,"xmlns:xlink","http://www.w3.org/1999/xlink","http://www.w3.org/2000/xmlns/"],[14,"version","1.1"],[14,"x","0px"],[14,"y","0px"],[14,"viewBox","0 0 132 100"],[14,"enable-background","new 0 0 100 100"],[14,"xml:space","preserve","http://www.w3.org/XML/1998/namespace"],[12],[2,"\\n "],[10,"path"],[14,1,"path-comet"],[14,"d","M79.062,24.173L79.062,24.173l-0.021-0.011c-0.068-0.03-0.137-0.062-0.204-0.093L42.392,7.337\\n c0,0,3.065,14.104,4.458,18.019l0,0c0,0-41.754-12.481-46.85-13.67c1.67,6.52,30.607,62.492,30.607,62.492\\n c5.848,11.873,19.394,18.485,33.522,18.485c19.811,0,35.87-16.059,35.87-35.869C100,42.313,91.418,29.837,79.062,24.173z"],[12],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"],[13],[2,"\\n"],[10,"p"],[12],[2,"\\n Loading data...\\n"],[13],[2,"\\n"]],"hasEval":false,"upvars":[]}' , meta : { moduleName : "kredits-web/components/loading-spinner/template.hbs" } } )
e . default = t } ) ) , define ( "kredits-web/components/reimbursement-list/component" , [ "exports" , "@glimmer/component" ] , ( function ( e , t ) { var n , r , o
function i ( e , t , n , r ) { n && Object . defineProperty ( e , t , { enumerable : n . enumerable , configurable : n . configurable , writable : n . writable , value : n . initializer ? n . initializer . call ( r ) : void 0 } ) } function u ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } function a ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function s ( e , t ) { return ( s = Object . setPrototypeOf || function ( e , t ) { return e . _ _proto _ _ = t , e } ) ( e , t ) } function c ( e ) { var t = function ( ) { if ( "undefined" == typeof Reflect || ! Reflect . construct ) return ! 1
e . default = t } ) ) , define ( "kredits-web/components/reimbursement-list/component" , [ "exports" , "@glimmer/component" , "kredits-web/config/environment" ] , ( function ( e , t , n ) { var r , o , i , u , a , s
function c ( e , t , n , r ) { n && Object . defineProperty ( e , t , { enumerable : n . enumerable , configurable : n . configurable , writable : n . writable , value : n . initializer ? n . initializer . call ( r ) : void 0 } ) } function l ( e , t ) { if ( ! ( e instanceof t ) ) throw new TypeError ( "Cannot call a class as a function" ) } function d ( e , t ) { for ( var n = 0 ; n < t . length ; n ++ ) { var r = t [ n ]
r . enumerable = r . enumerable || ! 1 , r . configurable = ! 0 , "value" in r && ( r . writable = ! 0 ) , Object . defineProperty ( e , r . key , r ) } } function f ( e , t ) { return ( f = Object . setPrototypeOf || function ( e , t ) { return e . _ _proto _ _ = t , e } ) ( e , t ) } function b ( e ) { var t = function ( ) { if ( "undefined" == typeof Reflect || ! Reflect . construct ) return ! 1
if ( Reflect . construct . sham ) return ! 1
if ( "function" == typeof Proxy ) return ! 0
try { return Boolean . prototype . valueOf . call ( Reflect . construct ( Boolean , [ ] , ( function ( ) { } ) ) ) , ! 0 } catch ( e ) { return ! 1 } } ( )
return function ( ) { var n , r = f ( e )
if ( t ) { var o = f ( this ) . constructor
return function ( ) { var n , r = h ( e )
if ( t ) { var o = h ( this ) . constructor
n = Reflect . construct ( r , arguments , o ) } else n = r . apply ( this , arguments )
return l ( this , n ) } } function l ( e , t ) { if ( t && ( "object" === _typeof ( t ) || "function" == typeof t ) ) return t
return p ( this , n ) } } function p ( e , t ) { if ( t && ( "object" === _typeof ( t ) || "function" == typeof t ) ) return t
if ( void 0 !== t ) throw new TypeError ( "Derived constructors may only return object or undefined" )
return d ( e ) } function d ( e ) { if ( void 0 === e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
return e } function f ( e ) { return ( f = Object . setPrototypeOf ? Object . getPrototypeOf : function ( e ) { return e . _ _proto _ _ || Object . getPrototypeOf ( e ) } ) ( e ) } function b ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , { value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var p , m , h , y , v , g , w = ( n = Ember . computed . sort ( "args.items" , "itemSorting" ) , r = function ( e ) { ( function ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function" )
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , writable : ! 0 , configurable : ! 0 } } ) , Object . defineProperty ( e , "prototype ", { writable : ! 1 } ) , t && s ( e , t ) } ) ( f , e )
var t , n , r , l = c ( f )
function f ( ) { var e
a ( this , f )
return m ( e ) } function m ( e ) { if ( void 0 === e ) throw new ReferenceError ( "this hasn't been initialised - super() hasn't been called" )
return e } function h ( e ) { return ( h = Object . setPrototypeOf ? Object . getPrototypeOf : function ( e ) { return e . _ _proto _ _ || Object . getPrototypeOf ( e ) } ) ( e ) } function y ( e , t , n ) { return t in e ? Object . defineProperty ( e , t , { value : n , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : e [ t ] = n , e } function v ( e , t , n , r , o ) { var i = { }
return Object . keys ( r ) . forEach ( ( function ( e ) { i [ e ] = r [ e ] } ) ) , i . enumerable = ! ! i . enumerable , i . configurable = ! ! i . configurable , ( "value" in i || i . initializer ) && ( i . writable = ! 0 ) , i = n . slice ( ) . reverse ( ) . reduce ( ( function ( n , r ) { return r ( e , t , n ) || n } ) , i ) , o && void 0 !== i . initializer && ( i . value = i . initializer ? i . initializer . call ( o ) : void 0 , i . initializer = void 0 ) , void 0 === i . initializer && ( Object . defineProperty ( e , t , i ) , i = null ) , i } Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var g = ( r = Ember . inject . service , o = Ember . computed . sort ( "args.items" , "itemSorting ") , i = Ember . _action , u = function ( e ) { ( function ( e , t ) { if ( "function" != typeof t && null !== t ) throw new TypeError ( "Super expression must either be null or a function" )
e . prototype = Object . create ( t && t . prototype , { constructor : { value : e , writable : ! 0 , configurable : ! 0 } } ) , Object . defineProperty ( e , "prototype" , { writable : ! 1 } ) , t && f ( e , t ) } ) ( u , e )
var t , r , o , i = b ( u )
function u ( ) { var e
l ( this , u )
for ( var t = arguments . length , n = new Array ( t ) , r = 0 ; r < t ; r ++ ) n [ r ] = arguments [ r ]
return b ( d ( e = l . call . apply ( l , [ this ] . concat ( n ) ) ) , "itemSorting" , Object . freeze ( [ "pendingStatus:asc" , "id:desc" ] ) ) , i ( d ( e ) , "itemsSorted" , o , d ( e ) ) , e } return t = f , n && u ( t . prototype , n ) , r && u ( t , r ) , Object . defineProperty ( t , "prototype" , { writable : ! 1 } ) , t } ( t . default ) , p = r . prototype , m = "itemsSorted ", h = [ n ] , y = { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } , g = { } , Object . keys ( y ) . forEach ( ( function ( e ) { g [ e ] = y [ e ] } ) ) , g . enumerable = ! ! g . enumerable , g . configurable = ! ! g . configurable , ( "value" in g || g . initializer ) && ( g . writable = ! 0 ) , g = h . slice ( ) . reverse ( ) . reduce ( ( function ( e , t ) { return t ( p , m , e ) || e } ) , g ) , v && void 0 !== g . initializer && ( g . value = g . initializer ? g . initializer . call ( v ) : void 0 , g . initializer = void 0 ) , void 0 === g . initializer && ( Object . defineProperty ( p , m , g ) , g = null ) , o = g , r )
e . default = w } ) ) , define ( "kredits-web/components/reimbursement-list/template" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var t = Ember . HTMLBars . template ( { id : "OfIuWQzP " , block : '{"symbols":["reimbursement","expense","@loading"],"statements":[[10,"ul"],[15,0,[31,["item-list spaced reimbursement-list ",[30,[36,5 ],[[32,3],"loading"],null]]]],[12],[2,"\\n"],[6,[37,4 ],[[30,[36,3 ],[[30,[36,3 ],[[32,0,["itemsSorted"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"li"],[15,"data-reimbursement-id",[32,1,["id"]]],[15,0,[31,[[30,[36,1 ],[[32,1]],null]]]],[12],[2,"\\n "],[10,"p"],[14,0,"meta"],[12],[2,"\\n "],[10,"span"],[14,0,"recipient "],[12],[8 ,"user-avatar",[],[["@contributor "],[[32,1,["contributor"]]]],null ],[13],[2,"\\n "],[10,"span"],[14,0,"title "],[12],[2,"Expenses covered by "],[1, [32,1,["contributor","name"]] ],[13],[2,"\\n "],[13],[2,"\\n "],[10,"p"],[14,0,"token-amount"],[12],[2,"\\n "],[10,"span"],[14,0,"amount"],[12],[2,"\\n "],[1,[30,[36,2 ],[[32,1,["amount"]]],null]],[13],[2," "],[10,"span"],[14,0,"symbol"],[12],[2,"BTC"],[13],[2,"\\n "],[13],[2,"\\n "],[10,"ul"],[14,0,"expense-list"],[12],[2,"\\n"],[6,[37,4 ],[[30,[36,3 ],[[30,[36,3 ],[[32,1,["expenses"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"li"],[12],[2,"\\n "],[10,"div"],[14,0,"description"],[14,"rowspan","2"],[12],[2,"\\n "],[10,"h4"],[12],[2,"\\n "],[10,"span"],[14,0,"date"],[12],[1,[32,2,["date"]]],[2,":"],[13],[2,"\\n "],[10,"span"],[14,0,"title"],[12],[1,[32,2,["title"]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"p"],[14,0,"description"],[12],[1,[32,2,["description"]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"amount"],[12],[2,"\\n "],[1,[30,[36,0 ],[[32,2,["amount"]],[32,2,["currency"]]],null]],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[2]}]]],[2," "],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[1]}]]],[13]],"hasEval":false,"upvars":["fmt-fiat-currency","item-status","sats-to-btc","-track-array","each","if"]}' , meta : { moduleName : "kredits-web/components/reimbursement-list/template.hbs" } } )
return c ( m ( e = i . call . apply ( i , [ this ] . concat ( n ) ) ) , "kredits" , a , m ( e ) ) , y ( m ( e ) , " itemSorting", Object . freeze ( [ "pendingStatus:asc" , "id:desc" ] ) ) , c ( m ( e ) , "itemsSorted" , s , m ( e ) ) , e } return t = u , ( r = [ { key : "ipfsGatewayUrl" , get : function ( ) { return n . default . ipfs . gatewayUrl } } , { key : "veto" , value : function ( e ) { this . kredits . vetoReimbursement ( e ) . then ( ( function ( e ) { console . debug ( "[controllers:budget] Veto submitted to chain: " + e . hash ) } ) ) } } ] ) && d ( t . prototype , r ) , o && d ( t , o ) , Object . defineProperty ( t , "prototype" , { writable : ! 1 } ) , u } ( t . default ) , a = v ( u . prototype , "kredits ", [ r ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , s = v ( u . prototype , "itemsSorted" , [ o ] , { configurable : ! 0 , enumerable : ! 0 , writable : ! 0 , initializer : null } ) , v ( u . prototype , "veto" , [ i ] , Object . getOwnPropertyDescriptor ( u . prototype , "veto" ) , u . prototype ) , u )
e . default = g } ) ) , define ( "kredits-web/components/reimbursement-list/template" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var t = Ember . HTMLBars . template ( { id : "mzQR2aUA " , block : '{"symbols":["reimbursement","expense","@loading"],"statements":[[10,"ul"],[15,0,[31,["item-list spaced reimbursement-list ",[30,[36,7 ],[[32,3],"loading"],null]]]],[12],[2,"\\n"],[6,[37,6 ],[[30,[36,5 ],[[30,[36,5 ],[[32,0,["itemsSorted"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"li"],[15,"data-reimbursement-id",[32,1,["id"]]],[15,0,[31,[[30,[36,3 ],[[32,1]],null]]]],[12],[2,"\\n "],[10,"p"],[14,0,"meta"],[12],[2,"\\n "],[10,"span"],[14,0,"title "],[12],[2 ,"\\n Expenses covered by "],[1, [32,1,["contributor","name"]]],[2,"\\n " ],[13],[2,"\\n "],[10,"span"],[14,0,"recipient "],[12],[2,"\\n "],[8,"user-avatar",[],[["@contributor "],[[32,1,["contributor"]]]],null],[2,"\\n " ],[13],[2,"\\n "],[13],[2,"\\n "],[10,"p"],[14,0,"token-amount"],[12],[2,"\\n "],[10,"span"],[14,0,"amount"],[12],[2,"\\n "],[1,[30,[36,4 ],[[32,1,["amount"]]],null]],[13],[2," "],[10,"span"],[14,0,"symbol"],[12],[2,"BTC"],[13],[2,"\\n "],[13],[2,"\\n "],[10,"ul"],[14,0,"expense-list"],[12],[2,"\\n"],[6,[37,6 ],[[30,[36,5 ],[[30,[36,5 ],[[32,1,["expenses"]]],null]],null]],null,[["default"],[{"statements":[[2," "],[10,"li"],[12],[2,"\\n "],[10,"div"],[14,0,"description"],[14,"rowspan","2"],[12],[2,"\\n "],[10,"h4"],[12],[2,"\\n "],[10,"span"],[14,0,"date"],[12],[1,[32,2,["date"]]],[2,":"],[13],[2,"\\n "],[10,"span"],[14,0,"title"],[12],[1,[32,2,["title"]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"p"],[14,0,"description"],[12],[1,[32,2,["description"]]],[13],[2,"\\n "],[13],[2,"\\n "],[10,"div"],[14,0,"amount"],[12],[2,"\\n "],[1,[30,[36,2 ],[[32,2,["amount"]],[32,2,["currency"]]],null]],[2,"\\n "],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[2]}]]],[2," "],[13],[2,"\\n"],[6,[37,7],[[32,0,["kredits","currentUserIsCore"]]],null,[["default"],[{"statements":[[2," "],[10,"p"],[12],[2,"\\n "],[10,"a"],[15,6,[31,[[32,0,["ipfsGatewayUrl"]],"/",[32,1,["ipfsHash"]]]]],[14,0,"button small"],[14,"target","_blank"],[14,"rel","noopener noreferrer"],[12],[2,"\\n Inspect IPFS data\\n "],[13],[2,"\\n "],[11,"button"],[16,"disabled",[32,1,["vetoed"]]],[24,0,"button small danger"],[24,4,"button"],[4,[38,1],["click",[30,[36,0],[[32,0,["veto"]],[32,1,["id"]]],null]],null],[12],[2,"veto"],[13],[2,"\\n "],[13],[2,"\\n"]],"parameters":[]}]]],[2," "],[13],[2,"\\n"]],"parameters":[1]}]]],[13]],"hasEval":false,"upvars":["fn","on"," fmt-fiat-currency","item-status","sats-to-btc","-track-array","each","if"]}' , meta : { moduleName : "kredits-web/components/reimbursement-list/template.hbs" } } )
e . default = t } ) ) , define ( "kredits-web/components/topbar-account-panel/component" , [ "exports" ] , ( function ( e ) { function t ( e , t , n , r , o , i , u ) { try { var a = e [ i ] ( u ) , s = a . value } catch ( c ) { return void n ( c ) } a . done ? t ( s ) : Promise . resolve ( s ) . then ( r , o ) } Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var n = Ember . Component . extend ( { tagName : "" , kredits : Ember . inject . service ( ) , router : Ember . inject . service ( ) , setupInProgress : ! 1 , userHasEthereumWallet : Ember . computed ( ( function ( ) { return Ember . isPresent ( window . ethereum ) } ) ) , showConnectButton : Ember . computed ( "userHasEthereumWallet" , "kredits.hasAccounts" , ( function ( ) { return this . userHasEthereumWallet && ! this . kredits . hasAccounts } ) ) , actions : { signup : function ( ) { this . router . transitionTo ( "signup" ) } , connectAccount : function ( ) { var e , n = this
return ( e = regeneratorRuntime . mark ( ( function e ( ) { return regeneratorRuntime . wrap ( ( function ( e ) { for ( ; ; ) switch ( e . prev = e . next ) { case 0 : return e . prev = 0 , e . next = 3 , window . ethereum . enable ( )
@@ -786,7 +805,9 @@ return r.setProperties({contributor:t.contributors.findBy("id",e.recipientId),pe
case 2 : return e . next = 4 , this . syncUnconfirmedObjects . perform ( "Reimbursement" )
case 4 : this . set ( "reimbursementsNeedSync" , ! 1 )
case 5 : case "end" : return e . stop ( ) } } ) , e , this ) } ) ) ) . group ( "syncTaskGroup" ) , fetchMissingReimbursements : ( 0 , r . task ) ( regeneratorRuntime . mark ( ( function e ( ) { return regeneratorRuntime . wrap ( ( function ( e ) { for ( ; ; ) switch ( e . prev = e . next ) { case 0 : return e . next = 2 , this . fetchMissingObjects . perform ( "Reimbursement" )
case 2 : case "end" : return e . stop ( ) } } ) , e , this ) } ) ) ) . group ( "syncTaskGroup" ) , addContractEventHandlers : function ( ) { this . kredits . Contributor . on ( "ContributorProfileUpdated" , this . handleContributorChange . bind ( this ) ) . on ( "ContributorAccountUpdated" , this . handleContributorChange . bind ( this ) ) . on ( "ContributorAdded" , this . handleContributorChange . bind ( this ) ) , this . kredits . Contribution . on ( "ContributionAdded" , this . handleContributionAdded . bind ( this ) ) . on ( "ContributionVetoed" , this . handleContributionVetoed . bind ( this ) ) , this . kredits . Reimbursement . on ( "ReimbursementAdded" , this . handleReimbursementAdded . bind ( this ) ) . on ( "ReimbursementVetoed" , this . handleReimbursementVetoed . bind ( this ) ) , this . kredits . Token . on ( "Transfer" , this . handleTransfer . bind ( this ) ) } , handleContributorChange : function ( e ) { var t = arguments , n = this
case 2 : case "end" : return e . stop ( ) } } ) , e , this ) } ) ) ) . group ( "syncTaskGroup" ) , vetoReimbursement : function ( e ) { console . debug ( "[kredits] veto against reimbursement" , e )
var t = this . reimbursements . findBy ( "id" , e )
return this . kredits . Reimbursement . functions . veto ( e , { gasLimit : 3e5 } ) . then ( ( function ( e ) { return console . debug ( "[kredits] veto response" , e ) , t . set ( "pendingTx" , e ) , e } ) ) } , addContractEventHandlers : function ( ) { this . kredits . Contributor . on ( "ContributorProfileUpdated" , this . handleContributorChange . bind ( this ) ) . on ( "ContributorAccountUpdated" , this . handleContributorChange . bind ( this ) ) . on ( "ContributorAdded" , this . handleContributorChange . bind ( this ) ) , this . kredits . Contribution . on ( "ContributionAdded" , this . handleContributionAdded . bind ( this ) ) . on ( "ContributionVetoed" , this . handleContributionVetoed . bind ( this ) ) , this . kredits . Reimbursement . on ( "ReimbursementAdded" , this . handleReimbursementAdded . bind ( this ) ) . on ( "ReimbursementVetoed" , this . handleReimbursementVetoed . bind ( this ) ) , this . kredits . Token . on ( "Transfer" , this . handleTransfer . bind ( this ) ) } , handleContributorChange : function ( e ) { var t = arguments , n = this
return v ( regeneratorRuntime . mark ( ( function r ( ) { var o , i , u , a , s , c
return regeneratorRuntime . wrap ( ( function ( r ) { for ( ; ; ) switch ( r . prev = r . next ) { case 0 : for ( console . debug ( "[kredits] Contributor add/update event received for ID" , e ) , o = t . length , i = new Array ( o > 1 ? o - 1 : 0 ) , u = 1 ; u < o ; u ++ ) i [ u - 1 ] = t [ u ]
return console . debug ( "[kredits] Event data:" , i ) , r . next = 5 , n . kredits . Contributor . getById ( e )
@@ -797,15 +818,16 @@ return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:
case 5 : return u = o . sent , a = r . loadContributionFromData ( u ) , o . next = 9 , r . browserCache . contributions . setItem ( a . id . toString ( ) , a . serialize ( ) )
case 9 : case "end" : return o . stop ( ) } } ) , o ) } ) ) ) ( ) } , handleContributionVetoed : function ( e ) { var t = this
return v ( regeneratorRuntime . mark ( ( function n ( ) { var r
return regeneratorRuntime . wrap ( ( function ( n ) { for ( ; ; ) switch ( n . prev = n . next ) { case 0 : if ( console . debug ( "[kredits] ContributionVetoed event received for " , e ) , ! ( r = t . contributions . findBy ( "id" , e ) ) ) { n . next = 8
return regeneratorRuntime . wrap ( ( function ( n ) { for ( ; ; ) switch ( n . prev = n . next ) { case 0 : if ( console . debug ( "[kredits] ContributionVetoed event received for # " , e ) , ! ( r = t . contributions . findBy ( "id" , e ) ) ) { n . next = 8
break } return console . debug ( "[kredits] Updating contribution" , r ) , r . set ( "vetoed" , ! 0 ) , r . set ( "pendingTx" , null ) , n . next = 8 , t . browserCache . contributions . setItem ( r . id . toString ( ) , r . serialize ( ) )
case 8 : case "end" : return n . stop ( ) } } ) , n ) } ) ) ) ( ) } , handleReimbursementAdded : function ( e , t , n ) { var r = this
return v ( regeneratorRuntime . mark ( ( function o ( ) { var i , u
return v ( regeneratorRuntime . mark ( ( function o ( ) { var i , u , a
return regeneratorRuntime . wrap ( ( function ( o ) { for ( ; ; ) switch ( o . prev = o . next ) { case 0 : return console . debug ( "[kredits] ReimbursementAdded event received" , { id : e , addedByAccount : t , amount : n } ) , ( i = r . reimbursementsPending . find ( ( function ( e ) { return e . amount . toString ( ) === n . toString ( ) } ) ) ) && ( console . debug ( "[kredits] Found a pending reimbursement matching the event. Replacing it with the final record..." ) , r . reimbursements . removeObject ( i ) ) , o . next = 5 , r . kredits . Reimbursement . getById ( e )
case 5 : u = o . sent , r . loadReimbursementFromData ( u )
case 7 : case "end" : return o . stop ( ) } } ) , o ) } ) ) ) ( ) } , handleReimbursementVetoed : function ( e ) { console . debug ( "[kredits] ReimbursementVetoed received for " , e )
var t = this . reimbursements . findBy ( "id" , e )
console . debug ( "[kredits] r eimbursement" , this . reimbursement ) , t && ( t . set ( "vetoe d", ! 0 ) , t . set ( "pendingTx " , null ) ) } , handleTransfer : function ( e , t , n ) { n = n . toNumber ( ) , this . contributors . findBy ( "address" , e ) . decrementProperty ( "balance ", n ) , this . contributors . findBy ( "address" , t ) . incrementProperty ( "balance" , n ) } } )
case 5 : u = o . sent , a = r . loadReimbursementFromData ( u ) , r . browserCache . reimbursements . setItem ( a . id . toString ( ) , a . serialize ( ) )
case 8 : case "end" : return o . stop ( ) } } ) , o ) } ) ) ) ( ) } , handleReimbursementVetoed : function ( e ) { var t = this
return v ( regeneratorRuntime . mark ( ( function n ( ) { var r
return regeneratorRuntime . wrap ( ( function ( n ) { for ( ; ; ) switch ( n . prev = n . next ) { case 0 : console . debug ( "[kredits] R eimbursementVetoed received for #" . concat ( e ) ) , r = t . reimbursements . findBy ( "i d", e ) , console . debug ( "[kredits] reimbursement " , r ) , r && ( r . set ( "vetoed" , ! 0 ) , r . set ( "pendingTx ", null ) , t . browserCache . reimbursements . setItem ( r . id . toString ( ) , r . serialize ( ) ) )
case 4 : case "end" : return n . stop ( ) } } ) , n ) } ) ) ) ( ) } , handleTransfer : function ( e , t , n ) { n = n . toNumber ( ) , this . contributors . findBy ( "address" , e ) . decrementProperty ( "balance" , n ) , this . contributors . findBy ( "address" , t ) . incrementProperty ( "balance" , n ) } } )
e . default = w } ) ) , define ( "kredits-web/services/moment" , [ "exports" , "ember-moment/services/moment" , "kredits-web/config/environment" ] , ( function ( e , t , n ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
var r = Ember . get , o = t . default . extend ( { defaultFormat : r ( n . default , "moment.outputFormat" ) } )
e . default = o } ) ) , define ( "kredits-web/templates/application-loading" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = void 0
@@ -866,7 +888,8 @@ return n}})),define("kredits-web/utils/process-contributor-data",["exports"],(fu
return [ "id" , "account" , "accounts" , "ipfsHash" , "isCore" , "kind" , "name" , "url" , "github_username" , "github_uid" , "wiki_username" , "zoom_display_name" ] . forEach ( ( function ( t ) { n [ t ] = e [ t ] } ) ) , n } } ) ) , define ( "kredits-web/utils/process-reimbursement-data" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = function ( e ) { var t = { amount : e . amount . toNumber ( ) }
e . confirmedAtBlock && "function" == typeof e . confirmedAtBlock . toNumber ? t . confirmedAt = e . confirmedAtBlock . toNumber ( ) : "undefined" !== e . confirmedAt && ( t . confirmedAt = e . confirmedAt )
return [ "id" , "recipientId" , "token" , "vetoed" , "ipfsHash" , "expenses" , "pendingTx" ] . forEach ( ( function ( n ) { t [ n ] = e [ n ] } ) ) , t } } ) )
define ( "kredits-web/config/envir onm ent" , [ ] , ( function ( ) { try { var e = "kredits-web/config/environment" , t = document . querySelector ( 'meta[name="' + e + '"]' ) . getAttribute ( "content" ) , n = { default : JSON . parse ( decodeURIComponent ( t ) ) }
return Object . defineProperty ( n , "__esModule" , { value : ! 0 } ) , n } catch ( r ) { throw new Error ( 'Could not read config from meta tag with name "' + e + '".' ) } } ) ) , runningTests || require ( "kredits-web/app" ) . default . create ( { name : "kredits-web" , version : "2.0.0-0+7c8ca45b" } )
define ( "kredits-web/utils/read-file-c ont ent" , [ "exports" ] , ( function ( e ) { Object . defineProperty ( e , "__esModule" , { value : ! 0 } ) , e . default = function ( e ) { var t = new FileReader
return new Promise ( ( function ( n , r ) { t . onload = function ( e ) { return n ( e . target . result ) } , t . onerror = function ( e ) { return r ( e ) } , t . readAsText ( e ) } ) ) } } ) ) , define ( "kredits-web/config/environment" , [ ] , ( function ( ) { try { var e = "kredits-web/config/environment" , t = document . querySelector ( 'meta[name="' + e + '"]' ) . getAttribute ( "content" ) , n = { default : JSON . parse ( decodeURIComponent ( t ) ) }
return Object . defineProperty ( n , "__esModule" , { value : ! 0 } ) , n } catch ( r ) { throw new Error ( 'Could not read config from meta tag with name "' + e + '".' ) } } ) ) , runningTests || require ( "kredits-web/app" ) . default . create ( { name : "kredits-web" , version : "2.0.0-beta.2+62b618b6" } )
//# sourceMappingURL=kredits-web-587629d422f47f105aa3f7b71b55343f .map
//# sourceMappingURL=kredits-web-be238b35dd6f11785c74a0ab0559cb38 .map