Files
object-browser/web-app/build/static/js/1516.73fcb9af.chunk.js
2023-12-29 11:44:01 -06:00

2 lines
22 KiB
JavaScript

(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[1516],{51516:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>F});var r=n(72791),i=n(29945),o=n(78687),s=n(87995),a=n(44690),l=n(74440),c=n(80184);const u=e=>{let{email:t}=e;return(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(l.Z,{email:t}),(0,c.jsx)(i.rjZ,{item:!0,xs:12,sx:{marginTop:25},children:(0,c.jsxs)(i.xuv,{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"]})})]})},d=()=>{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.xuv,{withBorders:!0,sx:{display:"flex",padding:"23px",marginTop:"40px",alignItems:"start",justifyContent:"space-between"},children:[(0,c.jsxs)(i.xuv,{sx:{display:"flex",flexFlow:"column"},children:[(0,c.jsxs)(i.xuv,{sx:{display:"flex","& .min-icon":{height:"22px",width:"22px"}},children:[(0,c.jsx)(i.ewm,{}),(0,c.jsx)("div",{style:{marginLeft:"10px",fontWeight:600},children:"Proxy Configuration"})]}),(0,c.jsxs)(i.xuv,{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.xuv,{children:t&&(0,c.jsx)(i.Wzg,{disabled:!0,id:"subnetProxy",name:"subnetProxy",placeholder:"",onChange:()=>{},label:"",value:e,overlayIcon:(0,c.jsx)(i.TIy,{}),overlayAction:()=>navigator.clipboard.writeText(e)})})]}),(0,c.jsx)(i.xuv,{sx:{display:"flex"},children:(0,c.jsx)(i.rsf,{value:"enableProxy",id:"enableProxy",name:"enableProxy",checked:t,onChange:e=>{n(e.target.checked)}})})]})})};var x=n(36825),p=n(81207),g=n(96382),f=n(38442),h=n(56087);const m=(0,g.hg)("register/fetchLicenseInfo",(async(e,t)=>{let{getState:n,dispatch:r}=t;const i=n(),o=(0,f.F)(h.C3,h.LC[h.gA.LICENSE],!0);i.register.loadingLicenseInfo||(o?(r((0,x.pI)(!0)),p.Z.invoke("GET","/api/v1/subnet/info").then((e=>{r((0,x.aO)(e)),r((0,x.Dr)(!0)),r((0,x.pI)(!1))})).catch((e=>{e.detailedError.toLowerCase()!=="License is not present".toLowerCase()&&e.detailedError.toLowerCase()!=="license not found".toLowerCase()&&r((0,s.Ih)(e)),r((0,x.Dr)(!1)),r((0,x.pI)(!1))}))):r((0,x.pI)(!1)))})),b=(0,g.hg)("register/callRegister",(async(e,t)=>{let{dispatch:n}=t;const r={token:e.token,account_id:e.account_id};p.Z.invoke("POST","/api/v1/subnet/register",r).then((()=>{n((0,x.K4)(!1)),n((0,s.cN)(!0)),n((0,x.jS)()),n(m())})).catch((e=>{n((0,s.Ih)(e)),n((0,x.K4)(!1))}))})),y=(0,g.hg)("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,x.K4)(!0));const u={username:a,otp:c,mfa_token:l};p.Z.invoke("POST","/api/v1/subnet/login/mfa",u).then((e=>{i((0,x.K4)(!1)),e&&e.access_token&&e.organizations.length>0&&(1===e.organizations.length?i(b({token:e.access_token,account_id:e.organizations[0].accountId.toString()})):(i((0,x.t2)(e.access_token)),i((0,x.dl)(e.organizations)),i((0,x.wK)(e.organizations[0].accountId.toString()))))})).catch((e=>{i((0,s.Ih)(e)),i((0,x.K4)(!1)),i((0,x.Z7)(""))}))})),v=(0,g.hg)("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,x.K4)(!0));let u={username:c,password:l,apiKey:a};p.Z.invoke("POST","/api/v1/subnet/login",u).then((e=>{i((0,x.K4)(!1)),e&&e.registered?(i((0,x.jS)()),i(m())):e&&e.mfa_token?i((0,x.dK)(e.mfa_token)):e&&e.access_token&&e.organizations.length>0&&(i((0,x.t2)(e.access_token)),i((0,x.dl)(e.organizations)),i((0,x.wK)(e.organizations[0].accountId.toString())))})).catch((e=>{i((0,s.Ih)(e)),i((0,x.K4)(!1)),i((0,x.jS)())}))}));var j=n(23814),w=n(27454),k=n(78029),C=n.n(k);const S=e=>{let{icon:t,description:n}=e;return(0,c.jsxs)(i.xuv,{sx:{display:"flex","& .min-icon":{marginRight:"10px",height:"23px",width:"23px",marginBottom:"10px"}},children:[t," ",(0,c.jsx)(i.xuv,{className:"muted",style:{fontSize:"14px",fontStyle:"italic"},children:n})]})},T=()=>(0,c.jsx)(i.KfX,{title:"Why should I register?",iconComponent:(0,c.jsx)(i.M9A,{}),help:(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(i.xuv,{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.xuv,{sx:{display:"flex",flexFlow:"column"},children:[(0,c.jsx)(S,{icon:(0,c.jsx)(i._qw,{}),description:"Call Home Monitoring"}),(0,c.jsx)(S,{icon:(0,c.jsx)(i.toM,{}),description:"Health Diagnostics"}),(0,c.jsx)(S,{icon:(0,c.jsx)(i.Fsz,{}),description:"Performance Analysis"}),(0,c.jsx)(S,{icon:(0,c.jsx)(i.EQx,{}),description:(0,c.jsx)("a",{href:"https://min.io/signup?ref=con",target:"_blank",children:"More Features"})})]})]})});var P=n(9505);const O=()=>{const e=(0,a.TL)(),t=(0,o.v9)((e=>e.register.subnetRegToken)),n=(0,o.v9)((e=>e.register.clusterRegistered)),l=(0,o.v9)((e=>e.register.licenseInfo)),d="https://subnet.min.io/cluster/register?token=".concat(t),[x,p]=(0,r.useState)(""),[g,f]=(0,P.Z)((()=>{e(m()),e((0,s.cN)(!0))}),(t=>{e((0,s.Ih)(t))}));return(0,c.jsx)(r.Fragment,{children:(0,c.jsx)(i.xuv,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:n&&l?(0,c.jsx)(u,{email:l.email}):(0,c.jsx)(i.ltY,{title:"Register cluster in an Air-gap environment",icon:(0,c.jsx)(i.YL8,{}),helpBox:(0,c.jsx)(T,{}),withBorders:!1,containerPadding:!1,children:(0,c.jsx)(i.xuv,{sx:{display:"flex",flexFlow:"column",flex:"2",marginTop:"15px","& .step-row":{fontSize:14,display:"flex",marginTop:"15px",marginBottom:"15px"}},children:(0,c.jsxs)(i.xuv,{children:[(0,c.jsx)(i.xuv,{className:"step-row",children:(0,c.jsx)(i.xuv,{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.xuv,{sx:{flex:"1",display:"flex",alignItems:"center",gap:3},children:[(0,c.jsx)("a",{href:d,target:"_blank",children:"https://subnet.min.io/cluster/register"}),(0,c.jsx)(w.Z,{tooltip:"Copy to Clipboard",children:(0,c.jsx)(C(),{text:d,children:(0,c.jsx)(i.zxk,{type:"button",id:"copy-ult-to-clip-board",icon:(0,c.jsx)(i.TIy,{}),color:"primary",variant:"regular"})})})]}),(0,c.jsx)(i.xuv,{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.xuv,{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.q5m,{value:x,disabled:g,label:"",id:"licenseKey",name:"licenseKey",placeholder:"License Key",onChange:e=>{p(e.target.value)}})]}),(0,c.jsx)(i.xuv,{sx:j.ID.modalButtonBar,children:(0,c.jsx)(i.zxk,{id:"apply-license-key",onClick:()=>{f("PUT","/api/v1/configs/subnet",{key_values:[{key:"license",value:x}]})},variant:"callAction",disabled:!x||g,label:"Apply Cluster License"})})]})})})})})},I=()=>{const e=(0,a.TL)(),t=(0,o.v9)((e=>e.register.subnetMFAToken)),n=(0,o.v9)((e=>e.register.subnetOTP)),r=(0,o.v9)((e=>e.register.loading));return(0,c.jsxs)(i.ltY,{title:"Two-Factor Authentication",helpBox:(0,c.jsx)(T,{}),withBorders:!1,containerPadding:!1,children:[(0,c.jsx)(i.xuv,{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.xuv,{children:(0,c.jsx)(i.Wzg,{overlayIcon:(0,c.jsx)(i.mBM,{}),id:"subnet-otp",name:"subnet-otp",onChange:t=>e((0,x.Z7)(t.target.value)),placeholder:"",label:"",value:n})}),(0,c.jsx)(i.xuv,{sx:j.ID.modalButtonBar,children:(0,c.jsx)(i.zxk,{id:"verify",onClick:()=>e(y()),disabled:r||0===n.trim().length||0===t.trim().length,variant:"callAction",label:"Verify"})})]})},B=()=>{const e=(0,a.TL)(),t=(0,o.v9)((e=>e.register.subnetAccessToken)),n=(0,o.v9)((e=>e.register.selectedSubnetOrganization)),r=(0,o.v9)((e=>e.register.subnetOrganizations)),s=(0,o.v9)((e=>e.register.loading));return(0,c.jsxs)(i.ltY,{title:"Register MinIO cluster",containerPadding:!0,withBorders:!1,helpBox:(0,c.jsx)(T,{}),children:[(0,c.jsx)(i.PhF,{id:"subnet-organization",name:"subnet-organization",onChange:t=>e((0,x.wK)(t)),label:"Select an organization",value:n,options:r.map((e=>({label:e.company,value:e.accountId.toString()})))}),(0,c.jsx)(i.xuv,{sx:j.ID.modalButtonBar,children:(0,c.jsx)(i.zxk,{id:"register-cluster",onClick:()=>()=>{s||(e((0,x.K4)(!0)),t&&n&&e(b({token:t,account_id:n})))},disabled:s||0===t.trim().length,variant:"callAction",label:"Register"})})]})},E=()=>{const e=(0,a.TL)(),t=(0,o.v9)((e=>e.register.subnetPassword)),n=(0,o.v9)((e=>e.register.subnetEmail)),r=(0,o.v9)((e=>e.register.loading));return(0,c.jsxs)(i.ltY,{icon:(0,c.jsx)(i.dRy,{}),title:"Online activation of MinIO Subscription Network License",withBorders:!1,containerPadding:!1,helpBox:(0,c.jsx)(T,{}),children:[(0,c.jsx)(i.xuv,{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.xuv,{sx:{flex:"1"},children:[(0,c.jsx)(i.Wzg,{id:"subnet-email",name:"subnet-email",onChange:t=>e((0,x.Ze)(t.target.value)),label:"Email",value:n,overlayIcon:(0,c.jsx)(i.oyc,{})}),(0,c.jsx)(i.Wzg,{id:"subnet-password",name:"subnet-password",onChange:t=>e((0,x.lr)(t.target.value)),label:"Password",type:"password",value:t}),(0,c.jsxs)(i.xuv,{sx:j.ID.modalButtonBar,children:[(0,c.jsx)(i.zxk,{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.zxk,{id:"register-credentials",type:"submit",variant:"callAction",disabled:r||0===n.trim().length||0===t.trim().length,onClick:()=>e(v()),label:"Register"})]})]})]})};var z=n(79844),A=n(99670),_=n(57689),R=n(23508);const L=e=>{let{open:t,closeModal:n,onSet:o}=e;const l=(0,a.TL)(),[u,d]=(0,r.useState)(""),[x,p]=(0,r.useState)(""),[g,f]=(0,r.useState)(""),[h,m]=(0,r.useState)(""),[b,y]=(0,P.Z)((e=>{e.mfa_token?f(e.mfa_token):e.access_token?y("GET","/api/v1/subnet/apikey?token=".concat(e.access_token)):(o(e.apiKey),n())}),(e=>{l((0,s.Ih)(e)),n(),d(""),p(""),f(""),m("")})),v=()=>(0,c.jsxs)(i.ltY,{withBorders:!1,containerPadding:!1,children:[(0,c.jsx)(i.Wzg,{id:"subnet-email",name:"subnet-email",onChange:e=>d(e.target.value),label:"Email",value:u,overlayIcon:(0,c.jsx)(i.oyc,{})}),(0,c.jsx)(i.Wzg,{id:"subnet-password",name:"subnet-password",onChange:e=>p(e.target.value),label:"Password",type:"password",value:x})]}),j=()=>(0,c.jsx)(i.xuv,{sx:{display:"flex"},children:(0,c.jsxs)(i.xuv,{sx:{display:"flex",flexFlow:"column",flex:"2"},children:[(0,c.jsx)(i.xuv,{sx:{fontSize:14,display:"flex",flexFlow:"column",marginTop:20,marginBottom:20},children:"Two-Factor Authentication"}),(0,c.jsx)(i.xuv,{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.xuv,{sx:{flex:"1",marginTop:"30px"},children:(0,c.jsx)(i.Wzg,{overlayIcon:(0,c.jsx)(i.mBM,{}),id:"subnet-otp",name:"subnet-otp",onChange:e=>m(e.target.value),placeholder:"",label:"",value:h})})]})});return t?(0,c.jsx)(R.Z,{title:"Get API Key from SUBNET",confirmText:"Get API Key",isOpen:t,titleIcon:(0,c.jsx)(i.szr,{}),isLoading:b,cancelText:"Cancel",onConfirm:()=>{""!==g?y("POST","/api/v1/subnet/login/mfa",{username:u,otp:h,mfa_token:g}):y("POST","/api/v1/subnet/login",{username:u,password:x})},onClose:n,confirmButtonProps:{variant:"callAction",disabled:!u||!x||b,hidden:!0},cancelButtonProps:{disabled:b},confirmationContent:""===g?v():j()}):null},D=e=>{let{registerEndpoint:t}=e;const n=(0,_.s0)(),[o,l]=(0,r.useState)(!1),[u,d]=(0,r.useState)(""),[x,g]=(0,r.useState)(!1),[f,m]=(0,r.useState)(!1),b=(0,a.TL)(),y=(0,r.useCallback)((()=>{if(x)return;g(!0);let e={apiKey:u};p.Z.invoke("POST",t,e).then((e=>{g(!1),e&&e.registered&&(b((0,s.cN)(!0)),n(h.gA.LICENSE))})).catch((e=>{b((0,s.Ih)(e)),g(!1),v()}))}),[u,b,x,t,n]);(0,r.useEffect)((()=>{f&&y()}),[f,y]);const v=()=>{d(""),m(!1)};return(0,c.jsxs)(i.ltY,{title:"Register cluster with API key",icon:(0,c.jsx)(i.dRy,{}),containerPadding:!1,withBorders:!1,helpBox:(0,c.jsx)(T,{}),children:[(0,c.jsx)(i.xuv,{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.xuv,{sx:{flex:"1"},children:[(0,c.jsx)(i.Wzg,{id:"api-key",name:"api-key",onChange:e=>d(e.target.value),label:"API Key",value:u}),(0,c.jsxs)(i.xuv,{sx:j.ID.modalButtonBar,children:[(0,c.jsx)(i.zxk,{id:"get-from-subnet",variant:"regular",disabled:x,onClick:()=>l(!0),label:"Get from SUBNET"}),(0,c.jsx)(i.zxk,{id:"register",type:"submit",variant:"callAction",disabled:x||0===u.trim().length,onClick:()=>y(),label:"Register"})]})]}),(0,c.jsx)(L,{open:o,closeModal:()=>l(!1),onSet:e=>{d(e),m(!0)}})]})},F=()=>{const e=(0,a.TL)(),t=(0,o.v9)((e=>e.register.subnetMFAToken)),n=(0,o.v9)((e=>e.register.subnetAccessToken)),l=(0,o.v9)((e=>e.register.subnetRegToken)),g=(0,o.v9)((e=>e.register.subnetOrganizations)),f=(0,o.v9)((e=>e.register.loading)),h=(0,o.v9)((e=>e.register.loadingLicenseInfo)),b=(0,o.v9)((e=>e.register.clusterRegistered)),y=(0,o.v9)((e=>e.register.licenseInfo)),v=(0,o.v9)((e=>e.register.curTab)),[j,w]=(0,r.useState)(!0);(0,r.useEffect)((()=>()=>{e((0,x.jS)())}),[e]),(0,r.useEffect)((()=>{if("simple-tab-2"===v&&!f&&!l){(()=>{e((0,x.K4)(!0)),p.Z.invoke("GET","/api/v1/subnet/registration-token").then((t=>{e((0,x.K4)(!1)),t&&t.regToken&&e((0,x.wz)(t.regToken))})).catch((t=>{console.error(t),e((0,s.Ih)(t)),e((0,x.K4)(!1))}))})()}}),[v,f,l,e]),(0,r.useEffect)((()=>{j&&(e(m()),w(!1))}),[j,w,e]);let k=(0,c.jsx)(r.Fragment,{});k=n&&g.length>0?(0,c.jsx)(B,{}):t?(0,c.jsx)(I,{}):(0,c.jsx)(E,{});const C=(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(i.xuv,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:b&&y?(0,c.jsx)(u,{email:y.email}):(0,c.jsx)(D,{registerEndpoint:"/api/v1/subnet/login"})}),(0,c.jsx)(d,{})]}),S=(0,c.jsx)(O,{}),T=(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(i.xuv,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:b&&y?(0,c.jsx)(u,{email:y.email}):k}),!b&&(0,c.jsx)(d,{})]}),P=h?(0,c.jsx)("div",{children:"Loading.."}):T;return(0,r.useEffect)((()=>{e((0,s.Sc)("register"))}),[]),(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(z.Z,{label:"Register to MinIO Subscription Network",actions:(0,c.jsx)(A.Z,{})}),(0,c.jsx)(i.Xgh,{children:(0,c.jsx)(i.mQc,{horizontal:!0,currentTabOrPath:v,onTabClick:t=>{e((0,x.m)(t))},options:[{tabConfig:{label:"Credentials",id:"simple-tab-0"},content:P},{tabConfig:{label:"API Key",id:"simple-tab-1"},content:C},{tabConfig:{label:"Air-Gap",id:"simple-tab-2"},content:S}]})})]})}},74440:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});n(72791);var r=n(29945),i=n(80184);const o=e=>{let{email:t=""}=e;return(0,i.jsxs)(r.xuv,{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.xuv,{className:"registered-box",children:[(0,i.jsx)(r.xuv,{sx:{fontSize:"16px",fontWeight:400},children:"Register status:"}),(0,i.jsxs)(r.xuv,{className:"reg-badge-box",children:[(0,i.jsx)(r.SA,{}),(0,i.jsx)(r.xuv,{sx:{fontWeight:600},children:"Registered"})]})]}),(0,i.jsxs)(r.xuv,{className:"registered-acc-box",sx:{alignItems:"center",justifyContent:"flex-start",display:"flex",["@media (max-width: ".concat(r.Egj.sm,"px)")]:{display:"none"}},children:[(0,i.jsx)(r.xuv,{sx:{fontSize:"16px",fontWeight:400},children:"Registered to:"}),(0,i.jsx)(r.xuv,{sx:{marginLeft:"8px",fontWeight:600},children:t})]})]})}},76998:(e,t,n)=>{"use strict";var r=n(42458),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,s,a,l,c,u=!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");u=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),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 u}},568:(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(72791)),o=a(n(76998)),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 u(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 d(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 x(e,t){return x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},x(e,t)}function p(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=f(e);if(t){var o=f(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 g(e)}(this,n)}}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(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 m=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&&x(e,t)}(l,e);var t,n,r,a=p(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(g(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),u=(0,o.default)(r,l);s&&s(r,u),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=u(e,s),r=i.default.Children.only(t);return i.default.cloneElement(r,c(c({},n),{},{onClick:this.onClick}))}}])&&d(t.prototype,n),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.default.PureComponent);t.CopyToClipboard=m,h(m,"defaultProps",{onCopy:void 0,options:void 0})},78029:(e,t,n)=>{"use strict";var r=n(568).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},42458: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()}}}}]);
//# sourceMappingURL=1516.73fcb9af.chunk.js.map