PageSourceSearch

https://www.deribit.com/assets/Overlays-M-2jz6Yx.js

js deribit.com collected 2026-09-24 09:24:23 UTC 5,295 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`3dcc281a8e79fff17adf3e75579634b27b7debb6`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`5b505942-480e-40f9-ae53-b5006d893244`,e._sentryDebugIdIdentifier=`sentry-dbid-5b505942-480e-40f9-ae53-b5006d893244`)})()}catch{}import{s as e}from"./rolldown-runtime-Dm_dodAQ.js";import{A as t,k as n,n as r}from"./dist-kP4lwCLB.js";import{$a as i,A as a,D as o,Fr as s,Td as c,Ut as l,Vr as u,kn as d,ln as f,zr as p}from"./formatInstrumentName-BdL2ER9e.js";import{At as m,b as h,gt as g,w as _}from"./settings-TfkyLzTl.js";import{f as v}from"./Dialog-D2e7T0j5.js";import{l as y}from"./Autocomplete-BPZFKHlc.js";import{t as b}from"./withStyles-DHmX0L0V.js";var x={write:!1,read:!1},userTradeRightsSelector=e=>e.user.scope.trade??x,userWalletRightsSelector=e=>e.user.scope.wallet??x,userAccountRightsSelector=e=>e.user.scope.account??x,userBlockTradeRightsSelector=e=>e.user.scope.block_trade??x,blockRfqScopeSelector=e=>e.user.scope.block_rfq??x,S=t(),C=e(n()),w=v(({palette:e})=>{let t={position:`absolute`,top:0,right:0,bottom:0,left:0},n={...t,background:e.background.paper,borderRadius:`4px`,opacity:.7},r={position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,borderRadius:`3px`,color:({mainColor:e})=>e};return{noAccessOverlay:{...t,zIndex:100,"& > div:first-child":{...n,zIndex:1},"& > div:last-child":{...r,zIndex:1}},selectInstrumentOverlay:{...t,zIndex:5,"& > div:first-child":{...n,zIndex:1},"& > div:last-child":{...r,zIndex:1,color:e.text.secondary}},fullScreenOverlay:{...t,zIndex:200,"& > div:first-child":{...n,zIndex:2},"& > div:last-child":{...r,zIndex:2,fontSize:`16px`}},loadingOverlay:{...t,zIndex:90,"& > div:first-child":{...n,zIndex:90,"&$solid":{opacity:1}},"& > div:last-child":{...r,zIndex:90,fontSize:`16px`}},solid:{},centeredText:{height:`100%`,display:`flex`,justifyContent:`center`,alignItems:`center`}}}),useOverlaysStyles=(e={})=>w(e),T=(0,C.memo)(e=>{let t=l(),n=useOverlaysStyles({mainColor:t.palette.dsColors.primary[200]});return(e.username||e.username===void 0)&&(e.scopePermission||e.scopePermission===void 0)||e.loginOverlay===!1?null:(0,S.jsx)(i,{theme:t,children:(0,S.jsxs)(`div`,{className:n.noAccessOverlay,children:[(0,S.jsx)(`div`,{}),(0,S.jsx)(`div`,{children:e.username||e.username===void 0?(0,S.jsx)(r,{id:`commonScreen.common.notEnoughPermissions`}):(0,S.jsx)(p,{variant:`gray`,size:`sm`,onClick:()=>_.open({type:h.login}),children:(0,S.jsx)(r,{id:`tradeScreen.userMenu.login`})})})]})})}),CustomMessageOverlay=e=>{let t=useOverlaysStyles();return(0,S.jsxs)(`div`,{className:f(t.selectInstrumentOverlay),children:[(0,S.jsx)(`div`,{style:e.solid?{opacity:1}:void 0}),(0,S.jsx)(`div`,{children:e.message||`custom message`})]})},SelectInstrumentOverlay=e=>{let{instrument:t}=e,n=useOverlaysStyles(),i=d(m);return t&&i[t]?null:(0,S.jsxs)(`div`,{className:n.selectInstrumentOverlay,children:[(0,S.jsx)(`div`,{}),(0,S.jsx)(`div`,{children:t?(0,S.jsx)(r,{values:{instrument:t},id:`commonScreen.common.instrumentHasExpired`}):(0,S.jsx)(r,{id:`commonScreen.common.selectInstrument`})})]})},UnsupportedCurrencyOverlay=({currency:e=`USDC`})=>{let t=useOverlaysStyles();return(0,S.jsx)(`div`,{className:t.centeredText,children:(0,S.jsx)(r,{values:{currency:e},id:`commonScreen.common.currencyNotSupported`})})},NoPositionsForOverlay=()=>{let e=useOverlaysStyles();return(0,S.jsx)(`div`,{className:e.centeredText,children:(0,S.jsx)(r,{id:`commonScreen.common.noPositionsForCurrency`})})},EnablePortfolioMarginOverlay=({currency:e,isCrossCollateralEnabled:t})=>{let n=useOverlaysStyles(),i=t?(0,S.jsx)(r,{id:`accountScreen.changeMargin.standardMarginCross`}):(0,S.jsx)(r,{id:`accountScreen.changeMargin.standardMarginSegregated`});return(0,S.jsx)(`div`,{className:n.centeredText,children:(0,S.jsx)(u,{padding:1,children:(0,S.jsx)(r,{values:{standardMargin:i},components:{0:(0,S.jsx)(y,{component:c,to:`/${a.account}/${e}/${o.changeMarginModel}`})},id:`commonScreen.common.enablePortfolioMargin`})})})},FullScreenConnectionOverlay=()=>{let e=useOverlaysStyles();return d(g)?null:(0,S.jsxs)(`div`,{className:e.fullScreenOverlay,children:[(0,S.jsx)(`div`,{}),(0,S.jsx)(`div`,{children:(0,S.jsx)(s,{})})]})},LoadingOverlay=e=>{let t=useOverlaysStyles();return e.isLoading?(0,S.jsxs)(`div`,{className:t.loadingOverlay,children:[(0,S.jsx)(`div`,{className:e.transparent?void 0:t.solid}),(0,S.jsx)(`div`,{children:(0,S.jsx)(s,{})})]}):null},E=b(({palette:e})=>{let t=e.mode===`light`?e.dsColors.lightGray[20]:e.dsColors.darkGray[60];return{noAccessOverlay:{"& > div:first-child":{backgroundColor:t},"& > div:last-child":{backgroundColor:t}}}})(T);export{LoadingOverlay as a,SelectInstrumentOverlay as c,userAccountRightsSelector as d,userBlockTradeRightsSelector as f,FullScreenConnectionOverlay as i,UnsupportedCurrencyOverlay as l,userWalletRightsSelector as m,CustomMessageOverlay as n,T as o,userTradeRightsSelector as p,EnablePortfolioMarginOverlay as r,NoPositionsForOverlay as s,E as t,blockRfqScopeSelector as u};

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.