(this["webpackJsonpipfs-webui"]=this["webpackJsonpipfs-webui"]||[]).push([[10],{1015:function(e,a,t){"use strict";var n=t(1),c=t(2),s=t.n(c),i=t(11),r=t(78),l=t(0),o=t(37),d=t(957),b=t(182),j=t(102),u=function(e){return null==e?"":"string"===typeof e?e:JSON.stringify(e)};a.a=Object(o.b)("doUpdateIpfsApiAddress","selectIpfsApiAddress","selectIpfsInitFailed",Object(d.a)("app")((function(e){var a=e.t,t=e.doUpdateIpfsApiAddress,c=e.ipfsApiAddress,o=e.ipfsInitFailed,d=Object(l.useState)(u(c)),p=Object(r.a)(d,2),h=p[0],f=p[1],m=!Object(j.b)(h),g=Object(l.useState)(m||o),O=Object(r.a)(g,2),v=O[0],x=O[1],y=Object(l.useState)(m),N=Object(r.a)(y,2),k=N[0],w=N[1];Object(l.useEffect)((function(){x(o)}),[k,o]),Object(l.useEffect)((function(){var e=Object(j.b)(h);w(e),x(!e)}),[h]);var S=function(){var e=Object(i.a)(s.a.mark((function e(a){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.preventDefault(),t(h);case 2:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return Object(n.jsxs)("form",{onSubmit:S,children:[Object(n.jsx)("input",{id:"api-address","aria-label":a("terms.apiAddress"),placeholder:a("apiAddressForm.placeholder"),type:"text",className:"w-100 lh-copy monospace f5 pl1 pv1 mb2 charcoal input-reset ba b--black-20 br1 ".concat(v?"focus-outline-red b--red-muted":"focus-outline-green b--green-muted"),onChange:function(e){return f(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&S(e)},value:h}),Object(n.jsx)("div",{className:"tr",children:Object(n.jsx)(b.a,{minWidth:100,height:40,className:"mt2 mt0-l ml2-l tc",disabled:!k||h===c,children:a("actions.submit")})})]})})))},1016:function(e,a,t){"use strict";var n=t(3),c=t(1);t(0);a.a=function(e){return Object(c.jsx)("svg",Object(n.a)(Object(n.a)({viewBox:"0 0 100 100"},e),{},{children:Object(c.jsx)("path",{d:"M75 50c0-3.75 1.25-6.25 3.75-8.75s5.625-3.75 8.75-3.75c3.75 0 6.25 1.25 8.75 3.75S100 46.875 100 50s-1.25 6.25-3.75 8.75-5.625 3.75-8.75 3.75-6.25-1.25-8.75-3.75S75 53.125 75 50zm-37.5 0c0-3.75 1.25-6.25 3.75-8.75S46.875 37.5 50 37.5c3.75 0 6.25 1.25 8.75 3.75S62.5 46.875 62.5 50s-1.25 6.25-3.75 8.75S53.125 62.5 50 62.5s-6.25-1.25-8.75-3.75S37.5 53.125 37.5 50zM0 50c0-3.75 1.25-6.25 3.75-8.75s5.625-3.75 8.75-3.75c3.75 0 6.25 1.25 8.75 3.75S25 46.875 25 50s-1.25 6.25-3.75 8.75-5.625 3.75-8.75 3.75-6.25-1.25-8.75-3.75S0 53.125 0 50z"})}))}},1018:function(e,a,t){"use strict";var n=t(3),c=t(1),s=t(77),i=t(0),r=t(37),l=t(964),o=t(988),d=t(182),b=t(976),j=t(975),u=t(989),p=t(14),h=function(e){var a=e.command,t=e.t,i=e.onLeave,r=e.className,b=e.downloadConfig,h=Object(s.a)(e,["command","t","onLeave","className","downloadConfig"]);return Object(c.jsxs)(l.a,Object(n.a)(Object(n.a)({},h),{},{className:r,onCancel:i,style:{maxWidth:"40em"},children:[Object(c.jsxs)(l.c,{Icon:o.a,children:[Object(c.jsx)("p",{className:"charcoal w-80 center",style:{lineHeight:"1.3"},children:t("app:cliModal.description")}),Object(c.jsxs)("p",{className:"charcoal-muted w-90 center",children:[a&&a===p.h[p.f.UPDATE_IPFS_CONFIG]()?t("settings:cliModal.extraNotesJsonConfig"):"",a&&a.startsWith(p.g.PIN_OBJECT)?t("files:cliModal.extraNotesPinning"):""]}),Object(c.jsx)("div",{children:Object(c.jsx)(j.a,{className:"tl",title:"Shell",children:Object(c.jsxs)("code",{className:"db",children:[Object(c.jsx)("b",{className:"no-select",children:"$ "}),a]})})})]}),Object(c.jsxs)(l.b,{children:[Object(c.jsx)("div",{children:Object(c.jsx)(d.a,{className:"ma2 tc",bg:"bg-gray",onClick:i,children:t("app:actions.close")})}),Object(c.jsxs)("div",{className:"flex items-center",children:[a&&a===p.h[p.f.UPDATE_IPFS_CONFIG]()?Object(c.jsx)(u.a,{onClick:b,className:"dib fill-link pointer",style:{height:38}}):Object(c.jsx)("div",{}),Object(c.jsx)(d.a,{className:"ma2 tc",onClick:function(){return e=a,void navigator.clipboard.writeText(e).then((function(){i()}));var e},children:t("app:actions.copy")})]})]})]}))};h.defaultProps={className:""},a.a=Object(r.b)("doOpenCliTutorModal","selectIsCliTutorModalOpen","selectIsCliTutorModeEnabled",(function(e){var a=e.t,t=e.filesPage,n=e.isCliTutorModeEnabled,s=e.onLeave,r=e.isCliTutorModalOpen,l=e.command,d=e.config,j=e.showIcon,u=e.doOpenCliTutorModal;return n?t?Object(c.jsx)(h,{className:"outline-0",onLeave:s,t:a,command:l}):Object(c.jsxs)(i.Fragment,{children:[j?Object(c.jsx)(o.a,{onClick:function(){return u(!0)},className:"dib fill-link pointer mh2",style:{height:44}}):Object(c.jsx)("div",{}),Object(c.jsx)(b.a,{show:r,onLeave:function(){return u(!1)},children:Object(c.jsx)(h,{className:"outline-0",onLeave:function(){return u(!1)},t:a,command:l,downloadConfig:function(){return function(e){var a=window.URL.createObjectURL(new Blob([e])),t=document.createElement("a");t.style.display="none",t.href=a,t.download="settings.json",document.body.appendChild(t),t.click(),window.URL.revokeObjectURL(a)}(d)}})})]}):null}))},1044:function(e,a,t){"use strict";var n=t(3),c=t(1);t(0);a.a=function(e){return Object(c.jsxs)("svg",Object(n.a)(Object(n.a)({viewBox:"0 0 100 100"},e),{},{children:[Object(c.jsx)("path",{d:"M41.72 58.28l-2.05-2.04-4.08 4.09-8.18 8.17-4.09 4.09-2.04 6.13 6.13-2.04 4.09-4.09 8.17-8.17 4.09-4.09-2.04-2.05z"}),Object(c.jsx)("path",{d:"M78 43.51a1 1 0 0 0 .45-1.64L68.28 31.72l-2-2-8.11-8.1a1 1 0 0 0-1.64.45 22.66 22.66 0 0 0-.88 5.64.89.89 0 0 1-.27.65L39.6 44.05a.93.93 0 0 1-.81.26 23.39 23.39 0 0 0-8.52.45 1 1 0 0 0-.44 1.64l11.89 11.88L53.6 70.17a1 1 0 0 0 1.64-.44 23.39 23.39 0 0 0 .45-8.52.93.93 0 0 1 .31-.81l15.69-15.74a.89.89 0 0 1 .65-.27 22.66 22.66 0 0 0 5.66-.88z"})]}))}},1639:function(e,a,t){},1640:function(e,a,t){},1641:function(e,a,t){},1650:function(e,a){ace.define("ace/theme/ipfs_dark",["require","exports","module","ace/lib/dom"],(function(e,a,t){a.isDark=!0,a.cssClass="ace-ipfs-dark",a.cssText="\n .ace-ipfs-dark .ace_gutter {\n background: #0b3a53;\n color: #9ad4db;\n }\n .ace-ipfs-dark .ace_print-margin {\n width: 1px;\n background: #69c4cd;\n }\n .ace-ipfs-dark {\n background-color: #0b3a53;\n color: #9ad4db;\n }\n .ace-ipfs-dark .ace_entity.ace_other.ace_attribute-name,\n .ace-ipfs-dark .ace_storage {\n color: #f7f8fa;\n }\n .ace-ipfs-dark .ace_rparen,\n .ace-ipfs-dark .ace_lparen {\n color: #9ad4db;\n }\n .ace-ipfs-dark .ace_cursor,\n .ace-ipfs-dark .ace_string.ace_regexp {\n color: #ea5037\n }\n .ace-ipfs-dark .ace_marker-layer .ace_active-line,\n .ace-ipfs-dark .ace_marker-layer .ace_selection {\n background: rgba(255, 255, 255, 0.1)\n }\n .ace-ipfs-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #244e66;\n }\n .ace-ipfs-dark .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n }\n .ace-ipfs-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(147, 161, 161, 0.50)\n }\n .ace-ipfs-dark .ace_gutter-active-line {\n background-color: #244e66\n }\n .ace-ipfs-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #244e66\n }\n .ace-ipfs-dark .ace_invisible {\n color: rgba(147, 161, 161, 0.50)\n }\n .ace-ipfs-dark .ace_keyword,\n .ace-ipfs-dark .ace_meta,\n .ace-ipfs-dark .ace_support.ace_class,\n .ace-ipfs-dark .ace_support.ace_type {\n color: #0aca9f\n }\n .ace-ipfs-dark .ace_constant.ace_character,\n .ace-ipfs-dark .ace_constant.ace_other {\n color: #f36149\n }\n .ace-ipfs-dark .ace_constant.ace_language {\n color: #f9a13e\n }\n .ace-ipfs-dark .ace_constant.ace_numeric {\n color: #f39021\n }\n .ace-ipfs-dark .ace_fold {\n background-color: #69c4cd;\n border-color: #93A1A1\n }\n .ace-ipfs-dark .ace_entity.ace_name.ace_function,\n .ace-ipfs-dark .ace_entity.ace_name.ace_tag,\n .ace-ipfs-dark .ace_support.ace_function,\n .ace-ipfs-dark .ace_variable,\n .ace-ipfs-dark .ace_variable.ace_language {\n color: #edf0f4\n }\n .ace-ipfs-dark .ace_string {\n color: #0aca9f\n }\n .ace-ipfs-dark .ace_comment {\n font-style: italic;\n color: #657B83\n }\n .ace-ipfs-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\n }",e("../lib/dom").importCssString(a.cssText,a.cssClass)}))},1661:function(e,a,t){"use strict";t.r(a),t.d(a,"SettingsPage",(function(){return Ee})),t.d(a,"SettingsPageContainer",(function(){return Pe})),t.d(a,"TranslatedSettingsPage",(function(){return _e}));var n=t(62),c=t(63),s=t(108),i=t(107),r=t(1),l=t(0),o=t.n(l),d=t(142),b=t(37),j=t(181),u=t(957),p=t(141),h=t(187),f=t(965),m=t(259),g=t(380),O=t(257),v=t(182),x=t(270),y=t(388),N=function(e){if(!e)return"Unknown";var a=y[e];if(!a){var t=y[e.split("-")[0]];return t&&t.nativeName||y.en.englishName}return a.nativeName},k=t(976),w=t(3),S=t(77),C=t(964),A=function(e){return Object(r.jsx)("svg",Object(w.a)(Object(w.a)({viewBox:"0 0 100 100"},e),{},{children:Object(r.jsx)("path",{d:"M76.1 16.42c-.81 0-23.86 4.63-43.07 8.52a13.27 13.27 0 0 1-1.48.16c-4.6.39-15.38 1.3-15.38 16.56 0 9.6 4.68 14.68 9.42 16.42l.06 17.67a7.78 7.78 0 0 0 7.5 7.83c2.93 0 9.79 0 9.79-5.08v-.14L40.93 58h5.2c.65.15 3.4.84 6.55 1.62 20.32 5.05 22.75 5.6 23.26 5.6 7.37 0 12.72-10.19 12.72-24.28 0-14.22-5.28-24.52-12.56-24.52zM46 55a30.82 30.82 0 0 1-3.85-14.81 30.46 30.46 0 0 1 3.75-14.67l-.16-.08c8.34-1.68 16.93-3.4 22.86-4.57-3.17 3.82-5.32 10.3-5.65 17.91 0 .68-.05 1.37-.05 2.07v2c.31 7.34 2.31 13.63 5.29 17.51-4.8-1.18-10.77-2.66-14.84-3.68C46.53 55 46.53 55 46.3 55zm30.17-35.58c5.33.09 9.49 9.49 9.49 21.48v.1c0 11.85-4.22 21.15-9.64 21.24-.5-.08-2.5-.55-5.2-1.21-2.48-2.29-4.46-6.39-5.54-11.46 3.08-.09 5.48-3.92 5.48-8.8s-2.38-8.68-5.44-8.77c1.14-5.22 3.25-9.4 5.86-11.6 2.73-.57 4.55-.92 4.99-.98zm-11.12 14h.12c2.22 0 4.09 3.34 4.09 7.3s-1.87 7.31-4.09 7.31H65a41.13 41.13 0 0 1-.58-5.34v-3.77a43.13 43.13 0 0 1 .63-5.46zm-31.9 47.16a4.8 4.8 0 0 1-4.5-4.83l-.06-17.84 9.29-.37 2.06 21c-.08 1.81-3.66 2.04-6.79 2.04zM39.28 55a1.51 1.51 0 0 0-1.11.49v.05l-10 .4a1.4 1.4 0 0 0-.67-.41c-1.39-.36-8.29-2.7-8.29-13.86 0-12.5 8.22-13.19 12.63-13.57a15.6 15.6 0 0 0 1.83-.21l10.43-2.12a31.71 31.71 0 0 0-3.46 14.41A32.29 32.29 0 0 0 44.28 55z"})}))},E=function(e){var a=e.t,t=(e.tReady,e.onLeave),n=(e.link,e.className),c=e.isIpfsDesktop,s=e.doDesktopUpdateLanguage,i=Object(S.a)(e,["t","tReady","onLeave","link","className","isIpfsDesktop","doDesktopUpdateLanguage"]);return Object(r.jsxs)(C.a,Object(w.a)(Object(w.a)({},i),{},{className:n,onCancel:t,style:{maxWidth:"40em"},children:[Object(r.jsxs)(C.c,{Icon:A,children:[Object(r.jsx)("p",{className:"charcoal w-80 center",children:a("languageModal.description")}),Object(r.jsx)("div",{className:"pa2 flex flex-wrap",children:x.b.map((function(e){return Object(r.jsx)("button",{className:"pa2 w-33 flex nowrap bg-transparent bn outline-0 blue justify-center",onClick:function(){return function(e){x.a.changeLanguage(e),c&&s(e),t()}(e.locale)},children:e.nativeName},"lang-".concat(e.locale))}))}),Object(r.jsxs)("p",{className:"lh-copy charcoal f6",children:[a("languageModal.translationProjectIntro"),Object(r.jsx)("br",{}),Object(r.jsx)("a",{href:"https://www.transifex.com/ipfs/public/",rel:"noopener noreferrer",target:"_blank",className:"link blue",children:a("languageModal.translationProjectLink")})]})]}),Object(r.jsx)(C.b,{justify:"center",children:Object(r.jsx)(v.a,{className:"ma2 tc",bg:"bg-gray",onClick:t,children:a("app:actions.close")})})]}))};E.defaultProps={className:""};var L=Object(b.b)("selectIsIpfsDesktop","doDesktopUpdateLanguage",E),M=function(e){Object(s.a)(t,e);var a=Object(i.a)(t);function t(){var e;Object(n.a)(this,t);for(var c=arguments.length,s=new Array(c),i=0;i=0?"":"gray",children:a.numberOfPins>=0?a.numberOfPins:"".concat(t("app:terms:loading"),"...")})},je=function(e){var a=e.autoUpload,t=e.visitServiceUrl,n=e.name,c=e.doRemovePinningService,s=e.t,i=e.type,l=e.onToggleModalOpen;return Object(r.jsxs)("div",{className:"flex justify-between items-center",children:[Object(r.jsx)("div",{className:a?"":"gray",children:"undefined"!==typeof a?s("autoUploadPolicy."+a):"-"}),"LOCAL"!==i&&Object(r.jsx)(ue,{doRemovePinningService:c,name:n,t:s,onToggleModalOpen:l,autoUpload:a,visitServiceUrl:t})]})},ue=function(e){var a=e.doRemovePinningService,t=e.name,n=e.visitServiceUrl,c=e.autoUpload,s=e.t,i=e.onToggleModalOpen,o=Object(l.useRef)(),d=Object(l.useState)(!1),b=Object(D.a)(d,2),j=b[0],u=b[1],p=!t.includes(".");return Object(r.jsxs)("div",{children:[Object(r.jsx)("button",{className:"button-inside-focus",onClick:function(){return u(!0)},ref:o,"aria-label":s("showOptions"),children:Object(r.jsx)(ce.a,{width:24,className:"fill-gray-muted hover-fill-gray transition-all"})}),Object(r.jsxs)(te,{className:"pv2 ph1",style:{zIndex:1001},visible:j,target:o,onDismiss:function(){return u(!1)},arrowAlign:"right",children:[p&&Object(r.jsxs)(ne,{className:"pv2 ph1",onClick:function(){return i(t)},children:[Object(r.jsx)(re,{width:"28",className:"fill-aqua"})," ",Object(r.jsx)("span",{className:"ph1",children:s(c?"pinningServices.removeAutoUpload":"pinningServices.addAutoUpload")})]}),n&&Object(r.jsx)("a",{className:"link flex items-center",href:n,target:"_blank",rel:"noopener noreferrer",children:Object(r.jsxs)(ne,{className:"pv2 ph1",onClick:function(){return u(!1)},children:[Object(r.jsx)(ie,{width:"28",className:"fill-aqua"})," ",Object(r.jsx)("span",{className:"ph1 charcoal",children:s("visitService")})]})}),Object(r.jsxs)(ne,{className:"pv2 ph1",onClick:function(){a(t),u(!1)},children:[Object(r.jsx)(se,{width:"28",className:"fill-aqua"})," ",Object(r.jsx)("span",{className:"ph1",children:s("remove")})]})]})]})},pe=Object(b.b)("doPinsStatsGet","selectIpfsReady","selectPinsSize","selectNumberOfPins","selectPinningServices","selectArePinningServicesSupported","doFetchPinningServices","doRemovePinningService",le),he=t(379),fe=t(1015),me=t(384),ge=Object(b.b)("doUpdatePublicGateway","selectPublicGateway",Object(u.a)("app")((function(e){var a=e.t,t=e.doUpdatePublicGateway,n=e.publicGateway,c=Object(l.useState)(n),s=Object(D.a)(c,2),i=s[0],o=s[1],d=!Object(me.b)(i),b=Object(l.useState)(d),j=Object(D.a)(b,2),u=j[0],p=j[1],h=Object(l.useState)(d),f=Object(D.a)(h,2),m=f[0],g=f[1];Object(l.useEffect)((function(){p(!m)}),[m]),Object(l.useEffect)((function(){var e=Object(me.b)(i);g(e),p(!e)}),[i]);var O=function(){var e=Object(T.a)(I.a.mark((function e(a){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.preventDefault(),e.prev=1,e.next=4,Object(me.c)(i);case 4:e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(1),p(!0),e.abrupt("return");case 10:t(i);case 11:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(a){return e.apply(this,arguments)}}(),x=function(){var e=Object(T.a)(I.a.mark((function e(a){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.preventDefault(),o(me.a),t(me.a);case 3:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return Object(r.jsxs)("form",{onSubmit:O,children:[Object(r.jsx)("input",{id:"public-gateway","aria-label":a("terms.publicGateway"),placeholder:a("publicGatewayForm.placeholder"),type:"text",className:"w-100 lh-copy monospace f5 pl1 pv1 mb2 charcoal input-reset ba b--black-20 br1 ".concat(u?"focus-outline-red b--red-muted":"focus-outline-green b--green-muted"),onChange:function(e){return o(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&O(e)},value:i}),Object(r.jsxs)("div",{className:"tr",children:[Object(r.jsx)(v.a,{minWidth:100,height:40,bg:"bg-charcoal",className:"tc",disabled:i===me.a,onClick:x,children:a("app:actions.reset")}),Object(r.jsx)(v.a,{minWidth:100,height:40,className:"mt2 mt0-l ml2-l tc",disabled:!m||i===n,children:a("actions.submit")})]})]})}))),Oe=t(1642),ve=t.n(Oe),xe=(t(1648),t(1650),function(e){Object(s.a)(t,e);var a=Object(i.a)(t);function t(){return Object(n.a)(this,t),a.apply(this,arguments)}return Object(c.a)(t,[{key:"render",value:function(){var e=this.props,a=e.value,t=e.readOnly,n=e.onChange,c=Math.max(500,16*a.split("\n").length);return Object(r.jsx)("div",{className:"pv3 bg-navy br2",children:Object(r.jsx)(ve.a,{value:a,readOnly:t,onChange:n,mode:"json",theme:"ipfs_dark",width:"100%",height:c+"px",fontSize:12,showPrintMargin:!1,showGutter:!0,editorProps:{$blockScrolling:1/0},setOptions:{showLineNumbers:!0,tabSize:2}})})}}]),t}(o.a.Component)),ye=t(183),Ne=t(269),ke=Object(b.b)("selectExperiments","doExpToggleAction",(function(e){var a=e.doExpToggleAction,t=e.experiments,n=e.t;if(t&&t.length>0){var c=function(e,a){return n("Experiments.".concat(a?"".concat(a,".").concat(e):"".concat(e)))};return Object(r.jsxs)(O.a,{className:"mb3 pa4 lh-copy",children:[Object(r.jsx)(Ne.a,{children:n("experiments")}),Object(r.jsx)("p",{className:"db mv4 f6 charcoal mw7",children:c("description")}),Object(r.jsx)("div",{className:"flex flex-wrap pb3",children:t.map((function(e){var t=e.key,n=e.actionUrls,s=e.enabled,i=e.blocked;return Object(r.jsxs)("div",{className:"pa3 mr3 mb3 mw6 br3 bg-white dib f6 ba b1 b--light-gray",children:[Object(r.jsx)("h3",{children:c("title",t)}),Object(r.jsx)("p",{className:"charcoal",children:c("description",t)}),Object(r.jsx)(ye.a,{className:"dib",disabled:i,onChange:function(){return a(t,s)},checked:s,label:Object(r.jsx)("span",{className:"fw5 f6",children:c("label",t)})}),n&&Object(r.jsx)("div",{className:"mv3",children:n.map((function(e,a){return Object(r.jsx)("a",{target:"_blank",rel:"noopener noreferrer",className:"link blue pr2 ".concat(a>0&&"bl b1 pl2 b--light-gray"),href:e.url,children:c(e.key)},e.key)}))})]},t)}))})]})}return null})),we=t(1018),Se=t(39),Ce=t(988),Ae=t(14),Ee=function(e){var a=e.t,t=e.tReady,n=e.isIpfsConnected,c=e.ipfsPendingFirstConnection,s=e.isIpfsDesktop,i=e.isConfigBlocked,l=e.isLoading,o=e.isSaving,b=e.arePinningServicesSupported,u=e.hasSaveFailed,f=e.hasSaveSucceded,g=e.hasErrors,x=e.hasLocalChanges,y=e.hasExternalChanges,N=e.config,k=e.onChange,w=e.onReset,S=e.onSave,C=e.editorKey,A=e.analyticsEnabled,E=e.doToggleAnalytics,L=e.toursEnabled,P=e.handleJoyrideCallback,_=e.isCliTutorModeEnabled,I=e.doToggleCliTutorMode,T=e.command;return Object(r.jsxs)("div",{"data-id":"SettingsPage",className:"mw9 center",children:[Object(r.jsx)(d.Helmet,{children:Object(r.jsxs)("title",{children:[a("title")," | IPFS"]})}),c?Object(r.jsx)("div",{className:"absolute flex items-center justify-center w-100 h-100",style:{background:"rgba(255, 255, 255, 0.5)",zIndex:"10"},children:Object(r.jsx)(Se.a,{})}):null,s?null:Object(r.jsx)(O.a,{className:"mb3 pa4-l pa2 joyride-settings-customapi",children:Object(r.jsxs)("div",{className:"lh-copy charcoal",children:[Object(r.jsx)(Ne.a,{children:a("app:terms.apiAddress")}),Object(r.jsx)(j.a,{i18nKey:"apiDescription",t:a,children:Object(r.jsxs)("p",{children:["If your node is configured with a ",Object(r.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"}),", including a port other than the default 5001, enter it here."]})}),Object(r.jsx)(fe.a,{})]})}),Object(r.jsx)(O.a,{className:"mb3 pa4-l pa2",children:Object(r.jsxs)("div",{className:"lh-copy charcoal",children:[Object(r.jsx)(Ne.a,{children:a("app:terms.publicGateway")}),Object(r.jsx)(j.a,{i18nKey:"publicGatewayDescription",t:a,children:Object(r.jsxs)("p",{children:["Choose which ",Object(r.jsx)("a",{className:"link blue",href:"http://docs.ipfs.io/concepts/ipfs-gateway/#public-gateways",target:"_blank",rel:"noopener noreferrer",children:"public gateway"})," you want to use to open your files."]})}),Object(r.jsx)(ge,{})]})}),Object(r.jsxs)(O.a,{className:"mb3 pa4-l pa2 joyride-settings-pinning",children:[Object(r.jsx)(Ne.a,{children:a("pinningServices.title")}),Object(r.jsxs)("p",{className:"ma0 mr2 lh-copy charcoal f6",children:[a(b?"pinningServices.description":"pinningServices.noPinRemoteDescription"),"\xa0",Object(r.jsx)("a",{className:"link blue",target:"_blank",rel:"noopener noreferrer",href:"https://docs.ipfs.io/how-to/work-with-pinning-services/",children:a("learnMoreLink")})]}),Object(r.jsx)(pe,{t:a})]}),Object(r.jsxs)(O.a,{className:"mb3 pa4-l pa2",children:[Object(r.jsxs)("div",{className:"mb4 joyride-settings-language",children:[Object(r.jsx)(Ne.a,{children:a("language")}),Object(r.jsx)(M,{t:a})]}),Object(r.jsxs)("div",{className:"joyride-settings-analytics",children:[Object(r.jsx)(Ne.a,{children:a("analytics")}),Object(r.jsx)(he.a,{t:a,doToggleAnalytics:E,analyticsEnabled:A})]})]}),Object(r.jsx)(ke,{t:a}),Object(r.jsx)(O.a,{className:"mb3 pa4-l pa2 joyride-settings-tutormode",children:Object(r.jsxs)("div",{className:"charcoal",children:[Object(r.jsx)(Ne.a,{children:a("cliTutorMode")}),Object(r.jsx)(ye.a,{className:"dib",onChange:I,checked:_,label:Object(r.jsx)("span",{className:"f5 lh-copy",children:a("cliToggle.label")})}),Object(r.jsx)(j.a,{i18nKey:"cliDescription",t:a,children:Object(r.jsxs)("p",{className:"f6 mv2",children:['Enable this option to display a "view code" ',Object(r.jsx)(Ce.a,{className:"dib v-mid icon mh1 fill-charcoal",viewBox:"14 20 70 66",style:{height:24}})," icon next to common IPFS commands. Clicking it opens a modal with that command's CLI code, so you can paste it into the IPFS command-line interface in your terminal."]})})]})}),n&&Object(r.jsxs)(O.a,{className:"mb3 pa4-l pa2",children:[Object(r.jsxs)("div",{className:"joyride-settings-config",children:[Object(r.jsx)(Ne.a,{children:a("config")}),Object(r.jsxs)("div",{className:"flex pb3",children:[Object(r.jsx)("div",{className:"flex-auto",children:Object(r.jsx)("div",{className:"mw7",children:Object(r.jsx)(Me,{t:a,tReady:t,config:N,isIpfsConnected:n,isConfigBlocked:i,isLoading:l,hasExternalChanges:y,hasSaveFailed:u,hasSaveSucceded:f})})}),N?Object(r.jsxs)("div",{className:"flex flex-column justify-center flex-row-l items-center-l",children:[Object(r.jsx)(we.a,{showIcon:!0,config:N,t:a,command:T}),Object(r.jsx)(v.a,{minWidth:100,height:40,bg:"bg-charcoal",className:"tc",disabled:o||!x&&!y,onClick:w,children:a("app:actions.reset")}),Object(r.jsx)(Le,{t:a,tReady:t,hasErrors:g,hasSaveFailed:u,hasSaveSucceded:f,hasLocalChanges:x,hasExternalChanges:y,isSaving:o,onClick:S})]}):null]})]}),N?Object(r.jsx)(xe,{value:N,onChange:k,readOnly:o},C):null]}),Object(r.jsx)(p.b,{run:L,steps:h.d.getSteps({t:a,Trans:j.a}),styles:h.d.styles,callback:P,continuous:!0,scrollToFirstStep:!0,locale:Object(m.a)(a),showProgress:!0})]})},Le=function(e){var a=e.t,t=e.hasErrors,n=e.hasSaveFailed,c=e.hasSaveSucceded,s=e.isSaving,i=e.hasLocalChanges,l=e.hasExternalChanges,o=e.onClick,d=c?"bg-green":"bg-teal";return Object(r.jsx)(v.a,{minWidth:100,height:40,className:"mt2 mt0-l ml2-l tc",bg:d,disabled:!i||t,danger:n||l,onClick:o,children:c&&!n?Object(r.jsx)(g.a,{height:16,className:"fill-snow",style:{transform:"scale(3)"}}):a(s?"app:actions.saving":"app:actions.save")})},Me=function(e){var a=e.t,t=e.isIpfsConnected,n=e.isConfigBlocked,c=e.hasExternalChanges,s=e.hasSaveFailed,i=e.hasSaveSucceded,l=e.isLoading,o=e.config;return n?Object(r.jsx)("p",{className:"ma0 lh-copy charcoal f5 mw7",children:a("configApiNotAvailable")}):t?o?c?Object(r.jsx)("p",{className:"ma0 lh-copy red f5 mw7",children:Object(r.jsxs)(j.a,{i18nKey:"settingsHaveChanged",t:a,children:["The settings have changed, please click ",Object(r.jsx)("strong",{children:"Reset"})," to update the editor contents"]})}):s?Object(r.jsxs)("p",{className:"ma0 lh-copy red fw6 f5 mw7",children:[a("errorOccured"),Object(r.jsx)("span",{className:"db fw4 f6 charcoal-muted",children:a("checkConsole")})]}):i?Object(r.jsxs)("p",{className:"ma0 lh-copy green fw6 f5 mw7",children:[a("changesSaved"),Object(r.jsx)("span",{className:"db fw4 f6 charcoal-muted",children:a("settingsWillBeUsedNextTime")})]}):Object(r.jsxs)("p",{className:"ma0 mr2 lh-copy charcoal f5",children:[a("ipfsConfigDescription")," ",Object(r.jsx)("a",{href:"https://github.com/ipfs/go-ipfs/blob/master/docs/config.md",rel:"noopener noreferrer",target:"_blank",className:"link blue",children:a("ipfsConfigHelp")})]}):Object(r.jsx)("p",{className:"ma0 lh-copy charcoal f5 mw7",children:a(l?"fetchingSettings":"settingsUnavailable")}):Object(r.jsx)("p",{className:"ma0 lh-copy charcoal f5 mw7",children:a("ipfsDaemonOffline")})},Pe=function(e){Object(s.a)(t,e);var a=Object(i.a)(t);function t(){var e;Object(n.a)(this,t);for(var c=arguments.length,s=new Array(c),i=0;iDate.now()-3e3}},{key:"componentDidUpdate",value:function(e){var a=this;if(this.props.configSaveLastSuccess!==e.configSaveLastSuccess&&setTimeout((function(){return a.onReset()}),3e3),e.config!==this.props.config){if(!e.config||this.isRecent(this.props.configSaveLastSuccess))return this.setState({editableConfig:this.props.config});if(this.props.config!==this.state.editableConfig)return this.setState({hasExternalChanges:!0})}}},{key:"render",value:function(){var e=this.props,a=e.t,t=e.tReady,n=e.isConfigBlocked,c=e.ipfsConnected,s=e.configIsLoading,i=e.configLastError,l=e.configIsSaving,o=e.arePinningServicesSupported,d=e.configSaveLastSuccess,b=e.configSaveLastError,j=e.isIpfsDesktop,u=e.analyticsEnabled,p=e.doToggleAnalytics,h=e.toursEnabled,f=e.handleJoyrideCallback,m=e.isCliTutorModeEnabled,g=e.doToggleCliTutorMode,O=e.ipfsPendingFirstConnection,v=this.state,x=v.hasErrors,y=v.hasLocalChanges,N=v.hasExternalChanges,k=v.editableConfig,w=v.editorKey,S=this.isRecent(d),C=this.isRecent(b),A=s||!k&&!i;return Object(r.jsx)(Ee,{t:a,tReady:t,isIpfsConnected:c,ipfsPendingFirstConnection:O,isConfigBlocked:n,isLoading:A,isSaving:l,arePinningServicesSupported:o,hasSaveFailed:C,hasSaveSucceded:S,hasErrors:x,hasLocalChanges:y,hasExternalChanges:N,config:k,editorKey:w,onChange:this.onChange,onReset:this.onReset,onSave:this.onSave,isIpfsDesktop:j,analyticsEnabled:u,doToggleAnalytics:p,toursEnabled:h,handleJoyrideCallback:f,doToggleCliTutorMode:g,isCliTutorModeEnabled:m,command:Ae.h[Ae.f.UPDATE_IPFS_CONFIG]()})}}]),t}(o.a.Component),_e=Object(u.a)("settings")(Pe);a.default=Object(b.b)("selectConfig","selectIpfsConnected","selectIpfsPendingFirstConnection","selectIsConfigBlocked","selectConfigLastError","selectConfigIsLoading","selectConfigIsSaving","selectConfigSaveLastSuccess","selectConfigSaveLastError","selectIsIpfsDesktop","selectToursEnabled","selectAnalyticsEnabled","selectArePinningServicesSupported","doToggleAnalytics","doSaveConfig","selectIsCliTutorModeEnabled","doToggleCliTutorMode",Object(f.a)(_e))},964:function(e,a,t){"use strict";t.d(a,"b",(function(){return r})),t.d(a,"c",(function(){return l})),t.d(a,"a",(function(){return o}));var n=t(1),c=t(3),s=t(77),i=(t(0),t(143)),r=function(e){var a=e.justify,t=e.className,i=e.children,r=Object(s.a)(e,["justify","className","children"]);return Object(n.jsx)("div",Object(c.a)(Object(c.a)({className:"flex justify-".concat(a," pa2 ").concat(t),style:{backgroundColor:"#f4f6f8"}},r),{},{children:i}))};r.defaultProps={justify:"between",className:""};var l=function(e){var a=e.className,t=e.Icon,i=e.title,r=e.children,l=Object(s.a)(e,["className","Icon","title","children"]);return Object(n.jsxs)("div",Object(c.a)(Object(c.a)({className:"ph4 pv3 tc ".concat(a)},l),{},{children:[t&&Object(n.jsx)("div",{className:"center bg-snow br-100 flex justify-center items-center",style:{width:"80px",height:"80px"},children:Object(n.jsx)(t,{className:"fill-gray w3"})}),Object(n.jsx)("p",{className:"charcoal fw6 truncate",children:i}),r]}))};l.defaultProps={className:""};var o=function(e){var a=e.onCancel,t=e.children,r=e.className,l=Object(s.a)(e,["onCancel","children","className"]);return Object(n.jsxs)("div",Object(c.a)(Object(c.a)({className:"".concat(r," bg-white w-80 shadow-4 sans-serif relative"),style:{maxWidth:"34em"}},l),{},{children:[a&&Object(n.jsx)(i.a,{className:"absolute pointer w2 h2 top-0 right-0 fill-gray",onClick:a}),t]}))};o.defaultProps={onCancel:null,className:""}},965:function(e,a,t){"use strict";var n=t(3),c=t(1),s=t(62),i=t(63),r=t(108),l=t(107),o=t(0),d=t.n(o),b=t(37),j=t(141);a.a=function(e){var a=function(a){Object(r.a)(o,a);var t=Object(l.a)(o);function o(){var e;Object(s.a)(this,o);for(var a=arguments.length,n=new Array(a),c=0;c