PageSourceSearch

https://my.cowrywise.com/_nuxt/CYMRRulM.js

js cowrywise.com collected 2026-09-25 19:16:46 UTC 13,566 bytes, 1 lines download raw bytes

1import{_ as Q}from"./D1hmM0S1.js";import{_ as ee}from"./DgECbb8r.js";import{cp as te,b4 as Z,bN as z,bl as W,bi as K,bE as se,b9 as i,ba as m,bb as c,bc as R,b8 as s,bx as O,bo as re,bK as oe,bz as ae,bp as E,bq as V,br as u,bj as H,bW as ne,bM as ie,b5 as le,b6 as ce,bf as ue,bB as G,bA as N,bd as M,bt as x,bm as de,by as U,be as L}from"./kiPoRQUa.js";import{$ as B}from"./DsflNL8l.js";import{_ as J}from"./87jNj1TJ.js";import{_ as me}from"./BVZIJGGi.js";import{_ as fe}from"./Cxs99sSO.js";import{_ as he}from"./ljBcRQmC.js";import{i as pe}from"./DiHXAHkM.js";import{C as ve,a as ge}from"./gsyav9W_.js";import{G as q}from"./Di9kh94f.js";import"./uGSdmQn4.js";import"./DBeFSxw9.js";import"./BK8WRypf.js";import"./R5977-Wu.js";import"./D5Fw7FEG.js";import"./G2Okh4nT.js";import"./DTC2j5VJ.js";import"./DL_RNIYQ.js";import"./gGjqskUv.js";import"./C4R1z_ot.js";import"./BuVgecrx.js";import"./CKXRPucY.js";import"./C7Ol0ggm.js";import"./Dm9JkziQ.js";import"./BWgsKK5v.js";import"./CIszqFHh.js";import"./DYByojuI.js";import"./BvWtzY85.js";import"./82RftC5q.js";import"./DWkET9sa.js";import"./CR81VlnS.js";import"./tvVB1YrN.js";(function(){try{var g=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};g.SENTRY_RELEASE={id:"ed9c04bcb539d9c6f529cf44ad3b04093fba2740"};var a=new g.Error().stack;a&&(g._sentryDebugIds=g._sentryDebugIds||{},g._sentryDebugIds[a]="148044d4-bdea-4463-8422-be8d3df8725d",g._sentryDebugIdIdentifier="sentry-dbid-148044d4-bdea-4463-8422-be8d3df8725d")}catch{}})();var F={exports:{}},_e=F.exports,X;function ye(){return X||(X=1,(function(g,a){(function(k,h){g.exports=h()})(_e,(function(){var k="minute",h=/[+-]\d\d(?::?\d\d)?/g,S=/([+-]|\d\d)/g;return function(A,C,l){var n=C.prototype;l.utc=function(e){var p={date:e,utc:!0,args:arguments};return new C(p)},n.utc=function(e){var p=l(this.toDate(),{locale:this.$L,utc:!0});return e?p.add(this.utcOffset(),k):p},n.local=function(){return l(this.toDate(),{locale:this.$L,utc:!1})};var v=n.parse;n.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),v.call(this,e)};var Y=n.init;n.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else Y.call(this)};var I=n.utcOffset;n.utcOffset=function(e,p){var D=this.$utils().u;if(D(e))return this.$u?0:D(this.$offset)?I.call(this):this.$offset;if(typeof e=="string"&&(e=(function(r){r===void 0&&(r="");var d=r.match(h);if(!d)return null;var f=(""+d[0]).match(S)||["-",0,0],T=f[0],o=60*+f[1]+ +f[2];return o===0?0:T==="+"?o:-o})(e),e===null))return this;var $=Math.abs(e)<=16?60*e:e;if($===0)return this.utc(p);var t=this.clone();if(p)return t.$offset=$,t.$u=!1,t;var b=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(t=this.local().add($+b,k)).$offset=$,t.$x.$localOffset=b,t};var y=n.format;n.format=function(e){var p=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,p)},n.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var P=n.toDate;n.toDate=function(e){return e==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():P.call(this)};var _=n.diff;n.diff=function(e,p,D){if(e&&this.$u===e.$u)return _.call(this,e,p,D);var $=this.local(),t=l(e).local();return _.call($,t,p,D)}}}))})(F)),F.exports}var be=ye();const ke=te(be),xe={key:0,class:"global-portfolio--chart chart-loading text-reader-secondary md:mt-16"},$e={key:1,class:"global-portfolio--chart"},Se=Z({__name:"PortfolioHoldingChart",props:{timeSeries:{},activePeriod:{},isMarketOpen:{type:Boolean},marketCloseTime:{}},setup(g){const a=g,k=V("chartContainer"),h=V("blinker"),S=u(()=>a.timeSeries?.map(r=>r.value)??[]);z.extend(ke);const A=u(()=>a.timeSeries?.map(r=>z.utc(r.datetime).format("hh:mm a  MMM DD, YYYY"))??[]),C=u(()=>a.timeSeries?.map(r=>[new Date(r.datetime).getTime(),r.value])??[]),l=u(()=>a.activePeriod==="1D"&&a.isMarketOpen),n=u(()=>
1!H.isMobileDevice()),v=u(()=>l.value?C.value:S.value),Y=u(()=>C.value[C.value.length-1]?.[0]),I=u(()=>a.marketCloseTime?new Date(a.marketCloseTime).getTime():Y.value),y=u(()=>S.value.length?Math.min(...S.value):0),P=u(()=>S.value.length?Math.max(...S.value):0),_=u(()=>{const r=P.value-y.value;return Math.max(0,y.value-r*.3)}),e=u(()=>{if(!a.timeSeries?.length)return"var(--color-chart-stroke-green)";const r=a.timeSeries[0],d=a.timeSeries[a.timeSeries.length-1];if(!r||!d)return"var(--color-chart-stroke-green)";const f=d.value-r.value;return f>0?"var(--color-chart-stroke-green)":f<0?"var(--color-chart-stroke-red)":"var(--color-chart-stroke-skyblue)"}),p=u(()=>{if(!a.timeSeries?.length)return"var(--color-chart-gradient-start-green)";const r=a.timeSeries[0],d=a.timeSeries[a.timeSeries.length-1];if(!r||!d)return"var(--color-chart-gradient-start-green)";const f=d.value-r.value;return f>0?"var(--color-chart-gradient-start-green)":f<0?"var(--color-chart-gradient-start-red)":"var(--color-chart-gradient-start-skyblue)"}),D=u(()=>{if(!a.timeSeries?.length)return"var(--color-chart-gradient-end-green)";
1const r=a.timeSeries[0],d=a.timeSeries[a.timeSeries.length-1];if(!r||!d)return"var(--color-chart-gradient-end-green)";const f=d.value-r.value;return f>0?"var(--color-chart-gradient-end-green)":f<0?"var(--color-chart-gradient-end-red)":"var(--color-chart-gradient-end-normal)"}),$=u(()=>({chart:{type:"area",sparkline:{enabled:!l.value},...l.value?{toolbar:{show:!1},zoom:{enabled:!1,allowMouseWheelZoom:!1},animations:{enabled:!0,speed:800,animateGradually:{enabled:!0,delay:150},dynamicAnimation:{enabled:!0,speed:350}},events:{animationEnd:()=>{t()}}}:{}},...l.value?{markers:{size:1,colors:["transparent"],strokeColor:"transparent",strokeWidth:0,hover:{size:0}}}:{},fill:{colors:[p.value],type:l.value?"pattern":"gradient",gradient:{gradientToColors:[D.value],shadeIntensity:.4,opacityFrom:.4,opacityTo:.2},...l.value?{pattern:{style:"slantedLines",width:3.5,height:3.5,strokeWidth:.2}}:{}},stroke:{colors:[e.value],show:!0,curve:"smooth",width:l.value?1.5:1},dataLabels:{enabled:!1},grid:{show:!1,...l.value?{padding:{top:0,right:0,bottom:0,left:0}}:{}},series:[{name:"Price",data:v.value}],yaxis:{show:!1,min:_.value,forceNiceScale:!0},tooltip:{enabled:!0,style:{fontSize:"13px",fontFamily:"Rency"},marker:{show:!0},y:{formatter:r=>B.formatFundPrice(String(r/100),!0)},...l.value?{x:{formatter:r=>z(r).format("hh:mm a  MMM DD, YYYY")}}:{}},xaxis:{show:l.value?n.value:!1,...l.value?{tickAmount:H.getScreenMode()=="sm"||H.getScreenMode()=="md"?3:6,type:"datetime",max:I.value,tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:n.value,color:"var(--color-reader-secondary)"},labels:{show:n.value,offsetX:0,offsetY:0,trim:!0,rotate:0,rotateAlways:!1,crosshairs:{show:!1},style:{colors:"var(--color-reader-secondary)",fontSize:"11px",fontWeight:500,fontFamily:"Rency"},formatter:function(r,d,{i:f}){return f===0?"":B.formatTime(r)}}}:{categories:A.value,labels:{show:!1,style:{colors:["#8FA0BB"],fontSize:"13px",fontWeight:600,fontFamily:"Rency"}}}}}));W([v,l],()=>{if(!l.value){h.value&&(h.value.style.display="none");return}t()}),K(()=>{l.value&&t()});function t(){se(()=>{setTimeout(b,100)})}function b(){if(!h.value||!k.value)return;const r=k.value.querySelector("#moneyChart"),d=r?.querySelectorAll(".apexcharts-marker, .apexcharts-series-markers");if(!d||d.length===0||!r){h.value.style.display="none";return}const f=[...d].reverse().find(w=>{const j=w.getBoundingClientRect();return j.width>0||j.height>0}),T=k.value.getBoundingClientRect(),o=f?.getBoundingClientRect();if(!T||!o){h.value.style.display="none";return}h.value.style.left=o.left-T.left+o.width/2+"px",h.value.style.top=o.top-T.top+o.height/2+"px",h.value.style.display="block"}return(r,d)=>{const f=Q,T=ne("apexchart"),o=ee;return i(),m("div",{ref_key:"chartContainer",ref:k,class:"holding-chart-container"},[g.timeSeries?(i(),m("div",$e,[s(v)&&s(v).length?(i(),m(O,{key:0},[R(oe,{name:"slow",mode:"out-in"},{default:re(()=>[R(T,{class:"-mx-6.5 md:mt-18",height:"250",id:"moneyChart",series:s($).series,options:s($)},null,8,["series","options"])]),_:1}),c("div",{ref_key:"blinker",ref:h,class:"blinking-dot hidden",style:ae({background:s(e)})},null,4)],64)):(i(),E(o,{key:1,isChart:!0}))])):(i(),m("div",xe,[c("div",null,[R(f,{height:270}),d[0]||(d[0]=c("span",{class:"text-reader-secondary"},"Loading Data...",-1))])]))],512)}}}),Ce=Object.assign(J(Se,[["__scopeId","data-v-c8cf0d00"]]),{__name:"PortfolioHoldingChart"}),Te=ie("/svg/icons/global-portfolio/composition-asset-logo.svg"),De={class:"global-portfolio-details"},we={key:0,class:"grid grid-cols-12 gap-5 mb-12.5"},Me={class:"col-span-12 p-4 lg:col-span-7"},Oe={class:"base-stock--card"},Ee={class:"flex items-start justify-between"},Ae={class:"logo"},Ye={key:0,src:Te},Ie=["src"],Pe={class:"mt-5 text-lg font-normal"},Re={class:"font-semibold stock-price"},He={key:0,class:"flex flex-wrap items-center"},Be={class:"period-filter"},Ne=["onClick"],Ue={key:0,class:"meta-section mt-7.5"},Le={class:"section--header"},ze={key:0},Fe={class:"key"},We={class:"value"},je={class:"col-span-12 p-4 lg:col-span-5"},Ve={class:"section--header"},Ge={class:"base-stock--card"},qe={class:"holdings-mini-list"},Xe={class:"logo"},Ze={class:"name text-reader-primary text-md"},Ke={class:"percentage text-reader-primary text-md"},Je="/svg/icons/global-portfolio/composition-asset-logo.svg",Qe=Z({__name:"index",props:{portfolioHoldings:{},marketTimes:{},allHoldingsDataPoint:{}},setup(g){z.extend(pe);const a=g,k=L(),h=u(()=>a.marketTimes?.is_exchange_open??!1),S=u(()=>
1a.marketTimes?.next_event_dt??null),A=le(),C=A.params.holdings,l=L(null),n=u(()=>{const t=a.allHoldingsDataPoint?.[C];return t?[...t].sort((b,r)=>b.rank-r.rank):null}),v=L(""),Y=u(()=>n.value?.map(t=>t.period)||[]),I=u(()=>n.value?.find(t=>t.default)?.period??"1D");W(n,t=>{t&&!v.value&&(v.value=I.value)},{immediate:!0});const y=u(()=>!n.value||!v.value?null:n.value.find(t=>t.period===v.value)??null),P=u(()=>n.value?y.value?.timeseries??[]:null),_=u(()=>{const t=A.params.holdings;return a.portfolioHoldings?a.portfolioHoldings.holdings.find(b=>b.symbol==t):null}),e=L(null),p=()=>{_.value&&H.setPageTitle(_.value.name)};async function D(){try{const{data:t}=await new q().getAsset(C);t&&(l.value=t)}catch{}}async function $(){try{const{data:t}=await new q().getAssetConstituents(C);t&&(e.value=t)}catch{}}return W(_,t=>{t&&p()}),H.logCustomEvent({event:"GLOBAL_PORTFOLIO_ASSET_DETAIL_VIEWED",parameters:{assetType:_.value?.asset_class}}),ce(async()=>{p()}),K(()=>{D(),$()}),ue({title:"My Cowrywise | Holding Details"}),(t,b)=>{const r=Ce,d=me,f=fe,T=he;return i(),m("div",De,[s(_)?(i(),m("div",we,[c("div",Me,[c("div",Oe,[c("div",Ee,[c("div",Ae,[s(_).logo_url?(i(),m("img",{key:1,src:s(_).logo_url,onerror:"this.style.display = 'none'"},null,8,Ie)):(i(),m("img",Ye))]),g.marketTimes?(i(),m("a",{key:0,href:"",class:N(["stock-market-indicator",{closed:!s(h)}]),onClick:b[0]||(b[0]=G(o=>s(k)?.open(!1),["prevent"]))},[...b[1]||(b[1]=[c("span",null,null,-1)])],2)):M("",!0)]),c("h6",Pe,x(s(_).name),1),c("h4",Re,"$"+x(("$formatters"in t?t.$formatters:s(B)).formatAmount(s(_).price)),1),s(y)?(i(),m("div",He,[c("span",{class:N(["price-change font-semibold regular",{green:Number(s(y).gross_return_absolute)>0,red:Number(s(y).gross_return_absolute)<0}])},[Number(s(y).gross_return_absolute)>0?(i(),E(s(ve),{key:0})):Number(s(y).gross_return_absolute)<0?(i(),E(s(ge),{key:1})):M("",!0),de(" "+x(("$formatters"in t?t.$formatters:s(B)).formatPercentage(Math.abs(Number(+s(y).gross_return_percentage/100)),2))+"% • $"+x(("$formatters"in t?t.$formatters:s(B)).formatAmount(Math.abs(Number(s(y).gross_return_absolute)),2)),1)],2)])):M("",!0),c("div",null,[(i(),E(r,{timeSeries:s(P),activePeriod:s(v),isMarketOpen:s(h),marketCloseTime:s(S),key:s(v)},null,8,["timeSeries","activePeriod","isMarketOpen","marketCloseTime"]))]),c("div",Be,[(i(!0),m(O,null,U(s(Y),o=>(i(),m("a",{href:"#",class:N(["text-reader-secondary",{active:s(v)===o}]),key:o,onClick:G(w=>v.value=o,["prevent"])},x(o),11,Ne))),128))])]),R(d,{ref_key:"marketStatusModalRef",ref:k,isOpen:s(h),nextEventTime:s(S)},null,8,["isOpen","nextEventTime"]),s(l)?(i(),m("section",Ue,[(i(!0),m(O,null,U(s(l),o=>(i(),m("div",{class:"meta--item",key:o.header},[c("h6",Le,x(o.header),1),c("div",{class:N(["base-stock--card",o.type==="text"?"meta-text":"meta-list"])},[o.type==="text"?(i(),m("p",ze,x(o.body_text),1)):M("",!0),o.type==="list"?(i(!0),m(O,{key:1},U(o.body_list,w=>(i(),m("div",{key:w.key},[c("span",Fe,x(w.key),1),c("span",We,x(w.value),1)]))),128)):M("",!0)],2)]))),128))])):M("",!0)]),c("div",je,[s(e)?(i(),m(O,{key:0},[c("h6",Ve,x(s(e).heading),1),c("div",Ge,[c("div",qe,[(i(!0),m(O,null,U(s(e).list,o=>(i(),m("div",{class:"holdings-mini-item",key:o.name},[c("div",Xe,[R(f,{src:o.logo_url,fallback:Je},null,8,["src"])]),c("div",Ze,x(o.name),1),c("div",Ke,x(o.weight)+"%",1)]))),128))])])],64)):(i(),E(T,{key:1,cells:6,defaultHeight:6}))])])):(i(),E(T,{key:1,cells:[{heights:[10,10],margins:[30,15],sm:6},{height:25,margin:15,sm:6},{height:25,margin:25,sm:6},{height:25,margin:25,sm:6}],marginTop:20,noItemMargin:""}))])}}}),Yt=J(Qe,[["__scopeId","data-v-6faf73fa"]]);export{Yt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.