(this["webpackJsonpipfs-webui"]=this["webpackJsonpipfs-webui"]||[]).push([[16],{1015:function(e,s,t){"use strict";var c=t(1),a=t(2),n=t.n(a),r=t(11),i=t(78),l=t(0),o=t(37),d=t(957),b=t(182),j=t(102),h=function(e){return null==e?"":"string"===typeof e?e:JSON.stringify(e)};s.a=Object(o.b)("doUpdateIpfsApiAddress","selectIpfsApiAddress","selectIpfsInitFailed",Object(d.a)("app")((function(e){var s=e.t,t=e.doUpdateIpfsApiAddress,a=e.ipfsApiAddress,o=e.ipfsInitFailed,d=Object(l.useState)(h(a)),p=Object(i.a)(d,2),m=p[0],u=p[1],f=!Object(j.b)(m),O=Object(l.useState)(f||o),x=Object(i.a)(O,2),g=x[0],w=x[1],N=Object(l.useState)(f),y=Object(i.a)(N,2),v=y[0],I=y[1];Object(l.useEffect)((function(){w(o)}),[v,o]),Object(l.useEffect)((function(){var e=Object(j.b)(m);I(e),w(!e)}),[m]);var k=function(){var e=Object(r.a)(n.a.mark((function e(s){return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.preventDefault(),t(m);case 2:case"end":return e.stop()}}),e)})));return function(s){return e.apply(this,arguments)}}();return Object(c.jsxs)("form",{onSubmit:k,children:[Object(c.jsx)("input",{id:"api-address","aria-label":s("terms.apiAddress"),placeholder:s("apiAddressForm.placeholder"),type:"text",className:"w-100 lh-copy monospace f5 pl1 pv1 mb2 charcoal input-reset ba b--black-20 br1 ".concat(g?"focus-outline-red b--red-muted":"focus-outline-green b--green-muted"),onChange:function(e){return u(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&k(e)},value:m}),Object(c.jsx)("div",{className:"tr",children:Object(c.jsx)(b.a,{minWidth:100,height:40,className:"mt2 mt0-l ml2-l tc",disabled:!v||m===a,children:s("actions.submit")})})]})})))},1104:function(e,s,t){"use strict";var c=t(3),a=t(1);t(0);s.a=function(e){return Object(a.jsx)("svg",Object(c.a)(Object(c.a)({viewBox:"0 0 100 100"},e),{},{children:Object(a.jsx)("path",{d:"M50 20.11A29.89 29.89 0 1 0 79.89 50 29.89 29.89 0 0 0 50 20.11zM44.18 63.6L32.53 52l3.92-4 7.73 7.73L63.55 36.4l3.92 3.92z"})}))}},1106:function(e,s,t){"use strict";var c=t(1),a=t(78),n=t(0),r=t(37),i=t(181),l=t(957),o=t(125),d=t.n(o),b=t(1015),j=t(257),h=t(975),p=t(3),m=function(e){return Object(c.jsx)("svg",Object(p.a)(Object(p.a)({viewBox:"0 0 100 100"},e),{},{children:Object(c.jsx)("path",{d:"M82.84 71.14L55.06 23a5.84 5.84 0 0 0-10.12 0L17.16 71.14a5.85 5.85 0 0 0 5.06 8.77h55.56a5.85 5.85 0 0 0 5.06-8.77zm-30.1-.66h-5.48V65h5.48zm0-10.26h-5.48V38.46h5.48z"})}))},u="unix",f="windowsPS",O="windowsCMD";s.a=Object(r.b)("selectIpfsConnected","selectApiUrl",Object(l.a)("welcome")((function(e){var s=e.t,t=(e.apiUrl,e.connected,e.sameOrigin),r=e.ipfsApiAddress,l=e.doUpdateIpfsApiAddress,o=Object(n.useState)(u),p=Object(a.a)(o,2),x=p[0],g=p[1],w=["http://localhost:3000","http://127.0.0.1:5001","https://webui.ipfs.io"],N=window.location.origin,y=-1===w.indexOf(N);return Object(c.jsxs)(j.a,{className:"pv3 ph4 lh-copy charcoal",children:[Object(c.jsxs)("div",{className:"flex flex-wrap items-center",children:[Object(c.jsx)(m,{style:{height:76},className:"fill-red mr",role:"presentation"}),Object(c.jsx)("h1",{className:"montserrat fw4 charcoal ma0 f3 red",children:s("app:status.couldNotConnect")})]}),Object(c.jsx)(i.a,{i18nKey:"notConnected.paragraph1",t:s,children:Object(c.jsxs)("p",{className:"fw6 mb3",children:["Check out the installation guide in the ",Object(c.jsx)("a",{className:"link blue",href:"https://docs.ipfs.io/install/command-line-quick-start/",target:"_blank",rel:"noopener noreferrer",children:"IPFS Docs"}),", or try these common fixes:"]})}),Object(c.jsxs)("ol",{className:"pl3 pt2",children:[Object(c.jsx)(i.a,{i18nKey:"notConnected.paragraph2",t:s,children:Object(c.jsx)("li",{className:"mb3",children:"Is your IPFS daemon running? Try starting or restarting it from your terminal:"})}),Object(c.jsxs)(h.a,{title:"Any Shell",children:[Object(c.jsxs)("code",{className:"db",children:[Object(c.jsx)("b",{className:"no-select",children:"$ "}),"ipfs daemon"]}),Object(c.jsx)("code",{className:"db",children:"Initializing daemon..."}),Object(c.jsx)("code",{className:"db",children:"API server listening on /ip4/127.0.0.1/tcp/5001"})]}),!t&&Object(c.jsxs)("div",{children:[Object(c.jsx)(i.a,{i18nKey:"notConnected.paragraph3",t:s,children:Object(c.jsxs)("li",{className:"mb3 mt4",children:["Is your IPFS API configured to allow ",Object(c.jsx)("a",{className:"link blue",href:"https://github.com/ipfs-shipyard/ipfs-webui#configure-ipfs-api-cors-headers",children:"cross-origin (CORS) requests"}),"? If not, run these commands and then start your daemon from the terminal:"]})}),Object(c.jsxs)("div",{className:"br1 overflow-hidden",children:[Object(c.jsxs)("div",{className:"f7 mb0 sans-serif charcoal pv1 pl2 bg-black-20 flex items-center overflow-x-auto",children:[Object(c.jsx)("button",{onClick:function(){return g(u)},className:d()("pointer mr3 ttu tracked",x===u&&"fw7"),children:"Unix & MacOS"}),Object(c.jsx)("button",{onClick:function(){return g(f)},className:d()("pointer mr3 ttu tracked",x===f&&"fw7"),children:"Windows Powershell"}),Object(c.jsx)("button",{onClick:function(){return g(O)},className:d()("pointer ttu tracked",x===O&&"fw7"),children:"Windows CMD"})]}),Object(c.jsxs)("div",{className:"bg-black-70 snow pa2 f7 lh-copy monospace nowrap overflow-x-auto",children:[x===u&&Object(c.jsxs)("div",{children:[Object(c.jsxs)("code",{className:"db",children:[Object(c.jsx)("b",{className:"no-select",children:"$ "}),"ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[",y&&'"'.concat(N,'", '),'"',w.join('", "'),"\"]'"]}),Object(c.jsxs)("code",{className:"db",children:[Object(c.jsx)("b",{className:"no-select",children:"$ "}),'ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods \'["PUT", "POST"]\'']})]}),x===f&&Object(c.jsxs)("div",{children:[Object(c.jsxs)("code",{className:"db",children:[Object(c.jsx)("b",{className:"no-select",children:"$ "}),"ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[",y&&'\\"'.concat(N,'\\", '),'\\"',w.join('\\", \\"'),"\\\"]'"]}),Object(c.jsxs)("code",{className:"db",children:[Object(c.jsx)("b",{className:"no-select",children:"$ "}),'ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods \'[\\"PUT\\", \\"POST\\"]\'']})]}),x===O&&Object(c.jsxs)("div",{children:[Object(c.jsxs)("code",{className:"db",children:[Object(c.jsx)("b",{className:"no-select",children:"$ "}),'ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[',y&&'"""'.concat(N,'""", '),'"""',w.join('""", """'),'"""]"']}),Object(c.jsxs)("code",{className:"db",children:[Object(c.jsx)("b",{className:"no-select",children:"$ "}),'ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "["""PUT""", """POST"""]"']})]})]})]})]}),Object(c.jsx)(i.a,{i18nKey:"notConnected.paragraph4",t:s,children:Object(c.jsxs)("li",{className:"mt4 mb3",children:["Is your IPFS API on a port other than 5001? If your node is configured with a ",Object(c.jsx)("a",{className:"link blue",href:"https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#addresses",target:"_blank",rel:"noopener noreferrer",children:"custom API address"}),", enter it here."]})}),Object(c.jsx)(b.a,{t:s,defaultValue:r||"",updateAddress:l})]})]})})))},1665:function(e,s,t){"use strict";t.r(s);var c=t(1),a=(t(0),t(142)),n=t(37),r=t(957),i=t(141),l=t(965),o=t(187),d=t(259),b=t(257),j=t(1104),h=Object(r.a)("welcome")((function(e){var s=e.t;return Object(c.jsx)(b.a,{className:"pv3 ph4",children:Object(c.jsxs)("div",{children:[Object(c.jsxs)("div",{className:"flex flex-wrap items-center",children:[Object(c.jsx)(j.a,{style:{height:76},className:"fill-green",role:"presentation"}),Object(c.jsx)("h1",{className:"montserrat fw4 charcoal ma0 f3 green",children:s("app:status.connectedToIpfs")})]}),Object(c.jsx)("p",{className:"fw6 mt1 ml3-ns w-100",children:s("connected.paragraph1")})]})})})),p=t(1106),m=t(181),u=Object(r.a)("welcome")((function(e){var s=e.t;return Object(c.jsxs)(b.a,{children:[Object(c.jsx)("h2",{className:"mt0 mb3 montserrat fw2 f3 charcoal",children:s("aboutIpfs.header")}),Object(c.jsxs)("ul",{className:"pl3",children:[Object(c.jsx)(m.a,{i18nKey:"aboutIpfs.paragraph1",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("strong",{children:"A hypermedia distribution protocol"})," that incorporates ideas from Kademlia, BitTorrent, Git, and more"]})}),Object(c.jsx)(m.a,{i18nKey:"aboutIpfs.paragraph2",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("strong",{children:"A peer-to-peer file transfer network"})," with a completely decentralized architecture and no central point of failure, censorship, or control"]})}),Object(c.jsx)(m.a,{i18nKey:"aboutIpfs.paragraph3",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("strong",{children:"An on-ramp to tomorrow's web"})," \u2014 traditional browsers can access IPFS files through gateways like ",Object(c.jsx)("code",{className:"f5 bg-light-gray br2 pa1",children:"https://ipfs.io"})," or directly using the ",Object(c.jsx)("a",{className:"link blue",target:"_blank",rel:"noopener noreferrer",href:"https://github.com/ipfs-shipyard/ipfs-companion#ipfs-companion",children:"IFPS Companion"})," extension"]})}),Object(c.jsx)(m.a,{i18nKey:"aboutIpfs.paragraph4",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("strong",{children:"A next-gen CDN"})," \u2014 just add a file to your node to make it available to the world with cache-friendly content-hash addressing and BitTorrent-style bandwidth distribution"]})}),Object(c.jsx)(m.a,{i18nKey:"aboutIpfs.paragraph5",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("strong",{children:"A developer toolset"})," for building completely ",Object(c.jsx)("a",{className:"link blue",target:"_blank",rel:"noopener noreferrer",href:"https://awesome.ipfs.io/",children:"distributed apps and services"}),", backed by a robust open-source community"]})})]})]})})),f=Object(r.a)("welcome")((function(e){var s=e.t;return Object(c.jsxs)(b.a,{children:[Object(c.jsx)("h2",{className:"mt0 mb3 montserrat fw2 f3 charcoal",children:s("welcomeInfo.header")}),Object(c.jsxs)("ul",{className:"pl3",children:[Object(c.jsx)(m.a,{i18nKey:"welcomeInfo.paragraph1",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("a",{href:"#/",className:"link blue u b",children:"Check your node status"}),", including how many peers you're connected to, your storage and bandwidth stats, and more"]})}),Object(c.jsx)(m.a,{i18nKey:"welcomeInfo.paragraph2",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("a",{href:"#/files",className:"link blue u b",children:"View and manage files"})," in your IPFS repo, including drag-and-drop file import, easy pinning, and quick sharing and download options"]})}),Object(c.jsx)(m.a,{i18nKey:"welcomeInfo.paragraph3",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("a",{href:"#/explore",className:"link blue b",children:'Visit the "Merkle Forest"'})," with some sample datasets and explore IPLD, the data model that underpins how IPFS works"]})}),Object(c.jsx)(m.a,{i18nKey:"welcomeInfo.paragraph4",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("a",{href:"#/peers",className:"link blue b",children:"See who's connected to your node"}),", geolocated on a world map by their IP address"]})}),Object(c.jsx)(m.a,{i18nKey:"welcomeInfo.paragraph5",t:s,children:Object(c.jsxs)("li",{className:"mb2",children:[Object(c.jsx)("a",{href:"#/settings",className:"link blue b",children:"Review or edit your node settings"})," \u2014 no command line required"]})}),Object(c.jsx)(m.a,{i18nKey:"welcomeInfo.paragraph6",t:s,children:Object(c.jsxs)("li",{className:"f5",children:[Object(c.jsx)("a",{href:"https://github.com/ipfs-shipyard/ipfs-webui",className:"link blue b",target:"_blank",rel:"noopener noreferrer",children:"Check this app's source code"})," to ",Object(c.jsx)("a",{href:"https://github.com/ipfs-shipyard/ipfs-webui/issues",className:"link blue",target:"_blank",rel:"noopener noreferrer",children:"report a bug"})," or make a contribution, and make IPFS better for everyone!"]})})]})]})})),O=t(39),x=function(e){e.t;var s=e.connected;e.sameOrigin;return s?Object(c.jsxs)("div",{children:[Object(c.jsx)(h,{}),Object(c.jsxs)("div",{className:"flex-ns mt3",children:[Object(c.jsx)("div",{className:"mr3-ns lh-copy mid-gray w-50-ns",children:Object(c.jsx)(f,{})}),Object(c.jsx)("div",{className:"lh-copy mid-gray w-50-ns mt3 mt0-ns",children:Object(c.jsx)(u,{})})]})]}):Object(c.jsx)(p.a,{})};s.default=Object(n.b)("selectIpfsInitFailed","selectIpfsConnected","selectIpfsReady","selectApiUrl","selectToursEnabled",Object(l.a)(Object(r.a)("welcome")((function(e){var s=e.t,t=e.apiUrl,n=e.ipfsInitFailed,r=e.ipfsConnected,l=e.ipfsReady,b=e.toursEnabled,j=e.handleJoyrideCallback;if(!n&&!l)return Object(c.jsx)(O.a,{});var h=window.location.origin===t;return Object(c.jsxs)("div",{children:[Object(c.jsx)(a.Helmet,{children:Object(c.jsx)("title",{children:s("title")})}),Object(c.jsx)("div",{className:"lh-copy charcoal",children:Object(c.jsx)(x,{connected:r,sameOrigin:h,t:s})}),Object(c.jsx)(i.b,{run:b,steps:o.f.getSteps({t:s}),styles:o.f.styles,callback:j,scrollToFirstStep:!0,locale:Object(d.a)(s)})]})}))))},965:function(e,s,t){"use strict";var c=t(3),a=t(1),n=t(62),r=t(63),i=t(108),l=t(107),o=t(0),d=t.n(o),b=t(37),j=t(141);s.a=function(e){var s=function(s){Object(i.a)(o,s);var t=Object(l.a)(o);function o(){var e;Object(n.a)(this,o);for(var s=arguments.length,c=new Array(s),a=0;a