(this["webpackJsonpipfs-webui"]=this["webpackJsonpipfs-webui"]||[]).push([[9],{1016:function(e,t,a){"use strict";var n=a(3),c=a(1);a(0);t.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"})}))}},1017:function(e,t,a){"use strict";var n=a(3),c=a(1),s=a(77),i=a(62),r=a(63),o=a(108),l=a(107),d=a(0),u=a.n(d),j=a(182),b=a(964),h=a(39),p=a(957),m=function(e){Object(o.a)(a,e);var t=Object(l.a)(a);function a(e){var n;return Object(i.a)(this,a),(n=t.call(this,e)).onChange=function(e){var t=e.target.value;n.props.onChange&&(t=n.props.onChange(t)),n.props.onInputChange&&n.props.onInputChange(t),n.setState({value:t})},n.onSubmit=function(){(!n.props.validate||n.props.validate&&n.props.validate(n.state.value))&&n.props.onSubmit(n.state.value)},n.onKeyPress=function(e){"Enter"===e.key&&n.onSubmit()},n.state={value:e.defaultValue},n}return Object(r.a)(a,[{key:"render",value:function(){var e=this.props,t=e.t,a=e.onCancel,i=(e.onChange,e.onInputChange,e.mustBeDifferent,e.onSubmit,e.className),r=e.Icon,o=e.submitText,l=(e.validate,e.defaultValue,e.description),d=e.title,u=(e.error,e.loading),p=Object(s.a)(e,["t","onCancel","onChange","onInputChange","mustBeDifferent","onSubmit","className","Icon","submitText","validate","defaultValue","description","title","error","loading"]);return Object(c.jsxs)(b.a,Object(n.a)(Object(n.a)({},p),{},{className:i,onCancel:a,children:[Object(c.jsxs)(b.c,{title:d,Icon:r,children:[l&&"object"===typeof l&&l,l&&"string"===typeof l&&Object(c.jsx)("p",{className:"charcoal w-90 tl center",children:l}),Object(c.jsx)("input",{onChange:this.onChange,onKeyPress:this.onKeyPress,value:this.state.value,required:!0,className:"input-reset charcoal ba b--black-20 br1 pa2 mb2 db w-90 center focus-outline ".concat(this.inputClass),type:"text"})]}),Object(c.jsxs)(b.b,{children:[Object(c.jsx)(j.a,{className:"ma2 tc",bg:"bg-gray",onClick:a,children:t("actions.cancel")}),Object(c.jsx)(j.a,{className:"ma2 tc",bg:"bg-teal",disabled:this.isDisabled,onClick:this.onSubmit,children:o})]}),u&&Object(c.jsxs)("div",{className:"flex items-center justify-center absolute top-0 left-0 right-0 bottom-0",children:[Object(c.jsx)("div",{className:"absolute top-0 left-0 right-0 bottom-0 bg-light-gray o-80"}),Object(c.jsx)(h.a,{style:{width:"50%",margin:"auto"}})]})]}))}},{key:"inputClass",get:function(){return!this.props.validate||""===this.state.value||this.props.mustBeDifferent&&this.state.value===this.props.defaultValue?"":this.props.error?"b--red-muted focus-outline-red":this.props.validate(this.state.value)?"b--green-muted focus-outline-green":"b--red-muted focus-outline-red"}},{key:"isDisabled",get:function(){return!!(""===this.state.value||this.props.mustBeDifferent&&this.state.value===this.props.defaultValue)||!!this.props.validate&&!this.props.validate(this.state.value)}}]),a}(u.a.Component);m.defaultProps={className:"",defaultValue:"",submitText:"Save",mustBeDifferent:!1},t.a=Object(p.a)("app")(m)},1018:function(e,t,a){"use strict";var n=a(3),c=a(1),s=a(77),i=a(0),r=a(37),o=a(964),l=a(988),d=a(182),u=a(976),j=a(975),b=a(989),h=a(14),p=function(e){var t=e.command,a=e.t,i=e.onLeave,r=e.className,u=e.downloadConfig,p=Object(s.a)(e,["command","t","onLeave","className","downloadConfig"]);return Object(c.jsxs)(o.a,Object(n.a)(Object(n.a)({},p),{},{className:r,onCancel:i,style:{maxWidth:"40em"},children:[Object(c.jsxs)(o.c,{Icon:l.a,children:[Object(c.jsx)("p",{className:"charcoal w-80 center",style:{lineHeight:"1.3"},children:a("app:cliModal.description")}),Object(c.jsxs)("p",{className:"charcoal-muted w-90 center",children:[t&&t===h.h[h.f.UPDATE_IPFS_CONFIG]()?a("settings:cliModal.extraNotesJsonConfig"):"",t&&t.startsWith(h.g.PIN_OBJECT)?a("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:"$ "}),t]})})})]}),Object(c.jsxs)(o.b,{children:[Object(c.jsx)("div",{children:Object(c.jsx)(d.a,{className:"ma2 tc",bg:"bg-gray",onClick:i,children:a("app:actions.close")})}),Object(c.jsxs)("div",{className:"flex items-center",children:[t&&t===h.h[h.f.UPDATE_IPFS_CONFIG]()?Object(c.jsx)(b.a,{onClick:u,className:"dib fill-link pointer",style:{height:38}}):Object(c.jsx)("div",{}),Object(c.jsx)(d.a,{className:"ma2 tc",onClick:function(){return e=t,void navigator.clipboard.writeText(e).then((function(){i()}));var e},children:a("app:actions.copy")})]})]})]}))};p.defaultProps={className:""},t.a=Object(r.b)("doOpenCliTutorModal","selectIsCliTutorModalOpen","selectIsCliTutorModeEnabled",(function(e){var t=e.t,a=e.filesPage,n=e.isCliTutorModeEnabled,s=e.onLeave,r=e.isCliTutorModalOpen,o=e.command,d=e.config,j=e.showIcon,b=e.doOpenCliTutorModal;return n?a?Object(c.jsx)(p,{className:"outline-0",onLeave:s,t:t,command:o}):Object(c.jsxs)(i.Fragment,{children:[j?Object(c.jsx)(l.a,{onClick:function(){return b(!0)},className:"dib fill-link pointer mh2",style:{height:44}}):Object(c.jsx)("div",{}),Object(c.jsx)(u.a,{show:r,onLeave:function(){return b(!1)},children:Object(c.jsx)(p,{className:"outline-0",onLeave:function(){return b(!1)},t:t,command:o,downloadConfig:function(){return function(e){var t=window.URL.createObjectURL(new Blob([e])),a=document.createElement("a");a.style.display="none",a.href=t,a.download="settings.json",document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(t)}(d)}})})]}):null}))},1044:function(e,t,a){"use strict";var n=a(3),c=a(1);a(0);t.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"})]}))}},1045:function(e,t,a){"use strict";var n=a(3),c=a(1);a(0);t.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:"M90 39.9a4.75 4.75 0 0 0-5.4-3.9 4.66 4.66 0 0 0-2.18 1l-8.25-5.41a4.59 4.59 0 0 0 .11-2 4.81 4.81 0 0 0-.25-.94l5.3-4.33a1.22 1.22 0 0 0 .17.15 4.67 4.67 0 0 0 2.78.91 4.79 4.79 0 0 0 3.85-2 4.75 4.75 0 0 0-4.58-7.48 4.74 4.74 0 0 0-4 5.43c0 .13.07.26.1.39l-5.59 4.57a4.69 4.69 0 0 0-3.26-.69 4.85 4.85 0 0 0-.63.16L58.16 11.6c.06-.07.12-.12.17-.19a4.68 4.68 0 0 0 .85-3.53 4.76 4.76 0 1 0-4 5.43c.14 0 .26-.07.4-.1L65.77 27.5a4.73 4.73 0 0 0-.86 3.5c0 .15.07.29.1.43L50 41.13l-.17-.13a4.73 4.73 0 0 0-3.53-.84 4.75 4.75 0 0 0-.7 9.21l.4 25.88a4.73 4.73 0 0 0-2.14 1.53L19.4 67.92a6.35 6.35 0 0 0 0-.87 4.73 4.73 0 0 0-1.9-3.1 4.75 4.75 0 1 0-2.79 8.59 4.73 4.73 0 0 0 3.71-1.81L42.8 79.6a5 5 0 0 0 .05.86c0 .16.08.31.12.46l-10.3 6.75-.14-.13a4.73 4.73 0 0 0-3.53-.85 4.75 4.75 0 0 0 .73 9.44 4.84 4.84 0 0 0 .75-.06 4.73 4.73 0 0 0 3.94-5.43 3.43 3.43 0 0 0-.11-.46l10.3-6.75a4.64 4.64 0 0 0 3.67 1 4.75 4.75 0 0 0 3.61-2.82l12 1a4.73 4.73 0 1 0 .24-3l-12-1A4.73 4.73 0 0 0 49 75.22l-.4-25.93a4.72 4.72 0 0 0 3.13-5.22c0-.14-.08-.28-.11-.42l15-9.66c.06 0 .11.11.17.15a4.7 4.7 0 0 0 3.53.85 4.8 4.8 0 0 0 2.19-1l8.24 5.41a4.74 4.74 0 1 0 9.25.5zM16.88 69.41A2.75 2.75 0 0 1 12 68.22a2.75 2.75 0 0 1 2.28-3.14 3.25 3.25 0 0 1 .44 0 2.73 2.73 0 0 1 1.6.52 2.69 2.69 0 0 1 1.1 1.79 2.73 2.73 0 0 1-.54 2.02zm51.2 9.34a3.11 3.11 0 0 1 .43 0 2.74 2.74 0 0 1 1.61.52 2.69 2.69 0 0 1 1.1 1.73 2.75 2.75 0 1 1-3.14-2.28zM80.07 19A2.74 2.74 0 0 1 85 20.18a2.7 2.7 0 0 1-.49 2 2.75 2.75 0 0 1-3.84.61A2.74 2.74 0 0 1 79.58 21a2.7 2.7 0 0 1 .49-2zm-27.19-8.16a2.74 2.74 0 0 1 1.18-4.93 3.27 3.27 0 0 1 .44 0 2.75 2.75 0 1 1-1.62 5zM32 93a2.75 2.75 0 0 1-3.84.61 2.77 2.77 0 0 1-1.16-1.8 2.73 2.73 0 0 1 .5-2 2.69 2.69 0 0 1 1.79-1.09 2.09 2.09 0 0 1 .43 0 2.68 2.68 0 0 1 1.61.53A2.74 2.74 0 0 1 32 93zm18.29-13.7a2.74 2.74 0 1 1-3.18-2.3 3.13 3.13 0 0 1 .43 0 2.75 2.75 0 0 1 2.71 2.29zm-1-32.86a2.77 2.77 0 0 1-1.8 1.1 2.71 2.71 0 0 1-2-.5 2.74 2.74 0 0 1-1.1-1.79 2.71 2.71 0 0 1 .5-2 2.74 2.74 0 0 1 1.79-1.1 3.11 3.11 0 0 1 .43 0 2.74 2.74 0 0 1 1.61.52 2.69 2.69 0 0 1 1.1 1.8 2.75 2.75 0 0 1-.56 1.96zM70 33a2.75 2.75 0 1 1 2.29-3.14A2.75 2.75 0 0 1 70 33zm15.77 10.35a2.75 2.75 0 0 1-3.14-2.28 2.74 2.74 0 1 1 3.14 2.28z"})}))}},1104:function(e,t,a){"use strict";var n=a(3),c=a(1);a(0);t.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:"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"})}))}},1610:function(e,t,a){},1611:function(e,t,a){},1612:function(e,t,a){},1614:function(e,t,a){},1615:function(e,t,a){},1616:function(e,t,a){},1660:function(e,t,a){"use strict";a.r(t);var n=a(3),c=a(1),s=a(2),i=a.n(s),r=a(11),o=a(78),l=a(0),d=a.n(l),u=a(34),j=a(142),b=a(37),h=a(181),p=a(957),m=a(141),f=a(187),x=function(e,t,a){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"GET",c=new window.XMLHttpRequest,s=0,i=function(){c.abort(),a(null)};return c.responseType="blob",c.open(n,e,!0),c.onload=function(e){a(100);var n=c.response,s=new window.Blob([n]),i=window.URL.createObjectURL(s),r=document.createElement("a");document.body.appendChild(r),r.style="display:none",r.href=i,r.download=t,r.click(),window.URL.revokeObjectURL(i),a(null)},c.onprogress=function(e){s=e.lengthComputable?e.total:s||c.getResponseHeader("X-Content-Length")||c.getResponseHeader("Content-Length"),a(e.loaded/s*100)},c.send(),{abort:i}},O=a(62),v=a(63),g=a(108),w=a(107),y=a(1043),N=a(77),C=a(1103),M=a(988),k=function(e){var t=e.children,a=e.onClick,s=e.className,i=void 0===s?"":s,r=e.isCliTutorModeEnabled,o=e.onCliTutorMode,l=Object(N.a)(e,["children","onClick","className","isCliTutorModeEnabled","onCliTutorMode"]);return r?Object(c.jsxs)("div",{className:"flex items-center justify-between",children:[Object(c.jsx)("button",Object(n.a)(Object(n.a)({role:"menuitem",className:"bg-animate hover-bg-near-white pa2 pointer flex items-center flex-grow-1 ".concat(i),onClick:a},l),{},{children:t})),Object(c.jsx)("button",Object(n.a)(Object(n.a)({},l),{},{className:"bg-animate hover-bg-near-white pa2 pointer flex items-center ".concat(i),children:Object(c.jsx)(M.a,Object(n.a)(Object(n.a)({},l),{},{onClick:function(){return o(!0)},className:"dib fill-link pointer",style:{height:38}}))}))]}):Object(c.jsx)("button",Object(n.a)(Object(n.a)({role:"menuitem",className:"bg-animate hover-bg-near-white pa2 pointer flex items-center ".concat(i),onClick:a},l),{},{children:t}))},z=Object(l.forwardRef)((function(e,t){var a=e.children,s=e.arrowMarginRight,i=e.width,r=void 0===i?200:i,o=e.translateX,l=void 0===o?0:o,d=e.translateY,u=void 0===d?0:d,j=Object(N.a)(e,["children","arrowMarginRight","width","translateX","translateY"]);return Object(c.jsx)(C.b,Object(n.a)(Object(n.a)({className:"sans-serif br2 charcoal",boxShadow:"rgba(105, 196, 205, 0.5) 0px 1px 10px 0px",width:r,arrowAlign:"right",arrowMarginRight:s||"13px",left:"calc(100% - ".concat(r,"px)"),translateX:l,translateY:u},j),{},{children:Object(c.jsx)("div",{className:"flex flex-column",ref:t,role:"menu",children:a})}))})),S=C.a,P=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:"M67.36 30.73H29.1a3.92 3.92 0 0 0-3.91 3.91V72.9a3.92 3.92 0 0 0 3.91 3.91h38.26a3.92 3.92 0 0 0 3.91-3.91V34.64a3.91 3.91 0 0 0-3.91-3.91zm1.31 42.17a1.31 1.31 0 0 1-1.31 1.31H29.1a1.31 1.31 0 0 1-1.31-1.31V34.64a1.31 1.31 0 0 1 1.31-1.31h38.26a1.31 1.31 0 0 1 1.31 1.31z"}),Object(c.jsx)("path",{d:"M72.75 23.19h-32.3a1.3 1.3 0 0 0 0 2.6h32.3A4.3 4.3 0 0 1 77 30.08v32.3a1.3 1.3 0 0 0 2.6 0v-32.3a6.9 6.9 0 0 0-6.85-6.89zM35.37 45.68H47.9a.75.75 0 0 0 0-1.5H35.37a.75.75 0 0 0 0 1.5zM61.1 53H35.37a.75.75 0 0 0 0 1.5H61.1a.75.75 0 0 0 0-1.5zm0 8.86H35.37a.75.75 0 1 0 0 1.5H61.1a.75.75 0 1 0 0-1.5z"})]}))},F=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:"M68.4 54.52a11.35 11.35 0 0 0-9.17 4.69l-16.41-7.6A12.34 12.34 0 0 0 43 50a12.06 12.06 0 0 0-.13-1.61l16.41-7.6a11.33 11.33 0 1 0-2.18-6.66v.49l-17 7.87a11.34 11.34 0 1 0 0 15l17 7.86v.49a11.35 11.35 0 1 0 11.3-11.32zm0-29.14a8.75 8.75 0 1 1-8.75 8.75 8.76 8.76 0 0 1 8.75-8.75zM57.25 36.19a11.12 11.12 0 0 0 1.17 3.32L42.5 46.88A11.38 11.38 0 0 0 41 43.7zM31.6 58.75A8.75 8.75 0 1 1 40.35 50a9.66 9.66 0 0 1-.15 1.62 8.76 8.76 0 0 1-8.6 7.13zM41 56.3a11.55 11.55 0 0 0 1.48-3.18l15.91 7.37a11.12 11.12 0 0 0-1.17 3.32zm27.4 18.32a8.75 8.75 0 1 1 8.75-8.75 8.77 8.77 0 0 1-8.75 8.75z"})}))},I=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:"M82.89 25.64l-6.53-6.53a7.79 7.79 0 0 0-11 .35L23.72 61.1l-4.6 17.19a3.8 3.8 0 0 0 1 3.61 3.74 3.74 0 0 0 2.64 1.1 3.87 3.87 0 0 0 .95-.12l17.19-4.6 41.64-41.64a7.79 7.79 0 0 0 .35-11zM58 31l13 13-2.28 2.28-12.98-12.96zM26 64.21L37.79 76l-11.16 3L23 75.23zM23 80a.8.8 0 0 1-.77-.19A.75.75 0 0 1 22 79l.41-1.54 2 2.09zm16.78-4.8L26.83 62.23l27.49-27.49 12.94 12.94zm40.64-40.68l-8 8-12.99-12.89 8.05-8a4.8 4.8 0 0 1 6.76-.35l6.53 6.53a4.8 4.8 0 0 1-.35 6.71z"})}))},R=a(147),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:"M25.98 73.62a9.68 9.68 0 0 0 9.45 9.88h29.15a9.68 9.68 0 0 0 9.44-9.88V30.2h-48zm3-40.42h42v40.42a6.68 6.68 0 0 1-6.44 6.88H35.43a6.68 6.68 0 0 1-6.45-6.88z"}),Object(c.jsx)("path",{d:"M39.12 74.54a1 1 0 0 0 1-1V39.2a1 1 0 0 0-2 0v34.34a1 1 0 0 0 1 1zm10.77 0a1 1 0 0 0 1-1V39.2a1 1 0 0 0-2 0v34.34a1 1 0 0 0 1 1zm10.78 0a1 1 0 0 0 1-1V39.2a1 1 0 0 0-2 0v34.34a1 1 0 0 0 1 1zm15.17-50.29h-14a.92.92 0 0 0-.12-.53l-4-6.73a1 1 0 0 0-.86-.49H43.14a1 1 0 0 0-.86.49l-4 6.73a.92.92 0 0 0-.12.53h-14a1.5 1.5 0 0 0 0 3h51.68a1.5 1.5 0 0 0 0-3zM43.71 18.5H56.3l3.4 5.75H40.32z"})]}))},T=a(989),E=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:"M86.26 39.86l-23.71-23.7a2.44 2.44 0 0 0-4.08 1.1 27.42 27.42 0 0 0-1.07 6.84L39.15 42.34a28.5 28.5 0 0 0-10.33.55 2.39 2.39 0 0 0-1.77 1.68 2.46 2.46 0 0 0 .62 2.43l11 11-18.2 18.12a.68.68 0 0 0-.18.29l-2.39 7.16a.74.74 0 0 0 .18.76.73.73 0 0 0 .53.22 1 1 0 0 0 .24 0L26 82.13a.79.79 0 0 0 .3-.13l18.17-18.22 11 11a2.44 2.44 0 0 0 1.73.72 2.44 2.44 0 0 0 2.37-1.86 28.54 28.54 0 0 0 .55-10.34L78.32 45a27.35 27.35 0 0 0 6.83-1 2.46 2.46 0 0 0 1.74-1.75 2.42 2.42 0 0 0-.63-2.39zm-60.9 40.9l-5.56 1.86 1.85-5.57L39.7 59l3.71 3.71zm31.71-8.06L29.71 45.35a25.94 25.94 0 0 1 9-.45l18.82 17.82a2.55 2.55 0 0 0 0 .83 25.73 25.73 0 0 1-.46 9.15zm1.22-11.32L40.51 44.57a2.15 2.15 0 0 0 .41-.32l17.87-17.87 17.73 16.76zm19.92-19h-.24L59.75 25.22a2.31 2.31 0 0 0 .24-1 24.38 24.38 0 0 1 .92-6l23.32 23.29a24.4 24.4 0 0 1-6.02.91z"})}))},L=a(14),D=function(e){Object(g.a)(a,e);var t=Object(w.a)(a);function a(e){var n;return Object(O.a)(this,a),(n=t.call(this,e)).state={dropdown:!1},n.wrap=function(e,t){return function(){"onCliTutorMode"===e&&t&&n.props.doSetCliOptions(t),n.props.handleClick(),n.props[e]()}},n.dropdownMenuRef=d.a.createRef(),n}return Object(v.a)(a,[{key:"componentDidUpdate",value:function(){if(this.props.autofocus&&this.props.isOpen){if(!this.dropdownMenuRef.current)return;var e=this.dropdownMenuRef.current.querySelector("button");if(!e)return;e.focus()}}},{key:"render",value:function(){var e=this.props,t=e.t,a=e.onRename,n=e.onRemove,s=e.onDownload,i=e.onInspect,r=e.onShare,o=e.translateX,l=e.translateY,d=e.className,u=e.isMfs,j=e.isUnknown,b=e.isCliTutorModeEnabled;return Object(c.jsx)(S,{className:d,children:Object(c.jsxs)(z,{ref:this.dropdownMenuRef,top:-8,arrowMarginRight:"11px",left:"calc(100% - 200px)",translateX:-o,translateY:-l,open:this.props.isOpen,onDismiss:this.props.handleClick,children:[r&&Object(c.jsxs)(k,{onClick:this.wrap("onShare"),children:[Object(c.jsx)(F,{className:"w2 mr2 fill-aqua"}),t("actions.share")]}),Object(c.jsx)(y.CopyToClipboard,{text:String(this.props.cid),onCopy:this.props.handleClick,children:Object(c.jsxs)(k,{children:[Object(c.jsx)(P,{className:"w2 mr2 fill-aqua"}),t("actions.copyHash")]})}),i&&Object(c.jsxs)(k,{onClick:this.wrap("onInspect"),children:[Object(c.jsx)(R.a,{className:"w2 mr2 fill-aqua"}),t("app:actions.inspect")]}),Object(c.jsxs)(k,{onClick:this.wrap("onPinning"),isCliTutorModeEnabled:b,onCliTutorMode:this.wrap("onCliTutorMode",L.f.PIN_OBJECT),children:[Object(c.jsx)(E,{className:"w2 mr2 fill-aqua"}),t("app:actions.setPinning")]}),!j&&s&&Object(c.jsxs)(k,{onClick:this.wrap("onDownload"),isCliTutorModeEnabled:b,onCliTutorMode:this.wrap("onCliTutorMode",L.f.DOWNLOAD_OBJECT_COMMAND),children:[Object(c.jsx)(T.a,{className:"w2 mr2 fill-aqua"}),t("app:actions.download")]}),!j&&u&&a&&Object(c.jsxs)(k,{onClick:this.wrap("onRename"),isCliTutorModeEnabled:b,onCliTutorMode:this.wrap("onCliTutorMode",L.f.RENAME_IPFS_OBJECT),children:[Object(c.jsx)(I,{className:"w2 mr2 fill-aqua"}),t("app:actions.rename")]}),!j&&u&&n&&Object(c.jsxs)(k,{onClick:this.wrap("onRemove"),isCliTutorModeEnabled:b,onCliTutorMode:this.wrap("onCliTutorMode",L.f.REMOVE_FILE_FROM_IPFS),children:[Object(c.jsx)(A,{className:"w2 mr2 fill-aqua"}),t("app:actions.remove")]})]})})}}]),a}(d.a.Component);D.defaultProps={isMfs:!1,isOpen:!1,isUnknown:!1,top:0,left:0,right:"auto",translateX:0,translateY:0,className:""};var B=Object(p.a)("files",{withRef:!0})(D),H=a(965),V=a(257),_=Object(p.a)("files")((function(e){var t=e.t;return Object(c.jsx)("div",{className:"mv4 tc navy f5",children:Object(c.jsx)(V.a,{style:{background:"rgba(105, 196, 205, 0.1)"},children:Object(c.jsx)(h.a,{i18nKey:"companionInfo",t:t,children:Object(c.jsxs)("p",{className:"ma0",children:["As you are using ",Object(c.jsx)("strong",{children:"IPFS Companion"}),", the files view is limited to files added while using the extension."]})})})})})),q=Object(p.a)("files")((function(e){var t=e.t;return Object(c.jsx)("div",{className:"mv4 tc navy f5",children:Object(c.jsx)(V.a,{style:{background:"rgba(105, 196, 205, 0.1)"},children:Object(c.jsx)(h.a,{i18nKey:"addFilesInfo",t:t,children:Object(c.jsxs)("p",{className:"ma0",children:["No files here yet! Add files to your local IPFS node by clicking the ",Object(c.jsx)("strong",{children:"Import"})," button above."]})})})})})),U=function(e){var t=e.isRoot,a=e.isCompanion,n=e.filesExist;return Object(c.jsxs)("div",{children:[t&&a&&Object(c.jsx)(_,{}),t&&!n&&!a&&Object(c.jsx)(q,{})]})},W=a(1652),G=a(1609),Y=a.n(G),X={wav:"audio",bwf:"audio",aiff:"audio",flac:"audio",m4a:"audio",pac:"audio",tta:"audio",wv:"audio",aac:"audio",mp2:"audio",mp3:"audio",amr:"audio",s3m:"audio","3gp":"audio",au:"audio",dct:"audio",dss:"audio",gsm:"audio",m4p:"audio",mmf:"audio",mpc:"audio",ogg:"audio",oga:"audio",opus:"audio",ra:"audio",sln:"audio",vox:"audio","3g2":"video",aaf:"video",asf:"video",avchd:"video",avi:"video",drc:"video",flv:"video",m2v:"video",m4v:"video",mkv:"video",mng:"video",mov:"video",mp4:"video",mpe:"video",mpeg:"video",mpg:"video",mpv:"video",mxf:"video",nsv:"video",ogv:"video",qt:"video",rm:"video",rmvb:"video",roq:"video",svi:"video",vob:"video",webm:"video",wmv:"video",yuv:"video",art:"image",bmp:"image",blp:"image",cd5:"image",cit:"image",cpt:"image",cr2:"image",cut:"image",dds:"image",dib:"image",djvu:"image",egt:"image",exif:"image",gif:"image",gpl:"image",grf:"image",icns:"image",ico:"image",iff:"image",jng:"image",jpeg:"image",jpg:"image",jfif:"image",jp2:"image",jps:"image",lbm:"image",max:"image",miff:"image",msp:"image",nitf:"image",ota:"image",pbm:"image",pc1:"image",pc2:"image",pc3:"image",pcf:"image",pcx:"image",pdn:"image",pgm:"image",PI1:"image",PI2:"image",PI3:"image",pict:"image",pct:"image",pnm:"image",pns:"image",ppm:"image",psb:"image",psd:"image",pdd:"image",psp:"image",px:"image",pxm:"image",pxr:"image",qfx:"image",rle:"image",sct:"image",sgi:"image",rgb:"image",int:"image",bw:"image",tga:"image",tiff:"image",tif:"image",vtf:"image",xbm:"image",xcf:"image",xpm:"image","3dv":"image",amf:"image",ai:"image",awg:"image",cgm:"image",cdr:"image",cmx:"image",dxf:"image",e2d:"image",eps:"image",fs:"image",gbr:"image",odg:"image",svg:"image",stl:"image",vrml:"image",x3d:"image",sxd:"image",v2d:"image",vnd:"image",wmf:"image",emf:"image",png:"image",webp:"image",jxr:"image",hdp:"image",wdp:"image",cur:"image",ecw:"image",liff:"image",nrrd:"image",pam:"image",pgf:"image",rgba:"image",inta:"image",sid:"image",ras:"image",sun:"image",123:"calc","12m":"calc",_xls:"calc",_xlsx:"calc",aws:"calc",bks:"calc",cell:"calc",def:"calc",dex:"calc",dfg:"calc",dis:"calc",edx:"calc",edxz:"calc",ess:"calc",fcs:"calc",fm:"calc",fods:"calc",fp:"calc",gnm:"calc",gnumeric:"calc",gsheet:"calc",hcdt:"calc",imp:"calc",mar:"calc",nb:"calc",ncss:"calc",nmbtemplate:"calc",numbers:"calc","numbers-tef":"calc",ods:"calc",ogw:"calc",ogwu:"calc",ots:"calc",pmd:"calc",pmdx:"calc",pmv:"calc",pmvx:"calc",qpw:"calc",rdf:"calc",sdc:"calc",stc:"calc",sxc:"calc",tmv:"calc",tmvt:"calc",uos:"calc",wki:"calc",wkq:"calc",wks:"calc",wku:"calc",wq1:"calc",wq2:"calc",xl:"calc",xlr:"calc",xls:"calc",xlsb:"calc",xlshtml:"calc",xlsm:"calc",xlsmhtml:"calc",xlsx:"calc",xlthtml:"calc",xltm:"calc",xltx:"calc","1st":"text",_doc:"text",_docx:"text",abw:"text",adoc:"text",aim:"text",ans:"text",apkg:"text",apt:"text",asc:"text",ascii:"text",aty:"text",awp:"text",awt:"text",aww:"text",bad:"text",bbs:"text",bdp:"text",bdr:"text",bean:"text",bib:"text",bibtex:"text",bml:"text",bna:"text",boc:"text",brx:"text",btd:"text",bzabw:"text",calca:"text",charset:"text",chart:"text",chord:"text",cnm:"text",cod:"text",crwl:"text",cws:"text",cyi:"text",dca:"text",dfti:"text",dgs:"text",diz:"text",dne:"text",doc:"text",docm:"text",docx:"text",docxml:"text",docz:"text",dox:"text",dropbox:"text",dsc:"text",dvi:"text",dwd:"text",dx:"text",dxb:"text",dxp:"text",eio:"text",eit:"text",eml:"text",emlx:"text",emulecollection:"text",epp:"text",err:"text",etf:"text",etx:"text",euc:"text","fadein.template":"text",faq:"text",fbl:"text",fcf:"text",fdf:"text",fdr:"text",fds:"text",fdt:"text",fdx:"text",fdxt:"text",fft:"text",fgs:"text",flr:"text",fodt:"text",fountain:"text",fpt:"text",frt:"text",fwd:"text",fwdn:"text",gmd:"text",gpd:"text",gpn:"text",gsd:"text",gthr:"text",gv:"text",hbk:"text",hht:"text",hs:"text",hwp:"text",hz:"text",idx:"text",iil:"text",ipf:"text",ipspot:"text",jarvis:"text",jis:"text",jnp:"text",joe:"text",jp1:"text",jrtf:"text",jtd:"text",kes:"text",klg:"text",knt:"text",kon:"text",kwd:"text",latex:"text",lbt:"text",lis:"text",lnt:"text",log:"text",lp2:"text",lst:"text",ltr:"text",ltx:"text",lue:"text",luf:"text",lwp:"text",lxfml:"text",lyt:"text",lyx:"text",man:"text",mbox:"text",mcw:"text","md5.txt":"text",me:"text",mell:"text",mellel:"text",min:"text",mnt:"text",msg:"text",mw:"text",mwd:"text",mwp:"text",ndoc:"text",nfo:"text",ngloss:"text",njx:"text",note:"text",notes:"text",now:"text",nwctxt:"text",nwm:"text",nwp:"text",ocr:"text",odif:"text",odm:"text",odo:"text",odt:"text",ofl:"text",opeico:"text",openbsd:"text",ort:"text",ott:"text",p7s:"text",pages:"text","pages-tef":"text",pdpcmd:"text",pfx:"text",pjt:"text",plain:"text",plantuml:"text",pmo:"text",prt:"text",psw:"text",pu:"text",pvj:"text",pvm:"text",pwd:"text",pwdp:"text",pwdpl:"text",pwi:"text",pwr:"text",qdl:"text",qpf:"text",rad:"text",readme:"text",rft:"text",ris:"text",rpt:"text",rst:"text",rtd:"text",rtf:"text",rtfd:"text",rtx:"text",run:"text",rvf:"text",rzk:"text",rzn:"text",saf:"text",safetext:"text",sam:"text",save:"text",scc:"text",scm:"text",scriv:"text",scrivx:"text",scw:"text",sdm:"text",sdoc:"text",sdw:"text",se:"text",session:"text",sgm:"text",sig:"text",skcard:"text",sla:"text","sla.gz":"text",smf:"text",sms:"text",ssa:"text",story:"text",strings:"text",stw:"text",sty:"text","sublime-project":"text","sublime-workspace":"text",sxg:"text",sxw:"text",tab:"text",tdf:"text",template:"text",tex:"text",text:"text",textclipping:"text",thp:"text",tlb:"text",tm:"text",tmd:"text",tmdx:"text",tmvx:"text",tpc:"text",trelby:"text",tvj:"text",txt:"text",u3i:"text",unauth:"text",unx:"text",uof:"text",uot:"text",upd:"text",utf8:"text",utxt:"text",vct:"text",vnt:"text",vw:"text",wbk:"text",webdoc:"text",wn:"text",wp:"text",wp4:"text",wp5:"text",wp6:"text",wp7:"text",wpa:"text",wpd:"text",wpl:"text",wps:"text",wpt:"text",wpw:"text",wri:"text",wsd:"text",wtt:"text",wtx:"text",xbdoc:"text",xbplate:"text",xdl:"text",xwp:"text",xy:"text",xy3:"text",xyp:"text",xyw:"text",zabw:"text",zrtf:"text",zw:"text"};var J=function(e){var t=Y()(e);return X[t]||t},K=a(39),Z=(a(1610),a(13),a(1664)),Q=a(109),$=a.n(Q),ee=a(182),te=function(e){var t=e.name,a=e.size,n=e.cid,s=e.path,i=e.children,r=Object(Z.a)({item:{name:t,size:a,cid:n,path:s,type:"FILE"}}),l=Object(o.a)(r,2)[1];return Object(c.jsx)("div",{ref:l,children:i})},ae=Object(b.b)("selectAvailableGatewayUrl","selectPublicGateway",Object(p.a)("files")((function(e){var t=e.t,a=e.name,s=e.cid,d=e.size,u=e.availableGatewayUrl,j=e.publicGateway,b=e.read,p=e.onDownload,m=Object(l.useState)(null),f=Object(o.a)(m,2),x=f[0],O=f[1],v=Object(l.useState)(!1),g=Object(o.a)(v,2),w=g[0],y=g[1],N=Object(l.useState)(null),C=Object(o.a)(N,2),M=C[0],k=C[1],z=J(a),S=Object(l.useCallback)(Object(r.a)(i.a.mark((function e(){var t,a,n,c,s,r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=M,e.t0){e.next=5;break}return e.next=4,b();case 4:e.t0=e.sent;case 5:return t=e.t0,M||k(t),e.next=9,t.next();case 9:a=e.sent,n=a.value,c=a.done,s=(x||"")+$()(n),O(s),r=!c&&(new TextEncoder).encode(s).length4194304?R:x?Object(W.a)(a,x)?R:Object(c.jsxs)(c.Fragment,{children:[Object(c.jsx)("pre",{className:"".concat(F," overflow-auto monospace"),children:x}),w&&Object(c.jsxs)("div",{className:"w-100 flex items-center justify-center",children:[Object(c.jsx)(ee.a,{onClick:S,children:t("loadMore")}),Object(c.jsx)(ee.a,{className:"mh2",onClick:p,children:t("app:actions.download")})]})]}):Object(c.jsx)(K.a,{})}}))),ne=a(33),ce=a(125),se=a.n(ce),ie=a(85),re=a(70),oe=a(127),le=a(120),de=a(145),ue=a(1667),je=a(183),be=a(143),he=(a(1611),{bar:{background:"#F0F6FA",borderColor:"#CFE0E2",color:"#59595A"},count:{backgroundColor:"#69C4CD",color:"#F9FAFB",width:"38px",height:"38px"},countNumber:{top:"50%",left:"50%",transform:"translate(-50%, -50%)"},size:{color:"#A4BFCC"}}),pe=function(e){return e?"w3 pointer hover-fill-navy-muted":"w3"},me=function(e){return e?"pointer":"disabled o-50"},fe=function(e){Object(g.a)(a,e);var t=Object(w.a)(a);function a(e){var n;return Object(O.a)(this,a),(n=t.call(this,e)).state={force100:!1},n.containerRef=d.a.createRef(),n}return Object(v.a)(a,[{key:"componentDidUpdate",value:function(e){var t=this;100===this.props.downloadProgress&&100!==e.downloadProgress&&(this.setState({force100:!0}),setTimeout((function(){t.setState({force100:!1})}),2e3))}},{key:"componentDidMount",value:function(){this.containerRef.current&&this.containerRef.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.t,a=(e.tReady,e.animateOnStart),s=e.count,i=e.size,r=e.unselect,o=e.remove,l=e.share,d=e.setPinning,u=e.download,j=(e.downloadProgress,e.rename),b=e.inspect,h=e.className,p=e.style,m=e.isMfs,f=Object(N.a)(e,["t","tReady","animateOnStart","count","size","unselect","remove","share","setPinning","download","downloadProgress","rename","inspect","className","style","isMfs"]),x=1===s,O={title:t("individualFilesOnly")};return 1===s&&(O={}),Object(c.jsx)("div",Object(n.a)(Object(n.a)({className:se()("sans-serif bt w-100 pa3 ph4-l selectedActions",h,a&&"selectedActionsAnimated"),style:Object(n.a)(Object(n.a)({},he.bar),p)},f),{},{children:Object(c.jsxs)("div",{className:"flex items-center justify-between",children:[Object(c.jsx)("div",{className:"w5-l",children:Object(c.jsxs)("div",{className:"flex items-center",children:[Object(c.jsx)("div",{className:"mr3 relative f3 fw6 flex-shrink-0 dib br-100",style:he.count,children:Object(c.jsx)("span",{className:"absolute",style:he.countNumber,children:s})}),Object(c.jsxs)("div",{className:"dn db-l f6",children:[Object(c.jsx)("p",{className:"ma0",children:t("filesSelected",{count:s})}),Object(c.jsx)("p",{className:"ma0 mt1",style:he.size,children:t("totalSize",{size:Object(oe.c)(i)})})]})]})}),Object(c.jsxs)("div",{className:"flex",role:"menu","aria-label":t("menuOptions"),ref:this.containerRef,tabIndex:"0",children:[Object(c.jsxs)("button",{role:"menuitem",className:"tc mh2",onClick:l,children:[Object(c.jsx)(F,{className:"w3 hover-fill-navy-muted",fill:"#A4BFCC","aria-hidden":"true"}),Object(c.jsx)("p",{className:"ma0 f6",children:t("actions.share")})]}),Object(c.jsxs)("button",{role:"menuitem",className:"tc mh2",onClick:u,children:[Object(c.jsx)(T.a,{className:"w3 hover-fill-navy-muted",fill:"#A4BFCC","aria-hidden":"true"}),Object(c.jsx)("p",{className:"ma0 f6",children:this.downloadText})]}),Object(c.jsxs)("button",{role:"menuitem",className:se()("tc mh2",me(m)),onClick:m?o:null,children:[Object(c.jsx)(A,{className:pe(m),fill:"#A4BFCC","aria-hidden":"true"}),Object(c.jsx)("p",{className:"ma0 f6",children:t("app:actions.remove")})]}),Object(c.jsxs)("button",{role:"menuitem",className:se()("tc mh2",me(x)),onClick:x?d:null,children:[Object(c.jsx)(E,{className:pe(x),fill:"#A4BFCC","aria-hidden":"true"}),Object(c.jsx)("p",{className:"ma0 f6",children:t("app:actions.setPinning")})]}),Object(c.jsxs)("button",Object(n.a)(Object(n.a)({role:"menuitem",className:se()("tc mh2",me(x)),onClick:x?b:null},O),{},{children:[Object(c.jsx)(R.a,{className:pe(x),fill:"#A4BFCC","aria-hidden":"true"}),Object(c.jsx)("p",{className:"ma0 f6",children:t("app:actions.inspect")})]})),Object(c.jsxs)("button",Object(n.a)(Object(n.a)({role:"menuitem",className:se()("tc mh2",me(x&&m)),onClick:x&&m?j:null},O),{},{children:[Object(c.jsx)(I,{className:pe(x&&m),fill:"#A4BFCC","aria-hidden":"true"}),Object(c.jsx)("p",{className:"ma0 f6",children:t("app:actions.rename")})]}))]}),Object(c.jsx)("div",{children:Object(c.jsxs)("button",{onClick:r,className:"flex items-center justify-end f6 charcoal",children:[Object(c.jsx)("span",{className:"mr2 dn db-l",children:t("app:actions.unselectAll")}),Object(c.jsx)("span",{className:"mr2 dn db-m",children:t("app:actions.clear")}),Object(c.jsx)(be.a,{onClick:r,className:"fill-charcoal w1 o-70",viewBox:"37 40 27 27"})]})})]})}))}},{key:"downloadText",get:function(){return this.state.force100?this.props.t("finished"):this.props.downloadProgress?100===this.props.downloadProgress?this.props.t("finished"):this.props.downloadProgress.toFixed(0)+"%":this.props.t("app:actions.download")}}]),a}(d.a.Component);fe.defaultProps={className:""};var xe=Object(p.a)("files")(fe),Oe=a(1016),ve=a(1044),ge=function(e){return Object(c.jsxs)("svg",Object(n.a)(Object(n.a)({viewBox:"0 0 100 100"},e),{},{children:[Object(c.jsx)("path",{opacity:".1",d:"M45.175 31.61a15.613 15.613 0 00-12.767-3.353A15.62 15.62 0 0019.581 43.24 13.38 13.38 0 008 56.63C8 70.36 19.74 72 20.39 72h56.46c4.09 0 11-6.52 11-13.18S83.51 46 77.01 46c-1.876 0-3.723.46-5.38 1.34.048-.445.072-.892.07-1.34a12.618 12.618 0 00-.577-3.956l-9.676 9.72a23 23 0 01-.56 7.258l-.02.086-.026.083a3.855 3.855 0 01-6.32 1.696l-.037-.035-6.305-6.317-12.33 12.344L26.5 69l1.617-9.855 10.977-10.982 1.373-1.351-6.33-6.333-.035-.037a3.854 3.854 0 011.695-6.32l.084-.025.086-.02a22.93 22.93 0 017.29-.558l1.918-1.91z"}),Object(c.jsx)("path",{d:"M77.756 35.705a.852.852 0 01-.368.22 19.309 19.309 0 01-4.829.752.758.758 0 00-.554.23L58.62 50.353a.794.794 0 00-.265.692 20 20 0 01-.384 7.277.855.855 0 01-1.399.376l-8.39-8.408-13.953 13.968L29 66l1.74-5.236 10.468-10.472 3.517-3.464-8.431-8.434a.855.855 0 01.375-1.4 19.929 19.929 0 017.269-.385.794.794 0 00.69-.222l13.463-13.402a.762.762 0 00.23-.555c.047-1.63.299-3.25.75-4.817a.855.855 0 011.022-.588.852.852 0 01.378.204l17.3 17.296a.854.854 0 01-.015 1.18z"}),Object(c.jsx)("path",{d:"M46.04 30.748a17.003 17.003 0 00-11.1-4.158A17.25 17.25 0 0018 42 14.84 14.84 0 006.33 56.6c0 13.89 11.56 16.81 13.84 16.81h56.2c5.21 0 12.47-7.37 12.47-14.62 0-7.03-4.61-14.29-12.31-14.29a12.83 12.83 0 00-3.81.57 14.069 14.069 0 00-.763-3.862l-2.643 2.654c.148.66.283 1.355.426 2.087l.01.051c.186.957.234 1.557.298 2.36.028.34.057.715.102 1.17l1.73-.91a9.86 9.86 0 014.65-1.16c5.83 0 9.31 5.74 9.31 11.29 0 6.04-6.51 11.66-9.47 11.66H20.22c-.11 0-10.89-1.26-10.89-13.81a11.89 11.89 0 018-11.32C19.046 44.687 21 45 21 45v-2.25a14 14 0 0122.94-9.91l2.1-2.092z"})]}))},we=function(e){Object(g.a)(a,e);var t=Object(w.a)(a);function a(){var e;Object(O.a)(this,a);for(var n=arguments.length,c=new Array(n),s=0;s0)return g($);if(" "===e.key&&null!==A)return e.preventDefault(),ae(A,!0);if(("Enter"===e.key||"ArrowRight"===e.key&&e.metaKey)&&null!==A)return y({path:t.path,cid:t.cid});if("ArrowDown"===e.key||"ArrowUp"===e.key){e.preventDefault();var n=0;if(null!==A){var c=a.findIndex((function(e){return e.name===A}));n="ArrowDown"===e.key?c+1:c-1}if(-1===n)return;if(n=0&&F(P.filter((function(t){return t!==e})).sort()),U.current.forceUpdateGrid()}),[P]),ce=function(e,t){if($.length>0){var a=t.split("/");a.pop();var n=a.join("/");""===n&&(n="/");var c=$.map((function(e){var t=e.name;return[e.path,Object(ie.join)(n,t)]}));c.find((function(t){return t[0]===e}))||c.push([e,t]),te(!1),c.forEach((function(e){return C.apply(void 0,Object(ne.a)(e))}))}else C(e,t)},oe=function(e){return r.by===e?r.asc?"\u2191":"\u2193":null},be=function(e){return function(){e===r.by?d(e,!r.asc):d(e,!0),U.current.forceUpdateGrid()}},he=function(){return Object(c.jsx)(h.a,{i18nKey:"filesList.noFiles",t:k,children:Object(c.jsx)("div",{className:"pv3 b--light-gray bt tc gray f6",children:"There are no available files. Add some!"})})},pe=function(e){var t=e.index,a=e.key,i=e.style,r=s.map((function(e){return e.toString()})),o=_[t];return Object(c.jsx)("div",{style:i,ref:function(e){W.current[_[t].name]=e},children:Object(c.jsx)(Ae,Object(n.a)(Object(n.a)({},o),{},{pinned:r.includes(o.cid.toString()),isMfs:p.isMfs,name:o.name,onSelect:ae,onNavigate:function(){return"unknown"===o.type?O(o.cid):y({path:o.path,cid:o.cid})},onAddFiles:N,onMove:ce,focused:A===o.name,selected:-1!==P.indexOf(o.name),handleContextMenuClick:M,translucent:Z||K&&J}))},a)},me=function(e){var t=e.startIndex;return B(t)},fe=0!==P.length&&P.length===_.length,Oe=_.length,ve=se()({"o-1":fe,"o-70":!fe},["pl2 w2 glow"]);return Object(c.jsx)("section",{ref:Q,className:se()("FilesList no-select sans-serif border-box w-100 flex flex-column",t),children:m?Object(c.jsx)(Le,{}):Object(c.jsxs)(l.Fragment,{children:[Object(c.jsxs)("header",{className:"gray pv3 flex items-center flex-none",style:{paddingRight:"1px",paddingLeft:"1px"},children:[Object(c.jsx)("div",{className:ve,children:Object(c.jsx)(je.a,{checked:fe,onChange:te,"aria-label":k("selectAllEntries")})}),Object(c.jsx)("div",{className:"ph2 f6 flex-auto",children:Object(c.jsxs)("button",{"aria-label":k("sortBy",{name:k("app:terms.name")}),onClick:be(re.c.BY_NAME),children:[k("app:terms.name")," ",oe(re.c.BY_NAME)]})}),Object(c.jsx)("div",{className:"pl2 pr1 tr f6 flex-none dn db-l mw4",children:Object(c.jsx)("span",{children:k("app:terms.pinStatus")})}),Object(c.jsx)("div",{className:"pl2 pr4 tr f6 flex-none dn db-l mw4 w-10",children:Object(c.jsxs)("button",{"aria-label":k("sortBy",{name:k("size")}),onClick:be(re.c.BY_SIZE),children:[k("app:terms.size")," ",oe(re.c.BY_SIZE)]})}),Object(c.jsx)("div",{className:"pa2",style:{width:"2.5rem"}})]}),Object(c.jsx)(le.f,{children:function(e){var t=e.height,a=e.isScrolling,n=e.onChildScroll,s=e.scrollTop;return Object(c.jsx)("div",{className:"flex-auto",children:Object(c.jsx)(le.a,{disableHeight:!0,children:function(e){var i=e.width;return Object(c.jsx)(le.c,{ref:U,autoHeight:!0,width:i,height:t,className:"outline-0","aria-label":k("filesListLabel"),rowCount:Oe,rowHeight:55,rowRenderer:pe,noRowsRenderer:he,onRowsRendered:me,isScrolling:a,onScroll:n,scrollTop:s})}})})}}),0!==$.length&&Object(c.jsx)(xe,{className:"fixed bottom-0 right-0",style:{zIndex:20},animateOnStart:1===$.length,unselect:function(){return te(!1)},remove:function(){return g($)},rename:function(){return w($)},share:function(){return f($)},setPinning:function(){return x($)},download:function(){return v($)},inspect:function(){return O($[0].cid)},count:$.length,isMfs:p.isMfs,downloadProgress:j,size:$.reduce((function(e,t){return e+(t.size||0)}),0)})]})})}))),Ve=a(259),_e=a(976),qe=a(261),Ue=a(1017);var We=Object(p.a)("files")((function(e){var t=e.t,a=(e.tReady,e.onCancel),s=e.onSubmit,i=e.className,r=Object(N.a)(e,["t","tReady","onCancel","onSubmit","className"]);return Object(c.jsx)(Ue.a,Object(n.a)({onSubmit:function(e){return s(e.trim())},onChange:function(e){return e.trimStart()},onCancel:a,className:i,title:t("newFolderModal.title"),description:t("newFolderModal.description"),Icon:qe.a,submitText:t("app:actions.create")},r))})),Ge=a(964),Ye=function(e){var t=e.t,a=(e.tReady,e.onLeave),s=e.link,i=e.className,r=Object(N.a)(e,["t","tReady","onLeave","link","className"]);return Object(c.jsxs)(Ge.a,Object(n.a)(Object(n.a)({},r),{},{className:i,onCancel:a,children:[Object(c.jsxs)(Ge.c,{title:t("shareModal.title"),Icon:F,children:[Object(c.jsx)("p",{className:"charcoal w-90 tl center",children:t("shareModal.description")}),Object(c.jsx)("div",{className:"flex center w-90 pb2",children:Object(c.jsx)("input",{value:s,readOnly:!0,className:"input-reset flex-grow-1 charcoal-muted ba b--black-20 br1 pa2 mr2 focus-outline",type:"text"})})]}),Object(c.jsxs)(Ge.b,{children:[Object(c.jsx)(ee.a,{className:"ma2 tc",bg:"bg-gray",onClick:a,children:t("app:actions.close")}),Object(c.jsx)(y.CopyToClipboard,{text:s,onCopy:a,children:Object(c.jsx)(ee.a,{className:"ma2 tc",children:t("app:actions.copy")})})]})]}))};Ye.defaultProps={className:""};var Xe=Object(p.a)("files")(Ye);function Je(e){var t=e.t,a=(e.tReady,e.onCancel),s=e.onSubmit,i=e.filename,r=e.folder,o=e.className,l=Object(N.a)(e,["t","tReady","onCancel","onSubmit","filename","folder","className"]),d=r?"Folder":"File";return Object(c.jsx)(Ue.a,Object(n.a)({onCancel:a,onSubmit:s,mustBeDifferent:!0,className:o,defaultValue:i,title:t("renameModal.title".concat(d)),description:t("renameModal.description".concat(d)),Icon:I,submitText:t("app:actions.save")},l))}Je.defaultProps={className:"",folder:!1};var Ke=Object(p.a)("files")(Je),Ze=(a(1614),function(e){var t=e.icon,a=e.index;if(t)return Object(c.jsx)("img",{className:"mr1",src:t,alt:"",width:32,height:32,style:{objectFit:"contain"}});var n=["aqua","link","yellow","teal","red","green","navy","gray","charcoal"],s="mr1 fill-".concat(n[a%n.length]," flex-shrink-0");return Object(c.jsx)(ve.a,{width:32,height:32,className:s})}),Qe=function(e){var t=e.t,a=(e.tReady,e.onCancel),s=e.onPinningSet,d=e.file,u=e.pinningServices,j=e.doGetFileSizeThroughCid,b=e.doSelectRemotePinsForFile,h=e.doFetchPinningServices,p=e.className,m=Object(N.a)(e,["t","tReady","onCancel","onPinningSet","file","pinningServices","doGetFileSizeThroughCid","doSelectRemotePinsForFile","doFetchPinningServices","className"]),f=Object(l.useMemo)((function(){return b(d)}),[b,d]),x=Object(l.useState)([].concat(Object(ne.a)(f),[d.pinned&&"local"])),O=Object(o.a)(x,2),v=O[0],g=O[1],w=Object(l.useState)(null),y=Object(o.a)(w,2),C=y[0],M=y[1];Object(l.useEffect)((function(){h(),function(){var e=Object(r.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=M,e.next=3,j(d.cid);case 3:return e.t1=e.sent,e.abrupt("return",(0,e.t0)(e.t1));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()}),[]);var k=function(e){var t=u.find((function(t){return t.name===e}));if(!t||t.online)return-1===v.indexOf(e)?g([].concat(Object(ne.a)(v),[e])):g(v.filter((function(t){return t!==e})))};return Object(c.jsxs)(Ge.a,Object(n.a)(Object(n.a)({},m),{},{className:p,onCancel:a,children:[Object(c.jsxs)(Ge.c,{title:t("pinningModal.title"),children:[Object(c.jsxs)("div",{className:"pinningModalContainer",children:[Object(c.jsxs)("button",{className:"flex items-center pa1 hoverable-button",onClick:function(){return k("local")},children:[Object(c.jsx)(je.a,{className:"pv3 pl3 pr1 flex-none",checked:v.includes("local"),style:{pointerEvents:"none"}}),Object(c.jsx)(ve.a,{fill:"currentColor",width:32,height:32,className:"mr1 aqua flex-shrink-0"}),Object(c.jsx)("p",{className:"f5 w-100",children:t("pinningModal.localNode")})]},t("pinningModal.localNode")),u.map((function(e,t){var a=e.icon,n=e.name,s=e.online;return Object(c.jsxs)("button",{className:"flex items-center pa1 hoverable-button",onClick:function(){return k(n)},children:[Object(c.jsx)(je.a,{className:"pv3 pl3 pr1 flex-none",checked:v.includes(n),style:{pointerEvents:"none"},disabled:!s}),Object(c.jsx)(Ze,{index:t,icon:a}),Object(c.jsx)("p",{className:s?"f6":"f6 red",children:n})]},n)}))]}),Object(c.jsx)("p",{className:"f6 charcoal",children:t("pinningModal.totalSize",{size:Object(oe.c)(C)})})]}),Object(c.jsxs)(Ge.b,{children:[Object(c.jsx)(ee.a,{className:"ma2 tc",bg:"bg-gray",onClick:a,children:t("app:actions.cancel")}),Object(c.jsx)(ee.a,{className:"ma2 tc",bg:"bg-teal",onClick:function(){return s(d,v,d.pinned,f)},children:t("app:actions.apply")})]})]}))};Qe.defaultProps={className:""};var $e=Object(b.b)("selectPinningServices","doSelectRemotePinsForFile","doGetFileSizeThroughCid","doFetchPinningServices",Object(p.a)("files")(Qe)),et=function(e){var t=e.t,a=(e.tReady,e.onCancel),s=e.onRemove,d=e.files,u=e.foldersCount,j=e.filesCount,b=e.remotePins,h=e.pinningServices,p=e.className,m=Object(N.a)(e,["t","tReady","onCancel","onRemove","files","foldersCount","filesCount","remotePins","pinningServices","className"]),f="File",x=j+u;u>0&&(f=j>0?"Item":"Folder");var O=d.some((function(e){return e.pinned})),v=Object(l.useState)(!1),g=Object(o.a)(v,2),w=g[0],y=g[1],C=Object(l.useState)(O),M=Object(o.a)(C,2),k=M[0],z=M[1],S=Object(l.useState)(!1),P=Object(o.a)(S,2),F=P[0],I=P[1];Object(l.useEffect)((function(){Object(r.a)(i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=d.some((function(e){return b.find((function(t){return t.cid.string===e.cid.string}))})),y(t);case 2:case"end":return e.stop()}}),e)})))()}));var R={count:x,name:d[0].name},T=t("removeModal.title".concat(f),R),E=t("removeModal.description".concat(f),R);return Object(c.jsxs)(Ge.a,Object(n.a)(Object(n.a)({},m),{},{className:p,onCancel:a,children:[Object(c.jsx)(Ge.c,{title:T,Icon:A,children:Object(c.jsxs)("div",{className:"charcoal w-100 center tl",children:[Object(c.jsx)("p",{children:E}),O&&Object(c.jsx)("div",{children:Object(c.jsx)(je.a,{className:"mr1",checked:k,onChange:function(){return z(!k)},label:t("removeModal.checkboxRemoveLocalPin")})}),w&&Object(c.jsx)("div",{className:"mt1",children:Object(c.jsx)(je.a,{className:"mr1",checked:F,onChange:function(){return I(!F)},label:t("removeModal.checkboxUnpinFromServices")})})]})}),Object(c.jsxs)(Ge.b,{children:[Object(c.jsx)(ee.a,{className:"ma2 tc",bg:"bg-gray",onClick:a,children:t("app:actions.cancel")}),Object(c.jsx)(ee.a,{className:"ma2 tc",bg:"bg-red",onClick:function(){return s({removeLocally:k,removeRemotely:F,remoteServices:h.map((function(e){return e.name}))})},children:t("app:actions.remove")})]})]}))};et.defaultProps={className:"",filesCount:0,foldersCount:0};var tt=Object(b.b)("selectRemotePins","selectPinningServices",Object(p.a)("files")(et)),at=a(169),nt=a.n(at),ct=a(1045);var st=Object(p.a)("files")((function(e){var t=e.t,a=(e.tReady,e.onCancel),s=e.onSubmit,i=e.className,r=Object(N.a)(e,["t","tReady","onCancel","onSubmit","className"]);return Object(c.jsx)(Ue.a,Object(n.a)({validate:function(e){return function(e){return e.startsWith("/ipfs/")||(e="/ipfs/".concat(e)),nt.a.ipfsPath(e)}(e.trim())},onSubmit:function(e){return s(e.trim())},onChange:function(e){return e.trimStart()},onCancel:a,className:i,title:t("addByPathModal.title"),description:function(){var e="w-90 mb1 pa1 tl bg-snow f7 charcoal-muted truncate";return Object(c.jsxs)("div",{className:"mb3 flex flex-column items-center",children:[Object(c.jsx)("p",{className:"mt0 charcoal tl w-90",children:t("addByPathModal.description")+" "+t("addByPathModal.examples")}),Object(c.jsx)("code",{className:e,children:"/ipfs/QmZTR5bcpQD7cFgTorqxZDYaew1Wqgfbd2ud9QqGPAkK2V"}),Object(c.jsx)("code",{className:e,children:"QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB"})]})}(),Icon:ct.a,submitText:t("app:actions.import")},r))})),it=a(1018),rt=a(389),ot="new_folder",lt="share",dt="rename",ut="delete",jt="add_by_path",bt="cli_tutor_mode",ht="pinning",pt=function(e){Object(g.a)(a,e);var t=Object(w.a)(a);function a(){var e;Object(O.a)(this,a);for(var c=arguments.length,s=new Array(c),i=0;i=30&&(c[s].realName=i,c[s].name="".concat(i.substring(0,4),"...").concat(i.substring(i.length-4,i.length)))}c.shift(),("ipfs"===c[0].name||"ipns"===c[0].name)&&!a&&n(!0);return c[0].name=t(c[0].name),c[c.length-1].last=!0,c}(a,t,g,w)}),[g,a,t]);return Object(c.jsx)("nav",Object(n.a)(Object(n.a)({"aria-label":t("breadcrumbs"),className:se()("Breadcrumbs flex items-center sans-serif overflow-hidden sticky top-0",i)},h),{},{children:Object(c.jsxs)("div",{className:"nowrap overflow-hidden relative flex flex-wrap",ref:y,children:[Object(c.jsx)("div",{className:"absolute left-0 top-0 h-100 w1 ".concat(f?"":"dn"),style:{background:"linear-gradient(to right, #ffffff 0%, transparent 100%)"}}),C.map((function(e,t){return Object(c.jsxs)("div",{children:[Object(c.jsx)(ft,{index:t,link:e,immutable:g,onAddFiles:d,onMove:u,onClick:s,onContextMenuHandle:r,getPathInfo:j,checkIfPinned:b}),t!==C.length-1&&Object(c.jsx)("span",{className:"dib pr1 pv1 mid-gray v-top",children:"/"})]},"".concat(t,"link"))}))]})}))}))),Ot=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:"M36 33.4h14.21a1 1 0 0 0 0-2H36a1 1 0 0 0 0 2zm0 8.84h14.21a1 1 0 0 0 0-2H36a1 1 0 0 0 0 2zm29.13 6.83H36a1 1 0 0 0 0 2h29.13a1 1 0 0 0 0-2zm0 8.84H36a1 1 0 1 0 0 2h29.13a1 1 0 0 0 0-2zm0 8.84H36a1 1 0 1 0 0 2h29.13a1 1 0 0 0 0-2z"}),Object(c.jsx)("path",{d:"M75.13 37.17v-.05L56.55 17.8H30a5.51 5.51 0 0 0-5.5 5.5v53.4a5.51 5.51 0 0 0 5.5 5.5h40a5.51 5.51 0 0 0 5.5-5.5V37.51zM56.91 22.51l14 14.61h-7.08c-4 0-6.92-2.53-6.92-6zM70 79.2H30a2.5 2.5 0 0 1-2.5-2.5V23.3a2.5 2.5 0 0 1 2.5-2.5h24.91v10.31c0 4.64 3.75 8 8.92 8h8.63V76.7A2.5 2.5 0 0 1 70 79.2z"})]}))},vt=function(e){return Object(c.jsx)("svg",Object(n.a)(Object(n.a)({viewBox:"0 0 65 102"},e),{},{children:Object(c.jsx)("path",{d:"M52.62 33.38H35.17a3.76 3.76 0 0 1-3.44-2.25l-2.28-4.83a6 6 0 0 0-5.57-3.8H11.56C5.19 22.5 0 28 0 34.68v32.64C0 74 5.19 79.5 11.56 79.5h41.06c6.37 0 11.56-5.46 11.56-12.18V45.56c0-6.72-5.19-12.18-11.56-12.18zM11.56 25.1h12.32a3.45 3.45 0 0 1 3.21 2.25l2.34 4.95a6.33 6.33 0 0 0 5.74 3.7h17.45a9.22 9.22 0 0 1 8.9 8.5H2.6v-9.8c0-5.3 4.02-9.6 8.96-9.6zm41.06 51.8H11.56c-4.94 0-9-4.3-9-9.58V46h59v21.32c.02 5.28-4 9.58-8.94 9.58zM33.09 0v10h-2V0zM12.64 15.858L7.79 7.112l1.75-.97 4.848 8.746zm43.749-8.746l-4.848 8.746-1.75-.97 4.848-8.746zM33.09 102V92h-2v10zM12.64 86.142l-4.85 8.746 1.75.97 4.848-8.746zm43.749 8.746l-4.848-8.746-1.75.97 4.848 8.746z"})}))},gt=Object(p.a)("app")((function(e){var t=e.t,a=e.onClick;return Object(c.jsx)(ee.a,{id:"import-button",bg:"bg-navy",color:"white",className:"f6 flex justify-center items-center",minWidth:"100px",onClick:a,children:Object(c.jsxs)("span",{children:[Object(c.jsx)("span",{className:"aqua",children:"+"})," ",t("actions.import")]})})})),wt=function(e){Object(g.a)(a,e);var t=Object(w.a)(a);function a(){var e;Object(O.a)(this,a);for(var n=arguments.length,c=new Array(n),s=0;s=1073741824?1:0,spacer:""})},Mt=function(e){Object(g.a)(a,e);var t=Object(w.a)(a);function a(){var e;Object(O.a)(this,a);for(var c=arguments.length,s=new Array(c),i=0;i1&&void 0!==arguments[1]?arguments[1]:"";""===t&&(t=T.path),p(e,t)},ue=function(e){return v("/explore/ipfs/".concat(e))},je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return ce({show:e,files:t})},be=function(e,t,a,n){void 0!==e&&"string"!==typeof e&&(e.preventDefault(),e.persist());var c=Object(u.findDOMNode)(W.current),s=c.getBoundingClientRect(),i=0,r=0;switch(t){case"RIGHT":var o=window.innerWidth-c.parentNode.getBoundingClientRect().right;i=window.innerWidth-e.clientX-o-20,r=s.y+s.height/2-e.clientY-10;break;case"TOP":var l=c.parentNode.getBoundingClientRect();i=l.right-n.right,r=-(n.bottom-l.top+11);break;default:i=1,r=s.y+s.height/2-(n&&n.y)-30}oe({isOpen:!re.isOpen,translateX:i,translateY:r,file:a})},he=function(e){var t=e.t,a=e.files,s=e.remotePins,i=e.doExploreUserProvidedPath;if(!a)return Object(c.jsx)("div",{});if("unknown"===a.type){var r=a.path.startsWith("/pins")?a.path.slice(6):a.path;return Object(c.jsx)("div",{children:Object(c.jsxs)(h.a,{i18nKey:"cidNotFileNorDir",t:t,children:["The current link isn't a file, nor a directory. Try to ",Object(c.jsx)("button",{className:"link blue pointer",onClick:function(){return i(r)},children:"inspect"})," it instead."]})})}return"file"===a.type?Object(c.jsx)(ae,Object(n.a)(Object(n.a)({},a),{},{onDownload:function(){return le([a])}})):Object(c.jsx)(He,{updateSorting:g,files:a.content,remotePins:s,upperDir:a.upper,downloadProgress:Q,onShare:function(e){return je(lt,e)},onRename:function(e){return je(dt,e)},onRemove:function(e){return je(ut,e)},onSetPinning:function(e){return je(ht,e)},onInspect:ue,onRemotePinClick:A,onDownload:le,onAddFiles:de,onNavigate:w,onMove:y,handleContextMenuClick:be},window.encodeURIComponent(a.path))};return Object(c.jsxs)("div",{"data-id":"FilesPage",className:"mw9 center",children:[Object(c.jsx)(j.Helmet,{children:Object(c.jsx)("title",{children:function(e,t){var a=[];return e&&a.push(e.realPath),e.isMfs?a.push(t("app:terms.files")):e.isPins&&a.push(t("app:terms.pins")),a.push("IPFS"),a.join(" | ")}(E,q)})}),Object(c.jsx)(B,{autofocus:!0,ref:W,isOpen:re.isOpen,translateX:re.translateX,translateY:re.translateY,handleClick:be,isMfs:!!E&&E.isMfs,isUnknown:!(!re.file||"unknown"!==re.file.type),pinned:re.file&&re.file.pinned,cid:re.file&&re.file.cid,onShare:function(){return je(lt,[re.file])},onRemove:function(){return je(ut,[re.file])},onRename:function(){return je(dt,[re.file])},onInspect:function(){return ue(re.file.cid)},onDownload:function(){return le([re.file])},onPinning:function(){return je(ht,[re.file])},isCliTutorModeEnabled:V,onCliTutorMode:function(){return je(bt,[re.file])},doSetCliOptions:N}),Object(c.jsx)(kt,{files:T,onNavigate:w,onAddFiles:de,onMove:y,onAddByPath:function(e){return je(jt,e)},onNewFolder:function(e){return je(ot,e)},onCliTutorMode:function(){return je(bt)},handleContextMenu:function(){for(var e=arguments.length,t=new Array(e),a=0;a