(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[2203],{532203(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{"default":()=>v});var t=__webpack_require__(303280);__webpack_require__.n(t);var e=__webpack_require__(860012);var r=__webpack_require__(48084);var n=__webpack_require__(107495);var a=__webpack_require__(798777);var i=__webpack_require__(762550);var l=__webpack_require__(59293);var c=__webpack_require__(358623);var s=__webpack_require__(609654);var o=__webpack_require__(79222);var u=__webpack_require__(895462);var h=__webpack_require__(365337);var d=__webpack_require__(731728);function v(){let a=(0,t.c)(14);(0,l.J)("PerpsLayout"),(0,c.U)();let s=(0,r.wA)();let{pathname:h,search:v}=(0,n.zy)();let m=(0,r.d4)(S);let $=(0,r.d4)(w,r.bN);let _;let k;a[0]!==$||a[1]!==m?(_=()=>{(0,u.SB)().hydrateFromControllerCache($,m)},k=[$,m],a[0]=$,a[1]=m,a[2]=_,a[3]=k):(_=a[2],k=a[3]),(0,e.useLayoutEffect)(_,k);let p;let E;a[4]!==s||a[5]!==h||a[6]!==v?(p=()=>{let t=v?`${h}${v}`:h;Promise.resolve(s((0,o.GSC)(t))).catch(b)},E=[s,h,v],a[4]=s,a[5]=h,a[6]=v,a[7]=p,a[8]=E):(p=a[7],E=a[8]),(0,e.useEffect)(p,E);let C;let L;a[9]!==s?(C=()=>()=>{(0,d.sz)(),Promise.resolve(s((0,o.GSC)(null))).catch(y)},L=[s],a[9]=s,a[10]=C,a[11]=L):(C=a[10],L=a[11]),(0,e.useLayoutEffect)(C,L);let P;a[12]===Symbol.for("react.memo_cache_sentinel")?(P=[],a[12]=P):P=a[12],(0,e.useEffect)(f,P);let T;return a[13]===Symbol.for("react.memo_cache_sentinel")?(T=e.createElement(i.zX,null,e.createElement(n.sv,null)),a[13]=T):T=a[13],T}function f(){let t=null;let e=()=>{if(document.visibilityState==="hidden"){t=Date.now();return}let e=t;if(t=null,e!==null&&Date.now()-e<3e4)return;(0,s.Rb)("perpsCheckHealth").catch(m)};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}function m(){}function y(){}function b(){}function w(t){let e=t.metamask;let r=e.activeProvider??a.x$.DefaultProvider;let n=`${r}:${e.isTestnet?"testnet":"mainnet"}`;let i=e.cachedMarketDataByProvider?.[n];let l=e.cachedUserDataByProvider?.[n];return{markets:i?.data,positions:l?.positions,orders:l?.orders,account:l?.accountState,address:l?.address}}function S(t){return(0,h._)(t)?.address??null}}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()},762550(__unused_webpack_module,__webpack_exports__,__webpack_require__){(function(){if(!this.ST)return()=>{};with(this.ST)with(this.RH)with(this.G)return function(){"use strict";__webpack_require__.d(__webpack_exports__,{zX:()=>t.zX}),__webpack_require__(654352),__webpack_require__(93769),__webpack_require__(425462),__webpack_require__(650836),__webpack_require__(606760);var t=__webpack_require__(311441);__webpack_require__(918540),__webpack_require__(938685),__webpack_require__(791796),__webpack_require__(774153),__webpack_require__(663870),__webpack_require__(336795),__webpack_require__(454704),__webpack_require__(409823),__webpack_require__(22677),__webpack_require__(118670),__webpack_require__(227980),__webpack_require__(890194)}}).call(__webpack_require__._LM_("$root$",{__webpack_require__,__webpack_exports__}))()}}]);