1import{d as Pt,aD as Dt,aC as Kt,aF as Gt,w as ze,n as Pe,o as Wt,t as Yt,a5 as a,a6 as i,aa as y,a8 as t,ag as n,af as b,u as S,F as m,aj as C,E as g,v as jt,at as Jt,f as Qt,A as Xt,e as v,l as f,r as z}from"./vendor-vue-gs8sh0JI.js";import{u as wt}from"./configStore-Dt87dpZc.js";import{B as es,k as ts,_ as ss}from"./main-DglEQP9h.js";import{I as ls}from"./InsufficientCreditsModal-BKmZLwiq.js";import{g as ns,a as os,h as as,s as is,b as us,r as rs}from"./report-5inJtAS0.js";import{Z as w}from"./vendor-antd-CgIzqa9F.js";import"./index-DIj3bZk5.js";import"./vendor-element-plus-U41TSfPj.js";const cs={key:0,viewBox:"0 0 24 24"},ds={key:1,viewBox:"0 0 24 24"},vs={class:"page-wrap"},ps=["src","alt"],ys={class:"tagline"},bs={key:0,class:"data-state"},gs={key:1,class:"data-state error"},fs={key:2,class:"subs-section"},hs={class:"subs-head"},ms={class:"subs-head-main"},_s={class:"subs-count"},xs={class:"subs-tabs"},ks=["onClick"],Ss={class:"subs-table-wrap"},Cs={class:"subs-table"},Rs={class:"type-column"},$s={class:"expiry-column"},Bs={class:"actions-column"},Es={class:"report-name"},Ms={key:0,viewBox:"0 0 24 24"},Ts={key:1,viewBox:"0 0 24 24"},Ns={key:2,viewBox:"0 0 24 24"},As={key:3,viewBox:"0 0 24 24"},Us={class:"type-column"},Ls={class:"credits-column"},Fs={key:0},Is={class:"expiry-column"},Os=["datetime"],Zs={key:0},qs={class:"actions-column"},Hs={class:"action-group"},Vs=["aria-checked","aria-label","disabled","onClick"],zs={class:"action-label"},Ps=["disabled","onClick"],Ds={key:2,class:"action-placeholder"},Ks=["href"],Gs=["title","onClick"],Ws={class:"action-label"},Ys={key:4,class:"action-placeholder"},js={class:"subs-foot"},Js={key:1,class:"subs-empty"},Qs={class:"fold-head-text"},Xs={key:0,class:"fold-body"},ws={class:"report-tabs"},el=["onClick"],tl={class:"report-content"},sl={class:"report-section"},ll={key:0,class:"mode-toggle"},nl={class:"report-search"},ol=["placeholder"],al={key:1,class:"no-results"},il={key:2,class:"no-results catalog-error"},ul={class:"zone-head"},rl={class:"avail-name"},cl={class:"ex-count"},dl={class:"cat-label"},vl={class:"symbol-grid"},pl=["data-catalog-key","disabled","onClick"],yl={class:"sym-code"},bl={key:0,class:"owned-badge"},gl={key:1,class:"forex-list"},fl=["data-catalog-key","disabled","onClick"],hl={class:"forex-pair-info"},ml={key:0,class:"owned-badge"},_l={key:0,class:"credit-price"},xl={class:"avail-name"},kl={class:"ex-count"},Sl={class:"symbol-grid"},Cl=["data-catalog-key","disabled","onClick"],Rl={key:0,class:"owned-badge"},$l={key:0,class:"group-body soon-body"},Bl=["onClick"],El={class:"gh-name"},Ml={class:"gh-count"},Tl={key:0,class:"group-body"},Nl={class:"cat-label"},Al={class:"symbol-grid"},Ul={class:"sym-code"},Ll={key:1,class:"forex-list"},Fl={class:"forex-pair-info"},Il={class:"soon-badge"},Ol=["onClick"],Zl={class:"gh-name"},ql={class:"gh-count"},Hl={key:0,class:"group-body"},Vl={class:"symbol-grid"},zl=["disabled","onClick"],Pl={key:0,class:"alt-mode-badge"},Dl={key:1},Kl={key:5,class:"no-results"},Gl={key:6,class:"select-bar"},Wl={key:0},Yl={class:"fold-head-text"},jl={key:0,class:"fold-body sample-grid"},Jl=["href"],Ql={class:"sample-foot"},Xl=["title"],wl={key:0},en={class:"account-details"},tn={class:"account-details-inner"},sn={class:"account-meta"},ln={key:0,class:"credit-warning danger"},nn={key:1,class:"credit-warning warn"},on={class:"confirm-modal",role:"dialog","aria-modal":"true"},an={key:0,viewBox:"0 0 24 24"},un={key:1,viewBox:"0 0 24 24"},rn={key:0,class:"modal-target"},cn={key:0,viewBox:"0 0 24 24"},dn={key:1,viewBox:"0 0 24 24"},vn={key:2,viewBox:"0 0 24 24"},pn={key:3,viewBox:"0 0 24 24"},yn=["disabled"],bn=Pt({name:"ReportSubscriptions",__name:"index",setup(gn){const rt={tag:"管çä½ çæ¥å订é
ï¼éæ¶æ¥çãå é¤ææ·»å æ°æ¥å",mySubsTitle:"æç订é
",mySubsSub:"管çä½ å·²è®¢é
çæ¥åï¼éæ¶æ¥çæå 餿¥å",mySubsEmpty:"ä½ è¿æ²¡æè®¢é
任使¥å",mySubsEmptyCta:"廿·»å æ¥å",all:"å
¨é¨",colReport:"æ¥å",colType:"ç±»å",colCredits:"积å/æ",colExpiresAt:"订é
å°ææ¶é´",colActions:"æä½",openReport:"æ¥çæ¥å",autoRenewOn:"èªå¨ç»è®¢",autoRenewOff:"已忶ç»è®¢",deleteReport:"å 餿¥å",renew:"éæ°è®¢é
",monthlyCost:"æ¯æè®¢é
",creditsUnit:"积å",perMonth:"积å/æ",planName:"ä¼ä¸ç · æåº¦è®¢é
",nearestExpiry:"æè¿æ¥åå°ææ¶é´",currentSubscriptionCredits:"å½å订é
æ»ç§¯å",addTitle:"æ·»å æ¥å",addSub:"æç´¢å¹¶è®¢é
æ°çåç§ãè´§å¸å¯¹æèªçº¿",futures:"æè´§",forex:"夿±",freight:"è´§è¿",ocean:"æµ·è¿",air:"空è¿",searchFutures:"æç´¢åç§åç§°æä»£ç â¦",searchForex:"æç´¢è´§å¸å¯¹â¦",searchFreight:"æç´¢åºåèªçº¿â¦",availableNow:"ç°å·²ä¸çº¿",availableUnder:e=>`${e}å¯è®¢é
`,comingSoonZone:"æ°æ®ç¹å¤ä¸",comingSoonHint:"æç»æ¥å
¥æ´å¤åç§åèªçº¿ï¼æ¬è¯·æå¾
",comingSoon:"ææªçæ",noSymbol:"æªæ¾å°å¹é
åç§",noPair:"æªæ¾å°å¹é
è´§å¸å¯¹",noRoute:"æªæ¾å°å¹é
èªçº¿",subscribed:"已订é
",symbolsUnit:"åç§",routesUnit:"èªçº¿",selectedCount:e=>`å·²é ${e} 项`,costLabel:e=>`å计 ${e} 积å/æ`,insufficientInline:"ä½é¢ä¸è¶³",addSelected:e=>`æ·»å æé (${e})`,subscribeUnaffordable:"å
å¼å订é
",samplesTitle:"æ ·ä¾æ¥å",s
1amplesSub:"å
è´¹é¢è§ï¼æå订é
åå¯è·å¾çåææ·±åº¦",viewSample:"æ¥çæ ·ä¾",activeSubs:"è¿è¡ä¸è®¢é
",itemsUnit:"项",topUp:"å
å¼",acctDetailsHint:"è´¦æ·ä¸ç§¯å",warnNextTitle:"ä¸ä¸ªè´¦åå¨æç§¯åä¸è¶³",warnNextBody:(e,s)=>`é¢è®¡è¿å·® ${e} 积åï¼è¯·å¨ ${s} åå
å¼ï¼ä»¥å
订é
å°æåèªå¨æåã`,creditBar:e=>`积åå³å°ä¸è¶³ï¼ä¸ä¸ªè´¦å卿è¿å·® ${e} 积å`,lowCreditTitle:"å½å积åä¸è¶³",lowCreditBody:"æ¥å订é
è¿æåå°æ æ³èªå¨ç»è´¹åæ¥çï¼è¯·åæ¶å
å¼ã",lowCreditBar:"å½å积åä¸è¶³ï¼æ¥å订é
è¿æåå°æ æ³èªå¨ç»è´¹åæ¥ç",cancel:"åæ¶",hideTitle:"å 餿¥å",hideBody:"ç¡®å®è¦ä»è®¢é
å表ä¸å é¤è¿ä»½æ¥ååï¼å é¤åä»
ä»å½åå表éèï¼ä¸å½±å订é
æ¬èº«ãæ¥åæéåèªå¨ç»è´¹ã",hideConfirm:"确认å é¤",subscribeTitle:"确认订é
",subscribeBody:(e,s)=>`å°è®¢é
${e} 份æ¥åï¼æ¯æå计 ${s} 积åã确认订é
ï¼`,subscribeConfirm:"确认订é
",loadingOverview:"å è½½ä¸â¦",overviewError:"å 载失败ï¼è¯·ç¨åéè¯",loadingCatalog:"å è½½ä¸â¦",catalogError:"å 载失败ï¼è¯·ç¨åéè¯",retry:"éè¯",processing:"å¤çä¸â¦",operationSuccess:"æä½å·²çæ",operationFailed:"æä½å¤±è´¥ï¼è¯·ç¨åéè¯",renewSuccessTitle:"å·²æå订é
",renewSuccessBody:(e,s)=>`å·²æå订é
${e}æ¥åâ${s}âã`,subscribeSuccess:(e,s)=>s>1?`æ¨å·²æå订é
${e}ç ${s} 份æ¥åï¼3ç§åå°èªå¨è·³è½¬å°é¦ä»½æ¥å`:`æ¨å·²æå订é
${e}æ¥åï¼3ç§åå°èªå¨è·³è½¬å°å¯¹åºçæ¥å`,done:"宿"},ct={tag:"Manage your report subscriptions â view, delete, or add new reports anytime",mySubsTitle:"My subscriptions",mySubsSub:"Manage subscribed reports â open or delete them anytime",mySubsEmpty:"You haven't subscribed to any reports yet",mySubsEmptyCta:"Add a report",all:"All",colReport:"Report",colType:"Type",colCredits:"Credits/mo",colExpiresAt:"Expires on",colActions:"",openReport:"Open",autoRenewOn:"Auto-renew on",autoRenewOff:"Renewal canceled",deleteReport:"Delete report",renew:"Resubscribe",monthlyCost:"Monthly cost",creditsUnit:"credits",perMonth:"credits/mo",planName:"Enterprise · Monthly",nearestExpiry:"Nearest report expiry",currentSubscriptionCredits:"Current subscription credits",addTitle:"Add reports",addSub:"Search and subscribe to new symbols, currency pairs or routes",futures:"Futures",forex:"Forex",freight:"Freight",ocean:"Ocean",air:"Air",searchFutures:"Search symbol name or codeâ¦",searchForex:"Search currency pairâ¦",searchFreight:"Search region routeâ¦",availableNow:"Available now",availableUnder:e=>`Available under ${e}`,comingSoonZone:"Data in progress",comingSoonHint:"We're adding more symbols and routes â stay tuned",comingSoon:"Not yet available",noSymbol:"No matching symbols found",noPair:"No matching pairs found",noRoute:"No matching routes found",subscribed:"Subscribed",symbolsUnit:"symbols",routesUnit:"routes",selectedCount:e=>`${e} selected`,costLabel:e=>`${e} credits/mo total`,insufficientInline:"Insufficient balance",addSelected:e=>`Add selected (${e})`,subscribeUnaffordable:"Top up to subscribe",samplesTitle:"Sample reports",samplesSub:"Free preview of the analysis depth you get after subscribing",viewSample:"View sample",activeSubs:"Active subs",itemsUnit:"",topUp:"Top up",acctDetailsHint:"Account & credits",warnNextTitle:"Not enough credits for the next billing cycle",warnNextBody:(e,s)=>`You are short by ${e} credits. Top up before ${s}
1 to avoid your subscriptions being paused on renewal.`,creditBar:e=>`Credits running low â short by ${e} next cycle`,lowCreditTitle:"Insufficient credits",lowCreditBody:"Once report subscriptions expire, they can no longer renew automatically or be viewed. Please top up in time.",lowCreditBar:"Insufficient credits. Expired report subscriptions cannot renew automatically or be viewed.",cancel:"Cancel",hideTitle:"Delete report",hideBody:"Remove this report from the current list? This only hides it and does not affect the subscription, report access, or auto-renewal.",hideConfirm:"Delete",subscribeTitle:"Confirm subscription",subscribeBody:(e,s)=>`You are about to subscribe to ${e} report(s) for ${s} credits/mo. Confirm?`,subscribeConfirm:"Confirm",loadingOverview:"Loadingâ¦",overviewError:"Failed to load â please try again later",loadingCatalog:"Loadingâ¦",catalogError:"Failed to load â please try again later",retry:"Retry",processing:"Processingâ¦",operationSuccess:"Changes saved",operationFailed:"Operation failed. Please try again.",renewSuccessTitle:"Subscribed successfully",renewSuccessBody:(e,s)=>`You have successfully subscribed to the ${e} report â${s}â.`,subscribeSuccess:(e,s)=>s>1?`You have subscribed to ${e} and ${s-1} more reports. Opening the first report in 3 seconds.`:`You have successfully subscribed to the ${e} report. Opening it in 3 seconds.`,done:"Done"},{locale:he}=Dt(),ae=Kt(),ie=Gt(),dt=wt(),A=v(()=>{var e;return he.value==="zh"||((e=he.value)==null?void 0:e.startsWith("zh"))}),o=v(()=>A.value?rt:ct),I=f(!1),De=f(null),ue=f(!1),me=f(!1),_e=f(!0),xe=f(!1),ee=f(!1),Ke=f(null),Ge=f(null),P=f(null),ke=f(!1),Se=f(null),$=f(null),re=f(null),te=f(null),ce=f(null),de=f(null),Ce=f(null),_=f([]),O=f("all"),h=f("futures"),Z=f("ocean"),We=z({futures:"",forex:"",ocean:"",air:""}),D=z({futures:[],forex:[],ocean:[],air:[]}),Ye=f(""),K=f([]),Re=z({}),q=f(null),T=z({futures:[],forex:[],ocean:[],air:[]}),$e=z({futures:!1,forex:!1,ocean:!1,air:!1}),G=z({futures:!1,forex:!1,ocean:!1,air:!1}),se=z({futures:!1,forex:!1,ocean:!1,air:!1}),p=f(null);let W=null;const vt=[{asset:"futures",itemId:"CU",nameZh:"æè´§ç¤ºä¾æ¥å",nameEn:"Futures Sample Report",credits:3e4},{asset:"forex",itemId:"EUR/USD",nameZh:"夿±ç¤ºä¾æ¥å",nameEn:"Forex Sample Report",credits:2e4},{asset:"ocean",itemId:"EAST_CHINA__US_WEST_COAST",nameZh:"æµ·è¿ç¤ºä¾æ¥å",nameEn:"Ocean Freight Sample Report",credits:1e4},{asset:"air",itemId:"EAST_CHINA__WESTERN_EUROPE",nameZh:"空è¿ç¤ºä¾æ¥å",nameEn:"Air Freight Sample Report",credits:1e4}],je=e=>["futures","forex","ocean","air"].includes(String(e)),Y=e=>e==null||e===""||!Number.isFinite(Number(e))?null:Number(e),Je=e=>Array.isArray(e)?e:[e==null?void 0:e.subscriptions,e==null?void 0:e.items,e==null?void 0:e.catalog,e==null?void 0:e.symbols].find(Array.isArray)||[],Qe=(e,s)=>{const u=je(e==null?void 0:e.asset_class)?e.asset_class:s,r=(e==null?void 0:e.item_id)??(e==null?void 0:e.canonical_id)??(e==null?void 0:e.symbol)??(e==null?void 0:e.route_id);if(!u||r===null||r===void 0||String(r).trim()==="")return null;const l=String(r),c=l.includes("/")?l.split("/"):[],d=typeof(e==null?void 0:e.name)=="string"?e.name:"";return{asset:u,id:l,subscriptionId:(e==null?void 0:e.subscription_id)??(e==null?void 0:e.id)??null,code:(e==null?void 0:e.code)??(e==null?void 0:e.symbol)??(u==="futures"?l:void 0),base:(e==null?void 0:e.base)??c[0],quote:(e==null?void 0:e.quote)??c[1],nameZh:(e==null?void 0:e.name_zh)||(e==null?void 0:e.name_cn)||d||l,nameEn:(e==null?void 0:e.name_en)||d||l,credits:Y((e==null?void 0:e.credit_cost)??(e==null?void 0:e.credits)??(e==null?void 0:e.price)),active:!!((e==null?void 0:e.active)??(e==null?void 0:e.enabled)??!1),autoRenew:typeof(e==null?void 0:e.auto_renew)=="boolean"?e.auto_renew:null,status:String((e==null?void 0:e.status)??""),expiresAt:typeof(e==null?void 0:e.expires_at)=="string"?e.expires_at:"",exchangeKey:String((e==null?void 0:e.exchange_name_en)??(e==null?void 0:e.exchange)??"other"),exchangeNameZh:String((e==null?void 0:e.exchange_name_zh)??(e==null?void 0:e.exchange_name_cn)??(e==null?void 0:e.exchange_name_en)??(e==null?void 0:e.exchange)??""),exchangeNameEn:String((e==null?void 0:e.exchange_name_en)??(e==null?void 0:e.exchange)??""),sectorKey:String((e==null?void 0:e.sector_name_en)??(e==null?void 0:e.sector)??"other"),sectorNameZh:String((e==null?void 0:e.sector_name_zh)??(e==null?void 0:e.sector_name_cn)??(e==null?void 0:e.sector_name_en)??(e==null?void 0:e.sector)??""),sectorNameEn:String((e==null?void 0:e.sector_name_en)??(e==null?void 0:e.sector)??""),originRegionZh:String((e==null?void 0:e.origin_regi
1on_zh)??(e==null?void 0:e.origin_region_cn)??(e==null?void 0:e.origin_region_en)??"Other"),originRegionEn:String((e==null?void 0:e.origin_region_en)??"Other"),destinationRegionEn:String((e==null?void 0:e.destination_region_en)??"")}},pt=e=>{const s=T[e.asset].find(u=>u.id.toUpperCase()===e.id.toUpperCase());return s?{...e,nameZh:e.nameZh===e.id?s.nameZh:e.nameZh,nameEn:e.nameEn===e.id?s.nameEn:e.nameEn,credits:e.credits??s.credits}:e},B=async(e,s=!1)=>{if(!(G[e]||$e[e]&&!s)){G[e]=!0,se[e]=!1;try{const u=await ns(e,!1),r=Je(u==null?void 0:u.data).map(l=>Qe(l,e)).filter(Boolean);T[e]=r,$e[e]=!0,_.value=_.value.map(pt)}catch{T[e]=[],$e[e]=!1,se[e]=!0}finally{G[e]=!1}}},le=async()=>{_e.value=!0,xe.value=!1;try{const e=await os(),s=e==null?void 0:e.data;if(!s||typeof s!="object")throw new Error("Invalid subscription overview response");$.value=Y(s.total_credits),re.value=typeof s.plan_name=="string"&&s.plan_name.trim()?s.plan_name:null,te.value=typeof s.next_billing_date=="string"&&s.next_billing_date.trim()?s.next_billing_date:null;const u=s.nearest_report_expiry_at??s.nearest_report_expiry_date??s.nearest_expiration_date??s.next_report_expiry_at??s.next_expiring_at??s.earliest_expiry_at;ce.value=typeof u=="string"&&u.trim()?u:null,de.value=Y(s.low_credit_threshold??s.low_credits_threshold),Ce.value=Y(s.auto_renew_total_credits??s.auto_renew_estimated_credits??s.estimated_auto_renew_credits),_.value=Je(s).map(r=>Qe(r)).filter(Boolean),O.value!=="all"&&!_.value.some(r=>r.asset===O.value)&&(O.value="all"),await Promise.allSettled([...new Set(_.value.map(r=>r.asset))].map(r=>B(r)))}catch{$.value=null,re.value=null,te.value=null,ce.value=null,de.value=null,Ce.value=null,_.value=[],xe.value=!0}finally{_e.value=!1}},Be=v(()=>_.value.some(e=>e.credits==null)?null:_.value.reduce((e,s)=>e+Number(s.credits),0)),ve=v(()=>Ce.value??Be.value),Ee=v(()=>{var e;return te.value?((e=te.value.match(/^\d{4}-\d{2}-\d{2}/))==null?void 0:e[0])??te.value:null}),Me=e=>{var s;return((s=e.match(/^\d{4}-\d{2}-\d{2}/))==null?void 0:s[0])??e},yt=v(()=>{if(ce.value)return Me(ce.value);const e=_.value.map(l=>l.expiresAt).filter(Boolean).map(l=>({value:l,timestamp:new Date(l).getTime()})).filter(l=>Number.isFinite(l.timestamp));if(!e.length)return null;const s=Date.now(),u=e.filter(l=>l.timestamp>=s),r=(u.length?u:e).sort((l,c)=>l.timestamp-c.timestamp)[0];return Me(r.value)}),ne=v(()=>$.value!=null&&ve.value!=null?Math.max(0,ve.value-$.value):0),Te=v(()=>$.value!=null&&de.value!=null&&$.value<de.value),Ne=v(()=>ne.value>0||Te.value),j=v(()=>Te.value?"danger":ne.value>0?"warn":"ok"),bt=v(()=>j.value==="danger"?o.value.lowCreditTitle:o.value.warnNextTitle),gt=v(()=>j.value==="danger"?o.value.lowCreditBar:o.value.creditBar(N(ne.value))),ft=v(()=>O.value==="all"?_.value:_.value.filter(e=>e.asset===O.value)),ht=v(()=>{const e=["futures","forex","ocean","air"];return[{key:"all",label:o.value.all,count:_.value.length},...e.filter(s=>_.value.some(u=>u.asset===s)).map(s=>({key:s,label:X(s),count:_.value.filter(u=>u.asset===s).length}))]}),mt=v(()=>[{key:"futures",label:o.value.futures},{key:"forex",label:o.value.forex},{key:"freight",label:o.value.freight}]),x=v(()=>h.value==="freight"?Z.value:h.value),pe=v({get:()=>h.value==="freight"?Ye.value:We[x.value],set:e=>{h.value==="freight"?Ye.value=e:We[x.value]=e}}),U=v({get:()=>h.value==="freight"?K.value:D[x.value],set:e=>{h.value==="freight"?K.value=e:D[x.value]=e}}),ye=v(()=>T[x.value]),Xe=v(()=>{const e=pe.value.trim().toLowerCase();if(!e)return ye.value;if(h.value!=="freight")return ye.value.filter(r=>`${r.id} ${r.code||""} ${r.nameZh} ${r.nameEn} ${r.base||""} ${r.quote||""}`.toLowerCase().includes(e));const s=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=new RegExp(`(?<![a-z])${s}(?![a-z])`,"i");return ye.value.filter(r=>u.test(`${r.id} ${r.nameZh} ${r.nameEn}`))}),J=v(()=>Xe.value.filter(e=>e.active)),Q=v(()=>Xe.value.filter(e=>!e.active)),H=v(()=>(h.value==="freight"?[...T.ocean,...T.air]:ye.value).filter(s=>U.value.includes(k(s)))),oe=v(()=>H.value.reduce((e,s)=>e+Number(s.credits),0)),be=v(()=>$.value!=null&&oe.value>$.value),_t=v(()=>h.value==="futures"?o.value.searchFutures:h.value==="forex"?o.value.searchForex:o.value.searchFreight),xt=v(()=>h.value==="futures"?o.value.noSymbol:h.value==="forex"?o.value.noPair:o.value.noRoute),kt=v(()=>!!pe.value.trim()),Ae=(e,s,u)=>(A.value?e:s)||s||e||u,we=e=>{const s=new Map;return e.forEach(u=>s.set(u.exchangeKey,[...s.get(u.exchangeKey)||[],u])),[...s.entries()].map(([u,r])=>{var c,d;const l=new Map;return r.forEach(R=>l.set(R.sectorKey,[...l.get(R.sectorKey)||[],R])),{key:u,name:Ae(((c=r[0])==null?void 0:c.exchangeNameZh)||"",((d=r[0])==null?void 0:d.exch
1angeNameEn)||"",u),items:r,sectors:[...l.entries()].map(([R,F])=>{var it,ut;return{key:R,name:Ae(((it=F[0])==null?void 0:it.sectorNameZh)||"",((ut=F[0])==null?void 0:ut.sectorNameEn)||"",R),items:[...F].sort((Vt,zt)=>Vt.id.localeCompare(zt.id))}}).sort((R,F)=>R.name.localeCompare(F.name))}}).sort((u,r)=>u.name.localeCompare(r.name))},et=e=>{const s=new Map;return e.forEach(u=>{const r=Ae(u.originRegionZh,u.originRegionEn,"Other");s.set(r,[...s.get(r)||[],u])}),[...s.entries()].map(([u,r])=>({key:u,name:u,items:[...r].sort((l,c)=>l.destinationRegionEn.localeCompare(c.destinationRegionEn))})).sort((u,r)=>u.name.localeCompare(r.name))},St=v(()=>we(J.value)),Ct=v(()=>we(Q.value)),Rt=v(()=>et(J.value)),$t=v(()=>et(Q.value)),Ue=v(()=>`${x.value}:soon`),V=(e,s=!1)=>kt.value||(e in Re?Re[e]:s),Le=(e,s=!1)=>{Re[e]=!V(e,s)},tt=e=>{he.value=e,dt.setLocalLanguage(e)},N=e=>Number(e).toLocaleString("en-US"),Fe=e=>e==null?"â":N(e),Bt=e=>e?Me(e):"â",st=e=>{var s;return((s=e.match(/[T\s](\d{2}:\d{2}:\d{2})/))==null?void 0:s[1])??""},E=e=>A.value?e.nameZh:e.nameEn,X=e=>o.value[e],L=e=>`${e.asset}:${e.id}`,Et=e=>ie.resolve({name:"ReportSubscriptionContent",query:{asset_class:e.asset,item_id:e.id}}).href,Mt=e=>ie.resolve({name:"DemoReport",params:{reportType:e.asset},query:{lang:A.value?"zh":"en"}}).href,Tt=e=>({name:"ReportSubscriptionContent",query:{asset_class:e.asset,item_id:e.id}}),k=L,M=e=>_.value.some(s=>L(s)===L(e)),Ie=e=>e.subscriptionId!=null&&["expired","renewal_failed"].includes(e.status),Nt=e=>{h.value=e,e==="freight"?Promise.allSettled([B("ocean"),B("air")]):B(e)},Oe=e=>{Z.value=e,Promise.allSettled([B("ocean"),B("air")])},At=async()=>{I.value=!0,await qe()},Ze=v(()=>Z.value==="ocean"?"air":"ocean"),ge=e=>T[Ze.value].find(s=>s.id===e.id&&s.active)||null,Ut=e=>{ge(e)&&Oe(Ze.value)},lt=e=>Array.isArray(e)?String(e[0]||""):String(e||""),qe=async()=>{var e;await Pe(),(e=De.value)==null||e.scrollIntoView({behavior:"smooth",block:"start"})},nt=async(e=!0)=>{const s=lt(ae.query.asset_class).trim().toLowerCase(),u=lt(ae.query.item_id);if(!je(s)||!u.trim())return!1;I.value=!0,s==="ocean"||s==="air"?(h.value="freight",Z.value=s):h.value=s,s==="ocean"||s==="air"?await Promise.allSettled([B("ocean"),B("air")]):await B(s);const r=u.toUpperCase();let l=s,c=T[s].find(d=>d.id.toUpperCase()===r)||null;if((!c||!c.active)&&(s==="ocean"||s==="air")){const d=s==="ocean"?"air":"ocean",R=T[d].find(F=>F.id.toUpperCase()===r&&F.active)||null;R&&(c=R,l=d,Z.value=d)}if(c!=null&&c.active&&c.credits!=null){const d=k(c);l==="ocean"||l==="air"?K.value.includes(d)||(K.value=[...K.value,d]):D[l].includes(d)||(D[l]=[...D[l],d]),q.value=d}if(e&&await qe(),await Pe(),q.value){const d=[...document.querySelectorAll("[data-catalog-key]")].find(R=>R.dataset.catalogKey===q.value);d==null||d.scrollIntoView({behavior:"smooth",block:"center"}),window.setTimeout(()=>{q.value=null},3e3)}return!0},He=e=>{if(!e.active||e.credits==null||M(e))return;const s=k(e);U.value=U.value.includes(s)?U.value.filter(u=>u!==s):[...U.value,s]},ot=()=>ie.push({name:"SubscriptionPlans",query:{view:"credits"}}),fe=(e,s)=>{const u=s==null?void 0:s.data,r=Y((u==null?void 0:u.required_credits)??(u==null?void 0:u.required)??(u==null?void 0:u.credit_cost)??e),l=Y((u==null?void 0:u.current_credits)??(u==null?void 0:u.total_credits)??(u==null?void 0:u.available_credits)??(u==null?void 0:u.balance)??$.value);Se.value=r!=null&&l!=null?{requiredCredits:r,currentCredits:l}:null,ke.value=!0},Lt=e=>{e.subscriptionId!=null&&(p.value={type:"hide",title:o.value.hideTitle,body:o.value.hideBody,confirm:o.value.hideConfirm,target:e})},Ft=()=>{if(be.value){fe(oe.value);return}p.value={type:"subscribe",title:o.value.subscribeTitle,body:o.value.subscribeBody(H.value.length,N(oe.value)),confirm:o.value.subscribeConfirm}},Ve=e=>(e==null?void 0:e.tips)||o.value.operationFailed,It=e=>{const s=e[0];s&&(W!=null&&window.clearTimeout(W),w.success({content:o.value.subscribeSuccess(E(s),e.length),duration:3,class:"report-subscription-success-message"}),W=window.setTimeout(()=>{W=null,ie.push(Tt(s))},3e3))},Ot=async e=>{if(!(e.subscriptionId==null||e.autoRenew==null)){P.value=L(e);try{await us(e.subscriptionId,!e.autoRenew),await le(),w.success(o.value.operationSuccess)}catch(s){w.error(Ve(s))}finally{P.value=null}}},Zt=async e=>{if(Ie(e)){if(e.credits!=null&&$.value!=null&&e.credits>$.value){fe(e.credits);return}P.value=L(e);try{await rs(e.subscriptionId),await le(),p.value={type:"success",title:o.value.renewSuccessTitle,body:o.value.renewSuccessBody(X(e.asset),E(e)),confirm:o.value.done,target:e}}catch(s){s!=null&&s.insufficientCredits?fe(e.credits,s):w.error(Ve(s))}finally{P.value=null}}},qt=async()=>
1{if(!p.value)return;const e=p.value.type,s=p.value.target,u=e==="subscribe"?[...H.value]:[];ee.value=!0;try{e==="hide"&&(s==null?void 0:s.subscriptionId)!=null&&await as(s.subscriptionId),e==="subscribe"&&await is(H.value.map(r=>({asset_class:r.asset,item_id:r.id}))),p.value=null,h.value==="freight"?K.value=[]:D[x.value]=[],await le(),e==="subscribe"?It(u):w.success(o.value.operationSuccess)}catch(r){r!=null&&r.insufficientCredits&&e==="subscribe"?(p.value=null,fe(oe.value,r)):w.error(Ve(r))}finally{ee.value=!1}},Ht=()=>{var e;if(((e=p.value)==null?void 0:e.type)==="success"){p.value=null;return}qt()};ze([I,x],([e,s])=>{e&&B(s)}),ze(()=>[ae.query.asset_class,ae.query.item_id],()=>{nt()}),ze(p,e=>{e&&Pe(()=>{var s;return(s=Ke.value||Ge.value)==null?void 0:s.focus()})});const at=e=>{e.key==="Escape"&&!ee.value&&(p.value=null)};return Wt(async()=>{document.addEventListener("keydown",at);const e=await nt(!1);await le(),e&&await qe()}),Yt(()=>{document.removeEventListener("keydown",at),W!=null&&window.clearTimeout(W)}),(e,s)=>{var u,r;return a(),i("div",{class:y(["report-subscriptions-page",{"has-credit-warning":Ne.value,"is-english":!A.value}])},[Ne.value?(a(),i("div",{key:0,class:y(["credit-bar",j.value])},[j.value==="danger"?(a(),i("svg",cs,[...s[13]||(s[13]=[t("circle",{cx:"12",cy:"12",r:"10"},null,-1),t("line",{x1:"12",y1:"8",x2:"12",y2:"12"},null,-1),t("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"},null,-1)])])):(a(),i("svg",ds,[...s[14]||(s[14]=[t("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},null,-1),t("line",{x1:"12",y1:"9",x2:"12",y2:"13"},null,-1),t("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"},null,-1)])])),t("span",null,n(gt.value),1),t("button",{type:"button",onClick:ot},n(o.value.topUp)+" â",1)],2)):b("",!0),t("div",{class:y(["lang-switch",{en:!A.value}]),role:"tablist","aria-label":"Language"},[s[15]||(s[15]=t("span",{class:"lang-pill"},null,-1)),t("button",{type:"button",class:y({active:A.value}),onClick:s[0]||(s[0]=l=>tt("zh"))},"䏿",2),t("button",{type:"button",class:y({active:!A.value}),onClick:s[1]||(s[1]=l=>tt("en"))},"EN",2)],2),t("div",vs,[t("img",{class:"page-logo",src:S(ts),alt:S(es)},null,8,ps),t("p",ys,n(o.value.tag),1),_e.value?(a(),i("div",bs,n(o.value.loadingOverview),1)):xe.value?(a(),i("div",gs,[t("span",null,n(o.value.overviewError),1),t("button",{type:"button",onClick:le},n(o.value.retry),1)])):(a(),i("section",fs,[t("div",hs,[t("div",ms,[t("h2",null,n(o.value.mySubsTitle),1),t("span",_s,n(_.value.length),1)]),t("p",null,n(o.value.mySubsSub),1)]),_.value.length?(a(),i(m,{key:0},[t("div",xs,[(a(!0),i(m,null,C(ht.value,l=>(a(),i("button",{key:l.key,type:"button",class:y({active:O.value===l.key}),onClick:c=>O.value=l.key},[g(n(l.label)+" ",1),t("span",null,n(l.count),1)],10,ks))),128))]),t("div",Ss,[t("table",Cs,[t("thead",null,[t("tr",null,[t("th",null,n(o.value.colReport),1),t("th",Rs,n(o.value.colType),1),t("th",null,n(o.value.colCredits),1),t("th",$s,n(o.value.colExpiresAt),1),t("th",Bs,n(o.value.colActions),1)])]),t("tbody",null,[(a(!0),i(m,null,C(ft.value,l=>(a(),i("tr",{key:L(l)},[t("td",null,[t("div",Es,[t("span",{class:y(["asset-icon",l.asset])},[l.asset==="futures"?(a(),i("svg",Ms,[...s[16]||(s[16]=[t("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"},null,-1),t("polyline",{points:"16 7 22 7 22 13"},null,-1)])])):l.asset==="forex"?(a(),i("svg",Ts,[...s[17]||(s[17]=[t("path",{d:"M7 16V4m0 0L3 8m4-4l4 4"},null,-1),t("path",{d:"M17 8v12m0 0l4-4m-4 4l-4-4"},null,-1)])])):l.asset==="ocean"?(a(),i("svg",Ns,[...s[18]||(s[18]=[t("path",{d:"M3 17h18M2 12.5c2-2 4 0 6 0s4-2 6 0 4 2 4 2"},null,-1),t("path",{d:"M4 8h8l2-4 2 4h4"},null,-1)])])):(a(),i("svg",As,[...s[19]||(s[19]=[t("path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21 4 19 2c-2-2-4-2-5.5-.5L10 5 1.8 6.2c-.5.1-.9.5-.8 1.1l1 4a1 1 0 0 0 .5.6l3.5 2L5 17l2 2 3.5-1 2 3.5c.2.3.5.5.9.5h.1c.6 0 1-.4 1.1-.8l1.2-8.2z"},null,-1)])]))],2),t("strong",null,n(E(l)),1)])]),t("td",Us,[t("span",{class:y(["asset-badge",l.asset])},n(X(l.asset)),3)]),t("td",Ls,[g(n(Fe(l.credits))+" ",1),l.credits!=null?(a(),i("small",Fs,n(o.value.perMonth),1)):b("",!0)]),t("td",Is,[t("time",{class:"expiry-value",datetime:l.expiresAt},[t("span",null,n(Bt(l.expiresAt)),1),st(l.expiresAt)?(a(),i("small",Zs,n(st(l.expiresAt)),1)):b("",!0)],8,Os)]),t("td",qs,[t("div",Hs,[l.subscriptionId!=null&&l.autoRenew!=null&&!Ie(l)?(a(),i("button",{key:0,class:"renewal-switch",type:"button",role:"switch","aria-checked":l.autoRenew,"aria-label":l.autoRenew?o.value.autoRenewOn:o.value.autoRenewOff,disabled:P.value===L(l),onClick:c=>Ot(l)},[t("span",{class:y(["renewal-switch-track",{enabled:l.autoRenew}])},[...s[20]||(s[20]=[t("span",null,null,-1)])],2),t("span",zs,n(l.autoRenew?o.value.autoRenewOn:o.value.autoRenewOff),1)],8,Vs)):Ie(l)?(a(),i("button",{key:1,class:"renew-action",type:"button",disabled:P.value===L(l),onClick:c=>Zt(l)},n(o.value.renew),9,Ps)):(a(),i("span",Ds,"â")),t("a",{href:Et(l),target:"_blank",rel:"noopener"},[g(n(o.value.openReport)+" ",1),s[21]||(s[21]=t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),t("polyline",{points:"15 3 21 3 21 9"}),t("line",{x1:"10",y1:"14",x2:"21",y2:"3"})],-1))],8,Ks),l.subscriptionId!=null?(a(),i("button",{key:3,class:"delete-report",type:"button",title:o.value.deleteReport,onClick:c=>Lt(l)},[s[22]||(s[22]=t("svg",{viewBox:"0 0 24 24"},[t("polyline",{points:"3 6 5 6 21 6"}),t("path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"}),t("path",{d:"M10 11v6M14 11v6M9 6V4h6v2"})],-1)),t("span",Ws,n(o.value.deleteReport),1)],8,Gs)):(a(),i("span",Ys,"â"))])])]))),128))])])]),t("div",js,[t("span",null,n(o.value.monthlyCost),1),t("b",null,[g(n(Fe(Be.value))+" ",1),Be.value!=null?(a(),i(m,{key:0},[g(n(o.value.creditsUnit),1)],64)):b("",!0)])])],64)):(a(),i("div",Js,[s[23]||(s[23]=t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M9 11l3 3L22 4"}),t("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})],-1)),t("p",null,n(o.value.mySubsEmpty),1),t("button",{type:"button",onClick:At},n(o.value.mySubsEmptyCta),1)]))])),t("section",{ref_key:"addSectionRef",ref:De,class:y(["fold-card add-section",{open:I.value}])},[t("button",{class:"fold-head",type:"button",onClick:s[2]||(s[2]=l=>I.value=!I.value)},[s[24]||(s[24]=t("span",{class:"fold-head-icon"},[t("svg",{viewBox:"0 0 24 24"},[t("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),t("line",{x1:"5",y1:"12",x2:"19",y2:"12"})])],-1)),t("span",Qs,[t("strong",null,n(o.value.addTitle),1),t("small",null,n(o.value.addSub),1)]),s[25]||
1(s[25]=t("svg",{class:"fold-chevron",viewBox:"0 0 24 24"},[t("polyline",{points:"6 9 12 15 18 9"})],-1))]),I.value?(a(),i("div",Xs,[t("div",ws,[(a(!0),i(m,null,C(mt.value,l=>(a(),i("button",{key:l.key,type:"button",class:y({active:h.value===l.key}),onClick:c=>Nt(l.key)},n(l.label),11,el))),128))]),t("div",tl,[t("div",sl,[h.value==="freight"?(a(),i("div",ll,[t("button",{type:"button",class:y({active:Z.value==="ocean"}),onClick:s[3]||(s[3]=l=>Oe("ocean"))},n(o.value.ocean),3),t("button",{type:"button",class:y({active:Z.value==="air"}),onClick:s[4]||(s[4]=l=>Oe("air"))},n(o.value.air),3)])):b("",!0),t("label",nl,[s[26]||(s[26]=t("svg",{viewBox:"0 0 24 24"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})],-1)),jt(t("input",{"onUpdate:modelValue":s[5]||(s[5]=l=>pe.value=l),type:"text",placeholder:_t.value},null,8,ol),[[Jt,pe.value]])]),G[x.value]?(a(),i("div",al,n(o.value.loadingCatalog),1)):se[x.value]?(a(),i("div",il,[t("div",null,n(o.value.catalogError),1),t("button",{type:"button",onClick:s[6]||(s[6]=l=>B(x.value,!0))},[s[27]||(s[27]=t("svg",{viewBox:"0 0 24 24"},[t("polyline",{points:"23 4 23 10 17 10"}),t("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})],-1)),g(" "+n(o.value.retry),1)])])):J.value.length?(a(),i(m,{key:3},[t("div",ul,[g(n(o.value.availableNow)+" ",1),t("span",null,n(J.value.length),1)]),h.value==="futures"?(a(!0),i(m,{key:0},C(St.value,l=>(a(),i("div",{key:l.key,class:"avail-group"},[t("div",rl,[g(n(l.name)+" ",1),t("span",cl,n(l.items.length)+" "+n(o.value.symbolsUnit),1)]),(a(!0),i(m,null,C(l.sectors,c=>(a(),i("div",{key:c.key,class:"category-group"},[t("div",dl,[s[28]||(s[28]=t("span",{class:"cat-dot"},null,-1)),g(n(c.name),1)]),t("div",vl,[(a(!0),i(m,null,C(c.items,d=>(a(),i("button",{key:S(k)(d),type:"button","data-catalog-key":S(k)(d),disabled:M(d)||d.credits==null,class:y(["symbol-chip",{selected:U.value.includes(S(k)(d)),owned:M(d),disabled:d.credits==null,"deeplink-flash":q.value===S(k)(d)}]),onClick:R=>He(d)},[t("span",null,n(E(d)),1),t("small",yl,n(d.code),1),M(d)?(a(),i("span",bl,[s[29]||(s[29]=t("svg",{viewBox:"0 0 24 24"},[t("polyline",{points:"20 6 9 17 4 12"})],-1)),g(n(o.value.subscribed),1)])):b("",!0)],10,pl))),128))])]))),128))]))),128)):h.value==="forex"?(a(),i("div",gl,[(a(!0),i(m,null,C(J.value,l=>(a(),i("button",{key:S(k)(l),type:"button","data-catalog-key":S(k)(l),disabled:M(l)||l.credits==null,class:y(["forex-pair",{selected:U.value.includes(S(k)(l)),owned:M(l),disabled:l.credits==null,"deeplink-flash":q.value===S(k)(l)}]),onClick:c=>He(l)},[s[32]||(s[32]=t("span",{class:"forex-pair-icon"},[t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M7 16V4m0 0L3 8m4-4l4 4"}),t("path",{d:"M17 8v12m0 0l4-4m-4 4l-4-4"})])],-1)),t("span",hl,[t("strong",null,[g(n(l.base)+" â "+n(l.quote)+" ",1),M(l)?(a(),i("span",ml,[s[30]||(s[30]=t("svg",{viewBox:"0 0 24 24"},[t("polyline",{points:"20 6 9 17 4 12"})],-1)),g(n(o.value.subscribed),1)])):b("",!0)]),t("small",null,n(E(l)),1),l.credits!=null?(a(),i("em",_l,[s[31]||(s[31]=t("svg",{viewBox:"0 0 24 24"},[t("circle",{cx:"12",cy:"12",r:"9"}),t("path",{d:"M12 7v10M9.5 9.5h4a1.5 1.5 0 0 1 0 3h-3a1.5 1.5 0 0 0 0 3h4"})],-1)),g(" "+n(N(l.credits))+" "+n(o.value.perMonth),1)])):b("",!0)]),s[33]||(s[33]=t("span",{class:"forex-pair-arrow"},[t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M9 18l6-6-6-6"})])],-1))],10,fl))),128))])):(a(!0),i(m,{key:2},C(Rt.value,l=>(a(),i("div",{key:l.key,class:"avail-group"},[t("div",xl,[g(n(l.name)+" ",1),t("span",kl,n(l.items.length)+" "+n(o.value.routesUnit),1)]),t("div",Sl,[(a(!0),i(m,null,C(l.items,c=>(a(),i("button",{key:S(k)(c),type:"button","data-catalog-key":S(k)(c),disabled:M(c)||c.credits==null,class:y(["symbol-chip",{selected:U.value.includes(S(k)(c)),owned:M(c),disabled:c.credits==null,"deeplink-flash":q.value===S(k)(c)}]),onClick:d=>He(c)},[t("span",null,n(E(c)),1),M(c)?(a(),i("span",Rl,[s[34]||(s[34]=t("svg",{viewBox:"0 0 24 24"},[t("polyline",{points:"20 6 9 17 4 12"})],-1)),g(n(o.value.subscribed),1)])):b("",!0)],10,Cl))),128))])]))),128))],64)):b("",!0),!G[x.value]&&!se[x.value]&&Q.value.length?(a(),i("div",{key:4,class:y(["exchange-group soon-panel",{open:V(Ue.value)}])},[t("button",{class:"group-head soon-master",type:"button",onClick:s[7]||(s[7]=l=>Le(Ue.value))},[t("span",null,[g(n(o.value.comingSoonZone)+" ",1),t("b",null,n(Q.value.length),1),s[35]||(s[35]=g()),t("small",null,"· "+n(o.value.comingSoonHint),1)]),s[36]||(s[36]=t("svg",{class:"group-chevron",viewBox:"0 0 24 24"},[t("polyline",{points:"6 9 12 15 18 9"})],-1))]),V(Ue.value)?(a(),i("div",$l,[h.value==="futures"?(a(!0),i(m,{key:0},C(Ct.value,l=>(a(),i("div",{key:l.key,class:y(["exchange-group",{open:V(`futures:soon:${l.key}`)}])},[t("button",{class:"group-head",type:"button",onClick:c=>Le(`futures:soon:${l.key}`)},[t("span",El,n(l.name),1),t("span",Ml,n(l.items.length)+" "+n(o.value.symbolsUnit),1),s[37]||(s[37]=t("svg",{class:"group-chevron",viewBox:"0 0 24 24"},[t("polyline",{points:"6 9 12 15 18 9"})],-1))],8,Bl),V(`futures:soon:${l.key}`)?(a(),i("div",Tl,[(a(!0),i(m,null,C(l.sectors,c=>(a(),i("div",{key:c.key,class:"category-group"},[t("div",Nl,[s[38]||(s[38]=t("span",{class:"cat-dot"},null,-1)),g(n(c.name),1)]),t("div",Al,[(a(!0),i(m,null,C(c.items,d=>(a(),i("button",{key:S(k)(d),type:"button",class:"symbol-chip disabled",disabled:""},[t("span",null,n(E(d)),1),t("small",Ul,n(d.code),1),t("em",null,n(o.value.comingSoon),1)]))),128))])]))),128))])):b("",!0)],2))),128)):h.value==="forex"?(a(),i("div",Ll,[(a(!0),i(m,null,C(Q.value,l=>(a(),i("div",{key:S(k)(l),class:"forex-pair disabled"},[s[39]||(s[39]=t("span",{class:"forex-pair-icon"},[t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M7 16V4m0 0L3 8m4-4l4 4"}),t("path",{d:"M17 8v12m0 0l4-4m-4 4l-4-4"})])],-1)),t("span",Fl,[t("strong",null,[g(n(l.base)+" â "+n(l.quote)+" ",1),t("span",Il,n(o.value.comingSoon),1)]),t("small",null,n(E(l)),1)]),s[40]||(s[40]=t("span",{class:"forex-pair-arrow"},[t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M9 18l6-6-6-6"})])],-1))]))),128))])):(a(!0),i(m,{key:2},C($t.value,l=>(a(),i("div",{key:l.key,class:y(["exchange-group",{open:V(`${x.value}:soon:${l.key}`)}])},[t("button",{class:"group-head",type:"button",onClick:c=>Le(`${x.value}:soon:${l.key}`)},[t("span",Zl,n(l.name),1),t("span",ql,n(l.items.length)+" "+n(o.value.routesUnit),1),s[41]||(s[41]=t("svg",{class:"group-chevron",viewBox:"0 0 24 24"},[t("polyline",{points:"6 9 12 15 18 9"})],-1))],8,Ol),V(`${x.value}:soon:${l.key}`)?(a(),i("div",Hl,[t("div",Vl,[(a(!0),i(m,null,C(l.items,c=>(a(),i("button",{key:S(k)(c),type:"button",class:y(["symbol-chip disabled",{"alt-mode-available":ge(c)}]),disabled:!ge(c),onClick:d=>Ut(c)},[t("span",null,n(E(c)),1),ge(c)?(a(),i("em",Pl,n(o.value.availableUnder(X(Ze.value))),1)):(a(),i("em",Dl,n(o.value.comingSoon),1))],10,zl))),128))])])):b("",!0)],2))),128))])):b("",!0)],2)):b("",!0),!G[x.value]&&!se[x.value]&&!J.value.length&&!Q.value.length?(a(),i("div",Kl,n(xt.value),1)):b("",!0),H.value.length?(a(),i("div",Gl,[t("div",null,[t("span",null,n(o.value.selectedCount(H.value.length)),1),t("strong",{class:y({over:be.value})},[g(n(o.value.costLabel(N(oe.value)))+" ",1),be.value?(a(),i("small",Wl,"· "+n(o.value.insufficientInline),1)):b("",!0)],2)]),t("button",{type:"button",onClick:Ft},[s[42]||(s[42]=t("svg",{viewBox:"0 0 24 24"},[t("polyline",{points:"20 6 9 17 4 12"})],-1)),g(" "+n(be.value?o.value.subscribeUnaffordable:o.value.addSelected(H.value.length)),1)])])):b("",!0)])])])):b("",!0)],2),t("section",{class:y(["fold-card",{open:ue.value}])},[t("button",{class:"fold-head",type:"button",onClick:s[8]||(s[8]=l=>ue.value=!ue.value)},[s[43]||(s[43]=t("span",{class:"fold-head-icon trial"},[t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7z"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",Yl,[t("strong",null,n(o.value.samplesTitle),1),t("small",null,n(o.value.samplesSub),1)]),s[44]||(s[44]=t("svg",{class:"fold-chevron",viewBox:"0 0 24 24"},[t("polyline",{points:"6 9 12 15 18 9"})],-1))]),ue.value?(a(),i("div",jl,[(a(),i(m,null,C(vt,l=>t("a",{key:`${l.asset}:${l.itemId}`,href:Mt(l),target:"_blank",rel:"noopener",class:"sample-card"},[t("span",{class:y(["asset-badge",l.asset])},n(X(l.asset)),3),t("strong",null,n(E(l)),1),t("span",Ql,[t("small",null,n(N(l.credits))+" "+n(o.value.perMonth),1),t("b",null,[g(n(o.value.viewSample)+" ",1),s[45]||(s[45]=t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),t("polyline",{points:"15 3 21 3 21 9"}),t("line",{x1:"10",y1:"14",x2:"21",y2:"3"})],-1))])])],8,Jl)),64))])):b("",!0)],2),$.value!=null?(a(),i("section",{key:3,class:y(["account-card",{open:me.value}])},[t("button",{class:"account-summary",type:"button",title:o.value.acctDetailsHint,onClick:s[9]||(s[9]=l=>me.value=!me.value)},[t("span",{class:y(["account-dot",j.value])},null,2),t("strong",null,[g(n(N($.value))+" ",1),t("small",null,n(o.value.creditsUnit),1)]),re.value?(a(),i("span",wl,n(re.value),1)):b("",!0),Ne.value?(a(),i("em",{key:1,class:y(j.value)},n(bt.value),3)):b("",!0),s[46]||(s[46]=t("svg",{viewBox:"0 0 24 24"},[t("polyline",{points:"6 9 12 15 18 9"})],-1))],8,Xl),t("div",en,[t("div",tn,[t("div",sn,[t("span",null,[t("small",null,n(o.value.nearestExpiry),1),t("strong",null,n(yt.value||Ee.value||"â"),1)]),t("span",null,[t("small",null,n(o.value.currentSubscriptionCredits),1),t("strong",null,[g(n(Fe(ve.value))+" ",1),ve.value!=null?(a(),i(m,{key:0},[g(n(o.value.creditsUnit),1)],64)):b("",!0)])]),t("span",null,[t("small",null,n(o.value.activeSubs),1),t("strong",null,n(_.value.length)+" "+n(o.value.itemsUnit),1)])]),t("button",{class:"top-up-btn",type:"button",onClick:ot}
1,"ï¼ "+n(o.value.topUp),1),Te.value?(a(),i("div",ln,[s[47]||(s[47]=t("svg",{viewBox:"0 0 24 24"},[t("circle",{cx:"12",cy:"12",r:"10"}),t("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),t("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})],-1)),t("span",null,[t("strong",null,n(o.value.lowCreditTitle),1),g(n(o.value.lowCreditBody),1)])])):b("",!0),ne.value>0?(a(),i("div",nn,[s[48]||(s[48]=t("svg",{viewBox:"0 0 24 24"},[t("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),t("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),t("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})],-1)),t("span",null,[t("strong",null,n(o.value.warnNextTitle),1),Ee.value?(a(),i(m,{key:0},[g(n(o.value.warnNextBody(N(ne.value),Ee.value)),1)],64)):b("",!0)])])):b("",!0)])])],2)):b("",!0)]),Qt(ls,{visible:ke.value,"onUpdate:visible":s[10]||(s[10]=l=>ke.value=l),"required-credits":(u=Se.value)==null?void 0:u.requiredCredits,"current-credits":(r=Se.value)==null?void 0:r.currentCredits},null,8,["visible","required-credits","current-credits"]),p.value?(a(),i("div",{key:1,class:"modal-backdrop",onClick:s[12]||(s[12]=Xt(l=>p.value=null,["self"]))},[t("div",on,[t("div",{class:y(["modal-icon",p.value.type])},[p.value.type==="hide"?(a(),i("svg",an,[...s[49]||(s[49]=[t("polyline",{points:"3 6 5 6 21 6"},null,-1),t("path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"},null,-1),t("path",{d:"M10 11v6M14 11v6M9 6V4h6v2"},null,-1)])])):(a(),i("svg",un,[...s[50]||(s[50]=[t("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},null,-1),t("polyline",{points:"22 4 12 14.01 9 11.01"},null,-1)])]))],2),t("h3",null,n(p.value.title),1),t("p",null,n(p.value.body),1),p.value.target?(a(),i("div",rn,[t("span",{class:y(["asset-icon",p.value.target.asset])},[p.value.target.asset==="futures"?(a(),i("svg",cn,[...s[51]||(s[51]=[t("polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17"},null,-1),t("polyline",{points:"16 7 22 7 22 13"},null,-1)])])):p.value.target.asset==="forex"?(a(),i("svg",dn,[...s[52]||(s[52]=[t("path",{d:"M7 16V4m0 0L3 8m4-4l4 4"},null,-1),t("path",{d:"M17 8v12m0 0l4-4m-4 4l-4-4"},null,-1)])])):p.value.target.asset==="ocean"?(a(),i("svg",vn,[...s[53]||(s[53]=[t("path",{d:"M3 17h18M2 12.5c2-2 4 0 6 0s4-2 6 0 4 2 4 2"},null,-1),t("path",{d:"M4 8h8l2-4 2 4h4"},null,-1)])])):(a(),i("svg",pn,[...s[54]||(s[54]=[t("path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21 4 19 2c-2-2-4-2-5.5-.5L10 5 1.8 6.2c-.5.1-.9.5-.8 1.1l1 4a1 1 0 0 0 .5.6l3.5 2L5 17l2 2 3.5-1 2 3.5c.2.3.5.5.9.5h.1c.6 0 1-.4 1.1-.8l1.2-8.2z"},null,-1)])]))],2),t("span",null,[t("strong",null,n(E(p.value.target)),1),t("small",null,[g(n(X(p.value.target.asset))+" ",1),p.value.target.credits!=null?(a(),i(m,{key:0},[g(" · "+n(N(p.value.target.credits))+" "+n(o.value.perMonth),1)],64)):b("",!0)])])])):b("",!0),t("div",{class:y(["modal-actions",{single:p.value.type==="success"}])},[p.value.type!=="success"?(a(),i("button",{key:0,ref_key:"modalCancelRef",ref:Ke,type:"button",onClick:s[11]||(s[11]=l=>p.value=null)},n(o.value.cancel),513)):b("",!0),t("button",{ref_key:"modalPrimaryRef",ref:Ge,type:"button",class:y(p.value.type),disabled:ee.value,onClick:Ht},n(ee.value?o.value.processing:p.value.confirm),11,yn)],2)])])):b("",!0)],2)}}}),Rn=ss(bn,[["__scopeId","data-v-72dd5db9"]]);export{Rn 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.