github.com/minio/console@v1.4.1/web-app/build/static/js/7063.d62078ab.chunk.js (about)

     1  (self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[7063],{97063:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>D});var r=n(65043),i=n(89923),o=n(22166),s=n(64159),a=n(20554),l=n(39827),c=n(70579);const d=e=>{let{email:t}=e;return(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(l.A,{email:t}),(0,c.jsx)(i.xA9,{item:!0,xs:12,sx:{marginTop:25},children:(0,c.jsxs)(i.azJ,{sx:{padding:"20px"},children:["Login to"," ",(0,c.jsx)("a",{href:"https://subnet.min.io",target:"_blank",children:"SUBNET"})," ","to avail support for this MinIO cluster"]})})]})},u=()=>{const e="mc admin config set {alias} subnet proxy={proxy}",[t,n]=(0,r.useState)(!1);return(0,c.jsx)(r.Fragment,{children:(0,c.jsxs)(i.azJ,{withBorders:!0,sx:{display:"flex",padding:"23px",marginTop:"40px",alignItems:"start",justifyContent:"space-between"},children:[(0,c.jsxs)(i.azJ,{sx:{display:"flex",flexFlow:"column"},children:[(0,c.jsxs)(i.azJ,{sx:{display:"flex","& .min-icon":{height:"22px",width:"22px"}},children:[(0,c.jsx)(i.Zes,{}),(0,c.jsx)("div",{style:{marginLeft:"10px",fontWeight:600},children:"Proxy Configuration"})]}),(0,c.jsxs)(i.azJ,{sx:{marginTop:"10px",marginBottom:"10px",fontSize:"14px"},children:["For airgap/firewalled environments it is possible to"," ",(0,c.jsx)("a",{href:"https://min.io/docs/minio/linux/reference/minio-mc-admin/mc-admin-config.html?ref=con",target:"_blank",children:"configure a proxy"})," ","to connect to SUBNET ."]}),(0,c.jsx)(i.azJ,{children:t&&(0,c.jsx)(i.cl_,{disabled:!0,id:"subnetProxy",name:"subnetProxy",placeholder:"",onChange:()=>{},label:"",value:e,overlayIcon:(0,c.jsx)(i.TdU,{}),overlayAction:()=>navigator.clipboard.writeText(e)})})]}),(0,c.jsx)(i.azJ,{sx:{display:"flex"},children:(0,c.jsx)(i.dOG,{value:"enableProxy",id:"enableProxy",name:"enableProxy",checked:t,onChange:e=>{n(e.target.checked)}})})]})})};var p=n(41379),x=n(20649),f=n(80907),g=n(77938),h=n(99161);const b=(0,f.zD)("register/fetchLicenseInfo",(async(e,t)=>{let{getState:n,dispatch:r}=t;const i=n(),o=(0,g._)(h.Ms,h.g[h.zZ.LICENSE],!0);i.register.loadingLicenseInfo||(o?(r((0,p.WK)(!0)),x.A.invoke("GET","/api/v1/subnet/info").then((e=>{r((0,p.w0)(e)),r((0,p.RB)(!0)),r((0,p.WK)(!1))})).catch((e=>{e.detailedError.toLowerCase()!=="License is not present".toLowerCase()&&e.detailedError.toLowerCase()!=="license not found".toLowerCase()&&r((0,s.C9)(e)),r((0,p.RB)(!1)),r((0,p.WK)(!1))}))):r((0,p.WK)(!1)))})),m=(0,f.zD)("register/callRegister",(async(e,t)=>{let{dispatch:n}=t;const r={token:e.token,account_id:e.account_id};x.A.invoke("POST","/api/v1/subnet/register",r).then((()=>{n((0,p.r1)(!1)),n((0,s.YR)(!0)),n((0,p.h7)()),n(b())})).catch((e=>{n((0,s.C9)(e)),n((0,p.r1)(!1))}))})),y=(0,f.zD)("register/subnetLoginWithMFA",(async(e,t)=>{let{getState:n,rejectWithValue:r,dispatch:i}=t;const o=n(),a=o.register.subnetEmail,l=o.register.subnetMFAToken,c=o.register.subnetOTP;if(o.register.loading)return;i((0,p.r1)(!0));const d={username:a,otp:c,mfa_token:l};x.A.invoke("POST","/api/v1/subnet/login/mfa",d).then((e=>{i((0,p.r1)(!1)),e&&e.access_token&&e.organizations.length>0&&(1===e.organizations.length?i(m({token:e.access_token,account_id:e.organizations[0].accountId.toString()})):(i((0,p.Lz)(e.access_token)),i((0,p.Gf)(e.organizations)),i((0,p.a2)(e.organizations[0].accountId.toString()))))})).catch((e=>{i((0,s.C9)(e)),i((0,p.r1)(!1)),i((0,p.dP)(""))}))})),j=(0,f.zD)("register/subnetLogin",(async(e,t)=>{let{getState:n,rejectWithValue:r,dispatch:i}=t;const o=n(),a=o.register.license,l=o.register.subnetPassword,c=o.register.subnetEmail;if(o.register.loading)return;i((0,p.r1)(!0));let d={username:c,password:l,apiKey:a};x.A.invoke("POST","/api/v1/subnet/login",d).then((e=>{i((0,p.r1)(!1)),e&&e.registered?(i((0,p.h7)()),i(b())):e&&e.mfa_token?i((0,p.NG)(e.mfa_token)):e&&e.access_token&&e.organizations.length>0&&(i((0,p.Lz)(e.access_token)),i((0,p.Gf)(e.organizations)),i((0,p.a2)(e.organizations[0].accountId.toString())))})).catch((e=>{i((0,s.C9)(e)),i((0,p.r1)(!1)),i((0,p.h7)())}))}));var v=n(77403),w=n(6681),C=n(61476),k=n.n(C);const z=e=>{let{icon:t,description:n}=e;return(0,c.jsxs)(i.azJ,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[t," ",(0,c.jsx)(i.azJ,{className:"muted",style:{fontSize:"14px",fontStyle:"italic"},children:n})]})},S=()=>(0,c.jsx)(i.lVp,{title:"Why should I register?",iconComponent:(0,c.jsx)(i.nag,{}),help:(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(i.azJ,{sx:{fontSize:"14px",marginBottom:"15px"},children:"Registering this cluster with the MinIO Subscription Network (SUBNET) provides the following benefits in addition to the commercial license and SLA backed support."}),(0,c.jsxs)(i.azJ,{sx:{display:"flex",flexFlow:"column"},children:[(0,c.jsx)(z,{icon:(0,c.jsx)(i.fJb,{}),description:"Call Home Monitoring"}),(0,c.jsx)(z,{icon:(0,c.jsx)(i.uFi,{}),description:"Health Diagnostics"}),(0,c.jsx)(z,{icon:(0,c.jsx)(i.s5I,{}),description:"Performance Analysis"}),(0,c.jsx)(z,{icon:(0,c.jsx)(i.JHI,{}),description:(0,c.jsx)("a",{href:"https://min.io/signup?ref=con",target:"_blank",children:"More Features"})})]})]})});var P=n(56629),O=n(53518);const T=()=>{const e=(0,a.jL)(),t=(0,o.d4)((e=>e.register.subnetRegToken)),n=(0,o.d4)((e=>e.register.clusterRegistered)),l=(0,o.d4)((e=>e.register.licenseInfo)),u="https://subnet.min.io/cluster/register?token=".concat(t),[p,x]=(0,r.useState)(""),[f,g]=(0,r.useState)(!1);return(0,c.jsx)(r.Fragment,{children:(0,c.jsx)(i.azJ,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:n&&l?(0,c.jsx)(d,{email:l.email}):(0,c.jsx)(i.Hbc,{title:"Register cluster in an Air-gap environment",icon:(0,c.jsx)(i.Kmb,{}),helpBox:(0,c.jsx)(S,{}),withBorders:!1,containerPadding:!1,children:(0,c.jsx)(i.azJ,{sx:{display:"flex",flexFlow:"column",flex:"2",marginTop:"15px","& .step-row":{fontSize:14,display:"flex",marginTop:"15px",marginBottom:"15px"}},children:(0,c.jsxs)(i.azJ,{children:[(0,c.jsx)(i.azJ,{className:"step-row",children:(0,c.jsx)(i.azJ,{className:"step-text",children:"Click on the link to register this cluster in SUBNET and get a License Key for this Air-Gap deployment"})}),(0,c.jsxs)(i.azJ,{sx:{flex:"1",display:"flex",alignItems:"center",gap:3},children:[(0,c.jsx)("a",{href:u,target:"_blank",children:"https://subnet.min.io/cluster/register"}),(0,c.jsx)(w.A,{tooltip:"Copy to Clipboard",children:(0,c.jsx)(k(),{text:u,children:(0,c.jsx)(i.$nd,{type:"button",id:"copy-ult-to-clip-board",icon:(0,c.jsx)(i.TdU,{}),color:"primary",variant:"regular"})})})]}),(0,c.jsx)(i.azJ,{className:"muted",sx:{marginTop:"25px"},children:"Note: If this machine does not have internet connection, Copy paste the following URL in a browser where you access SUBNET and follow the instructions to complete the registration"}),(0,c.jsxs)(i.azJ,{sx:{marginTop:"25px",display:"flex",flexDirection:"column"},children:[(0,c.jsxs)("label",{style:{fontWeight:"bold",marginBottom:"10px"},children:["Paste the License Key"," "]}),(0,c.jsx)(i.hFj,{value:p,disabled:f,label:"",id:"licenseKey",name:"licenseKey",placeholder:"License Key",onChange:e=>{x(e.target.value)}})]}),(0,c.jsx)(i.azJ,{sx:v.Uz.modalButtonBar,children:(0,c.jsx)(i.$nd,{id:"apply-license-key",onClick:()=>{g(!0),P.F.configs.setConfig("subnet",{key_values:[{key:"license",value:p}]}).then((t=>{e(b()),e((0,s.YR)(!0))})).catch((t=>{e((0,s.C9)((0,O.S)(t.error)))})).finally((()=>g(!1)))},variant:"callAction",disabled:!p||f,label:"Apply Cluster License"})})]})})})})})},A=()=>{const e=(0,a.jL)(),t=(0,o.d4)((e=>e.register.subnetMFAToken)),n=(0,o.d4)((e=>e.register.subnetOTP)),r=(0,o.d4)((e=>e.register.loading));return(0,c.jsxs)(i.Hbc,{title:"Two-Factor Authentication",helpBox:(0,c.jsx)(S,{}),withBorders:!1,containerPadding:!1,children:[(0,c.jsx)(i.azJ,{sx:{fontSize:14,display:"flex",flexFlow:"column",marginBottom:"30px"},children:"Please enter the 6-digit verification code that was sent to your email address. This code will be valid for 5 minutes."}),(0,c.jsx)(i.azJ,{children:(0,c.jsx)(i.cl_,{overlayIcon:(0,c.jsx)(i.XAi,{}),id:"subnet-otp",name:"subnet-otp",onChange:t=>e((0,p.dP)(t.target.value)),placeholder:"",label:"",value:n})}),(0,c.jsx)(i.azJ,{sx:v.Uz.modalButtonBar,children:(0,c.jsx)(i.$nd,{id:"verify",onClick:()=>e(y()),disabled:r||0===n.trim().length||0===t.trim().length,variant:"callAction",label:"Verify"})})]})},B=()=>{const e=(0,a.jL)(),t=(0,o.d4)((e=>e.register.subnetAccessToken)),n=(0,o.d4)((e=>e.register.selectedSubnetOrganization)),r=(0,o.d4)((e=>e.register.subnetOrganizations)),s=(0,o.d4)((e=>e.register.loading));return(0,c.jsxs)(i.Hbc,{title:"Register MinIO cluster",containerPadding:!0,withBorders:!1,helpBox:(0,c.jsx)(S,{}),children:[(0,c.jsx)(i.l6P,{id:"subnet-organization",name:"subnet-organization",onChange:t=>e((0,p.a2)(t)),label:"Select an organization",value:n,options:r.map((e=>({label:e.company,value:e.accountId.toString()})))}),(0,c.jsx)(i.azJ,{sx:v.Uz.modalButtonBar,children:(0,c.jsx)(i.$nd,{id:"register-cluster",onClick:()=>()=>{s||(e((0,p.r1)(!0)),t&&n&&e(m({token:t,account_id:n})))},disabled:s||0===t.trim().length,variant:"callAction",label:"Register"})})]})},E=()=>{const e=(0,a.jL)(),t=(0,o.d4)((e=>e.register.subnetPassword)),n=(0,o.d4)((e=>e.register.subnetEmail)),r=(0,o.d4)((e=>e.register.loading));return(0,c.jsxs)(i.Hbc,{icon:(0,c.jsx)(i.ESy,{}),title:"Online activation of MinIO Subscription Network License",withBorders:!1,containerPadding:!1,helpBox:(0,c.jsx)(S,{}),children:[(0,c.jsx)(i.azJ,{sx:{fontSize:"14px",display:"flex",flexFlow:"column",marginBottom:"30px"},children:"Use your MinIO Subscription Network login credentials to register this cluster."}),(0,c.jsxs)(i.azJ,{sx:{flex:"1"},children:[(0,c.jsx)(i.cl_,{id:"subnet-email",name:"subnet-email",onChange:t=>e((0,p.AS)(t.target.value)),label:"Email",value:n,overlayIcon:(0,c.jsx)(i.c2u,{})}),(0,c.jsx)(i.cl_,{id:"subnet-password",name:"subnet-password",onChange:t=>e((0,p.pb)(t.target.value)),label:"Password",type:"password",value:t}),(0,c.jsxs)(i.azJ,{sx:v.Uz.modalButtonBar,children:[(0,c.jsx)(i.$nd,{id:"sign-up",type:"submit",variant:"regular",onClick:e=>{e.preventDefault(),window.open("https://min.io/signup?ref=con","_blank")},label:"Sign up"}),(0,c.jsx)(i.$nd,{id:"register-credentials",type:"submit",variant:"callAction",disabled:r||0===n.trim().length||0===t.trim().length,onClick:()=>e(j()),label:"Register"})]})]})]})};var J=n(48793),_=n(55968),I=n(73216),R=n(58661);const L=e=>{let{open:t,closeModal:n,onSet:o}=e;const l=(0,a.jL)(),[d,u]=(0,r.useState)(""),[p,x]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[h,b]=(0,r.useState)(""),[m,y]=(0,r.useState)(!1),j=e=>{l((0,s.C9)((0,O.S)(e))),n(),u(""),x(""),g(""),b("")},v=()=>{y(!0),P.F.subnet.subnetLoginMfa({username:d,otp:h,mfa_token:f}).then((e=>{e.data&&e.data.access_token&&w(e.data.access_token)})).catch((e=>{j(e.error)})).finally((()=>y(!1)))},w=e=>{y(!0),P.F.subnet.subnetApiKey({token:e}).then((e=>{e.data&&e.data.apiKey&&(o(e.data.apiKey),n())})).catch((e=>{j(e.error)})).finally((()=>y(!1)))},C=()=>{y(!0),P.F.subnet.subnetLogin({username:d,password:p}).then((e=>{e.data&&e.data.mfa_token&&g(e.data.mfa_token)})).catch((e=>{j(e.error)})).finally((()=>y(!1)))},k=()=>(0,c.jsxs)(i.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,c.jsx)(i.cl_,{id:"subnet-email",name:"subnet-email",onChange:e=>u(e.target.value),label:"Email",value:d,overlayIcon:(0,c.jsx)(i.c2u,{})}),(0,c.jsx)(i.cl_,{id:"subnet-password",name:"subnet-password",onChange:e=>x(e.target.value),label:"Password",type:"password",value:p})]}),z=()=>(0,c.jsx)(i.azJ,{sx:{display:"flex"},children:(0,c.jsxs)(i.azJ,{sx:{display:"flex",flexFlow:"column",flex:"2"},children:[(0,c.jsx)(i.azJ,{sx:{fontSize:14,display:"flex",flexFlow:"column",marginTop:20,marginBottom:20},children:"Two-Factor Authentication"}),(0,c.jsx)(i.azJ,{children:"Please enter the 6-digit verification code that was sent to your email address. This code will be valid for 5 minutes."}),(0,c.jsx)(i.azJ,{sx:{flex:"1",marginTop:"30px"},children:(0,c.jsx)(i.cl_,{overlayIcon:(0,c.jsx)(i.XAi,{}),id:"subnet-otp",name:"subnet-otp",onChange:e=>b(e.target.value),placeholder:"",label:"",value:h})})]})});return t?(0,c.jsx)(R.A,{title:"Get API Key from SUBNET",confirmText:"Get API Key",isOpen:t,titleIcon:(0,c.jsx)(i.mo0,{}),isLoading:m,cancelText:"Cancel",onConfirm:()=>{""!==f?v():C()},onClose:n,confirmButtonProps:{variant:"callAction",disabled:!d||!p||m,hidden:!0},cancelButtonProps:{disabled:m},confirmationContent:""===f?k():z()}):null},F=e=>{let{registerEndpoint:t}=e;const n=(0,I.Zp)(),[o,l]=(0,r.useState)(!1),[d,u]=(0,r.useState)(""),[p,f]=(0,r.useState)(!1),[g,b]=(0,r.useState)(!1),m=(0,a.jL)(),y=(0,r.useCallback)((()=>{if(p)return;f(!0);let e={apiKey:d};x.A.invoke("POST",t,e).then((e=>{f(!1),e&&e.registered&&(m((0,s.YR)(!0)),n(h.zZ.LICENSE))})).catch((e=>{m((0,s.C9)(e)),f(!1),j()}))}),[d,m,p,t,n]);(0,r.useEffect)((()=>{g&&y()}),[g,y]);const j=()=>{u(""),b(!1)};return(0,c.jsxs)(i.Hbc,{title:"Register cluster with API key",icon:(0,c.jsx)(i.ESy,{}),containerPadding:!1,withBorders:!1,helpBox:(0,c.jsx)(S,{}),children:[(0,c.jsx)(i.azJ,{sx:{fontSize:14,display:"flex",flexFlow:"column",marginBottom:"30px"},children:"Use your MinIO Subscription Network API Key to register this cluster."}),(0,c.jsxs)(i.azJ,{sx:{flex:"1"},children:[(0,c.jsx)(i.cl_,{id:"api-key",name:"api-key",onChange:e=>u(e.target.value),label:"API Key",value:d}),(0,c.jsxs)(i.azJ,{sx:v.Uz.modalButtonBar,children:[(0,c.jsx)(i.$nd,{id:"get-from-subnet",variant:"regular",disabled:p,onClick:()=>l(!0),label:"Get from SUBNET"}),(0,c.jsx)(i.$nd,{id:"register",type:"submit",variant:"callAction",disabled:p||0===d.trim().length,onClick:()=>y(),label:"Register"})]})]}),(0,c.jsx)(L,{open:o,closeModal:()=>l(!1),onSet:e=>{u(e),b(!0)}})]})},D=()=>{const e=(0,a.jL)(),t=(0,o.d4)((e=>e.register.subnetMFAToken)),n=(0,o.d4)((e=>e.register.subnetAccessToken)),l=(0,o.d4)((e=>e.register.subnetRegToken)),f=(0,o.d4)((e=>e.register.subnetOrganizations)),g=(0,o.d4)((e=>e.register.loading)),h=(0,o.d4)((e=>e.register.loadingLicenseInfo)),m=(0,o.d4)((e=>e.register.clusterRegistered)),y=(0,o.d4)((e=>e.register.licenseInfo)),j=(0,o.d4)((e=>e.register.curTab)),[v,w]=(0,r.useState)(!0);(0,r.useEffect)((()=>()=>{e((0,p.h7)())}),[e]),(0,r.useEffect)((()=>{if("simple-tab-2"===j&&!g&&!l){(()=>{e((0,p.r1)(!0)),x.A.invoke("GET","/api/v1/subnet/registration-token").then((t=>{e((0,p.r1)(!1)),t&&t.regToken&&e((0,p.nR)(t.regToken))})).catch((t=>{console.error(t),e((0,s.C9)(t)),e((0,p.r1)(!1))}))})()}}),[j,g,l,e]),(0,r.useEffect)((()=>{v&&(e(b()),w(!1))}),[v,w,e]);let C=(0,c.jsx)(r.Fragment,{});C=n&&f.length>0?(0,c.jsx)(B,{}):t?(0,c.jsx)(A,{}):(0,c.jsx)(E,{});const k=(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(i.azJ,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:m&&y?(0,c.jsx)(d,{email:y.email}):(0,c.jsx)(F,{registerEndpoint:"/api/v1/subnet/login"})}),(0,c.jsx)(u,{})]}),z=(0,c.jsx)(T,{}),S=(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(i.azJ,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:m&&y?(0,c.jsx)(d,{email:y.email}):C}),!m&&(0,c.jsx)(u,{})]}),P=h?(0,c.jsx)("div",{children:"Loading.."}):S;return(0,r.useEffect)((()=>{e((0,s.ph)("register"))}),[]),(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(J.A,{label:"Register to MinIO Subscription Network",actions:(0,c.jsx)(_.A,{})}),(0,c.jsx)(i.Mxu,{children:(0,c.jsx)(i.tUM,{horizontal:!0,currentTabOrPath:j,onTabClick:t=>{e((0,p.UY)(t))},options:[{tabConfig:{label:"Credentials",id:"simple-tab-0"},content:P},{tabConfig:{label:"API Key",id:"simple-tab-1"},content:k},{tabConfig:{label:"Air-Gap",id:"simple-tab-2"},content:z}]})})]})}},39827:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(65043);var r=n(89923),i=n(70579);const o=e=>{let{email:t=""}=e;return(0,i.jsxs)(r.azJ,{sx:{height:67,color:"#ffffff",display:"flex",position:"relative",top:-30,left:-32,width:"calc(100% + 64px)",alignItems:"center",justifyContent:"space-between",backgroundColor:"#2781B0",padding:"0 25px 0 25px","& .registered-box, .reg-badge-box":{display:"flex",alignItems:"center",justifyContent:"flex-start"},"& .reg-badge-box":{marginLeft:"20px","& .min-icon":{fill:"#2781B0"}}},children:[(0,i.jsxs)(r.azJ,{className:"registered-box",children:[(0,i.jsx)(r.azJ,{sx:{fontSize:"16px",fontWeight:400},children:"Register status:"}),(0,i.jsxs)(r.azJ,{className:"reg-badge-box",children:[(0,i.jsx)(r.M3H,{}),(0,i.jsx)(r.azJ,{sx:{fontWeight:600},children:"Registered"})]})]}),(0,i.jsxs)(r.azJ,{className:"registered-acc-box",sx:{alignItems:"center",justifyContent:"flex-start",display:"flex",["@media (max-width: ".concat(r.nmC.sm,"px)")]:{display:"none"}},children:[(0,i.jsx)(r.azJ,{sx:{fontSize:"16px",fontWeight:400},children:"Registered to:"}),(0,i.jsx)(r.azJ,{sx:{marginLeft:"8px",fontWeight:600},children:t})]})]})}},75270:(e,t,n)=>{"use strict";var r=n(40139),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,s,a,l,c,d=!1;t||(t={}),n=t.debug||!1;try{if(s=r(),a=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),"undefined"===typeof r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=i[t.format]||i.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),a.selectNodeContents(c),l.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(u){n&&console.error("unable to copy using clipboardData: ",u),n&&console.error("falling back to prompt"),o=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(o,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(a):l.removeAllRanges()),c&&document.body.removeChild(c),s()}return d}},24480:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var i=a(n(65043)),o=a(n(75270)),s=["text","onCopy","options","children"];function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function x(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}(this,n)}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,n,r,a=x(l);function l(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(f(e=a.call.apply(a,[this].concat(n))),"onClick",(function(t){var n=e.props,r=n.text,s=n.onCopy,a=n.children,l=n.options,c=i.default.Children.only(a),d=(0,o.default)(r,l);s&&s(r,d),c&&c.props&&"function"===typeof c.props.onClick&&c.props.onClick(t)})),e}return t=l,(n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=d(e,s),r=i.default.Children.only(t);return i.default.cloneElement(r,c(c({},n),{},{onClick:this.onClick}))}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.default.PureComponent);t.CopyToClipboard=b,h(b,"defaultProps",{onCopy:void 0,options:void 0})},61476:(e,t,n)=>{"use strict";var r=n(24480).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},40139:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}}}]);
     2  //# sourceMappingURL=7063.d62078ab.chunk.js.map