@secondstaxorg/sscomp 1.9.59 → 1.9.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -15549,7 +15549,7 @@ var dayjs_min = {
15549
15549
  };
15550
15550
 
15551
15551
  (function (module, exports) {
15552
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),l=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));
15552
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
15553
15553
  } (dayjs_min));
15554
15554
 
15555
15555
  var dayjs = dayjs_minExports;
@@ -15563,18 +15563,18 @@ function dayDiff$2(rateDate,todayOverride,yesterdayOverride){
15563
15563
  const today = dayjs(todayFrmt);
15564
15564
  const newDay = dayjs(newDayFrmt);
15565
15565
 
15566
- // return today.diff(newDay)+' '
15566
+ const diffInDays = today.diff(newDay, 'day');
15567
15567
 
15568
- if (today.diff(newDay) === 0){
15568
+ if (diffInDays === 0) {
15569
15569
  return todayOverride ? `${todayOverride}, ` : 'today, '
15570
15570
  }
15571
15571
 
15572
- if (today.diff(newDay) === 662774400000){
15572
+ if (diffInDays === 1) {
15573
15573
  return yesterdayOverride ? `${yesterdayOverride}, ` : 'yesterday, '
15574
15574
  }
15575
15575
 
15576
- if (today.diff(newDay) > 86400000){
15577
- return '' //older than yesterday
15576
+ if (diffInDays > 1 || isNaN(diffInDays)) { // older than yesterday or safari returns NaN
15577
+ return '';
15578
15578
  }
15579
15579
  }
15580
15580
 
@@ -15643,7 +15643,6 @@ const _jsxFileName$14 = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compo
15643
15643
  const Chart = (props) => {
15644
15644
  const {ratesData,exchCurrFlag,baseCurrCode,exchCurrName,exchCurrCode,labelOverrides} = props;
15645
15645
  const [graphData,setGraphData] = React$1.useState({});
15646
-
15647
15646
  const [change,setChange] = React$1.useState(0);
15648
15647
 
15649
15648
  //generate graph colour based on performance of the currency
@@ -15677,7 +15676,8 @@ const Chart = (props) => {
15677
15676
  for (let i = 0; i < ratesData.length; i++) {
15678
15677
  if (ratesData[i].exchCurrency === exchCurrCode && ratesData[i].baseCurrency === baseCurrCode) {
15679
15678
  if (curr.dates.length < 7 && curr.data.length < 7) {
15680
- curr.dates.push(dayjs(ratesData[i].currDate).format('D MMM'));
15679
+ // curr.dates.push(dayjs(ratesData[i].currDate).format('D MMM'))
15680
+ curr.dates.push(ratesData[i].currDate);
15681
15681
  curr.data.push(ratesData[i].rate);
15682
15682
  curr.change = ratesData[i].rateChange;
15683
15683
  setChange(ratesData[i].rateChange);
@@ -15702,7 +15702,6 @@ const Chart = (props) => {
15702
15702
  setGraphData(chartData);
15703
15703
  },[ratesData,baseCurrCode,exchCurrCode]);
15704
15704
 
15705
-
15706
15705
  let options = {
15707
15706
  responsive: true,
15708
15707
  maintainAspectRatio:false,
@@ -15748,23 +15747,24 @@ const Chart = (props) => {
15748
15747
  return (
15749
15748
  React$1.createElement(React$1.Fragment, null
15750
15749
  , graphData.labels && graphData.labels.length > 0 &&
15751
- React$1.createElement(ChartContainer$3, {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 122}}
15752
- , React$1.createElement(TextArea$3, {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 123}}
15753
- , React$1.createElement(ExchangeCurr$2, {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 124}}
15754
- , React$1.createElement('img', { src: exchCurrFlag, alt: "Base currency flag" , __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 125}})
15755
- , React$1.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 126}}
15756
- , React$1.createElement('p', { className: "paragraph2Medium", __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 127}}, exchCurrName)
15757
- , React$1.createElement('p', { className: "paragraph2Regular", __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 128}}, exchCurrCode)
15750
+ React$1.createElement(ChartContainer$3, {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 121}}
15751
+ , React$1.createElement(TextArea$3, {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 122}}
15752
+ , React$1.createElement(ExchangeCurr$2, {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 123}}
15753
+ , React$1.createElement('img', { src: exchCurrFlag, alt: "Base currency flag" , __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 124}})
15754
+ , React$1.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 125}}
15755
+ , React$1.createElement('p', { className: "paragraph2Medium", __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 126}}, exchCurrName)
15756
+ , React$1.createElement('p', { className: "paragraph2Regular", __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 127}}, exchCurrCode)
15758
15757
  )
15759
15758
  )
15760
- , React$1.createElement(RateInfo$1, { style: {textAlign:"right"}, __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 131}}
15761
- , React$1.createElement(ExchangeRate$1, { className: "paragraph1Regular", __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 132}}
15762
- , change < 0 && React$1.createElement('i', { className: "icon-arrow-down-right error" , __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 133}})
15763
- , change > 0 && React$1.createElement('i', { className: "icon-arrow-up-right success" , __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 134}})
15764
- , change === 0 && React$1.createElement('i', { className: "icon-dash neutral" , __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 135}})
15759
+ , React$1.createElement(RateInfo$1, { style: {textAlign:"right"}, __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 130}}
15760
+ , React$1.createElement(ExchangeRate$1, { className: "paragraph1Regular", __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 131}}
15761
+ , change < 0 && React$1.createElement('i', { className: "icon-arrow-down-right error" , __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 132}})
15762
+ , change > 0 && React$1.createElement('i', { className: "icon-arrow-up-right success" , __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 133}})
15763
+ , change === 0 && React$1.createElement('i', { className: "icon-dash neutral" , __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 134}})
15765
15764
  , exchCurrCode, " 1.0000 = " , baseCurrCode, " " , graphData.datasets[0].data[graphData.datasets[0].data.length - 1]
15766
15765
  )
15767
- , React$1.createElement(RateDate$2, { className: "paragraph1Regular", __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 138}}, `${dayDiff$2(graphData.labels[graphData.labels.length - 1],_optionalChain$D([labelOverrides, 'optionalAccess', _ => _.today]),_optionalChain$D([labelOverrides, 'optionalAccess', _2 => _2.yesterday]))}${dayjs(graphData.labels[graphData.labels.length - 1]).format('MMM D')}`)
15766
+ , React$1.createElement(RateDate$2, { className: "paragraph1Regular", __self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 137}}, `${dayDiff$2(graphData.labels[graphData.labels.length - 1],_optionalChain$D([labelOverrides, 'optionalAccess', _ => _.today]),_optionalChain$D([labelOverrides, 'optionalAccess', _2 => _2.yesterday]))} ${dayjs(graphData.labels[graphData.labels.length - 1]).format('MMM D')}`)
15767
+ /*<RateDate className="paragraph1Regular">{`${dayDiff(graphData.labels[graphData.labels.length - 1],labelOverrides?.today,labelOverrides?.yesterday)} ${graphData.labels[graphData.labels.length - 1]}`}</RateDate>*/
15768
15768
  )
15769
15769
  )
15770
15770
  , React$1.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$14, lineNumber: 141}}
@@ -15788,18 +15788,18 @@ function dayDiff$1(rateDate,todayOverride,yesterdayOverride){
15788
15788
  const today = dayjs(todayFrmt);
15789
15789
  const newDay = dayjs(newDayFrmt);
15790
15790
 
15791
- // return today.diff(newDay)+' '
15791
+ const diffInDays = today.diff(newDay, 'day');
15792
15792
 
15793
- if (today.diff(newDay) === 0){
15793
+ if (diffInDays === 0) {
15794
15794
  return todayOverride ? `${todayOverride}, ` : 'today, '
15795
15795
  }
15796
15796
 
15797
- if (today.diff(newDay) === 662774400000){
15797
+ if (diffInDays === 1) {
15798
15798
  return yesterdayOverride ? `${yesterdayOverride}, ` : 'yesterday, '
15799
15799
  }
15800
15800
 
15801
- if (today.diff(newDay) > 86400000){
15802
- return '' //older than yesterday
15801
+ if (diffInDays > 1 || isNaN(diffInDays)) { // older than yesterday or safari returns NaN
15802
+ return '';
15803
15803
  }
15804
15804
  }
15805
15805
 
@@ -15987,14 +15987,15 @@ const ChartMedium = (props) => {
15987
15987
  , change === 0 && React$1.createElement('i', { className: "icon-dash neutral" , __self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 132}})
15988
15988
  , exchCurrCode, " 1.0000 = " , baseCurrCode, " " , graphData.datasets[0].data[graphData.datasets[0].data.length - 1]
15989
15989
  )
15990
- , React$1.createElement(RateDate$1, { className: "captionBook", __self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 135}}, `${dayDiff$1(graphData.labels[graphData.labels.length - 1],_optionalChain$C([labelOverrides, 'optionalAccess', _ => _.today]),_optionalChain$C([labelOverrides, 'optionalAccess', _2 => _2.yesterday]))}${dayjs(graphData.labels[graphData.labels.length - 1]).format('MMM D')}`)
15990
+ /*<RateDate className="captionBook">{`${dayDiff(graphData.labels[graphData.labels.length - 1],labelOverrides?.today,labelOverrides?.yesterday)}${dayjs(graphData.labels[graphData.labels.length - 1]).format('MMM D')}`}</RateDate>*/
15991
+ , React$1.createElement(RateDate$1, { className: "captionBook", __self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 136}}, `${dayDiff$1(graphData.labels[graphData.labels.length - 1],_optionalChain$C([labelOverrides, 'optionalAccess', _ => _.today]),_optionalChain$C([labelOverrides, 'optionalAccess', _2 => _2.yesterday]))}${graphData.labels[graphData.labels.length - 1]}`)
15991
15992
  )
15992
15993
  )
15993
- , React$1.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 138}}
15994
- , React$1.createElement(GraphArea$1, {__self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 139}}
15995
- , React$1.createElement(Line, { data: graphData, options: options, __self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 140}})
15994
+ , React$1.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 139}}
15995
+ , React$1.createElement(GraphArea$1, {__self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 140}}
15996
+ , React$1.createElement(Line, { data: graphData, options: options, __self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 141}})
15996
15997
  )
15997
- , React$1.createElement('div', { style: {height:'10px',background:performanceColor(change).fillColor}, __self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 142}})
15998
+ , React$1.createElement('div', { style: {height:'10px',background:performanceColor(change).fillColor}, __self: undefined, __source: {fileName: _jsxFileName$13, lineNumber: 143}})
15998
15999
  )
15999
16000
  )
16000
16001
 
@@ -16011,18 +16012,18 @@ function dayDiff(rateDate,todayOverride,yesterdayOverride){
16011
16012
  const today = dayjs(todayFrmt);
16012
16013
  const newDay = dayjs(newDayFrmt);
16013
16014
 
16014
- // return today.diff(newDay)+' '
16015
+ const diffInDays = today.diff(newDay, 'day');
16015
16016
 
16016
- if (today.diff(newDay) === 0){
16017
+ if (diffInDays === 0) {
16017
16018
  return todayOverride ? `${todayOverride}, ` : 'today, '
16018
16019
  }
16019
16020
 
16020
- if (today.diff(newDay) === 662774400000){
16021
+ if (diffInDays === 1) {
16021
16022
  return yesterdayOverride ? `${yesterdayOverride}, ` : 'yesterday, '
16022
16023
  }
16023
16024
 
16024
- if (today.diff(newDay) > 86400000){
16025
- return '' //older than yesterday
16025
+ if (diffInDays > 1 || isNaN(diffInDays)) { // older than yesterday or safari returns NaN
16026
+ return '';
16026
16027
  }
16027
16028
  }
16028
16029
 
@@ -16204,15 +16205,16 @@ const ChartSmall = (props) => {
16204
16205
  , React$1.createElement('img', { src: exchCurrFlag, alt: "Base currency flag" , __self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 122}})
16205
16206
  , React$1.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 123}}
16206
16207
  , React$1.createElement('p', { className: "paragraph1Regular", __self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 124}}, exchCurrCode, " " , graphData.datasets[0].data[graphData.datasets[0].data.length - 1])
16207
- , React$1.createElement(RateDate, { className: "footerBook", __self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 125}}, `${dayDiff(graphData.labels[graphData.labels.length - 1],_optionalChain$B([labelOverrides, 'optionalAccess', _ => _.today]),_optionalChain$B([labelOverrides, 'optionalAccess', _2 => _2.yesterday]))}${dayjs(graphData.labels[graphData.labels.length - 1]).format('MMM D')}`)
16208
+ /*<RateDate className="footerBook">{`${dayDiff(graphData.labels[graphData.labels.length - 1],labelOverrides?.today,labelOverrides?.yesterday)}${dayjs(graphData.labels[graphData.labels.length - 1]).format('MMM D')}`}</RateDate>*/
16209
+ , React$1.createElement(RateDate, { className: "footerBook", __self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 126}}, `${dayDiff(graphData.labels[graphData.labels.length - 1],_optionalChain$B([labelOverrides, 'optionalAccess', _ => _.today]),_optionalChain$B([labelOverrides, 'optionalAccess', _2 => _2.yesterday]))}${graphData.labels[graphData.labels.length - 1]}`)
16208
16210
  )
16209
16211
  )
16210
16212
  )
16211
- , React$1.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 129}}
16212
- , React$1.createElement(GraphArea, {__self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 130}}
16213
- , React$1.createElement(Line, { data: graphData, options: options, __self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 131}})
16213
+ , React$1.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 130}}
16214
+ , React$1.createElement(GraphArea, {__self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 131}}
16215
+ , React$1.createElement(Line, { data: graphData, options: options, __self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 132}})
16214
16216
  )
16215
- , React$1.createElement('div', { style: {height:'15px',background:performanceColor(change).fillColor}, __self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 133}})
16217
+ , React$1.createElement('div', { style: {height:'15px',background:performanceColor(change).fillColor}, __self: undefined, __source: {fileName: _jsxFileName$12, lineNumber: 134}})
16216
16218
  )
16217
16219
  )
16218
16220