var __assign=this&&this.__assign||function(){__assign=Object.assign||function(a){for(var e,r=1,t=arguments.length;r<t;r++){e=arguments[r];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))a[n]=e[n]}return a};return __assign.apply(this,arguments)};var __spreadArrays=this&&this.__spreadArrays||function(){for(var a=0,e=0,r=arguments.length;e<r;e++)a+=arguments[e].length;for(var t=Array(a),n=0,e=0;e<r;e++)for(var o=arguments[e],l=0,d=o.length;l<d;l++,n++)t[n]=o[l];return t};System.register(["./p-8452837a.system.js"],(function(a){"use strict";var e;return{setters:[function(a){e=a.l}],execute:function(){var r=a("m",(function(a,e){if(a===void 0){a=4}if(e===void 0){e=undefined}var r=__spreadArrays(Array(a)).map((function(){return u(e)}));return{data:r}}));var t=["POINT","TICKET","GIFT"];var n=["Points","Tickets","Gifts"];var o=["AVAILABLE","PENDING","CANCELLED","EXPIRED","REDEEMED"];var l=["US_TAX","SCHEDULED","UNHANDLED_ERROR"];var d=["PENDING","IN_PROGRESS","FAILED","UNCLAIMED","ONHOLD","REFUNDED","RETURNED","REVERSED","BLOCKED","DENIED"];function i(a){if(a)return"SUCCESS";var e=Math.floor(Math.random()*10);var r=d[e];return r}var s=a("g",(function(){var a,r;var t=Math.floor(Math.random()*10)>=5?(a=e.DateTime.now())===null||a===void 0?void 0:a.minus({day:1}):null;var n=Math.floor(Math.random()*10)>=5?(r=e.DateTime.now())===null||r===void 0?void 0:r.minus({day:1}):null;var o=i(t);var l=o==="DENIED"?"WARN":!!t?"SUCCESS":Math.floor(Math.random()*10)>=8?"ERROR":"SUCCESS";return{status:l,customMeta:{datePaidOut:t,dateLastAttempted:n,dateFirstAttempted:n,rawPayPalInfo:{transaction_status:o}}}}));var u=function(a){var r=false;var d=0;var i;var u;var E;var v;var f=e.DateTime.now();var m=Math.floor(Math.random()*3);var M=a||o[Math.floor(Math.random()*5)];var h=t[m];var D=n[m];var R=Math.floor(Math.random()*100)+2;if(M==="AVAILABLE"){d=Math.floor(Math.random()*R);v=Math.floor(Math.random()*10)<3?f.plus({days:7}).toMillis():null}else if(M==="EXPIRED"){r=true;d=Math.floor(Math.random()*R);v=f.minus({days:1}).toMillis()}else if(M==="PENDING"){var p=l[Math.floor(Math.random()*3)];i=[p];if(p==="SCHEDULED"){u=f.plus({days:6}).toMillis()}}else if(M==="REDEEMED"){r=true}else{r=true;E=f.minus({days:2}).toMillis()}var y=Math.floor(Math.random()*3);return{id:"61f7878e096c9265de88b46f",type:"CREDIT",value:R,unit:h,name:null,dateGiven:f.minus({days:3}).toMillis(),dateExpires:v,dateCancelled:E,dateRedeemed:M==="REDEEMED"?f.plus({days:2}).toMillis():null,dateScheduledFor:u,fuelTankCode:null,fuelTankType:null,currency:null,prettyValue:R+" "+D,prettyValueNumber:""+R,prettyAvailableNumber:r?"0":""+(R-d),prettyRedeemedNumber:r&&!d?"0":""+d,programId:y===1?"program-id":null,program:{name:"My Program"},meta:__assign({},s()),statuses:[M],pendingReasons:i,globalRewardKey:null,programRewardKey:null,rewardSource:y===1?"AUTOMATED":"MANUAL",prettyRedeemedCredit:d+" "+D,prettyAssignedCredit:R+" "+D,prettyAvailableValue:r?"0 "+D:R-d+" "+D,exchangedRewardRedemptionTransaction:y===2?{id:"61f7878e096c9265de88b414",creditRedeemed:50,prettyRedeemedCredit:"50 Tokens",unit:"TOKEN",dateRedeemed:1643612046258,exchangedRewards:[],redeemedRewards:[]}:null,referral:null,rewardRedemptionTransactions:{data:[]}}}}}}));