PageSourceSearch

https://yuantafunds.com/_nuxt/CF13VfHX.js

js yuantafunds.com collected 2026-10-02 13:14:16 UTC 10,461 bytes, 1 lines download raw bytes

1var b=Object.defineProperty;var D=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var v=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))A.call(e,s)&&v(t,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&v(t,s,e[s]);return t};import{_ as C,i as m,c as d,o as a,f as c,b as r,d as _,F as P,r as S,n as u,t as T,a as I,w as k,e as R,V as x,aZ as B,g as l,$ as H,P as p,D as L}from"./BRTPeLSB.js";import{F as U,u as V}from"./CC2qcUT8.js";import{F as O,i as W}from"./KERLDHzC.js";import{E as Y}from"./PaZNfyw0.js";import{i as M,a as $}from"./CBUBphQs.js";import{i as G}from"./DsKMSWVd.js";import"./BHENaHtk.js";import"./CWWlaGQ3.js";import"./DsL4YI-C.js";const q={setup(){const t=V();return{store:L(),mrfundStore:t}},components:{"compare-title":U,"mrfund-card":O,"etf-card":Y},data(){return{images:{icon_nav_checkout:W},activeTag:0,detail:{},fundDetail:{},netAssets:[],netAssetsETF:[],invArea:[],invIndustry:[],holdingShareT10:[],holdingShare:[],fundDividend:[],fixedTop:!1,hub:{},proxy:{},etfInfo:{},realTimeData:[],pcfList:{},collection:[],hideRatio:!1,collectionSub:null,etfRebalance:[],specialFundList:[],fullPath:"",isValidFund:!0}},computed:{fundId(){return(this._.provides[p]||this.$route).params.fundid},fundInfo(){return this.store.FundList},shareData(){return f({},this.$data)},ratioEmpty:{get(){const t=["netAssets","invArea","invIndustry","holdingShareT10","holdingShare"],e=["BondWeights","ETFWeights","FutureWeights","StockWeights"],s=t.every(h=>l.isEmpty(this[h]))||this.fundDetail.FUND_ID=="2002";return this.typeEtf?e.every(h=>l.isEmpty(this.netAssetsETF&&this.netAssetsETF[h])):s},set(t){this.hideRatio=t}},hideDividend(){return l.isEmpty(this.fundDividend)},type(){return this.typeFund?"基金":"ETF"},switchBtn(){return[{btn:`${this.type}概況`,show:!0,value:0},{btn:`${this.type}檔案`,show:!0,value:1},{btn:"持股",show:this.hideHoldingFund?!1:!this.hideRatio,value:2},{btn:"歷史配息",show:!this.hideDividend,value:3},{btn:"預計配息時程",show:!this.hideDividend,value:4}]},activeBtn(){return this.switchBtn.filter(t=>t.show)},showTradeButton(){var t;return((t=this.fundDetail)==null?void 0:t.EC_ALLOT)=="Y"},title(){return this.typeFund?"基金詳細資訊":"ETF詳細資訊"},typeFund(){return(this.fundInfo.find(t=>t.FUND_ID==this.fundId)||"").FUND_TYPE!="3"},typeEtf(){return(this.fundInfo.find(t=>t.FUND_ID==this.fundId)||"").FUND_TYPE=="3"},hubUrl(){return this.store.getHubUrl},history(){return this.mrfundStore.history},info(){return this.mrfundStore.info},ratio(){return this.mrfundStore.ratio},dividend(){return this.mrfundStore.dividend},etfPage:{get(){return this.mrfundStore.etfPage},set(t){this.mrfundStore.setEtfPage(t)}},showTitle(){var t;return!((t=this.fullPath)!=null&&t.includes("hideTitle"))},contentClass(){return["content","f14","detailArea",{hideTitle:!this.showTitle}]},bottomBtns(){return["bottomBtns",{collectOnly:!this.showTradeButton}]},collected(){return this.collection.includes(this.fundId)},collectImg(){return this.collected?M:$},btnCollect(){return["bottomBtn btnCollect",{active:this.collected}]},tradeBtnClass(){return["bottomBtn btnAllot f16"]},etfInRealTime(){return!l.isEmpty(this.shareData.realTimeData.find(t=>t.etfId==this.etfId))},cardClass(){return["card card-etf forDetail",{topOnly:!this.etfInRealTime}]},etfId(){return this.fundDetail.STK_CD},hideHoldingFund(){return this.fundDetail.FUND_ID=="1084"||this.fundDetail.FUND_ID=="1164"}},async created(){if(this.fullPath=(this._.provides[p]||this.$route).fullPath,!this.fundId||!this.fundInfo.find(s=>s.FUND_ID==this.fundId)){console.error(`Invalid fund ID: ${this.fundId}`),this.isValidFund=!1,this.$_notify_error("錯誤",{html:"無效的基金代碼"}),this.$router.go(-1);return}this.isValidFund=!0;const[t,e]=await Promise.all([await this.getFundDetail(this.fundId),await this.getFundDividend(this.fundId)]);this.setDetail(t),this.fundDividend=e.Data,this.typeEtf&&(await this.getPcfList(),this.etfInfo=await this.getEtfInfo(),this.etfRebalance=await this.getEtfRebalance(this.fundId)),this.hideRatio=this.ratioEmpty,this.typeEtf&&this.$getAPI("ETFBackstage","ETFNAV/GetINAV_Data").then(s=>{this.setRealtimeData(s)})},async beforeMount(){this.isValidFund&&(this.etfPage=this.typeEtf,window.addEventListener("scroll",this.fixed),this.typeEtf&&this.startRealTimeInav())},async mounted(){this.isValidFund&&(this.updateCollection(),this.activeTag=Number((this._.provides[p]||this.$route).query.page)||0,this.get
1SpecialFund())},updated(){this.mrfundStore.setTrade(this.showTradeButton)},beforeUnmount(){this.typeEtf&&this.stopRealTimeInav(),window.removeEventListener("scroll",this.fixed),this.mrfundStore.setTrade(!1),this.destroyCollection()},methods:{async getEtfInfo(){return await this.$getAPI("ETFBackstage","ETFInformation/GetETFInformationByID",{stkcd:this.etfId})},async getPcfList(){try{const t=await this.$getAPI("ETFAPI","PCF/Daily",{ticker:this.etfId},"/api/bridge");this.pcfList=t,this.netAssetsETF=t.FundWeights}catch(t){console.log(t)}},async getFundDetail(t){return await this.$_api("GET","EC2API","FundDetail",{FundId:t})},async getFundDividend(t){return await this.$_api("GET","EC2API","FundDividend",{FundId:t})},switchClass(t){return["f16","switchTab",{active:this.activeTag==t}]},switchCard(t){this.setOffset(),this.activeTag=t,this.scrollToOffset(t),this.$router.push({query:{page:t}})},setOffset(){const t=l.clone(window.pageYOffset);this.activeTag==0?this.setHistory(t):this.activeTag==1?this.setInfo(t):this.activeTag==2?this.setRatio(t):this.setDivi
1dend(t)},scrollToOffset(t){this.$nextTick(()=>{t==0?window.scrollTo(0,this.history):t==1?window.scrollTo(0,this.info):t==2?window.scrollTo(0,this.ratio):window.scrollTo(0,this.dividend)})},setHistory(t){this.mrfundStore.setHistory(t)},setInfo(t){this.mrfundStore.setInfo(t)},setRatio(t){this.mrfundStore.setRatio(t)},setDividend(t){this.mrfundStore.setDividend(t)},getFundName(t){const{FUND_SH_NM:e,FUND_NAME_COMMENT:s}=this.fundInfo.find(n=>n.FUND_ID==t),h=l.isEmpty(s)?"":`<b>(${s})</b>`;return`${e} ${h}`},previous(){this.$router.go(-1)},fixed(){const t=this.typeFund?this.$refs.cardArea.offsetHeight+32:this.$refs.cardArea.offsetHeight+56;this.fixedTop=window.pageYOffset>=t},allotNow(t,e){this.$device.isAndroid?$App.allot(t,e):window.webkit.messageHandlers.AppAllot.postMessage(t)},startRealTimeInav(){this.hub=H.hubConnection(this.hubUrl),this.proxy.iNavHub=this.hub.createHubProxy("iNavHub"),this.proxy.iNavHub.on("inav",t=>{this.realTimeData=t}),this.hub.disconnected(()=>{(this._.provides[p]||this.$route).name.includes("mrFund-fund-fundid-detail")&&this.$_delay(2e3).then(()=>this.hub.start())}),this.hub.start().done(()=>{this.proxy.iNavHub.invoke("RetrieveINAV")})},stopRealTimeInav(){this.proxy.iNavHub&&this.hub&&(this.proxy.iNavHub.off("inav"),this.hub.stop())},setDetail(t){this.fundDetail=f(f({},l(t.Detail).first()),this.fundInfo.find(e=>e.FUND_ID==this.fundId)),this.detail=t,this.holdingShareT10=t.HoldingSharesTop10,this.holdingShare=t.HoldingShares,this.invArea=t.InvestArea,this.invIndustry=t.InvestIndustry,this.netAssets=t.NetAssets},setRealtimeData(t){this.realTimeData=t.filter(e=>e.SHOW_INAV).map(e=>({chkNavDate:e.CHK_NAV_DATE,etfId:e.ETF_ID,inav:e.NOW_NAV,inavType:e.INAV_TYPE,index:e.NOW_INDEX,indexFluct:e.INDEX_FLUCT,nav:e.NOW_NAV,navDate:e.NAV_DATE,navFluct:e.NAV_FLUCT,navPct:e.NAV_PCT,priYdDate:e.PRI_YD_DATE,price:e.NOW_PRICE,priceFluct:e.PRICE_FLUCT,pricePct:e.PRICE_PCT,rnav:e.NAV,updateTime:e.UPDATE_T,yestIndex:e.YEST_INDEX,yestNav:e.YEST_NAV,yestPrice:e.YEST_PRICE}))},addToChart(t){this.$device.isAndroid?$App.checkout(t):this.$device.isIos&&window.webkit.messageHandlers.AppCheckout.postMessage(t)},addToCollection(t){this.$device.isAndroid?$App.collect(t):this.$device.isIos&&window.webkit.messageHandlers.AppCollection.postMessage(t)},updateCollection(){this.collectionSub=G(800).subscribe(()=>{var t;this.collection=((t=B("collection"))==null?void 0:t.value)||[]})},destroyCollection(){this.collectionSub.unsubscribe()},async getEtfRebalance(t){return await this.$getAPI("ETFBackstage",`ETFInformation/Rebalance/${t}`)},async getSpecialFund(){try{this.specialFundList=await this.$_api("GET","EC2API","App/AdjustFundList")}catch(t){console.log(t)}}},watch:{"$route.query.page":{immediate:!0,handler(t){this.activeTag=parseInt(t)}}}},K={key:0},X={class:"fixedTop"},j={class:"switch d-flex"},z=["onClick"],Z={ref:"cardArea",class:"container"},J={key:2,class:"date f12"},Q=["src"],tt=["src"];function et(t,e,s,h,n,i){const y=m("compare-title"),g=m("mrfund-card"),F=m("etf-card"),E=R,w=x;return a(),d("div",null,[n.isValidFund?(a(),d("article",K,[r("div",X,[i.showTitle?(a(),_(y,{key:0,title:i.title,typeEtfDetail:i.typeEtf,fundHomePage:""},null,8,["title","typeEtfDetail"])):c("",!0),r("div",j,[(a(!0),d(P,null,S(i.activeBtn,o=>(a(),d("div",{key:o.btn,class:u(i.switchClass(o.value)),onClick:it=>i.switchCard(o.value)},T(o.btn),11,z))),128))])]),r("div",{class:u(i.contentClass)},[r("div",Z,[i.typeFund?(a(),_(g,{key:0,class:"card",fundid:i.fundId,hideAllotCompare:"",showInfo:"",fundDetail:""},null,8,["fundid"])):(a(),_(F,{key:1,class:u(i.cardClass),fundid:i.fundId,hideAllotCompare:"",activeTag:2,typeEtfDetail:"",realTimeData:n.realTimeData,stkcd:n.fundDetail.STK_CD,etfInfo:n.etfInfo},null,8,["class","fundid","realTimeData","stkcd","etfInfo"])),i.typeFund?(a(),d("p",J,"淨值日期:"+T(n.fundDetail.NAV_DATE||"-"),1)):c("",!0)],512),I(w,null,{default:k(()=>[I(E,{shareData:i.shareData,fundid:i.fundId,typeEtfDetail:i.typeEtf,fixedTop:n.fixedTop,pcfList:n.pcfList,specialFundList:n.specialFundList,etfRebalance:n.etfRebalance},null,8,["shareData","fundid","typeEtfDetail","fixedTop","pcfList","specialFundList","etfRebalance"])]),_:1}),r("div",{class:u(i.bottomBtns)},[i.showTradeButton?(a(),d("div",{key:0,class:u(i.tradeBtnClass),onClick:e[0]||(e[0]=o=>i.allotNow(n.fundDetail.FUND_ID,i.getFundName(n.fundDetail.FUND_ID)))},"立即申購",2)):c("",!0),i.showTradeButton?(a(),d("div",{key:1,class:"bottomBtn btnChart",onClick:e[1]||(e[1]=o=>i.addToChart(n.fundDetail.FUND_ID))},[r("img",{src:n.images.icon_nav_checkout},null,8,Q)])):c("",!0),r("div",{class:u(i.btnCollect),onClick:e[2]||(e[2]=o=>i.addToCollection(n.fundDetail.FUND_ID))},[r("img",{src:i.collectImg}
1,null,8,tt)],2)],2)],2)])):c("",!0)])}const ft=C(q,[["render",et],["__scopeId","data-v-2f27670d"]]);export{ft 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.