PageSourceSearch

https://gov.pactfoundation.com/_next/static/chunks/613-03935f0471a…?dpl=dpl_3hfDM1wqtdEEuJXQL46pgkpZ3BMB

js pactfoundation.com collected 2026-10-04 11:08:33 UTC 13,678 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5baf889c-f8a5-4cba-904c-77eb8556874a",e._sentryDebugIdIdentifier="sentry-dbid-5baf889c-f8a5-4cba-904c-77eb8556874a")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[613],{693:(e,t,l)=>{l.d(t,{k:()=>w});var s=l(57201),a=l(13045),n=l(91057),o=l(76867),r=l(59714),d=l(80643),c=l(59561),i=l(37965),u=l(47394),x=l(94525),m=l(73944),f=l(74609);function h(e){let{isOpen:t,onClose:l,onConnectPetra:n,onConnectPetraVault:r}=e,[d,c]=(0,a.useState)(!1);return((0,a.useEffect)(()=>(c(!0),()=>c(!1)),[]),(0,a.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]),t&&d)?(0,m.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:l}),(0,s.jsxs)("div",{className:"relative mx-auto flex h-fit w-full max-w-[360px] flex-col rounded-2xl bg-white px-6 py-5",children:[(0,s.jsx)("button",{onClick:l,className:"hover:bg-UIColors-neutrals-lightGrey absolute top-4 right-4 rounded-full p-2 transition-colors","aria-label":"Close modal",children:(0,s.jsx)(x.A,{className:"text-UIColors-neutrals-blueGrey h-5 w-5"})}),(0,s.jsxs)("div",{className:"mb-5 flex items-center gap-3",children:[(0,s.jsx)(f.default,{src:"/assets/svgs/Petra.svg",alt:"Petra Logo",width:40,height:40}),(0,s.jsx)("h2",{className:"text-text-textPrimary font-general-sans text-xl font-semibold",children:"Connect Wallet"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(o.$,{onClick:n,variant:"secondary",title:"Connect with Petra",className:"w-full rounded-lg font-bold"}),(0,s.jsx)(o.$,{onClick:r,title:"Use Petra Vault",className:"w-full rounded-lg"})]})]})]}),document.body):null}var g=l(54811),b=l(37462);function p(e){let{isOpen:t,onClose:l}=e,{connected:n,controllerAccount:i}=(0,d.v)(),{vaultAddress:u,isEnabled:f,detectedVaults:h,isDetecting:g,isVerifying:p,error:v,detect:y,connect:w,disconnect:j}=(0,b.s)(),[C,N]=(0,a.useState)(!1),[k,P]=(0,a.useState)(""),E=(0,a.useRef)(null),S=(0,a.useRef)(!1);(0,a.useEffect)(()=>{N(!0)},[]),(0,a.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]),(0,a.useEffect)(()=>{if(!t){S.current=!1;return}!n||S.current||0!==h.length||g||p||(S.current=!0,y())},[t,n,h.length,g,p,y]),(0,a.useEffect)(()=>{t&&n&&!f&&!p&&1===h.length&&I(h[0])},[t,n,f,p,h]);let I=async e=>{await w(e)&&(l(),P(""))},A=async()=>{let e=k.trim();e&&await w(e)&&(l(),P(""))},L=()=>{l(),P("")};return C&&n&&t?(0,s.jsx)(s.Fragment,{children:(0,m.createPortal)((0,s.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:L}),(0,s.jsxs)("div",{className:"relative mx-auto flex h-fit max-h-[90vh] w-full max-w-[440px] flex-col overflow-y-auto rounded-2xl bg-white px-6 py-4",children:[(0,s.jsx)("button",{onClick:L,className:"hover:bg-UIColors-neutrals-lightGrey absolute top-4 right-4 rounded-full p-2 transition-colors","aria-label":"Close modal",children:(0,s.jsx)(x.A,{className:"text-UIColors-neutrals-blueGrey h-5 w-5"})}),(0,s.jsx)("h2",{className:"text-text-textPrimary font-general-sans mb-4 text-xl font-semibold",children:f?"Petra Vault connected":"Use Petra Vault"}),n&&(null==i?void 0:i.address)&&(0,s.jsxs)(c.A,{className:"text-text-textSecondary mb-4 block text-sm",children:["Controller wallet:"," ",(0,r.LV)(i.address.toString())]}),f&&u&&(0,s.jsx)("div",{className:"bg-UIColors-green-darkGreen/10 mb-4 rounded-lg p-3",children:(0,s.jsxs)(c.A,{className:"text-UIColors-green-darkGreen text-sm",children:["Transactions will be proposed from vault"," ",(0,r.LV)(u),"."]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[!f&&(0,s.jsxs)(s.Fragment,{children:[h.length>0?(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)(c.A,{className:"text-text-textPrimary text-sm font-semibold",children:["Detected vault",1===h.length?"":"s"]}),(0,s.jsx)("div",{className:"flex flex-col gap-2",children:h.map(e=>(0,s.jsx)(o.$,{onClick:()=>void I(e),isLoading:p&&u===e,disabled:p,variant:"secondary",title:(0,r.LV)(e),className:"w-full justify-start rounded-lg"},e))})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.A,{className:"text-text-textPrimary text-sm font-semibold",children:"Looking for vaults"}),(0,s.jsx)(c.A,{className:"text-text-textSecondary text-xs",children:"Scanning your transaction history for Petra Vaults. If none are found, enter the address below."}),(0,s.jsx)(o.$,{onClick:()=>void y(),isLoading:g,disabled:g||p,title:"Scan again",variant:"secondary",className:"w-full rounded-lg"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.A,{className:"text-text-textPrimary text-sm font-semibold",children:"Or enter vault address"}),(0,s.jsx)("input",{ref:E,type:"text",value:k,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"===e.key&&A()},placeholder:"0x...",disabled:p,className:"border-UIColors-neutrals-lightGrey text-text-textPrimary focus:border-ProductCTAColor-PACTFoundation-primary w-full rounded-lg border px-3 py-2 text-sm outline-none"}),(0,s.jsx)(o.$,{onClick:()=>void A(),isLoading:p,disabled:!k.trim()||p||g,title:"Verify & connect",className:"w-full rounded-lg"})]})]}),v&&(0,s.jsx)(c.A,{className:"text-UIColors-red-red text-sm",children:v}),f&&(0,s.jsx)(o.$,{onClick:()=>{j(),P("")},variant:"secondary",title:"Disconnect vault",className:"w-full rounded-lg bg-[#E8E9EC] text-[#595858]"})]})]})]}),document.body)}):null}var v=l(72275),y=l(45917);function w(e){let{className:t}
1=e,{connect:l,disconnect:x,account:m,controllerAccount:f,isVaultActive:b,connected:w,network:j}=(0,d.v)(),{clear:C}=(0,v.H)(),[N,k]=(0,a.useState)(!1),[P,E]=(0,a.useState)(!1),[S,I]=(0,a.useState)(!1),[A,L]=(0,a.useState)(!1),V=(0,a.useRef)(null),{isPetraInstalled:U,openInstallModal:$,isInstallModalOpen:T,closeInstallModal:W}=(0,g.N)({onInstalled:()=>{console.log("Petra wallet is installed and ready!")},onNotInstalled:e=>{console.warn("".concat(e," wallet not found"))}});if((0,a.useEffect)(()=>{let e=e=>{V.current&&!V.current.contains(e.target)&&k(!1)},t=e=>{"Escape"===e.key&&k(!1)};return N&&(document.addEventListener("mousedown",e),document.addEventListener("keydown",t)),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[N]),(0,a.useEffect)(()=>{A&&w&&(I(!0),L(!1))},[A,w]),!w||!m)return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.$,{onClick:()=>{if(!U())return void $("Petra");E(!0)},title:"Connect Wallet",className:(0,i.cn)("bg-ProductCTAColor-PACTFoundation-primary w-full rounded-[100px] font-bold text-white md:w-[187px]",t)}),(0,s.jsx)(h,{isOpen:P,onClose:()=>E(!1),onConnectPetra:()=>{E(!1),L(!1);try{l("Petra")}catch(e){y.Cp(e,{tags:{component:"WalletConnect",action:"connect-petra"}}),console.error("Failed to connect wallet:",e)}},onConnectPetraVault:()=>{E(!1),L(!0);try{l("Petra")}catch(e){y.Cp(e,{tags:{component:"WalletConnect",action:"connect-petra-vault"}}),console.error("Failed to connect wallet:",e),L(!1)}}}),(0,s.jsx)(u.n,{isOpen:T,onClose:W})]});let D=m.address.toString(),F=b?(0,s.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full bg-green-500"}):void 0;return(0,s.jsxs)("div",{ref:V,className:"relative",children:[(0,s.jsx)(o.$,{onClick:()=>k(e=>!e),variant:"secondary",title:(0,r.LV)(D),leftIcon:F,rightIcon:(0,s.jsx)(n.A,{className:(0,i.cn)("h-4 w-4 transition-transform",N?"rotate-180":"")}),className:(0,i.cn)("w-full rounded-[100px] md:w-[187px]",t),"aria-expanded":N,"aria-haspopup":"menu"}),(0,s.jsx)("div",{className:(0,i.cn)("border-UIColors-neutrals-grey absolute top-full left-1/2 z-50 mt-3 w-[260px] -translate-x-1/2 transform rounded-xl border bg-white p-3 shadow-lg transition-opacity",N?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),role:"menu",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 px-1",children:[(0,s.jsx)(c.A,{variant:"normalText",className:"text-text-textPrimary truncate text-[14px] font-medium",children:(0,r.LV)(D)}),(0,s.jsx)(c.A,{variant:"normalText",className:"text-text-textSecondary text-xs font-medium",children:b&&f?"Controlled by ".concat((0,r.LV)(f.address.toString())):null==j?void 0:j.name}),b&&(0,s.jsx)("span",{className:"self-start rounded-full bg-green-100 px-2 py-0.5 text-xs font-medium whitespace-nowrap text-green-700",children:"Petra Vault"})]}),(0,s.jsx)(o.$,{onClick:()=>{try{C(),x(),k(!1)}catch(e){y.Cp(e,{tags:{component:"WalletConnect",action:"disconnect"}}),console.error("Failed to disconnect wallet:",e)}},variant:"secondary",title:"Disconnect wallet",className:"w-full rounded-lg bg-[#E8E9EC] text-[#595858]"})]})}),(0,s.jsx)(p,{isOpen:S,onClose:()=>I(!1)}),(0,s.jsx)(u.n,{isOpen:T,onClose:W})]})}},3825:(e,t,l)=>{l.d(t,{VN:()=>s.V});var s=l(40573);l(54811),l(26858),l(52755),l(66616),l(80643),l(37462)},37462:(e,t,l)=>{l.d(t,{s:()=>r});var s=l(13045),a=l(80643),n=l(72275),o=l(24656);function r(){let{controllerAccount:e}=(0,a.v)(),{vaultAddress:t,isEnabled:l,setVaultAddress:r,setEnabled:d,clear:c}=(0,n.H)(),[i,u]=(0,s.useState)([]),[x,m]=(0,s.useState)(!1),[f,h]=(0,s.useState)(!1),[g,b]=(0,s.useState)(null),p=(0,s.useRef)(null);(0,s.useEffect)(()=>{var t,l;let s=null!=(l=null==e||null==(t=e.address)?void 0:t.toString())?l:null;null!==p.current&&p.current!==s&&c(),p.current=s},[null==e?void 0:e.address,c]);let v=(0,s.useCallback)(async()=>{if(b(null),!(null==e?void 0:e.address))return void b("Wallet not connected");m(!0);try{let t=await (0,o.Z7)(e.address.toString());u(t)}catch(e){b(e instanceof Error?e.message:"Failed to detect vaults")}finally{m(!1)}},[null==e?void 0:e.address]);return{vaultAddress:t,isEnabled:l,detectedVaults:i,isDetecting:x,isVerifying:f,error:g,detect:v,connect:(0,s.useCallback)(async t=>{if(b(null),!(null==e?void 0:e.address))return b("Wallet not connected"),!1;h(!0);try{return await (0,o.x)(e.address.toString(),t),r(t),d(!0),!0}catch(e){return b(e instanceof Error?e.message:"Connected wallet is not a vault controller"),!1}finally{h(!1)}},[null==e?void 0:e.address,r,d]),disconnect:(0,s.useCallback)(()=>{c(),u([]),b(null)},[c])}}},47394:(e,t,l)=>{l.d(t,{n:()=>x});var s=l(57201),a=l(94525),n=l(76867),o=l(59561),r=l(74609),d=l(13045),c=l(73944);let i={desktop:"https://chromewebstore.google.com/detail/petra-aptos-wallet/ejjladinnckdgjemekebdpeokbikhfci?hl=en",ios:"https://apps.apple.com/app/petra-wallet/id6446259840",android:"https://play.google.com/store/apps/details?id=com.aptoslabs.petra.wallet"},u=()=>{var e;let t=window.navigator.userAgent.toLowerCase(),l=(null==(e=window.navigator.platform)?void 0:e.toLowerCase())||"";return/iphone|ipad|ipod/.test(t)||l.includes("iphone")||l.includes("ipad")?"ios":/android/.test(t)?"android":"desktop"};function x(e){let{isOpen:t,onClose:l}=e,[x,m]=(0,d.useState)(!1);if((0,d.useEffect)(()=>(m(!0),()=>m(!1)),[]),(0,d.useEffect)(()=>(t?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t]),!t||!x)return null;let f=(0,s.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/50",onClick:l}),(0,s.jsxs)("div",{className:"relative mx-auto flex h-fit w-full max-w-[440px] flex-col overflow-hidden rounded-2xl bg-white px-6 py-4",children:[(0,s.jsx)("button",{onClick:l,className:"hover:bg-UIColors-neutrals-lightGrey absolute top-4 right-4 rounded-full p-2 transition-colors","aria-label":"Close modal",children:(0,s.jsx)(a.A,{className:"text-UIColors-neutrals-blueGrey h-5 w-5"})}),(0,s.jsx)("div",{className:"mb-6 flex justify-start",children:(0,s.jsx)(r.default,{src:"/assets/svgs/Petra.svg",alt:"Petra Logo",width:40,height:40})}),(0,s.jsx)("h2",{className:"text-text-textPrimary font-general-sans mb-4 text-xl font-semibold",children:"Install Petra Wallet Extension"}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsxs)(o.A,{className:"text-text-textSecondary text-base",children:["To connect your wallet and stake tokens, Petra Wallet Extension"," ",(0,s.jsx)("span",{className:"font-semibold",children:"must be installed"})," on this device."]})}),(0,s.jsxs)(o.A,{className:"text-text-textSecondary mb-4 text-base",children:["It takes less than a minute to set up. Petra is available on all major browsers","desktop"===u()?" (besides Safari)":"","."]}),"desktop"===u()&&(0,s.jsx)("div",{className:"bg-Petra-bg rounded-lg p-4",children:(0,s.jsx)(o.A,{className:"text-Petra-text text-sm",children:"We strongly recommend using a Ledger Hardware wallet for more secure key management - you can connect a Ledger device through Petra on Desktop."})}),(0,s.jsx)("hr",{className:"border-UIColors-neutrals-grey my-8"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row",children:[(0,s.jsx)(n.$,{onClick:l,variant:"secondary",title:"Cancel",className:"font-general-sans flex-1 rounded-lg bg-[#E8E9EC] text-[#595858]"}),(0,s.jsx)(n.$,{onClick:()=>{let e=i[u()];window.open(e,"_blank","noopener,noreferrer")},title:"Install Petra Browser Extension",className:"bg-Petra-button font-general-sans flex-1 rounded-lg font-bold text-white hover:opacity-90"})]})]})]});return(0,c.createPortal)(f,document.body)}}}]);

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.