PageSourceSearch

https://app.horizontrading.ai/_next/static/chunks/8799-5aef6b1e7463d8d9.js

js horizontrading.ai collected 2026-10-02 00:06:42 UTC 5,869 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8799],{3303:(t,e,n)=>{n.d(e,{L:()=>d});var r=n(95155),a=n(12115),o=n(35299),i=n(17181),l=n(18720),c=n(21032),u=n(92116);async function s(){try{var t;let{supabaseAuth:e}=await Promise.resolve().then(n.bind(n,19876)),{data:{session:r}}=await e.auth.getSession();return null!=(t=null==r?void 0:r.access_token)?t:null}catch(t){return null}}function d(t){let{grade:e,threadId:n,backtestId:d,preview:f,surface:h,compact:p=!1,className:w=""}=t,[g,m]=(0,a.useState)(!1);if(!(0,c.ND)(e)||!n&&!d)return null;async function v(t){if(t.stopPropagation(),t.preventDefault(),!g){m(!0);try{var r,a;let t=await s(),o=await fetch("/api/share",{method:"POST",headers:{"Content-Type":"application/json",...t?{Authorization:"Bearer ".concat(t)}:{}},body:JSON.stringify({threadId:n,backtestId:d})}),i=await o.json().catch(()=>null);if(!o.ok||!(null==i?void 0:i.token))return void l.oR.error((null==i?void 0:i.error)||"Could not create the share link");let p=(0,c.B)(i.token,window.location.origin);(0,u.at)("grade_card_shared",{surface:h,grade:e,reused:!!i.reused});let w=f?(0,c.Lu)({...f,grade:e},p):p,g=(0,c.rK)(p);if("undefined"!=typeof navigator&&navigator.share&&(null==(r=(a=navigator).canShare)?void 0:r.call(a,g)))try{await navigator.share(g);return}catch(t){}await navigator.clipboard.writeText(g.url),l.oR.success("Share link copied",{description:"Anyone with the link sees your card.",action:{label:"Post on X",onClick:()=>window.open("https://x.com/intent/tweet?text=".concat(encodeURIComponent(w)),"_blank","noopener,noreferrer")}})}catch(t){l.oR.error("Could not create the share link")}finally{m(!1)}}}return(0,r.jsxs)("button",{type:"button",onClick:v,disabled:g,title:"Share this card","aria-label":"Share this card",className:"inline-flex cursor-pointer items-center gap-1 font-medium text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50 ".concat(w),children:[g?(0,r.jsx)(o.A,{className:"h-3 w-3 animate-spin"}):(0,r.jsx)(i.A,{className:"h-3 w-3"}),!p&&"Share"]})}},21032:(t,e,n)=>{n.d(e,{B:()=>c,Lu:()=>i,ND:()=>a,rK:()=>l});var r=n(59761);function a(t){return!!t&&r.Rn[t]>=r.Rn.B}function o(t){return"".concat(t>=0?"+":"").concat(t.toFixed(1),"%")}function i(t,e){let n=function(t){let e=[];return null!=t.profitFactor&&isFinite(t.profitFactor)&&e.push("PF ".concat(t.profitFactor.toFixed(2))),null!=t.trades&&e.push("".concat(t.trades," trades")),null!=t.winRate&&e.push("".concat(t.winRate.toFixed(0),"% win")),null!=t.maxDrawdownPct&&e.push("".concat(Math.abs(t.maxDrawdownPct).toFixed(1),"% max DD")),e}(t),r=n.length>0?"".concat(o(t.returnPct)," \xb7 ").concat(n.join(" \xb7 ")):o(t.returnPct);return["".concat(t.symbol," ").concat(t.timeframe," just graded ").concat(t.grade," on Horizon."),r,e].join("\n")}function l(t){return{url:t}}function c(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://app.horizontrading.ai";return"".concat(e.replace(/\/$/,""),"/s/").concat(t)}r.s6.S,r.s6.A,r.s6.B,r.s6.C,r.s6.D,r.s6.F},40105:(t,e,n)=>{n.d(e,{j:()=>i});var r=n(95155),a=n(83932),o=n(93089);function i(t){let{backtestId:e,className:n=""}=t,i=(0,a.S)(e);return i?(0,r.jsx)("span",{className:n,children:(0,o.Mh)(i)}):null}},83932:(t,e,n)=>{n.d(e,{S:()=>h,g:()=>p});var r=n(12115),a=n(93089);let o=new Map,i=new Map,l=new Set,c=!1;function u(t,e){var n;for(let r of(o.set(t,e),null!=(n=i.get(t))?n:[]))r(e)}async function s(){c=!1;let t=[...l];if(l.clear(),0!==t.length)try{let{supabaseAuth:e}=await Promise.resolve().then(n.bind(n,19876)),{data:{session:r}}=await e.auth.getSession();if(!(null==r?void 0:r.access_token))return void t.forEach(t=>u(t,null));for(let e=0;e<t.length;e+=100){let n=t.slice(e,e+100);try{let t=await fetch("/api/backtest-rarity",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(r.access_token)},body:JSON.stringify({ids:n})});if(!t.ok)throw Error("rarity lookup failed: ".concat(t.status));let e=await t.json(),o=new Map;for(let t of Array.isArray(null==e?void 0:e.rarities)?e.rarities:[]){let e=(0,a.CA)(t);e&&o.set(e.backtestId,e)}n.forEach(t=>{var e;return u(t,null!=(e=o.get(t))?e:null)})}
1catch(t){n.forEach(t=>u(t,null))}}}catch(e){t.forEach(t=>u(t,null))}}function d(t){l.add(t),c||(c=!0,setTimeout(()=>{s()},0))}function f(t){return null!=t&&Number.isSafeInteger(t)&&t>0}function h(t){var e;let[n,a]=(0,r.useState)(f(t)&&null!=(e=o.get(t))?e:null);return(0,r.useEffect)(()=>{var e,n;if(!f(t))return void a(null);if(o.has(t))return void a(null!=(e=o.get(t))?e:null);a(null);let r=null!=(n=i.get(t))?n:new Set;return r.add(a),i.set(t,r),d(t),()=>{r.delete(a),0===r.size&&i.delete(t)}},[t]),n}function p(t){let e=[...new Set(t.filter(f))].sort((t,e)=>t-e).join(","),n=(0,r.useMemo)(()=>e?e.split(",").map(Number):[],[e]),[a,l]=(0,r.useState)(()=>new Map(n.filter(t=>o.has(t)).map(t=>{var e;return[t,null!=(e=o.get(t))?e:null]})));return(0,r.useEffect)(()=>{var t,e;let r=new Map;for(let e of n)o.has(e)&&r.set(e,null!=(t=o.get(e))?t:null);l(r);let a=[];for(let t of n){if(o.has(t))continue;let n=e=>{l(n=>{let r=new Map(n);return r.set(t,e),r})},r=null!=(e=i.get(t))?e:new Set;r.add(n),i.set(t,r),d(t),a.push(()=>{r.delete(n),0===r.size&&i.delete(t)})}return()=>a.forEach(t=>t())},[n]),a}},93089:(t,e,n)=>{function r(t){let e="number"==typeof t?t:Number(t);return Number.isFinite(e)&&e>0?e:null}function a(t){if(!t||"object"!=typeof t)return null;let e=r(t.backtestId),n=r(t.topPercent),a=r(t.modelVersion);return null!==e&&Number.isInteger(e)&&null!==n&&!(n>100)&&null!==a&&Number.isInteger(a)?{backtestId:e,topPercent:n,modelVersion:a}:null}function o(t){var e=t.topPercent;if(!Number.isFinite(e)||e<=0)return"";let n=Math.min(100,e);return n<.1?"Top ".concat(n.toFixed(2),"%"):n<10?"Top ".concat(n.toFixed(1),"%"):"Top ".concat(Math.round(n),"%")}n.d(e,{CA:()=>a,Mh:()=>o})}}]);

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.