PageSourceSearch

https://app.put.io/js/main.bf8291ea4242689006b2.js

js put.io collected 2026-09-25 07:06:45 UTC 563,294 bytes, 399 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"[email protected]+a0ce631"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="128a3c4c-9d48-4475-ae0a-5aad9cc5e932",e._sentryDebugIdIdentifier="sentry-dbid-128a3c4c-9d48-4475-ae0a-5aad9cc5e932")}catch(e){}}(),(self.webpackChunk_putdotio_app=self.webpackChunk_putdotio_app||[]).push([[179],{88670:(e,t,s)=>{"use strict";s.r(t),s.d(t,{Authenticate:()=>C,ExpireSession:()=>j,Logout:()=>M,RegisterAPIEventListeners:()=>R,StartApplication:()=>N});var r=s(73059),n=s(4099),i=s(29604),o=s(98940),a=s(62822),l=s(46797);const c="putio.v1.visitor_state";function d(e){return`.${e}`}function u(e,t,s,r){const n=function(e){return"production"===e?c:`${c}.${e}`}(t);e.set(n,r,function(e,t){const s=function(e){return"production"===e||"staging"===e}(e)&&"put.io"===t;return{...s?{domain:d(t),secure:!0}:{},expires:365,sameSite:"Lax"}}(t,s))}var p=s(51428),_=s(52034),h=s.n(_);const g=e=>{o.av({id:e.user_id,username:e.username}),p.Z.getAdminToken()||(u(h(),i.Z.environment,a.Z.GetDomain(),"signed_in"),i.Z.analyticsEnabled&&(l.Z.identify({hash:e.pas.user_hash,id:e.user_id}),window.Intercom&&window.Intercom("update",{email:e.mail,name:e.username,user_hash:e.user_hash,user_id:e.user_id}),window.profitwell&&e.paddle_user_id&&window.profitwell("start",{user_id:e.paddle_user_id})))},m=()=>{u(h(),i.Z.environment,a.Z.GetDomain(),"signed_out"),l.Z.clear();for(const e of Object.keys(h().get()))e.startsWith("intercom")&&h().remove(e)};var f=s(49024),y=s(8353),b=s(68938),x=s(92680),w=s(1593),S=s(80594),v=s.n(S),I=s(92421);const k=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),T=e=>k(e)&&Number.isInteger(e.user_id)&&k(e.pas)&&"string"==typeof e.pas.user_hash,A={download_token:1,features:1,intercom:1,pas:1,platform:"web",profitwell:1,push_token:1};function E(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return async()=>{const{Base64:t}=await Promise.resolve().then(s.t.bind(s,12130,23)),r=t.encode(JSON.stringify({message:e,next:`${window.location.pathname}${window.location.search}`}));window.location.href=`/login?state=${r}`}}function M(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return async t=>{if("revoked"===e)try{await f.Z.Auth.Logout()}catch{}return f.Z.clearToken(),p.Z.clear(),m(),"expired"===e?t(E(n.ZP.app_session_expired_login_message())):window.location.assign(i.Z.surfaces.www)}}function j(){return e=>{e(M("expired"))}}function D(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>{if(e instanceof b.z||e.data&&401===e.data.status_code)return t(j());throw e}}function C(e){return async t=>{try{f.Z.setToken(e);const s=await async function(){for(let e=0;e<2;e+=1){const e=await f.Z.Account.Info(A),t=e?.data?.info;if(T(t))return t}throw new Error("could not authenticate user: malformed account info response.")}();g(s),await(0,w.pr)(),t({type:I.Df,user:s})}catch(e){t(D(e))}}}function R(){return e=>{const{CLIENT_IP_CHANGED:t,ERROR:s}=r.default.EVENTS,n=t=>{(0,r.XR)(t)&&401===t.data.status_code&&(f.Z.off(s,n),e(j()))};f.Z.on(s,n),f.Z.on(t,(async()=>{try{const t=await f.Z.Account.Info({download_token:1,push_token:1}),s=t?.data?.info;if(!k(s))return void(0,y.Z)("could not update the user after IP change: malformed account info response.");e({type:I.hO,user:s})}catch{(0,y.Z)("could not update the user after IP change.")}}))}}function N(){return async e=>{e({type:I.Ld});const t=p.Z.getOauthToken();if(!t)return e(E());try{await(0,x.R)(t,"default")}catch(t){return e(D(t))}e(C(t)),e((e=>{window.addEventListener("resize",v()((()=>e({type:I.sQ,width:window.innerWidth})),250))})),e(R())}}},92421:(e,t,s)=>{"use strict";s.d(t,{Df:()=>n,Ld:()=>i,hO:()=>r,sQ:()=>o});const r="USER_UPDATED",n="AUTHENTICATE_USER",i="BOOT_APP",o="WINDOW_RESIZED"},62822:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var r=s(4099),n=s(42238),i=s(19192),o=s.n(i);const a={FormatBreadcrumbs:e=>e.map((e=>(0===e[0]&&(e[1]=r.ZP.files_rootdir_name()),{go:`/files/${e[0]}`,id:e[0],label:e[1]}))),FormatSubtitleLinks(e,t){if(t){const s=e.find((e=>e.key===t));e=[s].concat(e.filter((e=>e.key!==t)))}return e.map((e=>({langCode:e.language_code,language:"Undetermined"===e.language?"Custom"
1:e.language,link:e.url,url:e.url,name:e.name,source:e.source})))},GetDomain(){const e=window.location.hostname.split(".");return e.length>=2?`${e[e.length-2]}.${e[e.length-1]}`:"put.io"},createFormDataFromObject:e=>Object.keys(e).reduce(((t,s)=>(t.append(s,e[s]),t)),new FormData),guid:()=>{const e=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return`${e()+e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`},hasFocusedInput:()=>[...o()("input"),...o()("textArea"),...o()("[contentEditable]")].some((e=>document.activeElement===e)),hostname(){let{path:e="",query:t="",subdomain:s=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=t?`?${t}`:"";const{hostname:r}=window.location,n=r.split(".");return s=!1===s?"":s||(n.length>2?n[0]:""),s&&(s=`${s}.`),`https://${s}${n.length>=2?`${n[n.length-2]}.${n[n.length-1]}`:"put.io"}${e}${t}`},isHLSNativelySupported:()=>{const e=new n.UAParser,t=e.getOS(),s=e.getBrowser();return["iOS"].includes(t.name)||["Safari","Mobile Safari"].includes(s.name)}}},36628:(e,t,s)=>{"use strict";s.d(t,{Z:()=>X});var r=s(32315),n=s(70067),i=s(4099),o=s(49024),a=s(99486),l=s(1593),c=s(62891),d=s(51382),u=s(13980),p=s.n(u),_=s(2784),h=s(15820),g=s(33611),m=s(1030),f=s(18756),y=s(18361),b=s(75289),x=s(63259),w=s(70028),S=s(38571),v=s(57671),I=s(2754),k=s(27622),T=s(85365);const A=T.Z.li`
2  font-size: var(--fontSize-0);
3  color: var(--theme-ui-colors-text-secondary);
4  cursor: var(--config-cursor);
5  display: inline;
6  margin-left: 3px;
7
8  &:first-of-type {
9    margin-left: 0;
10  }
11
12  &:last-child {
13    color: ${e=>{let{theme:t}=e;return t.colors.text}};
14  }
15`,E=T.Z.i`
16  margin-left: 3px;
17  font-size: var(--fontSize-1);
18`;var M=s(52322);const j=e=>{let{id:t,isLast:s,onClick:r,title:n}=e;return(0,M.jsx)(k.k,{onClick:()=>r(t),title:n,children:(0,M.jsxs)(A,{children:[(0,M.jsx)("span",{children:(0,I.ro)(n,{backLength:5,frontLength:15})}),!s&&(0,M.jsx)(E,{className:"flaticon solid right-2"})]})})};j.propTypes={id:p().number.isRequired,isLast:p().bool.isRequired,onClick:p().func.isRequired,title:p().string.isRequired};const D=j,C=T.Z.ul`
19  word-break: break-all;
20`,R=e=>{let{data:t,onClick:s}=e;return(0,M.jsx)(C,{children:t.map(((e,r)=>(0,M.jsx)(D,{id:e[0],isLast:r===t.length-1,onClick:s,title:e[1]},e[0])))})};R.propTypes={data:p().array.isRequired,onClick:p().func.isRequired};const N=R,P=T.Z.li`
21  display: flex;
22  align-items: center;
23  border-bottom: 1px solid;
24  border-color: ${e=>{let{theme:t}=e;return t.colors.line}};
25  padding: 16px ${16}px;
26  cursor: var(--config-cursor);
27  font-size: var(--fontSize-1);
28
29  @media (hover: hover) {
30    &:hover {
31      background: ${e=>{let{disabled:t,theme:s}=e;if(!t)return s.colors["component-bg"]}};
32    }
33  }
34
35  ${e=>{let{disabled:t}=e;if(t)return"\n        cursor: not-allowed;\n\n        * {\n          opacity: 0.3!important;\n        };\n      "}}
36
37  @media (max-width: 480px) {
38    padding: 14px ${16}px;
39  }
40`,O=T.Z.i`
41  font-size: 18px;
42  color: ${e=>{let{theme:t}=e;return t.colors["yellow-solid"]}};
43`,L=T.Z.span`
44  margin: 0 ${16}px;
45  padding-bottom: 2px;
46  word-break: break-word;
47
48  @media (max-width: 480px) {
49    font-size: var(--fontSize-1);
50    display: block;
51    overflow: hidden;
52    text-overflow: ellipsis;
53    white-space: nowrap;
54  }
55`,Z=T.Z.i`
56  position: absolute;
57  right: ${16}px;
58  color: ${e=>{let{theme:t}=e;return t.colors["text-secondary"]}};
59`,F=e=>{let{data:t,disabled:s,onClick:r}=e;return(0,M.jsx)(k.k,{onClick:()=>s?"":r(t.id),style:{display:"block",width:"100%"},children:(0,M.jsxs)(P,{disabled:s,id:`FolderPicker-ListItem-${t.id}`,children:[(0,M.jsx)(O,{className:"flaticon solid open-folder-3"}),(0,M.jsx)(L,{children:t.name}),(0,M.jsx)(Z,{className:"flaticon solid right-2"})]})})};F.propTypes={data:p().object.isRequired,disabled:p().bool.isRequired,onClick:p().func.isRequired};const z=F,U=T.Z.ul`
60  margin: 0px 0;
61`,V=e=>{let{data:t,disabledFileIds:s,onClick:r}=e;return(0,M.jsx)(U,{children:t.map((e=>(0,M.jsx)(z,{data:e,disabled:s.includes(e.id),onClick:r},e.id)))})};V.propTypes={data:p().array.isRequired,disabledFileIds:p().array.isRequired,onClick:p().func.isRequired};const Y=V;s(36728);var W=s(64907),G=s.n(W);const H=()=>{const e=G()(4,8),t=[];for(let s=0;s<=e;s+=1)t.push((0,M.jsxs)(P,{style:{cursor:"initial"},children:[(0,M.jsx)(O,{className:"flaticon solid open-folder-3"}),(0,M.jsx)(L,{children:(0,M.jsx)(g.O,{sx:{height:18,marginLeft:8,width:G()(50,300)}})}),(0,M.jsx)(Z,{className:"flaticon solid right-2"})]},s));return(0,M.jsx)(U,{children:t})},B=T.Z.div`
62  line-height: 1;
63  position: relative;
64`,$=T.Z.div`
65  padding: 0px 4px 8px 4px;
66  border-bottom: 1px solid;
67  border-color: ${e=>{let{theme:t}=e;return t.colors.line}};
68`,q=(0,T.Z)(B)``,Q=(0,T.Z)(B)`
69  height: 33vh;
70  overflow-y: auto;
71  overflow-x: hidden;
72`,K=(T.Z.a``,()=>{const[e,t]=(0,a.E)("remember_move_and_clone_target_folder");return(0,M.jsx)(h.r,{checked:e,label:"Remember target folder",labelPosition:"after",name:"remember_target_folder",onChange:t,size:"sm"})});class J extends _.PureComponent{onCreateNewFolder=async()=>{const{id:e}=this.state.parent;try{const t=await(0,c.D)({parentId:e});this.onFetchFolder(t.id)}catch{}};onFetchFolder=(()=>{var e=this;return async function(t){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.setState({fetching:!0});try{const{data:{breadcrumbs:s,files:r,parent:n}}=await o.Z.Files.Query(t,{breadcrumbs:!0,fileType:"FOLDER"});let i=0;e.setState((t=>(r.some((e=>e.id===t.parent.id))&&(i=t.scrollTop),{breadcrumbs:s,error:!1,fetching:!1,files:r.filter((e=>"SHARED_ROOT"!==e.folder_type)),parent:n,resolved:!0,scrollTop:e.listWrapper.current?.scrollTop})),(()=>{e.listWrapper.current&&e.listWrapper.current.scrollTo(0,i)}))}catch(t){if(s)return e.onFetchFolder(0);e.setState({error:t,fetching:!1,resolved:!0})}}})();onSelect=()=>{const{intent:e}=this.props,{parent:t}=this.state;if("move"===e||"copy"===e){const e=(0,l.OQ)();e.remember_move_and_clone_target_folder&&(0,l.eq)({...e,move_and_clone_target_folder_id:t.id})}this.props.onSelect(t)};constructor(){super(),this.state={breadcrumbs:[],error:!1,fetching:!1,files:[],parent:{},resolved:!1,scrollTop:0},this.listWrapper=_.createRef()}static Show(){let{actionLabel:e="Done",currentParentId:t=null,fileId:s=0,intent:r="any",movingFileIds:n=[],title:i="Choose folder"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=(0,l.OQ)();return"move"!==r&&"copy"!==r||(s=o.remember_move_and_clone_target_folder?o.move_and_clone_target_folder_id:0),new w.u_({content:function(){return(0,M.jsx)(J,{actionLabel:e,currentParentId:t,fileId:s,intent:r,movingFileIds:n,onCancel:e=>this.Destroy(e),onSelect:e=>this.Destroy(null,e)})},name:"folderPicker",title:i}).Show()}componentDidMount(){this.onFetchFolder(this.props.fileId,!0)}render(){const{currentParentId:e,intent:t,onCancel:s}=this.props,{breadcrumbs:o,error:a,fetching:l,files:c,parent:u,resolved:p}=this.state;let _=(0,M.jsx)(H,{}),h=(0,M.jsx)(g.O,{sx:{height:20,width:"100%"}});p&&(_=a?(0,M.jsx)(m.u,{error:(0,r.j)(a,(0,n.W)({triggers:{goBack:(0,d.sX)(s)}})),variant:"page"}):(0,M.jsx)(Y,{data:c,disabledFileIds:this.props.movingFileIds,onClick:this.onFetchFolder}),h=a?(0,M.jsx)(N,{data:o.length?o:[[0,"Go back to Your Files"]],onClick:this.onFetchFolder}):(0,M.jsx)(N,{data:o.concat([[u.id,u.name]]),onClick:this.onFetchFolder}));const w=(0,M.jsx)(f.z,{disabled:u.id===e,fullWidth:!0,loading:!p,onClick:this.onSelect,variant:"primary",children:this.props.actionLabel});return(0,M.jsxs)(B,{"data-autofocus":!0,tabIndex:0,children:[(0,M.jsx)($,{children:h}),(0,M.jsxs)(q,{children:[(0,M.jsx)(y.f,{dialog:!0,visible:p&&l}),(0,M.jsx)(Q,{ref:this.listWrapper,children:_})]}),a?null:(0,M.jsxs)(b.xu,{sx:{mt:3,position:"relative"},children:["move"===t||"copy"===t?(0,M.jsx)(b.xu,{sx:{bottom:"8px",display:["none","block"],position:"absolute"},children:(0,M.jsx)(K,{})}):null,(0,M.jsxs)(S.Z,{children:[(0,M.jsx)(v.Z,{children:u.id===e?(0,M.jsx)(x.u,{label:"Files are already in this folder",children:(0,M.jsx)("div",{sx:{width:"100%"},children:w})}):w}),(0,M.jsx)(v.Z,{children:(0,M.jsx)(f.z,{icon:{name:"add-folder-1",type:"solid"},onClick:this.onCreateNewFolder,children:i.ZP.files_newfolder_label()})})]})]})]})}}
72J.propTypes={actionLabel:p().string.isRequired,currentParentId:p().number,fileId:p().number,intent:p().string.isRequired,movingFileIds:p().array.isRequired,onCancel:p().func.isRequired,onSelect:p().func.isRequired},J.defaultProps={currentParentId:null,fileId:0};const X=J},57842:(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var r=s(4099),n=s(13980),i=s.n(n),o=s(75289),a=s(86794),l=s(18756),c=s(38571),d=s(57671),u=s(70028),p=s(52322);const _=e=>{const t=e.actionLabel||r.ZP.app_confirm_dialog_ok(),s=e.cancelLabel||r.ZP.app_confirm_dialog_cancel();return(0,p.jsxs)(o.kC,{sx:{flexDirection:"column",gap:3},children:[(0,p.jsx)(o.xu,{sx:{wordBreak:"break-word"},children:(0,p.jsx)(a.G,{children:"function"==typeof e.message?e.message():e.message})}),(0,p.jsxs)(c.Z,{children:[(0,p.jsx)(d.Z,{children:(0,p.jsx)(l.z,{"data-autofocus":!0,onClick:e.onConfirm,variant:e.isDangerous?"danger":"success",children:t})}),(0,p.jsx)(d.Z,{children:(0,p.jsx)(l.z,{onClick:e.onCancel,children:s})})]})]})};_.Show=e=>new u.u_({backdrop:!1,className:"confirmation",content:function(){return(0,p.jsx)(_,{actionLabel:e.actionLabel,cancelLabel:e.cancelLabel,isDangerous:e.isDangerous,message:e.message,onCancel:()=>this.Destroy(u.u_.REASONS.CANCEL_BY_FOOTER),onConfirm:()=>this.Destroy(null,!0)})},name:e.name,size:u.u_.SIZES.XSMALL}).Show(),_.propTypes={actionLabel:i().string,cancelLabel:i().string,isDangerous:i().bool,message:i().oneOfType([i().string,i().func]).isRequired,onCancel:i().func.isRequired,onConfirm:i().func.isRequired},_.defaultProps={actionLabel:"",cancelLabel:"",isDangerous:!1};const h=_},57671:(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var r=s(52322);const n=e=>{let{children:t}=e;return(0,r.jsx)("div",{className:"modal-footer-action",children:t})}},38571:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(75289),n=s(52322);const i=e=>{let{children:t,sx:s={}}=e;return(0,n.jsx)(r.xu,{className:"modal-footer",sx:{borderBottomLeftRadius:"default",borderBottomRightRadius:"default",width:"100%",...s},children:(0,n.jsx)("div",{className:"modal-footer-actions",children:t})})}},70028:(e,t,s)=>{"use strict";s.d(t,{u_:()=>S});var r=s(46797),n=s(62822),i=s(88990);const o={CANCEL_BY_BACKDROP:"CANCEL_BY_BACKDROP",CANCEL_BY_CROSS:"CANCEL_BY_CROSS",CANCEL_BY_CTA:"CANCEL_BY_CTA",CANCEL_BY_ESC:"CANCEL_BY_ESC",CANCEL_BY_FOOTER:"CANCEL_BY_FOOTER"};var a=s(8115),l=s(13980),c=s.n(l),d=(s(2784),s(39961)),u=s(85365),p=s(52322);const _=u.Z.div`
73  background-color: ${e=>{let{theme:t}=e;return t.colors["lo-contrast"]}};
74`,h=e=>{const t=(0,a.P)();return(0,p.jsx)(d.HotKeys,{handlers:{CLOSE:()=>e.onClose(o.CANCEL_BY_ESC)},keyMap:{CLOSE:"escape"},children:(0,p.jsx)(d.ObserveKeys,{only:"escape",children:(0,p.jsxs)("div",{className:`modal ${e.className||""}`,ref:t,role:"dialog",children:[(0,p.jsx)("div",{className:"modal-backdrop",onClick:()=>e.backdrop?e.onClose(o.CANCEL_BY_BACKDROP):null}),(0,p.jsx)(_,{className:`modal-container ${e.size} ${e.name}`,children:e.children})]})})})};h.propTypes={backdrop:c().bool,children:c().node.isRequired,className:c().string,name:c().string,onClose:c().func.isRequired,size:c().string.isRequired},h.defaultProps={backdrop:!0,name:""};const g=h;var m=s(75289);const f=e=>{let{children:t}=e;return(0,p.jsx)(m.xu,{className:"modal-content",sx:{position:"relative"},children:t})};var y=s(97395),b=s(59807);const x=e=>{let{onClose:t,title:s}=e;return(0,p.jsx)(m.xu,{sx:{borderTopLeftRadius:"default",borderTopRightRadius:"default",marginBottom:2},children:(0,p.jsxs)(m.kC,{sx:{alignItems:"flex-start",gap:3},children:[(0,p.jsx)(m.xu,{sx:{flex:1},children:(0,p.jsx)(m.X6,{as:"h2",sx:{fontSize:2,wordBreak:"break-word"},children:s})}),(0,p.jsx)(y.t,{keys:["Esc"],label:"Close",children:(0,p.jsx)(b.h,{fontSize:3,height:25,icon:{name:"x-1",type:"solid"},onClick:t,size:"lg",width:25})})]})})};x.propTypes={onClose:c().func.isRequired,title:c().string.isRequired};const w=x;class S{constructor(e){this.options=e,this.content=e.content?e.content.bind(this):null,this.defered=Promise.defer(),this.id=n.Z.guid(),this.options.name&&r.Z.track("misc_event",{data:{event:"modal_viewed",properties:{name:this.options.name}}})}Destroy(e,t){(0,i.VG)(this.id),e?(this.options.name&&r.Z.track("misc_event",{data:{event:"modal_dismissed",properties:{name:this.options.name,reason:e}}}),this.defered.reject(e)):this.defered.resolve(t)}Show(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{backdrop:t,className:s,component:r,name:n,size:o,title:a}=this.options,l=(0,p.jsxs)(g,{backdrop:t,className:s,name:n,onClose:()=>this.Destroy(S.REASONS.CANCEL_BY_FOOTER),size:o||S.SIZES.NORMAL,children:[a?(0,p.jsx)(w,{onClose:()=>this.Destroy(S.REASONS.CANCEL_BY_CROSS),title:a}):null,(0,p.jsx)(f,{children:r?(0,p.jsx)(r,{...e,onReject:()=>
74this.Destroy(S.REASONS.CANCEL_BY_FOOTER),onResolve:e=>this.Destroy(null,e)}):this.content()})]});return(0,i.K4)(this.id,l),this.defered.promise}}S.REASONS=o,S.SIZES={LARGE:"large",NORMAL:"normal",SMALL:"small",XSMALL:"xsmall"}},81602:(e,t,s)=>{"use strict";s.d(t,{u:()=>a});var r=s(87466),n=(s(2784),s(70028)),i=s(52322);const o=(0,r.N)((()=>Promise.all([s.e(8047),s.e(867)]).then(s.bind(s,80867)).then((e=>e.JSON)))),a=e=>{let{data:t,title:s}=e;return new n.u_({content:()=>(0,i.jsx)(o,{data:t}),name:"json-modal",size:n.u_.SIZES.SMALL,title:s}).Show()}},49566:(e,t,s)=>{"use strict";s.d(t,{o:()=>r}),s(92529),s(86943),s(91157);const r=()=>{const e=globalThis.crypto;if("function"==typeof e?.randomUUID)return e.randomUUID();if("function"==typeof e?.getRandomValues){const t=e.getRandomValues(new Uint8Array(16));return Array.from(t,(e=>e.toString(16).padStart(2,"0"))).join("")}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}},28687:(e,t,s)=>{"use strict";s.d(t,{O:()=>r});const r=()=>({message:"We couldn't start the playback because this media format is not supported.",recoverySuggestion:{description:"We've captured logs and will look for a solution to improve your experience. In the meantime, you can try downloading and playing this file in your device.",type:"instruction"}})},60742:(e,t,s)=>{"use strict";s.d(t,{Q:()=>o});var r=s(98940),n=s(32315),i=s(79332);class o extends i.Z{message="Playback error occurred.";constructor(e){super(),this.playbackTelemetry=e,Object.defineProperties(this,{playbackTelemetry:{enumerable:!1}})}get localizedError(){return(0,n.j)(this.underlyingError,this.localizers)}reportToSentry(){const e=new Error(this.message);e.name=this.name,e.stack=this.stack,r.Tb(e,{extra:this.playbackTelemetry.extra,fingerprint:this.playbackTelemetry.fingerprint,tags:this.playbackTelemetry.tags})}}},86065:(e,t,s)=>{"use strict";s.d(t,{W:()=>M,h:()=>A});const r=[1,2,3,4],n=["aac","ac3","alac","av1","dts","eac3","flac","h264","hevc","mjpeg","mp3","mpeg1video","mpeg2video","mpeg4","opus","pcm_s16le","pcm_s24le","prores","theora","truehd","vc1","vorbis","vp8","vp9","wmv3"],i=["advanced","advanced simple","baseline","constrained baseline","high","high 10","high 4:2:2","high 4:4:4 predictive","main","main 10","main 12","main 4:2:2 10","main 4:4:4","main still picture","professional","profile 0","profile 1","profile 2","simple"],o=["gbrp","gbrp10le","nv12","p010le","rgb24","yuv420p","yuv420p10le","yuv422p","yuv422p10le","yuv444p","yuv444p10le"],a=["bt2020","bt470bg","bt470m","bt709","film","jedec-p22","smpte170m","smpte240m","smpte428","smpte431","smpte432"],l=["bt2020c","bt2020nc","bt470bg","bt709","chroma-derived-c","chroma-derived-nc","fcc","ictcp","rgb","smpte170m","smpte2085","smpte240m","ycgco"],c=["arib-std-b67","bt1361ecg","bt2020-10","bt2020-12","bt709","gamma22","gamma28","iec61966-2-1","iec61966-2-4","linear","log","log_sqrt","smpte170m","smpte2084","smpte240m","smpte428"],d=["file_lost","file_not_reachable","filenotfound","invalid_media","mp4_not_ready","notfound","video_unavailable"],u=e=>e&&"object"==typeof e&&!Array.isArray(e)?e:null,p=e=>"string"==typeof e&&e.length>0?e:null,_=(e,t)=>{if("string"!=typeof e)return"unknown";const s=e.trim().toLowerCase(),r=t.find((e=>e===s));return r?.replace(/[^a-z0-9-]+/gu,"_")??"unknown"},h=(e,t)=>Array.isArray(e.streams)?e.streams.map(u).find((e=>e?.codec_type===t))??null:null,g=(e,t)=>{const s="string"==typeof e&&/^\d+$/u.test(e)?Number(e):e;return"number"==typeof s&&Number.isFinite(s)&&s>0&&s<=t?String(Math.round(s)):"unknown"},m=e=>{const t=g(e?.width,16384),s=g(e?.height,16384);return"unknown"===t||"unknown"===s?"unknown":`${t}x${s}`},f=(e,t)=>t?0===e?"transient":null===e?"unknown":401===e||403===e?"auth":404===e?"not_found":408===e||429===e||504===e?"transient":e>
74=500?"server":e>=400?"client":"unknown":"none",y=e=>"number"==typeof e&&r.includes(e)?e:null,b=e=>null===e?null:404===e?"source_gone":402===e?"entitlement":429===e?"throttled":0===e||408===e||e>=500?"server_transient":null,x=e=>{const t=e?.toLowerCase();switch(t){case"blink":case"edgehtml":case"gecko":case"presto":case"trident":case"webkit":return t;default:return"unknown"}},w=(e,t)=>{const s=u(e.format),r=[p(e.mime_type)?.toLowerCase()??"",t?.toLowerCase()??"",p(s?.name)?.toLowerCase()??""];for(const e of r){if(e.includes("matroska"))return"matroska";if(e.includes("webm"))return"webm";if(e.includes("mp4")||e.includes("m4v"))return"mp4";if(e.includes("quicktime")||e.includes("mov"))return"quicktime";if(e.includes("mpegts")||e.includes("mp2t"))return"mpeg-ts";if(e.includes("avi"))return"avi";if(e.includes("ogg"))return"ogg"}return r.some(Boolean)?"other":"unknown"},S=e=>{const t=e?.toLowerCase();return t?t.includes("mpegurl")?"hls":"direct":"unknown"},v=e=>{if(!e)return"unknown";const t=/[?&]original=(0|1|false|true)(?:&|$)/iu.exec(e);return t?"1"===t[1]||"true"===t[1].toLowerCase()?"true":"false":"unknown"},I=e=>{switch(e){case 0:return"nothing";case 1:return"metadata";case 2:return"current_data";case 3:return"future_data";case 4:return"enough_data";default:return"unknown"}},k=e=>{switch(e){case 0:return"empty";case 1:return"idle";case 2:return"loading";case 3:return"no_source";default:return"unknown"}},T=(e,t)=>"number"==typeof e&&Number.isFinite(e)?Math.min(Math.max(e,0),t):0,A=e=>{const t=u(e);return y(t?.code)},E=e=>"number"==typeof e&&Number.isInteger(e)&&e>=0&&e<=1e5?String(e):"unknown",M=e=>{let{apiErrorStatusCode:t,apiErrorType:s,attemptId:r,browserEngine:u,currentTime:p,engineError:A=null,fileId:M,fileProbe:j,hasApiError:D,mediaErrorCode:C,mediaInfo:R,networkState:N,playbackRate:P,playbackStarted:O,player:L,readyState:Z,sourceSequence:F,sourceContentType:z,sourceUrl:U,timeToErrorMs:V}=e;const Y=y(C),W="number"==typeof(G=t)&&Number.isInteger(G)&&(0===G||G>=100&&G<=599)?G:null;var G;const H=A?b(W)??A.failureMode:((e,t,s)=>{const r=b(t);if(null!==r)return r;switch(e){case 1:return"aborted";case 2:return"network";case 3:return"decode";case 4:return"unsupported_source";default:return s?"load":"unknown"}})(Y,W,D),B=E(A?.code),$=R??{},q=h($,"audio"),Q=h($,"video"),K=g(Q?.bits_per_raw_sample,64),J="unknown"===K?g(Q?.bits_per_sample,64):K;return{extra:{current_time_seconds:Math.round(T(p,86400)),file_id:M,media_error_code:Y,network_state:k(N),playback_attempt_id:r,playback_started:O,playback_rate:Math.round(100*T(P,16))/100,ready_state:I(Z),schema_version:1,source_sequence:Math.max(1,Math.round(F)),source_request_status:W,telemetry_event:"playback_failure",terminal:!0,time_to_error_ms:Math.round(T(V,864e5))},fingerprint:[`${L}-playback-error`,`failure:${H}`,A?`engine-code:${B}`:`media-code:${Y??"none"}`],tags:{audio_codec:_(q?.codec_name,n),browser_engine:x(u),color_primaries:_(Q?.color_primaries,a),color_space:_(Q?.color_space,l),container_family:w($,z),engine_error_category:A?E(A.category):"none",engine_error_code:A?B:"none",file_id:null===M?"unknown":String(M),file_probe:j,media_error_code:null===Y?"none":String(Y),playback_attempt_id:r,playback_failure_mode:H,playback_outcome:"failed",playback_started:String(O),playback_terminal:"true",player:L,play_original:v(U),schema_version:"1",source_kind:S(z),source_request_error_type:_(s,d),source_request_failure_kind:f(W,D),source_request_status:null===W?"none":String(W),telemetry_event:"playback_failure",video_bit_depth:J,video_codec:_(Q?.codec_name,n),video_level:g(Q?.level,1e3),video_pixel_format:_(Q?.pix_fmt,o),video_profile:_(Q?.profile,i),video_resolution:m(Q),video_transfer:_(Q?.color_transfer,c)}}}},31308:(e,t,s)=>{"use strict";s.d(t,{y:()=>i});var r=s(73059),n=s(49024);const i=async e=>{let{fileAccess:t,fileId:s,sourceRequestUrl:i}=e;const o=await(async e=>{if(!e)return null;let t=null;try{await n.Z.get(e)}catch(e){t=(0,r.XR)(e)?e:null}return t})(i),a=404===o?.data.status_code&&"owner"===t?await(async e=>{if(null===e)return"unknown";try{return await n.Z.Files.Query(e),"exists"}catch(e){return(0,r.XR)(e)&&404===e.data.status_code?"deleted":"unknown"}})(s):"not_attempted";return{apiError:o,fileProbe:a}}},59060:(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var r=s(13980),n=s.n(r),i=s(2784),o=s(19192),a=s.n(o),l=s(52322);const c=e=>{let{ratio:t=.6}=e;const s=(0,i.createRef)(null);return(0,i.useLayoutEffect)((()=>{const e=a()(s.current).width();a()(s.current).height(e*t)}),[s,t]),(0,l.jsx)("div",{className:"video-player-placeholder",ref:s,children:(0,l.jsx)("i",{className:"flaticon stroke play-4"})})};c.propTypes={ratio:n().number};const d=c},76398:(e,t,s)=>{"use strict";s.d(t,{Y:()=>r});const r=[.25,.5,.75,.9,1,1.1,1.25,1.5,2,3]},13111:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>R});var r=s(62822),n=s(1593),i=s(42871),o=s(27623),a=s(13980),l=s.n(a),c=s(2784),d=s(59724),u=s(44286),p=s(75229),_=s(42238),h=s(70067),g=s(28687),m=s(60742),f=s(86065);class y extends m.Q{name="VideoJSError";constructor(e){let{apiError:t,mediaError:s,playbackTelemetry:r}=e;super(r),this.mediaError=s,this.apiError=t,Object.defineProperties(this,{apiError:{enumerable:!1},mediaError:{enumerable:!1}})}get underlyingError(){return this.apiError||this.mediaError}get localizers(){return[...(0,h.W)(),{error_type:"INVALID_MEDIA",kind:"api_error_type",localize:g.O},{error_type:"MP4_NOT_READY",kind:"api_error_type",localize:()=>({message:"We're still transcoding this file to MP4.",recoverySuggestion:{description:"Please try again in a bit.",type:"instruction"}})},{kind:"match_condition",localize:g.O,match:e=>4===(0,f.h)(e)},{kind:"match_condition",localize:e=>{const t=e?.message;return{message:"string"==typeof t&&t.length>0?t:"Unknown error occurred.",recoverySuggestion:{description:"Please refresh the page and try again.",type:"instruction"}}},match:e=>{const t=(0,f.h)(e);return 1===t||3===t}},{kind:"generic",localize:g.O}]}}var b=s(49566),x=s(31308);const w=e=>{let{getPlaybackSourceContext:t,player:s}=e;const r=function(){let{createId:e=b.o,now:t=(()=>performance.now())}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=null,r=0;const n=n=>(s={id:e(),playbackStarted:!1,sequence:++r,source:n,startedAt:t(),terminalReported:!1},s),i=e=>s&&s.source===e?s:n(e);return{begin:e=>n(e),claimTerminalFailure(e){const t=i(e);return t.terminalReported?null:(t.terminalReported=!0,{id:t.id,playbackStarted:t.playbackStarted,sequence:t.sequence,source:t.source,startedAt:t.startedAt})},markPlaybackStarted(e){i(e).playbackStarted=!0}}}(),n=()=>s.getChild("ErrorDisplay"),i=async()=>{const e=r.claimTerminalFailure(t());if(!e)return;n().fillWith(document.createElement("div"));const i=s.error()??null,o={attemptId:e.id,browserEngine:(new _.UAParser).getEngine().name,currentTime:s.currentTime(),fileId:e.source.fileId,mediaErrorCode:(0,f.h)(i),mediaInfo:e.source.mediaInfo,networkState:s.networkState(),playbackRate:s.playbackRate(),playbackStarted:e.playbackStarted,readyState:s.readyState(),sourceSequence:e.sequence,sourceContentType:e.source.sourceContentType,sourceUrl:e.source.sourceRequestUrl,timeToErrorMs:performance.now()-e.startedAt},{apiError:a,fileProbe:l}
74=await(0,x.y)({fileAccess:e.source.fileAccess,fileId:e.source.fileId,sourceRequestUrl:e.source.sourceRequestUrl}),c=(0,f.W)({...o,apiErrorStatusCode:a?.data.status_code,apiErrorType:a?.data.error_type,fileProbe:l,hasApiError:null!==a,player:"videojs"}),d=new y({apiError:a,mediaError:i,playbackTelemetry:c}),u=404===a?.data.status_code&&"exists"!==l;"deleted"===l||u||d.reportToSentry(),(e=>{const t=n(),{localizedError:s}=e,r=document.createElement("div"),i=`\n      <div style="font-size: var(--fontSize-1); font-weight: var(--fontWeight-heading)">\n        ${s.message}\n      </div>\n\n      <div style="font-size: var(--fontSize-1); padding-top: 16px; padding-bottom: 16px;">\n        ${s.recoverySuggestion.description}\n      </div>\n    `;if(r.innerHTML=i,"action"===s.recoverySuggestion.type){const e=document.createElement("button");e.type="button",e.innerText=s.recoverySuggestion.trigger.label,e.setAttribute("style","background-color: var(--theme-ui-colors-yellow-solid);font-size: var(--fontSize-0);border-radius: 4px;color: black;padding: 4px 12px;"),e.addEventListener("click",(()=>{"action"===s.recoverySuggestion.type&&s.recoverySuggestion.trigger.callback()})),r.innerHTML=i,r.appendChild(e)}t.fillWith(r)})(d)};s.on("loadstart",(()=>{r.begin(t())})),s.on("playing",(()=>r.markPlaybackStarted(t()))),s.on("error",i),s.on("contenterror",i)};var S=s(76398),v=s(15415);const I=(0,s(20242).i)();var k=s(19192),T=s.n(k);const A=[(()=>{let e=null,t=null;const s=(s,r,n)=>{if(r&&r.cues_){for(const e of r.cues_)e.startTime+=n/100,e.endTime+=n/100;r.totalOffset=(r.totalOffset||0)+n,((s,r)=>{let{offset:n,totalOffset:i}=r;e||(s.addChild("component").el_.innerHTML='<div class="vjs-subtitle-offset"><span></span></div>',e=T()(".vjs-subtitle-offset span")),e.html(`Subtitle offset updated ${n}ms.<br/>Total offset: ${i}ms.`),e.css("display","inline-block"),t&&clearInterval(t),t=setInterval((()=>{e.css("display","none"),clearInterval(t)}),3e3)})(s,{offset:n,totalOffset:r.totalOffset})}},r=e=>e.textTracks().tracks_.find((e=>"showing"===e.mode)),n=e=>{const t=r(e);t&&s(e,t,-50)};return{[v.Jyx]:n,[v.kDU]:n,[v.Yt0]:e=>{const t=r(e);t&&s(e,t,50)}}})()];function E(e){if(!e.metaKey&&!e.ctrlKey)switch(e.preventDefault(),e.stopPropagation(),e.key){case v.jWw:case v.BGU:case v.djR:return this.paused()?this.play():this.pause();case v.q0i:return this.isFullscreen()?this.exitFullscreen():this.requestFullscreen();case v.jDv:this.options_.plugins.theater&&I.emit("TOGGLE_THEATER_MODE");break;case v.ngt:{const e=this.options_.plugins.playNext||{};e.title&&e.onPlay(!0);break}case v.DXV:return this.muted()?this.muted(!1):this.muted(!0);case v.vvs:{let e=this.volume()+.1;return e>1&&(e=1),e>0&&this.muted(!1),this.volume(e)}case v.Q6s:{let e=this.volume()-.1;return e<0&&(e=0),0===e?this.muted(!0):(this.muted(!1),this.volume(e))}case v.GeA:{let e=this.currentTime()-10;return e<0&&(e=0),this.currentTime(e)}case v.wCZ:{const e=this.currentTime()+10;e<this.duration()&&this.currentTime(e);break}default:{const t=A.find((t=>t[e.key]));if(t)return t[e.key](this);break}}}const M=(()=>{const e="NextItemInfo",t=p.Z.getComponent("Component");return p.Z.registerComponent(e,class extends t{createEl(){return super.createEl("div",{className:"vjs-play-next-info",innerHTML:`\n          <span>\n            Up Next:\n          </span>\n          <span>\n            ${this.options_.title}\n          </span>\n        `})}}),{name:e}})(),j=(()=>{const e="NextItemPlayButton",t=p.Z.getComponent("ClickableComponent");return p.Z.registerComponent(e,class extends t{createEl(){const e=this.options_.radius*Math.PI*2,t=e,s=window.innerWidth>640?{cx:55,cy:55,height:110,r:45,width:110}:{cx:30,cy:30,height:60,r:27,width:60};return super.createEl("div",{className:"vjs-play-next-button",innerHTML:`\n        <div class="svg-container">\n          <i class="flaticon stroke play-3"></i>\n\n          <svg\n            width="${s.width}"\n            height="${s.height}"\n            xmlns="http://www.w3.org/2000/svg"\n          >\n            <circle\n              id="bg"\n              r="${s.r}"\n              cy="${s.cy}"\n              cx="${s.cx}"\n              stroke-width="2"\n              stroke="#000"\n              fill="none\n            "/>\n\n            <circle\n              id="fg"\n              r="${s.r}"\n              cy="${s.cy}"\n              cx="${s.cx}"\n              stroke-width="3"\n              stroke-dasharray=${e}\n              stroke-dashoffset=${t}\n              stroke="#FDCE45"\n              fill="none"\n            />\n          </svg>\n        </div>\n      `})}handleClick(){this.options_.onClick()}}),{name:e}})(),D=(()=>{const e="NextItemCancelButton",t=p.Z.getComponent("Button");return p.Z.registerComponent(e,class extends t{createEl(){return super.createEl("button",{className:"vjs-play-next-cancel-button",innerHTML:"Cancel"})}handleClick(){this.options_.onClick()}}),{name:e}})();
74var C=s(52322);p.Z.log.level("off"),(()=>{const e=p.Z.getComponent("Button");class t extends e{constructor(e,t){super(e,t),this.buttonText="TheaterMode",t.enabled||this.hide(),e.on("fullscreenchange",(()=>{this.player().isFullscreen()&&this.active&&this.deactivate()})),I.on("TOGGLE_THEATER_MODE",(()=>this.active?this.deactivate():this.activate()))}activate(){this.active=!0;const e=this.player();e.isFullscreen()&&e.exitFullscreen(),e.addClass("vjs-theater"),e.fill(!0),e.fluid(!1);const t=T()("#player-container");t.addClass("with-vjs-theater"),t.on("click",(e=>{T()(e.target).hasClass("player")&&(this.deactivate(),t.off("click"))}))}buildCSSClass(){return`${super.buildCSSClass()} vjs-theater-control`}deactivate(){this.active=!1;const e=this.player();e.removeClass("vjs-theater"),e.fill(!1),e.fluid(!0),T()("#player-container").removeClass("with-vjs-theater")}handleClick(){return super.handleClick(),this.active?this.deactivate():this.activate()}}t.prototype.controlText_="Theater",p.Z.registerComponent("TheaterPlugin",t),p.Z.registerPlugin("theater",(function(e){this.ready((()=>{const t=this.controlBar.addChild("TheaterPlugin",e);this.controlBar.el().insertBefore(t.el(),this.controlBar.fullscreenToggle.el())}))}))})(),(()=>{const e=p.Z.getComponent("Button");class t extends e{buildCSSClass(){return`vjs-airplay-control ${super.buildCSSClass()}`}handleClick(){this.player().el().getElementsByTagName("video")[0].webkitShowPlaybackTargetPicker()}}t.prototype.controlText_="Airplay",p.Z.registerComponent("AirplayButton",t),p.Z.registerPlugin("airplay",(function(e){window.WebKitPlaybackTargetAvailabilityEvent&&this.ready((()=>{this.el().getElementsByTagName("video")[0].addEventListener("webkitplaybacktargetavailabilitychanged",(t=>{if("available"===t.availability&&this.controlBar?.childNameIndex_&&!this.controlBar.childNameIndex_.hasOwnProperty("AirplayButton")){const t=this.controlBar.addChild("AirplayButton",e);this.controlBar.el().insertBefore(t.el(),this.controlBar.fullscreenToggle.el())}}))}))}))})(),(()=>{const e=p.Z.getComponent("ModalDialog");class t extends e{constructor(e,s){super(e,s),this.showing=!1,this.countdownStarted=!1,this.remainingTime=t.STARTING_TIME,this.on(e,"ended",(()=>{const e=this.player_.options_.plugins.playNext,t="Html5"===this.player_.techName_;e.title&&t&&(this.options_=e,this.initialize())})),this.on(e,"play",(()=>{this.showing&&this.close()})),this.on("dispose",(()=>{this.stopCountdown()}))}buildCSSClass(){return`vjs-play-next ${super.buildCSSClass()}`}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.showing=!1,this.stopCountdown(),!e&&this.player_&&this.player_.bigPlayButton.show(),T()(this.contentEl_).html(""),super.close()}countdown(){this.countdownStarted&&setTimeout((()=>{if(0===this.remainingTime)return this.onPlay();this.remainingTime-=10,this.updatePlayButtonProgress(),this.countdown()}),100)}initialize(){this.showing=!0,this.open(),this.player_.bigPlayButton.hide(),this.addChild(M.name,{title:this.options_.title}),this.addChild(j.name,{onClick:()=>this.onPlay(),radius:t.PLAY_BUTTON_RADIUS}),this.addChild(D.name,{onClick:()=>this.close(!1)}),this.options_.autoPlay&&this.startCountdown()}onPlay(){this.options_.onPlay(!0,this.player_.techName),this.close(!0)}startCountdown(){this.countdownStarted=!0,this.countdown()}stopCountdown(){this.countdownStarted=!1,this.remainingTime=t.STARTING_TIME}updatePlayButtonProgress(){const e=t.STARTING_TIME,s=(e-this.remainingTime)/e*100,r=t.PLAY_BUTTON_RADIUS*Math.PI*2,n=r-r*s/100;T()(".vjs-play-next-button #fg").attr("stroke-dasharray",r).attr("stroke-dashoffset",n)}}t.STARTING_TIME=500,t.PLAY_BUTTON_RADIUS=45,t.OPTIONS={uncloseable:!0},p.Z.registerComponent("PlayNextModal",t),p.Z.registerPlugin("playNext",(function(e){this.ready((()=>{this.addChild("PlayNextModal",{...t.OPTIONS,...e})}))}))})();class R extends c.PureComponent{saveVideoPosition=()=>{const e=this.player.currentTime(),t=this.player.duration();this.props.onTimeChange(Number.parseFloat(e),Number.parseFloat(t))};constructor(e){super(e),this.videoElementRef=c.createRef(),this.consumedStartFrom=!1,this.isPopup=window.location.search.includes("popup=1")}componentDidMount(){const e=this.isPopup?{fill:!0}:{aspectRatio:"16:9",fluid:!0};this.player=(0,p.Z)(this.videoElementRef.current,{autoplay:this.props.autoplay,controlBar:{currentTimeDisplay:!0,fullscreenToggle:!0,pictureInPictureToggle:!!document.pictureInPictureEnabled,playToggle:!0,playbackRateMenuButton:!0,progressControl:!0,remainingTimeDisplay:!0,volumePanel:!0},controls:!0,html5:{preloadTextTracks:!1,vhs:{overrideNative:!r.Z.isHLSNativelySupported()}},muted:this.props.muted,name:this.props.title,persistTextTrackSettings:!0,playbackRates:this.props.playbackRates,plugins:{airplay:{},playNext:{},theater:{enabled:this.props.theaterMode,ratio:this.props.ratio}},poster:this.props.poster,techOrder:["html5"],userActions:{hotkeys:E},...e}),this.playbackSourceContext=this.createPlaybackSourceContext(this.props),(e=>{for(const t of[w])t(e)})({getPlaybackSourceContext:()=>this.playbackSourceContext,player:this.player}),this.props.videoRef(this.player),this.configureMediaAssets(this.props),this.player.ready((()=>{this.registerPlaybackEventListeners(),this.registerTextTrackEventListeners()}))}componentWillUnmount(){this.player&&(this.player.currentTime()&&this.props.onPlaybackStopped(),this.player.dis
74pose())}componentWillUpdate(e){this.player&&(e.id!==this.props.id&&(this.player.poster(e.poster),this.configureMediaAssets(e),e.autoplay&&this.player.play()),e.forcePause!==this.props.forcePause&&e.forcePause&&this.player.pause(),this.props.nextVideo===e.nextVideo&&this.props.autoPlayNextVideo===e.autoPlayNextVideo||this.updatePlayNextPlugin({autoPlay:e.autoPlayNextVideo,nextVideo:e.nextVideo}))}configureMediaAssets(e){const t=(0,i.U)({contentType:e.contentType,hlsURL:e.hls,streamURL:e.stream,subtitles:e.subtitles.toJS()});this.playbackSourceContext=this.createPlaybackSourceContext(e,t.video),this.player.src({src:t.video.url,type:t.video.contentType}),"mp4"===t.playbackType&&t.textTracks.groupedByLanguage.flatMap((e=>e.subtitles)).forEach(((e,s)=>{this.player.addRemoteTextTrack({default:0===s&&t.textTracks.autoSelect,kind:"subtitles",label:e.label,src:`${e.link}&format=webvtt`},!1)}))}createPlaybackSourceContext(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{fileAccess:e.fileAccess,fileId:e.fileId??("number"==typeof e.id?e.id:null),mediaInfo:e.mediaInfo??{},sourceContentType:t.contentType,sourceRequestUrl:t.url??null}}registerPlaybackEventListeners(){this.player.on("play",(()=>{this.props.onPlaybackStarted()})),this.player.on("pause",(()=>{this.saveVideoPosition()})),this.player.on("ended",(()=>{!this.props.nextVideo&&this.player.isFullscreen()&&this.player.exitFullscreen(),this.props.onPlaybackStopped()})),this.player.on("timeupdate",(()=>{this.saveVideoPosition()})),this.player.on("canplay",(()=>{this.props.startFrom&&!this.consumedStartFrom&&(this.consumedStartFrom=!0,this.player.currentTime(this.props.startFrom))}))}registerTextTrackEventListeners(){const e=(0,n.OQ)();if(e){e.subtitleStyles&&this.player.textTrackSettings.setValues(e.subtitleStyles);const t=this.player.textTrackSettings.saveSettings.bind(this.player.textTrackSettings);this.player.textTrackSettings.saveSettings=function(){t();const s=this.getValues();(0,d.f)(e.subtitleStyles,s)||(0,n.D4)({...e,subtitleStyles:s})}}}render(){return(0,C.jsx)("div",{className:"player "+(this.isPopup?"popup":""),id:"player-container",children:(0,C.jsx)("video",{className:"video-js vjs-default-skin vjs-show-big-play-button-on-pause",playsInline:this.props.playsInline,ref:this.videoElementRef})})}updatePlayNextPlugin(e){const t={autoPlay:e.autoPlay,onPlay:()=>this.props.onNextVideo({autoPlay:!0}),title:e.nextVideo?.getIn(["file","name"])};this.player.options_.plugins.playNext=t}}R.propTypes={autoPlayNextVideo:l().bool,autoplay:l().bool,fileAccess:l().oneOf(["owner","shared"]),fileId:l().number,forcePause:l().bool,hls:l().string,id:l().oneOfType([l().number,l().string]),mediaInfo:l().object,muted:l().bool,nextVideo:l().instanceOf(o.D5),onNextVideo:l().func,onPlaybackStarted:l().func,onPlaybackStopped:l().func,onTimeChange:l().func,playbackRates:l().oneOfType([l().arrayOf(l().number),l().bool]),playsInline:l().bool,poster:l().string,ratio:l().number,startFrom:l().number,stream:l().string,theaterMode:l().bool,title:l().string.isRequired,videoRef:l().func},R.defaultProps={autoPlayNextVideo:!1,autoplay:!1,contentType:"",fileAccess:"owner",forcePause:!1,hls:"",id:0,mediaInfo:{},muted:!1,nextVideo:null,onNextVideo:u.Z,onPlaybackStarted:u.Z,onPlaybackStopped:u.Z,onTimeChange:u.Z,playbackRates:S.Y,playsInline:!1,poster:"",ratio:void 0,startFrom:void 0,stream:"",subtitles:(0,o.aV)(),theaterMode:!0,videoRef:u.Z}},11910:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var r=s(13980),n=s.n(r),i=s(2784),o=s(52322);class a extends i.PureComponent{render(){return(0,o.jsx)("div",{className:`table-column ${this.props.className}`,children:this.props.children})}}a.propTypes={children:n().node,className:n().string},a.defaultProps={children:"",className:""}},91216:(e,t,s)=>{"use strict";s.d(t,{iA:()=>a});var r=s(13980),n=s.n(r),i=s(2784),o=s(52322);class a extends i.Component{render(){const e=this.props.ratio.split(":"),t=i.Children.map(this.props.children,(t=>{if(!t)return t;const s=i.Children.map(t.props.children,((t,s)=>i.cloneElement(t,{...t.props,className:`col-${e[s]} ${t.props.className||""}`})));return i.cloneElement(t,t.props,s)}));return(0,o.jsx)("div",{className:`table ${this.props.className}`,children:t})}}a.propTypes={children:n().node,className:n().string,ratio:n().string.isRequired},a.defaultProps={children:[],className:""}},33869:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var r=s(13980),n=s.n(r),i=s(2784),o=s(52322);class a extends i.PureComponent{render(){return(0,o.jsx)("div",{className:`table-row ${this.props.className}`,id:this.props.id,children:this.props.children})}}a.propTypes={children:n().node,className:n().string,id:n().string},a.defaultProps={children:"",className:"",id:""}},42485:(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var r=s(13980),n=s.n(r),i=s(2784),o=s(75289),a=s(59807),l=s(52322);class c extends i.PureComponent{componentDidMount(){this.timer=setInterval((()=>{this.props.status===c.STATUS.RUNNING&&"function"==typeof this.props.onTick&&this.props.onTick()}),1e3)}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){const e=c.ongoingStatuses.includes(this.props.status),t=this.props.title?(0,l.jsx)("div",{className:"task-title",children:this.props.title}):null;return(0,l.jsxs)("div",{className:`task ${this.props.className} ${this.props.status}`,children:[this.props.title?(0,l.jsxs)(o.xu,{children:[(0,l.jsxs)(o.kC,{sx:{alignItems:"center",gap:2},children:[e?(0,l.jsx)(o.$j,{size:16}):null,t]}
74),(0,l.jsx)(o.xu,{sx:{position:"absolute",right:1,top:1},children:(0,l.jsx)(a.h,{appearance:"transparent",icon:{name:"x-1",type:"solid"},onClick:this.props.onCancel,size:"xs"})})]}):null,(0,l.jsx)(o.xu,{children:this.props.children})]})}}c.STATUS={DONE:"status_done",ERROR:"status_error",NEW:"status_new",PARTIALLY_DONE:"status_partially_done",RUNNING:"status_running",WAITING:"status_waiting"},c.ongoingStatuses=[c.STATUS.NEW,c.STATUS.WAITING,c.STATUS.RUNNING],c.propTypes={children:n().element.isRequired,className:n().string,onCancel:n().func.isRequired,onTick:n().func,status:n().string.isRequired,title:n().oneOfType([n().string,n().element])},c.defaultProps={className:"",onTick:null,title:""}},29604:(e,t,s)=>{"use strict";s.d(t,{Z:()=>N});const r={app:"http://localhost:4310",auth:"http://localhost:4340",tv:"http://localhost:4320",www:"http://localhost:4300"},n={development:r,production:{app:"https://app.put.io",auth:"https://auth.put.io",tv:"https://tv.put.io",www:"https://put.io"},staging:{app:"https://app-staging.put.io",auth:"https://auth-staging.put.io",tv:"https://tv-staging.put.io",www:"https://www-staging.put.io"},test:r},i=/^https?:\/\/[^/]+(?:\/[^/]+)*?\/(\d+)\/?$/,o=e=>{const t=e?i.exec(e.trim())?.[1]:void 0;return t?`https://relay.put.io/api/${t}/envelope/`:void 0},a=["AbortError","BetterJsPop","cannot redefine property","fullscreen","googleTag","ibFindAllVideos","Incorrect Invocation","Invalid target","InvalidStateError","Load Failed","NotSupportedError","ntp is not defined","ResizeObserver loop limit exceeded","timeout of","vc_request_action","Unexpected identifier 'Promise'"];var l=s(58452),c=s(67396);s(43673),s(40753),s(28399);const d="FILTERED",u=new Set(["accesstoken","apikey","authorization","clientsecret","clienttoken","couponcode","discountcode","email","mail","password","ptxn","refreshtoken","secret","token","transactionid"]),p=/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/gi,_=/(^|[?#&\s])([a-zA-Z0-9_.-]+)=[^&#\s]*/gi,h=e=>{const t=(e=>e.replace(/[^a-zA-Z0-9]/g,"").toLowerCase())(e);return u.has(t)||t.endsWith("secret")||t.endsWith("token")||t.includes("apikey")||t.includes("authorization")},g=e=>e.replace(_,((e,t,s)=>h(s)?`${t}${s}=${d}`:e)),m=e=>g(e).replace(p,d),f=e=>{try{const t=e.startsWith("/"),s=new URL(e,"https://put.io");let r=!1;for(const e of s.searchParams.keys()){const t=s.searchParams.get(e)??"",n=m(t);h(e)?(s.searchParams.set(e,d),r=!0):n!==t&&(s.searchParams.set(e,n),r=!0)}if(s.hash){const e=g(s.hash);e!==s.hash&&(s.hash=e,r=!0)}return m(r?t?`${s.pathname}${s.search}${s.hash}`:s.toString():e)}catch{return m(e)}},y=(e,t)=>t&&h(t)?d:"string"==typeof e?m(e):Array.isArray(e)?e.map((e=>y(e))):e&&"object"==typeof e?b(e):e,b=e=>Object.fromEntries(Object.entries(e).map((e=>{let[t,s]=e;return[t,y(s,t)]}))),x=e=>e?Object.fromEntries(Object.entries(e).map((e=>{let[t,s]=e;return[t,String(y(s,t))]}))):e,w=e=>({...e,data:e.data?b(e.data):e.data,message:e.message?m(e.message):e.message}),S=e=>({...e,data:e.data?b(e.data):e.data,description:e.description?m(e.description):e.description}),v=e=>{return{...e,breadcrumbs:e.breadcrumbs?.map(w),exception:(r=e.exception,r?.values?{...r,values:r.values.map((e=>({...e,value:e.value?m(e.value):e.value})))}:r),extra:e.extra?b(e.extra):e.extra,logentry:e.logentry?{...e.logentry,message:e.logentry.message?m(e.logentry.message):e.logentry.message,params:e.logentry.params?.map(m)}:e.logentry,message:e.message?m(e.message):e.message,request:(t=e.request,t?{...t,cookies:x(t.cookies),data:y(t.data),env:x(t.env),headers:x(t.headers),query_string:(s=t.query_string,"string"==typeof s?m(s):Array.isArray(s)?s.map((e=>{let[t,s]=e;return[t,h(t)?d:m(s)]})):s?Object.fromEntries(Object.entries(s).map((e=>{let[t,s]=e;return[t,h(t)?d:m(s)]}))):s),url:t.url?f(t.url):t.url}:t),spans:e.spans?.map(S),transaction:e.transaction?m(e.transaction):e.transaction};var t,s,r},I=e=>v(e),k=/(?:^|\/)jwpsrv\.js(?:[?#].*)?$/,T=/^Non-Error promise rejection captured with value: CANCEL_BY_(?:BACKDROP|CROSS|CTA|ESC|FOOTER)$/,A="UnavailableError",E=/(?:^|\/)Honey\.safariextension\//,M=/^https:\/\/public\.profitwell\.com\/js\/profitwell\.js(?:[?#].*)?$/,j=!0,D=function(e){switch(e){case"development":case"test":case"staging":case"production":return e;default:throw new Error(`Unsupported app environment: ${String(e)}`)}}("production"),C=function(e){return n[e]}(D),R={analyticsEnabled:j,apiURL:"https://api.put.io",clientID:Number.parseInt("1",10),clientName:"app.put.io",clientSecret:"x6ahb3e118grucakdsj2",environment:D,env:"production",httpUploadURL:"https://upload.put.io/v2/files/upload",intercom:{appID:"l5gc2yay",enabled:j},isProd:j,pasApiURL:"https://pas.put.io/api",paddleBilling:{production:{clientToken:"live_d32b49eb72d83bb65030fa416c2"},sandbox:{clientToken:"test_a6bc6cc23d0f1140f2e02f5a9d0"}},reCaptchaSiteKey:"6LcY_NofAAAAAB-I0JEFCvvETg7p3F0ip26iKBMy",release:"[email protected]+a0ce631",get sentry(){return{dsn:"https://[email protected]/63579",tunnel:o("https://[email protected]/63579"),enabled:j,environment:D,ignoreErrors:a,integrations:[l.E8(),c.k({onerror:!0,onunhandledrejection:!0}
74)],tracesSampleRate:.1,maxBreadcrumbs:10,normalizeDepth:10,release:R.release,beforeBreadcrumb:w,beforeSend:e=>(e=>!0===e.exception?.values?.some((e=>{const t=e.stacktrace?.frames?.at(-1)?.filename;return"TypeError"===e.type&&"Cannot read properties of null (reading 'offsetParent')"===e.value&&"string"==typeof t&&k.test(t)})))(e)||(e=>!0===e.exception?.values?.some((e=>"UnhandledRejection"===e.type&&"string"==typeof e.value&&T.test(e.value))))(e)||(e=>!0===e.exception?.values?.some((e=>"TypeError"===e.type&&"Load failed"===e.value&&!0===e.stacktrace?.frames?.some((e=>{let{filename:t}=e;return"string"==typeof t&&M.test(t)})))))(e)||(e=>!0===e.exception?.values?.some((e=>"Error"===e.type&&"Invalid call to runtime.sendMessage(). Tab not found."===e.value||e.type===A&&e.value===A&&!0===e.stacktrace?.frames?.some((e=>{let{filename:t}=e;return"string"==typeof t&&E.test(t)})))))(e)?null:(e=>v(e))(e),beforeSendTransaction:I}},socketURL:"https://socket.put.io/socket/sockjs",surfaces:C,tusUploadURL:"https://upload.put.io/files/"},N=R},88990:(e,t,s)=>{"use strict";s.d(t,{K4:()=>n,VG:()=>i,uY:()=>r});const r=(0,s(20242).i)(),n=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return r.emit("SHOW_MODAL",...t)},i=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return r.emit("HIDE_MODAL",...t)}},59902:(e,t,s)=>{"use strict";s.d(t,{E:()=>i});var r=s(11991),n=s(44286);const i=new r.S({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}},logger:{error:n.Z,log:n.Z,warn:n.Z}})},72739:(e,t,s)=>{"use strict";s.d(t,{CF:()=>n,PE:()=>i,uY:()=>r});const r=(0,s(20242).i)(),n=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return r.emit("SHOW_TOAST",...t)},i=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return r.emit("HIDE_TOAST",...t)}},43079:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(39723),n=s(72739);const i={Show:function(){return(0,n.CF)(...arguments),{close:()=>(0,n.PE)()}},TYPE:r.t,show:function(){return(0,n.CF)(...arguments),{close:()=>(0,n.PE)()}},type:r.t}},46797:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(66885),n=s(29604);const i={apiURL:n.Z.pasApiURL,cache:{domain:n.Z.isProd?".put.io":"localhost",expires:365}},o=(0,r.Z)(i)},49024:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l,f:()=>a});var r=s(73059),n=s(29604),i=s(51428);const o=new r.default({baseURL:`${n.Z.apiURL}/v2`,clientID:n.Z.clientID});o.http.interceptors.request.use((e=>{const t=i.Z.getAdminToken();return t&&(e.headers.common["Putio-Admin-Token"]=t),e}),(e=>Promise.reject(e)));const a=()=>o,l=o},50586:(e,t,s)=>{"use strict";s.d(t,{h:()=>S});var r=s(29604),n=s(9669),i=s.n(n),o=s(62822),a=s(20242),l=s(98355),c=s(34884),d=s(32315),u=s(14757),p=s(12502);const _=(0,c.xP)(),h=e=>e instanceof p.tF&&null===e.originalResponse&&(_.match(e.causingError)||(e=>"undefined"!=typeof ProgressEvent&&e instanceof ProgressEvent&&"error"===e.type)(e.causingError)),g=e=>e instanceof p.tF?e.originalResponse?.getStatus()??null:null,m=e=>e instanceof p.tF?e.originalResponse?.getBody()??"":"",f=e=>(0,d.j)(e,[{..._,match:h},{kind:"match_condition",localize:()=>({message:(0,l.I)("task_upload_error_429_message"),recoverySuggestion:{description:"",type:"instruction"}}),match:e=>429===g(e)},{kind:"match_condition",localize:()=>({message:(0,l.I)("task_upload_error_402_message"),recoverySuggestion:{description:"",type:"instruction"}}),match:e=>402===g(e)},{kind:"match_condition",localize:e=>{return{message:(t=m(e),(0,u.L)(t)??(0,l.I)("transfer_add_error_invalid_torrent")),recoverySuggestion:{description:"",type:"instruction"}};var t},match:e=>{return 400===g(e)&&(t=m(e),null!==(0,u.Z)(t)||(e=>e.includes("invalid torrent")||e.includes("not a .torrent file or is corrupt")||e.includes("Torrent cannot be bigger than"))(t));var t}},{kind:"match_condition",localize:()=>({message:(0,l.I)("transfer_add_error_already_added"),recoverySuggestion:{description:"",type:"instruction"}}),match:e=>m(e).includes("duplicate transfer")},{kind:"match_condition",localize:()=>({message:(0,l.I)("task_upload_expired_error_message"),recoverySuggestion:{description:(0,l.I)("generic_error_message"),type:"instruction"}}),match:e=>m(e).includes("upload expired")},{kind:"match_condition",localize:()=>({message:(0,l.I)("task_upload_size_bigger_than_disk_avail_message"),recoverySuggestion:{description:"",type:"instruction"}}),match:e=>m(e).includes("bigger than disk avail")},{kind:"match_condition",localize:()=>({message:(0,l.I)("task_upload_chunk_error_message"),recoverySuggestion:{description:"",type:"instruction"}}),match:e=>m(e).includes("cannot save last chunk")}]);s(78945);var y=s(49024),b=s(2754);class x extends b.iC{constructor(){super("File/Transfer ID is missing in the upload response")}}const w={SMALL_FILE_MAX_SIZE_IN_BYTES:4e6,USE_HTTP_UPLOADER:!1,http:{endpoint:r.Z.httpUploadURL},tus:{endpoint:r.Z.tusUploadURL}},S=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w;const t=(e=>({upload:t=>{const s=(0,a.i)(),{authToken:r,file:n,targetFolderId:l}=t,c=o.Z.guid(),d=(t.overridenFileName??n.name).normalize("NFKC"),u=new FormData;u.append("file",n),u.append("filename",d),l&&u.append("parent_id",l.toString());const p=new AbortController;return i().post(e.endpoint,u,{headers:{Authorization:`token ${r}`},onUploadProgress:e=>{const t=e.loaded/e.total*100;s.emit("progress",t)},signal:p.signal}).then((e=>{let{data:t}=e;if("transfer"in t)return s.emit("complete",{transfer_id:t.transfer.id,transfer_name:t.transfer.name,type:"transfer"});s.emit("complete",{file_id:t.file.id,file_name:t.file.name,file_type:t.file.file_type,type:"file"})})).catch((e=>{s.emit("error",f(e))})),{abort:()=>{p.abort(),s.emit("abort")},emitter:s,id:c,params:t,type:"http"}}}))(e.http),s=(e=>({upload:t=>{const s=(0,a.i)(),{authToken:r,file:n,targetFolderId:i}=t,l=o.Z.guid(),c=(t.overridenFileName??n.name).normalize("NFKC"),d=i?.toString()||"";let u=null;const _=new p.gq(n,{endpoint:e.endpoint,headers:{Authorization:`token ${r}`},metadata:{callback_url:"",name:c,parent_id:d,type:n.type},onAfterResponse:(e,t)=>{u=t},onError:e=>{s.emit("error",f(e))},onProgress:(e,t)=>{const r=e/t*100;s.emit("progress",r)},onSuccess:async()=>{try{const e=u?.getHeader("Putio-File-Id"),t=u?.getHeader("Putio-Transfer-Id");if(!e&&!t)throw new x;if(e){const{data:t}=await y.Z.Files.Query(e),r=t.parent;return s.emit("complete",{file_id:r.id,file_name:r.name,file_type:r.file_type,type:"file"})}if(t)return s.emit("complete",{transfer_id:Number.parseInt(t,10),transfer_name:c,type:"transfer"})}catch(e){return s.emit("error",f(e))}}});return _.findPreviousUploads().then((e=>{const t=e.filter((e=>{let{metadata:t}=e;return t.parent_id===d&&t.name===c}));if(t.length){const e=t.toSorted(((e,t)=>new Date(t.creationTime).getTime()-new Date(e.creationTime).getTime()))[0];_.resumeFromPreviousUpload(e)}_.start()})),{abort:()=>{s.emit("abort"),_.abort()},emitter:s,id:l,params:t,type:"tus"}}}))(e.tus);return{upload:r=>r.file.size<=e.SMALL_FILE_MAX_SIZE_IN_BYTES&&e.USE_HTTP_UPLOADER?t.upload(r):s.upload(r)}}()},16661:(e,t,s)=>{"use strict";s.d(t,{s:()=>r});const r=e=>e.size>0},10017:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(79332);class n extends r.Z{}const i=function(e,t){throw new n(`Unexpected case: ${e}`)}},24895:(e,t,s)=>{"use strict";s.d(t,{e:()=>g});var r=s(29604),n=s(49024),i=s(15545),o=s(2784),a=s(37786),l=s(75289),c=s(18361),d=s(39723),u=s(36555),p=s(94115),_=s(32315),h=s(
7452322);const g=e=>{let{rateLimitId:t}=e;const[s]=(0,p.AV)(),[g,m]=(0,o.useState)({loading:!0,status:"captcha"}),f=(0,o.useCallback)((async e=>{m({loading:!0,status:"captcha"});try{await n.Z.delete(`/ban/${t}`,{data:{captcha_token:e}}),m({status:"success"})}catch(e){const s=(0,_.j)(e,[{kind:"api_status_code",localize:()=>({message:"IP address changed",recoverySuggestion:{description:"Please make sure both of your devices are on the same network.",type:"instruction"}}),status_code:403},{kind:"generic",localize:()=>({message:"Something went wrong",recoverySuggestion:{description:"We couldn't remove your ban.",trigger:{callback:()=>(0,i.k)({body:`I'm trying to remove a rate limit but I'm getting an error: ${t}`}),label:"Get in touch"},type:"action"}})}]);m({error:s,status:"error"})}}),[t]);switch(g.status){case"captcha":return(0,h.jsxs)(l.kC,{"data-autofocus":!0,sx:{alignItems:"center",justifyContent:"center"},tabIndex:0,children:[(0,h.jsx)(c.f,{dialog:!0,visible:g.loading}),(0,h.jsx)(a.Z,{asyncScriptOnLoad:()=>m({loading:!1,status:"captcha"}),onChange:f,sitekey:r.Z.reCaptchaSiteKey,size:"normal",style:{borderRadius:3,height:76,overflow:"hidden",width:302},theme:s})]});case"success":return(0,h.jsx)(d.P,{message:"Your ban has been removed!",type:"success"});case"error":return(0,h.jsx)(d.P,{...(0,u.P)(g.error),type:"warning"});default:return null}}},32315:(e,t,s)=>{"use strict";s.d(t,{j:()=>f});var r=s(73059),n=s(34884),i=s(98355),o=s(2754),a=s(98940),l=s(15545),c=s(70028),d=(s(2784),s(24895)),u=s(52322);const p=e=>{let{rateLimitId:t}=e;return(0,u.jsx)(d.e,{rateLimitId:t})},_={kind:"api_status_code",localize:e=>{const t=e.response?.headers["x-ratelimit-id"]??null;switch(e.response?.headers["x-ratelimit-action"]??"default"){case"captcha-needed":return s={rateLimitId:t},new c.u_({component:p,name:"recaptcha-modal",size:c.u_.SIZES.XSMALL,title:"reCAPTCHA"}).Show(s),{message:(0,i.I)("app_ratelimit_error_message"),recoverySuggestion:{description:"Please retry after solving the security test.",type:"captcha"}};case"info-mail-sent":return{message:(0,i.I)("app_ratelimit_error_message"),recoverySuggestion:{description:"Please check your inbox for an email from put.io for more information.",type:"instruction"}};case"action-mail-sent":return{message:(0,i.I)("app_ratelimit_error_message"),recoverySuggestion:{description:"Please check your inbox for an email from put.io to remove your ban.",type:"instruction"}};default:return{message:(0,i.I)("app_ratelimit_error_message"),recoverySuggestion:{description:"If you think this is a mistake, please get in touch with us.",trigger:{callback:()=>{(0,l.k)({body:"Hi, it looks like I have been banned and I think there is a mistake. \n\nCan you look into it?"+(t?`\n\nID: ${t}`:""),title:"Temporary ban removal request"})},label:"Send us the logs"},type:"action"}}}var s},status_code:429},h={kind:"match_condition",localize:()=>({message:(0,i.I)("generic_error_title"),recoverySuggestion:{description:(0,i.I)("generic_error_402_message"),trigger:{callback:()=>{window.location.href="/billing"},label:"Go to billing"},type:"action"}}),match:e=>(0,r.XR)(e)&&402===e.data.status_code||(0,r.tl)(e)&&402===e.status_code||e instanceof Response&&402===e.status},g={kind:"match_condition",localize:e=>{const t=(0,r.XR)(e)?e.data:e,s=a.uT(`UnlocalizedAPIError: ${t.status_code}.${t.error_type}`,{extra:{error:t}});return{message:(0,i.I)("generic_error_known_unknown_title"),meta:{id:s,is_generic_api_error:!0},recoverySuggestion:{description:(0,i.I)("generic_error_known_unknown_description",s),trigger:{callback:()=>{window.location.reload()},label:"Reload app"},type:"action"}}},match:e=>(0,r.XR)(e)||(0,r.tl)(e)},m={kind:"generic",localize:e=>{const t=a.Tb(e,{extra:{error:e}});return{meta:{id:t},message:(0,i.I)("generic_error_unknown_unknown_title"),recoverySuggestion:{description:(0,i.I)("generic_error_unknown_unknown_description",t),trigger:{callback:()=>{window.location.reload()},label:"Reload app"},type:"action"}}}},f=(0,o.Ko)([h,(0,n.xP)({onReload:()=>window.location.reload()}),n.KV,_,n.Nu,n.u7,n.e,g,m])},14757:(e,t,s)=>{"use strict";s.d(t,{L:()=>a,Z:()=>o});var r=s(98355),n=s(2754);const i=e=>new Intl.NumberFormat("en").format(e),o=e=>{const t=e.trim(),s=/^File count is larger than (\d+): (\d+)\.?$/.exec(t);if(s)return{count:Number(s[2]),limit:Number(s[1]),type:"file_count_exceeded"};const r=/^File count is larger than (\d+[KM]?)\.?$/.exec(t);if(r){const e=r[1];return{limit:/^\d+$/.test(e)?i(Number(e)):e,type:"file_count_limit"}}
74const o=/^Size is larger than (\d+) bytes\.?$/.exec(t);if(o)return{limit:(0,n.Gj)(Number(o[1])),type:"size_limit"};const a=/^Size is larger than ([^:]+): (.+?)\.?$/.exec(t);if(a)return{limit:a[1],size:a[2],type:"size_exceeded"};const l=/^Size is larger than (.+?)\.?$/.exec(t);return l?{limit:l[1],type:"size_limit"}:/^Torrent has too many pieces\.?$/.test(t)?{type:"too_many_pieces"}:null},a=e=>{const t=o(e);if(!t)return null;switch(t.type){case"file_count_exceeded":return(0,r.I)("task_upload_error_torrent_file_count_message",i(t.limit),i(t.count));case"file_count_limit":return(0,r.I)("transfer_error_file_count_limit_message",t.limit);case"size_exceeded":return(0,r.I)("task_upload_error_torrent_size_message",t.limit,t.size);case"size_limit":return(0,r.I)("transfer_error_size_limit_message",t.limit);case"too_many_pieces":return(0,r.I)("transfer_error_too_many_pieces_message")}}},32978:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(26713),n=s(52322);const i=function(e,t){return s=>{const i=i=>{let{check:o}=i;const a=(0,r.WH)();return a?o(a)?(0,n.jsx)(e,{...s}):(0,n.jsx)(t.fallback,{}):(0,n.jsx)(e,{...s})};return(0,n.jsx)(i,{...t})}}},87466:(e,t,s)=>{"use strict";s.d(t,{N:()=>d,Z:()=>u});var r=s(23615),n=s(12467),i=s(64955),o=s(98355),a=s(2754),l=s(32315);const c=e=>e instanceof a.nD?e:(0,l.j)(e,[{kind:"match_condition",localize:()=>({message:(0,o.I)("app_page_load_error_title"),recoverySuggestion:{description:(0,o.I)("app_page_load_error_message"),trigger:{callback:()=>window.location.reload(),label:(0,o.I)("app_page_load_retry_label")},type:"action"}}),match:e=>e instanceof Error&&("ChunkLoadError"===e.name||e.message.toLowerCase().includes("chunk"))},{kind:"match_condition",localize:()=>({message:(0,o.I)("app_page_load_timeout_title"),recoverySuggestion:{description:(0,o.I)("app_page_load_timeout_message"),trigger:{callback:()=>window.location.reload(),label:(0,o.I)("app_page_load_retry_label")},type:"action"}}),match:e=>e instanceof i.W5}]),d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.y)((0,r.Vo)((t=>(0,i.ZP)(e(t),{milliseconds:5e3}))),{error:{localizer:c,...t.error||{kind:"emptyState",variant:"page"}},fallback:t.fallback})},u=e=>d(e,{error:{kind:"emptyState",variant:"page"},fallback:null})},12467:(e,t,s)=>{"use strict";s.d(t,{y:()=>b});var r=s(2754),n=s(32315),i=s(69754),o=s(2784),a=s(80589),l=s(75289),c=s(1030),d=s(39723),u=s(36555),p=s(75778),_=s(47618),h=s(94085),g=s(33611),m=s(52322);const f=e=>{let{config:t={kind:"none"},error:s}=e;const i=(0,o.useCallback)((()=>s instanceof r.nD?s:t.localizer?t.localizer(s):(0,n.j)(s)),[t,s]);switch(t.kind){case"emptyState":return(0,m.jsx)(l.xu,{children:(0,m.jsx)(c.u,{error:i(),...t})});case"notification":return(0,m.jsx)(l.xu,{sx:t.sx,children:(0,m.jsx)(d.P,{...(0,u.P)(i())})});case"page":return(0,m.jsx)(p.Z,{error:i(),title:t.title,type:"error"});case"isolated":return(0,m.jsx)(_.w.Root,{children:(0,m.jsx)(_.w.Body,{children:(0,m.jsx)(d.P,{...(0,u.P)(i())})})});case"custom":return t.render(i());case"throw":throw i();case"none":return null}},y=e=>{let{config:t}=e;if("object"==typeof t&&null!==t&&"kind"in t)switch(t.kind){case"page":return(0,m.jsx)(i.S,{});case"list":return(0,m.jsx)(h.c,{});case"isolated":return(0,m.jsxs)(_.w.Root,{children:[(0,m.jsx)(g.O,{children:(0,m.jsx)(_.w.Title,{children:"Loading..."})}),(0,m.jsx)(_.w.Body,{children:(0,m.jsx)(g.O,{height:240})})]})}return(0,m.jsx)(m.Fragment,{children:t})},b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s=>(0,m.jsx)(a.ErrorBoundary,{fallbackRender:e=>{let{error:s}=e;return(0,m.jsx)(f,{config:t.error,error:s})},children:(0,m.jsx)(o.Suspense,{fallback:(0,m.jsx)(y,{config:t.fallback}),children:(0,m.jsx)(e,{...s})})})}},76784:(e,t,s)=>{"use strict";s.d(t,{H:()=>i});var r=s(79794);const n=e=>e.get("routing").locationBeforeTransitions,i=()=>(0,r.v9)(n)},96321:(e,t,s)=>{"use strict";s.d(t,{B:()=>o});var r=s(2784),n=s(79794),i=s(92421);const o=e=>{const t=(0,r.useMemo)((()=>(e=>t=>t.getIn(["app","currentUser"]).toJS()[e])(e)),[e]),s=(0,n.v9)(t),o=(0,n.I0)();return[s,(0,r.useCallback)((t=>{o({source:"app/useUserProperty",type:i.hO,user:{[e]:t}})}),[o,e])]}},91369:(e,t,s)=>{"use strict";s.d(t,{R:()=>d});var r=s(49024),n=s(98357),i=s.n(n),o=s(2784),a=s(79794),l=s(92421);const c=i()((async e=>r.Z.Account.SaveSettings(e)),2e3),d=e=>{const t=(0,o.useMemo)((()=>(e=>t=>t.getIn(["app","currentUser","settings"]).toJS()[e])(e)),[e]),s=(0,a.I0)(),r=(0,a.v9)(t),n=(0,o.useCallback)((t=>{const r={[e]:t};s({source:"app/useUserSettings",type:l.hO,user:{settings:r}})}),[e,s]),[i,d]=(0,o.useState)({type:"initial"}),u=(0,o.useCallback)((async function(t){let{apiValueModifier:s=(e=>e),throwError:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d({type:"saving"});try{await c({[e]:s(t)}),n(t),d({type:"success"}),setTimeout((()=>d({type:"initial"})),3e3)}catch(e){if(d({error:e,type:"failure"}),r)throw e}}),[e,n]);return[r,n,i,u]}},10231:(e,t,s)=>{"use strict";s.d(t,{M:()=>n});var r=s(2784);const n=(e,t)=>{let{dataKey:s,hasMore:n,isLoading:i,loadMore:o,loadedCount:a,threshold:l}=t;const c=e.getVirtualItems(),d=c[c.length-1]?.index,u=(0,r.useRef)(null);(0,r.useEffect)((()=>
74{if(void 0===d||i||!n)return;if(d<a-l)return;const e=u.current;e&&e.dataKey===s&&e.lastRenderedIndex===d&&e.loadedCount===a||(u.current={dataKey:s,lastRenderedIndex:d,loadedCount:a},o())}),[s,n,i,d,o,a,l])}},8353:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(29604),n=s(25130),i=s.n(n);const o=(()=>{r.Z.isProd&&localStorage.removeItem("debug");const e=i()("putio");return localStorage.setItem("debug","putio:*"),e})()},24408:(e,t,s)=>{s(53157)},51428:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const r="putio.admin.token",n="putio.auth.token",i={cacheAdminToken(){localStorage.getItem(r)||localStorage.setItem(r,localStorage.getItem(n))},clear(){i.deleteOauthToken()},deleteOauthToken(){localStorage.removeItem(n),localStorage.removeItem(r)},getAdminToken:()=>localStorage.getItem(r),getOauthToken:()=>localStorage.getItem(n),replaceAdminToken(){localStorage.setItem(n,localStorage.getItem(r)),localStorage.removeItem(r)},setOauthToken:e=>localStorage.setItem(n,e)},o=i},76379:(e,t,s)=>{"use strict";s.d(t,{i:()=>r});const r={EMAIL:"/account/email",PASSWORD:"/account/password",APP_SPECIFIC_PASSWORDS:"/account/app-specific-passwords",ROOT:"/account",USERNAME:"/account/username"}},26713:(e,t,s)=>{"use strict";s.d(t,{BP:()=>u,Kk:()=>c,WH:()=>l,X$:()=>a});var r=s(58943),n=s(59902),i=s(49024);const o=["account-info"],a=e=>n.E.setQueryData(o,e),l=()=>n.E.getQueryData(o),c=()=>n.E.getQueryData(o)?.settings,d=async()=>(await i.Z.Account.Info({download_token:1,features:1,intercom:1,pas:1,platform:"web",push_token:1,sharing:1})).data.info,u=()=>(0,r.a)(o,d,{refetchOnMount:!1})},13384:(e,t,s)=>{"use strict";s.d(t,{h:()=>r});const r={CALLBACK:"/callback",LINK:"/link",LOGIN:"/login",OTP:"/otp",RESET_PASSWORD:"/reset-password",RESET_PASSWORD_WITH_CODE:"/reset-password/:code"}},68938:(e,t,s)=>{"use strict";s.d(t,{B:()=>l,z:()=>o});var r=s(4099),n=s(2754),i=s(32315);class o extends n.iC{constructor(e,t){super(),this.type=e,this.underlyingError=t}}const a=()=>({message:(0,r.t)("auth.mfa.invalid_code_error"),recoverySuggestion:{description:(0,r.t)("auth.mfa.not_enabled_error_instruction_login"),type:"instruction"}}),l=e=>(0,i.j)(e,[{error_type:"already_exists",kind:"api_error_type",localize:()=>({message:(0,r.t)("auth.mfa.already_enabled_error"),recoverySuggestion:{description:(0,r.t)("auth.mfa.not_enabled_error_instruction_action"),type:"instruction"}})},{error_type:"invalid_setup",kind:"api_error_type",localize:()=>({message:(0,r.t)("auth.mfa.not_enabled_error_message"),recoverySuggestion:{description:(0,r.t)("auth.mfa.not_enabled_error_instruction_action"),type:"instruction"}})},{error_type:"invalid_code",kind:"api_error_type",localize:a},{error_type:"INVALID_VALUE",kind:"api_error_type",localize:a},{error_type:"code_not_found",kind:"api_error_type",localize:a}])},92680:(e,t,s)=>{"use strict";s.d(t,{R:()=>i,z:()=>o});var r=s(49024),n=s(68938);const i=async(e,t)=>{if(!e)throw new n.z("invalid_token");try{const{data:s}=await r.Z.Auth.ValidateToken(e);if(!s.result)throw new n.z("invalid_token");if(s.token_scope!==t)throw new n.z("invalid_scope")}catch{throw new n.z("unknown")}},o=async(e,t)=>{const s=`putio.auth.token:${t}.validated_at`,r=Number.parseInt(localStorage.getItem(s)||"0",10);Math.floor(Date.now()-r)>=3e5&&(await i(e,t),localStorage.setItem(s,Date.now().toString()))}},90330:(e,t,s)=>{"use strict";s.d(t,{w:()=>c});var r=s(98355),n=s(70028),i=s(2784),o=s(75289),a=s(52322);const l=e=>{let{onResolve:t,url:s}=e;return(0,i.useEffect)((()=>{setTimeout((()=>{window.location.href=s,t()}),1e3)}),[t,s]),(0,a.jsxs)(o.kC,{sx:{alignItems:"center",gap:3},children:[(0,a.jsx)(o.$j,{size:16}),(0,a.jsx)("span",{children:(0,r.I)("payment_method_hosted_checkout_redirect")})]})},c=e=>new n.u_({component:l,name:"redirect-to-hosted-checkout",size:n.u_.SIZES.XSMALL}).Show(e)},67570:(e,t,s)=>{"use strict";s.d(t,{M:()=>n,w:()=>i});var r=s(49024);const n=["payment-info"],i=async()=>(await r.Z.Payment.Info()).data},37756:(e,t,s)=>{"use strict";s.d(t,{p:()=>o,u:()=>i});var r=s(49024);const n=e=>"object"==typeof e&&null!==e,i=async e=>(e=>{if(n(e)&&"string"==typeof e.url)return{url:e.url};throw new Error("Invalid Paddle Billing invoice response")})((await r.Z.http.get(`/payment/methods/paddle_billing/invoice/${e}`)).data),o=async e=>(e=>{if(n(e)&&"string"==typeof e.transaction_id)return{transaction_id:e.transaction_id};throw new Error("Invalid Paddle Billing update payment method response")})((await r.Z.http.get(`/payment/methods/paddle_billing/update_payment_method/${e}`)).data)},40920:(e,t,s)=>{"use strict";s.d(t,{GR:()=>d,Lb:()=>c,kk:()=>i,lV:()=>a});var r=s(95712),n=s(29604);const i=()=>Boolean(n.Z.paddleBilling.production.clientToken?.trim()),o=e=>"AcceptNano"!==e.provider,a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=t.paddle_billing_available??i(),n=e.filter(o);return((e,t)=>{if(!t)return e;const s=e.filter((e=>(e=>{switch(e.provider){case"OpenNode":return"cryptocurrency";case"Fastspring":case"Paddle":case"PaddleBilling":return"credit-card"}})(e)===t));return"credit-card"===t||"cryptocurrency"===t||s.length>0?s:e})(s?n.filter((e=>!(0,r.ao)(e)||(0,r.iw)(e))):n.filter((e=>!(0,r.ao)(e))),t.payment_type)},l=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=s.paddle_billing_available??i(),o=e.filter(r.ao).length-t.filter(r.ao).length;if(o<=0||"cryptocurrency"===s.payment_type)return;const a=new Set;n||a.add("missing_client_token");for(const t of e.filter(r.ao))"string"!=typeof t.price_id?a.add("missing_price_id"):t.price_id.trim()||a.add("blank_price_id");return{availableProviders:t.map((e=>
74e.provider)),paddleBillingConfigured:n,skipReasons:[...a],skippedPaddleBillingProviders:o}},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=a(e,t);return{availableProviders:s,paddleBillingAvailable:s.some(r.ao),skippedPaddleBillingProviderContext:l(e,s,t)}},d=function(e){return a(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})[0]}},55453:(e,t,s)=>{"use strict";s.d(t,{$:()=>_}),s(43673),s(40753),s(28399);var r=s(86324),n=s(49024),i=s(44286),o=s(95712),a=s(40920),l=s(30766),c=s(51080);class d{constructor(e){this.options={...d.DEFAULT_OPTIONS,...e},this.paddle=null}loadScript(){return new Promise((e=>{const t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",this.options.libraryURL),document.getElementsByTagName("head")[0].appendChild(t);const s=()=>window.Paddle&&"function"==typeof window.Paddle.Setup?(this.paddle=window.Paddle,e(this)):setTimeout(s,200);return s()}))}open(e){this.paddle.Checkout.open({...d.CHECKOUT_OPTIONS,...e})}setup(){this.paddle.Setup({debug:this.options.debug,eventCallback:this.options.eventCallback,vendor:this.options.vendorID})}}d.DEFAULT_OPTIONS={debug:!1,eventCallback:()=>null,libraryURL:"https://cdn.paddle.com/paddle/paddle.js"},d.CHECKOUT_OPTIONS={allowQuantity:!1};const u=e=>async t=>{if(!t.checkout||!t.checkout.completed)return e({error:new c.h("ERROR"),type:"failure"});e({payload:t.checkout,type:"success"})},p={startCheckout:e=>new Promise((t=>{new d({vendorID:e.vendor_id}).loadScript().then((s=>{var r;s.setup(),s.open({closeCallback:(r=t,()=>r({type:"cancelled"})),coupon:e.coupon_code,email:e.user.email,locale:"en",passthrough:e.user.id,product:e.plan_id,successCallback:u(t)})})).catch((e=>t({error:new c.h("SDK_FAILED_TO_LOAD",e),type:"failure"})))}))};async function _(e){let{provider:t,...s}=e;try{if((0,o.ao)(t)&&!(0,a.kk)())throw new c.h("INVALID_PARAMS");switch(t.provider){case"Paddle":{const e=await p.startCheckout({coupon_code:s.coupon_code,plan_id:t.plan_id,user:s.user,vendor_id:t.vendor_id});return"success"===e.type&&e.payload&&await n.Z.Payment.AddWaitingPayment({checkout_id:e.payload.id,product_id:t.plan_id}).catch(i.Z),e}case"PaddleBilling":{const e="string"==typeof t.price_id?t.price_id.trim():t.price_id;if("string"!=typeof e||0===e.length)throw new c.h("INVALID_PARAMS","Missing Paddle Billing price id");return await l.Y.startPriceCheckout({checkout:s.checkout,coupon_code:s.coupon_code,price_id:e,user:s.user})}case"OpenNode":{const{data:e}=await n.Z.Payment.CreateOpenNodeCharge({planPath:s.plan.path}),t=new URL(e.opennode.checkout_url);return s.currency===r.y.BTC_LN.symbol&&t.searchParams.set("ln","1"),{type:"redirect",url:t.toString()}}case"Fastspring":return{type:"redirect",url:t.url}}}catch(e){return{error:e,type:"failure"}}}},55698:(e,t,s)=>{"use strict";s.d(t,{D:()=>a,XS:()=>o,k1:()=>i});var r=s(62514),n=s(98940);const i=(e,t)=>(((e,t)=>{const{malformedProviderNames:s,unnamedMalformedProviderCount:i,unknownProviderNames:o}=(0,r.CT)(e);o.length>0&&n.uT("Unknown checkout provider skipped",{extra:{...t,providerNames:o},level:"warning"}),(s.length>0||i>0)&&n.uT("Malformed checkout provider skipped",{extra:{...t,providerNames:s,unnamedProviderCount:i},level:"warning"})})(e,t),(0,r.KP)(e)),o=(e,t)=>{e&&n.uT("Paddle Billing checkout provider skipped",{extra:{...e,...t},level:"warning"})},a=e=>({paddle_transaction_length:e.length,paddle_transaction_suffix:e.slice(-8)})},30766:(e,t,s)=>{"use strict";s.d(t,{Y:()=>_});var r=s(29604),n=s(51080);let i=null,o=null,a=null,l=null,c=null;const d=["checkout.error","checkout.failed","checkout.payment.error"],u=e=>({displayMode:"overlay",locale:e?.locale??"en",theme:e?.theme??("undefined"!=typeof document&&document.documentElement.classList.contains("dark")||"undefined"!=typeof window&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"),variant:"one-page"}),p=(e,t)=>new Promise((u=>{if(l)return void u({error:new n.h("CHECKOUT_ALREADY_ACTIVE"),type:"failure"});const p=Symbol("paddle-billing-checkout");let _=!1,h=null;l=p;const g=e=>{_||(_=!0,l===p&&(l=null,a=null),u(e))};(async(e,t)=>{const{clientToken:l,environment:d}=(e=>e??{clientToken:r.Z.paddleBilling.production.clientToken,environment:"production"})(t);if(!l)throw new n.h("INVALID_PARAMS","Missing Paddle Billing client token");const u=`${d}:${l}`;if(a=e,i!==u||!o){let e;try{e=await(c||(c=s.e(8166).then(s.bind(s,8166)).catch((e=>{throw c=null,e}))),c)}catch(e){throw new n.h("SDK_FAILED_TO_LOAD",e)}const{initializePaddle:t}=e;let r;try{r=await t({environment:d,eventCallback:e=>a?.(e),token:l})}catch(e){throw new n.h("SDK_FAILED_TO_INITIALIZE",e)}if(!r)throw new n.h("SDK_FAILED_TO_INITIALIZE");o=r,i=u}return o}
74)((e=>{l===p&&((e=>"checkout.completed"===e.name)(e)&&(g({payload:{event:e},type:"success"}),(e=>{try{e?.Checkout.close()}catch{}})(h)),(e=>"checkout.closed"===e.name)(e)&&g({type:"cancelled"}),(e=>d.includes(e.name??""))(e)&&g({error:new n.h("CHECKOUT_FAILED",e),type:"failure"}))}),t).then((t=>{try{h=t,e(t)}catch(e){g({error:new n.h("CHECKOUT_FAILED",e),type:"failure"})}})).catch((e=>g({error:e instanceof n.h?e:new n.h("ERROR",e),type:"failure"})))})),_={startPriceCheckout:e=>p((t=>{t.Checkout.open({customData:{user_id:e.user.id},customer:{email:e.user.email},discountCode:e.coupon_code,items:[{priceId:e.price_id,quantity:1}],settings:u(e.checkout)})}),e.runtimeConfig),startTransactionCheckout:e=>p((t=>{t.Checkout.open({customData:{user_id:e.user.id},customer:{email:e.user.email},settings:u(e.checkout),transactionId:e.transaction_id})}),e.runtimeConfig)}},51080:(e,t,s)=>{"use strict";s.d(t,{h:()=>n});var r=s(79332);class n extends r.Z{reason="ERROR";constructor(e,t){const s="string"==typeof t?t:"Failed to complete checkout";super(s),this.message=s,this.reason=e,this.underlyingError="string"==typeof t?void 0:t}}},59320:(e,t,s)=>{"use strict";s.d(t,{C:()=>p});var r=s(2784),n=s(65186),i=s(75289),o=s(1553),a=s(76115),l=s(22077),c=s(52322);const d={cursor:"var(--config-cursor)"},u={fontSize:13,fontWeight:"var(--fontWeight-button)",letterSpacing:.75,marginLeft:8,textTransform:"uppercase"},p=e=>{let{connect:t,disconnect:s,style:p={},textStyle:_=u,theme:h=a.Z.castButton}=e;const{available:g,connected:m,endSession:f,requestSession:y}=(0,o.Z)(),b=(0,r.useCallback)((()=>m?f():y()),[m,f,y]);return g?(0,c.jsx)(i.zx,{id:(0,l.Z)("btn-cast"),onClick:b,style:{height:38,...d,...p},sx:{":hover":{backgroundColor:h.hoverColor},backgroundColor:h.backgroundColor,color:h.textColor},children:(0,c.jsxs)(i.kC,{sx:{alignItems:"center"},children:[m?(0,c.jsx)(n.MGR,{}):(0,c.jsx)(n.Goe,{}),(0,c.jsx)(i.xv,{style:_,children:m?s:t})]})}):null}},13751:(e,t,s)=>{"use strict";s.d(t,{J:()=>se});var r=s(59060),n=s(42871),i=s(2784),o=s(80589),a=s(67371);const l=e=>{let{contentId:t,contentType:s,duration:r,metadata:n}=e;return{contentId:t,contentType:s,customData:{},duration:r,metadata:n,streamType:window.chrome.cast.media.StreamType.BUFFERED,textTrackStyle:{backgroundColor:"#000",customData:{},edgeColor:"#FFF",edgeType:window.chrome.cast.media.TextTrackEdgeType.NONE,fontFamily:window.chrome.cast.media.TextTrackFontGenericFamily.SANS_SERIF,fontGenericFamily:window.chrome.cast.media.TextTrackFontGenericFamily.SANS_SERIF,fontScale:1,fontStyle:window.chrome.cast.media.TextTrackFontStyle.NORMAL,foregroundColor:"#FFF",windowColor:"#000",windowRoundedCornerRadius:3,windowType:window.chrome.cast.media.TextTrackWindowType.ROUNDED_CORNERS},tracks:[]}};var c=s(4099),d=s(2754),u=s(1030),p=s(98940);const _=["disconnected","unknown"],h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_.some((t=>e.message.toLocaleLowerCase().includes(t)))||p.Tb(e,{extra:t,tags:{feature:"chromecast"}})};var g=s(52322);const m=e=>{let{error:t}=e;return(0,i.useEffect)((()=>{h(t)}),[t]),(0,g.jsx)(u.u,{error:new d.nD({message:c.ZP.generic_error_title(),recoverySuggestion:{description:c.ZP.chromecast_session_error_instruction(),type:"instruction"},underlyingError:t})})};var f=s(29400);var y=s(76940);let b=function(e){return e.DEPRESSED="DEPRESSED",e.DROP_SHADOW="DROP_SHADOW",e.NONE="NONE",e.OUTLINE="OUTLINE",e.RAISED="RAISED",e}({}),x=function(e){return e.CASUAL="CASUAL",e.CURSIVE="CURSIVE",e.MONOSPACED_SANS_SERIF="MONOSPACED_SANS_SERIF",e.MONOSPACED_SERIF="MONOSPACED_SERIF",e.SANS_SERIF="SANS_SERIF",e.SERIF="SERIF",e.SMALL_CAPITALS="SMALL_CAPITALS",e}({}),w=function(e){return e.BOLD="BOLD",e.BOLD_ITALIC="BOLD_ITALIC",e.ITALIC="ITALIC",e.NORMAL="NORMAL",e}({}),S=function(e){return e.NONE="NONE",e.NORMAL="NORMAL",e.ROUNDED_CORNERS="ROUNDED_CORNERS",e}({});const v={backgroundColor:"#000",customData:{},edgeColor:"#FFF",edgeType:b.NONE,fontFamily:"SANS_SERIF",fontGenericFamily:x.SA
74NS_SERIF,fontScale:1,fontStyle:w.NORMAL,foregroundColor:"#FFF",windowColor:"#000",windowRoundedCornerRadius:3,windowType:S.ROUNDED_CORNERS},I=e=>Object.assign(new window.chrome.cast.media.TextTrackStyle,e),k=(e,t)=>{const s=new window.chrome.cast.media.EditTracksInfoRequest(void 0,t);try{e.editTracksInfo(s,(()=>null),(e=>h(new a.W({underlyingError:e}))))}catch(e){h(new a.W({underlyingError:e}))}},T=()=>{const e=(0,i.useRef)(),t=(0,i.useMemo)((()=>new window.cast.framework.RemotePlayer),[]),s=(0,i.useMemo)((()=>new window.cast.framework.RemotePlayerController(t)),[t]),[r,o]=(0,i.useState)(),[l,{muteOrUnmute:c,setMuted:d}]=(e=>{const[t,s]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{const t=e=>{let{value:t}=e;return s(t)},{IS_MUTED_CHANGED:r}=window.cast.framework.RemotePlayerEventType;return e.addEventListener(r,t),()=>{e.removeEventListener(r,t)}}),[e]),[t,{muteOrUnmute:(0,i.useCallback)((()=>e.muteOrUnmute()),[e]),setMuted:s}]})(s),[u,{playOrPause:p,setPlayerState:_}]=(e=>{const[t,s]=(0,i.useState)(window.chrome.cast.media.PlayerState.IDLE);return(0,i.useEffect)((()=>{const t=e=>{let{value:t}=e;return s(t)},{PLAYER_STATE_CHANGED:r}=window.cast.framework.RemotePlayerEventType;return e.addEventListener(r,t),()=>{e.removeEventListener(r,t)}}),[e]),[t,{playOrPause:(0,i.useCallback)((()=>e.playOrPause()),[e]),setPlayerState:s}]})(s),[g,m]=(e=>{const[t,s]=(0,i.useState)(0),[r,n]=(0,i.useState)(!1);return(0,f.Z)((()=>{s((e=>e+1))}),r?1e3:null),(0,i.useEffect)((()=>{e===window.chrome.cast.media.PlayerState.PLAYING?n(!0):n(!1)}),[e]),[t,s]})(u),b=((e,t)=>(0,i.useCallback)((s=>{e.canSeek&&(e.currentTime=s,t.seek())}),[t,e]))(t,s),[x,w]=((e,t)=>{const s=(0,i.useRef)(!1===(0,n.m)()),{activeTextTrackId:r,activeTrackIds:o}=((e,t)=>{if(!e||!t)return{activeTextTrackId:null,activeTrackIds:[]};const s=e.activeTrackIds||[],r=(t.tracks||[]).filter((e=>"TEXT"===e.type)).find((e=>s.includes(e.trackId)));return{activeTextTrackId:r?r.trackId:null,activeTrackIds:s}})(e,t),l=(0,i.useCallback)((s=>{if(!e||!t)return;const n=o.filter((e=>e!==r)).concat(null===s?[]:[s]);e.editTracksInfo(new window.chrome.cast.media.EditTracksInfoRequest(n),(()=>null),(e=>h(new a.W({underlyingError:e}))))}),[r,o,e,t]);return(0,i.useEffect)((()=>{if(!e||!t)return;if(s.current)return;const r=e.playerState===chrome.cast.media.PlayerState.PLAYING||e.playerState===chrome.cast.media.PlayerState.PAUSED;if(!t.tracks||0===t.tracks.length)return void(r&&(s.current=!0));const n=t.tracks.find((e=>"TEXT"===e.type));n?(l(n.trackId),s.current=!0):s.current=!0}),[l,e,t]),[r,l]})(e.current,r),[S,{setStyle:T}]=(e=>{const t=e?.media?.textTrackStyle||v,s=(0,i.useRef)(!1),[r,n]=(0,y.Z)("putio.chromecast.subtitle_styles",void 0);(0,i.useEffect)((()=>{e&&!1===s.current&&r&&(s.current=!0,k(e,I(r)))}));const o=(0,i.useCallback)(((s,r)=>{e&&(t[s]=r,k(e,I(t)),n(t))}),[e,t,n]);return[t,{setStyle:o}]})(e.current),A=(0,i.useCallback)((t=>{t&&e.current&&(d(Boolean(e.current.volume.muted)),_(e.current.playerState),m(e.current.getEstimatedTime()||0))}),[m,d,_]),E=(0,i.useCallback)((t=>{if(["currentTime"].includes(t.field))return;const s=window.cast.framework.CastContext.getInstance().getCurrentSession();if(!s)return;const r=s.getMediaSession();r&&(e.current?.mediaSessionId!==r.mediaSessionId&&(e.current=r,A(!0),r.addUpdateListener(A)),o(r.media))}),[A]);return(0,i.useEffect)((()=>{const{ANY_CHANGE:e}=window.cast.framework.RemotePlayerEventType;return s.addEventListener(e,E),()=>{s.removeEventListener(e,E)}}),[s,E]),[{currentTime:g,duration:r?.duration??0,mediaInfo:r,muted:l,playerState:u,selectedSubtitleId:x,subtitleStyles:S,subtitles:r?.tracks.filter((e=>"TEXT"===e.type))??[]},{muteOrUnmute:c,playOrPause:p,seek:b,selectSubtitle:w,setSubtitleStyle:T}]};var A=s(76115),E=s(75289),M=s(85365),j=s(82898),D=s(65186),C=s(22077);const R=(0,M.Z)(E.zx)`
75  padding: none;
76  background: transparent !important;
77  cursor: var(--config-cursor);
78`,N=e=>{let{currentTime:t,muted:s,onMuteOrUnmute:r,onPlayOrPause:n,onSeek:o,onSelectSubtitle:a,playerState:l,theme:c}=e;const d=(0,i.useCallback)((()=>o(t-30)),[t,o]),u=(0,i.useCallback)((()=>
78o(t+30)),[t,o]);return(0,g.jsx)(E.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:(0,g.jsxs)(j.Pd.Provider,{value:{color:c.iconColor,size:c.iconSize},children:[(0,g.jsx)(R,{id:(0,C.Z)("btn-captions"),onClick:a,children:(0,g.jsx)(D.W3p,{})}),(0,g.jsx)(R,{id:(0,C.Z)("btn-rewind"),onClick:d,children:(0,g.jsx)(D.RxU,{})}),(0,g.jsx)(R,{id:(0,C.Z)("btn-play"),onClick:n,children:"PLAYING"===l?(0,g.jsx)(D.pkR,{size:c.playPauseIconSize}):(0,g.jsx)(D.Hm_,{size:c.playPauseIconSize})}),(0,g.jsx)(R,{id:(0,C.Z)("btn-fastforward"),onClick:u,children:(0,g.jsx)(D.TGD,{})}),(0,g.jsx)(R,{id:(0,C.Z)("btn-mute"),onClick:r,children:s?(0,g.jsx)(D.HvK,{}):(0,g.jsx)(D.hwG,{})})]})})},P=e=>{let{deviceName:t="Chromecast",theme:s}=e;return(0,g.jsxs)(E.kC,{backgroundColor:s.backgroundColor,padding:s.spacing,sx:{alignItems:"center",width:"100%"},children:[(0,g.jsx)(D.MGR,{color:s.iconColor,size:s.iconSize}),(0,g.jsxs)(E.xv,{color:s.textColor,marginX:s.spacing,sx:{fontSize:s.textSize},children:["Casting to ",t]})]})};var O=s(72674);const L=(0,M.Z)(O.Z)`
79  width: 100%;
80  height: 3px;
81`,Z=(0,M.Z)(E.xu)`
82  .thumb-text {
83    opacity: 0;
84  }
85
86  &:hover {
87    .thumb-text {
88      opacity: 1;
89    }
90  }
91`,F=(0,M.Z)(E.xu)`
92  height: 18px;
93  width: 18px;
94  border-radius: 50%;
95  cursor: grab;
96`,z=(0,M.Z)(E.xv)`
97  position: absolute;
98  bottom: 24px;
99  left: -10px;
100  padding: 2px 4px;
101  border-radius: 4px;
102`,U=(0,M.Z)(E.xu)`
103  top: 0;
104  bottom: 0;
105  border-radius: 999px;
106  cursor: var(--config-cursor);
107`,V=e=>{let{currentTime:t,duration:s,onSeek:r,theme:n}=e;const o=(0,i.useMemo)((()=>(e=>(t,s)=>(0,g.jsxs)(Z,{...t,marginTop:"-7px",children:[(0,g.jsx)(F,{backgroundColor:e.thumbColor}),(0,g.jsx)(z,{backgroundColor:e.thumbTextBackgroundColor,className:"thumb-text",color:e.textColor,sx:{fontSize:e.textSize},children:(0,d.Qh)(s.valueNow)})]}))(n)),[n]),a=(0,i.useMemo)((()=>(e=>(t,s)=>(0,g.jsx)(U,{...t,backgroundColor:0===s.index?e.trackActiveColor:e.trackPassiveColor}))(n)),[n]);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(L,{max:s,onAfterChange:r,onSliderClick:r,renderThumb:o,renderTrack:a,value:t}),(0,g.jsx)(E.xu,{sx:{height:12,width:"100%"}}),(0,g.jsxs)(E.kC,{sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,g.jsx)(E.xv,{color:n.textColor,sx:{fontSize:n.textSize},children:(0,d.Qh)(t)}),(0,g.jsx)(E.xv,{color:n.textColor,sx:{fontSize:n.textSize},children:(0,d.Qh)(s)})]})]})};var Y=s(35515);const W={alignItems:"center",borderBottom:"1px solid rgba(255, 255, 255, 0.05)",cursor:"var(--config-cursor)"},G=e=>{let{onSelect:t,selected:s,subtitle:r,theme:n}=e;const{trackId:o}=r,a=(0,i.useCallback)((()=>t(o)),[o,t]),l=s?n.tintColor:"#00000000",c=s?n.tintColor:n.textColor;return(0,g.jsxs)(E.kC,{onClick:a,padding:n.spacing,sx:W,children:[(0,g.jsx)(E.xv,{color:l,children:(0,g.jsx)(D.HhX,{})}),(0,g.jsx)(E.xv,{color:c,marginLeft:n.spacing,sx:{fontSize:n.textSize,wordBreak:"break-all"},children:r.name})]})},H={maxHeight:320,overflow:"auto"},B=e=>{let{selectSubtitle:t,selectedSubtitleId:s,subtitles:r,theme:n}=e;const i=r.length?"LOADED":"EMPTY";return(0,g.jsxs)(E.xu,{children:["EMPTY"===i&&(0,g.jsx)(E.xu,{sx:{padding:n.body.spacing,textAlign:"center"},children:(0,g.jsx)(E.xv,{sx:{color:n.body.textColor,fontSize:n.body.textSize},children:"No subtitles"})}),"LOADED"===i&&(0,g.jsxs)(E.xu,{style:H,children:[(0,g.jsx)(G,{onSelect:()=>t(null),selected:null===s,subtitle:{name:"No Subtitle",trackId:null},theme:n.list.item}),r.map((e=>(0,g.jsx)(G,{onSelect:t,selected:e.trackId===s,subtitle:e,theme:n.list.item},e.trackId)))]})]})};var $=s(40871);const q=e=>Object.values(e).map((e=>({label:(0,$.I)(e),value:e}))),Q=e=>{let{keyPath:t,label:s,onChange:r,options:n,theme:o,value:a}=e;const l=(0,i.useCallback)((e=>{r(t,e.target.value)}),[r,t]);return(0,g.jsxs)(E.kC,{css:{svg:{fill:o.textColor}},margin:o.spacing,sx:{alignItems:"center",justifyContent:"space-between"},children:[(0,g.jsx)(E.xu,{sx:{flex:1},children:(0,g.jsx)(E.__,{color:o.textColor,htmlFor:t,sx:{fontSize:o.textSize},children:s})}),(0,g.jsx)(E.xu,{sx:{flex:1},children:(0,g.jsx)(E.Ph,{backgroundColor:o.backgroundColor,color:o.textColor,css:{":focus":{borderColor:o.focusedBorderColor},borderColor:o.borderColor},id:t,name:t,onChange:l,sx:{fontSize:o.textSize},value:a,children:n.map((e=>(0,g.jsx)("option",{value:e.value,children:e.label},e.value)))})})]})},K=e=>{let{setStyle:t,styles:s,theme:r}=e;const n=[{keyPath:"foregroundColor",label:"Font Color",options:[{label:"White",value:"#FFF"},{label:"Yellow",value:"#FDCE45FF"}]}
107,{keyPath:"backgroundColor",label:"Background Color",options:[{label:"Transparent",value:"#00000000"},{label:"Semi-Transparent",value:"#00000080"},{label:"Opaque",value:"#000"}]},{keyPath:"fontScale",label:"Font Size",options:[.5,.75,1,1.25,1.5,1.75,2,3,4].map((e=>({label:100*e+"%",value:e})))},{keyPath:"fontStyle",label:"Font Style",options:q(window.chrome.cast.media.TextTrackFontStyle)},{keyPath:"edgeType",label:"Text Edge Style",options:q(window.chrome.cast.media.TextTrackEdgeType)},{keyPath:"edgeColor",label:"Text Edge Color",options:[{label:"White",value:"#FFF"},{label:"Black",value:"#000"}]}];return(0,g.jsx)("div",{children:n.map((e=>(0,g.jsx)(Q,{keyPath:e.keyPath,label:e.label,onChange:t,options:e.options,theme:r.styler.item,value:s[e.keyPath]},e.keyPath)))})},J=e=>{let{onClose:t,selectSubtitle:s,selectedSubtitleId:r,setSubtitleStyle:n,subtitleStyles:i,subtitles:o,theme:a}=e;return(0,g.jsxs)(E.kC,{sx:{flexDirection:"column",justifyContent:"center"},children:[(0,g.jsxs)(E.kC,{backgroundColor:a.header.backgroundColor,padding:a.header.spacing,sx:{alignItems:"center",justifyContent:"space-between",width:"100%"},children:[(0,g.jsx)(E.xv,{sx:{color:a.header.textColor,fontSize:a.header.textSize,fontWeight:"medium"},children:"Subtitle settings"}),(0,g.jsx)(E.hU,{onClick:t,sx:{color:a.header.buttonColor},children:(0,g.jsx)(D.FU5,{})})]}),(0,g.jsx)(E.xu,{backgroundColor:a.body.backgroundColor,sx:{width:"100%"},children:(0,g.jsx)(E.xu,{sx:{px:a.body.spacing},children:(0,g.jsxs)(Y.m,{justified:!0,children:[(0,g.jsx)(Y.O,{title:"Select Subtitle",children:(0,g.jsx)(B,{selectSubtitle:s,selectedSubtitleId:r,subtitles:o,theme:a})}),(0,g.jsx)(Y.O,{title:"Configure Styles",children:(0,g.jsx)(K,{setStyle:n,styles:i,theme:a})})]})})})]})},X=e=>{let{currentTime:t,deviceName:s,duration:r,muted:n,onMuteOrUnmute:o,onPlayOrPause:a,onSeek:l,playerState:c,posterURL:d,selectSubtitle:u,selectedSubtitleId:p,setSubtitleStyle:_,subtitleStyles:h,subtitles:m,theme:f}=e;const[y,b]=(0,i.useState)(!1),x=(0,i.useCallback)((()=>{b(!0)}),[]),w=(0,i.useCallback)((()=>{b(!1)}),[]);return(0,g.jsxs)(E.kC,{backgroundColor:f.body.backgroundColor,sx:{alignItems:"center",flexDirection:"column",padding:0,position:"relative"},children:[(0,g.jsx)(P,{deviceName:s,theme:f.header}),(0,g.jsx)(E.xu,{sx:{height:"24px",width:"100%"}}),(0,g.jsx)(E.kC,{sx:{alignItems:"center",height:200,justifyContent:"center",width:["75%","100%"]},children:(0,g.jsx)(E.Ee,{src:d,sx:{maxHeight:"100%",maxWidth:"100%"}})}),(0,g.jsx)(E.xu,{sx:{height:48,width:"100%"}}),(0,g.jsx)(E.xu,{sx:{width:"75%"},children:(0,g.jsx)(V,{currentTime:t,duration:r,onSeek:l,theme:f.slider})}),(0,g.jsx)(E.xu,{sx:{width:["100%","75%","50%"]},children:(0,g.jsx)(N,{currentTime:t,muted:n,onMuteOrUnmute:o,onPlayOrPause:a,onSeek:l,onSelectSubtitle:x,playerState:c,theme:f.controls})}),(0,g.jsx)(E.xu,{sx:{height:16,width:"100%"}}),y&&(0,g.jsx)(E.xu,{sx:{backgroundColor:"rgba(0, 0, 0, 0.75)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:99},children:(0,g.jsx)(E.kC,{sx:{justifyContent:"center"},children:(0,g.jsx)(E.xu,{marginY:1,sx:{width:["100%","80%"]},children:(0,g.jsx)(J,{onClose:w,selectSubtitle:u,selectedSubtitleId:p,setSubtitleStyle:_,subtitleStyles:h,subtitles:m,theme:f.subtitleSettings})})})})]})},ee=()=>{const[e,t]=T();var s;const r=(i=(s=e.mediaInfo)&&s.metadata,o=A.Z.defaultPosterImageURL,i?.images.length?i.images[0].url:o),n=(()=>{const e=window.cast.framework.CastContext.getInstance().getCurrentSession();if(!e)throw new a.z;return e.getCastDevice()})();var i,o;return(0,g.jsx)(X,{currentTime:e.currentTime,deviceName:n.friendlyName,duration:e.duration,muted:e.muted,onMuteOrUnmute:t.muteOrUnmute,onPlayOrPause:t.playOrPause,onSeek:t.seek,playerState:e.playerState,posterURL:r,selectSubtitle:t.selectSubtitle,selectedSubtitleId:e.selectedSubtitleId,setSubtitleStyle:t.setSubtitleStyle,subtitleStyles:e.subtitleStyles,subtitles:e.subtitles,theme:A.Z})},te=e=>{let{id:t,poster:s,title:r}=e;const n=new window.chrome.cast.media.GenericMediaMetadata;return n.title=r,n.subtitle=`put.io/files/${t}`,n.images=[new window.chrome.cast.Image(s)],n},se=(0,i.memo)((e=>{const[t,s]=(0,i.useState)(null),[c,d]=(()=>{const[e,t]=(0,i.useState)({status:"loading"});return[e,(0,i.useCallback)((async e=>{let{mediaInfo:s}=e;t({status:"loading"});try{const e=window.cast.framework.CastContext.getInstance().getCurrentSession();if(!e)throw new a.z;const r=new window.chrome.cast.media.LoadRequest(s),n=await e.loadMedia(r);if(n)throw new a.W({code:n});t({mediaInfo:s,status:"loaded"})}catch(e){console.log(e),t({error:e instanceof a.W?e:new a.W({underlyingError:e}),status:"error"})}}),[])]})();switch((0,i.useEffect)((()=>{t!==e.id&&(s(e.id),d((e=>{const t=(0,n.U)({contentType:e.contentType,hlsURL:e.hls,player:"chromecast",streamURL:e.stream,subtitles:e.subt
107itles});if("hls"===t.playbackType)return{mediaInfo:l({contentId:t.video.url,contentType:"video/m3u",duration:e.duration,metadata:te(e)})};const s=l({contentId:t.video.url,contentType:"video/mp4",duration:e.duration,metadata:te(e)}),{TextTrackType:r,Track:i,TrackType:o}=window.chrome.cast.media;return s.tracks=t.textTracks.groupedByLanguage.flatMap((e=>e.subtitles)).map(((e,t)=>{const s=new i(t,o.TEXT);return s.trackContentId=`${e.url}&format=webvtt`,s.trackContentType="text/vtt",s.subtype=r.SUBTITLES,s.name=e.language,s.language=e.language,s})),{mediaInfo:s}})(e)))}),[d,e,t]),c.status){case"loading":return(0,g.jsx)(r.Z,{});case"error":return(0,g.jsx)(m,{error:c.error});case"loaded":return(0,g.jsx)(o.ErrorBoundary,{fallbackRender:e=>{let{error:t}=e;return(0,g.jsx)(m,{error:t instanceof a.W?t:new a.W({underlyingError:t})})},children:(0,g.jsx)(ee,{})})}}))},67265:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});const r=(0,s(2784).createContext)({available:!1,castState:void 0,connected:!1,initialized:!1,sessionState:void 0})},67371:(e,t,s)=>{"use strict";s.d(t,{W:()=>n,z:()=>i});var r=s(2754);class n extends r.iC{code="CHROMECAST_ERROR";message="Unknown chromecast error";name="ChromecastError";constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.code=e.code||"CHROMECAST_ERROR",this.message=e.underlyingError instanceof Error?e.underlyingError.message:"Unknown chromecast error",this.underlyingError=e.underlyingError}}class i extends n{message="Chromecast session error";name="SessionError"}},1553:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(2784),n=s(67265),i=s(67371);const o=()=>({...(0,r.useContext)(n.Z),endSession:()=>{window.cast.framework.CastContext.getInstance().endCurrentSession(!0)},requestSession:async()=>{try{const e=window.cast.framework.CastContext.getInstance(),t=await e.requestSession();if(t)throw new i.z({code:t});return{success:!0}}catch(e){return{error:e,success:!1}}}})},76115:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});const r={body:{backgroundColor:"#101010"},castButton:{backgroundColor:"#FDCE45",hoverColor:"#FCBE03",textColor:"#000"},controls:{iconColor:"#FDCE45",iconSize:"2em",playPauseIconSize:"4em"},defaultPosterImageURL:"/images/chromecast.png",header:{backgroundColor:"#000",iconColor:"#0091FF",iconSize:"2em",spacing:"8px",textColor:"#FFF",textSize:"14px"},slider:{textColor:"#FDCE45",textSize:"12px",thumbColor:"#FDCE45",thumbSize:"18px",thumbTextBackgroundColor:"#000",trackActiveColor:"#FDCE45",trackPassiveColor:"rgba(84, 84, 84, 0.5)"},subtitleSettings:{body:{backgroundColor:"#232323",spacing:"16px",textColor:"#FFF",textSize:"14px"},header:{backgroundColor:"#232323",buttonColor:"#FDCE45",spacing:"12px",textColor:"#FFF",textSize:"16px"},list:{item:{spacing:"14px",textColor:"#FFF",textSize:"14px",tintColor:"#FDCE45"}},styler:{item:{backgroundColor:"#101010",borderColor:"rgba(100, 100, 100, 1)",focusedBorderColor:"#FDCE45",spacing:"14px",textColor:"#FFF",textSize:"14px"}}}}},22077:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});const r=e=>`putio_chromecast_sender__${e}`},69754:(e,t,s)=>{"use strict";s.d(t,{S:()=>c});var r=s(75289),n=s(94085),i=s(95909),o=s(88549),a=s(52322);const l=e=>{let{count:t}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.s,{loading:!0,title:"Loading..."}),(0,a.jsx)(i.N,{type:"list",children:(0,a.jsx)(r.xu,{my:2,children:(0,a.jsx)(n.c,{count:t})})})]})},c=e=>{let{count:t}=e;return(0,a.jsx)(l,{count:t})}},1593:(e,t,s)=>{"use strict";s.d(t,{D4:()=>g,Ho:()=>d,MA:()=>c,NZ:()=>a,OQ:()=>_,Q2:()=>u,eq:()=>h,jk:()=>l,m6:()=>m,pr:()=>p});var r=s(59902),n=s(49024),i=s(6765),o=s(43594);const a=["config"],l=e=>"shaka"===e||"jwplayer"===e||"videojs"===e?e:"videojs",c=e=>"mp4"===e?"mp4":"hls",d=e=>"dark"===e||"light"===e?e:"auto",u=async()=>{const{data:{config:e}}=await n.Z.Config.Read();await(async e=>{try{const t=Object.keys(o.I),s=Object.keys(e).filter((e=>!t.includes(e)));if(0===s.length)return;const r={...e,...s.reduce(((e,t)=>Object.assign(e,{[t]:void 0})),{})};await n.Z.Config.Write(r)}catch{}})(e);const t=(0,i.T)(o.I,e);return t.video_player=l(t.video_player),t},p=()=>r.E.prefetchQuery(a,u),_=()=>r.E.getQueryData(a),h=e=>r.E.setQueryData(a,e),g=async e=>{try{await n.Z.Config.Write(e),h(e)}catch{}},m=e=>(_()||o.I)[e]},99486:(e,t,s)=>{"use strict";s.d(t,{E:()=>c});var r=s(58943),n=s(55830),i=s(93599),o=s(49024),a=s(1593),l=s(43594);const c=e=>{const t=(0,r.a)({initialData:l.I,queryFn:a.Q2,queryKey:a.NZ,refetchOnMount:!1}).data,s=(0,n.NL)(),c=(0,i.D)((t=>o.Z.Config.SetKey(e,t)),{onError:(e,t,r)=>{r?.previousConfig&&s.setQueryData(a.NZ,r?.previousConfig)}
107,onMutate:async t=>{await s.cancelQueries(a.NZ);const r=s.getQueryData(a.NZ);if(r)return s.setQueryData(a.NZ,{...r,[e]:t}),{previousConfig:r}}});return[t[e],c.mutate]}},43594:(e,t,s)=>{"use strict";s.d(t,{I:()=>o});var r=s(73059),n=s(77082);const i=r.qV.reduce(((e,t)=>Object.assign(e,{[t]:!1})),{}),o={autoplay_next_video:!1,chromecast_video_playback_type:"hls",disk_usage_display_format:"simple","dismissed.extensions_message":!1,"dismissed.trash_expiration_message":!1,dropzone_transfer_target:"default_download_folder",fluid_layout:!1,move_and_clone_target_folder_id:0,new_transfer_target:"default_download_folder",remember_move_and_clone_target_folder:!1,"seen.extensions":!1,subtitleStyles:null,theme:"auto","transfers.redirect":!0,"ui.cursor":"pointer","ui.fixed_layout_width":`${n.j.LG}px`,video_playback_type:"hls",video_player:"videojs",wipe:i}},62891:(e,t,s)=>{"use strict";s.d(t,{D:()=>m});var r=s(4099),n=s(38571),i=s(57671),o=s(70028),a=s(49024),l=(s(2784),s(13749)),c=s(44094),d=s(40153),u=s(97395),p=s(18756),_=s(51382),h=s(52322);const g=e=>{let{onResolve:t,parentId:s}=e;return(0,h.jsx)(l.l0,{onSubmit:async e=>{let{name:n}=e;if(!n)return{name:r.ZP.validators_required()};try{const{data:e}=await a.Z.Files.CreateFolder({name:n,parentId:s});t(e.file)}catch(e){return{name:(0,_.ZA)(e).message}}},render:e=>{let{handleSubmit:t,submitting:s}=e;return(0,h.jsxs)(c.Y,{onSubmit:t,children:[(0,h.jsx)(l.gN,{component:d.d,"data-autofocus":!0,name:"name",placeholder:"Folder name"}),(0,h.jsx)(n.Z,{children:(0,h.jsx)(i.Z,{children:(0,h.jsx)(u.t,{format:"key+label",keys:["Enter"],label:"to create folder",children:(0,h.jsx)(p.z,{loading:s,type:"submit",variant:"primary",children:"Create"})})})})]})}})},m=e=>new o.u_({component:g,name:"create-folder",size:o.u_.SIZES.SMALL,title:r.ZP.files_newfolder_label()}).Show(e)},37455:(e,t,s)=>{"use strict";s.d(t,{N:()=>T});var r=s(56921),n=s(86169),i=s(4099),o=s(2754),a=s(62822),l=s(43079),c=s(49024),d=s(32315),u=s(91369),p=s(51428),_=s(79794),h=s(75289),g=s(96321),m=s(27447),f=s(27622),y=s(52322);const b=e=>{let{children:t,...s}=e;const[r]=(0,g.B)("account_status");return"active"!==r?(0,y.jsx)(f.k,{onClick:async()=>"href"in s?await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_self";try{const s=await fetch(e,{method:"HEAD"});if(200===s.status)return void window.open(e,t);l.Z.Show((0,d.j)(s))}catch(e){l.Z.Show((0,d.j)(e))}}(s.href,s.target):s.onClick(),sx:{width:"100%"},children:t}):"onClick"in s?(0,y.jsx)(f.k,{onClick:s.onClick,sx:{width:"100%"},children:t}):(0,y.jsx)("a",{...s,style:{width:"100%"},children:t})},x=e=>{let{children:t,...s}=e;return(0,y.jsx)(b,{...s,children:(0,y.jsxs)(h.kC,{sx:{":hover":{background:"component-bg-hover"},alignItems:"center",background:"component-bg",borderRadius:"default",color:"text",cursor:"var(--config-cursor)",gap:2,marginBottom:"2px",padding:"10px",userSelect:"none",width:"100%"},children:[(0,y.jsx)(m.J,{...s.icon}),(0,y.jsx)(h.xv,{sx:{fontSize:0,fontWeight:"button"},children:t})]})})},w=e=>e.getIn(["files","file"]).toJS();var S=s(98355),v=s(33611),I=s(22556),k=s(15820);const T={ListItem:x,List:e=>{const t=(0,_.I0)(),[s]=(0,u.R)("trash_enabled"),g=(0,_.v9)(w),m=(0,n.l)().getDownloadURL(g),f=g.is_mp4_available&&Boolean(p.Z.getAdminToken());return(0,y.jsxs)(h.xu,{children:[f?(0,y.jsx)(x,{icon:{name:"refresh-1",type:"solid"},onClick:async()=>{try{await c.Z.File.DeleteMp4(g.id),await c.Z.File.ConvertToMp4(g.id),l.Z.Show({message:"Re-converting file to MP4!",type:"success"}),window.location.reload()}catch(e){l.Z.Show((0,d.j)(e))}},children:"Re-convert to MP4"}):null,g.is_shared?null:(0,y.jsx)(x,{icon:{name:"position-1",type:"stroke"},onClick:()=>{t((0,r.OnMoveThisFile)())},children:i.ZP.files_menu_move_label()}),g.is_shared?null:(0,y.jsx)(x,{icon:{name:"trash-2",type:"solid"},onClick:()=>{t((0,r.OnDelete)())},children:s?i.ZP.files_menu_move_to_trash_label():i.ZP.files_menu_delete_label()}),g.is_shared?(0,y.jsx)(x,{icon:{name:"add-window-1",type:"stroke"},onClick:()=>{t((0,r.CloneSharedFile)())},children:i.ZP.files_action_shared_file_clone_label()}):null,e.popup?(0,y.jsx)(x,{icon:{name:"window",type:"stroke"},onClick:e.popup.onClick,children:i.ZP.files_video_open_popup_player()}):null,e.watchStatus?(0,y.jsx)(x,{icon:{name:"eye-1",type:"stroke"},onClick:e.watchStatus.onClick,children:e.watchStatus.status?i.ZP.files_action_mark_as_unwatched():i.ZP.files_action_mark_as_watched()}):null,m?(0,y.jsx)(x,{href:m,icon:{name:"download-3",type:"solid"},children:i.ZP.files_download_label((0,o.Gj)(g.size))}):null,e.downloadMp4?(0,y.jsx)(x,{href:e.downloadMp4.url,icon:{name:"download-3",type:"solid"},children:i.ZP.files_download_mp4_label((0,o.Gj)(e.downloadMp4.size))}):null,e.saveAsMp4?(0,y.jsx)(x,{icon:{name:"share",type:"solid"},onClick:e.saveAsMp4.onClick,children:i.ZP.files_saveasmp4_label()}):null,e.stream?(0,y.jsx)(x,{href:e.stream.url,icon:{name:"film-1",type:"solid"},target:"_blank",children:i.ZP.files_streamlink_label()}):null,a.Z.isHLSNativelySupported()&&e.hls?(0,y.jsx)(x,{href:e.hls.url,
107icon:{name:"film-1",type:"solid"},target:"_blank",children:i.ZP.files_streamlink_hls_label()}):null,e.streamMp4?(0,y.jsx)(x,{href:e.streamMp4.url,icon:{name:"film-1",type:"solid"},target:"_blank",children:i.ZP.files_streamlink_mp4_label()}):null,e.xspf?(0,y.jsx)(x,{href:e.xspf.url,icon:{name:"menu-list-3",type:"solid"},target:"_blank",children:i.ZP.files_xspf_label()}):null,e.showMediaInfo?(0,y.jsx)(x,{icon:{name:"info-2",type:"stroke"},onClick:e.showMediaInfo.onClick,children:i.ZP.files_media_info_show_label()}):null,g.is_shared?null:(0,y.jsx)(x,{icon:{name:"share-1",type:"stroke"},onClick:()=>{t((0,r.OnPublicShare)())},children:i.ZP.files_menu_public_share_label()})]})},NextVideo:e=>e.resolved?e.data?(0,y.jsxs)(h.xu,{sx:{backgroundColor:"component-bg",borderRadius:"default",paddingX:"10px",paddingY:2},children:[(0,y.jsxs)(h.kC,{sx:{alignItems:"center"},children:[(0,y.jsx)(h.__,{sx:{flex:1,fontSize:0},children:(0,S.I)("files_next_video_section_header")}),(0,y.jsx)(k.r,{checked:e.autoPlay,label:(0,S.I)("files_next_video_section_autoplay"),onChange:e.onToggle,size:"sm"})]}),(0,y.jsx)(I.Z,{spacing:2}),(0,y.jsxs)(h.kC,{sx:{alignItems:"flex-start",gap:2},children:[(0,y.jsx)(f.k,{onClick:e.onPlay,sx:{":hover":{color:"text-secondary"},fontSize:2,lineHeight:"button"},children:(0,y.jsx)(m.J,{name:"play-4",type:"stroke"})}),(0,y.jsx)(h.xv,{sx:{fontSize:0,lineHeight:"narrow",wordBreak:"break-word"},children:e.data.file.name})]})]}):(0,y.jsxs)(h.xu,{sx:{backgroundColor:"component-bg",borderRadius:"default",paddingX:"10px",paddingY:2},children:[(0,y.jsx)(h.kC,{sx:{alignItems:"center"},children:(0,y.jsx)(h.__,{sx:{flex:1,fontSize:0},children:(0,S.I)("files_next_video_section_header")})}),(0,y.jsx)(I.Z,{spacing:2}),(0,y.jsx)(h.xv,{sx:{fontSize:0},children:(0,S.I)("files_next_video_not_found")})]}):(0,y.jsx)(v.O,{height:"72px"}),Root:e=>{let{children:t}=e;return(0,y.jsx)(h.kC,{sx:{"> *":{width:"100%"},alignItems:"center",flexDirection:"column",gap:2},children:t})}}},9617:(e,t,s)=>{"use strict";s.d(t,{R:()=>_,a:()=>h});var r=s(36628),n=s(2784),i=s(75289),o=s(59807),a=s(93291),l=s(27447),c=s(33611),d=s(58943),u=s(49024);var p=s(52322);const _=e=>{let{value:t,...s}=e;const _=(m=t,f={staleTime:3e4},(0,d.a)((e=>["file-info",e])(m),(()=>(async e=>(await u.Z.Files.Query(e)).data.parent)(m)),f)),h="form-input"===s.type?(0,p.jsx)(o.h,{appearance:"filled",fontSize:1,height:28,icon:{name:"settings-2",type:"stroke"},onClick:()=>{r.Z.Show({actionLabel:"Download here",fileId:t}).then((e=>e?s.onChange(e.id):null))},title:"Configure",width:28}):s.accessory,g=(0,n.useMemo)((()=>{switch(_.status){case"loading":return"Loading...";case"success":return _.data.name;case"error":return`File ${t}`}}),[t,_]);var m,f;return(0,p.jsx)(a.S,{description:s.description,error:s.error,label:s.label,children:(0,p.jsxs)(i.kC,{sx:{alignItems:"center",backgroundColor:"app-bg",borderColor:"border",borderRadius:"default",borderStyle:"solid",borderWidth:1,justifyContent:"space-between",paddingLeft:2,paddingRight:1,paddingY:1},children:[(0,p.jsxs)(i.kC,{sx:{alignItems:"center",flex:1},children:[(0,p.jsx)(l.J,{color:"yellow-solid",name:"open-folder-3",type:"solid"}),(0,p.jsx)(i.xu,{sx:{flex:1,fontSize:1,marginX:2,wordBreak:"break-word"},children:"loading"===_.status?(0,p.jsx)(c.O,{children:g}):g})]}),h]})})},h=e=>{let{input:t,...s}=e;return(0,p.jsx)(_,{...t,...s,type:"form-input"})}},60714:(e,t,s)=>{"use strict";s.d(t,{o:()=>f});var r=s(4099),n=s(38571),i=s(57671),o=s(70028),a=s(49024),l=s(44662),c=(s(2784),s(13749)),d=s(44094),u=s(40153),p=s(97395),_=s(18756),h=s(51382),g=s(52322);const m=e=>{let{file:t,onResolve:s}=e;return(0,g.jsx)(c.l0,{initialValues:{name:t.name},onSubmit:async e=>{let{name:n}=e;if(!n)return{name:r.ZP.validators_required()};try{await(0,l.Z)(a.Z.File.Rename(t.id,n),400),s({name:n})}catch(e){return{name:(0,h.Mm)(e).message}}},render:e=>{let{handleSubmit:t,submitting:s}=e;return(0,g.jsxs)(d.Y,{onSubmit:t,children:[(0,g.jsx)(c.gN,{autoSelect:!0,component:u.d,"data-autofocus":!0,name:"name",placeholder:r.ZP.files_rename_label()}),(0,g.jsx)(n.Z,{children:(0,g.jsx)(i.Z,{children:(0,g.jsx)(p.t,{format:"key+label",keys:["Enter"],label:"to rename file",children:(0,g.jsx)(_.z,{loading:s,type:"submit",variant:"primary",children:"Rename"})})})})]})}})},f=e=>new o.u_({component:m,name:"fileRenamer",size:o.u_.SIZES.SMALL,title:`Rename ${e.file.name}`}).Show(e)},98298:(e,t,s)=>{"use strict";s.d(t,{H:()=>w});var r=s(13111),n=s(32315),i=s(91369),o=s(56921),a=s(73059),l=s(86169),c=s(70067),d=s(98355),u=s(2754),p=s(51382),_=s(37455),h=s(79794),g=s(59177),m=s(1030),f=s(75289),y=s(39723),b=s(75778),x=s(52322);const w=(0,g.EN)((e=>{let{router:t,error:s}=e;const g=(0,h.I0)(),w=(0,l.l)(),[S]=(0,i.R)("trash_enabled"),v="object"==typeof s&&null!==s&&"underlyingError"in s?s.underlyingError:s;if(v instanceof p.qy)return(0,x.jsx)(m.u,{icon:{name:"open-folder-1",type:"stroke"},message:(0,d.I)("files_shared_file_emptystate_message"),title:(0,d.I)("files_emptystate_title"),trigger:{children:(0,d.I)("generic_error_go_back_label"),onClick:t.goBack}
107,variant:"page"});const I=Number(window.location.pathname.split("/").reverse().filter((e=>e))[0]),k=(0,n.j)(v,(0,c.W)({triggers:{goBack:(0,p.ud)(t)}}));let T="suggest_deletion"in k.meta?(0,x.jsx)(m.u,{variant:"page",error:k,secondaryTrigger:{children:"Delete File",onClick:()=>g((0,o.OnDeleteFile)({id:I,name:"this file"}))}}):(0,x.jsx)(m.u,{variant:"page",error:k});if(!((0,a.XR)(v)&&v.data.extra.name&&v.data.extra.breadcrumbs))return T;const A=v.data.extra,E=v.data.status_code,M={...A,id:I,content_type:A.content_type_and_codecs},j=A.breadcrumbs.map((e=>({title:e[1],to:`/files/${e[0]}`})));return A.is_mp4_available&&(T=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(f.xu,{my:3,children:(0,x.jsx)(y.P,{message:(0,d.I)(503===E?"files.unreachable_but_has_mp4.description":"files.lost_but_has_mp4.description"),title:(0,d.I)(503===E?"files.unreachable_but_has_mp4.title":"files.lost_but_has_mp4.title"),type:"warning"})}),(0,x.jsxs)(f.kC,{sx:{gap:3,flexDirection:["column","row"]},children:[(0,x.jsx)(f.xu,{sx:{width:"100%"},children:(0,x.jsx)(r.default,{hls:w.getHLSStreamURL(M,{playOriginal:!1}),stream:w.getMP4StreamURL(M),contentType:A.content_type_and_codecs,duration:A.video_metadata.duration,fileId:M.id,playbackRates:!1,poster:A.screenshot,ratio:A.video_metadata.aspect_ratio,theaterMode:!1,title:A.name})}),(0,x.jsx)(f.xu,{sx:{minWidth:240},children:(0,x.jsx)(_.N.Root,{children:(0,x.jsxs)(f.xu,{children:[(0,x.jsx)(_.N.ListItem,{href:w.getMP4DownloadURL(M),icon:{name:"download-3",type:"solid"},children:(0,d.I)("files_download_mp4_label",(0,u.Gj)(A.mp4_size))}),(0,x.jsx)(_.N.ListItem,{icon:{name:"share",type:"solid"},onClick:()=>{g((0,o.SaveAsMp4)(M.id))},children:(0,d.I)("files_saveasmp4_label",(0,u.Gj)(A.mp4_size))}),(0,x.jsx)(_.N.ListItem,{icon:{name:"position-1",type:"stroke"},onClick:()=>{g((0,o.OnMoveFile)(M))},children:(0,d.I)("files_menu_move_label")}),(0,x.jsx)(_.N.ListItem,{icon:{name:"trash-2",type:"solid"},onClick:()=>{g((0,o.OnDeleteFile)(M))},children:S?(0,d.I)("files_menu_move_to_trash_label"):(0,d.I)("files_menu_delete_label")})]})})})]})]})),(0,x.jsx)(b.Z,{breadcrumbs:j,documentTitle:A.name,title:A.name,children:T})}))},82250:(e,t,s)=>{"use strict";s.d(t,{e:()=>h}),s(43673),s(40753),s(28399);var r=s(32978),n=s(86169),i=s(12467),o=s(75289),a=s(33611),l=s(42975),c=s(58943),d=s(12342),u=s(11616),p=s(52322);const _=(0,i.y)((0,d.R)((e=>{let{alt:t,file_id:s}=e;const r=(0,n.l)(),i=(0,l.E)(),a=(0,c.a)({queryKey:["files",s,"image-data"],queryFn:async()=>{const{data:e}=await i.get(r.getDownloadURL(s)??"",{responseType:"blob"});return e},enabled:!!r.getDownloadURL(s),suspense:!0});return(0,p.jsx)(o.Ee,{alt:t,src:a.data?URL.createObjectURL(a.data):void 0})}),{limit:10485760}),{error:{kind:"throw"},fallback:(0,p.jsx)(a.O,{height:360})}),h=(0,r.Z)(_,{check:e=>"active"===e.account_status,fallback:()=>(0,p.jsx)(u.H,{reason:"inactive-account"})})},20909:(e,t,s)=>{"use strict";s.d(t,{D:()=>p});var r=s(81669),n=s(12467),i=s(10210),o=s(94115),a=s(52322);const l={forceBlock:!0,namedCodesToUnicode:{percnt:"%"}},c=e=>{let{children:t=""}=e;const[s]=(0,o.AV)();return(0,a.jsx)("article",{className:"markdown-body","data-theme":s,children:(0,a.jsx)(i.Z,{options:l,children:t})})};var d=s(33611),u=s(12342);const p=(0,n.y)((0,u.R)((e=>{let{file_id:t,scope:s="default"}=e;const n=(0,r.Z)(t,{responseType:"text",scope:s});return(0,a.jsx)(c,{children:n.data})})),{error:{kind:"emptyState"},fallback:(0,a.jsx)(d.O,{height:360})})},37935:(e,t,s)=>{"use strict";s.d(t,{a:()=>a});var r=s(98355),n=(s(2784),s(59177)),i=s(1030),o=s(52322);const a=(0,n.EN)((e=>(0,o.jsx)(i.u,{icon:{name:"open-folder-1",type:"stroke"},message:(0,r.I)("files_emptystate_shared_message"),title:(0,r.I)("files_emptystate_title"),trigger:{children:(0,r.I)("generic_go_back"),onClick:e.router.goBack},variant:"page"})))},69048:(e,t,s)=>{"use strict";s.d(t,{J:()=>u});var r=s(81669),n=s(12467),i=s(9950),o=s(75289),a=s(52322);const l=e=>{let{children:t,height:s=360}=e;return(0,a.jsx)(o.xu,{sx:{background:"component-bg",borderRadius:"default",padding:3},children:(0,a.jsx)(i.x,{offsetScrollbars:!0,sx:{height:s},children:(0,a.jsx)(o.xv,{sx:{fontFamily:"monospace",overflowWrap:"break-word",whiteSpace:"pre-wrap"},children:t})})})};var c=s(33611),d=s(12342);const u=(0,n.y)((0,d.R)((e=>{let{file_id:t,scope:s="default"}=e;const n=(0,r.Z)(t,{responseType:"text",scope:s});return(0,a.jsx)(l,{children:n.data})})),{error:{kind:"throw"},fallback:(0,a.jsx)(c.O,{height:360})})},11616:(e,t,s)=>{"use strict";s.d(t,{H:()=>a});var r=s(86169),n=s(98355),i=(s(2784),s(1030)),o=s(52322);function a(e){const t=(0,r.l)();if("inactive-account"===e.reason)return(0,o.jsx)(i.u,{icon:{name:"minus-2",type:"stroke"},message:"Please activate your account to use put.io with full features.",title:"File cannot be previewed",trigger:{children:"Go to Billing",onClick:()=>{window.location.href="/billing"},size:"sm"},variant:"page"});
107{const s=t.getDownloadURL(e.file);return(0,o.jsx)(i.u,{icon:{name:"minus-2",type:"stroke"},message:(0,n.I)("files_cannot_preview_message"),title:(0,n.I)("files_cannot_preview_title"),trigger:{children:(0,n.I)("dashboard_action_download_label"),onClick:()=>s?window.open(s):null,size:"sm"},variant:"page"})}}},51382:(e,t,s)=>{"use strict";s.d(t,{Mm:()=>l,ZA:()=>c,ZN:()=>d,ng:()=>u,qy:()=>o,sX:()=>_,ud:()=>p});var r=s(4099),n=s(32315),i=s(79332);class o extends i.Z{}const a=[{error_type:"NAME_ALREADY_EXIST",kind:"api_error_type",localize:()=>({message:"Target folder contains a file with the same name.",recoverySuggestion:{description:"Please rename one of them and try again.",type:"instruction"}})},{error_type:"EMPTY_NAME",kind:"api_error_type",localize:()=>({message:"This file name is empty.",recoverySuggestion:{description:"Please rename and try again.",type:"instruction"}})},{error_type:"SLASH_IN_NAME",kind:"api_error_type",localize:()=>({message:"This file name contains a slash.",recoverySuggestion:{description:"Please rename and try again.",type:"instruction"}})},{error_type:"NAME_TOO_LONG",kind:"api_error_type",localize:()=>({message:"This file name is too long.",recoverySuggestion:{description:"Please rename and try again.",type:"instruction"}})}],l=e=>(0,n.j)(e,a),c=e=>(0,n.j)(e,a),d=e=>(0,n.j)(e,[...a,{error_type:"FileNotFound",kind:"api_error_type",localize:()=>({message:"The file you are trying to move was not found.",recoverySuggestion:{description:"Please make sure the file exists and try again.",type:"instruction"}})},{kind:"api_status_code",localize:()=>({message:"You do not have permission to move this file.",recoverySuggestion:{description:"You can only perform this action for your files.",type:"instruction"}}),status_code:403}]),u=e=>(0,n.j)(e,[{error_type:"FileDeleteChildrenLimitError",kind:"api_error_type",localize:e=>({message:r.ZP.files_delete_children_limit_error(e.data.extra?.limit,e.data.extra?.name),recoverySuggestion:{description:"Please try deleting the files individually.",type:"instruction"}})},{error_type:"FileDeleteParentLimitError",kind:"api_error_type",localize:e=>({message:r.ZP.files_delete_parent_limit_error(e.data.extra?.limit),recoverySuggestion:{description:"Please try deleting the files individually.",type:"instruction"}})},{error_type:"TRASH_LOCK_TIMEOUT",kind:"api_error_type",localize:()=>({message:r.ZP.trash_error_lock_timeout(),recoverySuggestion:{description:"Please try again later.",type:"instruction"}})}]),p=e=>({callback:()=>window.history.length>2?e.goBack():e.replace("/files"),label:window.history.length>2?r.ZP.generic_error_go_back_label():r.ZP.files_notfound_action_label()}),_=e=>({callback:e,label:r.ZP.generic_error_go_back_label()})},12342:(e,t,s)=>{"use strict";s.d(t,{R:()=>d});var r=s(1030),n=s(86169),i=s(81669),o=s(98355),a=s(2754),l=s(52322);const c=e=>{let{file_id:t,size:s}=e;const i=(0,n.l)().getDownloadURL(t);return(0,l.jsx)(r.u,{icon:{name:"gauge-1",type:"stroke"},message:(0,o.I)("files_cannot_preview_download_message"),title:(0,o.I)("files_cannot_preview_size_limit_title",(0,a.Gj)(s)),trigger:{children:(0,o.I)("dashboard_action_download_label"),onClick:()=>i?window.open(i):null,size:"sm"},variant:"page"})};function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{limit:5242880};return function(s){const r=(0,i.s)(s.file_id,{scope:s.scope??"default"});return r>=t.limit?(0,l.jsx)(c,{...s,size:r}):(0,l.jsx)(e,{...s})}}},23966:(e,t,s)=>{"use strict";s.d(t,{l:()=>i});var r=s(79794);const n=e=>{const t=e.getIn(["files","lastSeenFolder","id"]);if(void 0!==t)return t},i=()=>(0,r.v9)(n)},69739:(e,t,s)=>{"use strict";s.d(t,{L:()=>n});var r=s(42476);const n=e=>{let t="other";switch(t="string"==typeof e?e.toLocaleLowerCase():(0,r.T)(e),t){case"folder":return{name:"open-folder-3",type:"solid"};case"audio":return{name:"music-1",type:"solid"};case"video":return{name:"film-1",type:"stroke"};case"image":return{name:"image-1",type:"solid"};default:return{name:"document-1",type:"solid"}}}},42871:(e,t,s)=>{"use strict";s.d(t,{m:()=>o,U:()=>a});var r=s(38991),n=s(26713),i=s(1593);const o=()=>{const e=(0,n.Kk)();return!e?.dont_autoselect_subtitles},a=e=>{const t=(0,i.OQ)(),s=e.player||t?.video_player||"videojs";let n=t?.video_playback_type||"hls";"chromecast"===s&&(n=t?.chromecast_video_playback_type||"hls"),"shaka"===s&&(n="hls");let a={contentType:"hls"===n?"application/x-mpegURL":e.contentType,url:"hls"===n?e.hlsURL:e.streamURL};return"jwplayer"===s&&(n="mp4",a={contentType:e.contentType,url:e.streamURL}),{playbackType:n,textTracks:{autoSelect:o(),groupedByLanguage:(l=e.subtitles,Object.entries((0,r.v)(l,(e=>e.language))).map((e=>{let[t,s]=e;return{label:t,subtitles:s.map(((e,s)=>({...e,label:`${t} ${s+1}`})))}})))},video:a};var l}},9607:(e,t,s)=>{"use strict";s.d(t,{C:()=>r});const r={APP_CREATE:"/oauth/new",APP_SECRETS:"/oauth/:id/secrets",APP_SPECIFIC_PASSWORD:"/oauth/app-passwords/:id",APP_SPECIFIC_PASSWORD_CREATE:"/oauth/app-passwords/:id/create",APP_UPDATE:"/oauth/:id",APPS:"/oauth",AUTHENTICATE:"/oauth/authenticate",AUTHORIZATIONS:"/account/authorizations"}},97937:(e,t,s)=>{"use strict";s.d(t,{O:()=>n,w:()=>r});const r="/exclusive-access",n={FILE:`${r}/:oauth_token/:file_id`,LEGACY:"/a-gift-from/:username/:oauth_token",ROOT:`${r}/:oauth_token`}},53591:(e,t,s)=>{"use strict";s.d(t,{T:()=>
107o,d:()=>a});var r=s(98355),n=s(2754),i=s(32315);const o=e=>(0,i.j)(e,[{error_type:"PUBLIC_SHARE_NOT_ALLOWED_PLAN",kind:"api_error_type",localize:()=>({message:(0,r.I)("generic_error_title"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_not_allowed_plan"),type:"instruction"}})},{error_type:"PUBLIC_SHARE_UNSUPPORTED_FILE_TYPE",kind:"api_error_type",localize:()=>({message:(0,r.I)("generic_error_title"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_unsupported_file_type"),type:"instruction"}})},{error_type:"PUBLIC_SHARE_INSUFFICIENT_DATA",kind:"api_error_type",localize:()=>({message:(0,r.I)("generic_error_title"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_missing_data"),type:"instruction"}})},{error_type:"PUBLIC_SHARE_EXCEEDED_LIMIT",kind:"api_error_type",localize:()=>({message:(0,r.I)("generic_error_title"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_limit_exceeded"),type:"instruction"}})},{error_type:"PUBLIC_SHARE_SINGLE_FILE_LIMIT_EXCEEDED",kind:"api_error_type",localize:()=>({message:(0,r.I)("generic_error_title"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_limit_exceeded"),type:"instruction"}})},{error_type:"PUBLIC_SHARE_FOLDER_MAX_SIZE_LIMIT_EXCEEDED",kind:"api_error_type",localize:e=>{const{current:t,limit:s}=e.data.extra;return{message:(0,r.I)("files_public_share_error_max_size_limit_exceeded"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_max_size_limit_exceeded_details",(0,n.Gj)(s),(0,n.Gj)(t)),type:"instruction"}}}},{error_type:"PUBLIC_SHARE_FOLDER_MAX_CHILDREN_LIMIT_EXCEEDED",kind:"api_error_type",localize:e=>{const{current:t,limit:s}=e.data.extra;return{message:(0,r.I)("files_public_share_error_max_children_limit_exceeded"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_max_children_limit_exceeded_details",s,t),type:"instruction"}}}},{error_type:"PUBLIC_SHARE_DAILY_TOTAL_LINK_COUNT_EXCEEDED",kind:"api_error_type",localize:e=>{const{current:t,limit:s}=e.data.extra;return{message:(0,r.I)("files_public_share_error_daily_total_link_count_exceeded"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_daily_total_link_count_exceeded_details",s,t),type:"instruction"}}}},{error_type:"PUBLIC_SHARE_WEEKLY_TOTAL_LINK_COUNT_EXCEEDED",kind:"api_error_type",localize:e=>{const{current:t,limit:s}=e.data.extra;return{message:(0,r.I)("files_public_share_error_weekly_total_link_count_exceeded"),recoverySuggestion:{description:(0,r.I)("files_public_share_error_weekly_total_link_count_exceeded_details",s,t),type:"instruction"}}}}]),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(0,i.j)(e,[...t,{kind:"api_status_code",localize:()=>({message:(0,r.I)("files_public_share_expired_title"),recoverySuggestion:{description:(0,r.I)("files_public_share_expired_message"),type:"instruction"}}),status_code:401},{error_type:"LinkExpired",kind:"api_error_type",localize:()=>({message:(0,r.I)("files_public_share_expired_title"),recoverySuggestion:{description:(0,r.I)("files_public_share_expired_message"),type:"instruction"}})},{error_type:"AbuseError",kind:"api_error_type",localize:()=>({message:(0,r.I)("files_public_share_abuse_title"),recoverySuggestion:{description:(0,r.I)("files_public_share_abuse_message_title"),type:"instruction"}})},{error_type:"AbuseDetected",kind:"api_error_type",localize:()=>({message:(0,r.I)("files_abusedetected_title"),recoverySuggestion:{description:(0,r.I)("files_abusedetected_message"),type:"instruction"}})}])}},79244:(e,t,s)=>{"use strict";s.d(t,{B:()=>m}),s(43673),s(40753),s(28399);var r=s(98355),n=s(70028),i=s(13749),o=s(44286),a=s(39723),l=s(75289),c=s(2993),d=s(44094),u=s(784),p=s(40238),_=s(97937),h=s(52322);const g=e=>{let{data:t}=e;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.P,{message:(0,r.I)("files_public_share_abuse_message_details"),title:(0,r.I)("files_public_share_abuse_message_title"),type:"warning"}),(0,h.jsx)(l.xu,{mb:2,mt:3,children:(0,h.jsx)(c.Z,{title:t.user_file.name})}),(0,h.jsx)(i.l0,{onSubmit:o.Z,render:e=>{let{values:s}=e;return(0,h.jsxs)(d.Y,{children:["VIDEO"===t.user_file.file_type?(0,h.jsx)(i.gN,{component:u.X,label:"Watch together (Will attempt to synchronize. Experimental)",name:"watchTogether",type:"checkbox"}):null,(0,h.jsx)(i.gN,{component:p.D,format:()=>(e=>{const{data:{token:t},watchTogether:s}=e,r=new URL(`${_.w}/${t}`,window.location.origin);return s&&r.searchParams.append("utm_campaign","party"),r})({data:t,watchTogether:s.watchTogether}).toString(),name:"url"})]})}})]})},m=e=>{new n.u_({component:g,title:(0,r.I)("files_public_share_sender_modal_title")}).Show(e)}},96223:(e,t,s)=>{"use strict";s.d(t,{p:()=>r});const r={CREATE:"/rss/new",LOGS:"/rss/:id/logs",ROOT:"/rss",UPDATE:"/rss/:id"}},49963:(e,t,s)=>{"use strict";s.d(t,{t:()=>r});const r={CALLBACK_URL:"/settings/callback-url",PUSHOVER_TOKEN:"/settings/pushover-token",ROOT:"/settings",ROUTE:"/settings/route"}},3251:(e,t,s)=>{"use strict";s.d(t,{n:()=>i});var r=s(4099),n=s(32315);const i=e=>(0,n.j)(e,[{error_type:"INVALID_CALLBACK_URL",kind:"api_error_type",localize:()=>({message:r.ZP.settings_form_error_invalid_callback_url(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"INVALID_PUSHOVER_TOKEN",kind:"api_error_type",localize:()=>({message:r.ZP.settings_form_error_invalid_pushover_token(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"NO_ACTIVE_DOWNLOAD_HOST",kind:"api_error_type",localize:()=>({message:r.ZP.settings_form_error_invalid_pushover_token(),recoverySuggestion:{description:"",type:"instruction"}})}])},80363:(e,t,s)=>{"use strict";s.d(t,{w:()=>i});var r=s(10017),n=s(3251);const i=e=>{switch(e.type){case"initial":return;case"saving":return{type:"busy"};case"success":return{type:"success"};case"failure":return{message:(0,n.n)(e.error).message,type:"error"};default:(0,r.Z)(e)}}},32626:(e,t,s)=>{"use strict";s.d(t,{D:()=>i});var r=s(98355),n=s(32315);const i=e=>(0,n.j)(e,[{error_type:"ALREADY_SHARED",kind:"api_error_type",localize:()=>({message:(0,r.I)("files_share_already_shared_error"),recoverySuggestion:{description:"",type:"instruction"}})}])},15097:(e,t,s)=>{"use strict";s.d(t,{p:()=>x});var r=s(34884),n=s(70028),i=s(12467),o=s(98355),a=s(55830),l=s(58943),c=s(93599),d=s(43079),u=s(49024),p=s(10017),_=s(47245),h=s(32626),g=s(15250);const m=e=>["shared-file-shared-with",e];s(2784);var f=s(70964),y=s(52322);const b=e=>{let{file:t,onResolve:s}=e;const[n,{updateMutation:i}]=(e=>{const t=(0,a.NL)();return[(0,l.a)({queryFn:()=>(async e=>(await u.Z.get(`/files/${e}/shared-with-v2`)).data)(e),queryKey:m(e),suspense:!0}),{updateMutation:(0,c.D)((async s=>{const r=t.getQueryData(m(e));switch(s.type){case"everyone":if("everyone"===r.share_type)return;return void await u.Z.Files.Share({friends:"everyone",ids:[e]});case"friends":if(0===s.friendNames.length)return void await u.Z.File.Unshare(e,void 0);if("everyone"===r.share_type&&await u.Z.File.Unshare(e,void 0),"friends"===r.share_type){const t=(0,_.e)(r.shares.map((e=>e.user_name)),s.friendNames),n=r.shares.filter((e=>t.includes(e.user_name))).map((e=>e.share_id));await Promise.all(n.map((t=>u.Z.File.Unshare(e,t))))}return void await u.Z.Files.Share({friends:s.friendNames.join(","),ids:[e]});default:(0,p.Z)(s)}}),{onError:e=>{d.Z.Show((0,h.D)(e))},onSuccess:()=>{d.Z.Show({message:(0,o.I)("files_share_success_message"),type:"success"}),t.invalidateQueries(m(e)),t.invalidateQueries(g.W)}})}]})(t.id);if(!n.data)throw new r.fF;return(0,y.jsx)(f.w,{initialValues:"friends"===n.data.share_type&&n.data.shares.length>0?{friendNames:n.data.shares.map((e=>e.user_name)),type:"friends"}:{type:"everyone"},onSubmit:e=>new Promise((t=>{i.mutate(e,{onError:t,onSuccess:s})}))})},x=e=>new n.u_({component:(0,i.y)(b,{error:{kind:"emptyState",variant:"page"},fallback:{kind:"list"}}),name:"share-file",size:n.u_.SIZES.SMALL,title:`Share ${e.file.name} in put.io`}).Show(e)},85386:(e,t,s)=>{"use strict";s.d(t,{f:()=>p});var r=s(98355),n=s(70028),i=s(43079),o=s(49024),a=s(12467),l=(s(2784),s(32626)),c=s(70964),d=s(52322);const u=e=>
107{let{onResolve:t,...s}=e;return(0,d.jsx)(c.w,{onSubmit:async e=>{const{cursor:n,excludeIds:a,ids:c}=s,d="everyone"===e.type?"everyone":e.friendNames.join(",");try{await o.Z.Files.Share({cursor:n,excludeIds:a,friends:d,ids:c}),i.Z.Show({message:(0,r.I)("files_share_success_message"),type:"success"}),t()}catch(e){i.Z.Show((0,l.D)(e))}}})},p=e=>new n.u_({component:(0,a.y)(u,{error:{kind:"emptyState",variant:"page"},fallback:{kind:"list"}}),name:"share-files",size:n.u_.SIZES.SMALL,title:`Share ${e.title} in put.io`}).Show(e)},70964:(e,t,s)=>{"use strict";s.d(t,{w:()=>k});var r=s(4099),n=s(38571),i=s(57671),o=s(2784),a=s(13749),l=s(44094),c=s(40546),d=s(39182),u=s(54869),p=s(75289),_=s(73372),h=s(94115),g=s(59807),m=s(93291),f=s(79318),y=s(52322);function b(e){let{image:t,label:s,onRemove:r,...n}=e;return(0,y.jsx)("div",{...n,children:(0,y.jsxs)(d.Z,{noWrap:!0,spacing:4,children:[(0,y.jsx)(_.q,{size:20,src:t}),(0,y.jsx)(p.xv,{sx:{color:"text",fontSize:0},children:s}),(0,y.jsx)(p.xu,{ml:1,children:(0,y.jsx)(g.h,{icon:{name:"x-1",type:"solid"},onClick:r,size:"xs"})})]})})}const x=(0,o.forwardRef)(((e,t)=>{let{image:s,label:r,...n}=e;return(0,y.jsx)("div",{ref:t,...n,children:(0,y.jsxs)(d.Z,{noWrap:!0,spacing:8,children:[(0,y.jsx)(_.q,{size:24,src:s}),(0,y.jsx)(p.xv,{sx:{color:"text",fontSize:1},children:r})]})})})),w=e=>{let{description:t,error:s,label:r,options:n,...i}=e;const{theme:o}=(0,h.Fg)(),a=(0,f.a)(),l=n.map((e=>({image:e.avatar_url,label:e.name,value:e.name})));return(0,y.jsx)(m.S,{description:t,error:s,label:r,children:(0,y.jsx)(u.NU,{...i,data:l,itemComponent:x,nothingFound:"Nobody here",placeholder:"Select friends",searchable:!0,styles:{dropdown:{backgroundColor:o.colors["lo-contrast"],borderColor:o.colors.border,color:o.colors.text,width:"60%!important"},hovered:{backgroundColor:o.colors["component-bg-hover"]},input:a,item:{backgroundColor:o.colors["app-bg"],text:o.colors.text},root:{"*":{fontFamily:`${o.fonts.body}!important`},lineHeight:o.lineHeights.body},value:{backgroundColor:o.colors["list-item-bg-hover"],borderRadius:o.radii.default,margin:"0 2px 2px 0",padding:"2px 4px"},wrapper:{":focus-within":{borderColor:o.colors.border,boxShadow:`0 0 0 1px ${o.colors["border-hover"]}`},borderRadius:o.radii.default}},valueComponent:b,withinPortal:!1,zIndex:999})})},S=e=>{let{input:t,meta:s,...r}=e;const n=s.error||s.submitError;return(0,y.jsx)(w,{error:n,...t,...r})};var v=s(18756),I=s(23233);const k=e=>{let{initialValues:t,onSubmit:s}=e;const[d]=(0,I.m)(),u=(0,o.useRef)((p=t)?"everyone"===p.type?{friendNames:[],type:"everyone"}:{friendNames:p.friendNames,type:"friends"}:{friendNames:[],type:"everyone"});var p;const _=[{description:"You can share with all of your put.io friends, including future ones.",title:"Share with everyone",value:"everyone"},{description:"Friends selected below will be able to view those files as long as you remain friends with them.",title:"Share with selected friends",value:"friends"}];return(0,y.jsx)(a.l0,{initialValues:u.current,onSubmit:s,render:e=>{let{handleSubmit:t,submitting:s,values:{friendNames:o,type:u}}=e;return(0,y.jsxs)(l.Y,{onSubmit:t,children:[(0,y.jsx)(a.gN,{component:c.v,name:"type",options:_}),"friends"===u?(0,y.jsx)(a.gN,{component:S,name:"friendNames",options:d.data}):null,(0,y.jsx)(n.Z,{children:(0,y.jsx)(i.Z,{children:(0,y.jsx)(v.z,{disabled:"friends"===u&&0===o.length,loading:s,type:"submit",variant:"primary",children:r.ZP.friendpicker_action_share_label()})})})]})}})}},23233:(e,t,s)=>{"use strict";s.d(t,{Z:()=>a,m:()=>c});var r=s(55830),n=s(58943),i=s(93599),o=s(49024);const a=["friends"],l=async()=>(await o.Z.Friends.Query()).data.friends,c=()=>{const e=(0,r.NL)();return[(0,n.a)(a,l,{staleTime:6e4,suspense:!0}),{removeFriendMutation:(0,i.D)({mutationFn:e=>o.Z.Friends.Remove(e),onMutate:t=>{e.setQueryData(a,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter((e=>e.name!==t))}))},onSettled:()=>e.invalidateQueries(a)})}]}},15250:(e,t,s)=>{"use strict";s.d(t,{W:()=>d,e:()=>p});var r=s(4099),n=s(55830),i=s(58943),o=s(93599),a=s(43079),l=s(49024),c=s(32315);const d=["shared-files"],u=async()=>(await l.Z.Files.SharedOnes()).data.shared,p=()=>{const e=(0,n.NL)();return[(0,i.a)({queryFn:u,queryKey:d,suspense:!0}),{unshareMutation:(0,o.D)((e=>l.Z.File.Unshare(e,void 0)),{onError:(t,s,r)=>{r?.previousFiles&&(e.setQueryData(d,r.previousFiles),a.Z.Show((0,c.j)(t)))},onMutate:async t=>{await e.cancelQueries(d);const s=e.getQueryData(d);return e.setQueryData(d,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter((e=>e.id!==t))})),a.Z.Show({message:r.ZP.sharing_unshare_success(),type:a.Z.TYPE.SUCCESS}),{previousFiles:s}}})}]}},25620:(e,t,s)=>{"use strict";s.d(t,{IT:()=>r,Pt:()=>i,Xy:()=>n});const r={REMOVE_RATE_LIMIT:"/captcha/:id",ROOT:"/support"},n="[email protected]",i={AMAZON_FIRE_TV_APP_ID:6233,ANDROID_TV_APP_ID:6221,IOS_APP_ID:3001,NEW_ROKU_APP_ID:3776,RAYCAST_APP_ID:6311,ROKU_APP_ID:961,TV_OS_APP_ID:2951,TV_PUT_IO_APP_ID:2836,WEB_APP_ID:1}
107},15545:(e,t,s)=>{"use strict";s.d(t,{k:()=>n});var r=s(25620);const n=e=>{if(window.Intercom){if(e){const t=e.title?`${e.title}\n\n${e.body}`:e.body;return window.Intercom("showNewMessage",t)}return window.Intercom("showNewMessage")}const t=`subject=${encodeURIComponent(e?.title||"Support")}&body=${encodeURIComponent(e?.body||"")}`;window.open(`mailto:${r.Xy}?${t}`,"_blank")}},75425:(e,t,s)=>{"use strict";s.d(t,{d:()=>J,c:()=>X});var r=s(8353),n=s(73322),i=s(2784),o=s(79794),a=s(54819),l=s(85039),c=s(83230);const d=e=>{let{source:t}=e;const s=(0,o.I0)(),[n]=(0,l.r)(),d=(0,c.i)(),u=(0,i.useMemo)((()=>r.Z.extend("use-upload-files").extend(t)),[t]),p=(0,i.useMemo)((()=>"dropzone"===t?d.id:n.id),[t,n,d]);return(0,i.useCallback)((e=>{if(0===e.length)return u("skipped: no files");u(`uploading to /files/${p}`),s((0,a.AddUploadTask)(e,p))}),[u,s,p])};var u=s(4099),p=s(70028),_=s(28114),h=s(38571),g=s(57671),m=s(13749),f=s(39961),y=s(35515),b=s(44094),x=s(30965),w=s(18756),S=s(55522),v=s(97395),I=s(23083),k=s(75289),T=s(27447),A=s(94115),E=s(52322);const M=e=>{let{onDrop:t}=e;const{getInputProps:s,getRootProps:r,isDragAccept:n,isDragActive:o,isDragReject:a,isFocused:l}=(0,I.uI)({onDrop:t}),c=(e=>{let{isDragAccept:t,isDragActive:s,isDragReject:r,isFocused:n}=e;const{theme:o}=(0,A.Fg)();return(0,i.useMemo)((()=>({backgroundColor:o.colors["app-bg"],borderColor:o.colors.border,borderRadius:o.radii.default,borderStyle:"dashed",borderWidth:1,width:"100%",...s?{backgroundColor:o.colors["component-bg-active"],borderStyle:"solid"}:{},...n?{borderColor:o.colors["border-hover"]}:{},...t?{borderColor:o.colors["green-border"]}
107:{},...r?{borderColor:o.colors["red-border"]}:{}})),[n,t,r,s,o])})({isDragAccept:n,isDragActive:o,isDragReject:a,isFocused:l});return(0,E.jsx)(k.xu,{sx:{width:"100%"},children:(0,E.jsxs)(k.xu,{...r({style:c}),children:[(0,E.jsx)("input",{...s()}),(0,E.jsxs)(k.xu,{sx:{paddingX:2,paddingY:[3,4],textAlign:"center"},children:[(0,E.jsx)(k.xu,{sx:{fontSize:[4,5]},children:(0,E.jsx)(T.J,{name:"cloud-upload-1",type:"solid"})}),(0,E.jsx)(k.xu,{my:2}),(0,E.jsxs)(k.xu,{sx:{color:"text-secondary",fontFamily:"body",fontSize:[0,1],fontWeight:"body"},children:["Drag and drop, or"," ",(0,E.jsx)(k.xv,{sx:{":hover":{opacity:.8},color:"text"},children:"select files."})]})]})]})})};var j=s(68529),D=s(99486),C=s(9617),R=s(69363),N=s(59807),P=s(36628),O=s(40546);const L=[{description:"We will use your default download folder unless you choose a custom folder during the session.",title:"Your default download folder",value:"default_download_folder"},{description:"We will try to use the last seen folder and fallback to your default download folder unless you choose a custom folder during the session.",title:"Last seen folder in Files page",value:"last_seen_folder"},{description:"We will use this folder until you refresh or close this browser tab.",title:"Choose a custom folder",value:"user_selected_folder"}],Z=e=>{let{onResolve:t}=e;const[,s]=(0,D.E)("new_transfer_target"),[r,n]=(0,l.r)();return(0,E.jsx)(k.xu,{"data-autofocus":!0,tabIndex:0,children:(0,E.jsx)(O.r,{name:"new-transfer-target",onChange:e=>{if("user_selected_folder"===e)return P.Z.Show({actionLabel:"Download here",title:"Choose folder"}).then((e=>{e&&(n(e.id),t())})).catch((()=>null));n(void 0),s(e),t()},options:L,value:r.type})})},F=()=>{const[e]=(0,D.E)("new_transfer_target"),[t,s]=(0,l.r)(),r=(0,i.useMemo)((()=>{switch(t.type){case"user_selected_folder":return"Saving to a custom folder in this session.";case"last_seen_folder":return t.is_fallback?"Saving to your default download folder, used as fallback for the last seen folder.":"Saving to the last seen folder.";case"default_download_folder":return"Saving to your default download folder."}}),[t]);return(0,E.jsx)(C.R,{accessory:(0,E.jsxs)(R.h,{spacing:1,children:[(0,E.jsx)(N.h,{appearance:"filled",fontSize:1,height:28,icon:{name:"settings-2",type:"stroke"},onClick:()=>new p.u_({component:Z,size:p.u_.SIZES.SMALL,title:"Choose target folder for transfers"}).Show(),title:"Configure",width:28}),"user_selected_folder"===t.type?(0,E.jsx)(N.h,{appearance:"filled",fontSize:1,height:28,icon:{name:"refresh-1",type:"solid"},onClick:()=>s(void 0),title:"Reset to "+("last_seen_folder"===e?"last seen folder":"default download folder"),width:28}):null]}),description:r,type:"custom",value:t.id})},z=window.matchMedia?.("(pointer: coarse)").matches??!1,U=z?3:6,V=z&&!!navigator.clipboard?.readText,Y=e=>{let{onPasteLinks:t,onUploadFiles:s}=e;const{canRegisterMagnetHandler:r,handleRegisterMagnetHandler:n}=(0,j.T)();return(0,E.jsxs)(y.m,{justified:!0,children:[(0,E.jsx)(y.O,{title:u.ZP.upload_fromlink_title(),children:(0,E.jsx)(m.l0,{onSubmit:e=>{let{links:s}=e;const r=_.z.required(s);return r?{links:r}:t(s)},render:e=>{let{form:t,handleSubmit:s,submitting:i,values:o}=e;return(0,E.jsx)(f.HotKeys,{handlers:{SUBMIT:t.submit},keyMap:{SUBMIT:"command+enter"},children:(0,E.jsx)(f.ObserveKeys,{only:["command","enter","escape"],children:(0,E.jsxs)(b.Y,{onSubmit:s,spacing:3,children:[(0,E.jsx)(F,{}),(0,E.jsx)(m.gN,{autoFocus:!z,autosize:!0,component:x.l,"data-autofocus":!z||void 0,description:u.ZP.upload_magnet_help(),maxRows:U,minRows:U,name:"links",onPaste:e=>{if(o.links){const s=e.currentTarget.value||"";/[\r\n]$/.test(s)||t.change("links",`${s}\n`)}}}),V?(0,E.jsx)(w.z,{fullWidth:!0,icon:{name:"clipboard",type:"solid"},onClick:async()=>{const e=(await navigator.clipboard.readText().catch((()=>""))).trim();var s,r;e?t.change("links",(s=o.links,r=e,s?.trim()?`${s.replace(/\s+$/u,"")}\n${r}`:r)):document.querySelector('textarea[name="links"]')?.focus()},type:"button",variant:"default",children:"Paste from clipboard"}):null,r?(0,E.jsx)(S.e,{color:"text-secondary",onClick:n,sx:{fontSize:0}
107,tabIndex:-1,children:u.ZP.upload_magnet_message()}):null,(0,E.jsx)(h.Z,{children:(0,E.jsx)(g.Z,{children:(0,E.jsx)(v.t,{format:"key+label",keys:["command","Enter"],label:"to add transfers",children:(0,E.jsx)(w.z,{loading:i,type:"submit",variant:"primary",children:u.ZP.upload_start_label()})})})})]})})})}})}),(0,E.jsx)(y.O,{title:u.ZP.upload_upload_title(),children:(0,E.jsxs)(b.Y,{spacing:3,children:[(0,E.jsx)(F,{}),(0,E.jsx)(M,{onDrop:s})]})})]})},W=e=>{let{onResolve:t}=e;const s=(0,n.g)({source:"new-transfer-form"}),r=d({source:"new-transfer-form"}),o=(0,i.useCallback)((async e=>{const{result:r}=await s(e);"success"===r&&t()}),[s,t]),a=(0,i.useCallback)((e=>{r(e),t()}),[r,t]);return(0,E.jsx)(Y,{onPasteLinks:o,onUploadFiles:a})};var G=s(73773),H=s(18361),B=s(98355);const $=e=>{let{disabled:t,onDrop:s}=e;const{getInputProps:r,getRootProps:n}=(0,I.uI)({disabled:t,onDrop:s}),[o,a]=(0,i.useState)(0),l=(0,i.useMemo)((()=>o>0),[o]),c=(0,i.useCallback)((e=>{e.dataTransfer?.types.includes("Files")&&a((e=>e+1))}),[]),d=(0,i.useCallback)((()=>{a((e=>e>0?e-1:0))}),[]);return(0,i.useEffect)((()=>{if(!t)return document.addEventListener("dragenter",c,!1),document.addEventListener("dragleave",d,!1),document.addEventListener("drop",d,!1),()=>{document.removeEventListener("dragenter",c,!1),document.removeEventListener("dragleave",d,!1),document.removeEventListener("drop",d,!1)}}),[t,c,d]),(0,E.jsx)(k.xu,{sx:{backgroundColor:"component-bg-active",height:"100%",left:0,opacity:l?.75:0,padding:4,pointerEvents:l?"all":"none",position:"fixed",top:0,transition:"opacity 0.2s",width:"100%",zIndex:"intercom"},children:(0,E.jsxs)(k.xu,{...n(),sx:{backgroundColor:"component-bg-active",borderColor:"border",borderRadius:"default",borderStyle:"dashed",borderWidth:1,height:"100%",width:"100%"},children:[(0,E.jsx)("input",{...r()}),(0,E.jsx)(k.kC,{sx:{alignItems:"center",borderRadius:"default",fontFamily:"body",height:"100%",justifyContent:"center"},children:(0,E.jsxs)(k.xu,{sx:{textAlign:"center"},children:[(0,E.jsx)(k.xu,{sx:{fontSize:[5,6,7]},children:(0,E.jsx)(T.J,{name:"cloud-upload-1",type:"solid"})}),(0,E.jsx)(k.xu,{my:[2,3]}),(0,E.jsx)(k.xu,{sx:{fontSize:[3,4,5]},children:(0,B.I)("app_drag_drop_message")})]})})]})})};var q=s(97399);const Q="new-transfer-provider",K=i.createContext(void 0),J=e=>{let{children:t}=e;const[s,o]=(0,i.useState)(!1),[a,l]=(0,i.useState)(!0),c=(0,n.g)({source:"dropzone"}),_=d({source:"dropzone"}),h=(0,i.useCallback)((async(e,t)=>{const s=r.Z.extend(Q).extend("paste-links");return a?(0,q.c)(t.target)?s("skipped: active input"):e.startsWith(window.location.origin)?s("skipped: origin url"):(o(!0),await c(e),void o(!1)):s("skipped: disabled")}),[c,a]),g=(0,i.useCallback)(((e,t)=>{const s=r.Z.extend(Q).extend("paste-files");return a?t instanceof DragEvent?s("skipped: drag event"):(0,q.c)(t.target)?s("skipped: active input"):void _(e):s("skipped: disabled")}),[_,a]),m=(0,i.useCallback)((e=>{const t=r.Z.extend(Q).extend("drop-files");if(!a)return t("skipped: disabled");_(e)}),[a,_]);(0,G.Z)({onFiles:g,onText:h,onUri:h});const y=(0,i.useCallback)((async()=>{l(!1),new p.u_({component:W,name:"new-transfer",title:u.ZP.transfers_empty_state_action_label()}).Show().then((()=>setTimeout((()=>l(!0)),500))).catch((()=>l(!0)))}),[]),b=(0,i.useCallback)((e=>{a&&(e?.metaKey||(e?.preventDefault(),y()))}),[a,y]),x=(0,i.useMemo)((()=>({showNewTransferModal:y})),[y]);return(0,E.jsx)(K.Provider,{value:x,children:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(f.GlobalHotKeys,{allowChanges:!0,handlers:{SHOW_NEW_TRANSFER_MODAL:b},keyMap:{SHOW_NEW_TRANSFER_MODAL:"t"}}),(0,E.jsx)(H.f,{visible:s}),(0,E.jsx)($,{disabled:!a,onDrop:m}),t]})})},X=()=>{const e=i.useContext(K);if(void 0===e)throw new Error("useNewTransfer must be used within a NewTransferProvider");return e}},22703:(e,t,s)=>{"use strict";s.d(t,{e:()=>i});var r=s(98355),n=s(32315);const i=e=>(0,n.j)(e,[{error_type:"PARENT_NOT_A_FOLDER",kind:"api_error_type",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("transfer_add_error_parent_not_a_folder"),type:"instruction"}})},{error_type:"PARENT_NOT_FOUND",kind:"api_error_type",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("transfer_add_error_parent_not_found"),type:"instruction"}})},{error_type:"TRANSFER_ADD_LIMIT_REACHED",kind:"api_error_type",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("transfer_add_error_limit_reached"),type:"instruction"}})},{error_type:"TOO_MANY_URLS",kind:"api_error_type",localize:()=>({message:(0,r.I)("transfer_add_multi_error_title"),recoverySuggestion:{description:(0,r.I)("transfer_add_error_too_many_urls"),type:"instruction"}})},{error_type:"TRANSFER_ALREADY_ADDED",kind:"api_error_type",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("transfer_add_error_already_added"),type:"instruction"}})},{error_type:"UNSUPPORTED_URI_SCHEME",kind:"api_error_type",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("transfer_add_error_unsupported_uri_scheme"),type:"instruction"}})},{error_type:"EMPTY_URL",kind:"api_error_type",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("transfer_add_error_empty_url"),type:"instruction"}})},{kind:"api_status_code",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("generic_error_402_message"),type:"instruction"}}),status_code:402},{kind:"api_status_code",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("upload_transfer_start_message_full_error"),type:"instruction"}}),status_code:400},{kind:"generic",localize:()=>({message:(0,r.I)("transfer_add_single_error_title"),recoverySuggestion:{description:(0,r.I)("upload_transfer_start_message_full_error"),type:"instruction"}})}])},73322:(e,t,s)=>{"use strict";s.d(t,{g:()=>v});var r=s(4099),n=s(43079),i=s(10017),o=s(8353),a=s(99486),l=s(2784),c=s(79794),d=s(78102),u=s(22703),p=s(70028),_=s(75289),h=s(18047),g=s(63259),m=s(22556),f=s(52322);const y=e=>{let{errors:t}=e;return(0,f.jsx)(_.xu,{children:t.map(((e,s)=>(0,f.jsxs)(l.Fragment,{children:[(0,f.jsxs)(_.kC,{sx:{alignItems:"center",gap:3,paddingY:3},children:[(0,f.jsxs)(_.kC,{sx:{alignItems:"center",gap:1},children:[(0,f.jsx)(h.m,{size:"sm",value:e.url}),(0,f.jsx)(g.u,{label:e.url,children:(0,f.jsx)(_.xv,{sx:{fontSize:0,maxWidth:100,minWidth:50,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.url})})]}),(0,f.jsx)(_.xu,{sx:{flex:1},children:(0,f.jsx)(_.xv,{children:(0,u.e)({data:e}).recoverySuggestion.description})})]}),s===t.length-1?null:(0,f.jsx)(m.Z,{})]},e.url)))})},b=e=>new p.u_({component:y,name:"add-multi-transfers-summary-modal",size:p.u_.SIZES.NORMAL,title:r.ZP.transfer_add_multi_error_title()}).Show(e);var x=s(49024),w=s(85039),S=s(83230);const v=e=>{let{source:t}=e;const[s]=(0,a.E)("transfers.redirect"),p=(0,l.useMemo)((()=>o.Z.extend("use-paste-links").extend(t)),[t]),_=(0,c.I0)(),h=(0,l.useCallback)((async(e,t)=>{const s=((e,t)=>e.split("\n").filter((e=>!!e)).map((e=>({save_parent_id:t,url:e}))))(e,t);try{const{data:{errors:e,transfers:t}}=await x.Z.Transfers.AddMulti(s);return 0===t.length?1===e.length?{error:{data:e[0]},type:"failure"}:{errors:e,type:"multi-failure"}:0!==e.length?{errors:e,type:"partial-success"}:{type:"success"}}catch(e){return{error:e,type:"failure"}}}),[]),[g]=(0,w.r)(),m=(0,S.i)();return(0,l.useCallback)((async e=>{const o="dropzone"===t?m.id:g.id;p(`downloading to /files/${o}`);const a=await h(e,o);switch(a.type){case"success":return s?(n.Z.Show({message:r.ZP.upload_transfer_start_message_success(),type:"success"}),_((0,d.VF)("/transfers"))):n.Z.Show({action:{label:"Go to transfers",onClick:()=>_((0,d.VF)("/transfers"))},message:r.ZP.upload_transfer_start_message_success(),type:"success"}),{result:"success"};case"partial-success":return n.Z.Show({action:{label:r.ZP.generic_learn_more(
107),onClick:()=>{b({errors:a.errors})}},message:r.ZP.transfer_add_partial_error_title(),timeout:5,type:n.Z.TYPE.WARNING}),s&&_((0,d.VF)("/transfers")),{result:"success"};case"failure":return n.Z.Show((0,u.e)(a.error)),{result:"failure"};case"multi-failure":return n.Z.Show({action:{label:r.ZP.generic_learn_more(),onClick:()=>{b({errors:a.errors})}},message:r.ZP.transfer_add_full_error_title(),timeout:5,type:"danger"}),{result:"failure"};default:(0,i.Z)(a)}}),[p,_,h,t,g,m,s])}},68529:(e,t,s)=>{"use strict";s.d(t,{T:()=>i});var r=s(29604),n=s(43079);const i=()=>{const e=navigator&&"function"==typeof navigator.registerProtocolHandler;return{canRegisterMagnetHandler:e,handleRegisterMagnetHandler:()=>{if(!e)return n.Z.Show({message:"This feature is not supported by your browser.",timeout:5,type:n.Z.TYPE.ERROR});const t=`${r.Z.surfaces.app}/magnet?_t=${Date.now()}&uri=%s`;try{navigator.registerProtocolHandler("magnet",t,"Allow put.io to handle magnet links?")}catch(e){n.Z.Show({message:`Browser error: ${e.message}`,type:n.Z.TYPE.ERROR})}}}}},83230:(e,t,s)=>{"use strict";s.d(t,{i:()=>l});var r=s(76784),n=s(91369),i=s(99486),o=s(23966),a=s(2784);const l=()=>{const[e]=(0,n.R)("default_download_folder"),[t]=(0,i.E)("dropzone_transfer_target"),s=(0,r.H)(),l=(0,o.l)();return(0,a.useMemo)((()=>"default_download_folder"===t?{id:e,type:"default_download_folder"}:"/files"===s.pathname?{id:0,type:"current_folder"}:l&&s.pathname===`/files/${l}`?{id:l,type:"current_folder"}:{id:e,type:"default_download_folder"}),[t,e,s,l])}},85039:(e,t,s)=>{"use strict";s.d(t,{r:()=>l});var r=s(91369),n=s(99486),i=s(23966),o=s(2784);const a=(0,s(86801).r)(),l=()=>{const[e]=(0,n.E)("new_transfer_target"),[t]=(0,r.R)("default_download_folder"),s=(0,i.l)(),[l,c]=a();return[(0,o.useMemo)((()=>void 0!==l?{id:l,type:"user_selected_folder"}:"last_seen_folder"===e?void 0!==s?{id:s,is_fallback:!1,type:"last_seen_folder"}:{id:t,is_fallback:!0,type:"last_seen_folder"}:{id:t,type:"default_download_folder"}),[e,l,s,t]),c]}},56921:(e,t,s)=>{"use strict";s.r(t),s.d(t,{CONVERT_FILE_ERROR:()=>ct,CONVERT_FILE_START:()=>rt,CONVERT_FILE_START_FAILURE:()=>it,CONVERT_FILE_START_SUCCESS:()=>nt,CONVERT_FILE_SUCCESS:()=>lt,CONVERT_FILE_UPDATE:()=>at,CURRENT_FILE_UPDATED:()=>Ht,CloneSharedFile:()=>Ms,ConvertTaskDone:()=>Es,ConvertTaskUpdated:()=>dt,DELETE_ALL_FILES:()=>rs,DELETE_FILES:()=>ts,DeleteAllFiles:()=>ns,DeleteFiles:()=>ss,ExtractionsSchema:()=>Fe,FETCH_SHARED_FOLDER_FAILURE:()=>Gs,FETCH_SHARED_FOLDER_REQUEST:()=>Ys,FETCH_SHARED_FOLDER_SUCCESS:()=>Ws,FILES_START_FETCHING:()=>ze,FILES_STOP_FETCHING:()=>Ve,FILES_TOGGLE_SELECT_ALL:()=>Xe,FILE_CREATED:()=>Yt,FILE_DELETED:()=>Kt,FILE_INFO_DONE:()=>bt,FILE_INFO_DONE_WITH_DIRECTORY:()=>xt,FILE_INFO_ERROR:()=>wt,FILE_INFO_START:()=>yt,FILE_MOVED_IN:()=>Mt,FILE_MOVED_OUT:()=>jt,FILE_RENAMED:()=>as,FILE_UPDATED:()=>Gt,FIND_NEXT_VIDEO_ERROR:()=>Ts,FIND_NEXT_VIDEO_START:()=>Is,FIND_NEXT_VIDEO_SUCCESS:()=>ks,FetchSubtitles:()=>ft,FileCreated:()=>Wt,FileDeleted:()=>Jt,FileInfo:()=>St,FileMoved:()=>Dt,FileUpdated:()=>Bt,FilesStartFetching:()=>Ue,FilesStopFetching:()=>Ye,FindNextAudio:()=>Fs,FindNextVideo:()=>As,GET_SUBTITLES_DONE:()=>gt,GET_SUBTITLES_ERROR:()=>mt,GET_SUBTITLES_START:()=>
107ht,GO_TO_NEXT_VIDEO:()=>Ns,GetSelectedFiles:()=>We,HandleInfiniteLoad:()=>Et,LEAVE_FILES_ROUTE:()=>Os,MOVE_ALL_FILES:()=>Ot,MOVE_FILES:()=>Nt,MediaTimeChanged:()=>ps,Move:()=>Pt,MoveAll:()=>Lt,NEXT_AUDIO_FOUND:()=>Zs,OnConvertToMp4:()=>Ds,OnDelete:()=>os,OnDeleteFile:()=>is,OnDownloadFolder:()=>Vs,OnExtract:()=>Cs,OnGetDownloadLinks:()=>js,OnLeaveFilesRoute:()=>Ls,OnMove:()=>zt,OnMoveFile:()=>Zt,OnMoveThisFile:()=>Ft,OnNextVideo:()=>Ps,OnPlayAudio:()=>zs,OnPlayNextAudio:()=>Us,OnPublicShare:()=>hs,OnRssFeed:()=>Ut,OnSetWatchStatus:()=>qt,OnSetWatchStatusBulk:()=>Qt,OnShare:()=>_s,OnSort:()=>Vt,OnZip:()=>Rs,PAGINATION_ERROR:()=>Tt,PAGINATION_START:()=>It,PAGINATION_SUCCESS:()=>kt,Paginate:()=>At,RESET_FILE_POSITIONS:()=>ut,RefetchCurrentFile:()=>vt,Rename:()=>cs,RenameSuccess:()=>ls,SAVE_AS_MP4_ERROR:()=>fs,SAVE_AS_MP4_START:()=>gs,SAVE_AS_MP4_SUCCESS:()=>ms,SELECT_FILE:()=>He,SELECT_FILES:()=>Be,SET_FILE_WATCH_STATUS:()=>$t,SET_STARTFROM:()=>ds,SORT_FILES_ON_CLIENT:()=>tt,SaveAsMp4:()=>ys,SelectFile:()=>$e,SetStartFrom:()=>us,ShowNoFilesSelectedError:()=>Ge,SortOnClient:()=>st,StartConvertTask:()=>ot,ToggleSelectAll:()=>et,UNSELECT_ALL:()=>Ke,UNSELECT_FILE:()=>qe,UPDATE_FILE_POSITION:()=>pt,UPLOAD_SUBTITLE_ERROR:()=>Ss,UPLOAD_SUBTITLE_PROGRESS:()=>xs,UPLOAD_SUBTITLE_START:()=>bs,UPLOAD_SUBTITLE_SUCCESS:()=>ws,UnselectAll:()=>Je,UnselectFile:()=>Qe,UpdateFilePosition:()=>_t,UploadSubtitle:()=>vs,confirmAndDeleteSkippedFiles:()=>es,fetchSharedFolder:()=>Hs}),s(36728);var r=s(50586),n=s(16661),i=s(1593),o=s(42476),a=s(80452),l=s(70067),c=s(4099),d=s(62822),u=s(43079),p=s(49024),_=s(32315),h=s(70028),g=s(2784),m=s(75289),f=s(55522),y=s(51382),b=s(52322);const x=e=>{let{result:t}=e;return(0,b.jsx)(m.xu,{children:t.errors.map(((e,s)=>{const r=(0,y.ZN)({data:e});return(0,b.jsxs)(m.xu,{sx:{borderBottomColor:"line",borderBottomStyle:"solid",borderBottomWidth:s===t.errors.length-1?0:1,paddingY:3},children:[(0,b.jsx)(m.__,{children:(0,b.jsx)(f.e,{href:`https://put.io/files/${e.id}`,sx:{display:"inline-block"},children:e.name?e.name:`put.io/files/${e.id}`})}),(0,b.jsxs)(m.xv,{children:[r.message,r.message.endsWith(".")?" ":". ",r.recoverySuggestion.description]})]},e.id)}))})},w=async e=>new h.u_({component:x,name:"move-files-result-modal",size:h.u_.SIZES.NORMAL,title:"We couldn't move those files"}).Show(e);var S=s(60714),v=s(79244),I=s(53591),k=(s(43673),s(40753),s(28399),s(42975)),T=s(98355),A=s(2754),E=s(37892),M=s(94085),j=s(9950),D=s(40238),C=s(85125);const R=["all","audio","video","mp4"],N=e=>`${e.name} (${(0,A.Gj)(e.size)})`,P=e=>{switch(e){case"all":return(0,T.I)("files_rssmodal_all_label");case"audio":return(0,T.I)("files_rssmodal_audio_label");case"video":return(0,T.I)("files_rssmodal_video_label");case"mp4":return(0,T.I)("files_rssmodal_mp4_label");default:return e}},O=e=>{let{files:t}=e;const s=(0,k.E)(),[r,n]=(0,g.useState)("video"),i=(0,E.h)({queries:t.map((e=>({queryFn:async()=>{const{data:t}=await s.get("/podcast/links",{params:{parent_id:e.id,type:r}});return{file_id:e.id,...t}},queryKey:["rss-links",e.id,r]})))});if((0,g.useMemo)((()=>i.some((e=>e.isLoading))),[i]))return(0,b.jsx)(M.c,{count:t.length});const o=1===t.length?2:3,a=t.length>=4;return(0,b.jsxs)(m.rj,{gap:o,children:[(0,b.jsx)(C.Z,{onSelect:e=>n(e),options:R.map((e=>({label:P(e),value:e}))),value:r}),(0,b.jsx)(j.x,{offsetScrollbars:a,style:{height:a?360:"auto",paddingRight:a?4:0},children:(0,b.jsx)(m.rj,{gap:o,children:i.map((e=>e.data)).filter((e=>!!e)).map((e=>{const{file_id:s,links:r,token:n}=e,i=t.find((e=>e.id===s));return(0,b.jsxs)(m.xu,{children:[t.length>1&&i&&(0,b.jsx)(m.__,{children:N(i)}),(0,b.jsx)(m.xu,{children:Object.entries(r).map((e=>{let[t,s]=e;const r=new URL(s);return r.searchParams.set("oauth_token",n),[t,r.toString()]})).map((e=>{let[t,s]=e;return(0,b.jsx)(m.xu,{my:1,children:(0,b.jsx)(D.p,{value:s})},t)}))})]},s)}))})})]})},L=e=>{let{files:t}=e;return new h.u_({component:O,name:"rss-from-files-modal",size:h.u_.SIZES.SMALL,title:1===t.length?(0,T.I)("files_rssfeed_title_for_file",N(t[0])):(0,T.I)("files_rssfeed_title")}).Show({files:t})};var Z=s(15097),F=s(85386),z=s(27623),U=s(6899),V=s(78102),Y=s(44286),W=s(13980),G=s.n(W),H=s(94927),B=s(10231
107);const $=e=>{let{component:t="div",getItemKey:s,hasMore:r=!1,isLoading:n=!1,itemHeight:i,items:o,loadMore:a,loadMoreThreshold:l=0,overscan:c=5,renderItem:d,testId:u}=e;const p=(0,g.useRef)(null),_=(0,H.MG)({count:o.length,estimateSize:()=>i,getScrollElement:()=>p.current,overscan:c});return(0,B.M)(_,{dataKey:o,hasMore:Boolean(a)&&r,isLoading:n,loadMore:a??Y.Z,loadedCount:o.length,threshold:l}),(0,b.jsx)(t,{"data-testid":u,ref:p,children:(0,b.jsx)("div",{style:{height:_.getTotalSize(),position:"relative",width:"100%"},children:_.getVirtualItems().map((e=>{const t=o[e.index];return(0,b.jsx)("div",{"data-index":e.index,style:{height:e.size,left:0,position:"absolute",top:0,transform:`translateY(${e.start}px)`,width:"100%"},children:d(t,e.index)},s?s(t,e.index):e.key)}))})})};var q=s(18756),Q=s(38571),K=s(57671),J=s(85365);const X=J.Z.div`
108  margin: 0px 0;
109`,ee=J.Z.div`
110  display: flex;
111  align-items: center;
112  border-bottom: 1px solid;
113  border-color: ${e=>{let{theme:t}=e;return t.colors.line}};
114`,te=J.Z.span`
115  padding: 0 10px;
116  font-size: var(--fontSize-1);
117  display: block;
118  overflow: hidden;
119  text-overflow: ellipsis;
120  white-space: nowrap;
121`,se=e=>{let{data:t,style:s}=e;return(0,b.jsx)(ee,{style:s,children:(0,b.jsx)(te,{children:t.name})})};se.propTypes={data:G().object.isRequired,style:G().object};const re=se,ne=J.Z.div`
122  line-height: 1;
123  position: relative;
124`,ie=(0,J.Z)(ne)``,oe=(0,J.Z)(ne)`
125  min-height: 25vh;
126  max-height: 33vh;
127  overflow-y: auto;
128  overflow-x: hidden;
129
130  @media (max-width: 480px) {
131    max-height: 25vh;
132  }
133`;J.Z.a``;class ae extends g.PureComponent{static Show(){let{files:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new h.u_({content:function(){return(0,b.jsx)(ae,{files:e,onCancel:()=>this.Destroy("cancel"),onSelect:()=>this.Destroy(null)})},name:"deleteFilesInfoModalWithoutCursor",title:c.ZP.files_delete_confirm_modal_title(e.length,e.length)}).Show()}render(){const{files:e,onCancel:t,onSelect:s}=this.props;return(0,b.jsxs)(ne,{children:[(0,b.jsx)(ie,{children:(0,b.jsx)($,{component:oe,getItemKey:e=>e.id,itemHeight:44,items:e,renderItem:e=>(0,b.jsx)(re,{data:e}),testId:"delete-files-info-list"})}),(0,b.jsxs)(Q.Z,{sx:{mt:3},children:[(0,b.jsx)(K.Z,{children:(0,b.jsx)(q.z,{onClick:s,variant:"danger",children:c.ZP.files_move_to_trash_skip_confirmation_confirm()})}),(0,b.jsx)(K.Z,{children:(0,b.jsx)(q.z,{"data-autofocus":!0,onClick:t,children:c.ZP.app_confirm_dialog_cancel()})})]})]})}}ae.propTypes={files:G().array,onCancel:G().func.isRequired,onSelect:G().func.isRequired},ae.defaultProps={files:[]};const le=ae;var ce=s(18361),de=s(1030),ue=s(64907),pe=s.n(ue),_e=s(33611);const he=()=>{const e=pe()(4,8),t=[];for(let s=0;s<=e;s+=1)t.push((0,b.jsx)(ee,{style:{cursor:"initial"},children:(0,b.jsx)(te,{children:(0,b.jsx)(_e.O,{style:{height:18,marginLeft:8,width:pe()(50,300)}})})},s));return(0,b.jsx)(X,{children:t})};class ge extends g.PureComponent{filterExcludedFiles=e=>e.filter((e=>!this.props.excludeIds.includes(e.id)));onLoadMore=async()=>{const{cursor:e,fetching:t}=this.state;if(!t&&e){this.setState({fetching:!0});try{const{data:{cursor:t,files:s}}=await p.Z.Files.Continue(e,{perPage:this.state.perPage});this.setState((e=>({cursor:t,error:!1,fetching:!1,files:[...e.files,...this.filterExcludedFiles(s)],resolved:!0})),(()=>{0===this.state.files.length&&this.state.cursor&&this.onLoadMore()}))}catch(e){this.setState({error:e,fetching:!1,resolved:!0})}}};constructor(e){super(e),this.state={cursor:e.cursor,error:!1,fetching:!1,files:this.filterExcludedFiles(e.firstBatch),perPage:50,resolved:!0}}componentDidMount(){0===this.state.files.length&&this.onLoadMore()}static Show(){let{cursor:e=null,excludeIds:t=[],firstBatch:s=[],total:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new h.u_({content:function(){return(0,b.jsx)(ge,{cursor:e,excludeIds:t,firstBatch:s,onCancel:()=>this.Destroy("cancel"),onSelect:()=>this.Destroy(null),total:r})},name:"deleteFilesInfoModalWithCursor",title:c.ZP.files_delete_confirm_modal_title(r-t.length,r-t.length)}).Show()}render(){const{cursor:e,error:t,fetching:s,files:r,perPage:n,resolved:i}=this.state,{onCancel:o,onSelect:a}=this.props;return(0,b.jsxs)(ne,{children:[(0,b.jsxs)(ie,{children:[(0,b.jsx)(ce.f,{dialog:!0,visible:i&&s}),t&&(0,b.jsx)(de.u,{error:(0,_.j)(t,(0,l.W)({triggers:{goBack:(0,y.sX)(this.props.onCancel)}})),variant:"overlay"}),i?(0,b.jsx)($,{component:oe,getItemKey:e=>e.id,hasMore:Boolean(e),isLoading:s,itemHeight:44,items:r,loadMore:this.onLoadMore,loadMoreThreshold:n/2,renderItem:e=>(0,b.jsx)(re,{data:e}),testId:"delete-files-info-list"}):(0,b.jsx)(oe,{children:(0,b.jsx)(he,{})})]}),(0,b.jsxs)(Q.Z,{sx:{mt:3},children:[(0,b.jsx)(K.Z,{children:(0,b.jsx)(q.z,{disabled:!i,onClick:a,variant:"danger",children:c.ZP.files_move_to_trash_skip_confirmation_confirm()})}),(0,b.jsx)(K.Z,{children:(0,b.jsx)(q.z,{"data-autofocus":!0,onClick:o,children:c.ZP.app_confirm_dialog_cancel()})})]})]})}}ge.propTypes={cursor:G().string,excludeIds:G().array,firstBatch:G().array,onCancel:G().func.isRequired,onSelect:G().func.isRequired,total:G().number.isRequired},ge.defaultProps={cursor:null,excludeIds:[],firstBatch:[]};const me=ge;var fe=s(36628),ye=s(86794);const be=J.Z.ul`
134  margin: 0px 0;
135`,xe=J.Z.li`
136  display: flex;
137  align-items: center;
138  border-bottom: 1px solid;
139  border-color: ${e=>{let{theme:t}=e;return t.colors.line}};
140  padding: 16px ${10}px;
141
142  @media (max-width: 480px) {
143    padding: 14px ${10}px;
144  }
145`,we=J.Z.i`
146  font-size: 18px;
147  color: #fdce45;
148`,Se=J.Z.span`
149  margin: 0 ${10}px;
150  padding-bottom: 2px;
151
152  @media (max-width: 480px) {
153    display: block;
154    overflow: hidden;
155    text-overflow: ellipsis;
156    white-space: nowrap;
157  }
158`,ve=e=>{let{data:t}=e;return(0,b.jsxs)(xe,{id:`SkipTrashInfo-ListItem-${t.id}`,children:[(0,b.jsx)(we,{className:"flaticon solid open-folder-3"}),(0,b.jsx)(Se,{children:t.name})]})};ve.propTypes={data:G().object.isRequired};const Ie=ve,ke=()=>{const e=pe()(4,8),t=[];for(let s=0;s<=e;s+=1)t.push((0,b.jsxs)(xe,{style:{cursor:"initial"},children:[(0,b.jsx)(we,{className:"flaticon solid open-folder-3"}),(0,b.jsx)(Se,{children:(0,b.jsx)(_e.O,{sx:{height:18,marginLeft:8,width:pe()(50,300)}})})]},s));return(0,b.jsx)(be,{children:t})},Te=J.Z.div`
159  line-height: 1;
160  position: relative;
161`,Ae=J.Z.div`
162  border-bottom: 1px solid;
163  border-color: ${e=>{let{theme:t}=e;return t.colors.line}};
164  display: flex;
165  align-items: center;
166  justify-content: space-between;
167
168  @media (max-width: 480px) {
169    padding-top: 10px;
170  }
171`,Ee=(0,J.Z)(Te)``,Me=(0,J.Z)(Te)`
172  min-height: 25vh;
173  max-height: 33vh;
174  overflow-y: auto;
175  overflow-x: hidden;
176
177  @media (max-width: 480px) {
178    max-height: 25vh;
179  }
180`,je=(J.Z.a``,J.Z.div`
181  padding: 20px;
182  background-color: ${e=>{let{theme:t}=e;return t.colors["red-solid"]}};
183  color: white;
184  border-radius: 4px;
185  margin-bottom: 20px;
186  flex: 1;
187`);class De extends g.PureComponent{onLoadMore=()=>{const{cursor:e,fetching:t,resolved:s}=this.state;!t&&s&&e&&this.onFetchCursor(e)};onFetchCursor=async e=>{this.setState({fetching:!0});try{const{data:{cursor:t,files:s}}=await p.Z.Files.Continue(e,{perPage:this.state.perPage});this.setState((e=>({cursor:t,error:!1,fetching:!1,files:[...e.files,...s],resolved:!0})),(()=>{0===this.state.files.length&&this.onLoadMore()}))}catch(e){this.setState({error:e,fetching:!1,resolved:!0})}};constructor(){super(),this.state={cursor:"",error:!1,fetching:!1,files:[],perPage:10,resolved:!1}}static Show(){let{cursor:e="",skippedCount:t=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new h.u_({content:function(){return(0,b.jsx)(De,{cursor:e,onCancel:()=>this.Destroy("cancel"),onSelect:()=>this.Destroy(null),skippedCount:t})},name:"skipTrashInfoModal",title:c.ZP.files_move_to_trash_skip_confirmation_title()}).Show()}componentDidMount(){this.onFetchCursor(this.props.cursor)}render(){const{cursor:e,error:t,fetching:s,files:r,perPage:n,resolved:i}=this.state,{onCancel:o,onSelect:a,skippedCount:d}=this.props;return(0,b.jsxs)(Te,{children:[(0,b.jsx)(Ae,{children:(0,b.jsx)(je,{children:(0,b.jsx)("p",{children:(0,b.jsx)(ye.G,{children:c.ZP.files_move_to_trash_skip_confirmation(d,d)})})})}),(0,b.jsxs)(Ee,{children:[(0,b.jsx)(ce.f,{dialog:!0,visible:i&&s}),t&&(0,b.jsx)(de.u,{error:(0,_.j)(t,(0,l.W)({triggers:{goBack:(0,y.sX)(this.props.onCancel)}})),variant:"overlay"}),i?(0,b.jsx)($,{component:Me,getItemKey:e=>e.id,hasMore:Boolean(e),isLoading:s,itemHeight:53,items:r,loadMore:this.onLoadMore,loadMoreThreshold:n,renderItem:e=>(0,b.jsx)(Ie,{data:e}),testId:"skip-trash-info-list"}):(0,b.jsx)(Me,{children:(0,b.jsx)(ke,{})})]}),(0,b.jsxs)(Q.Z,{sx:{mt:3},children:[(0,b.jsx)(K.Z,{children:(0,b.jsx)(q.z,{disabled:!i,onClick:a,variant:"danger",children:c.ZP.files_move_to_trash_skip_confirmation_confirm()})}),(0,b.jsx)(K.Z,{children:(0,b.jsx)(q.z,{"data-autofocus":!0,onClick:o,children:c.ZP.app_confirm_dialog_cancel()})})]})]})}}
187De.propTypes={cursor:G().string.isRequired,onCancel:G().func.isRequired,onSelect:G().func.isRequired,skippedCount:G().number.isRequired};const Ce=De;var Re=s(57842),Ne=s(42485),Pe=s(54819);const Oe=new U.fK.Entity("files"),Le=new U.fK.Array(Oe),Ze=new U.fK.Entity("extractions"),Fe=new U.fK.Array(Ze),ze="FILES_START_FETCHING";function Ue(){return{type:ze}}const Ve="FILES_STOP_FETCHING";function Ye(){return{type:Ve}}function We(){let{allowRoot:e,fallbackToCurrentFile:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(s,r)=>{let n="";const i=r().getIn(["files","allSelected"]),o=r().getIn(["files","showingAll"]),a=r().getIn(["files","cursor"]),l=r().getIn(["files","excludeIds"]).toJS(),d=i&&!o&&!!a,u=r().getIn(["files","file"]);let p=[],_=!1,h=!1;if(d)n=r().getIn(["files","total"])-l.length+" files";else{const s=(r().getIn(["files","children","entities","files"])||(0,z.aV)()).filter((e=>e.get("selected")));if(!s.size){if(t){const t=0===u.get("id");return e||!t?(n=u.get("name"),p=[u.get("id")],h=!0,{currentFile:u,ids:p,isCurrentFile:h,label:n}):(_=!0,{err:_})}return _=!0,{err:_}}p=s.map((e=>e.get("id"))).toList().toJS(),n=p.length>1?c.ZP.files_selected_label(p.length-1,p.length-1,s.first().get("name")):s.first().get("name")}return{allSelected:i,currentFile:u,cursor:d?a:null,err:_,excludeIds:l,ids:p,isCurrentFile:h,label:n}}}function Ge(){return()=>{u.Z.Show({message:c.ZP.files_error_nofileselected(),type:u.Z.TYPE.ERROR})}}const He="SELECT_FILE",Be="SELECT_FILES";function $e(e,t){return(s,r)=>{if(t){const t=r().getIn(["files","lastSelectedFile"]),n=r().getIn(["files","children","result"]),i=[e.get("id")];let o=!1;for(const s of n)o&&i.push(s),s===t&&(o=!o),s===e.get("id")&&(o=!o);for(const e of i)e&&s({file:r().getIn(["files","children","entities","files",e.toString()]),type:He})}return s({file:e,type:He})}}const qe="UNSELECT_FILE";function Qe(e){return{file:e,type:qe}}const Ke="UNSELECT_ALL";function Je(){return e=>{e({type:Ke})}}const Xe="FILES_TOGGLE_SELECT_ALL";function et(){return e=>{e({type:Xe})}}const tt="SORT_FILES_ON_CLIENT";function st(){return(e,t)=>{const s=t().getIn(["files","file"]),r=s?s.get("sort_by")??"DATE_DESC":"DATE_DESC",[n,i]=r.toLowerCase().split("_");let o=t().getIn(["files","children","result"]).sortBy((e=>{const s=t().getIn(["files","children","entities","files",e.toString()]);switch(n){case"name":return s.get("name").toLowerCase();case"size":return s.get("size");case"type":return s.get("file_type");case"watch":return s.get("first_accessed_at");default:return s.get("created_at")}}));"desc"===i&&(o=o.reverse()),e({ids:o,type:tt})}}const rt="CONVERT_FILE_START",nt="CONVERT_FILE_START_SUCCESS",it="CONVERT_FILE_START_FAILURE";function ot(e){return t=>{t({fileId:e.id.toString(),type:rt}),p.Z.File.ConvertToMp4(e.id).then((()=>t({fileId:e.id.toString(),type:nt}))).catch((s=>{t({err:s.data?.error_type?s.data:(0,z.D5)(),fileId:e.id.toString(),type:it})}))}}const at="CONVERT_FILE_UPDATE",lt="CONVERT_FILE_SUCCESS",ct="CONVERT_FILE_ERROR";function dt(e,t){return(s,r)=>{if("ERROR"===e.status)return s({fileId:e.id.toString(),type:ct});const n="COMPLETED"===e.status,i=r().getIn(["files","file"]);return n&&i.get("id")===e.id&&!i.get("can_play")&&s(t(e.id)),s({fileId:e.id.toString(),type:n?lt:at,...e})}}const ut="RESET_FILE_POSITIONS",pt="UPDATE_FILE_POSITION";function _t(e,t){return{id:e,position:t,type:pt}}const ht="GET_SUBTITLES_START",gt="GET_SUBTITLES_DONE",mt="GET_SUBTITLES_ERROR";function ft(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(t,s)=>{if(s().getIn(["app","currentUser","settings","hide_subtitles"]))return t({subtitles:[],type:gt});t({fileId:e,type:ht}),p.Z.File.Subtitles(e).then((e=>{t({subtitles:d.Z.FormatSubtitleLinks(e.body.subtitles,e.body.default),type:gt})})).catch((s=>{t({err:s,fileId:e,type:mt})}))}}const yt="FILE_INFO_START",bt="FILE_INFO_DONE",xt="FILE_INFO_DONE_WITH_DIRECTORY",wt="FILE_INFO_ERROR";function St(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(t,s)=>{t({fileId:e,type:yt});const r=s().getIn(["files","file"]),n=Number(e)===r.get("id");if(n||t(Je()),!n&&r.get("id")){const e={x:window.scrollX,y:window.scrollY};t(_t(r.get("id"),e))}0===e&&t({type:ut});const i=s().getIn(["files","positions",e.toString()]),l=i?i.get("limit"):s().getIn(["files","pagination","limit"]);p.Z.Files.Query(e,{breadcrumbs:!0,codecsParent:!0,mediaInfoParent:!0,mp4StatusParent:!0,mp4StreamUrlParent:!0,perPage:l,streamUrlParent:!0,total:!0,videoMetadataParent:!0}).then((e=>{const{parent:r}=e.body,i=d.Z.FormatBreadcrumbs(e.body.breadcrumbs);0===r.id&&(r.name=c.ZP.files_rootdir_name());let u=0,p=0;switch((0,o.T)(r)){case"folder":{const r=e.body.files.map((e=>(e.selectable="SHARED_ROOT"!==e.folder_type,e))),n=r.length?(0,U.Fv)(r,Le):{entities:{files:{}},result:[]};t({breadcrumbs:i,children:n,cursor:e.body.cursor,file:e.body.parent,total:e.body.total,type:xt});const o=s().getIn(["files","positions",e.body.parent.id.toString()]);o?(u=o.get("x")||0,p=o.get("y")||0):t(_t(e.body.parent.id,{limit:l}));break}case"video":{const r=e.body.parent;r.can_play_original=(0,a.C)(r,r.media_info).result,r.can_play=r.can_play_original||r.is_mp4_available,t({breadcrumbs:i,file:r,type:bt}),r.can_play||t(ot(r));const o=s().getIn(["tasks","tasks"]).find((e=>"continue_watching"===e.get("type")));o&&t(Pe.CancelTask(o.get("id"))),s().getIn(["app","currentUser","settings","next_episode"])&&
187!n&&t(As()),t(ft(r.id));break}default:t({breadcrumbs:i,file:e.body.parent,type:bt})}n||window.scrollTo(u,p)})).catch((s=>{t({error:s,fileId:e,type:wt})}))}}function vt(){return(e,t)=>{e(St(t().getIn(["files","file","id"])))}}const It="PAGINATION_START",kt="PAGINATION_SUCCESS",Tt="PAGINATION_ERROR";function At(){return(e,t)=>{e({type:It});const s=t().getIn(["files","file"]),r=t().getIn(["files","pagination","limit"]),n=t().getIn(["files","pagination","cursor"]),i=t().getIn(["files","allSelected"]),o=t().getIn(["files","positions",s.get("id").toString()]),a=o?o.update("limit",(e=>e+r)):(0,z.d0)({limit:r});p.Z.Files.Continue(n,{limit:r}).then((t=>{const r=t.body.files.map((e=>(e.selectable="SHARED_ROOT"!==e.folder_type,e.selected=i&&e.selectable,e))),n=(0,U.Fv)(r,Le);return e({children:n,cursor:t.body.cursor,id:s.get("id"),position:a,type:kt})})).catch((()=>{e({type:Tt})}))}}function Et(){return(e,t)=>{t().getIn(["files","pagination","cursor"])&&e(At())}}const Mt="FILE_MOVED_IN",jt="FILE_MOVED_OUT";function Dt(e){return(t,s)=>{const r=s().getIn(["files","file","id"])||0;return r===e.old_parent_id?t({file:e,ids:[e.id],type:jt}):r===e.parent_id?(t({file:e,ids:[e.id],type:Mt}),t(st())):void 0}}function Ct(e){return t=>{t(vt());const{errors:s}=e.data;if(Array.isArray(s)&&s.length)return w({result:e.data});u.Z.Show({message:c.ZP.files_move_success_message(),type:u.Z.TYPE.SUCCESS})}}function Rt(e){return()=>{const t=(0,y.ZN)(e);u.Z.Show(t)}}const Nt="MOVE_FILES";function Pt(e,t){return async s=>{s(Ue());try{const r=await p.Z.Files.Move(e,t);s(Je()),s({ids:e,type:Nt}),s(Ct(r))}catch(e){s(Rt(e))}finally{s(Ye())}}}const Ot="MOVE_ALL_FILES";function Lt(e){let{cursor:t,excludeIds:s,newParentId:r}=e;return async e=>{e(Ue());try{const n=await p.Z.Files.MoveAll({cursor:t,excludeIds:s,to:r});e(Je()),e({cursor:t,excludeIds:s,newParentId:r,type:Ot}),e(Ct(n))}catch(t){e(Rt(t))}finally{e(Ye())}}}function Zt(e){let{parent_id:t=0,id:s,name:r}=e;return e=>{fe.Z.Show({actionLabel:"Move Here",currentParentId:t,intent:"move",movingFileIds:[s],title:`Move "${r}"`}).then((t=>{let{id:r}=t;return e(Pt([s],r))}))}}function Ft(){return(e,t)=>e(Zt(t().getIn(["files","file"]).toJS()))}function zt(){return(e,t)=>{const{cursor:s,err:r,excludeIds:n,ids:i,isCurrentFile:o}=e(We({fallbackToCurrentFile:!0}));return o?e(Ft()):r?e(Ge()):void fe.Z.Show({actionLabel:"Move Here",currentParentId:t().getIn(["files","file","id"]),intent:"move",movingFileIds:i,title:i.length?`Move ${i.length} file(s)`:"Move files"}).then((t=>{let{id:r}=t;return e(s?Lt({cursor:s,excludeIds:n,newParentId:r}):Pt(i,r))}))}}function Ut(){return(e,t)=>{const{allSelected:s,cursor:r,excludeIds:n,ids:i,isCurrentFile:o}=e(We({allowRoot:!0,fallbackToCurrentFile:!0}));let a;return a=s&&!n.length||s&&r||o?(0,z.d0)([t().getIn(["files","file"])]):t().getIn(["files","children","entities","files"]).toList().filter((e=>i.includes(e.get("id")))).filter((e=>"FOLDER"===e.get("file_type"))).toList(),L({files:a.toJS()})}}function Vt(e){return async(t,s)=>{t(Ue());try{const r=s().getIn(["files","file","id"]);await p.Z.post("/files/set-sort-by",{data:{file_id:r,sort_by:e}}),t(vt())}catch(e){const t=(0,_.j)(e);u.Z.Show(t)}finally{t(Ye())}}}const Yt="FILE_CREATED";function Wt(e){return(t,s)=>{t({file:e,type:Yt}),s().getIn(["files","file","id"])===e.parent_id&&t(st())}}const Gt="FILE_UPDATED",Ht="CURRENT_FILE_UPDATED";function Bt(e){return(t,s)=>{const r=s().getIn(["files","file","id"])||0,n=s().getIn(["files","children","result"])||[];return r===e.id?t({file:e,type:Ht}):n.includes(e.id)?t({file:e,type:Gt}):void 0}}const $t="SET_FILE_WATCH_STATUS";function qt(){return(e,t)=>{const s=t().getIn(["files","file"]),r=s.get("start_from")>0;p.Z.Files.SetWatchStatus({ids:[s.get("id")],watched:!r}).then((()=>{e({status:!r,type:$t}),u.Z.Show({message:c.ZP.files_update_watch_status_success(),type:u.Z.TYPE.SUCCESS})})).catch((e=>{const t=(0,_.j)(e,[l.p]);u.Z.Show(t)}))}}function Qt(e){return t=>{const{cursor:s,err:r,excludeIds:n,ids:i}=t(We());if(r)return t(Ge());p.Z.Files.SetWatchStatus({cursor:s,excludeIds:n,ids:i,watched:e}).then((()=>{t(vt()),u.Z.Show({message:c.ZP.files_update_watch_status_success(),type:u.Z.TYPE.SUCCESS})})).catch((e=>{const t=(0,_.j)(e,[l.p]);u.Z.Show(t)}))}}const Kt="FILE_DELETED";function Jt(e){return(t,s)=>{s().getIn(["files","children","result"]).includes(e.id)&&t({file:e,ids:[e.
187id],type:Kt})}}function Xt(e){let{partialDeleted:t=!1}=e;return(e,s)=>{const r=s().getIn(["app","currentUser","settings","trash_enabled"]);t||u.Z.Show({message:r?c.ZP.files_move_to_trash_success():c.ZP.files_delete_success(),type:u.Z.TYPE.SUCCESS})}}async function es(e){let{cursor:t,skippedCount:s}=e;try{await Ce.Show({cursor:t,skippedCount:s})}catch{return}await p.Z.Files.DeleteAll(t,[],{skipTrash:!0})}const ts="DELETE_FILES";function ss(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async s=>{s(Ue());try{const r=await p.Z.Files.Delete(e,{partialDelete:!0}),{cursor:n,skipped:i}=r.data;i&&await es({cursor:n,skippedCount:i});const o=i>0;s(Je()),s(Xt({partialDeleted:o})),t.currentFile?s((0,V.gx)(`/files/${t.currentFile.get("parent_id")??0}`)):s(vt())}catch(e){u.Z.Show((0,y.ng)(e))}finally{s(Ye())}}}const rs="DELETE_ALL_FILES";function ns(e){let{cursor:t,excludeIds:s}=e;return async e=>{e(Ue());try{const r=await p.Z.Files.DeleteAll(t,s,{partialDelete:!0}),{cursor:n,skipped:i}=r.body;i&&await es({cursor:n,skippedCount:i});const o=i>0;e(Je()),e(Xt({partialDeleted:o})),e(vt())}catch(e){u.Z.Show((0,y.ng)(e))}finally{e(Ye())}}}function is(e){return async(t,s)=>s().getIn(["app","currentUser","settings","trash_enabled"])?t(ss([e.id],{currentFile:(0,z.d0)(e)})):Re.Z.Show({actionLabel:"Delete",isDangerous:!0,message:c.ZP.files_delete_confirm_file_name(e.name)}).then((()=>t(ss([e.id],{currentFile:(0,z.d0)(e)})))).catch((()=>null))}function os(){return async(e,t)=>{const s=t().getIn(["app","currentUser","settings","trash_enabled"]),{currentFile:r,cursor:n,excludeIds:i,ids:o,isCurrentFile:a}=e(We({fallbackToCurrentFile:!0}));if(!s){if(a||1===o.length){const s=a?r:t().getIn(["files","children","entities","files",o[0].toString()]);return Re.Z.Show({actionLabel:"Delete",isDangerous:!0,message:c.ZP.files_delete_confirm_file_name(s.get("name"))}).then((()=>e(ss(o,{currentFile:a?r:null})))).catch((()=>null))}let s;if(n){s=t().getIn(["files","children","entities","files"])||(0,z.aV)(),s=s.filter((e=>e.get("selected")&&!i.includes(e.get("id")))).toList().toJS();const e=t().getIn(["files","total"]);try{await me.Show({cursor:n,excludeIds:i,firstBatch:s,total:e})}catch{return}}else{s=t().getIn(["files","children","entities","files"])||(0,z.aV)(),s=s.filter((e=>e.get("selected")&&o.includes(e.get("id")))).toList().toJS();try{await le.Show({files:s})}catch{return}}}if(n)return e(ns({cursor:n,excludeIds:i}));e(ss(o)),a&&e(V.JM.replace(`/files/${r.get("parent_id")}`))}}const as="FILE_RENAMED";function ls(e){let{fileId:t,name:s}=e;return e=>{u.Z.Show({message:c.ZP.files_rename_success(),type:u.Z.TYPE.SUCCESS}),e({payload:{id:t,name:s},type:as})}}function cs(){return async(e,t)=>{const{isCurrentFile:s}=e(We({fallbackToCurrentFile:!0})),r=t().get("files"),n=s?r.get("file"):r.getIn(["children","entities","files"]).find((e=>e.get("selected")));try{const{name:t}=await(0,S.o)({file:{id:n.get("id"),name:n.get("name")}});e(ls({fileId:n.get("id"),name:t}))}catch{}}}const ds="SET_STARTFROM";function us(e,t,s){return r=>{r({time:t,timestamp:s,type:ds}),p.Z.File.SetStartFrom(e,t).then((()=>{0===t&&u.Z.Show({message:c.ZP.files_reset_startfrom_success_message(),type:u.Z.TYPE.SUCCESS})})).catch((e=>e))}}function ps(e,t){return(s,r)=>{if(!r().getIn(["app","currentUser","settings","use_start_from"])||t<=10)return;const n=Date.now(),i=r().getIn(["files","lastSetStartFromTimestamp"]);t>0&&n-i>=1e4&&s(us(e.get("id"),t,n))}}function _s(){return e=>{const t=e(We({fallbackToCurrentFile:!0})),{currentFile:s,cursor:r,err:n,excludeIds:i,ids:o,isCurrentFile:a,label:l}=t;return n?e(Ge()):a?(0,Z.p)({file:{id:s.get("id"),name:s.get("name")}}):1===o.length?(0,Z.p)({file:{id:o[0],name:l}}):void(0,F.f)({cursor:r,excludeIds:i,ids:o,title:l})}}function hs(){return async e=>{const t=e(We({fallbackToCurrentFile:!0})),{currentFile:s,ids:r,isCurrentFile:n}=t,i=n?{id:s.get("id")}:{id:r[0]};e(Ue());try{const e=await p.Z.post(`/public_share/${i.id}`);(0,v.B)({data:e.data.public_share})}catch(e){u.Z.Show((0,I.T)(e))}finally{e(Ye())}}}const gs="SAVE_AS_MP4_START",ms="SAVE_AS_MP4_SUCCESS",fs="SAVE_AS_MP4_ERROR";function ys(e){return(t,s)=>{t({id:e,type:gs}),p.Z.File.SaveAsMp4(e).then((()=>{t({id:e,type:ms}),s().getIn(["files","file"]).get("is_shared")?u.Z.Show({message:c.ZP.files_saveasmp4_inroot_success_message(),type:u.Z.TYPE.SUCCESS}):u.Z.Show({message:c.ZP.files_saveasmp4_incurrent_success_message(),type:u.Z.TYPE.SUCCESS})})).catch((s=>{const r=(0,_.j)(s,[{kind:"api_error_type",localize:()=>({message:c.ZP.payment_activate_account_error(),recoverySuggestion:{description:c.ZP.payment_activate_account_error_description(),type:"instruction"}}),type:"PaymentRequired"}]);u.Z.Show(r),t({err:s,id:e,type:fs})}))}}const bs="UPLOAD_SUBTITLE_START",xs="UPLOAD_SUBTITLE_PROGRESS",ws="UPLOAD_SUBTITLE_SUCCESS",Ss="UPLOAD_SUBTITLE_ERROR";function vs(e){return(t,s)=>{if(!(0,n.s)(e))return u.Z.Show({message:c.ZP.upload_size_error(),type:u.Z.TYPE.ERROR});const i=s().getIn(["files","file","parent_id"]),o=s().getIn(["files","file","name"]);t({file:e,to:i,type:bs});const a=r.h.upload({authToken:p.Z.token,file:e,overridenFileName:`${o.slice(0,o.lastIndexOf("."))}.srt`,targetFolderId:i});a.emitter.on("progress",(s=>{t({file:e,progress:s,to:i,type:xs})})),a.emitter.on("complete",(()=>{t({file:e,to:i,type:ws}),t(St(s().getIn(["files","file","id"]))),u.Z.Show({message:c.ZP.files_upload_subtitle_success_message(),type:u.Z.TYPE.SUCCESS})})),a.emitter.on("error",(s=>{t({error:s,file:e,to:i,type:Ss}),u.Z.Show(s)}))}}const Is="FIND_NEXT_VIDEO_START",ks="FIND_NEXT_VIDEO_SUCCESS",Ts="FIND_NEXT_VIDEO_ERROR";function As(){return async(e,t)=>{e({type:Is});try{const s=(await p.Z.File.FindNextFile(t().getIn(["files","file"]).get("id"),"VIDEO")).data.next_file.id,r=await p.Z.Files.Query(s,{breadcrumbs:!0,codecsParent:!0,mediaInfoParent:!0,mp4StatusParent:!0,mp4StreamUrlParent:!0,streamUrlParent:!0,total:!0,videoMetadataParent:!0}),n={breadcrumbs:d.Z.FormatBreadcrumbs(r.data.breadcrumbs),file:{...r.data.parent,start_from:0},subtitles:[]};if(n.file.can_play_original=(0,a.C)(n.file,n.file.media_info).result,n.file.can_play=n.file.can_play_original||n.file.is_mp4_available,!t().getIn(["app","currentUser","settings","hide_subtitles"])){const e=await p.Z.File.Subtitles(s);n.subtitles=d.Z.FormatSubtitleLinks(e.data.subtitles,e.data.default)}e({nextVideo:n,type:ks})}catch{e({type:Ts})}}}function Es(e){return(t,s)=>{s().getIn(["files","file"]).get("id")===e&&t(St(e))}}function Ms(){return(e,t)=>{const s=t().getIn(["files","file"]),r=!["SHARED_FRIEND","SHARED_ROOT"].includes(s.get("folder_type")),{cursor:n,err:i,excludeIds:o,ids:a,label:l}=e(We({fallbackToCurrentFile:r}));if(i)return e(Ge());fe.Z.Show({actionLabel:"Copy Here",intent:"copy",title:c.ZP.task_shared_file_clone_location_selector(l)}).then((async t=>{let{id:s}=t;e(Pe.AddTask({payload:{cursor:n,excludeIds:o,ids:a,label:l,parentId:s},status:Ne.Z.STATUS.RUNNING,task:"shared_file_clone"}))}))}}function js(){return e=>
187{const{cursor:t,err:s,excludeIds:r,ids:n,label:i}=e(We({fallbackToCurrentFile:!0}));return e(s?Ge():Pe.AddTask({payload:{cursor:t,excludeIds:r,ids:n,label:i},status:Ne.Z.STATUS.RUNNING,task:"download_links"}))}}function Ds(){return async e=>{const{cursor:t,err:s,excludeIds:r,ids:n}=e(We({fallbackToCurrentFile:!1}));if(s)return e(Ge());e(Ue());let i="",o="";try{const{data:e}=await p.Z.Files.ConvertToMp4({cursor:t,excludeIds:r,ids:n});i=c.ZP.files_convert_bulk_success(),o=u.Z.TYPE.SUCCESS,0===e.count&&(i=c.ZP.files_convert_bulk_no_mp4())}catch(e){o=u.Z.TYPE.ERROR,i="TooManyConversions"===e.error_type?c.ZP.files_convert_bulk_failure_limit(e.data.extra.limit):c.ZP.generic_error_message()}u.Z.Show({message:i,type:o}),e(Ye())}}function Cs(){return e=>{const{cursor:t,err:s,excludeIds:r,ids:n}=e(We());if(s)return e(Ge());e(Ue());const i=t=>{const s=(0,_.j)(t,[{kind:"generic",localize:()=>({message:c.ZP.files_error_extraction(),recoverySuggestion:{description:"",type:"instruction"}})}]);u.Z.Show(s),e(Ye())};p.Z.Files.Extract({cursor:t,excludeIds:r,ids:n}).then((t=>{let{extractions:s}=t.body;if(!s.length)return i();s=(0,U.Fv)(s,Fe),e(Ye()),e(Pe.AddTask({payload:{extractions:s},status:Ne.Z.STATUS.RUNNING,task:"extract"}))})).catch(i)}}function Rs(){return e=>{const{cursor:t,err:s,excludeIds:r,ids:n,label:i}=e(We({fallbackToCurrentFile:!0}));return e(s?Ge():Pe.AddTask({payload:{cursor:t,excludeIds:r,ids:n,label:i},status:Ne.Z.STATUS.RUNNING,task:"zip"}))}}const Ns="GO_TO_NEXT_VIDEO";function Ps(e){let{autoPlay:t}=e;return(e,s)=>{const r=s().getIn(["files","nextVideo"]);if(!r)return;const n=s().get("routing").locationBeforeTransitions.query.popup;let i=`/files/${r.getIn(["file","id"])}?autostart=${t?1:0}`;n&&(i=`${i}&popup=1`),e((0,V.gx)(i)),e({nextVideo:r,type:Ns}),r.getIn(["file","can_play"])||e(ot(r.get("file").toJS())),e(As())}}const Os="LEAVE_FILES_ROUTE";function Ls(e){return t=>{t({type:Os}),"video"===(0,o.T)(e.toJS())&&e.get("start_from")&&t(Pe.AddTask({payload:{file:e},task:"continue_watching"}))}}const Zs="NEXT_AUDIO_FOUND";function Fs(e){return t=>{p.Z.File.FindNextFile(e,"AUDIO").then((e=>{t({file:e.body.next_file,type:Zs})})).catch(Y.Z)}}function zs(e){return t=>{t(Pe.AddTask({payload:{file:e},task:"audio_player"})),(0,i.m6)("autoplay_next_video")&&t(Fs(e.get("id")))}}function Us(e){return(t,s)=>{const r=s().getIn(["files","nextAudio"]);r&&e.get("id")!==r.get("id")&&t(zs(r))}}function Vs(e){let{id:t,label:s}=e;return e=>e(Pe.AddTask({payload:{ids:[t],label:s},status:Ne.Z.STATUS.RUNNING,task:"zip"}))}const Ys="FETCH_SHARED_FOLDER_REQUEST",Ws="FETCH_SHARED_FOLDER_SUCCESS",Gs="FETCH_SHARED_FOLDER_FAILURE";function Hs(e){return async t=>{t({type:Ys,username:e});try{const{data:{file:s}}=await p.Z.Friends.SharedFolder(e);if(t({file:s,type:Ws}),!s||!s.id)throw new y.qy;t(St(s.id))}catch(e){t({error:e,type:Gs})}}}},17653:(e,t,s)=>{"use strict";s.d(t,{Z:()=>_}),s(36728);var r=s(75289),n=s(18756),i=s(4099),o=s(27623),a=s(13980),l=s.n(a),c=s(2784),d=s(59177),u=s(52322);class p extends c.PureComponent{render(){let e=i.ZP.files_convert_waiting_label(),t=i.ZP.files_convert_status_label();if(this.props.data){const s=this.props.data.get("status"),r=this.props.data.get("err");if(r)t=null,e=402===r.get("status_code")?i.ZP.generic_error_402_message():"File is not a video file"===r.get("error_message")?i.ZP.files_convert_error_notavideofile():i.ZP.files_convert_error_label();else switch(s){case"IN_QUEUE":e=i.ZP.files_convert_inqueue_label();break;case"CONVERTING":e=`${this.props.data.get("percent_done")??0}%`;break;case"COMPLETED":e=i.ZP.files_convert_done_label();break;case"ERROR":e=i.ZP.files_convert_error_label();break;default:e=i.ZP.files_convert_waiting_label()}}return(0,u.jsx)("div",{className:"file-convert-status",style:{backgroundImage:`url(${this.props.bg})`},children:(0,u.jsxs)("div",{className:"file-convert-message",children:[i.ZP.files_convert_message(),(0,u.jsxs)("div",{className:"convert-status-container",children:[(0,u.jsx)("span",{className:"file-convert-message-text convert-status-label",children:t}),(0,u.jsx)("span",{className:"file-convert-message-text convert-status",children:e})]}),(0,u.jsx)(r.xu,{sx:{mt:[2,3]},children:(0,u.jsx)(n.z,{onClick:()=>this.props.router.push("/media-conversions"),size:"sm",variant:"primary",children:"View all active conversions"})})]})})}}p.propTypes={bg:l().string.isRequired,data:l().instanceOf(o.D5),router:l().shape({push:l().func.isRequired}).isRequired},p.defaultProps={data:null};const _=(0,d.EN)(p)},16970:(e,t,s)=>{"use strict";var r={};s.r(r),s.d(r,{DELETE_SEARCH_FILES_START:()=>ye,ExtractionsSchema:()=>H,FILES_SEARCH_TOGGLE_SELECT_ALL:()=>xe,FILE_SEARCH_FAILURE:()=>ae,FILE_SEARCH_REQUEST:()=>ie,FILE_SEARCH_SUCCESS:()=>oe,GetSelectedSearchFiles:()=>K,OnDelete:()=>be,OnExtract:()=>Ee,OnGetDownloadLinks:()=>Se,OnMove:()=>Ie,OnRename:()=>Ae,OnShare:()=>ke,OnZip:()=>ve,PAGINATION_FAILURE:()=>me,PAGINATION_REQUEST:()=>he,PAGINATION_SUCCESS:()=>ge,Paginate:()=>fe,SEARCH_FILE_RENAMED:()=>Te,SEARCH_SET_PHRASE:()=>ue,SEARCH_SET_SOURCE_PAGE_PATH:()=>pe,SEARCH_START_FETCHING:()=>B,SEARCH_STOP_FETCHING:()=>q,SELECT_FILE:()=>J,SELECT_FILES:()=>X,SearchFiles:()=>le,SelectFile:()=>ee,SetPhrase:()=>_e,ToggleSearchSelectAll:()=>we,UNSELECT_ALL_FILES_SEARCH:()=>re,UNSELECT_FILE_FILES_SEARCH:()=>te,UnselectFile:()=>se});var n={};s.r(n),s.d(n,{CANCEL_ERROR:()=>qe,CANCEL_START:()=>Be,CANCEL_SUCCESS:()=>$e,CHANGE_TRANSFERS_SORTING:()=>rt,CLEAR_FINISHED_TRANSFERS_ERROR:()=>We,CLEAR_FINISHED_TRANSFERS_START:()=>Ve,CLEAR_FINISHED_TRANSFERS_SUCCESS:()=>Ye,CancelTransfers:()=>Qe,ChangeSorting:()=>nt,ClearFinishedTransfers:()=>Ge,GET_TRANSFERS_ERROR:()=>tt,GET_TRANSFERS_START:()=>Xe,GET_TRANSFERS_SUCCESS:()=>et,GetTransfers:()=>st,OnStopRecording:()=>
187kt,REANNOUNCE_ERROR:()=>vt,REANNOUNCE_START:()=>wt,REANNOUNCE_SUCCESS:()=>St,REMOVE_ERROR:()=>gt,REMOVE_START:()=>_t,REMOVE_SUCCESS:()=>ht,RETRY_ERROR:()=>bt,RETRY_START:()=>ft,RETRY_SUCCESS:()=>yt,Reannounce:()=>It,RemoveTransfers:()=>mt,Retry:()=>xt,SELECT_TRANSFER:()=>at,SORT_TRANSFERS:()=>Ke,SelectTransfer:()=>lt,TOGGLE_SELECT_ALL:()=>it,TRANSFER_CREATED:()=>Oe,TRANSFER_DELETED:()=>ze,TRANSFER_UPDATED:()=>Ze,ToggleSelectAll:()=>ot,TransferCreated:()=>Le,TransferDeleted:()=>Ue,TransferUpdated:()=>Fe,UNSELECT_ALL_TRANSFERS:()=>ut,UNSELECT_TRANSFER:()=>ct,UnselectAllTransfers:()=>pt,UnselectTransfer:()=>dt});var i={};s.r(i),s.d(i,{DELETE_TRASH_FILES_FAILURE:()=>qt,DELETE_TRASH_FILES_REQUEST:()=>Bt,DELETE_TRASH_FILES_SUCCESS:()=>$t,EMPTY_TRASH_FAILURE:()=>Xt,EMPTY_TRASH_REQUEST:()=>Kt,EMPTY_TRASH_SUCCESS:()=>Jt,GET_TRASH_FILES_FAILURE:()=>Dt,GET_TRASH_FILES_REQUEST:()=>Mt,GET_TRASH_FILES_SUCCESS:()=>jt,GetSelectedTrashFiles:()=>Vt,GetTrashFiles:()=>Ct,OnDelete:()=>Qt,OnEmpty:()=>es,OnRestore:()=>Ht,PAGINATE_TRASH_FAILURE:()=>Pt,PAGINATE_TRASH_REQUEST:()=>Rt,PAGINATE_TRASH_SUCCESS:()=>Nt,PaginateTrashFiles:()=>Ot,RESTORE_TRASH_FILES_FAILURE:()=>Gt,RESTORE_TRASH_FILES_REQUEST:()=>Yt,RESTORE_TRASH_FILES_SUCCESS:()=>Wt,SELECT_TRASH_FILE:()=>Lt,TRASH_FILES_TOGGLE_SELECT_ALL:()=>zt,ToggleFileSelect:()=>Ft,ToggleSelectAll:()=>Ut,UNSELECT_TRASH_FILE:()=>Zt}),s(24408);var o=s(2784),a=s(40568),l=s(29604);const c="@@putio/error/SET_ERROR",d=e=>t=>s=>{try{return t(s)}catch(t){e.dispatch({payload:t,type:c})}};var u=s(27623),p=s(59177),_=s(78102),h=s(76070),g=s(43292),m=s(26713),f=s(92421);const y=()=>(0,u.d0)({currentUser:null,isMobile:window.innerWidth<=960,lastTransferCount:0,ready:!1});s(36728);var b=s(4099),x=s(56921),w=s(72282);const S=(0,u.d0)({error:!1,fetching:!1,info:{},resolved:!1});var v=s(15844);const I=(0,u.d0)({hasTrial:!1,intent:null,period:30,plans:[],resolved:!1,type:"subscription"});var k=s(28114),T=s(43079),A=s(49024),E=s(32315),M=s(60714),j=s(15097),D=s(85386),C=s(80594),R=s.n(C),N=s(6899),P=s(44286),O=s(36628),L=s(57842),Z=s(42485),F=s(54819),z=s(2754);class U extends z.iC{constructor(e){super(`"${e}" is not a valid magnet URI.`),this.phrase=e}}class V extends z.iC{constructor(e){super(`"${e}" is not a valid URL.`),this.phrase=e}}const Y=new N.fK.Entity("files"),W=new N.fK.Array(Y),G=new N.fK.Entity("extractions"),H=new N.fK.Array(G),B="SEARCH_START_FETCHING";function $(){return{type:B}}const q="SEARCH_STOP_FETCHING";function Q(){return{type:q}}function K(){return(e,t)=>t().getIn(["search","files","entities","files"]).filter((e=>e.get("selected"))).map((e=>e.get("id"))).toList().toJS()}const J="SELECT_SEARCH_FILE",X="SELECT_SEARCH_FILES";function ee(e,t){return(s,r)=>{if(t){const t=r().getIn(["search","lastSelectedFile"]),n=r().getIn(["search","files","result"]),i=[];let o=!1;for(const s of n)o&&i.push(s),s===t&&(o=!0),s===e.get("id")&&(o=!1);for(const e of i)s({file:r().getIn(["search","files","entities","files",e.toString()]),type:J})}s({file:e,type:J})}}const te="UNSELECT_FILE_FILES_SEARCH";function se(e){return{file:e,type:te}}const re="UNSELECT_ALL_FILES_SEARCH";function ne(){return{type:re}}const ie="FILE_SEARCH_REQUEST",oe="FILE_SEARCH_SUCCESS",ae="FILE_SEARCH_FAILURE";function le(e){return(t,s)=>{if(t(ne()),t({phrase:e,type:ie}),k.s.isMagnetURI(e))return t({error:new U(e),type:ae});t((0,_.gx)(`/search?phrase=${encodeURIComponent(e)}`));const r=s().getIn(["search","pagination","perPage"]);A.Z.Files.Search(e,{perPage:r}).then((s=>{const r=s.body.files.map((e=>({...e,selectable:!0})));if(0===s.body.total&&k.s.isURL(e))return t({error:new V(e),type:ae});t({cursor:s.body.cursor,files:(0,N.Fv)(r,W),phrase:e,total:s.body.total,type:oe})})).catch((s=>t({error:s,phrase:e,type:ae})))}}const ce=R()(((e,t)=>e(le(t))),200),de="/search",ue="SEARCH_SET_PHRASE",pe="SEARCH_SET_SOURCE_PAGE_PATH";function _e(e,t){let{source:s}=t;return(t,r)=>{if(e===r().getIn(["search","phrase"]))return;if(t({phrase:e,source:s,type:ue}),!e)return t(((e,t)=>{const s=t().getIn(["search","sourcePagePath"])||"/files";return e((0,_.VF)(s))}));const{pathname:n}=r().get("routing").locationBeforeTransitions;n!==de&&(t({path:n,type:pe}),t((0,_.VF)(de))),e!==r().getIn(["search","lastSearchedPhrase"])&&(t($()),ce(t,e))}}const he="SEARCH_PAGINATION_REQUEST",ge="SEARCH_PAGINATION_SUCCESS",me="SEARCH_PAGINATION_FAILURE";function fe(){return async(e,t)=>{const s=t().getIn(["search","pagination","cursor"]);if(!s)return;const r=t().getIn(["search","pagination","perPage"]),n=t().getIn(["search","allSelected"]);e({type:he});try{const{data:t}=await A.Z.Files.ContinueSearch(s,{perPage:r}),i=t.files.map((e=>({...e,selectable:!0,selected:n})));e({cursor:t.cursor,files:(0,N.Fv)(i,W),type:ge})}catch{e({type:me})}}}const ye="DELETE_SEARCH_FILES_START";function be(){return async(e,t)=>{const s=e(((e,t)=>t().getIn(["search","files","entities","files"]).filter((e=>e.get("selected"))).map((e=>e.get("id"))).toList().toJS()));if(!s.length)return T.Z.Show({message:b.ZP.files_error_nofileselected(),type:T.Z.TYPE.ERROR});const r=s.filter((e=>!t().getIn(["search","files","entities","files",e.toString(),"is_shared"])));let n=b.ZP.files_delete_confirm();if(r.length<s.length){if(!r.length)return T.Z.Show({message:b.ZP.files_delete_no_permission_error(),type:T.Z.TYPE.ERROR});n=b.ZP.files_delete_no_permission_partial_error(r.length.toString(),s.length.toString())}try{await L.Z.Show({actionLabel:"Delete",isDangerous:!0,message:n})}catch{return}e($());try{const s=await A.Z.Files.Delete(r,{ignoreFileOwner:!0,partialDelete:!0}),{cursor:n,skipped:i}=s.body;
187i&&await(0,x.confirmAndDeleteSkippedFiles)({cursor:n,skippedCount:i});const o=i>0;e(ne()),e(Q()),e(le(t().getIn(["search","phrase"]))),o||T.Z.Show({message:b.ZP.files_delete_success(),type:T.Z.TYPE.SUCCESS})}catch{e(ne()),e(Q()),T.Z.Show({message:b.ZP.generic_error_message(),type:T.Z.TYPE.ERROR})}}}const xe="FILES_SEARCH_TOGGLE_SELECT_ALL";function we(){return{type:xe}}function Se(){return e=>{const t=e(((e,t)=>t().getIn(["search","files","entities","files"]).filter((e=>e.get("selected"))).map((e=>e.get("id"))).toList().toJS()));return t.length?e(F.AddTask({payload:{ids:t},status:Z.Z.STATUS.RUNNING,task:"download_links"})):T.Z.Show({message:b.ZP.files_error_nofileselected(),type:T.Z.TYPE.ERROR})}}function ve(){return(e,t)=>{const s=e(((e,t)=>t().getIn(["search","files","entities","files"]).filter((e=>e.get("selected"))).map((e=>e.get("id"))).toList().toJS()));return s.length?s.reduce(((e,s)=>e+(t().getIn(["search","files","entities","files",s.toString(),"size"])||0)),0)?void e(F.AddTask({payload:{ids:s},task:"zip"})):T.Z.Show({message:b.ZP.files_zip_zerobyte_error_message(),type:T.Z.TYPE.ERROR}):T.Z.Show({message:b.ZP.files_error_nofileselected(),type:T.Z.TYPE.ERROR})}}function Ie(){return async(e,t)=>{let s=e(((e,t)=>t().getIn(["search","files","entities","files"]).filter((e=>e.get("selected"))).map((e=>e.get("id"))).toList().toJS()));if(!s.length)return T.Z.Show({message:b.ZP.files_error_nofileselected(),type:T.Z.TYPE.ERROR});const r=s.filter((e=>!t().getIn(["search","files","entities","files",e.toString(),"is_shared"])));if(r.length<s.length){if(!r.length)return T.Z.Show({message:b.ZP.files_move_no_permission_error(),type:T.Z.TYPE.ERROR});try{await L.Z.Show({message:b.ZP.files_move_no_permission_partial_error(r.length.toString(),s.length.toString())}),s=r}catch(e){return e}}O.Z.Show({actionLabel:"Move Here",intent:"move",movingFileIds:s,title:`Move ${s.length} file(s)`}).then((t=>{e(ne()),A.Z.Files.Move(s,t.id).then((()=>{T.Z.Show({message:b.ZP.files_move_success_message(),type:T.Z.TYPE.SUCCESS})})).catch(P.Z)}))}}function ke(){return async(e,t)=>{let s=e(((e,t)=>t().getIn(["search","files","entities","files"]).filter((e=>e.get("selected"))).map((e=>e.get("id"))).toList().toJS()));if(!s.length)return T.Z.Show({message:b.ZP.files_error_nofileselected(),type:T.Z.TYPE.ERROR});const r=s.filter((e=>!t().getIn(["search","files","entities","files",e.toString(),"is_shared"])));if(r.length<s.length){if(!r.length)return T.Z.Show({message:b.ZP.files_share_no_permission_error(),type:T.Z.TYPE.ERROR});try{await L.Z.Show({message:b.ZP.files_share_no_permission_partial_error(r.length.toString(),s.length.toString())}),s=r}catch(e){return e}}if(1===s.length){const[e]=s,r=t().getIn(["search","files","entities","files",e.toString()]);return(0,j.p)({file:{id:e,name:r.get("name")}})}(0,D.f)({ids:s,title:`${s.length} file(s)`})}}const Te="SEARCH_FILE_RENAMED";function Ae(){return async(e,t)=>{const s=t().getIn(["search","files","entities","files"]).find((e=>e.get("selected")));try{const{name:t}=await(0,M.o)({file:{id:s.get("id"),name:s.get("name")}});T.Z.Show({message:b.ZP.files_rename_success(),type:T.Z.TYPE.SUCCESS}),e({payload:{id:s.get("id"),name:t},type:Te})}catch{}}}function Ee(){return(e,t)=>{let s=e(((e,t)=>t().getIn(["search","files","entities","files"]).filter((e=>e.get("selected"))).map((e=>e.get("id"))).toList().toJS()));if(!s.length)return T.Z.Show({message:b.ZP.files_error_nofileselected(),type:T.Z.TYPE.ERROR});const r=s.filter((e=>!t().getIn(["search","files","entities","files",e.toString(),"is_shared"])));if(r.length<s.length){if(!r.length)return T.Z.Show({message:b.ZP.files_move_no_permission_error(),type:T.Z.TYPE.ERROR});s=r}const n=e=>{const t=(0,E.j)(e,[{kind:"generic",localize:()=>({message:b.ZP.files_error_extraction(),recoverySuggestion:{description:"",type:"instruction"}})}]);T.Z.Show(t)};A.Z.Files.Extract({ids:s}).then((t=>{let{extractions:s}=t.body;if(!s.length)return n();s=(0,N.Fv)(s,H),e(F.AddTask({payload:{extractions:s},status:Z.Z.STATUS.RUNNING,task:"extract"}))})).catch(n)}}const Me=(0,u.d0)({actions:[{enabled:e=>{let{selectedFiles:t}=e;return 1===t.size&&!t.toList().getIn([0,"is_shared"])},icon:"flaticon solid pencil-1",id:"Your_Files-Actions-Rename",label:b.ZP.files_menu_rename_label,value:"rename"},{enabled:e=>{let{selectedFiles:t}=e;return t.size>0},icon:"flaticon stroke trash-2",label:b.ZP.files_menu_delete_label,value:"delete"},{enabled:e=>{let{selectedFiles:t}=e;return t.size>0},icon:"flaticon stroke position-1",label:b.ZP.files_menu_move_label,value:"move"},{enabled:e=>{let{selectedFiles:t}=e;return t.size>0},icon:"flaticon stroke download-1",label:b.ZP.files_menu_zipdownload_label,value:"zip"},{enabled:e=>{let{selectedFiles:t}=e;return t.size>0},icon:"flaticon solid share-3",label:b.ZP.files_menu_share_label,value:"share"},{enabled:e=>{let{selectedFiles:t}=e;return t.size>0},icon:"flaticon stroke cloud-download-1",label:b.ZP.files_menu_downloadlinks_label,value:"links"},{enabled:e=>{let{selectedFiles:t}=e;return t.filter((e=>"ARCHIVE"===e.get("file_type")||"FOLDER"===e.get("file_type"))).size>0},icon:"flaticon solid upload-inbox-2",label:b.ZP.files_menu_extractall_label,value:"extractall"}],allSelected:!1,error:null,fetching:!1,files:{entities:(0,u.D5)(),result:(0,u.aV)()},lastSearchedPhrase:"",pagination:{cursor:null,fetching:!1,perPage:50},phrase:"",resolved:!1,sourcePagePath:"",total:0}),je=(0,u.d0)({folded:!1,tasks:{}}),De=e=>"COMPLETED"!==e.status;function Ce(e,t){switch(t){case"name":return e.get("name").toLowerCase();case"eta":return e.get("estimated_time");case"datauploaded":return e.get("uploaded");case"datadownloaded":return e.get("downloaded");case"status":return e.get("status");case"peer":return e.get("peers_connected");case"ratio":return e.get("current_ratio");
187default:return new Date((0,z.mN)(e.get("created_at"))).getTime()}}const Re=(e,t)=>u.D5.isMap(e)&&u.D5.isMap(t)?e.mergeWith(Re,t):t,Ne=new N.fK.Entity("transfers"),Pe=new N.fK.Array(Ne),Oe="TRANSFER_CREATED";function Le(e){return t=>{e.selectable=De(e),t({transfer:e,type:Oe}),t(Je())}}const Ze="TRANSFER_UPDATED";function Fe(e){return(t,s)=>{const r=s().getIn(["transfers","transfers","entities","transfers",e.id.toString()]);if(!r)return;const n=Re(r,(0,u.d0)(e)),i=n.set("selectable",De(n.toJS()));t({transfer:i,type:Ze});const o=s().getIn(["transfers","sort","options",s().getIn(["transfers","sort","selected"]),"value"]);Ce(r,o)!==Ce(i,o)&&t(Je())}}const ze="TRANSFER_DELETED";function Ue(e){return{transfer:e,type:ze}}const Ve="CLEAR_FINISHED_TRANSFERS_START",Ye="CLEAR_FINISHED_TRANSFERS_SUCCESS",We="CLEAR_FINISHED_TRANSFERS_ERROR";function Ge(){return e=>{e({type:Ve}),A.Z.Transfers.ClearAll().then((t=>{e({ids:t.body.deleted_ids,type:Ye})})).catch((()=>{e({type:We})}))}}function He(){return()=>{T.Z.Show({message:b.ZP.transfers_error_notranferselected(),type:T.Z.TYPE.ERROR})}}const Be="CANCEL_START",$e="CANCEL_SUCCESS",qe="CANCEL_ERROR";function Qe(){return e=>{const{err:t,ids:s,items:r}=e(((e,t)=>{let s=[],r=!1;const n=t().getIn(["transfers","transfers","entities","transfers"]).filter((e=>e.get("selectable")&&e.get("selected")));return n.size?(s=n.map((e=>e.get("id"))).toList().toJS(),{err:r,ids:s,items:n}):(r=!0,{err:r,ids:s})}));if(t)return e(He());let n=b.ZP.transfers_cancel_confirm_message(s.length,s.length);const i=r.filter((e=>"SEEDING"===e.get("status")));i.size&&(n=b.ZP.transfers_cancel_confirm_with_seeding(s.length,i.size,s.length)),L.Z.Show({actionLabel:b.ZP.transfers_cancel_confirm_action_label(),cancelLabel:b.ZP.transfers_cancel_cancel_action_label(),isDangerous:!0,message:n}).then((t=>{t&&(e({ids:s,type:Be}),e(pt()),A.Z.Transfers.Cancel(s).then((()=>{e({ids:s,type:$e})})).catch((()=>{e({ids:s,type:qe})})))}))}}const Ke="SORT_TRANSFERS";function Je(){return(e,t)=>{const s=t().getIn(["transfers","sort","options",t().getIn(["transfers","sort","selected"])]),r=s.get("value"),n=s.get("direction");let i=t().getIn(["transfers","transfers","result"]).sort(((e,s)=>{const n=t().getIn(["transfers","transfers","entities","transfers",e.toString()]),i=t().getIn(["transfers","transfers","entities","transfers",s.toString()]),o=Ce(n,r),a=Ce(i,r);return o<a?-1:o>a||n.get("id")<i.get("id")?1:-1}));"desc"===n&&(i=i.reverse()),e({ids:i,type:Ke})}}const Xe="GET_TRANSFERS_START",et="GET_TRANSFERS_SUCCESS",tt="GET_TRANSFERS_ERROR";function st(){return async(e,t)=>{e({type:Xe});try{const s=await A.Z.Transfers.Query(),r=Array.isArray(s.body?.transfers)?s.body.transfers:[],n=(0,N.Fv)(r,Pe);for(const e of n.result){const s=n.entities.transfers[e];s.selectable=De(s);const r=t().getIn(["transfers","transfers","entities","transfers",e.toString()]);r&&(s.selected=r.get("selected"))}e({transfers:n,type:et}),e(Je())}catch(t){e({error:t,type:tt})}}}const rt="CHANGE_TRANSFERS_SORTING";function nt(e){return async t=>{const s="asc"===e.get("direction")?"desc":"asc",r=e.get("value"),n=`${r}_${s}`.toUpperCase();t({by:r,direction:s,type:rt}),t(Je());try{await A.Z.Account.SaveSettings({transfer_sort_by:n})}catch{}}}const it="TOGGLE_SELECT_ALL";function ot(){return{type:it}}const at="SELECT_TRANSFER";function lt(e,t){return(s,r)=>{if(e=(0,u.d0)(e),t){const t=r().getIn(["transfers","lastSelectedTransfer"]),n=r().getIn(["transfers","transfers","result"]),i=[e.get("id")];let o=!1;for(const s of n)o&&i.push(s),s===t&&(o=!o),s===e.get("id")&&(o=!o);for(const e of i)s({transfer:r().getIn(["transfers","transfers","entities","transfers",e.toString()]),type:at})}s({transfer:e,type:at})}}const ct="UNSELECT_TRANSFER";function dt(e){return e=(0,u.d0)(e),t=>{t({transfer:e,type:ct})}}const ut="UNSELECT_ALL_TRANSFERS";function pt(){return e=>{e({type:ut})}}const _t="REMOVE_START",ht="REMOVE_SUCCESS",gt="REMOVE_ERROR";function mt(e){return Array.isArray(e)||(e=[e]),t=>{t({type:_t}),A.Z.Transfers.Cancel(e).then((()=>{t({ids:e,type:ht})})).catch((()=>{t({ids:e,type:gt})}))}}const ft="RETRY_START",yt="RETRY_SUCCESS",bt="RETRY_ERROR";function xt(e){return t=>{e=(0,u.d0)(e),t({transfer:e,type:ft}),T.Z.Show({message:b.ZP.transfers_retry_success_message(),type:T.Z.TYPE.SUCCESS}),A.Z.Transfers.Retry(e.get("id")).then((()=>{t({transfer:e,type:yt}),t(st())})).catch((s=>{t({transfer:e,type:bt});const r=(0,E.j)(s,[{kind:"api_status_code",localize:()=>({message:b.ZP.transfers_retry_error_message(),recoverySuggestion:{description:b.ZP.transfers_retry_error_not_error(),type:"instruction"}}),status_code:403},{kind:"generic",localize:()=>({message:b.ZP.transfers_retry_error_message(),recoverySuggestion:{description:b.ZP.generic_error_message(),type:"instruction"}})}]);T.Z.Show(r)}
187))}}const wt="REANNOUNCE_START",St="REANNOUNCE_SUCCESS",vt="REANNOUNCE_ERROR";function It(){return e=>{const{err:t,ids:s}=e(((e,t)=>{let s=[],r=!1;const n=t().getIn(["transfers","transfers","entities","transfers"]).filter((e=>e.get("selectable")&&e.get("selected")));return n.size?(s=n.map((e=>e.get("id"))).toList().toJS(),{err:r,ids:s,items:n}):(r=!0,{err:r,ids:s})}));if(t)return e(He());e({type:wt});const r=s.map((e=>A.Z.Transfers.Reannounce(e)));Promise.all(r).then((()=>{T.Z.Show({message:b.ZP.transfers_reannounce_success_message(),type:T.Z.TYPE.SUCCESS}),e({type:St})})).catch((t=>{const s=(0,E.j)(t,[{error_type:"NOT_TORRENT",kind:"api_error_type",localize:()=>({message:b.ZP.transfers_reannounce_error_not_torrent(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"TORRENT_NOT_ACTIVE",kind:"api_error_type",localize:()=>({message:b.ZP.transfers_reannounce_error_not_active(),recoverySuggestion:{description:"",type:"instruction"}})},{kind:"generic",localize:()=>({message:b.ZP.transfers_reannounce_error_message(),recoverySuggestion:{description:"",type:"instruction"}})}]);e({type:vt}),T.Z.Show(s)}))}}function kt(e){return t=>{e=(0,u.d0)(e),L.Z.Show({actionLabel:b.ZP.transfers_stop_recording_confirm_label(),cancelLabel:b.ZP.transfers_stop_recording_cancel_label(),isDangerous:!0,message:b.ZP.transfers_stop_recording_confirm_message(1,e.get("name"))}).then((async s=>{if(s)try{await A.Z.post("/transfers/stop-recording",{data:{transfer_id:e.get("id")}}),t(st())}catch(e){const t=(0,E.j)(e);T.Z.Show(t)}}))}}const Tt=[{error_type:"TRASH_FILE_NOT_FOUND",kind:"api_error_type",localize:()=>({message:(0,b.t)("trash_error_file_not_found"),recoverySuggestion:{description:(0,b.t)("trash_error_file_not_found_recovery_suggestion"),type:"instruction"}})},{error_type:"TRASH_LOCK_TIMEOUT",kind:"api_error_type",localize:()=>({message:(0,b.t)("trash_error_lock_timeout"),recoverySuggestion:{description:(0,b.t)("trash_error_generic_recovery_suggestion"),type:"instruction"}})},{error_type:"TRASH_INCOMPLETE_TRASH",kind:"api_error_type",localize:()=>({message:(0,b.t)("trash_error_still_in_progress"),recoverySuggestion:{description:(0,b.t)("trash_error_generic_recovery_suggestion"),type:"instruction"}})},{error_type:"TRASH_RESTORE_TOO_MANY_FILES",kind:"api_error_type",localize:e=>{const{limit:t}=e.data.extra;return{message:(0,b.t)("trash_error_restore_too_many_files",t),recoverySuggestion:{description:(0,b.t)("trash_error_restore_too_many_files_recovery_suggestion"),type:"instruction"}}}}],At=new N.fK.Entity("files"),Et=new N.fK.Array(At),Mt="GET_TRASH_FILES_REQUEST",jt="GET_TRASH_FILES_SUCCESS",Dt="GET_TRASH_FILES_FAILURE";function Ct(){return(e,t)=>{const s=t().getIn(["trash","pagination","limit"]);e({type:Mt}),A.Z.Trash.List({limit:s}).then((t=>{const s=t.body.files.map((e=>({...e,selectable:!0})));e({cursor:t.body.cursor,files:(0,N.Fv)(s,Et),showingAll:t.body.files.length===t.body.total,total:t.body.total,trashSize:t.body.trash_size,type:jt})})).catch((t=>{const s=(0,E.j)(t);e({error:s,type:Dt})}))}}const Rt="PAGINATE_TRASH_REQUEST",Nt="PAGINATE_TRASH_SUCCESS",Pt="PAGINATE_TRASH_FAILURE";function Ot(){return(e,t)=>{const s=t().getIn(["trash","pagination","cursor"]);if(!s)return;e({type:Rt});const r=t().getIn(["trash","pagination","limit"]),n=t().getIn(["trash","allSelected"]);A.Z.Trash.Continue(s,{limit:r}).then((t=>{const s=t.body.files.map((e=>(e.selectable=!0,e.selected=n&&e.selectable,e)));return e({cursor:t.body.cursor,files:(0,N.Fv)(s,Et),type:Nt})})).catch((()=>{e({type:Pt})}))}}const Lt="SELECT_TRASH_FILE",Zt="UNSELECT_TRASH_FILE";function Ft(e,t,s){return(r,n)=>{if(!t)return r({fileId:e,type:Zt});if(s.nativeEvent.shiftKey){const t=n().getIn(["trash","lastSelectedFile"]),s=n().getIn(["trash","files","result"]),i=[e];let o=!1;for(const r of s)o&&i.push(r),r===t&&(o=!o),r===e&&(o=!o);for(const e of i)r({fileId:e,type:Lt})}else r({fileId:e,type:Lt})}}const zt="TRASH_FILES_TOGGLE_SELECT_ALL";function Ut(){return{isSelected:arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,type:zt}}function Vt(){return(e,t)=>{const s=t().getIn(["trash","allSelected"]),r=t().getIn(["trash","showingAll"]),n=t().getIn(["trash","pagination","cursor"]),i=s&&!r&&!!n;let o=[];
187return i||(o=(t().getIn(["trash","files","entities","files"])||(0,u.aV)()).filter((e=>e.get("selected"))).map((e=>e.get("id"))).toList().toJS()),{cursor:n,ids:o,useCursor:i}}}const Yt="RESTORE_TRASH_FILES_REQUEST",Wt="RESTORE_TRASH_FILES_SUCCESS",Gt="RESTORE_TRASH_FILES_FAILURE";function Ht(){return e=>{const{cursor:t,ids:s,useCursor:r}=e(Vt());e({type:Yt}),e(Ut(!1)),A.Z.Trash.Restore({cursor:t,ids:s,useCursor:r}).then((()=>{T.Z.Show({message:b.ZP.trash_restore_started_message(),timeout:5,title:b.ZP.trash_restore_started_title(),type:T.Z.TYPE.SUCCESS}),e({type:Wt})})).catch((t=>{e({type:Gt}),T.Z.Show((0,E.j)(t,Tt))}))}}const Bt="DELETE_TRASH_FILES_REQUEST",$t="DELETE_TRASH_FILES_SUCCESS",qt="DELETE_TRASH_FILES_FAILURE";function Qt(){return e=>{const{cursor:t,ids:s,useCursor:r}=e(Vt());return L.Z.Show({actionLabel:"Delete",isDangerous:!0,message:b.ZP.trash_action_confirm()}).then((()=>{e({type:Bt}),e(Ut(!1)),A.Z.Trash.Delete({cursor:t,ids:s,useCursor:r}).then((()=>{e({type:$t}),e(Ct()),T.Z.Show({message:b.ZP.trash_delete_success(),type:T.Z.TYPE.SUCCESS})})).catch((t=>{e({type:qt}),T.Z.Show((0,E.j)(t,Tt))}))}))}}const Kt="EMPTY_TRASH_REQUEST",Jt="EMPTY_TRASH_SUCCESS",Xt="EMPTY_TRASH_FAILURE";function es(){return e=>{L.Z.Show({actionLabel:"Delete",isDangerous:!0,message:b.ZP.trash_action_confirm()}).then((()=>{e({type:Kt}),A.Z.Trash.Empty().then((()=>{e({type:Jt}),T.Z.Show({message:b.ZP.trash_delete_success(),type:T.Z.TYPE.SUCCESS})})).catch((t=>{e({type:Xt}),T.Z.Show((0,E.j)(t,Tt))}))}))}}const ts=(0,u.d0)({allSelected:!1,error:null,fetching:!1,files:{entities:(0,u.D5)(),result:(0,u.aV)()},lastSelectedFile:null,pagination:{cursor:null,fetching:!1,limit:50},resolved:!1,showingAll:!1,total:0,trashSize:0}),ss=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.D5;const s=Object.keys(e);return function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t(),n=arguments.length>1?arguments[1]:void 0;return r.withMutations((t=>{s.forEach((s=>{const r=e[s](t.get(s),n);if(void 0===r)throw new Error(`Reducer "${s}" returned undefined when handling "${n.type}" action. To ignore an action, you must explicitly return the previous state.`);t.set(s,r)}))}))}}({app:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y(),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f.Ld:return y();case f.Df:return(0,m.X$)(t.user),e.set("ready",!0).set("error",null).set("currentUser",(0,u.d0)(t.user));case f.hO:{if(!e.get("currentUser"))return e;const s=e.get("currentUser").mergeDeep((0,u.d0)(t.user)).set("warnings",t.user.warnings||e.getIn(["currentUser","warnings"])).toJS(),r=t.user.settings?.subtitle_languages;return r&&(s.settings.subtitle_languages=r),(0,m.X$)(s),e.set("currentUser",(0,u.d0)(s))}case f.sQ:return e.set("isMobile",t.width<=960);default:return e}},error:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return t.type===c?t.payload:e},files:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,u.d0)({actions:[{enabled:e=>{let{selectedFiles:t}=e;return 0===t.size},icon:"flaticon solid add-folder-1",id:"Your_Files-Actions-New_Folder",label:b.ZP.files_menu_newfolder_label,value:"newfolder"},{enabled:e=>{let{selectedFiles:t}=e;return 1===t.size},icon:"flaticon solid pencil-1",id:"Your_Files-Actions-Rename",label:b.ZP.files_menu_rename_label,value:"rename"},{enabled:e=>{let{currentFile:t,selectedFiles:s}=e;return 0!==t.get("id")||s.size>0},icon:"flaticon stroke trash-2",id:"Your_Files-Actions-Remove",label:b.ZP.files_menu_delete_label,value:"delete"},{enabled:e=>{let{currentFile:t,selectedFiles:s}=e;return 0!==t.get("id")||s.size>0},icon:"flaticon stroke position-1",id:"Your_Files-Actions-Move",label:b.ZP.files_menu_move_label,value:"move"},{enabled:e=>{let{cursor:t,selectedFiles:s}=e;return s.filter((e=>"ARCHIVE"===e.get("file_type")||"FOLDER"===e.get("file_type"))).size>0||t},icon:"flaticon solid upload-inbox-2",id:"Your_Files-Actions-Extract_All",label:b.ZP.files_menu_extractall_label,value:"extractall"},{enabled:e=>{let{currentFile:t,selectedFiles:s}=e;return 0!==t.get("id")||s.size>0},icon:"flaticon stroke download-1",id:"Your_Files-Actions-Zip_&_Download",label:b.ZP.files_menu_zipdownload_label,value:"zip"},{enabled:e=>{let{selectedFiles:t}=e;return 0===t.size||t.filter((e=>"FOLDER"===e.get("file_type"))).size>0}
187,icon:"flaticon solid rss-1",id:"Your_Files-Actions-Rss_Feed",label:b.ZP.files_menu_rssfeed_label,value:"rss"},{enabled:e=>{let{cursor:t,selectedFiles:s}=e;return s.size>0||t},icon:"flaticon stroke cloud-download-1",id:"Your_Files-Actions-Download_Links",label:b.ZP.files_menu_downloadlinks_label,value:"links"},{enabled:e=>{let{cursor:t,selectedFiles:s}=e;return s.filter((e=>"VIDEO"===e.get("file_type")||"FOLDER"===e.get("file_type"))).size>0||t},icon:"flaticon stroke repeat-1",id:"Your_Files-Actions-Convert_to_Mp4",label:b.ZP.files_menu_convert_label,value:"convert-to-mp4"},{enabled:()=>!0,icon:"flaticon stroke play-1",id:"Your_Files-Actions-VLC_Playlist",label:b.ZP.files_menu_vlc_label,value:"vlc"},{enabled:e=>{let{currentFile:t,cursor:s,selectedFiles:r}=e;return 0!==t.get("id")||r.size>0||s},icon:"flaticon solid share-3",id:"Your_Files-Actions-Share",label:b.ZP.files_menu_share_label,value:"share"},{enabled:e=>{let{currentFile:t,selectedFiles:s}=e;return 0===s.size?0!==t.get("id"):1===s.size},icon:"flaticon stroke share-1",id:"Your_Files-Actions-Public-Share",label:b.ZP.files_menu_public_share_label,value:"public-share"},{enabled:e=>{let{currentUser:t,cursor:s,selectedFiles:r}=e;return t.getIn(["settings","use_start_from"])&&(r.filter((e=>"VIDEO"===e.get("file_type"))).size>0||s)},icon:"flaticon stroke eye-1",id:"Your_Files-Actions-Watched",label:b.ZP.files_menu_mark_as_watched_label,value:"mark-as-watched"},{enabled:e=>{let{currentUser:t,cursor:s,selectedFiles:r}=e;return t.getIn(["settings","use_start_from"])&&(r.filter((e=>"VIDEO"===e.get("file_type"))).size>0||s)},icon:"flaticon stroke x-3",id:"Your_Files-Actions-Unwatched",label:b.ZP.files_menu_mark_as_unwatched_label,value:"mark-as-unwatched"}],allSelected:!1,breadcrumbs:(0,u.aV)(),children:{entities:(0,u.D5)(),result:(0,u.aV)()},convert:(0,u.D5)(),cursor:null,error:null,excludeIds:[],fetching:!1,fetchingSubtitles:!1,file:(0,u.D5)(),lastSeenFolder:null,lastSelectedFile:null,lastSetStartFromTimestamp:0,nextAudio:null,nextVideo:null,nextVideoResolved:!1,pagination:{cursor:null,fetching:!1,limit:50},positions:(0,u.D5)(),resolved:!1,showingAll:!1,subtitles:(0,u.aV)(),subtitlesResolved:!1,textContent:null,textContentResolved:!1,total:0,uploadingSubtitle:!1}),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _.nk:return e.set("error",null).set("links",{download:(0,u.aV)(),media:(0,u.aV)(),mp4:(0,u.aV)()});case x.FILES_START_FETCHING:return e.set("fetching",!0);case x.FILES_STOP_FETCHING:return e.set("fetching",!1);case f.hO:case f.Df:{const{settings:s}=t.user;if(!s)return e;if("trash_enabled"in s){const t=e.get("actions").findIndex((e=>"delete"===e.get("value"))),r=s.trash_enabled?b.ZP.files_menu_move_to_trash_label:b.ZP.files_menu_delete_label,n=s.trash_enabled?"flaticon stroke trash-2":"flaticon solid backspace-1";e=e.setIn(["actions",t,"icon"],n).setIn(["actions",t,"label"],r)}return e}case x.FIND_NEXT_VIDEO_START:return e.set("nextVideo",null).set("nextVideoResolved",!1);case x.FIND_NEXT_VIDEO_SUCCESS:return e.set("nextVideo",(0,u.d0)(t.nextVideo)).set("nextVideoResolved",!0);case x.FIND_NEXT_VIDEO_ERROR:return e.set("nextVideo",null).set("nextVideoResolved",!0);case x.GO_TO_NEXT_VIDEO:return e.set("breadcrumbs",t.nextVideo.get("breadcrumbs")).set("file",t.nextVideo.get("file")).set("subtitles",t.nextVideo.get("subtitles")).set("lastSetStartFromTimestamp",0);case x.SET_STARTFROM:return e.set("lastSetStartFromTimestamp",t.timestamp);case x.FILE_MOVED_IN:case x.FILE_CREATED:{const s=e.getIn(["file","id"]);if(t.file.parent_id!==s)return e;const r=e.getIn(["children","result"]);return r.includes(t.file.id)?e:e.setIn(["children","entities","files"],(e.getIn(["children","entities","files"])||(0,u.D5)()).set(t.file.id.toString(),(0,u.d0)({...t.file,selectable:!0}))).setIn(["children","result"],r.push(t.file.id)).set("total",e.get("total")+1)}case x.CURRENT_FILE_UPDATED:return e.mergeDeep((0,u.d0)({file:t.file}));case x.FILE_UPDATED:return e.mergeDeepIn(["children","entities","files",t.file.id.toString()],(0,u.d0)(t.file));case x.MOVE_FILES:case x.DELETE_FILES:case x.FILE_MOVED_OUT:case x.FILE_DELETED:{const s=e.getIn(["children","result"]),[r,n]=s.reduce(((e,s)=>{let[r,n]=e;return t.ids.includes(s)?n+=1:r=r.concat(s),[r,n]}),[[],0]);return e.setIn(["children","result"],(0,u.d0)(r)).set("total",e.get("total")-n)}case x.MOVE_ALL_FILES:case x.DELETE_ALL_FILES:return e.updateIn(["children","result"],(e=>e.filter((e=>t.excludeIds.includes(e.toString()))))).set("total",t.excludeIds.length);case x.FILE_INFO_START:case x.FETCH_SHARED_FOLDER_REQUEST:{const s=void 0!==t.fileId&&Number(t.fileId)===e.getIn(["file","id"]),r=e.set("fetching",!0).setIn(["pagination","cursor"],null);return s?r:r.set("nextVideo",null).set("nextVideoResolved",!1)}case x.FILE_INFO_DONE:return e.set("breadcrumbs",t.breadcrumbs).set("file",(0,u.d0)(t.file)).mergeDeep((0,u.d0)({error:null,fetching:!1,lastSetStartFromTimestamp:0,resolved:!0}));case x.FILE_INFO_DONE_WITH_DIRECTORY:{t.file.id=Number.parseInt(t.file.id,10);const s=t.children.result.length,r=s<e.getIn(["pagination","limit"])||s===t.total,n=t.file.id===e.getIn(["file","id"]),i=n&&!0===e.get("allSelected"),o=n?e.get("excludeIds"):(0,u.aV)(),a=e.getIn(["children","entities","files"])||(0,u.D5)(),l=(0,u.d0)(t.children).updateIn(["entities","files"],
187(e=>e?.map(((e,t)=>{if(!n)return e;const s=i?!0===e.get("selectable")&&!o.includes(t):!0===a.getIn([t,"selected"]);return e.set("selected",s)})))),c=l.getIn(["entities","files"])||(0,u.D5)(),d=r?o.filter((e=>c.has(e))):o;return e.set("lastSeenFolder",(0,u.d0)(t.file)).set("children",l).set("allSelected",i).set("excludeIds",d).set("breadcrumbs",t.breadcrumbs).set("showingAll",r).set("cursor",t.cursor).set("file",(0,u.d0)(t.file)).set("error",!1).set("fetching",!1).setIn(["pagination","cursor"],t.cursor).set("resolved",!0).set("total",t.total)}case x.RESET_FILE_POSITIONS:return e.set("positions",(0,u.D5)());case x.UPDATE_FILE_POSITION:{const s=t.id.toString();let r=e.getIn(["positions",s])||(0,u.D5)();return r=r.merge((0,u.d0)(t.position)),e.setIn(["positions",s],r)}case x.PAGINATION_START:return e.setIn(["pagination","fetching"],!0);case x.PAGINATION_ERROR:return e.setIn(["pagination","fetching"],!1);case x.PAGINATION_SUCCESS:{const s=e.getIn(["children","result"]).concat((0,u.d0)(t.children.result));return e.set("resolved",!0).set("showingAll",e.get("total")===s.size).setIn(["positions",t.id.toString()],t.position).setIn(["pagination","fetching"],!1).setIn(["pagination","cursor"],t.cursor).setIn(["children","result"],s).mergeDeepIn(["children","entities","files"],(0,u.d0)(t.children.entities.files))}case x.FILE_INFO_ERROR:case x.FETCH_SHARED_FOLDER_FAILURE:return e.set("resolved",!0).set("fetching",!1).set("error",t.error);case x.SELECT_FILE:{const s=t.file.get("id");return e.get("allSelected")&&(e=e.update("excludeIds",(e=>e.filter((e=>e!==s.toString()))))),e.setIn(["children","entities","files",s.toString(),"selected"],!0).set("lastSelectedFile",s)}case x.UNSELECT_FILE:{const s=t.file.get("id").toString();return e.get("allSelected")&&(e=e.update("excludeIds",(e=>e.push(s))),1===e.getIn(["children","entities","files"]).filter((e=>e.get("selected"))).count()&&(e=e.set("allSelected",!1))),e.setIn(["children","entities","files",s,"selected"],!1)}case x.FILES_TOGGLE_SELECT_ALL:{const t=!e.get("allSelected");for(const s of e.getIn(["children","result"]))e=e.updateIn(["children","entities","files",s.toString()],(e=>e.set("selected",e.get("selectable")&&t)));return e.set("allSelected",t).set("excludeIds",(0,u.aV)())}case x.UNSELECT_ALL:return e.updateIn(["children","entities","files"],(e=>e?e.map((e=>e.set("selected",!1))):e)).set("allSelected",!1).set("excludeIds",(0,u.aV)());case x.GET_SUBTITLES_START:return e.set("fetchingSubtitles",!0).set("subtitlesResolved",!1).set("subtitles",(0,u.aV)());case x.GET_SUBTITLES_DONE:return e.mergeDeep((0,u.d0)({fetchingSubtitles:!1,subtitles:t.subtitles,subtitlesResolved:!0}));case x.GET_SUBTITLES_ERROR:return e.set("fetchingSubtitles",!1).set("subtitlesResolved",!0);case x.UPLOAD_SUBTITLE_START:return e.set("uploadingSubtitle",!0);case x.UPLOAD_SUBTITLE_SUCCESS:case x.UPLOAD_SUBTITLE_ERROR:return e.set("uploadingSubtitle",!1);case x.CONVERT_FILE_START_SUCCESS:return e.setIn(["convert",t.fileId],(0,u.d0)({}));case x.CONVERT_FILE_UPDATE:return e.setIn(["convert",t.fileId],(0,u.d0)(t));case x.CONVERT_FILE_SUCCESS:return e.setIn(["convert",t.fileId],null);case x.CONVERT_FILE_START_FAILURE:case x.CONVERT_FILE_ERROR:return e.setIn(["convert",t.fileId,"err"],(0,u.d0)(t.err||{}));case x.SET_FILE_WATCH_STATUS:return e.setIn(["file","start_from"],t.status?1:0);case x.LEAVE_FILES_ROUTE:return e.set("resolved",!1).set("file",(0,u.D5)()).set("positions",(0,u.D5)()).set("subtitlesResolved",!1);case x.FILE_RENAMED:return t.payload.id===e.getIn(["file","id"])?e.setIn(["file","name"],t.payload.name):e.setIn(["children","entities","files",t.payload.id.toString(),"name"],t.payload.name);case x.SORT_FILES_ON_CLIENT:return e.setIn(["children","result"],t.ids);case x.NEXT_AUDIO_FOUND:return e.set("nextAudio",(0,u.d0)(t.file));default:return e}},payment:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case w.GET_PAYMENT_INFO_REQUEST:return e.set("resolved",!1);case w.GET_PAYMENT_INFO_SUCCESS:return e.set("resolved",!0).set("info",(0,u.d0)(t.info));case w.GET_PAYMENT_INFO_FAILURE:return e.set("resolved",!0).set("error",(0,u.d0)(t.error));case w.PLAN_UPDATED:{const s=e.getIn(["info","plan"]);return s?e.setIn(["info","plan"],s.mergeDeep((0,u.d0)(t.payload))):e}case w.PAYMENT_FETCHING_START:return e.set("fetching",!0);case w.PAYMENT_FETCHING_STOP:return e.set("fetching",!1);default:return e}},paymentChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case v.PAYMENT_CHANGE_RESET:return t.currentPlan?e.set("type",t.currentPlan.get("type")).set("period",t.currentPlan.get("period_days")||30):e.set("type","subscription").set("period",30);case v.GET_PLANS_REQUEST:return e.set("resolved",!1);case v.GET_PLANS_SUCCESS:return e.set("resolved",!0).set("plans",(0,u.d0)(t.plans)).set("hasTrial",t.hasTrial);case v.GET_PLANS_FAILURE:return e.set("resolved",!0);case v.CHANGE_PERIOD:{const s=1===t.period?"onetime":e.get("type");return e.set("period",t.period).set("type",s)}case v.CHANGE_TYPE:return e.set("type",t.newType||e.get("type"));case v.PAYMENT_SET_CHANGE_INTENT:return e.set("intent",t.intent);default:return e}},routing:_.mg,search:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Me,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _.nk:return"/search"===t.payload.pathname?e:e.set("phrase","").set("error",null);case f.hO:case f.Df:{const{settings:s}=t.user;if(!s)return e;if("trash_enabled"in s){const t=e.get("actions").findIndex((e=>"delete"===e.get("value"))),r=s.trash_enabled?"flaticon stroke trash-2":"flaticon solid backspace-1",n=s.trash_enabled?b.ZP.files_menu_move_to_trash_label:b.ZP.files_menu_delete_label;return e.setIn(["actions",t,"icon"],r).setIn(["actions",t,"label"],n)}return e}case ue:return e.set("phrase",t.phrase);case B:return e.set("fetching",!0).set("files",(0,u.d0)({entities:{},result:[]}));case q:return e.set("fetching",!1);case pe:return e.set("sourcePagePath",t.path);case ye:return e.setIn(["files","result"],e.getIn(["files","result"]).filter((e=>!t.ids.includes(e))));case ie:return e.set("fetching",!0).set("error",null);case oe:return e.set("resolved",!0).set("fetching",!1).set("total",t.total).set("files",(0,u.d0)(t.files)).set("lastSearchedPhrase",t.phrase).set("pagination",Me.get("pagination").set("cursor",t.curs
187or));case ae:return e.set("resolved",!0).set("fetching",!1).set("error",t.error);case he:return e.setIn(["pagination","fetching"],!0);case ge:return e.mergeDeep((0,u.d0)({files:t.files,pagination:{cursor:t.cursor,fetching:!1}})).setIn(["files","result"],e.getIn(["files","result"]).concat((0,u.d0)(t.files.result)));case me:return e.setIn(["pagination","fetching"],!1);case J:{const s=t.file.get("id");return e.setIn(["files","entities","files",s.toString(),"selected"],!0).set("lastSelectedFile",s)}case te:return e.setIn(["files","entities","files",t.file.get("id").toString(),"selected"],!1);case re:return e.set("allSelected",!1).updateIn(["files","entities","files"],(e=>e?e.map((e=>e.set("selected",!1))):e));case xe:{const t=!e.get("allSelected");for(const s of e.getIn(["files","result"]))e=e.setIn(["files","entities","files",s.toString(),"selected"],t);return e.set("allSelected",t)}case Te:return e.setIn(["files","entities","files",t.payload.id.toString(),"name"],t.payload.name);default:return e}},tasks:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:je,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case F.ADD_TASK:{const s=(0,u.d0)({id:t.id,payload:t.payload,status:t.status||Z.Z.STATUS.NEW,type:t.task});if("continue_watching"===t.task&&e.get("tasks").filter((e=>"continue_watching"===e.get("type"))).size){const r=e.get("tasks").filter((e=>"continue_watching"!==e.get("type"))).set(t.id,s);return e.set("tasks",r)}const r=e.get("tasks").filter((e=>"audio_player"===e.get("type"))).first();return"audio_player"===t.task&&r?e.setIn(["tasks",r.get("id"),"payload"],s.get("payload")):e.setIn(["tasks",t.id],s)}case F.CANCEL_TASK:return e.deleteIn(["tasks",t.id]);case F.CLEAR_COMPLETED_TASKS:return e.set("tasks",e.get("tasks").filter((e=>e.get("status")!==Z.Z.STATUS.DONE)));case F.CHANGE_TASKS_CONTAINER_FOLDING:return e.set("folded",t.fold);case F.START_DOWNLOAD_LINKS_TASK_SUCCESS:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{id:t.downloadLinksId},status:t.status}));case F.START_DOWNLOAD_LINKS_TASK_ERROR:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{errorMessage:t.errorMessage},status:t.status}));case F.GET_DOWNLOAD_LINKS_SUCCESS:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{id:t.id,links:t.links},status:t.status}));case F.GET_DOWNLOAD_LINKS_ERROR:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{errorMessage:t.errorMessage},status:t.status}));case F.START_SHARED_FILE_CLONE_TASK_SUCCESS:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{id:t.sharedFileCloneId},status:t.status}));case F.START_SHARED_FILE_CLONE_TASK_ERROR:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{errorMessage:t.errorMessage},status:t.status}));case F.GET_SHARED_FILE_CLONE_STATUS_SUCCESS:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{id:t.id},status:t.status}));case F.GET_SHARED_FILE_CLONE_STATUS_ERROR:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{errorMessage:t.errorMessage},status:t.status}));case F.START_ZIP_TASK_SUCCESS:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{id:t.zipId},status:t.status}));case F.START_ZIP_TASK_ERROR:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({status:t.status}));case F.ZIPPED:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{id:t.zipId,missing_files:t.missing_files,size:t.size,url:t.url},status:t.status}));case F.ZIP_ERROR:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({payload:{errorMessage:t.errorMessage},status:t.status}));case F.ADD_UPLOAD_TASK:{const s=e.getIn(["tasks","upload","payload"])||(0,u.d0)([]);return e.setIn(["tasks","upload","type"],"upload").setIn(["tasks","upload","payload"],s.push((0,u.d0)(t.payload)))}case F.EXTRACT_PROGRESS:{const s=(0,u.d0)(t.extractions);return e.updateIn(["tasks",t.id,"payload","extractions"],(0,u.D5)(),(e=>{const t=(e.get("result")||(0,u.aV)()).concat(s.get("result")||(0,u.aV)()).toOrderedSet().toList();return e.updateIn(["entities","extractions"],(0,u.D5)(),(e=>e.merge(s.getIn(["entities","extractions"])||(0,u.D5)()))).set("result",t)}))}case F.EXTRACT_COMPLETED_FOR_ALL_FILES:return e.mergeDeepIn(["tasks",t.id],(0,u.d0)({status:t.status}));default:return e}},transfers:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,u.d0)({actions:[{icon:"flaticon solid bell-1",id:"Transfers-Actions-Re_Announce",label:b.ZP.transfers_reannounce_label,value:"reannounce"},{icon:"flaticon solid x-2",id:"Transfers-Actions-Cancel_Selected",label:b.ZP.transfers_cancel_selected_label,value:"cancel"}],err:null,error:null,isFetching:!1,lastSelectedTransfer:null,processing:!1,resolved:!1,selectAll:!1,sort:{options:[{direction:"asc",icon:"flaticon stroke type-1",id:"Transfers-Sort-Name",label:b.ZP.transfers_sort_name_label,value:"name"},{direction:"asc",icon:"flaticon stroke calendar-1",id:"Transfers-Sort-Date_Added",label:b.ZP.transfers_sort_date_added_label,value:"dateadded"},{direction:"asc",icon:"flaticon stroke fold-down-1",id:"Transfers-Sort-Downloaded",label:b.ZP.transfers_sort_downloaded_label,value:"datadownloaded"}
187,{direction:"asc",icon:"flaticon stroke fold-up-1",id:"Transfers-Sort-Uploaded",label:b.ZP.transfers_sort_uploaded_label,value:"datauploaded"},{direction:"asc",icon:"flaticon stroke info-2",id:"Transfers-Sort-Status",label:b.ZP.transfers_sort_status_label,value:"status"},{direction:"asc",icon:"flaticon stroke time-2",id:"Transfers-Sort-ETA",label:b.ZP.transfers_sort_eta_label,value:"eta"},{direction:"asc",icon:"flaticon stroke network-1",id:"Transfers-Sort-Peer_Count",label:b.ZP.transfers_sort_peers_label,value:"peer"},{direction:"asc",icon:"flaticon stroke share-5",id:"Transfers-Sort-Ratio",label:b.ZP.transfers_sort_ratio_label,value:"ratio"}],selected:1},transfers:{entities:{transfers:{}},result:[]},updating:!1}),t=arguments.length>1?arguments[1]:void 0;switch(t.type){case f.hO:case f.Df:{const{settings:s}=t.user;if(!s)return e;if("transfer_sort_by"in s){const t=(s.transfer_sort_by||"DATE_DESC").toLowerCase().split("_"),r=t[0],n=t[1],i=e.getIn(["sort","options"]).findIndex((e=>e.get("value")===r));e=e.setIn(["sort","selected"],i).setIn(["sort","options",i,"direction"],n)}return e}case Oe:{let s=e.getIn(["transfers","result"]);return s.includes(t.transfer.id)?e:(s=s.push(t.transfer.id),e.setIn(["transfers","result"],s).setIn(["transfers","entities","transfers",t.transfer.id.toString()],(0,u.d0)(t.transfer)))}case Ze:return e.hasIn(["transfers","entities","transfers",t.transfer.get("id").toString()])?e.setIn(["transfers","entities","transfers",t.transfer.get("id").toString()],t.transfer):e;case ze:{const s=e.getIn(["transfers","result"]).filter((e=>e!==t.transfer.id));return e.setIn(["transfers","result"],s).deleteIn(["transfers","entities","transfers",t.transfer.id.toString()])}case Xe:return e.set("isFetching",!0).set("updating",!0);case et:return e.set("isFetching",!1).set("updating",!1).set("resolved",!0).set("error",null).setIn(["transfers","result"],(0,u.d0)(t.transfers.result||[])).setIn(["transfers","entities","transfers"],(0,u.d0)(t.transfers.entities.transfers||{}));case tt:return e.merge({error:t.error,fetching:!1,resolved:!0});case Be:case _t:case Ve:return e.set("processing",!0);case ht:case Ye:{const s=e.getIn(["transfers","result"]).filter((e=>!t.ids.includes(e))),r=e.getIn(["transfers","entities","transfers"]).filter((e=>!t.ids.includes(e.get("id"))));return e.set("processing",!1).setIn(["transfers","result"],s).setIn(["transfers","entities","transfers"],r)}case $e:case gt:case qe:case We:return e.set("processing",!1);case Ke:return e.setIn(["transfers","result"],t.ids);case rt:return e.getIn(["sort","options"]).forEach(((e,s)=>{e.get("value")===t.by&&(t.index=s)})),e.setIn(["sort","selected"],t.index).setIn(["sort","options",t.index,"direction"],t.direction);case it:{const t=!e.get("selectAll");return e.set("selectAll",t).updateIn(["transfers","entities","transfers"],(e=>e.map((e=>e.set("selected",!!e.get("selectable")&&t)))))}case at:{const s=e.getIn(["transfers","entities","transfers"]).filter((e=>e.get("selectable"))),r=s.filter((e=>e.get("selected")));return e.set("selectAll",r.size+1===s.size).setIn(["transfers","entities","transfers",t.transfer.get("id").toString(),"selected"],!0).set("lastSelectedTransfer",t.transfer.get("id"))}case ct:return e.setIn(["transfers","entities","transfers",t.transfer.get("id").toString(),"selected"],!1).set("selectAll",!1);case ut:return e.set("selectAll",!1).updateIn(["transfers","entities","transfers"],(e=>e?e.map((e=>e.set("selected",!1))):e));default:return e}},trash:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ts,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Mt:return e.set("fetching",!0).set("error",null);case jt:return e.set("files",(0,u.d0)(t.files)).set("resolved",!0).set("fetching",!1).set("total",t.total).set("showingAll",t.showingAll).set("trashSize",t.trashSize).setIn(["pagination","cursor"],t.cursor);case Dt:return e.set("resolved",!0).set("fetching",!1).set("error",t.error);case Rt:return e.setIn(["pagination","fetching"],!0);case Nt:{const{cursor:s,files:r}=t,n=e.getIn(["files","result"]).concat((0,u.d0)(r.result));return e.setIn(["pagination","fetching"],!1).setIn(["pagination","cursor"],s).setIn(["files","result"],n).mergeDeepIn(["files","entities","files"],
187(0,u.d0)(r.entities.files))}case Pt:return e.setIn(["pagination","fetching"],!1);case Lt:return e.setIn(["files","entities","files",t.fileId.toString(),"selected"],!0).set("lastSelectedFile",t.fileId);case Zt:return e.setIn(["files","entities","files",t.fileId.toString(),"selected"],!1).set("allSelected",!1);case zt:{const s=null!==t.isSelected?t.isSelected:!e.get("allSelected");for(const t of e.getIn(["files","result"]))e=e.setIn(["files","entities","files",t.toString(),"selected"],s);return e.set("allSelected",s)}case Bt:case Kt:return e.set("fetching",!0);case Jt:return ts.set("resolved",!0);case qt:case Xt:return e.set("fetching",!1);case x.FILE_CREATED:{const s=e.getIn(["files","result"]).filter((e=>e!==t.file.id));return e.setIn(["files","result"],s).set("total",s.size)}default:return e}}}),rs=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.mW;return(0,h.MT)(ss,(0,u.d0)(e),(0,h.md)(...(e=>[d,g.Z,(0,_.zk)(e)])(t)))}(),ns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.mW;return(0,_.h1)(t,e,{selectLocationState:e=>e.get("routing")})};var is=s(17029),os=s(42975),as=s(10017),ls=s(12504),cs=s(4683),ds=s(19575),us=s(19192),ps=s.n(us),_s=s(28165),hs=s(95975),gs=s(13390),ms=s(52322);const fs=()=>(0,ms.jsx)(_s.xB,{styles:e=>({html:{...(0,hs.Z)((0,gs.e)(e,["fonts","fontSizes","fontWeights","lineHeights","space","radii","config","zIndices"]))}})}),ys=()=>(0,ms.jsx)(_s.xB,{styles:e=>({"a, button, [role=button], [role=tabpanel]":{"@media (hover: hover)":{":hover":{cursor:e.config.cursor}}}})}),bs=()=>(0,ms.jsx)(_s.xB,{styles:e=>({"#root":{".focus-within":{":focus-within":{boxShadow:`0 0 0 2px ${e.colors["border-hover"]}`}},"a, button, [role=button], [role=tabpanel]":{":focus":{boxShadow:`0 0 0 1.5px ${e.colors["border-hover"]}`},"@supports selector(:focus-visible)":{":focus":{boxShadow:"none"},":focus-visible":{boxShadow:`0 0 0 1.5px ${e.colors["border-hover"]}`}}}},"*":{WebkitTapHighlightColor:"transparent"},":focus":{outline:0}})}),xs=()=>(0,ms.jsx)(_s.xB,{styles:_s.iv`
188      body,
189      button,
190      input,
191      optgroup,
192      select,
193      textarea {
194        font-family: var(--font-body);
195      }
196
197      i {
198        line-height: var(--lineHeight-button);
199        user-select: none;
200      }
201    `}),ws=()=>(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(fs,{}),(0,ms.jsx)(xs,{}),(0,ms.jsx)(ys,{}),(0,ms.jsx)(bs,{})]});var Ss=s(77082);const vs="GT America";var Is=s(94115);const ks=e=>{let{children:t}=e;const{theme:s}=(0,Is.Fg)(),[,r]=(0,cs.If)();return(0,o.useEffect)((()=>{r(s.config.colorMode),document.getElementsByTagName("html")[0].style.removeProperty("background"),"dark"===s.config.colorMode?ps()("html").addClass("dark"):ps()("html").removeClass("dark");const e=document.querySelector('meta[name="theme-color"]');e&&e.setAttribute("content","dark"===s.config.colorMode?ls.$["nav-bg"]:ls.D["nav-bg"])}),[s,r]),(0,ms.jsx)(ms.Fragment,{children:t})},Ts=e=>{let{children:t,config:s}=e;const r=(e=>{const{rootStyles:t,...s}={fontSizes:["0.875rem","1rem","1.125rem","1.5rem","2rem","48px","64px","96px"],fontWeights:{body:400,bold:600,button:500,caption:400,heading:500,label:500,medium:500},fonts:{body:vs,heading:vs,monospace:"GT America Mono"},lineHeights:{body:1.5,button:1,heading:1.2,narrow:1.2},rootStyles:{MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextSizeAdjust:"none",fontSize:["14px","14px","15px"],letterSpacing:"normal",wordSpacing:"normal"}},r={body:{"@media (hover: hover)":{"& > a:hover":{cursor:"var(--config-cursor)",textDecoration:"underline"}},color:"text",fontFamily:"body",fontSize:1,fontWeight:"body",lineHeight:"body"},button:{fontFamily:"body",fontSize:0,fontWeight:"button",lineHeight:"button"},caption:{"@media (hover: hover)":{"& > a:hover":{cursor:"var(--config-cursor)",textDecoration:"underline"}},color:"text-secondary",fontFamily:"body",fontSize:0,fontWeight:"caption"},heading:{color:"text",fontFamily:"heading",fontSize:3,fontWeight:"heading",lineHeight:"heading"},label:{"@media (hover: hover)":{"& > a:hover":{cursor:"var(--config-cursor)",textDecoration:"underline"}},color:"text",display:"block",fontFamily:"body",fontSize:1,fontWeight:"label",lineHeight:"body"},subheading:{color:"text",fontFamily:"heading",fontSize:2,fontWeight:"heading",lineHeight:"heading"}};return{breakpoints:[Ss.j.MD,Ss.j.LG].map((e=>`${e}px`)),colors:{...ls.D,modes:{dark:ls.$}},config:{useColorSchemeMediaQuery:!1,useLocalStorage:!1,...e},radii:{circle:99999,default:4,wrappedWithDefault:3},space:[0,4,8,16,32,64,128,256,512],zIndices:{admin:1001,header:997,intercom:2
201147483001,intercomPlusOne:2147483002,mobileNavbar:998,modal:999,navbar:996,overlay:999,overlayWithinDialog:1e3,popover:999,skipNav:998,sticky:995,toast:2147483002,tooltip:2147483002},...s,boxes:{fullscreen:{alignItems:"center",display:"flex",height:"100vh",justifyContent:"center",left:0,position:"fixed",top:0,width:"100vw"},fullscreenOverlay:{alignItems:"center",backdropFilter:"blur(2px)",backgroundColor:"overlay-full",display:"flex",height:"100vh",justifyContent:"center",left:0,position:"fixed",top:0,width:"100vw",zIndex:"overlay"},overlay:{alignItems:"center",backdropFilter:"blur(2px)",backgroundColor:"overlay-inline",display:"flex",height:"100%",justifyContent:"center",left:0,position:"absolute",top:0,width:"100%",zIndex:"overlay"},page:{paddingTop:["8px","16px","24px"]},pageRevert:{marginTop:["-8px","-16px","-24px"]}},buttons:{translate:{":active":{transform:"translateY(2px)"},":disabled":{transform:"none"}},unstyled:{appearance:"none",backgroundColor:"transparent",border:0,color:"text",fontSize:1,fontWeight:"body",padding:0,textAlign:"left",textDecoration:"none"}},cards:{interactive:{"@media (hover: hover)":{":hover":{backgroundColor:"component-bg-hover",borderColor:"border-hover",cursor:"pointer",transition:"all 0.2s ease-in-out"}},backgroundColor:"component-bg",borderColor:"line",borderRadius:"default",borderStyle:"solid",borderWidth:1,position:"relative"},primary:{backgroundColor:"component-bg",borderColor:"line",borderRadius:"default",borderStyle:"solid",borderWidth:1,position:"relative"}},forms:{input:{"::placeholder":{color:"text-secondary"},":focus":{borderColor:"border-hover"},backgroundColor:"app-bg",borderColor:"border",borderRadius:"default",borderWidth:1,fontSize:1,lineHeight:"form"},label:r.label,radio:{color:"text-secondary","input:checked ~ &":{color:"text"},"input:focus ~ &":{bg:"border-hover"}},select:{fontSize:1},textarea:{"::placeholder":{color:"text-secondary"},":focus":{borderColor:"border-hover"},backgroundColor:"app-bg",borderColor:"border",borderRadius:"default",borderWidth:1,fontSize:1,lineHeight:"form"}},styles:{progress:{backgroundColor:"border",borderRadius:"default",color:"yellow-solid",height:"6px"},root:{...t,fontFamily:"body",fontWeight:"body",lineHeight:"body"},strong:{fontWeight:"medium"}},text:r}})(s);return(0,ms.jsx)(ds._,{theme:r,children:(0,ms.jsxs)(ks,{children:[(0,ms.jsx)(ws,{}),t]})})};var As=s(7434);const Es=()=>({colorMode:(0,As.t)(),cursor:"pointer",layout:{type:"fixed",width:`${Ss.j.LG}px`}}),Ms=e=>{let{children:t}=e;const s=Es();return(0,ms.jsx)(ms.Fragment,{children:t(s)})};var js=s(99486),Ds=s(79794),Cs=s(76940);const Rs=e=>e.getIn(["app","ready"]),Ns=e=>{let{children:t}=e;const s=(()=>{const e=(0,Ds.v9)(Rs),[t,s]=(0,Cs.Z)("putio.user.theme"),[r]=(0,js.E)("theme"),[n]=(0,js.E)("fluid_layout"),[i]=(0,js.E)("ui.fixed_layout_width"),[a]=(0,js.E)("ui.cursor");return(0,o.useEffect)((()=>{e&&s({cursor:a,fixed_layout_width:i,fluid_layout:n,theme:r})}),[e,r,n,i,a,s]),t})(),r=Es(),n=(0,o.useMemo)((()=>s?{colorMode:"auto"===s.theme?r.colorMode:s.theme,cursor:s.cursor,layout:s.fluid_layout?{type:"fluid"}:{type:"fixed",width:s.fixed_layout_width}}:r),[s,r]);return(0,ms.jsx)(ms.Fragment,{children:t(n)})},Ps=e=>{let{children:t,...s}=e;switch(s.source){case"user":return(0,ms.jsx)(Ns,{children:e=>(0,ms.jsx)(Ts,{config:e,children:t})});case"system":return(0,ms.jsx)(Ms,{children:e=>(0,ms.jsx)(Ts,{config:e,children:t})});case"custom":return(0,ms.jsx)(Ts,{config:s.config,children:t});default:return(0,as.Z)(s)}};var Os=s(69904),Ls=s(7735),Zs=s(97399),Fs=s(88990),zs=s(96993);const Us=o.createContext(void 0),Vs={},Ys=e=>{let{children:t}=e;const[r,n]=(0,o.useState)([]);(0,Os.Z)((()=>{s.g.Promise.defer=zs.ZP.defer}));const i=(0,o.useCallback)(((e,t)=>{document.activeElement instanceof HTMLElement&&(Vs[e]=document.activeElement),n((s=>[...s,{content:t,id:e}]))}),[]),a=(0,o.useCallback)((e=>{n((t=>t[t.length-1]?.id===e?t.filter((t=>t.id!==e)):t)),Vs[e]&&((0,Zs.c)(Vs[e])||Vs[e].focus()),delete Vs[e]}),[]);return(0,o.useEffect)((()=>{const e=Fs.uY.on("SHOW_MODAL",i),t=Fs.uY.on("HIDE_MODAL",a);return()=>{e(),t()}}),[i,a]),(0,ms.jsxs)(Us.Provider,{value:{hideModal:a,showModal:i}
201,children:[t,(0,ms.jsxs)(ms.Fragment,{children:[r.map((e=>(0,ms.jsx)(o.Fragment,{children:e.content},e.id))),(0,ms.jsx)(Ls.t,{lock:Boolean(r.length)})]})]})};var Ws=s(98355),Gs=s(70659);const Hs=o.createContext(void 0),Bs=e=>{let{children:t}=e;const s=(0,Gs.Z)(),r=(0,o.useRef)(void 0);return(0,o.useEffect)((()=>{if(!s.online){if(r.current)return;r.current=T.Z.Show({message:(0,Ws.I)("app_no_internet_connection"),timeout:5e4,type:"danger"})}s.online&&r.current&&(r.current.close(),r.current=void 0)}),[s]),(0,ms.jsx)(Hs.Provider,{value:s,children:t})};var $s=s(55830),qs=s(92223),Qs=s(59902);const Ks=e=>{let{children:t}=e;const s=(0,Is.Gc)();return(0,ms.jsx)($s.aH,{client:Qs.E,children:(0,ms.jsxs)(ms.Fragment,{children:[t,"SM"!==s&&(0,ms.jsx)(qs.t,{position:"bottom-left"})]})})};var Js=s(39723),Xs=s(36555),er=s(72739);const tr=o.createContext(void 0),sr=e=>{let{onDismiss:t=(()=>null),timeout:s,...r}=e;return(0,o.useEffect)((()=>{let e;return s&&(e=setTimeout((()=>t()),1e3*s)),()=>{e&&clearTimeout(e)}}),[s,t]),(0,ms.jsx)(Js.P,{...r,dismissable:!0,onDismiss:t,sx:{bottom:3,position:"fixed",transform:"translate(calc(50vw - 50%))",width:["90%",400],zIndex:"toast"}})},rr=e=>{let{children:t}=e;const[s,r]=(0,o.useState)(null),n=(0,o.useCallback)((()=>r(null)),[]),i=(0,o.useCallback)((e=>{const t={message:"",onDismiss:()=>n(),timeout:3,type:"info"};if(e instanceof z.nD)return r({...t,...(0,Xs.P)(e)});r({...t,...e})}),[n]);return(0,o.useEffect)((()=>{const e=er.uY.on("SHOW_TOAST",i),t=er.uY.on("HIDE_TOAST",n);return()=>{e(),t()}}),[i,n]),(0,ms.jsxs)(tr.Provider,{value:{hide:n,show:i},children:[s&&(0,ms.jsx)(sr,{...s}),t]})};var nr=s(46797),ir=s(80589),or=s(1030);const ar=e=>t=>{let{error:s}=t;const r=(0,o.useMemo)((()=>(0,ms.jsx)(or.u,{error:s instanceof z.nD?s:(0,E.j)(s),variant:"app"===e?"fullscreen":"page"})),[s,e]);return"app"===e?(0,ms.jsx)(Ps,{source:"system",children:r}):r},lr=e=>{let{children:t}=e;return(0,ms.jsx)(ir.ErrorBoundary,{FallbackComponent:ar("app"),children:t})},cr=e=>{let{children:t}=e;return(0,ms.jsx)(ir.ErrorBoundary,{FallbackComponent:ar("route"),children:t})},dr=()=>{const e=(0,Ds.v9)((e=>e.get("error"))),t=(0,o.useRef)(!0);return(0,o.useEffect)((()=>{if(t.current&&e)throw t.current=!1,e}),[e]),null},ur=e=>t=>(0,ms.jsx)(cr,{children:(0,ms.jsx)(e,{...t})});var pr=s(87466),_r=(s(43673),s(40753),s(28399),s(51428)),hr=s(12130);var gr=s(92680);const mr=e=>e.map((e=>{return{component:ur((t=e.security||{zone:"legacy"},e=>s=>{const r=t?.zone||"legacy",[n,i]=(0,o.useState)("public"===r||"legacy"===r);return(0,o.useEffect)((()=>{(async()=>{const e={...s.params,...s.location.query};if(!t)return i(!0);switch(t.zone){case"public":case"legacy":return i(!0);case"unauthenticated":{const r=await(async()=>{const e=_r.Z.getOauthToken();if(!e)return{success:!0};try{return await(0,gr.z)(e,"default"),{params:{},success:!1}}catch{return{success:!0}}})();if(!1===r.success){const n=t.createRedirectTo||(()=>"/");return s.router.replace(n({...e,...r.params}))}return i(!0)}case"authenticated":{const r=await(async()=>{const e=_r.Z.getOauthToken();if(!e)return{params:{state:hr.Base64.encode(JSON.stringify({next:`${window.location.pathname}${window.location.search}`}))},success:!1};try{return await(0,gr.z)(e,"default"),A.Z.setToken(e),{success:!0}}catch{return{params:{state:hr.Base64.encode(JSON.stringify({message:(0,Ws.I)("app_session_expired_login_message"),next:`${window.location.pathname}${window.location.search}`}))},success:!1}}})();if(!1===r.success){const n=t.createRedirectTo||(e=>`/login?${new URLSearchParams(e)}`);return s.router.replace(n({...e,...r.params}))}return i(!0)}case"admin":{const e=await(async()=>{const e=_r.Z.getAdminToken()||_r.Z.getOauthToken();try{if(!e)throw new Error("No admin token");A.Z.setToken(e);const{data:{info:t}}=await A.Z.Account.Info();return t.is_admin?{success:!0}:{success:!1}}catch{return{params:{state:hr.Base64.encode(JSON.stringify({next:`${window.location.pathname}${window.location.search}`}))},success:!1}}})();if(!1===e.success){const r=t.createRedirectTo||(e=>`/login?${new URLSearchParams(e)}`);return s.router.replace(r(e.params||{}))}return i(!0)}case"dev":return l.Z.isProd?s.router.replace("/"):i(!0);default:(0,as.Z)(t)}})()}),[s,t]),n?(0,ms.jsx)(e,{...s}):null})(e.component)),isolated:e.isolated||!1,path:e.path,redirections:e.redirections||[],security:e.security||{zone:"legacy"}};var t}));var fr=s(76379);const yr=mr([{component:(0,pr.Z)((()=>Promise.all([s.e(2060),s.e(5391)]).then(s.bind(s,25391)))),path:fr.i.ROOT,redirections:["/settings/account","/account/information","/account/security","/account/danger-zone"]},{component:(0,pr.Z)((()=>s.e(2115).then(s.bind(s,92115)))),path:fr.i.USERNAME,redirections:["/account/information/username"]},{component:(0,pr.Z)((()=>
201s.e(5092).then(s.bind(s,55092)))),path:fr.i.EMAIL,redirections:["/account/information/email"]},{component:(0,pr.Z)((()=>s.e(1475).then(s.bind(s,41475)))),path:fr.i.PASSWORD,redirections:["/account/security/password"]},{component:(0,pr.Z)((()=>s.e(3622).then(s.bind(s,43622)))),path:fr.i.APP_SPECIFIC_PASSWORDS,redirections:["/app-specific-passwords","/personal-access-tokens"]}]);var br=s(13384);const xr=mr([{component:(0,pr.Z)((()=>s.e(904).then(s.bind(s,40904)))),path:br.h.LOGIN,security:{zone:"unauthenticated"}},{component:(0,pr.Z)((()=>s.e(817).then(s.bind(s,90817)))),path:br.h.RESET_PASSWORD,redirections:["/forgotpassword","/forgot-password"],security:{zone:"public"}},{component:(0,pr.Z)((()=>s.e(3459).then(s.bind(s,93459)))),path:br.h.RESET_PASSWORD_WITH_CODE,redirections:["/resetpassword/:code"],security:{zone:"public"}},{component:(0,pr.Z)((()=>s.e(4255).then(s.bind(s,54255)))),path:br.h.CALLBACK,security:{zone:"unauthenticated"}},{component:(0,pr.Z)((()=>s.e(736).then(s.bind(s,40736)))),path:br.h.OTP,redirections:["/two-factor"],security:{zone:"unauthenticated"}},{component:(0,pr.Z)((()=>s.e(9561).then(s.bind(s,71109)))),isolated:!0,path:br.h.LINK,redirections:["/kodi","/tizen"],security:{zone:"legacy"}}]),wr=mr([{component:(0,pr.Z)((()=>s.e(3412).then(s.bind(s,73412)))),isolated:!0,path:"/billing/payment-flow-tester",security:{zone:"authenticated"}},{component:(0,pr.Z)((()=>s.e(8126).then(s.bind(s,8126)))),isolated:!0,path:"/billing/pay",security:{zone:"authenticated"}},{component:(0,pr.Z)((()=>s.e(7302).then(s.bind(s,7302)))),path:"/billing",redirections:["/payment","/settings/payment","/account/billing"]},{component:(0,pr.Z)((()=>s.e(8789).then(s.bind(s,38789)))),path:"/billing/voucher",redirections:["/voucher","/payment/voucher","/settings/payment/voucher","/account/billing/voucher"]},{component:(0,pr.Z)((()=>s.e(6252).then(s.bind(s,16252)))),isolated:!0,path:"/billing/history/invoice/:paymentId",security:{zone:"authenticated"}},{component:(0,pr.Z)((()=>s.e(6402).then(s.bind(s,56402)))),path:"/billing/history",redirections:["/payment/history","/settings/payment/history","/account/billing/history"]},{component:(0,pr.Z)((()=>s.e(621).then(s.bind(s,621)))),path:"/billing/:action/confirm/:planPath/:confirmationCode",redirections:["/payment/:action/confirm/:planPath/:confirmationCode","/settings/payment/:action/confirm/:planPath/:confirmationCode","/account/billing/:action/confirm/:planPath/:confirmationCode"]},{component:(0,pr.Z)((()=>s.e(621).then(s.bind(s,621)))),path:"/billing/:action(/:planPath)(/:couponCode)",redirections:["/payment/:action(/:planPath)(/:couponCode)","/settings/payment/:action(/:planPath)(/:couponCode)","/account/billing/:action(/:planPath)(/:couponCode)"]}]),Sr=mr([{component:(0,pr.Z)((()=>s.e(9685).then(s.bind(s,39685)))),path:"*"},{component:(0,pr.Z)((()=>s.e(5827).then(s.bind(s,5827)))),isolated:!0,path:"error",security:{zone:"public"}}]),vr="/extensions",Ir=mr([{component:(0,pr.Z)((()=>s.e(840).then(s.bind(s,80840)))),path:vr,redirections:["/tools","/favorite-tools","/toys"]}]),kr="/family",Tr=mr([{component:(0,pr.Z)((()=>s.e(3229).then(s.bind(s,3229)))),path:kr,redirections:["/settings/family","/account/family"]}]),Ar=mr([{component:(0,pr.Z)((()=>s.e(730).then(s.bind(s,30730)))),path:"/history"}]),Er=mr([{component:(0,pr.Z)((()=>s.e(742).then(s.bind(s,32e3)))),path:"/invite-friends",redirections:["/invites","/sharing/invite-friends","/settings/invite-friends"]}]),Mr=mr([{component:(0,pr.Z)((()=>s.e(7923).then(s.bind(s,7923)))),path:"/media-conversions"}]);var jr=s(9607);const Dr=mr([{component:(0,pr.Z)((()=>s.e(2905).then(s.bind(s,42905)))),path:jr.C.APPS,redirections:["/account/api","/api"]},{component:(0,pr.Z)((()=>s.e(2180).then(s.bind(s,12180)))),isolated:!0,path:jr.C.AUTHENTICATE,redirections:["/v2/oauth2/authenticate","/authenticate"]},{component:(0,pr.Z)((()=>s.e(1850).then(s.bind(s,91850)))),path:jr.C.AUTHORIZATIONS,redirections:["/settings/account/oauth/authorizations","/account/security/authorizations"]},{component:(0,pr.Z)((()=>s.e(6354).then(s.bind(s,36354)))),path:jr.C.APP_SECRETS,redirections:["/account/api/apps/:id/secrets"]},{component:(0,pr.Z)((()=>
201s.e(4940).then(s.bind(s,24940)))),path:jr.C.APP_CREATE,redirections:["/account/api/apps/create"]},{component:(0,pr.Z)((()=>s.e(5350).then(s.bind(s,25350)))),path:jr.C.APP_UPDATE,redirections:["/account/api/apps/:id"]},{component:(0,pr.Z)((()=>s.e(3409).then(s.bind(s,33409)))),path:jr.C.APP_SPECIFIC_PASSWORD_CREATE,security:{zone:"authenticated"}},{component:(0,pr.Z)((()=>s.e(7339).then(s.bind(s,97339)))),path:jr.C.APP_SPECIFIC_PASSWORD,security:{zone:"authenticated"}}]);var Cr=s(97937);const Rr=mr([{component:(0,pr.Z)((()=>Promise.all([s.e(3069),s.e(2415),s.e(4796),s.e(2240)]).then(s.bind(s,58557)))),path:Cr.O.ROOT,security:{zone:"public"}},{component:(0,pr.Z)((()=>Promise.all([s.e(3069),s.e(2415),s.e(4796),s.e(2240)]).then(s.bind(s,58557)))),path:Cr.O.FILE,security:{zone:"public"}},{component:(0,pr.Z)((()=>s.e(8890).then(s.bind(s,98890)))),path:Cr.O.LEGACY,security:{zone:"public"}}]),Nr=mr([{component:(0,pr.Z)((()=>s.e(6124).then(s.bind(s,26124)))),path:"/register",security:{zone:"unauthenticated"}},{component:(0,pr.Z)((()=>s.e(8956).then(s.bind(s,18956)))),path:"/hi/:code",redirections:["/was-expecting-you/:code"],security:{createRedirectTo:e=>`/voucher?code=${e.code}`,zone:"unauthenticated"}},{component:(0,pr.Z)((()=>Promise.all([s.e(4814),s.e(9068)]).then(s.bind(s,99068)))),path:"/hi-friend/:code",security:{zone:"unauthenticated"}},{component:(0,pr.Z)((()=>s.e(7648).then(s.bind(s,97648)))),path:"/join-family/:code",security:{createRedirectTo:e=>`/family?code=${e.code}`,zone:"unauthenticated"}}]);var Pr=s(96223);const Or=mr([{component:(0,pr.Z)((()=>s.e(3045).then(s.bind(s,83045)))),path:Pr.p.ROOT,redirections:["/subscriptions"]},{component:(0,pr.Z)((()=>s.e(5023).then(s.bind(s,15023)))),path:Pr.p.CREATE,redirections:["/subscriptions/create","/subscriptions/new"]},{component:(0,pr.Z)((()=>s.e(4139).then(s.bind(s,14139)))),path:Pr.p.UPDATE,redirections:["/subscriptions/:id","/subscriptions/edit/:id"]},{component:(0,pr.Z)((()=>s.e(305).then(s.bind(s,30305)))),path:Pr.p.LOGS,redirections:["/subscriptions/:id/logs"]}]);var Lr=s(49963);const Zr=mr([{component:(0,pr.Z)((()=>s.e(776).then(s.bind(s,20776)))),path:Lr.t.ROOT,redirections:["/account/settings","/account/settings/appearance","/account/settings/playback","/account/settings/storage","/account/settings/privacy-and-security","/settings/appearance","/settings/playback","/settings/storage","/settings/privacy-and-security"]},{component:(0,pr.Z)((()=>Promise.all([s.e(418),s.e(5344)]).then(s.bind(s,55344)))),path:Lr.t.ROUTE,redirections:["/account/settings/route","/speedtest"]},{component:(0,pr.Z)((()=>s.e(5454).then(s.bind(s,75454)))),path:Lr.t.CALLBACK_URL,redirections:["/account/settings/transfers/callback-url","/settings/transfers/callback-url"]},{component:(0,pr.Z)((()=>s.e(1194).then(s.bind(s,91194)))),path:Lr.t.PUSHOVER_TOKEN,redirections:["/account/settings/transfers/pushover-token","/settings/transfers/pushover-token"]}]),Fr=mr([{component:(0,pr.Z)((()=>s.e(7921).then(s.bind(s,87921)))),path:"/sharing",redirections:["/friends","/sharing/*"]}]);var zr=s(25620);const Ur=mr([{component:(0,pr.Z)((()=>s.e(3309).then(s.bind(s,3309)))),path:zr.IT.ROOT,redirections:["/account/support"]},{component:(0,pr.Z)((()=>s.e(4298).then(s.bind(s,84298)))),path:"/pl/:user",security:{zone:"admin"}},{component:(0,pr.Z)((()=>s.e(935).then(s.bind(s,70935)))),path:zr.IT.REMOVE_RATE_LIMIT,security:{zone:"public"}}]),Vr=mr([{component:(0,pr.Z)((()=>s.e(5326).then(s.bind(s,55326)))),isolated:!0,path:"/magnet",redirections:["/newfile","/default/magnet"],security:{zone:"authenticated"}}]),{catchAllRoute:Yr,legacyRoutes:Wr,protectedRoutes:Gr,publicRoutes:Hr,redirections:Br}=[...yr,...xr,...wr,...Ir,...Tr,...Ar,...Er,...Mr,...Sr,...Dr,...Rr,...Nr,...Or,...Zr,...Fr,...Ur,...Vr].reduce(((e,t)=>{let{catchAllRoute:s,legacyRoutes:r,protectedRoutes:n,publicRoutes:i,redirections:o}=e;if(t.redirections){const e=t.redirections.map((e=>({from:e,to:t.path})));o=[...o,...e]}return"public"===t?.security?.zone||"unauthenticated"===t?.security?.zone||"admin"===t?.security?.zone?i=[...i,t]:"authenticated"===t.security?.zone?n=[...n,t]:"*"===t.path?s=t:(t.path=t.path.split("/").slice(1).join("/"),r=[...r,t]),{catchAllRoute:s,legacyRoutes:r,protectedRoutes:n,publicRoutes:i,redirections:o}}),{catchAllRoute:null,legacyRoutes:[],protectedRoutes:[],publicRoutes:[],redirections:[]});var $r=s(67265);const qr=e=>{let{children:t}=e;const[s,r]=(0,o.useState)(!1),[n,i]=(0,o.useState)(!1),[a,l]=(0,o.useState)(),[c,d]=(0,o.useState)();(0,o.useEffect)((()=>{(async()=>{try{await new Promise(((e,t)=>{const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src","https://www.gstatic.
201com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"),document.getElementsByTagName("head")[0].appendChild(s),window.chrome?.cast&&e(),window.__onGCastApiAvailable=s=>{s&&e(),t(new Error("Failed to load CastFramework"))}})),(()=>{const{cast:e,chrome:t}=window;e.framework.CastContext.getInstance().setOptions({autoJoinPolicy:t.cast.AutoJoinPolicy.ORIGIN_SCOPED,receiverApplicationId:t.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID})})(),r(!0),i(!0)}catch{r(!1)}})()}),[]),(0,o.useEffect)((()=>{if(n){const e=window.cast.framework.CastContext.getInstance();e.addEventListener(window.cast.framework.CastContextEventType.CAST_STATE_CHANGED,(e=>l(e.castState))),e.addEventListener(window.cast.framework.CastContextEventType.SESSION_STATE_CHANGED,(e=>d(e.sessionState)))}}),[n]);const u=(0,o.useMemo)((()=>{const e=n&&a===window.cast.framework.CastState.CONNECTED;return{available:s,castState:a,connected:e,initialized:n,sessionState:c}}),[s,a,n,c]);return(0,ms.jsx)($r.Z.Provider,{value:u,children:t})};var Qr=s(37776),Kr=s(11368);const Jr=e=>{let{appID:t,children:s,enabled:r}=e;return(0,o.useEffect)((()=>{r&&(window.intercomSettings={app_id:t})}),[t,r]),r?(0,ms.jsxs)(Qr.Z,{idlePeriod:1,provider:"intercom",providerKey:t,children:[s,(0,ms.jsx)("div",{style:{display:"none"},children:(0,ms.jsx)(Kr.Z,{})})]}):(0,ms.jsx)(ms.Fragment,{children:s})};var Xr=s(13980),en=s.n(Xr),tn=s(99085),sn=s(42476),rn=s(69378),nn=s.n(rn),on=s(69754),an=s(98298),ln=s(62891),cn=s(37935),dn=s(18756),un=s(75778),pn=s(51382),_n=s(44662),hn=s(75289),gn=s(15415),mn=s(59807),fn=s(97395);const yn=e=>{e.blur();const t=window.getSelection();t&&t.removeAllRanges()};var bn=s(59056);const xn=e=>{let{onEditCancelled:t=(()=>null),onEditCompleted:s,status:r="editable",value:n}=e;const i=(0,o.useRef)(null),[a,l]=(0,o.useState)(n),[c,d]=(0,o.useState)(n),[u,p]=(0,o.useState)(!1),_=(0,o.useCallback)((()=>{i.current&&((e=>{const t=document.createTextNode("");e.appendChild(t);const s=window.getSelection();if(null!==s){const e=document.createRange();e.setStart(t,(t.nodeValue||"").length),e.collapse(!0),s.removeAllRanges(),s.addRange(e)}e.focus()})(i.current),p(!0))}),[]),h=(0,o.useCallback)((e=>{l(e),d(e),i.current&&(i.current.textContent=e)}),[]),g=(0,o.useCallback)((()=>{i.current&&(yn(i.current),p(!1));const e=a.trim();""!==e&&e!==n?(h(e),s(e)):(h(n),t(n))}),[s,t,h,a,n]),m=(0,o.useCallback)((()=>{i.current&&(yn(i.current),p(!1)),h(c),t(c)}),[t,h,c]),f=(0,o.useCallback)((e=>{const t=e.currentTarget.textContent||"";l(t)}),[]),y=(0,o.useCallback)((e=>e.key===gn.lT_?(e.preventDefault(),g()):e.key===gn.uTb?(e.preventDefault(),m()):void 0),[g,m]);return(0,bn.BX)(bn.HY,{children:[(0,bn.tZ)(hn.xv,{style:{display:"inline",wordBreak:"break-all"},children:(0,bn.tZ)("span",{contentEditable:"editable"===r,css:"\n            user-modify: read-write-plaintext-only;\n            -moz-user-modify: read-write-plaintext-only;\n            -webkit-user-modify: read-write-plaintext-only;\n          ",dangerouslySetInnerHTML:{__html:n},onInput:f,onKeyDown:y,ref:i,spellCheck:!1})}),(0,bn.tZ)(hn.xu,{mx:1,sx:{display:"inline-block"}}),(0,bn.tZ)(hn.xu,{sx:{display:"inline-block"},children:(()=>{switch(r){case"editable":return a!==c?(0,bn.BX)(hn.kC,{children:[(0,bn.tZ)(fn.t,{format:"key+label",keys:["Enter"],label:(0,Ws.I)("content_editable_save"),children:(0,bn.tZ)(mn.h,{icon:{name:"checkmark-1",type:"stroke"},onClick:g,size:"xs"})}),(0,bn.tZ)(hn.xu,{mx:1,sx:{display:"inline-block"}}),(0,bn.tZ)(fn.t,{format:"key+label",keys:["Escape"],label:(0,Ws.I)("content_editable_discard"),children:(0,bn.tZ)(mn.h,{icon:{name:"x-1",type:"stroke"},onClick:m,size:"xs"})})]}):u?(0,bn.tZ)(fn.t,{format:"key+label",keys:["Escape"],label:(0,Ws.I)("content_editable_cancel"),children:(0,bn.tZ)(mn.h,{icon:{name:"x-1",type:"stroke"},onClick:m,size:"xs"})}):(0,bn.tZ)(mn.h,{icon:{name:"pencil-2",type:"solid"},onClick:_,size:"xs",title:(0,Ws.I)("content_editable_edit")});case"busy":return(0,bn.tZ)(hn.xu,{children:(0,bn.tZ)(hn.$j,{color:"text",size:14})});default:return null}})()})]})},wn=e=>{let{file:t}=e;const{id:s,is_shared:r,name:n}=t,i=!r&&0!==s,[a,l]=(0,o.useState)("editable"),[c,d]=(0,o.useState)(0),u=(0,Ds.I0)(),p=(0,o.useCallback)((async e=>{l("busy");try{await(0,_n.Z)(A.Z.File.Rename(s,e),400),u((0,x.RenameSuccess)({fileId:s,name:e}))}catch(e){d((e=>e+1)),T.Z.Show((0,pn.Mm)(e))}finally{l("editable")}}),[u,s]);return(0,ms.jsx)(hn.xu,{children:i?(0,ms.jsx)(xn,{onEditCompleted:p,status:a,value:n},`${s}-${n}-${c}`):(0,ms.jsx)(hn.xv,{children:n})})},Sn=(e,t)=>e.file.id===t.file.id&&e.file.name===t.file.name,vn=(0,o.memo)(wn,Sn);var In=s(94184),kn=s.n(In);class Tn extends o.PureComponent{constructor(){super(),this.onClick=this.onClick.bind(this)}onClick(e){this.props.disabled||(this.props.href||e.preventDefault(),this.props.onClick())}render(){const e=kn()("btn",this.props.scope,this.props.className,{"align-left":this.props.align,"btn-block":this.props.block,"btn-busy":this.props.busy,"btn-disabled":this.props.disabled,"btn-fixed":this.props.fixed,"btn-hidden":this.props.hidden,"btn-icon-only":!this.props.label,"btn-link":this.props.link,"btn-mini":this.props.mini,"btn-tiny":this.props.tiny}),t=this.props.icon?(0,ms.jsx)("i",{className:this.props.icon}
201):null,s=this.props.iconRight?(0,ms.jsx)("i",{className:this.props.iconRight}):null;let r=this.props.label?(0,ms.jsx)("span",{className:"btn-label",children:this.props.label}):null;if(this.props.busy&&(r=(0,ms.jsx)("span",{className:"btn-label",children:(0,ms.jsx)("span",{style:{opacity:0},children:this.props.label})})),this.props.href&&!this.props.native)return(0,ms.jsxs)(p.rU,{className:e,id:this.props.id,style:this.props.style,to:this.props.href,children:[t,r,s]});let n={className:e,id:this.props.id,onClick:this.onClick,style:this.props.style};if(this.props.href&&this.props.native)return n={...n,href:this.props.href,target:this.props.target},(0,ms.jsxs)("a",{...n,children:[t,r,s]});const i={className:e,id:this.props.id,onClick:"button"===this.props.type?this.onClick:void 0,style:this.props.style,type:this.props.type};return(0,ms.jsxs)("button",{...i,children:[t,r,s]})}}Tn.propTypes={align:en().string,block:en().bool,busy:en().bool,className:en().string,disabled:en().bool,fixed:en().bool,hidden:en().any,href:en().string,icon:en().string,iconRight:en().string,id:en().string,label:en().node,link:en().bool,mini:en().bool,native:en().bool,onClick:en().func,scope:en().string,spinnerColor:en().string,style:en().object,target:en().string,tiny:en().bool,type:en().string},Tn.defaultProps={align:null,block:!1,busy:!1,className:null,disabled:!1,fixed:!1,hidden:!1,href:null,icon:null,iconRight:null,id:null,label:null,link:!1,mini:!1,native:!1,onClick:P.Z,scope:"btn-default",spinnerColor:"#FFF",style:null,target:"_self",tiny:!1,type:"button"};var An=s(85365);const En=An.Z.select`
202  opacity: 0;
203  position: relative;
204  padding: 0;
205  z-index: 2;
206  width: 50px;
207  height: 33px;
208`;class Mn extends o.Component{constructor(){super(),this.onSelect=this.onSelect.bind(this)}onSelect(e){const t=this.props.options.findKey((t=>t.get("value")===e.target.value));this.props.onSelect(t,this.props.name,e.target.value),ps()(this.select).blur()}render(){const e=this.props.keepDefaultValue?"":this.props.value||this.props.options.getIn([this.props.selected,"value"]),t=this.props.required?null:(0,ms.jsx)("option",{value:"",children:this.props.defaultOption}),s={disabled:this.props.disabled,onChange:this.onSelect,ref:e=>{this.select=e},value:e};return(0,ms.jsxs)(hn.xu,{className:"form-select",sx:{backgroundColor:"component-bg",borderRadius:"default",overflow:"hidden"},children:[(0,ms.jsxs)(En,{...s,children:[t,this.props.options.map((e=>{const t="function"==typeof e.get("label")?e.get("label")():e.get("label");return(0,ms.jsx)("option",{id:e.get("id")||e.get("value"),value:e.get("value"),children:t},e.get("value"))}))]}),(0,ms.jsx)(hn.kC,{sx:{alignItems:"center",bg:"component-bg",borderRadius:"default",height:"100%",justifyContent:"center",left:0,position:"absolute",top:0,width:"100%"},children:(0,ms.jsx)("i",{className:this.props.mobileIcon})})]})}}Mn.propTypes={defaultOption:en().string,disabled:en().bool,keepDefaultValue:en().bool,mobileIcon:en().string,name:en().string,onSelect:en().func.isRequired,options:en().instanceOf(u.aV).isRequired,required:en().bool,selected:en().number,value:en().string},Mn.defaultProps={defaultOption:b.ZP.app_selectbox_default_value_label(),disabled:!1,keepDefaultValue:!1,mobileIcon:"",name:"",required:!1,selected:null,value:""};class jn extends o.PureComponent{constructor(){super(),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.handleClickOutside=this.handleClickOutside.bind(this),this.state={isContentVisible:!1}}componentDidMount(){this.props.isMobile||(document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("touchstart",this.handleClickOutside))}componentWillUnmount(){this.props.isMobile||(document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("touchstart",this.handleClickOutside))}handleClickOutside(e){this.wrapper&&!this.wrapper.contains(e.target)&&this.setState({isContentVisible:!1})}onMouseOut(){this.setState({isContentVisible:!1})}onMouseOver(){this.setState({isContentVisible:!0})}render(){const e=this.props.options.get(this.props.selected),t=this.props.disabled||0===this.props.options.size;return this.props.isMobile?(0,ms.jsx)(Mn,{defaultOption:this.props.label,disabled:t,icon:this.props.icon,keepDefaultValue:this.props.keepDefaultValue,mobileIcon:this.props.mobileIcon,name:"mobile-dropdown",onSelect:e=>this.props.onChange(this.props.options.get(e),e),options:this.props.options,selected:this.props.selected}):t?(0,ms.jsx)("div",{className:"dropdown dropdown-gray",ref:e=>{this.wrapper=e},children:(0,ms.jsx)(Tn,{className:"dropdown-label",disabled:!0,fixed:this.props.fixed,icon:this.props.icon,iconRight:this.props.iconRight,label:e?e.get("label"):this.props.label})}):(0,ms.jsxs)("div",{className:kn()("dropdown dropdown-gray",{"dropdown-content-visible":this.state.isContentVisible}),onMouseOut:this.onMouseOut,onMouseOver:this.onMouseOver,ref:e=>{this.wrapper=e}
208,children:[(0,ms.jsx)(Tn,{className:"dropdown-label",fixed:this.props.fixed,icon:this.props.icon,iconRight:this.props.iconRight,label:e?e.get("label"):this.props.label,onClick:()=>{this.props.onClick(this.props.options.get(0),0),this.setState((e=>({isContentVisible:!e.isContentVisible})))}}),(0,ms.jsx)("div",{className:"dropdown-content",children:this.props.options.map(((e,t)=>{const s="function"==typeof e.get("label")?e.get("label")():e.get("label"),r=e.get("id")||s,n=e.get("icon")?(0,ms.jsx)("i",{className:e.get("icon"),id:r}):null,i=e.get("iconRight")?(0,ms.jsx)("i",{className:e.get("iconRight")}):null,o=n||i,a=kn()("dropdown-option",{"with-icon":o});return(0,ms.jsx)("div",{className:a,onClick:()=>{this.props.onChange(e,t),this.setState({isContentVisible:!1})},children:(0,ms.jsx)("a",{children:(0,ms.jsxs)("span",{children:[n,s,i]})})},s)}))})]})}}jn.propTypes={disabled:en().bool,fixed:en().bool,icon:en().string,iconRight:en().string,isMobile:en().bool,keepDefaultValue:en().bool,label:en().string,mobileIcon:en().string,onChange:en().func,onClick:en().func,options:en().instanceOf(u.aV),selected:en().number},jn.defaultProps={disabled:!1,fixed:!1,icon:"",iconRight:"",isMobile:!1,keepDefaultValue:!1,label:"",mobileIcon:"",onChange:P.Z,onClick:P.Z,options:(0,u.aV)(),selected:void 0};const Dn=(0,u.d0)([{direction:"asc",icon:"flaticon stroke type-1",label:b.ZP.files_sort_name_label,value:"name"},{direction:"asc",icon:"flaticon solid signal-bars-1",label:b.ZP.files_sort_size_label,value:"size"},{direction:"asc",icon:"flaticon stroke calendar-1",label:b.ZP.files_sort_date_added_label,value:"date"},{direction:"asc",icon:"flaticon stroke calendar-4",label:b.ZP.files_sort_date_modified_label,value:"modified"},{direction:"asc",icon:"flaticon stroke multiple-documents-1",label:b.ZP.files_sort_type_label,value:"type"},{direction:"asc",icon:"flaticon stroke eye-1",label:b.ZP.files_sort_watch_status_label,value:"watch"}]),Cn=e=>{let{isMobile:t,onChange:s,options:r,value:n}=e;const[i,o]=n.toLowerCase().split("_"),a=r.findIndex((e=>e.get("value")===i)),l=r.get(a),c=l.get("icon"),d=l.get("label");return r=r.setIn([a,"iconRight"],"asc"===o?"flaticon stroke up-4":"flaticon stroke down-4").setIn([a,"direction"],"asc"===o?"desc":"asc"),(0,ms.jsx)(jn,{fixed:!t,icon:c,iconRight:"flaticon stroke down-1",isMobile:t,keepDefaultValue:t,label:b.ZP.files_sort_sorted_label(d()),mobileIcon:"flaticon stroke down-square-1",onChange:e=>{const t=e.get("value"),r=e.get("direction");return s(`${t}_${r}`.toUpperCase())},options:r})};Cn.propTypes={isMobile:en().bool,onChange:en().func.isRequired,options:en().instanceOf(u.aV),value:en().string},Cn.defaultProps={isMobile:!1,options:Dn,value:"DATE_DESC"};const Rn=Cn;var Nn=s(784);const Pn=()=>{},On=e=>{let{checked:t,disabled:s,label:r,onChange:n}=e;const i=(0,o.useCallback)((e=>{s||(e.preventDefault(),n(!t,e))}),[t,s,n]);return(0,ms.jsx)("span",{onClick:i,style:{display:"contents"},children:(0,ms.jsx)(Nn.X,{input:{checked:t,disabled:s,name:"checkbox",onBlur:Pn,onChange:Pn,onFocus:Pn,value:t},label:r,labelStyle:{paddingLeft:3},meta:{}})})};class Ln extends o.Component{onActionSelected=e=>{switch(e.get("value")){case"newfolder":return this.props.onNewFolder();case"rename":return this.props.onRename();case"delete":return this.props.onDelete();case"move":return this.props.onMove();case"extractall":return this.props.onExtract();case"rss":return this.props.onRssFeed();case"zip":return this.props.onZip();case"share":return this.props.onShare();case"public-share":return this.props.onPublicShare();case"vlc":return this.props.onVlcPlaylist();case"links":return this.props.onGetDownloadLinks();case"convert-to-mp4":return this.props.onConvertToMp4();case"mark-as-watched":return this.props.onSetWatchStatus(!0);case"mark-as-unwatched":return this.props.onSetWatchStatus(!1)}};render(){const e=this.props.isShared?null:(0,ms.jsx)(jn,{fixed:!this.props.isMobile,icon:"flaticon solid crosshairs-1",iconRight:"flaticon stroke down-1",isMobile:this.props.isMobile,keepDefaultValue:this.props.isMobile,label:b.ZP.files_menu_label(),mobileIcon:"flaticon solid crosshairs-1",onChange:this.onActionSelected,options:this.props.actions}),t=this.props.selectAllLabel?(0,ms.jsx)(hn.xu,{children:(0,ms.jsx)(On,{checked:this.props.selectAll,disabled:!this.props.selectableCount,label:this.props.selectAllLabel,onChange:this.props.onAllSelected})}
208):null,s=this.props.isShared?null:(0,ms.jsx)(hn.xu,{sx:{position:"relative"},children:(0,ms.jsx)(Rn,{isMobile:this.props.isMobile,onChange:this.props.onSort,value:this.props.sortBy})});return(0,ms.jsxs)("div",{className:"file-list-header",children:[t,(0,ms.jsxs)(hn.kC,{sx:{alignItems:"baseline",gap:2},children:[(0,ms.jsx)(hn.xu,{sx:{position:"relative"},children:e}),s]})]})}}Ln.propTypes={actions:en().instanceOf(u.aV).isRequired,isMobile:en().bool.isRequired,isShared:en().bool.isRequired,onAllSelected:en().func.isRequired,onConvertToMp4:en().func.isRequired,onDelete:en().func.isRequired,onExtract:en().func.isRequired,onGetDownloadLinks:en().func.isRequired,onMove:en().func.isRequired,onNewFolder:en().func.isRequired,onPublicShare:en().func.isRequired,onRename:en().func.isRequired,onRssFeed:en().func.isRequired,onSetWatchStatus:en().func.isRequired,onShare:en().func.isRequired,onSort:en().func.isRequired,onVlcPlaylist:en().func.isRequired,onZip:en().func.isRequired,selectAll:en().bool.isRequired,selectAllLabel:en().oneOfType([en().string,en().bool]),selectableCount:en().number.isRequired,sortBy:en().string.isRequired},Ln.defaultProps={selectAllLabel:b.ZP.files_select_none()};var Zn=s(12467),Fn=s(82250),zn=s(37455);class Un extends o.PureComponent{render(){const{file:e}=this.props;return(0,ms.jsxs)("div",{className:"image-container",children:[(0,ms.jsx)("div",{className:"left",children:(0,ms.jsx)("div",{className:"image-content",children:(0,ms.jsx)(Fn.e,{alt:e.get("name"),file_id:e.get("id")})})}),(0,ms.jsx)("div",{className:"right",children:(0,ms.jsx)(zn.N.Root,{children:(0,ms.jsx)(zn.N.List,{})})})]})}}Un.propTypes={file:en().instanceOf(u.D5).isRequired};const Vn=(0,Zn.y)(Un,{error:{kind:"custom",render:e=>(0,ms.jsx)(an.H,{error:e})}});var Yn=s(94927),Wn=s(33611);class Gn extends o.PureComponent{render(){const e=this.props.prefix||[this.props.checkbox,this.props.icon].length,t=kn()(this.props.className,"list-item",`list-item-prefix-${e}`,{"list-item-1-row":!this.props.subtitles,"list-item-2-row":this.props.subtitles}),s=this.props.checkbox.shouldRender?(0,ms.jsx)("div",{className:"list-item-select-area",children:(0,ms.jsx)(On,{checked:this.props.checkbox.checked,disabled:!0})}):null,r=this.props.icon?(0,ms.jsx)("div",{className:"list-item-icon",children:(0,ms.jsx)(Wn.O,{sx:{borderRadius:"default",height:25,width:25}})}):null,n=this.props.subtitles?(0,ms.jsx)("div",{className:"list-item-subtitles",children:(0,ms.jsx)(Wn.O,{sx:{height:9,width:`${this.props.subtitleWidth}%`}})}):null,i=(0,ms.jsxs)("div",{className:"list-item-title-container",children:[(0,ms.jsx)("div",{className:"list-item-title",children:(0,ms.jsx)(Wn.O,{sx:{height:13,mb:1,width:`${this.props.titleWidth}%`}})}),n]});return(0,ms.jsxs)("div",{className:t,style:this.props.style,children:[s,r,i]})}}Gn.propTypes={checkbox:en().object,className:en().string,icon:en().bool,prefix:en().number,style:en().object,subtitleWidth:en().number,subtitles:en().bool,titleWidth:en().number},Gn.defaultProps={checkbox:{checked:!1,shouldRender:!1},className:"",icon:!1,prefix:null,style:{},subtitleWidth:50*Math.random(),subtitles:!1,titleWidth:50*Math.random()};var Hn=s(10231),Bn=s(18361);class $n extends o.PureComponent{render(){const e=kn()("list-item",this.props.className,{checked:this.props.selected}),t=this.props.link?p.rU:hn.xu;return(0,ms.jsxs)("div",{className:e,style:this.props.style,children:[(0,ms.jsx)("div",{className:"list-item-select-area",children:this.props.checkbox||(0,ms.jsx)(hn.xu,{sx:{width:20}})}),(0,ms.jsx)(t,{style:{display:"block",flex:1,height:"100%",minWidth:0},...this.props.onClick?{onClick:this.props.onClick}:{to:this.props.link},children:(0,ms.jsxs)(hn.kC,{sx:{alignItems:"center",gap:3,height:"100%"},children:[(0,ms.jsx)("div",{className:"list-item-icon",children:this.props.icon}),(0,ms.jsxs)("div",{className:"list-item-title-container",children:[(0,ms.jsx)("div",{className:"list-item-title",children:this.props.title}),this.renderSubtitles()]})]})}),this.renderActions()]})}renderActions(){const e=this.props.actions.filter((e=>null!==e));return e.length?(0,ms.jsx)("div",{className:"list-item-actions",children:e.map(((e,t)=>(0,ms.jsx)("div",{className:"list-item-action",children:e},t)))}):null}renderSubtitles(){const e=this.props.subtitles.filter((e=>!!e));return e.length?(0,ms.jsx)(hn.kC,{sx:{alignItems:"flex-end",flexDirection:"row",gap:1,userSelect:"none"},children:e.map(((t,s)=>(0,ms.jsxs)(o.Fragment,{children:[(0,ms.jsx)(hn.xv,{variant:"text.caption",children:t}),s===e.length-1?null:(0,ms.jsx)(hn.xv,{variant:"text.caption",children:"-"})]},s)))}):null}}$n.propTypes={actions:en().arrayOf(en().node),checkbox:en().node,className:en().string,icon:en().node,link:en().string,onClick:en().func,selected:en().bool,style:en().object,subtitles:en().arrayOf(en().node),title:en().node},$n.defaultProps={actions:[],checkbox:null,className:"",icon:null,link:"",onClick:null,selected:!1,style:{},subtitles:[],title:""};class qn extends o.PureComponent{onDownload=e=>{if(e.preventDefault(),"application/x-directory"===this.props.contentType)return this.props.onDownloadFolder({id:this.props.id,label:this.props.name})};onSelect=(e,t)=>
208{this.props.onSelect(this.props.id,e,t)};onTriggerSelect=()=>{this.checkboxContainerRef.current&&this.checkboxContainerRef.current.getElementsByTagName("input")[0].click()};constructor(){super(),this.checkboxContainerRef=(0,o.createRef)()}render(){const{currentUser:e,id:t,selectable:s}=this.props;let r={href:`${l.Z.apiURL}/v2/files/${t}/download?oauth_token=${e.get("download_token")}`,target:"_self",title:"Download file"},n=null,i=null,o=null;switch(this.props.renderType){case"folder":i=(0,ms.jsx)("i",{className:"flaticon solid open-folder-3"}),r={onClick:this.onDownload,title:"Download directory as zip"};break;case"image":i=(0,ms.jsx)("i",{className:"flaticon solid image-1"});break;case"video":i=(0,ms.jsx)("span",{className:"file-item-img file-type-video",style:{backgroundImage:`url(${this.props.thumbnail})`}}),o=this.props.watched?(0,ms.jsx)("div",{className:"accessed",children:(0,ms.jsx)("i",{className:"flaticon stroke eye-1"})}):null;break;case"audio":n=this.props.onPlayAudio,i=(0,ms.jsx)("i",{className:"flaticon solid music-1"});break;case"archive":case"pdf":i=(0,ms.jsx)("i",{className:"flaticon solid document-1"});break;default:i=(0,ms.jsx)("i",{className:"flaticon stroke document-3"})}let a=`/files/${this.props.id}`;const c="SHARED_ROOT"!==this.props.folderType?(0,ms.jsx)("a",{className:"download-l
208ink",...r,children:(0,ms.jsx)("i",{className:"flaticon solid down-circle-3"})}):null,d=this.props.sender?(0,ms.jsxs)("span",{className:"file-sender",children:[(0,ms.jsx)("i",{className:"flaticon solid user-1"})," ",this.props.sender]}):null,u=(0,z.$G)((0,z.hh)(this.props.name),{length:120});let p=[(0,z.Gj)(this.props.size),(0,z.bM)(this.props.createdAt),d],_=[o,c];if(this.props.isTrashFile){const e=b.ZP.trash_file_deleted_at((0,z.bM)(this.props.deletedAt)),t=b.ZP.trash_file_expires_on((0,z.p6)(this.props.expirationDate));a=null,n=this.onTriggerSelect,_=[],p=[(0,z.Gj)(this.props.size),e,t]}return(0,ms.jsx)($n,{actions:_,checkbox:s?(0,ms.jsx)(hn.xu,{ref:this.checkboxContainerRef,children:(0,ms.jsx)(On,{checked:this.props.selected,onChange:this.onSelect})}):null,icon:i,id:this.props.id,link:a,onClick:n,selected:this.props.selected,style:this.props.style,subtitles:p,title:u})}}qn.propTypes={contentType:en().string.isRequired,createdAt:en().string.isRequired,currentUser:en().instanceOf(u.D5).isRequired,deletedAt:en().string,expirationDate:en().string,folderType:en().any,id:en().number.isRequired,isTrashFile:en().bool,name:en().string.isRequired,onDownloadFolder:en().func.isRequired,onPlayAudio:en().func.isRequired,onSelect:en().func.isRequired,selectable:en().bool.isRequired,selected:en().bool,sender:en().string,size:en().number.isRequired,style:en().object,thumbnail:en().string,watched:en().bool},qn.defaultProps={deletedAt:"",expirationDate:"",folderType:"",isTrashFile:!1,selected:!1,sender:"",style:{},thumbnail:"",watched:!1};const Qn=e=>{let{allSelected:t=!1,currentUser:s,fetching:r=!1,files:n,isTrashList:i=!1,onDownloadFolder:a=P.Z,onPagination:l,onPlayAudio:c=P.Z,onSelect:d,paginationFetching:u=!1,push:p=P.Z,resolved:_=!1,rowHeight:h=60,sortedBy:g="",total:m}=e;const f=n.get("result"),y=(0,o.useRef)(null),[b,x]=(0,o.useState)(0);(0,o.useLayoutEffect)((()=>{const e=()=>{const e=y.current;x(e?e.getBoundingClientRect().top+window.scrollY:0)},t="undefined"==typeof ResizeObserver?null:new ResizeObserver(e);return e(),window.addEventListener("resize",e),t?.observe(document.body),()=>{window.removeEventListener("resize",e),t?.disconnect()}}),[n]);const w=(0,Yn.hO)({count:m,estimateSize:()=>h,overscan:5,scrollMargin:b});return(0,Hn.M)(w,{dataKey:f,hasMore:f.size<m,isLoading:u,loadMore:l,loadedCount:f.size,threshold:25}),(0,ms.jsxs)("div",{children:[(0,ms.jsx)(Bn.f,{visible:_&&r}),(0,ms.jsx)("div",{className:"file-list",ref:y,style:{height:w.getTotalSize(),position:"relative",width:"100%"},children:w.getVirtualItems().map((e=>{const r=f.get(e.index),o={height:e.size,left:0,position:"absolute",top:0,transform:`translateY(${e.start-b}px)`,width:"100%"};if(!r)return(0,ms.jsx)(Gn,{checkbox:{checked:t,shouldRender:!0},icon:!0,style:o,subtitles:!0},e.key);const l=n.getIn(["entities","files",r.toString()]);return(0,ms.jsx)(qn,{contentType:l.get("content_type"),createdAt:"date"===g?l.get("created_at"):l.get("updated_at"),currentUser:s,deletedAt:l.get("deleted_at"),expirationDate:l.get("expiration_date"),folderType:l.get("folder_type"),id:l.get("id"),isTrashFile:i,name:l.get("name"),onDownloadFolder:a,onPlayAudio:()=>c(l),onSelect:d,push:p,renderType:(0,sn.T)(l.toJS()),selectable:l.get("selectable"),selected:l.get("selected"),sender:l.get("is_shared")?l.get("sender_name"):"",size:l.get("size"),style:o,thumbnail:l.get("icon"),watched:l.get("start_from")>0},e.key)}))})]})};Qn.propTypes={allSelected:en().bool,currentUser:en().instanceOf(u.D5).isRequired,fetching:en().bool,files:en().instanceOf(u.D5).isRequired,isTrashList:en().bool,onDownloadFolder:en().func,onPagination:en().func.isRequired,onPlayAudio:en().func,onSelect:en().func.isRequired,paginationFetching:en().bool,push:en().func,resolved:en().bool,rowHeight:en().number,sortedBy:en().string,total:en().number.isRequired};const Kn=Qn;var Jn=s(20909);const Xn=(0,Zn.y)((e=>{let{file:t}=e;return(0,ms.jsxs)("div",{className:"markdown-container",children:[(0,ms.jsx)("div",{className:"left",children:(0,ms.jsx)(Jn.D,{file_id:t.get("id")})}),(0,ms.jsx)("div",{className:"right",children:(0,ms.jsx)(zn.N.Root,{children:(0,ms.jsx)(zn.N.List,{})})})]})}),{error:{kind:"custom",render:e=>(0,ms.jsx)(an.H,{error:e})}});var ei=s(11616);class ti extends o.PureComponent{render(){return(0,ms.jsxs)("div",{className:"other-file-container",children:[(0,ms.jsx)("div",{className:"left",children:(0,ms.jsx)(ei.H,{file:this.props.file.toJS()})}),(0,ms.jsx)("div",{className:"right",children:(0,ms.jsx)(zn.N.Root,{children:(0,ms.jsx)(zn.N.List,{})})})]})}}ti.propTypes={file:en().instanceOf(u.D5).isRequired};const si=(0,Zn.y)(ti,{error:{kind:"custom",render:e=>(0,ms.jsx)(an.H,{error:e})}});var ri=s(69048);const ni=(0,Zn.y)((e=>{let{file:t}=e;return(0,ms.jsxs)("div",{className:"text-container",children:[(0,ms.jsx)("div",{className:"left",children:(0,ms.jsx)(ri.J,{file_id:t.get("id")})}),(0,ms.jsx)("div",{className:"right",children:(0,ms.jsx)(zn.N.Root,{children:(0,ms.jsx)(zn.N.List,{})})})]})}),{error:{kind:"custom",render:e=>(0,ms.jsx)(an.H,{error:e})}});var ii=s(86169),oi=s(73059),ai=s(98357),li=s.n(ai),ci=s(23556);const di=e=>({file_id:e.id,file_name:e.name,file_type:e.file_type}),ui=s.n(ci)()((async e=>{try{const{data:t}=await e.get("/ifttt-client/status");return t.enabled}catch{return!1}}),{promise:!0}),pi=e=>(0,oi.XR)(e)&&429===e.data.status_code;var _i=s(62822),hi=s(81602),gi=s(1553),mi=s(13751),fi=s(32711),yi=s.n(fi),bi=s(59060);const xi=(0,pr.N)((()=>Promise.resolve().then(s.bind(s,13111))),{fallback:(0,ms.jsx)(bi.Z,{})}),wi=(0,pr.N)((()=>Promise.all([s.e(4671),s.e(8588)]).then(s.bind(s,58588))),{fallback:(0,ms.jsx)(bi.Z,{})}),Si=(0,pr.N)((()=>s.e(2156).then(s.bind(s,82156))),{fallback:(0,ms.jsx)(bi.Z,{})});class vi extends o.PureComponent{render(){switch(this.props.player){case"chromecast":{const e=yi()(this.props,["id","title","contentType","stream","hls","duration","poster","subtitles"]);
208return(0,ms.jsx)(mi.J,{...e,subtitles:e.subtitles.toJS()})}case"shaka":return(0,ms.jsx)(wi,{...this.props});case"jwplayer":return(0,ms.jsx)(Si,{...this.props});default:return(0,ms.jsx)(xi,{...this.props})}}}vi.propTypes={onPlaybackStarted:en().func,onPlaybackStopped:en().func,player:en().string},vi.defaultProps={onPlaybackStarted:P.Z,onPlaybackStopped:P.Z,player:"videojs"};const Ii=vi,ki=o.memo((e=>{const[t]=(0,js.E)("video_player"),{connected:s}=(0,gi.Z)(),r=s?"chromecast":t;return(0,ms.jsx)(Ii,{...e,player:r})}));var Ti=s(59320),Ai=s(17653),Ei=s(70028),Mi=s(91369),ji=s(86794),Di=s(15490),Ci=s(80363);const Ri=()=>{const[e,,t,s]=(0,Mi.R)("hide_subtitles"),[r,,n,i]=(0,Mi.R)("dont_autoselect_subtitles"),[o,,a,l]=(0,Mi.R)("subtitle_languages"),c=[{accessory:{checked:!e,onChange:e=>s(!e),type:"switch"},indicator:(0,Ci.w)(t),title:b.ZP.settings_form_show_subtitles_label(),visible:!0},{accessory:{checked:r,onChange:e=>i(e),type:"switch"},indicator:(0,Ci.w)(n),title:b.ZP.settings_form_dont_autoselect_subtitles_label(),visible:!e},{accessory:{onSelect:e=>l(e,{apiValueModifier:e=>e.filter((e=>null!==e)).join(",")}),type:"subtitle-languages-dropdown",value:o,vertical:!0},description:(0,ms.jsx)(ji.G,{children:b.ZP.settings_form_defaultsubtitle_help()}),indicator:(0,Ci.w)(a),title:b.ZP.settings_form_defaultsubtitle_label(),visible:!e}];return(0,ms.jsx)(ms.Fragment,{children:c.filter((e=>e.visible)).map((e=>(0,ms.jsx)(Di.H,{...e},e.title.toString())))})},Ni=()=>new Ei.u_({component:Ri,name:"subtitle-settings-modal",size:Ei.u_.SIZES.SMALL,title:"Subtitle settings"}).Show();var Pi=s(63259),Oi=s(27447);const Li=e=>{let{source:t}=e;const{icon:s,label:r}=(0,o.useMemo)((()=>{switch(t){case"mkv":return{icon:{name:"film-strip-1",type:"stroke"},label:"File"};case"folder":return{icon:{name:"folder-1",type:"solid"},label:"Folder"};case"opensubtitles_rest":return{icon:{name:"globe-1",type:"stroke"},label:"OpenSubtitles"};default:return{icon:{name:"globe-1",type:"stroke"},label:"Unknown"}}}),[t]);return(0,ms.jsx)(Pi.u,{label:`${r}`,children:(0,ms.jsx)(hn.kC,{sx:{alignItems:"center"},children:(0,ms.jsx)(Oi.J,{...s,size:12})})})};class Zi extends o.PureComponent{onChangeSubtitleInput=()=>{this.props.onUploadSubtitle(this.subtitleInput.files[0])};onToggleShow=e=>{e.preventDefault(),this.setState((e=>{let{open:t,settings:s}=e;return{open:!t,settings:s}}))};constructor(){super(),this.state={open:!1}}render(){const{languages:e,resolved:t,subtitles:s,uploading:r}=this.props,n=r||!t?(0,ms.jsx)(Bn.f,{full:!0}):null;let i=this.state.open?(0,ms.jsx)("li",{children:(0,ms.jsx)("span",{className:"subtitle-toggle",children:(0,ms.jsx)("a",{onClick:this.onToggleShow,children:b.ZP.files_subtitles_hide_label()})})}):(0,ms.jsx)("li",{children:(0,ms.jsx)("span",{className:"subtitle-toggle",children:(0,ms.jsx)("a",{onClick:this.onToggleShow,children:b.ZP.files_subtitles_show_label()})})});s.count()<=3&&(i=null);const o=s.count()>=3&&!this.state.open?s.take(3):s;let a="";0===s.count()&&(a=b.ZP.files_subtitles_empty_result_message(),0===e.count()&&(a=b.ZP.files_subtitles_nolanguageset_message())),this.props.uploading&&(a=b.ZP.files_subtitles_uploading());const l=a?(0,ms.jsx)("div",{children:(0,ms.jsx)("span",{className:"message",children:a})}):(0,ms.jsxs)("ul",{children:[o.map((e=>(0,ms.jsxs)("li",{children:[(0,ms.jsx)(Li,{source:e.get("source")}),(0,ms.jsx)(hn.xv,{className:"language",children:e.get("language")}),(0,ms.jsx)(hn.xv,{children:"-"}),(0,ms.jsx)(hn.xv,{className:"name",title:e.get("name"),children:e.get("name")}),(0,ms.jsx)(hn.xv,{className:"link",children:(0,ms.jsx)("a",{href:e.get("link"),target:"_self",children:(0,ms.jsx)("i",{className:"flaticon solid down-circle-3"})})})]},e.get("link")))),i]});return(0,ms.jsxs)("div",{className:"video-subtitles",children:[(0,ms.jsxs)("div",{children:[(0,ms.jsxs)("div",{className:"subtitles-header",children:[(0,ms.jsx)("h3",{children:b.ZP.files_subtitles_title()}),(0,ms.jsxs)("div",{className:"actions",children:[this.props.onUploadSubtitle&&!this.props.isShared&&(0,ms.jsx)("span",{className:"action",children:(0,ms.jsxs)("a",{onClick:e=>{e.preventDefault(),this.subtitleInput.click()},children:[(0,ms.jsx)("i",{className:"flaticon stroke plus-1"}
208)," ",b.ZP.files_subtitles_addyourown_label()]})}),(0,ms.jsx)("span",{className:"action",children:(0,ms.jsx)("a",{onClick:Ni,children:(0,ms.jsx)("i",{className:"flaticon stroke settings-1"})})})]})]}),(0,ms.jsxs)("div",{className:"subtitles-content",children:[n,l]})]}),(0,ms.jsx)("input",{accept:".srt",onChange:this.onChangeSubtitleInput,ref:e=>{this.subtitleInput=e},type:"file"})]})}}Zi.propTypes={isShared:en().bool,languages:en().instanceOf(u.aV).isRequired,onUploadSubtitle:en().func,resolved:en().bool,subtitles:en().instanceOf(u.aV).isRequired,uploading:en().bool},Zi.defaultProps={isShared:!1,onUploadSubtitle:null,resolved:!0,uploading:!1};const Fi=e=>{let{currentUser:t,file:s,onTimeChange:r,...n}=e;const i=(0,ii.l)(),a=(e=>{const t=(0,o.useRef)(!1),s=(0,os.E)();(0,o.useEffect)((()=>{ui(s).then((e=>{t.current=e}))}),[s]);const r=(0,o.useCallback)((async()=>{if(t.current)try{await s.IFTTT.SendEvent({eventType:"playback_started",ingredients:di(e)})}catch(e){pi(e)&&(t.current=!1)}}),[s,e]),n=(0,o.useRef)(li()(r,3e4)),i=(0,o.useCallback)((async()=>{if(t.current)try{await s.IFTTT.SendEvent({eventType:"playback_stopped",ingredients:di(e)})}catch(e){pi(e)&&(t.current=!1)}}),[s,e]),a=(0,o.useRef)(li()(i,3e4));return(0,o.useEffect)((()=>{const e=n.current,t=a.current;return()=>{e.cancel(),t.flush()}}),[]),{playbackStarted:n.current,playbackStopped:a.current}})(s.toJS()),[l,c]=(0,o.useState)(!1),[d,u]=(0,js.E)("autoplay_next_video"),{aspectRatio:p,height:_,width:h}=(0,o.useMemo)((()=>{const e=s.getIn(["video_metadata","width"])/2,t=s.getIn(["video_metadata","height"])/2;return{aspectRatio:e&&t?t/e:9/16,height:t,width:e}}),[s]),g=(0,o.useCallback)((e=>r(s,e)),[r,s]),m=(0,o.useCallback)((()=>{const e=_i.Z.hostname({path:`/files/${s.get("id")}`,query:"popup=1&autostart=1"}),t=window.open(e,s.get("name"),`width=${h},height=${_},toolbar=0,menubar=0,location=0,scrollbars=0`);c(!0,(()=>t.focus()))}),[s,_,h]),f=(0,o.useMemo)((()=>s.get("media_info")?.toJS()||{}),[s]),y=(0,o.useCallback)((()=>(0,hi.u)({data:f,title:"Media Info"})),[f]);if(!n.resolved)return(0,ms.jsx)(Bn.f,{visible:!0});const x=t.getIn(["settings","next_episode"])?{autoPlay:d,data:n.nextVideo?n.nextVideo.toJS():null,enabled:!0,onPlay:()=>n.onNextVideo({autoPlay:d}),onToggle:u,resolved:n.nextVideoResolved}:null;let w={hls:{url:i.getHLSStreamURL(s.toJS(),{playOriginal:s.get("can_play_original")})},popup:n.isMobile?null:{onClick:m},showMediaInfo:s.get("media_info")?{onClick:y}:null,stream:{url:i.getStreamURL(s.toJS())},xspf:{url:i.getXSPFURL(s.toJS())}};t.getIn(["settings","use_start_from"])&&(w.watchStatus={onClick:n.onSetWatchStatus,status:s.get("start_from")>0}),s.get("is_mp4_available")&&(w={...w,downloadMp4:{size:s.get("mp4_size"),url:i.getMP4DownloadURL(s.toJS())},saveAsMp4:{onClick:()=>n.SaveAsMp4(s.get("id"))},streamMp4:{url:i.getMP4StreamURL(s.toJS())}});let S=null,v=null;return!n.subtitlesResolved||n.fetchingSubtitles?S=(0,ms.jsx)(bi.Z,{ratio:p}):(v=s.get("can_play")?(0,ms.jsx)(ki,{autoPlayNextVideo:d,autoplay:n.autoplay,contentType:s.get("is_mp4_available")?"video/mp4":s.get("content_type"),currentUser:t,duration:s.getIn(["video_metadata","duration"]),forcePause:l,hls:i.getHLSStreamURL(s.toJS(),{playOriginal:s.get("can_play_original")}),id:s.get("id"),mediaInfo:f,nextVideo:n.nextVideo,onNextVideo:n.onNextVideo,onPlaybackStarted:a.playbackStarted,onPlaybackStopped:a.playbackStopped,onTimeChange:g,poster:s.get("screenshot"),ratio:p,startFrom:t.getIn(["settings","use_start_from"])&&s.get("start_from")||0,stream:s.get("is_mp4_available")?i.getMP4StreamURL(s.toJS()):i.getStreamURL(s.toJS()),subtitles:n.subtitles,title:s.get("name")}):(0,ms.jsx)(Ai.Z,{bg:s.get("screenshot"),data:n.convert,ratio:p}),S=(0,ms.jsxs)("div",{children:[v,t.getIn(["settings","hide_subtitles"])?null:(0,ms.jsx)(Zi,{isMobile:n.isMobile,isShared:s.get("is_shared"),languages:t.getIn(["settings","subtitle_languages"]),onUploadSubtitle:n.onUploadSubtitle,resolved:n.subtitlesResolved,subtitles:n.subtitles,uploading:n.uploadingSubtitle})]})),(0,ms.jsxs)("div",{className:"video-container",children:[(0,ms.jsx)("div",{className:"left",children:S}),(0,ms.jsx)("div",{className:"right",children:(0,ms.jsxs)(zn.N.Root,{children:[(0,ms.jsx)(Ti.C,{connect:b.ZP.chromecast_play(),disconnect:b.ZP.chromecast_stop()}),x?(0,ms.jsx)(zn.N.NextVideo,{...x}):null,(0,ms.jsx)(zn.N.List,{...w})]})})]})};
208Fi.propTypes={SaveAsMp4:en().func,autoplay:en().bool,convert:en().instanceOf(u.D5),currentUser:en().instanceOf(u.D5).isRequired,fetchingSubtitles:en().bool,file:en().instanceOf(u.D5).isRequired,isMobile:en().bool.isRequired,location:en().object.isRequired,nextVideo:en().instanceOf(u.D5),nextVideoResolved:en().bool.isRequired,onCopy:en().func,onDelete:en().func,onMove:en().func,onNextVideo:en().func.isRequired,onSetWatchStatus:en().func.isRequired,onTimeChange:en().func,onUploadSubtitle:en().func,player:en().string,resolved:en().bool.isRequired,subtitles:en().instanceOf(u.aV),subtitlesResolved:en().bool,uploadingSubtitle:en().bool},Fi.defaultProps={SaveAsMp4:null,autoplay:!1,convert:null,fetchingSubtitles:!1,nextVideo:null,onCopy:null,onDelete:null,onMove:null,onTimeChange:null,onUploadSubtitle:null,player:"videojs",subtitles:(0,u.aV)(),subtitlesResolved:!1,uploadingSubtitle:!1};const zi=Fi,Ui=(0,pr.N)((()=>s.e(8836).then(s.bind(s,8836)))),Vi=(0,pr.N)((()=>Promise.all([s.e(2415),s.e(3634)]).then(s.bind(s,63634)))),Yi=(0,pr.N)((()=>Promise.all([s.e(3069),s.e(4192)]).then(s.bind(s,75233))));class Wi extends o.PureComponent{onFileSelect=(e,t,s)=>{const r=this.props.children.getIn(["entities","files",e.toString()]);t?this.props.SelectFile(r,s.nativeEvent.shiftKey):this.props.UnselectFile(r,s.nativeEvent.shiftKey)};onNewFolder=async()=>{const{file:e}=this.props;try{await(0,ln.D)({parentId:e.get("id")}),this.onFetchData(),T.Z.Show({message:b.ZP.files_newfolder_success(),type:T.Z.TYPE.SUCCESS})}catch{}};onVlcPlaylist=()=>{const{children:e}=this.props;if(!e.get("result").filter((t=>{const s=e.getIn(["entities","files",t.toString()]);return["audio","video"].includes((0,sn.T)(s.toJS()))})).size)return T.Z.Show({message:b.ZP.files_vlc_error_noplayablefiles(),type:T.Z.TYPE.ERROR});const{currentUser:t,file:s}=this.props,r=`${l.Z.apiURL}/v2/files/${s.get("id")}/xspf?oauth_token=${t.get("download_token")}`;window.location.replace(r)};renderPageActions=()=>{const{CloneSharedFile:e,file:t}=this.props;if(!t.get("is_shared"))return null;if("folder"!==(0,sn.T)(t.toJS()))return null;const{err:s}=this.props.GetSelectedFiles({fallbackToCurrentFile:!1});return s&&["SHARED_FRIEND","SHARED_ROOT"].includes(t.get("folder_type"))?null:(0,ms.jsx)(dn.z,{onClick:e,size:"sm",variant:"primary",children:b.ZP.files_action_shared_file_clone_label()})};renderPageToolbar=()=>{if("folder"!==(0,sn.T)(this.props.file.toJS()))return null;if(0===this.props.children.get("result").size)return null;const{cursor:e,err:t}=this.props.GetSelectedFiles(),s=t?(0,u.D5)():this.props.children.getIn(["entities","files"]).filter((e=>e.get("selected"))),r=this.props.actions.filter((t=>t.get("enabled")({currentFile:this.props.file,currentUser:this.props.currentUser,cursor:e,selectedFiles:s})));return(0,ms.jsx)(Ln,{actions:r,isMobile:this.props.isMobile,isShared:this.props.file.get("is_shared"),onAllSelected:this.props.ToggleSelectAll,onConvertToMp4:this.props.OnConvertToMp4,onDelete:this.props.OnDelete,onExtract:this.props.OnExtract,onGetDownloadLinks:this.props.OnGetDownloadLinks,onMove:this.props.OnMove,onNewFolder:this.onNewFolder,onPublicShare:this.props.OnPublicShare,onRename:this.props.Rename,onRssFeed:this.props.OnRssFeed,onSetWatchStatus:this.props.OnSetWatchStatusBulk,onShare:this.props.OnShare,onSort:this.props.OnSort,onVlcPlaylist:this.onVlcPlaylist,onZip:this.props.OnZip,selectAll:this.props.allSelected,selectAllLabel:this.getSelectAllLabel(),selectableCount:this.props.children.get("result").size,sortBy:this.props.file.get("sort_by")})};componentDidMount(){this.onFetchData()}componentDidUpdate(e){const{fileId:t="0"}=e.params,{fileId:s="0"}=this.props.params;if(t!==s){if((e.nextVideo?e.nextVideo.getIn(["file","id"]).toString():null)===s)return;return this.onFetchData()}return e.location.query.search!==this.props.location.query.search||e.currentUser.getIn(["settings","hide_subtitles"])!==this.props.currentUser.getIn(["settings","hide_subtitles"])?this.onFetchData():nn()(e.currentUser.getIn(["settings","subtitle_languages"]),this.props.currentUser.getIn(["settings","subtitle_languages"]))?void 0:this.onFetchData()}componentWillUnmount(){this.props.OnLeaveFilesRoute(this.props.file)}getSelectAllLabel(){let e=0;if(this.props.allSelected){const t=this.props.excludeIds.count();if(e=this.props.total-t,!t)return b.ZP.files_select_all(this.props.total)}
208else e=this.getSelected().count();return e?b.ZP.files_select_partial(e):b.ZP.files_select_none()}getSelected(){return this.props.children.getIn(["entities","files"]).filter((e=>e.get("selected")))}onFetchData(){if(this.props.params.username)return this.props.fetchSharedFolder(this.props.params.username);if(this.props.location.query.search){const e=this.props.location.query.search;return this.props.SearchFiles(e)}return this.props.FileInfo(this.props.params.fileId)}render(){const{error:e,file:t,resolved:s}=this.props;if(!s)return(0,ms.jsx)(on.S,{});if(e)return(0,ms.jsx)(an.H,{error:e});if(void 0===t.get("id"))return(0,ms.jsx)(on.S,{});let r=null;switch((0,sn.T)(t.toJS())){case"folder":r=0===this.props.children.get("result").size?this.props.file.get("is_shared")?(0,ms.jsx)(cn.a,{}):(0,ms.jsx)(or.u,{icon:{name:"add-folder-1",type:"stroke"},message:b.ZP.files_emptystate_message(),title:b.ZP.files_emptystate_title(),trigger:{children:b.ZP.files_emptystate_action_label(),onClick:this.onNewFolder},variant:"page"}):(0,ms.jsx)(Kn,{allSelected:this.props.allSelected,currentUser:this.props.currentUser,fetching:this.props.fetching,files:this.props.children,isMobile:this.props.isMobile,onDownloadFolder:this.props.OnDownloadFolder,onPagination:this.props.HandleInfiniteLoad,onPlayAudio:this.props.OnPlayAudio,onSelect:this.onFileSelect,paginationFetching:this.props.pagination.get("fetching"),push:this.props.push,resolved:this.props.resolved,sortedBy:this.props.file.get("sort_by").split("_")[0].toLowerCase(),total:this.props.total});break;case"video":r=(0,ms.jsx)(zi,{...this.props,autoplay:"1"===this.props.location.query.autostart,convert:this.props.convert.get(t.get("id").toString()),nextVideo:this.props.nextVideo,nextVideoResolved:this.props.nextVideoResolved,onNextVideo:this.props.OnNextVideo,onSetWatchStatus:this.props.OnSetWatchStatus,onTimeChange:this.props.MediaTimeChanged,onUploadSubtitle:this.props.UploadSubtitle});break;case"audio":r=(0,ms.jsx)(Ui,{file:t});break;case"text":r=(0,ms.jsx)(ni,{file:t});break;case"text/markdown":r=(0,ms.jsx)(Xn,{file:t});break;case"pdf":r=(0,ms.jsx)(Yi,{file:t});break;case"image":r=(0,ms.jsx)(Vn,{file:t});break;case"epub":r=(0,ms.jsx)(Vi,{file:t});break;default:r=(0,ms.jsx)(si,{file:t})}const n=this.props.breadcrumbs.map((e=>({title:e.label,to:e.go})));return(0,ms.jsx)(un.Z,{actions:this.renderPageActions(),breadcrumbs:n,documentTitle:this.props.file.get("name"),title:(0,ms.jsx)(vn,{file:this.props.file.toJS()}),toolbar:this.renderPageToolbar(),children:r})}}Wi.propTypes={CloneSharedFile:en().func.isRequired,FileInfo:en().func.isRequired,GetSelectedFiles:en().func.isRequired,HandleInfiniteLoad:en().func.isRequired,MediaTimeChanged:en().func.isRequired,OnConvertToMp4:en().func.isRequired,OnDelete:en().func.isRequired,OnDownloadFolder:en().func.isRequired,OnExtract:en().func.isRequired,OnGetDownloadLinks:en().func.isRequired,OnLeaveFilesRoute:en().func.isRequired,OnMove:en().func.isRequired,OnMoveThisFile:en().func.isRequired,OnNextVideo:en().func.isRequired,OnPlayAudio:en().func.isRequired,OnPublicShare:en().func.isRequired,OnRssFeed:en().func.isRequired,OnSetWatchStatus:en().func.isRequired,OnSetWatchStatusBulk:en().func.isRequired,OnShare:en().func.isRequired,OnSort:en().func.isRequired,OnZip:en().func.isRequired,Rename:en().func.isRequired,SearchFiles:en().func,SelectFile:en().func.isRequired,ToggleSelectAll:en().func.isRequired,UnselectFile:en().func.isRequired,UploadSubtitle:en().func.isRequired,actions:en().instanceOf(u.aV).isRequired,allSelected:en().bool.isRequired,breadcrumbs:en().any,children:en().any.isRequired,convert:en().instanceOf(u.D5).isRequired,currentUser:en().instanceOf(u.D5).isRequired,error:en().any,excludeIds:en().instanceOf(u.aV).isRequired,fetchSharedFolder:en().func.isRequired,fetching:en().bool.isRequired,file:en().instanceOf(u.D5),isMobile:en().bool.isRequired,location:en().object.isRequired,nextVideo:en().any,nextVideoResolved:en().bool.isRequired,pagination:en().instanceOf(u.D5).isRequired,params:en().object.isRequired,push:en().func.isRequired,resolved:en().bool.isRequired,route:en().object.isRequired,router:en().object.isRequired,total:en().number.isRequired},Wi.defaultProps={SearchFiles:void 0,breadcrumbs:(0,u.aV)(),error:void 0,file:(0,u.D5)(),nextVideo:void 0};const Gi=(0,Ds.$j)((e=>({actions:e.getIn(["files","actions"]),allSelected:e.getIn(["files","allSelected"]),breadcrumbs:e.getIn(["files","breadcrumbs"]),children:e.getIn(["files","children"]),convert:e.getIn(["files","convert"]),currentUser:e.getIn(["app","currentUser"]),error:e.getIn(["files","error"]),excludeIds:e.getIn(["files","excludeIds"]),fetching:e.getIn(["files","fetching"]),fetchingSubtitles:e.getIn(["files","fetchingSubtitles"]),file:e.getIn(["files","file"]),isMobile:e.getIn(["app","isMobile"]),nextVideo:e.getIn(["files","nextVideo"]),nextVideoResolved:e.getIn(["files","nextVideoResolved"]),pagination:e.getIn(["files","pagination"]),parent:e.getIn(["files","parent"]),resolved:e.getIn(["files","resolved"]),sort:e.getIn(["files","sort"]),subtitles:e.getIn(["files","subtitles"]),subtitlesResolved:e.getIn(["files","subtitlesResolved"]),total:e.getIn(["files","total"]),uploadingSubtitle:e.getIn(["files","uploadingSubtitle"])})),{...x,...F,..._.JM})(Wi);class Hi extends o.PureComponent{constructor(){super(),this.onActionSelected=this.onActionSelected.bind(this)}onActionSelected(e){switch(e.get("value")){case"delete":this.props.onDelete();break;case"move":this.props.onMove();break;case"zip":this.props.onZip();break;case"share":this.props.onShare();break;case"links":this.props.onGetDownloadLinks();break;case"rename":this.props.onRename();break;case"extractall":this.props.onExtract()}}render(){const e=(0,ms.jsx)("div",{className:"action-item",children:(0,ms.jsx)(jn,{fixed:!this.props.isMobile,icon:"flaticon solid crosshairs-1",iconRight:"flaticon stroke down-1",isMobile:this.props.isMobile,label:b.ZP.files_menu_label(),onChange:this.onActionSelected,options:this.props.actions})}),t=this.props.selectAllLabel?(0,ms.jsx)("div",{className:"checkbox-container",children:(0,ms.jsx)(On,{checked:this.props.selectAll,label:this.props.selectAllLabel,onChange:this.props.onAllSelected})}):null;return(0,ms.jsxs)("div",{className:"file-list-header",children:[t,(0,ms.jsx)("div",{className:"actions-bar",children:e})]})}}Hi.propTypes={actions:en().instanceOf(u.aV).isRequired,isMobile:en().bool.isRequired,onAllSelected:en().func.isRequired,onDelete:en().func.isRequired,onExtract:en().func.isRequired,onGetDownloadLinks:en().func.isRequired,onMove:en().func.isRequired,onRename:en().func.isRequired,onShare:en().func.isRequired,onZip:en().func.isRequired,selectAll:en().bool.isRequired,selectAllLabel:en().oneOfType([en().string,en().bool])},Hi.defaultProps={selectAllLabel:"Select All"};var Bi=s(73322),$i=s(70067);const qi=(0,p.EN)((function(e){let{error:t,phrase:s,router:r}=e;const n=(0,Bi.g)({source:"search-page"});return(0,ms.jsx)(or.u,{error:(0,E.j)(t,[...(0,$i.W)({triggers:{goBack:(0,pn.ud)(r)}}),{error_type:"SEARCH_TOO_LONG_QUERY",kind:"api_error_type",localize:()=>({message:"Your search query is too long",recoverySuggestion:{description:"Please try a shorter query",type:"instruction"}})},{kind:"match_condition",localize:()=>({message:"Seems like you entered a magnet URI to the search bar",recoverySuggestion:{description:"Would you like us to add a transfer for that?",trigger:{callback:()=>{n(s),r.push("/transfers")},label:"Add transfer"},type:"action"}}),match:e=>e instanceof U},{kind:"match_condition",localize:()=>({message:"Seems like you entered a URL to the search bar",recoverySuggestion:{description:"Would you like us to add a transfer for that?",trigger:{callback:()=>{n(s),r.push("/transfers")},label:"Add transfer"},type:"action"}}),match:e=>e instanceof V}]),variant:"page"})})),Qi=e=>e.getIn(["search","fetching"]),Ki=e=>e.getIn(["search","phrase"]);class Ji extends o.PureComponent{onFileSelect=(e,t,s)=>{const r=this.props.files.getIn(["entities","files",e.toString()]);t?this.props.SelectFile(r,s.nativeEvent.shiftKey):this.props.UnselectFile(r,s.nativeEvent.shiftKey)};componentDidMount(){const{query:e}=this.props.location;e.phrase&&this.props.SetPhrase(e.phrase,{source:"query-param"})}getSelectAllLabel(){const{files:e}=this.props;if(this.props.allSelected)return b.ZP.files_select_all(e.get("result").size);const t=e.getIn(["entities","files"]).filter((e=>e.get("selected")));return t.count()?b.ZP.files_select_partial(t.size.toString()):b.ZP.files_select_none()}render(){const{error:e,phrase:t,resolved:s}=this.props;return t?s?e?(0,ms.jsx)(qi,{error:e,phrase:t}):0===this.props.total?(0,ms.jsx)(un.Z,{empty:{icon:{name:"zoom-1",type:"solid"},message:b.ZP.files_search_emptystate_message(this.props.phrase),title:b.ZP.files_search_emptystate_title(),trigger:{children:"Go back to your files",onClick:()=>this.props.router.push("/files")}},title:b.ZP.files_search_breadcrumb_title(t),type:"empty"}):(0,ms.jsx)(un.Z,{title:b.ZP.files_search_breadcrumb_title(t),toolbar:this.renderHeader(),children:(0,ms.jsx)(Kn,{currentUser:this.props.currentUser,files:this.props.files,onDownloadFolder:this.props.OnDownloadFolder,onPagination:this.props.Paginate,onPlayAudio:this.props.OnPlayAudio,onSelect:this.onFileSelect,paginationFetching:this.props.pagination.get("fetching"),resolved:this.props.resolved,total:this.props.total})}):(0,ms.jsx)(on.S,{}):null}
208renderHeader(){if(!this.props.resolved)return null;if(0===this.props.files.get("result").count())return null;const e=this.props.files.getIn(["entities","files"]).filter((e=>e.get("selected"))),t=this.props.actions.filter((t=>t.get("enabled")({selectedFiles:e})));return(0,ms.jsx)(Hi,{actions:t,isMobile:this.props.isMobile,onAllSelected:this.props.ToggleSearchSelectAll,onDelete:this.props.OnDelete,onExtract:this.props.OnExtract,onGetDownloadLinks:this.props.OnGetDownloadLinks,onMove:this.props.OnMove,onRename:this.props.OnRename,onShare:this.props.OnShare,onZip:this.props.OnZip,selectAll:this.props.allSelected,selectAllLabel:this.getSelectAllLabel()})}}Ji.propTypes={OnDelete:en().func.isRequired,OnDownloadFolder:en().func.isRequired,OnExtract:en().func.isRequired,OnGetDownloadLinks:en().func.isRequired,OnMove:en().func.isRequired,OnPlayAudio:en().func.isRequired,OnRename:en().func.isRequired,OnShare:en().func.isRequired,OnZip:en().func.isRequired,Paginate:en().func.isRequired,SelectFile:en().func.isRequired,SetPhrase:en().func.isRequired,ToggleSearchSelectAll:en().func.isRequired,UnselectFile:en().func.isRequired,actions:en().instanceOf(u.aV).isRequired,allSelected:en().bool.isRequired,currentUser:en().instanceOf(u.D5).isRequired,fetching:en().bool.isRequired,files:en().instanceOf(u.D5).isRequired,isMobile:en().bool.isRequired,location:en().object.isRequired,pagination:en().instanceOf(u.D5).isRequired,phrase:en().string.isRequired,resolved:en().bool.isRequired,router:en().object.isRequired,total:en().number.isRequired};const Xi=(0,Ds.$j)((e=>({actions:e.getIn(["search","actions"]),allSelected:e.getIn(["search","allSelected"]),currentUser:e.getIn(["app","currentUser"]),error:e.getIn(["search","error"]),fetching:Qi(e),files:e.getIn(["search","files"]),isMobile:e.getIn(["app","isMobile"]),pagination:e.getIn(["search","pagination"]),phrase:Ki(e),resolved:e.getIn(["search","resolved"]),total:e.getIn(["search","total"])})),{...r,..._.JM,OnDownloadFolder:x.OnDownloadFolder,OnPlayAudio:x.OnPlayAudio})(Ji),eo=e=>{let{error:t}=e;return(0,ms.jsx)(un.Z,{error:(0,E.j)(t),title:b.ZP.menu_transfers(),type:"error"})};var to=s(75425);const so=()=>{const{showNewTransferModal:e}=(0,to.c)();return(0,ms.jsx)(un.Z,{empty:{icon:{name:"cloud-download-1",type:"stroke"},message:b.ZP.transfers_empty_state_message(),title:b.ZP.transfers_empty_state_title(),trigger:{children:b.ZP.transfers_empty_state_action_label(),onClick:e}},title:b.ZP.menu_transfers(),type:"empty"})};var ro=s(14757);class no extends o.PureComponent{getAvailability(){if(!this.isTorrent)return null;const{availability:e}=this.props.transfer;return e?["availability",b.ZP.transfers_availability(`${e||0}%`)]:null}getDownloadSize(){if(!this.isTorrent)return null;const{transfer:e}=this.props;return["download-size",b.ZP.transfers_downloaded((0,z.Gj)(e.downloaded),(0,z.Gj)(e.size))]}getFinishedAt(){return["finished-at",(0,ms.jsx)(Pi.u,{label:`${this.props.transfer.finished_at} UTC`,children:`${(0,z.bM)(this.props.transfer.finished_at)}`},"finished-at")]}getLiveStreamStatus(){return this.isLiveStream?["live-stream-status",b.ZP.transfers_live_stream_recording_time((0,z.Qh)(this.props.transfer.recorded_seconds))]:null}getPeerCount(){if(!this.isTorrent)return null;const e=this.props.transfer.peers_connected;return e?["peer-count",b.ZP.transfers_peer_count(e,e)]:["peer-count",b.ZP.transfers_no_peers()]}getPlaylistStatus(){return this.isTorrent||this.isLiveStream?null:100===this.props.transfer.percent_done?["playlist-status",(0,z.Gj)(this.props.transfer.size)]:this.props.transfer.downloaded_items?["playlist-status",b.ZP.transfers_playlist_download_count(this.props.transfer.downloaded_items,this.props.transfer.total_items)]:["playlist-status",b.ZP.transfers_playlist_download_status()]}getRatio(){return this.isTorrent?["ratio",b.ZP.transfers_ratio(this.props.transfer.current_ratio||0)]:null}getSeedRatio(){return this.isTorrent?["seed-ratio",b.ZP.transfers_seed_ratio((0,z.Gj)(this.props.transfer.uploaded),(0,z.Gj)(this.props.transfer.size))]:null}getSeedTime(){if(!this.isTorrent)return null;const e=this.props.transfer.seconds_seeding;return e?["seed-time",b.ZP.transfers_seed_time((0,z.k_)(e))]:null}getStatusMessage(){const{transfer:e}=this.props;let t=[],s=[];switch(e.status){case"WAITING":t.push(["waiting",`${b.ZP.transfers_status_message_waiting()} ${e.error_message?`(${e.error_message})`:""}`]);break;case"PREPARING_DOWNLOAD":t.push(["preparing-download",b.ZP.transfers_status_message_preparing_to_download()]);break;case"IN_QUEUE":t.push(["in-queue",b.ZP.transfers_status_message_in_queue()]);break;case"DOWNLOADING":s=[this.getPeerCount(),this.getDownloadSize(),this.getUploadSize(),this.getAvailability(),this.getPlaylistStatus(),this.getLiveStreamStatus()].filter((e=>null!==e)),t.push(...s);break;case"SEEDING":s=[["seeding",b.ZP.transfers_status_message_seeding()],this.getUploadSize(),this.getUpSpeed(),this.getRatio(),this.getPeerCount(),this.get
208SeedTime()].filter((e=>null!==e)),t.push(...s);break;case"COMPLETED":s=[["completed",b.ZP.transfers_status_message_completed()],this.getSeedRatio(),this.getSeedTime(),this.getRatio(),this.getPlaylistStatus(),this.getFinishedAt()].filter((e=>null!==e)),t.push(...s);break;case"WAITING_FOR_COMPLETE_QUEUE":t.push(["waiting_for_complete_queue",b.ZP.transfers_status_waiting_for_complete_queue()]);break;case"WAITING_FOR_DOWNLOADER":t.push(["waiting_for_downloader",b.ZP.transfers_status_waiting_for_downloader()]);break;case"COMPLETING":case"STOPPING":t.push(["completion_percent",`${b.ZP.transfers_status_message_finishing()} (${e.completion_percent}%)`]);break;case"PREPARING_SEED":t.push(["preparing_seed",b.ZP.transfers_status_message_preparing_to_seed()]);break;case"ERROR":{const s=(e=>e?(0,ro.L)(e)??e:(0,Ws.I)("transfers_status_message_error"))(e.error_message);t.push(["error_message",(0,ms.jsxs)(hn.kC,{sx:{alignItems:"center",gap:1},children:[(0,ms.jsx)(Oi.J,{color:"red-solid",name:"minus-2",size:12,type:"solid"}),(0,ms.jsx)("span",{style:{flex:1},children:s})]},"error-message")]);break}default:t=[]}return e.tracker_message&&t.push(["tracker_message",e.tracker_message]),t}getUpSpeed(){const e=this.props.transfer.up_speed;return e?["up-speed",`${(0,z.Gj)(e)}/s`]:null}getUploadSize(){if(!this.isTorrent)return null;const{transfer:e}=this.props;return["upload-size",b.ZP.transfers_uploaded((0,z.Gj)(e.uploaded),(0,z.Gj)(e.size))]}render(){return(0,ms.jsx)(hn.xu,{variant:"text.caption",children:this.getStatusMessage().map(((e,t)=>{let[s,r]=e;return 0===t?(0,ms.jsx)(o.Fragment,{children:r},s):(0,ms.jsxs)(o.Fragment,{children:[(0,ms.jsx)("span",{children:" | "})," ",r]},s)}))})}get isLiveStream(){return"LIVE_STREAM"===this.props.transfer.type}get isPlaylist(){return"PLAYLIST"===this.props.transfer.type}get isTorrent(){return"TORRENT"===this.props.transfer.type}}no.propTypes={transfer:en().object.isRequired};const io=no,oo=e=>{let{onRetry:t,transfer:s}=e;const r=(0,o.useCallback)((()=>t(s)),[s,t]),n=(0,z.ro)(s.name,{backLength:10,frontLength:50});let i=null;s.is_private?i=(0,bn.tZ)(Oi.J,{name:"lock-2",size:13,type:"solid"}):"PLAYLIST"===s.type&&(i=(0,bn.tZ)(Oi.J,{name:"media-gallery-1",size:13,type:"solid"}));const a=[];if(s.tracker&&a.push({label:`${s.tracker}`}),"ERROR"===s.status&&a.push({label:b.ZP.transfers_retry_label(),onClick:r}),s.client_ip&&a.push({label:s.client_ip}),s.links)for(const e of s.links)a.push({href:e.url,label:e.label,rel:"noopener noreferrer",target:"_blank"});let l=n;return s.file_id&&(l=s.userfile_exists?(0,bn.tZ)(p.rU,{to:`/files/${s.file_id}`,children:n}):(0,bn.tZ)(Pi.u,{label:b.ZP.non_existent_userfile_tip(),children:(0,bn.tZ)(hn.xv,{sx:{cursor:"not-allowed"},children:n})})),(0,bn.BX)(hn.kC,{sx:{alignItems:"baseline",flexWrap:"wrap"},children:[(0,bn.BX)(hn.kC,{sx:{alignItems:"center",gap:1,marginRight:2},children:[i,(0,bn.tZ)(hn.xu,{sx:{flex:1},title:s.name,variant:"text.body",children:l})]}),(0,bn.tZ)("ul",{sx:{"@media (max-width: 960px)":{display:"none"},lineHeight:1,marginBottom:2},children:a.map((e=>{const t=e.onClick||e.href;return(0,bn.tZ)("li",{sx:{"::before":{content:'"  |  "'},":first-of-type":{"::before":{display:"none"}},":hover":{a:{cursor:"var(--config-cursor)",textDecoration:"underline"}},color:"text",display:"inline",fontSize:0},children:t?(0,bn.tZ)("a",{...e,children:e.label}):e.label},e.label)}))})]})},ao=e=>{let{type:t,value:s}=e;const r="up"===t?"flaticon stroke up-4":"flaticon stroke down-4";return(0,bn.BX)("div",{sx:{"&:first-of-type":{marginLeft:0},"&:last-child":{marginRight:0},alignItems:"center",display:"inline-flex",i:{fontSize:12,marginLeft:1},margin:"2px 3px 0 3px"},children:[(0,bn.BX)("span",{children:[(0,z.Gj)(s),"/s"]}),(0,bn.tZ)("i",{className:r})]})},lo=e=>{let{onStopRecording:t,transfer:s}=e;const r=(0,o.useCallback)((()=>t(s)),[s,t]);if("DOWNLOADING"===s.status){let e=null;if("LIVE_STREAM"===s.type)e=(0,bn.tZ)(dn.z,{onClick:r,size:"sm",sx:{minWidth:"110px"},variant:"danger",children:b.ZP.transfers_live_stream_stop_recording()});else switch(s.estimated_time){case null:e=null;break;case-1:e=(0,bn.tZ)("span",{children:"∞"});break;default:e=(0,z.Qh)(s.estimated_time)}
208return(0,bn.BX)("div",{children:[(0,bn.tZ)("div",{sx:{display:"block",fontSize:2,textAlign:"right"},children:e}),(0,bn.BX)("div",{sx:{"@media screen and (max-width: 960px)":{fontSize:0},display:"block",fontSize:1},children:[s.down_speed?(0,bn.tZ)(ao,{type:"down",value:s.down_speed}):null,s.up_speed?(0,bn.tZ)(ao,{type:"up",value:s.up_speed}):null]})]})}return s.userfile_exists?(0,bn.tZ)(p.rU,{to:`/files/${s.file_id}`,children:(0,bn.tZ)(dn.z,{size:"sm",sx:{minWidth:"100px"},variant:"success",children:b.ZP.transfers_gotofile_label()})}):null},co=o.memo((e=>{let{onRemove:t,onRetry:s,onSelect:r,onStopRecording:n,selected:i,transfer:a}=e;const l=(0,o.useMemo)((()=>{const e=a.percent_done||0;let t="transfer-list-item-passive-bg",s="transparent";switch(a.status){case"DOWNLOADING":t="transfer-list-item-finished-bg",s="transfer-list-item-downloading-bg";break;case"COMPLETED":t="transparent";break;case"COMPLETING":case"WAITING_FOR_COMPLETE_QUEUE":case"SEEDING":s="transfer-list-item-completing-bg"}return{"&:after":{backgroundColor:s,width:`${Number.parseInt(e.toString(),10)}%`},backgroundColor:t}}),[a]),c=(0,o.useCallback)(((e,t)=>r(a,e,t)),[a,r]),d=(0,o.useCallback)((()=>t(a.id)),[a,t]);return(0,bn.BX)("li",{sx:{"&:after":{backgroundColor:l["&:after"].backgroundColor,content:'""',display:"block",height:"100%",left:0,position:"absolute",top:0,width:l["&:after"].width,zIndex:1},alignItems:"center",backgroundColor:l.backgroundColor,borderBottomColor:"line",borderBottomStyle:"solid",borderBottomWidth:1,display:"flex",paddingX:0,paddingY:3,position:"relative",width:"100%",wordBreak:"break-word"},children:[(0,bn.tZ)(hn.xu,{sx:{marginLeft:[1,3],marginRight:3,zIndex:2},children:a.selectable?(0,bn.tZ)(On,{checked:i,onChange:c}):(0,bn.tZ)(Pi.u,{label:"Remove",children:(0,bn.tZ)("button",{onClick:d,sx:{"&:hover":{"& i":{visibility:"visible"},background:"transparent",cursor:"var(--config-cursor)"},background:"green-solid",border:"none",borderRadius:"50%",display:"block",fontSize:"100%",height:16,lineHeight:1,margin:"0 2px",padding:0,width:16},type:"button",children:(0,bn.tZ)("i",{className:"flaticon solid x-2",sx:{color:"red-solid",fontSize:15,lineHeight:1,visibility:"hidden"}})})})}),(0,bn.BX)("div",{sx:{"@media (max-width: 960px)":{alignItems:"flex-start",flexDirection:"column"},alignItems:"center",display:"flex",flex:1,justifyContent:"space-between",zIndex:2},children:[(0,bn.BX)("div",{children:[(0,bn.tZ)(oo,{onRetry:s,transfer:a}),(0,bn.tZ)(io,{transfer:a})]}),(0,bn.tZ)("div",{sx:{":empty":{display:"none"},"@media (max-width: 960px)":{margin:0,marginTop:2},marginRight:3,zIndex:2},children:(0,bn.tZ)(lo,{onStopRecording:n,transfer:a})})]})]})}),((e,t)=>nn()(e.transfer,t.transfer)));class uo extends o.Component{constructor(){super(),this.onActionSelected=this.onActionSelected.bind(this)}onActionSelected(e){switch(e.get("value")){case"cancel":return this.props.onCancel();case"reannounce":return this.props.onReannounce()}}render(){const e=(0,ms.jsx)("div",{className:"action-item",children:(0,ms.jsx)(jn,{fixed:!this.props.isMobile,icon:"flaticon solid crosshairs-1",iconRight:"flaticon stroke down-1",isMobile:this.props.isMobile,keepDefaultValue:this.props.isMobile,label:b.ZP.files_menu_label(),mobileIcon:"flaticon solid crosshairs-1",onChange:this.onActionSelected,options:this.props.actions})}),t=this.props.options.getIn([this.props.selected,"direction"]),s=this.props.options.getIn([this.props.selected,"icon"]);let{options:r}=this.props;"asc"===t?r=r.setIn([this.props.selected,"iconRight"],"flaticon stroke up-4"):"desc"===t&&(r=r.setIn([this.props.selected,"iconRight"],"flaticon stroke down-4"));const n=(0,ms.jsx)("div",{className:"action-item",children:(0,ms.jsx)(jn,{fixed:!this.props.isMobile,icon:s,iconRight:"flaticon stroke down-1",isMobile:this.props.isMobile,keepDefaultValue:this.props.isMobile,label:b.ZP.files_sort_sorted_label(r.getIn([this.props.selected,"label"])()),mobileIcon:"flaticon stroke down-square-1",onChange:this.props.onSort,options:r})}),i=this.props.selectAllLabel?(0,ms.jsx)("div",{className:"checkbox-container",children:(0,ms.jsx)(On,{checked:this.props.selectAll,disabled:!this.props.selectableCount,label:this.props.selectAllLabel,onChange:this.props.onAllSelected})}):null;return(0,ms.jsxs)("div",{className:"transfer-header",children:[i,(0,ms.jsxs)("div",{className:"actions-bar",children:[e,n]})]})}}uo.propTypes={actions:en().instanceOf(u.aV).isRequired,isMobile:en().bool.isRequired,onAllSelected:en().func.isRequired,onCancel:en().func.isRequired,onReannounce:en().func.isRequired,onSort:en().func.isRequired,options:en().instanceOf(u.aV).isRequired,selectAll:en().bool.isRequired,selectAllLabel:en().oneOfType([en().string,en().bool]),selectableCount:en().number.isRequired,selected:en().number.isRequired},uo.defaultProps={selectAllLabel:b.ZP.files_select_none()};class po extends o.PureComponent{onClearFinished=()=>{this.props.ClearFinishedTransfers()};onTransferSelected=(e,t,s)=>{if(t)return this.props.SelectTransfer(e,s.nativeEvent.shiftKey);this.props.UnselectTransfer(e,s.nativeEvent.shiftKey)};componentDidMount(){this.props.GetTransfers()}render(){const{transfers:e}=this.props;if(this.props.isFetching&&!this.props.resolved)return(0,ms.jsx)(on.S,{});if(this.props.error)return(0,ms.jsx)(eo,{error:this.props.error});if(!e.get("result").count())return(0,ms.jsx)(so,{});const t=e.getIn(["entities","transfers"]).filter((e=>e.get("selectable"))),s=e.getIn(["entities","transfers"]).filter((e=>e.get("selected")));let r="";return r=this.props.selectAll?b.ZP.files_select_all(s.count()):s.count()?b.ZP.files_select_partial(s.count()):b.ZP.files_select_none(),(0,ms.jsx)(un.Z,{actions:(0,ms.jsx)(dn.z,{disabled:this.props.isFetching,onClick:this.onClearFinished,size:"sm",children:b.ZP.transfers_clear_finished_label()}),title:b.ZP.menu_transfers(),toolbar:(0,ms.jsx)(uo,{actions:this.props.actions,isMobile:this.props.isMobile,onAllSelected:this.props.ToggleSelectAll,onCancel:this.props.CancelTransfers,onReannounce:this.props.Reannounce,onSort:this.props.ChangeSorting,options:this.props.sort.get("options"),selectAll:this.props.selectAll,selectAllLabel:r,selectableCount:t.count(),selected:this.props.sort.get("selected")}),children:(0,ms.jsx)("ul",{className:"transfer-list",children:e.get("result").map((t=>{const s=e.getIn(["entities","transfers",t.toString()]);return(0,ms.jsx)(co,{onRemove:this.props.RemoveTransfers,onRetry:this.props.Retry,onSelect:this.onTransferSelected,onStopRecording:this.props.OnStopRecording,selected:this.props.selectAll||s.get("selected"),transfer:s.toJS()},t)}))})})}}po.propTypes={CancelTransfers:en().func.isRequired,ChangeSorting:en().func.isRequired,ClearFinishedTransfers:en().func.isRequired,GetTransfers:en().func.isRequired,OnStopRecording:en().func.isRequired,Reannounce:en().func.isRequired,RemoveTransfers:en().func.isRequired,Retry:en().func.isRequired,SelectTransfer:en().func.isRequired,ToggleSelectAll:en().func.isRequired,UnselectTransfer:en().func.isRequired,actions:en().instanceOf(u.aV).isRequired,error:en().instanceOf(Error),isFetching:en().bool.isRequired,isMobile:en().bool.isRequired,resolved:en().bool.isRequired,selectAll:en().bool.isRequired,sort:en().instanceOf(u.D5).isRequired,transfers:en().instanceOf(u.D5).isRequired};const _o=(0,Ds.$j)((e=>({actions:e.getIn(["transfers","actions"]),currentUser:e.getIn(["app","currentUser"]),error:e.getIn(["transfers","error"]),isFetching:e.getIn(["transfers","isFetching"]),isMobile:e.getIn(["app","isMobile"]),processing:e.getIn(["transfers","processing"]),resolved:e.getIn(["transfers","resolved"]),selectAll:e.getIn(["transfers","selectAll"]),sort:e.getIn(["transfers","sort"]),transfers:e.getIn(["transfers","transfers"])})),n)(po),ho=()=>
208{const[e,t]=(0,js.E)("dismissed.trash_expiration_message");return e?null:(0,ms.jsx)(Js.P,{dismissable:!0,message:(0,Ws.I)("trash_info"),onDismiss:()=>t(!0),type:"warning"})},go=e=>{switch(e.type){case"all-selected":return b.ZP.files_select_all(e.count);case"partially-selected":return b.ZP.files_select_partial(e.count);default:return b.ZP.files_select_none()}},mo=e=>{const t=(0,u.d0)([{icon:"flaticon stroke move-up-1",id:"Trash-Actions-Restore",label:b.ZP.trash_menu_restore_label(),value:"restore"},{icon:"flaticon stroke trash-2",id:"Trash-Actions-Delete",label:b.ZP.trash_menu_delete_label(),value:"delete"}]);return(0,ms.jsxs)("div",{className:"trash-list-header",children:[(0,ms.jsx)(On,{checked:e.selectAll,label:go(e.selectionState),onChange:e.onAllSelected}),(0,ms.jsx)("div",{className:"actions-bar",children:(0,ms.jsx)("div",{className:"action-item",children:(0,ms.jsx)(jn,{disabled:"none-selected"===e.selectionState.type,fixed:!e.isMobile,icon:"flaticon solid crosshairs-1",iconRight:"flaticon stroke down-1",isMobile:e.isMobile,keepDefaultValue:e.isMobile,label:b.ZP.trash_menu_label(),mobileIcon:"flaticon solid crosshairs-1",onChange:t=>e.actionHandlers[t.get("value")](),options:t})})})]})};mo.propTypes={actionHandlers:en().object.isRequired,isMobile:en().bool.isRequired,onAllSelected:en().func.isRequired,selectAll:en().bool.isRequired,selectionState:en().object.isRequired};const fo=mo;class yo extends o.PureComponent{componentDidMount(){this.props.GetTrashFiles()}getSelectionState(){if(this.props.allSelected)return{count:this.props.total,type:"all-selected"};const e=this.props.files.getIn(["entities","files"]),t=e?e.filter((e=>e.get("selected"))).count():0;return t?{count:t,type:"partially-selected"}:{type:"none-selected"}}render(){return this.props.resolved?this.props.error?(0,ms.jsx)(un.Z,{error:(0,E.j)(this.props.error),title:b.ZP.menu_trash(),type:"error"}):this.props.total?(0,ms.jsx)(un.Z,{actions:this.props.total?(0,ms.jsx)(dn.z,{icon:{name:"trash-1",type:"stroke"},onClick:this.props.OnEmpty,size:"sm",variant:"danger",children:b.ZP.trash_empty_label()}):null,title:b.ZP.menu_trash(),toolbar:(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(hn.xu,{mt:2,sx:{":empty":{display:"none"}},children:(0,ms.jsx)(ho,{})}),(0,ms.jsx)(fo,{actionHandlers:{delete:this.props.OnDelete,restore:this.props.OnRestore},isMobile:this.props.isMobile,onAllSelected:this.props.ToggleSelectAll,selectAll:this.props.allSelected,selectionState:this.getSelectionState()})]}),children:(0,ms.jsx)("div",{className:"trash",children:(0,ms.jsx)(Kn,{...this.props,isTrashList:!0,onPagination:this.props.PaginateTrashFiles,onSelect:this.props.ToggleFileSelect,paginationFetching:this.props.pagination.get("fetching")})})}):(0,ms.jsx)(un.Z,{empty:{icon:{name:"trash-1",type:"stroke"},message:b.ZP.trash_no_files_message(),title:b.ZP.trash_no_files_title(),trigger:{children:"Go to your files",onClick:()=>this.props.router.push("/files")}},title:b.ZP.menu_trash(),type:"empty"}):(0,ms.jsx)(on.S,{})}}yo.propTypes={GetTrashFiles:en().func.isRequired,OnDelete:en().func.isRequired,OnEmpty:en().func.isRequired,OnRestore:en().func.isRequired,PaginateTrashFiles:en().func.isRequired,ToggleFileSelect:en().func.isRequired,ToggleSelectAll:en().func.isRequired,allSelected:en().bool.isRequired,currentUser:en().instanceOf(u.D5).isRequired,error:en().string,files:en().instanceOf(u.D5).isRequired,isMobile:en().bool.isRequired,pagination:en().instanceOf(u.D5).isRequired,resolved:en().bool.isRequired,router:en().shape({push:en().func.isRequired}).isRequired,total:en().number.isRequired},yo.defaultProps={error:null};const bo=(0,Ds.$j)((e=>({allSelected:e.getIn(["trash","allSelected"]),currentUser:e.getIn(["app","currentUser"]),error:e.getIn(["trash","error"]),fetching:e.getIn(["trash","fetching"]),files:e.getIn(["trash","files"]),isMobile:e.getIn(["app","isMobile"]),pagination:e.getIn(["trash","pagination"]),resolved:e.getIn(["trash","resolved"]),total:e.getIn(["trash","total"])})),{...i})(yo);var xo=s(75856);const wo=o.createContext(void 0),So=e=>{let{children:t}=e;const[s,r]=o.useState();return(0,o.useEffect)((()=>{const e=(0,m.WH)();if(e?.push_token){const t=(0,xo.createPutioSocketClient)({token:e.push_token,url:l.Z.socketURL});t.on("connect",(()=>{r(t)})),t.on("error",(()=>{r(t)})),t.on("disconnect",(()=>{r(t)}))}}),[]),(0,ms.jsx)(wo.Provider,{value:s,children:t})},vo=()=>o.useContext(wo),Io=(0,pr.N)((()=>Promise.all([s.e(8047),s.e(9183)]).then(s.bind(s,29183)).then((e=>
208e.SupportAccessWidget)))),ko=e=>{let{children:t}=e;const s=_r.Z.getAdminToken();return(0,ms.jsxs)(ms.Fragment,{children:[s&&(0,ms.jsx)(Io,{}),t]})};var To=s(55522),Ao=s(7443);function Eo(e){const t=(0,ii.l)(),{file:s,onCancel:r,onEnd:n}=e;return(0,ms.jsx)(Z.Z,{className:"task-audio-player",onCancel:r,status:Z.Z.STATUS.DONE,title:"Now Playing",children:(0,ms.jsxs)("div",{className:"task-audio-player-content",children:[(0,ms.jsx)("div",{className:"current-title",children:(0,ms.jsx)(p.rU,{title:s.get("name"),to:`/files/${s.get("parent_id")}`,children:(0,z.ro)(s.get("name"),{backLength:10,frontLength:23})})}),(0,ms.jsx)(Ao.z,{autoPlay:!0,onEnd:n,url:t.getStreamURL({...s.toJS(),content_type:"audio"})},s.get("id"))]})})}Eo.propTypes={file:en().instanceOf(u.D5).isRequired,onCancel:en().func.isRequired,onEnd:en().func.isRequired,onTimeUpdate:en().func.isRequired};class Mo extends o.PureComponent{onContinue=e=>{e.preventDefault(),this.props.onCancel(),this.props.push(`/files/${this.props.file.get("id")}?autostart=1`)};render(){const{file:e}=this.props;return(0,ms.jsx)(Z.Z,{className:"task-continue-watching",onCancel:this.props.onCancel,status:Z.Z.STATUS.DONE,title:"Continue Watching",children:(0,ms.jsxs)("div",{className:"task-continue-watching-content",children:[(0,ms.jsx)("img",{alt:e.get("name"),src:e.get("screenshot")}),(0,ms.jsx)("a",{className:"image-overlay",onClick:this.onContinue,children:(0,ms.jsx)("span",{children:e.get("name")})})]})})}}Mo.propTypes={file:en().instanceOf(u.D5).isRequired,onCancel:en().func.isRequired,push:en().func.isRequired};var jo=s(13749),Do=s(44094),Co=s(28867),Ro=s(40238);const No=[{label:b.ZP.files_downloadlinks_modal_showall_label(),value:"all"},{label:b.ZP.files_downloadlinks_modal_showmedia_label(),value:"media"},{label:b.ZP.files_downloadlinks_modal_showmp4_label(),value:"mp4"}],Po=e=>{const t=No.filter((t=>"all"===t.value||"media"===t.value&&e.media_links.length>0||"mp4"===t.value&&e.mp4_links.length>0));return(0,ms.jsx)(ms.Fragment,{children:(0,ms.jsx)(jo.l0,{initialValues:{filter:"all"},onSubmit:P.Z,render:s=>{let{handleSubmit:r,values:n}=s;return(0,ms.jsxs)(Do.Y,{onSubmit:r,children:[t.length>1&&(0,ms.jsx)(jo.gN,{component:Co.d,data:t,fullWidth:!0,name:"filter"}),(0,ms.jsx)(jo.gN,{component:Ro.D,format:()=>{switch(n.filter){case"all":return e.download_links.join("\n");case"media":return e.media_links.join("\n");case"mp4":return e.mp4_links.join("\n")}},name:"links"})]})}})})};class Oo extends o.PureComponent{componentDidMount(){this.props.onStart()}render(){const{payload:e,status:t}=this.props;let s,r;const n=e.get("label");if(t!==Z.Z.STATUS.NEW&&t!==Z.Z.STATUS.RUNNING||(s=b.ZP.task_download_links_title_new(),r=(0,ms.jsx)("p",{className:"message",children:b.ZP.task_download_links_message_new()})),t===Z.Z.STATUS.DONE){const e=b.ZP.task_download_links_title_done(n);s=(0,ms.jsx)("span",{children:(0,ms.jsx)("a",{onClick:()=>{return e=this.props.payload.get("links").toJS(),new Ei.u_({component:Po,name:"download-l
208inks",title:b.ZP.files_downloadlinks_modal_title()}).Show(e);var e},children:e})}),r=(0,ms.jsx)("div",{children:(0,ms.jsx)("p",{className:"message",children:b.ZP.task_download_links_message_done()})})}return t===Z.Z.STATUS.ERROR&&(s=b.ZP.task_download_links_title_error(n),r=(0,ms.jsx)("div",{children:(0,ms.jsx)("p",{className:"message",children:e.get("errorMessage")})})),(0,ms.jsx)(Z.Z,{className:"task-download-links",onCancel:this.props.onCancel,status:t,title:s,children:r})}}Oo.propTypes={onCancel:en().func.isRequired,onStart:en().func.isRequired,payload:en().instanceOf(u.D5).isRequired,status:en().string.isRequired};var Lo=s(47873),Zo=s(40153),Fo=s(38571),zo=s(57671);class Uo extends o.PureComponent{onSubmit=e=>{let{input:t}=e;this.props.onOkay(t)};static Show(e){return new Ei.u_({content:function(){return(0,ms.jsx)(Uo,{label:e.label,onOkay:e=>this.Destroy(null,e),password:e.password,placeholder:e.placeholder,type:e.type,value:e.value})},name:"prompt-modal",size:Ei.u_.SIZES.SMALL}).Show()}render(){return(0,ms.jsx)(jo.l0,{initialValues:{input:this.props.value},onSubmit:this.onSubmit,render:e=>{let{handleSubmit:t}=e;return(0,ms.jsxs)(Do.Y,{onSubmit:t,children:[(0,ms.jsx)(jo.gN,{component:this.props.password?Lo.W:Zo.d,"data-autofocus":!0,label:this.props.label,name:"input",placeholder:this.props.placeholder}),(0,ms.jsx)(Fo.Z,{children:(0,ms.jsx)(zo.Z,{children:(0,ms.jsx)(dn.z,{type:"submit",variant:"primary",children:b.ZP.app_prompt_dialog_ok()})})})]})}})}}Uo.propTypes={label:en().string.isRequired,onOkay:en().func.isRequired,password:en().bool,placeholder:en().string,value:en().string},Uo.defaultProps={password:!1,placeholder:"",value:""};class Vo extends o.PureComponent{enterPassword=e=>{Uo.Show({label:b.ZP.task_extraction_password_prompt_label(),password:!0,placeholder:b.ZP.task_extraction_password_prompt_placeholder()}).then((t=>{t&&this.props.onPassword(e,t)}))};render(){let e;const t=(0,ms.jsx)("div",{children:(0,ms.jsx)("ul",{className:"extract-file-list",children:this.props.payload.getIn(["extractions","entities","extractions"]).entrySeq().map((e=>{let[t,s]=e;const r={ERROR:s.get("message"),EXTRACTED:b.ZP.task_extraction_status_done(),EXTRACTING:b.ZP.task_extraction_status_extracting(),NEW:b.ZP.task_extraction_status_new(),PASSWORD_OBTAINED:b.ZP.task_extraction_status_password_obtained(),SENT_TO_QUEUE:b.ZP.task_extraction_status_in_queue()};"PASSWORD"===s.get("status")&&("Password required"===s.get("message")&&(r.PASSWORD=b.ZP.task_extraction_status_password_required()),"Password incorrect"===s.get("message")&&(r.PASSWORD=b.ZP.task_extraction_status_password_incorrect()));const n="PASSWORD"===s.get("status")?(0,ms.jsx)(mn.h,{icon:{name:"lock-1",size:"small",type:"solid"},onClick:()=>this.enterPassword(s.get("files").first()),size:"sm"}):(0,ms.jsx)("span",{title:r[s.get("status")],children:r[s.get("status")]});return(0,ms.jsxs)("li",{children:[(0,ms.jsx)(hn.xu,{sx:{fontSize:0,mb:1},variant:"text.body",children:s.get("name")}),(0,ms.jsx)(hn.xu,{variant:"text.caption",children:n})]},t)}))})});return this.props.status===Z.Z.STATUS.NEW&&(e=b.ZP.task_extraction_title_new()),this.props.status===Z.Z.STATUS.RUNNING&&(e=b.ZP.task_extraction_title_running()),this.props.status===Z.Z.STATUS.DONE&&(e=b.ZP.task_extraction_title_done()),this.props.status===Z.Z.STATUS.PARTIALLY_DONE&&(e=b.ZP.task_extraction_status_partially_done()),this.props.status===Z.Z.STATUS.ERROR&&(e=b.ZP.task_extraction_title_error()),(0,ms.jsx)(Z.Z,{className:"task-extract",onCancel:this.props.onCancel,onTick:this.props.onTick,status:this.props.status,title:e,children:t})}}Vo.propTypes={onCancel:en().func.isRequired,onPassword:en().func.isRequired,onTick:en().func.isRequired,payload:en().instanceOf(u.D5).isRequired,status:en().string.isRequired};const Yo=e=>{let{onCancel:t,onStart:s,payload:r,status:n}=e;(0,Os.Z)((()=>{s()}));const i=(0,Ds.I0)();let o,a;if(n!==Z.Z.STATUS.NEW&&n!==Z.Z.STATUS.RUNNING||(o=b.ZP.task_shared_file_clone_title_new(),a=(0,ms.jsx)("p",{className:"message",children:b.ZP.task_shared_file_clone_message_new(r.get("label"))})),n===Z.Z.STATUS.DONE){const e=b.ZP.task_shared_file_clone_title_done();o=(0,ms.jsx)("span",{children:(0,ms.jsx)("a",{onClick:()=>{i((0,_.VF)(`/files/${r.get("parentId")}`))},children:e})}),a=(0,ms.jsx)("div",{children:(0,ms.jsx)("p",{className:"message",children:b.ZP.task_shared_file_clone_message_done()})})}return n===Z.Z.STATUS.ERROR&&(o=b.ZP.task_shared_file_clone_title_error(r.get("label")),a=(0,ms.jsx)("div",{children:(0,ms.jsx)("p",{className:"message",children:r.get("errorMessage")})})),(0,ms.jsx)(Z.Z,{className:"task-shared-file-clone",onCancel:t,status:n,title:o,children:a})};Yo.propTypes={onCancel:en().func.isRequired,onStart:en().func.isRequired,payload:en().instanceOf(u.D5).isRequired,status:en().string.isRequired};const Wo=Yo;var Go=s(50586),Ho=s(9950),Bo=s(69739);const $o=e=>{let{children:t,hover:s}
208=e;const[r,n]=(0,o.useState)(!1);return(0,ms.jsx)("div",{onMouseLeave:()=>n(!1),onMouseOver:()=>n(!0),children:r?s:t})},qo=e=>{let{file:t,onCancel:s,onRestart:r,status:n}=e;const i=(0,Ds.I0)(),a=(0,o.useMemo)((()=>{switch(n.type){case"error":return(0,ms.jsx)(mn.h,{appearance:"icon",icon:{name:"refresh-1",size:16,type:"stroke"},onClick:()=>{r()},title:"Retry"});case"completed":{const e=(0,ms.jsx)(Oi.J,{color:"green-solid",name:"checkmark-2",size:18,type:"solid"});if("file"===n.payload.type){const t=n.payload.file_id;return(0,ms.jsx)($o,{hover:(0,ms.jsx)(mn.h,{appearance:"icon",icon:{name:"right-4",size:19,type:"stroke"},onClick:()=>{i((0,_.VF)(`/files/${t}`))},title:"Go to file"}),children:e})}return(0,ms.jsx)($o,{hover:(0,ms.jsx)(mn.h,{appearance:"icon",icon:{name:"right-4",size:19,type:"stroke"},onClick:()=>{i((0,_.VF)("/transfers"))},title:"Go to your transfers"}),children:e})}case"progress":return(0,ms.jsx)($o,{hover:(0,ms.jsx)(mn.h,{appearance:"icon",icon:{name:"pause-4",size:19,type:"solid"},onClick:s,title:"Pause",variant:"default"}),children:(0,ms.jsx)(hn.yi,{color:"green-solid",size:20,strokeWidth:5,value:n.progress/100})});case"aborted":return(0,ms.jsx)($o,{hover:(0,ms.jsx)(mn.h,{appearance:"icon",icon:{name:"play-4",size:19,type:"solid"},onClick:r,title:"Resume",variant:"success"}),children:(0,ms.jsx)(hn.yi,{color:"solid",size:20,strokeWidth:5,value:n.progress/100})});default:return null}}),[s,r,n,i]),l=(0,o.useMemo)((()=>{switch(n.type){case"aborted":return(0,ms.jsx)(hn.xv,{children:"Upload paused."});case"completed":return"transfer"===n.payload.type?(0,ms.jsx)(hn.xv,{children:"Transfer added!"}):(0,z.Gj)(t.size);case"error":return(0,ms.jsx)(hn.xv,{color:"red-text-secondary",children:n.payload.message});default:return(0,z.Gj)(t.size)}}),[n,t.size]),c=(0,o.useMemo)((()=>"error"===n.type?(0,ms.jsx)(Oi.J,{color:"red-solid",name:"minus-2",size:12,type:"solid"}):(0,ms.jsx)(Oi.J,{...(0,Bo.L)(t.type),size:12})),[t.type,n.type]);return(0,ms.jsxs)(hn.kC,{sx:{alignItems:"flex-start",gap:2,justifyContent:"space-between"},children:[(0,ms.jsx)(hn.xu,{variant:"text.caption",children:c}),(0,ms.jsxs)(hn.xu,{sx:{flex:1,wordBreak:"break-word"},children:[(0,ms.jsx)(hn.xu,{sx:{color:"text",lineHeight:"heading",mb:1},variant:"text.caption",children:t.name}),(0,ms.jsx)(hn.xu,{sx:{lineHeight:"narrow"},variant:"text.caption",children:l})]}),(0,ms.jsx)(hn.xu,{sx:{pl:1},variant:"text.caption",children:a})]})},Qo=e=>{let{file:t,parentId:s}=e;return`${s}-${t.name}`},Ko=e=>{const t=(0,os.E)(),[s,r]=(0,o.useState)({}),n=(0,o.useCallback)((e=>{let{file:s,parentId:n}=e;const i=Qo({file:s,parentId:n}),o=Go.h.upload({authToken:t.token??"",file:s,targetFolderId:n});r((e=>({...e,[i]:{file:s,id:i,parentId:n,status:{progress:0,type:"progress"},task:o}}))),o.emitter.on("progress",(e=>{r((t=>({...t,[i]:{...t[i],status:{progress:e,type:"progress"}}})))})),o.emitter.on("complete",(e=>{r((t=>({...t,[i]:{...t[i],status:{payload:e,type:"completed"}}})))})),o.emitter.on("error",(e=>{r((t=>({...t,[i]:{...t[i],status:{payload:e,type:"error"}}})))})),o.emitter.on("abort",(()=>{r((e=>{const t=e[i],s="progress"===t.status.type?t.status.progress:0;return{...e,[i]:{...t,status:{progress:s,type:"aborted"}}}}))}))}),[t.token]);(0,o.useEffect)((()=>{for(const{files:t,parentId:r}of e.tasks)for(const e of t){const t=Qo({file:e,parentId:r});s[t]||n({file:e,parentId:r})}}),[e.tasks,n,s]);const{activeTasks:i,completedTasks:a}=(0,o.useMemo)((()=>{const e={},t={};for(const[r,n]of Object.entries(s))"progress"===n.status.type&&(e[r]=n),"completed"===n.status.type&&(t[r]=n);return{activeTasks:e,completedTasks:t}}),[s]),l=(0,o.useMemo)((()=>Object.entries(s).length>=12),[s]),{status:c,title:d}=(0,o.useMemo)((()=>{if(Object.values(i).length)return{status:Z.Z.STATUS.RUNNING,title:(0,Ws.I)("task_upload_title_running")};const e=Object.values(a).length;return e?{status:Z.Z.STATUS.DONE,title:(0,Ws.I)("task_upload_title_done",e,e)}:{status:Z.Z.STATUS.PARTIALLY_DONE,title:(0,Ws.I)("task_upload_title_none")}}),[i,a]),u=(0,o.useCallback)((()=>{for(const e of Object.values(i))e.task.abort();e.onCancel()}),[i,e]);return(0,ms.jsx)(Z.Z,{onCancel:u,status:c,title:d,children:(0,ms.jsx)(hn.xu,{mt:2,children:(0,ms.jsx)(Ho.x,{offsetScrollbars:l,style:{height:l?360:"auto",marginRight:l?-6:0,paddingRight:l?6:0},children:Object.values(s).map(((e,t)=>(0,ms.jsx)(hn.xu,{sx:{borderBottomColor:"list-item-border",borderBottomStyle:"solid",borderBottomWidth:t===Object.values(s).length-1?0:1,paddingY:12},children:(0,ms.jsx)(qo,{file:e.file,onCancel:()=>e.task.abort(),onRestart:()=>n({file:e.file,parentId:e.parentId}),status:e.status})},e.id)))})})})};var Jo=s(18047);const Xo=An.Z.div`
209  cursor: var(--config-cursor);
210`,ea=An.Z.span`
211  font-size: var(--fontSize-0);
212  font-weight: var(--fontWeight-heading);
213  color: ${e=>{let{theme:t}=e;return t.colors["text-secondary"]}};
214`,ta=e=>{let{value:t}=e;const[s,r]=(0,o.useState)(!1);return(0,ms.jsx)(Xo,{onClick:()=>r(!s),children:(0,ms.jsx)(ea,{children:s?`${t} bytes`:(0,z.Gj)(t)})})};ta.propTypes={value:en().number.isRequired};const sa=ta;class ra extends o.PureComponent{componentDidMount(){this.props.onStart()}render(){const{payload:e,status:t}=this.props;let s,r;const n=e.get("label");if(t===Z.Z.STATUS.NEW&&(s=b.ZP.task_zip_title_new(),r=(0,ms.jsx)("p",{className:"message",children:b.ZP.task_zip_message_new()})),t===Z.Z.STATUS.RUNNING&&(s=b.ZP.task_zip_title_running(),r=(0,ms.jsx)("p",{className:"message",children:b.ZP.task_zip_message_running()})),t===Z.Z.STATUS.DONE){const t=n||b.ZP.task_zip_title_done();s=(0,ms.jsxs)(hn.kC,{sx:{alignItems:"baseline",gap:2},children:[(0,ms.jsx)(Jo.m,{size:"sm",value:e.get("url")}),(0,ms.jsxs)(hn.kC,{sx:{flex:1,flexDirection:"column"},children:[(0,ms.jsx)("a",{href:e.get("url"),children:t}),(0,ms.jsx)(sa,{value:e.get("size")})]})]}),r=(0,ms.jsx)("div",{children:(0,ms.jsx)("p",{className:"message",children:b.ZP.task_zip_message_done()})})}if(t===Z.Z.STATUS.PARTIALLY_DONE){const t=n||b.ZP.task_zip_title_done();s=(0,ms.jsxs)(hn.kC,{sx:{alignItems:"baseline",gap:2},children:[(0,ms.jsx)(Jo.m,{appearance:"transparent",size:"sm",value:e.get("url")}),(0,ms.jsxs)(hn.kC,{sx:{flex:1,flexDirection:"column"},children:[(0,ms.jsx)("a",{href:e.get("url"),children:t}),(0,ms.jsx)(sa,{value:e.get("size")})]})]}),r=(0,ms.jsxs)("div",{children:[(0,ms.jsx)("p",{className:"message",children:b.ZP.task_zip_message_error()}),(0,ms.jsx)("p",{className:"message",children:b.ZP.task_zip_error_missing_files_title()}),(0,ms.jsx)("ul",{children:e.get("missing_files").map((e=>(0,ms.jsx)("li",{children:(0,z.$G)(e.get("name"),{length:30})},e.get("name"))))})]})}return t===Z.Z.STATUS.ERROR&&(s=b.ZP.task_zip_title_error(),r=(0,ms.jsx)("div",{children:(0,ms.jsx)("p",{className:"message",children:e.get("errorMessage")})})),(0,ms.jsx)(Z.Z,{className:"task-zip",onCancel:this.props.onCancel,status:t,title:s,children:r})}}ra.propTypes={onCancel:en().func.isRequired,onStart:en().func.isRequired,payload:en().instanceOf(u.D5).isRequired,status:en().string.isRequired};
214class na extends o.PureComponent{render(){if(0===this.props.tasks.count())return null;let e=this.props.folded?(0,ms.jsx)(To.e,{color:"text-secondary",onClick:this.props.ToggleTaskContainerFolding,sx:{fontSize:0},children:b.ZP.tasks_show_tasks_label()}):(0,ms.jsx)(To.e,{color:"text-secondary",onClick:this.props.ToggleTaskContainerFolding,sx:{fontSize:0},children:b.ZP.tasks_hide_tasks_label()});this.props.isMobile||(e=null);const t=this.props.folded?`-${ps()(this.cont).height()}px`:"30px",s=this.props.folded?"hidden":"visible";return(0,ms.jsxs)("div",{id:"tasks-container",children:[(0,ms.jsx)("div",{className:"tasks",ref:e=>{this.cont=e},style:{bottom:t,visibility:s},children:this.props.tasks.entrySeq().map((e=>{let[t,s]=e;if("zip"===s.get("type"))return(0,ms.jsx)(ra,{id:t,onCancel:()=>this.props.CancelTask(t),onStart:()=>this.props.StartZipTask(t),payload:s.get("payload"),status:s.get("status"),zip:s.getIn(["payload","id"])},t);if("upload"===s.get("type"))return(0,ms.jsx)(Ko,{onCancel:()=>this.props.CancelTask("upload"),tasks:s.get("payload").toJS()},s.get("type"));if("extract"===s.get("type"))return(0,ms.jsx)(Vo,{id:t,onCancel:()=>this.props.CancelTask(t),onPassword:(e,t)=>this.props.UnlockExtraction(e,t),onTick:()=>this.props.GetExtractStatus(t),payload:s.get("payload"),status:s.get("status")},t);if("continue_watching"===s.get("type"))return(0,ms.jsx)(Mo,{file:s.getIn(["payload","file"]),id:t,onCancel:()=>this.props.CancelTask(t),push:this.props.push},t);if("audio_player"===s.get("type")){const e=s.getIn(["payload","file"]);return(0,ms.jsx)(Eo,{file:s.getIn(["payload","file"]),id:t,onCancel:()=>this.props.CancelTask(t),onEnd:()=>this.props.OnPlayNextAudio(e)},t)}return"download_links"===s.get("type")?(0,ms.jsx)(Oo,{download_links_info:s.getIn(["payload","id"]),id:t,onCancel:()=>this.props.CancelTask(t),onStart:()=>this.props.StartDownloadLinksTask(t),payload:s.get("payload"),status:s.get("status")},t):"shared_file_clone"===s.get("type")?(0,ms.jsx)(Wo,{id:t,onCancel:()=>this.props.CancelTask(t),onStart:()=>this.props.StartSharedFileClone(t),payload:s.get("payload"),status:s.get("status")},t):null}))}),this.props.tasks.filter((e=>e.get("status")===Z.Z.STATUS.DONE)).size>0?(0,ms.jsxs)(hn.kC,{className:"tasks-footer",sx:{alignItems:"center",justifyContent:e?"space-between":"flex-end",margin:"0 auto",pb:1},children:[e,(0,ms.jsx)(To.e,{color:"text-secondary",onClick:this.props.ClearCompletedTasks,sx:{fontSize:0},children:b.ZP.tasks_clear_completed_label()})]}):null]})}}na.propTypes={CancelTask:en().func.isRequired,ClearCompletedTasks:en().func.isRequired,GetExtractStatus:en().func.isRequired,OnPlayNextAudio:en().func.isRequired,StartDownloadLinksTask:en().func.isRequired,StartSharedFileClone:en().func.isRequired,StartZipTask:en().func.isRequired,ToggleTaskContainerFolding:en().func.isRequired,UnlockExtraction:en().func.isRequired,downloadToken:en().string,folded:en().bool.isRequired,isMobile:en().bool.isRequired,push:en().func.isRequired,tasks:en().instanceOf(u.D5).isRequired},na.defaultProps={downloadToken:""};const ia=(0,Ds.$j)((e=>({downloadToken:e.getIn(["app","currentUser","download_token"]),folded:e.getIn(["tasks","folded"]),isMobile:e.getIn(["app","isMobile"]),tasks:e.getIn(["tasks","tasks"])})),{...F,..._.JM,OnPlayNextAudio:x.OnPlayNextAudio})(na);var oa=s(88670);const aa=()=>{const e=(0,Ds.I0)(),t=vo(),s=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{t&&!s.current&&(s.current=!0,t.on(xo.EVENT_TYPE.USER_UPDATE,(t=>e({source:"socket",type:f.hO,user:t}))),t.on(xo.EVENT_TYPE.PAYMENT_UPDATE,(t=>e(w.PlanUpdated(t)))),t.on(xo.EVENT_TYPE.FILE_CREATE,(t=>e(x.FileCreated(t)))),t.on(xo.EVENT_TYPE.FILE_UPDATE,(t=>e(x.FileUpdated(t)))),t.on(xo.EVENT_TYPE.FILE_MOVE,(t=>e(x.FileMoved(t)))),t.on(xo.EVENT_TYPE.FILE_DELETE,(t=>e(x.FileDeleted(t)))),t.on(xo.EVENT_TYPE.MP4_UPDATE,(t=>e(x.ConvertTaskUpdated(t,x.FileInfo)))),t.on(xo.EVENT_TYPE.TRANSFER_CREATE,(t=>e(Le(t)))),t.on(xo.EVENT_TYPE.TRANSFER_UPDATE,(t=>e(Fe(t)))),t.on(xo.EVENT_TYPE.TRANSFER_DELETE,(t=>e(Ue(t)))))}),[t,e]),(0,ms.jsx)(ms.Fragment,{})};var la=s(67570),ca=s(58943);const da=e=>{let{accountStatusDetails:t,router:s}=e;const r=(0,Ds.I0)(),n=(0,$s.NL)(),[i,a]=(0,o.useState)(!1),l=(0,o.useCallback)((async e=>{if(e.update_url)window.open(e.update_url,"_blank");else if(!i){a(!0);try{await r((0,w.UpdatePaddleBillingPaymentMethod)({subscriptionId:e.subscription_id})),await n.invalidateQueries(la.M)}finally{a(!1)}}}),[r,n,i]),c=(0,o.useCallback)((e=>{switch(e.type){case"has-pending-payment":return(0,ms.jsx)(Js.P,{message:b.ZP.app_passive_account_processing_payment_message(),title:b.ZP.app_passive_account_processing_payment_title(),type:"info"});case"subscription-payment-will-be-retried":return(0,ms.jsx)(Js.P,{action:{label:b.ZP.app_payment_warning_cta_label(),loading:i,onClick:()=>l(e)},message:b.ZP.app_payment_warning_retry_message(e.next_retry_date),title:b.ZP.app_payment_warning_retry_title(),type:"warning"});case"subscription-needs-payment-information-update":return(0,ms.jsx)(Js.P,{action:{label:b.ZP.app_payment_warning_cta_label(),loading:i,onClick:()=>l(e)},message:b.ZP.app_payment_warning_update_payment_information_message(),title:b.ZP.app_payment_warning_update_payment_information_title(),type:"warning"});default:(0,as.Z)(e,"render-active-account-message")}}),[l,i]),d=(0,o.useCallback)((e=>{switch(e.type){case"expired":return(0,ms.jsx)(Js.P,{action:{label:b.ZP.app_expired_account_cta_label(),onClick:()=>s.push("/payment")},message:e.files_will_be_deleted_at?b.ZP.app_passive_account_file_delete_message((0,z.KA)(e.files_will_be_deleted_at)):"",title:b.ZP.app_expired_account_title(),type:"warning"});case"family-plan-expired-member":return(0,ms.jsx)(Js.P,{action:{label:b.ZP.app_expired_account_family_cta_label(),onClick:()=>s.push("/family")},message:b.ZP.app_expired_account_family_member_message(),title:b.ZP.app_expired_account_family_member_title(),type:"warning"});default:(0,as.Z)(e,"render-inactive-account-message")}}),[s]),u=(0,o.useMemo)((()=>{switch(t.status){case"active":return t.meta?c(t.meta):null;case"inactive":return d(t.meta);case"stranger":return(0,ms.jsx)(Js.P,{action:{label:b.ZP.app_stranger_account_cta_label(),onClick:()=>s.push("/billing")},message:b.ZP.app_stranger_account_message(),title:b.ZP.app_stranger_account_title(),type:"success"});default:return(0,as.Z)(t,"account-status-details")}}),[t,c,d,s]);return u?(0,ms.jsx)(hn.xu,{variant:"boxes.page",children:u}):null},ua=(0,p.EN)((e=>{let{router:t}=e;const s=(()=>{const e=(0,m.BP)(),t=(0,ca.a)(la.M,la.w,{enabled:"active"===e.data?.account_status});return(0,o.useMemo)((()=>
214{if("success"!==e.status)return;const{data:s}=e;switch(s.account_status){case"active":{if("success"!==t.status)return;const{data:e}=t;if(e.has_pending_payment)return{meta:{type:"has-pending-payment"},status:s.account_status};const r=e.plan?.subscription;return r?.next_retry_date?{meta:{next_retry_date:r.next_retry_date,subscription_id:r.id,type:"subscription-payment-will-be-retried",update_url:r.update_url},status:s.account_status}:r?.need_payment_information_update?{meta:{subscription_id:r.id,type:"subscription-needs-payment-information-update",update_url:r.update_url},status:s.account_status}:{status:s.account_status}}case"inactive":return{meta:s.is_sub_account?{type:"family-plan-expired-member"}:{files_will_be_deleted_at:s.files_will_be_deleted_at,type:"expired"},status:s.account_status};case"stranger":return{status:s.account_status};default:(0,as.Z)(s.account_status,"account-status")}}),[e,t])})();return s?(0,ms.jsx)(da,{accountStatusDetails:s,router:t}):null})),pa=e=>{let{router:t,warnings:s}=e;return(0,ms.jsx)(hn.xu,{variant:"boxes.page",children:(0,ms.jsxs)(hn.rj,{gap:[2,3],children:[s.callback_url_has_failed&&(0,ms.jsx)(Js.P,{action:{label:"Update URL",onClick:()=>t.push("/settings/callback-url")},message:"The callback URL you have set for transfers has failed recently, please update your URL.",title:"Your callback URL has failed",type:"warning"}),s.pushover_token_has_failed&&(0,ms.jsx)(Js.P,{action:{label:"Update token",onClick:()=>t.push("/settings/pushover-token")},message:"The Pushover token you have set for transfer notifications has failed recently, please update your token.",title:"Your Pushover token has failed",type:"warning"})]})})},_a=(0,p.EN)((e=>{let{router:t}=e;const s=(()=>{const e=(0,m.BP)();return(0,o.useMemo)((()=>e.data?.warnings&&Object.keys(e.data?.warnings).length>0?e.data.warnings:null),[e])})();return s?(0,ms.jsx)(pa,{router:t,warnings:s}):null})),ha="80px",ga={APP_WIDTH:"100%",BREAKPOINT:"SM",CONTENT_PADDING_BOTTOM:ha,CONTENT_PADDING_X:"12px",HEADER_HEIGHT:"calc(48px + env(safe-area-inset-top))",HEADER_LOGO_HEIGHT:"20px",HEADER_PADDING_X:"12px",HEADER_SEARCH_INPUT_HEIGHT:"32px",HEADER_SEARCH_INPUT_WIDTH:"100%",NAVBAR_HEIGHT:"100%",NAVBAR_ITEM_ICON_SPACING:"8px",NAVBAR_ITEM_PADDING_LEFT:"8px",NAVBAR_ITEM_PADDING_RIGHT:"4px",NAVBAR_ITEM_PADDING_Y:"8px",NAVBAR_ITEMS_SPACING:"4px",NAVBAR_PADDING_BOTTOM:"8px",NAVBAR_PADDING_TOP:"8px",NAVBAR_PADDING_X:"8px",NAVBAR_WIDTH:"180px",USER_MENU_AVATAR_SIZE:"32px",USER_MENU_ITEM_ICON_SPACING:"8px",USER_MENU_ITEM_PADDING_LEFT:"8px",USER_MENU_ITEM_PADDING_RIGHT:"4px",USER_MENU_ITEM_PADDING_Y:"8px",USER_MENU_ITEMS_SPACING:"4px",USER_MENU_PADDING_X:"8px",USER_MENU_WIDTH:"180px"},ma={APP_WIDTH:"100%",BREAKPOINT:"MD",CONTENT_PADDING_BOTTOM:ha,CONTENT_PADDING_X:"16px",HEADER_HEIGHT:"60px",HEADER_LOGO_HEIGHT:"30px",HEADER_PADDING_X:"16px",HEADER_SEARCH_INPUT_HEIGHT:"36px",HEADER_SEARCH_INPUT_WIDTH:"300px",NAVBAR_HEIGHT:"100%",NAVBAR_ITEM_ICON_SPACING:"8px",NAVBAR_ITEM_PADDING_LEFT:"8px",NAVBAR_ITEM_PADDING_RIGHT:"4px",NAVBAR_ITEM_PADDING_Y:"8px",NAVBAR_ITEMS_SPACING:"4px",NAVBAR_PADDING_BOTTOM:"16px",NAVBAR_PADDING_TOP:"16px",NAVBAR_PADDING_X:"8px",NAVBAR_WIDTH:"180px",USER_MENU_AVATAR_SIZE:"20px",USER_MENU_ITEM_ICON_SPACING:"8px",USER_MENU_ITEM_PADDING_LEFT:"8px",USER_MENU_ITEM_PADDING_RIGHT:"4px",USER_MENU_ITEM_PADDING_Y:"8px",USER_MENU_ITEMS_SPACING:"4px",USER_MENU_PADDING_X:"8px",USER_MENU_WIDTH:"180px"},fa={APP_WIDTH:"100%",BREAKPOINT:"LG",CONTENT_PADDING_BOTTOM:ha,CONTENT_PADDING_X:"24px",HEADER_HEIGHT:"60px",HEADER_LOGO_HEIGHT:"30px",HEADER_PADDING_X:"24px",HEADER_SEARCH_INPUT_HEIGHT:"36px",HEADER_SEARCH_INPUT_WIDTH:"360px",NAVBAR_HEIGHT:"100%",NAVBAR_ITEM_ICON_SPACING:"12px",NAVBAR_ITEM_PADDING_LEFT:"12px",NAVBAR_ITEM_PADDING_RIGHT:"12px",NAVBAR_ITEM_PADDING_Y:"8px",NAVBAR_ITEMS_SPACING:"4px",NAVBAR_PADDING_BOTTOM:"12px",NAVBAR_PADDING_TOP:"24px",NAVBAR_PADDING_X:"12px",NAVBAR_WIDTH:"240px",USER_MENU_AVATAR_SIZE:"20px",USER_MENU_ITEM_ICON_SPACING:"12px",USER_MENU_ITEM_PADDING_LEFT:"12px",USER_MENU_ITEM_PADDING_RIGHT:"12px",USER_MENU_ITEM_PADDING_Y:"8px",USER_MENU_ITEMS_SPACING:"4px",USER_MENU_PADDING_X:"12px",USER_MENU_WIDTH:"240px"},ya=o.createContext(void 0),ba=e=>{let{children:t,value:s}=e;const r=(0,Is.Gc)(),{theme:{config:{layout:n}}}=(0,Is.Fg)(),i=(0,o.useMemo)((()=>{switch(r){case"SM":return ga;case"MD":return ma;default:return"fluid"===n.type?fa:{...fa,APP_WIDTH:n.width}}}),[r,n]);return(0,ms.jsx)(ya.Provider,{value:{style:i,...s},children:t})},xa=()=>{const e=o.useContext(ya);if(void 0===e)throw new Error("useAppLayoutProps must be used within a AppLayoutProvider");return e};var wa=s(58330),Sa=s(56389);s(21108);const va=(0,An.Z)(Sa.p)`
215  :focus,
216  :focus-visible {
217    position: absolute !important;
218    z-index: ${e=>{let{theme:t}=e;return t.zIndices.skipNav}};
219    background-color: ${e=>{let{theme:t}=e;return t.colors["app-bg"]}};
220    color: ${e=>{let{theme:t}=e;return t.colors.text}};
221    border-radius: ${e=>{let{theme:t}=e;return t.radii.default}}px;
222  }
223`,Ia=Sa.f;var ka=s(88940),Ta=s(2879),Aa=s(22556),Ea=s(87910),Ma=s(31810);const ja=e=>{switch(e.type){case"badge":return(0,bn.tZ)(hn.xu,{sx:{mr:[0,0,-2]},children:(0,bn.tZ)(Ma.C,{value:e.value})});case"text":return(0,bn.tZ)(hn.xu,{sx:{mr:[0,0,-1]},variant:"text.caption",children:e.value});default:(0,as.Z)(e)}},Da=()=>{const{navigationMenu:e,style:t}=xa();return(0,bn.BX)(hn.xu,{as:"nav",sx:{width:"100%"},children:[(0,bn.tZ)(Ea.f,{children:"Main Menu"}),(0,bn.tZ)(hn.kC,{as:"ul",sx:{flexDirection:"column",gap:t.NAVBAR_ITEMS_SPACING},children:e.items.map((e=>(0,bn.tZ)("li",{children:(0,bn.tZ)(p.rU,{sx:{borderRadius:"default",display:"block",overflow:"hidden",
223width:"100%"},to:e.path,children:(0,bn.BX)(hn.kC,{sx:{"@media(hover)":{":hover":{backgroundColor:"nav-item-bg-hover",cursor:"var(--config-cursor)"}},alignItems:"center",backgroundColor:e.active?"nav-item-bg-active":"nav-item-bg",color:"text",fontSize:"0.925rem",fontWeight:e.active?"medium":"body",gap:t.NAVBAR_ITEM_ICON_SPACING,paddingLeft:t.NAVBAR_ITEM_PADDING_LEFT,paddingRight:t.NAVBAR_ITEM_PADDING_RIGHT,paddingY:t.NAVBAR_ITEM_PADDING_Y},children:[(0,bn.tZ)(Oi.J,{name:e.icon.name,type:e.icon.type}),(0,bn.BX)(hn.kC,{sx:{alignItems:"center",flex:1,justifyContent:"space-between"},children:[(0,bn.tZ)(hn.xv,{children:e.title}),e.accessory?(0,bn.tZ)(ja,{...e.accessory}):null]})]})})},e.path)))})]})};var Ca=s(41323),Ra=s(30924),Na=s(73372),Pa=s(27622);const Oa=e=>{let{size:t=8,sx:s={}}=e;return(0,ms.jsx)(hn.xu,{sx:{backgroundColor:"yellow-wolid",borderRadius:"circle",height:t,width:t,...s}})},La=(0,An.Z)(Ca.Z0)`
224  height: 1px;
225  background-color: ${e=>{let{theme:t}=e;return t.colors.line}};
226  margin: ${e=>{let{theme:t}=e;return t.space[2]}}px 0;
227`,Za=e=>e&&"badge"===e.type?(0,ms.jsx)(Oa,{}):null,Fa=()=>{const{theme:e}=(0,Is.Fg)(),t=(0,Is.Gc)(),{diskUsage:s,style:r,userMenu:n}=xa(),i=(0,o.useMemo)((()=>n.sections.some((e=>e.items.some((e=>e.accessory&&"badge"===e.accessory.type))))),[n.sections]),a=(0,o.useMemo)((()=>(0,ms.jsx)(hn.xu,{sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variant:"text.label",children:n.user.username})),[n.user.username]),l=(0,o.useMemo)((()=>(0,ms.jsxs)(hn.xu,{sx:{position:"relative"},children:[(0,ms.jsx)(Na.q,{size:r.USER_MENU_AVATAR_SIZE,src:n.user.avatar_url,variant:"SM"===t?"app":"user"}),i?(0,ms.jsx)(Oa,{sx:{position:"absolute",right:"-2px",top:"-2px"}}):null]})),[t,i,n.user.avatar_url,r.USER_MENU_AVATAR_SIZE]),c=(0,o.useMemo)((()=>"SM"===t?(0,ms.jsx)(hn.kC,{as:Pa.k,children:l}):(0,ms.jsxs)(hn.kC,{as:Pa.k,sx:{"&:hover":{backgroundColor:"nav-item-bg-hover"},alignItems:"center",borderRadius:"default",gap:r.USER_MENU_ITEM_ICON_SPACING,paddingLeft:r.USER_MENU_ITEM_PADDING_LEFT,paddingRight:r.USER_MENU_ITEM_PADDING_RIGHT,paddingY:r.USER_MENU_ITEM_PADDING_Y,width:"100%"},children:[l,a,(0,ms.jsx)(hn.xv,{sx:{color:"text-secondary",fontSize:2,lineHeight:1,svg:{display:"block"}},children:(0,ms.jsx)(Ra.wEw,{})})]})),[l,a,t,r]);return(0,ms.jsxs)(Ca.fC,{children:[(0,ms.jsx)(Ca.xz,{asChild:!0,children:c}),(0,ms.jsx)(Ca.VY,{asChild:!0,loop:!0,onCloseAutoFocus:e=>e.preventDefault(),side:"SM"===t?"bottom":"top",sideOffset:e.space[2],children:(0,ms.jsxs)(hn.xu,{sx:{bg:"lo-contrast",borderRadius:"default",boxShadow:e=>`${e.colors.shadow} 0px 1px 4px`,paddingX:1,paddingY:r.USER_MENU_ITEM_PADDING_Y,width:`calc(${r.USER_MENU_WIDTH} - ${r.USER_MENU_PADDING_X})`},children:["SM"===t?(0,ms.jsxs)(hn.kC,{sx:{flexDirection:"column",gap:r.USER_MENU_ITEM_PADDING_Y,paddingX:r.USER_MENU_ITEM_PADDING_LEFT},children:[a,(0,ms.jsx)(Ca.ck,{asChild:!0,children:(0,ms.jsx)(hn.kC,{sx:{width:"100%"},children:(0,ms.jsx)(ka.e,{...s})})}),(0,ms.jsx)(La,{})]}):null,n.sections.map(((e,t)=>(0,ms.jsx)(Ca.ZA,{asChild:!0,children:(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(hn.kC,{sx:{flexDirection:"column",gap:r.USER_MENU_ITEMS_SPACING},children:e.items.map((e=>(0,ms.jsx)(Ca.ck,{asChild:!0,onSelect:e.onClick,children:(0,ms.jsxs)(hn.kC,{as:Pa.k,sx:{"&:focus":{bg:"nav-item-bg-hover"},"&:focus-visible":{boxShadow:"none!important"},alignItems:"center",borderRadius:"default",color:"text",fontSize:0,gap:r.USER_MENU_ITEM_PADDING_LEFT,paddingX:r.USER_MENU_ITEM_PADDING_LEFT,paddingY:r.USER_MENU_ITEM_PADDING_Y,width:"100%"},children:[(0,ms.jsx)(Oi.J,{name:e.icon.name,type:e.icon.type}),(0,ms.jsx)(hn.xu,{sx:{flex:1,fontWeight:"button",textAlign:"left"},children:e.title}),e.accessory&&(0,ms.jsx)(Za,{...e.accessory})]})},e.title)))}),t<n.sections.length-1&&(0,ms.jsx)(La,{})]})},e.label)))]})})]})},za=o.memo((e=>{let{onToggleShowNavbar:t,showNavbar:s}=e;const{diskUsage:r,style:n}=xa();return"SM"===(0,Is.Gc)()?(0,ms.jsx)(hn.kC,{onClick:t,sx:{backgroundColor:"transparent",height:"100%",left:0,position:"fixed",top:"env",width:"100%",zIndex:s?"mobileNavbar":-1},children:(0,ms.jsxs)(hn.kC,{as:"aside",sx:{backgroundColor:"nav-bg",borderRightColor:"line",borderRightStyle:"solid",borderRightWidth:1,flexDirection:"column",gap:n.NAVBAR_PADDING_TOP,height:n.NAVBAR_HEIGHT,left:0,paddingBottom:`calc(${n.NAVBAR_PADDING_BOTTOM} + env(safe-area-inset-bottom))`,paddingTop:`calc(${n.NAVBAR_PADDING_TOP} + env(safe-area-inset-top))`,paddingX:n.NAVBAR_PADDING_X,position:"fixed",top:0,transform:s?"translateX(0)":"translateX(-100%)",transition:"transform 0.2s ease-in-out",width:n.NAVBAR_WIDTH},children:[(0,ms.jsxs)(hn.kC,{sx:{alignItems:"center",justifyContent:"space-between",marginLeft:n.NAVBAR_ITEM_PADDING_LEFT,marginRight:`-${n.NAVBAR_ITEM_PADDING_RIGHT}`},children:[(0,ms.jsx)(Ta.K,{height:n.HEADER_LOGO_HEIGHT}),(0,ms.jsx)(mn.h,{icon:{name:"x-1",type:"stroke"},size:"lg",variant:"default"})]}),(0,ms.jsx)(Da,{})]})}):(0,ms.jsxs)(hn.kC,{as:"aside",id:"aside",sx:{backgroundColor:"nav-bg",borderRightColor:"line",borderRightStyle:"solid",borderRightWidth:1,flexDirection:"column",gap:n.NAVBAR_PADDING_TOP,height:n.NAVBAR_HEIGHT,paddingBottom:n.NAVBAR_PADDING_BOTTOM,paddingTop:`calc(${n.HEADER_HEIGHT} + ${n.NAVBAR_PADDING_TOP})`,paddingX:n.NAVBAR_PADDING_X,position:"fixed",width:n.NAVBAR_WIDTH,zIndex:"navbar"},children:[(0,ms.jsx)(Da,{}),(0,ms.jsx)(Aa.Z,{}),(0,ms.jsx)(ka.e,{...r}),(0,ms.jsx)(hn.xu,{sx:{marginTop:"auto"},children:(0,ms.jsx)(Fa,{})})]})}));var Ua=s(21704);const Va=o.memo((()=>{const e=(0,Is.Gc)();return(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(Ua.l,{}),(0,ms.jsx)(_s.xB,{styles:t=>"SM"===e?{"html, body":{backgroundColor:t.colors["app-bg"]}}:"fluid"===t.config.layout.type?{}:{"html, body":{backgroundColor:t.colors["html-bg"]}}})]})}));var Ya=s(32967),Wa=s(34272),Ga=s(66582),Ha=s(39961),Ba=s(95827),$a=s(79318);const qa=()=>{const e=o.useRef(null),[t,s]=(0,o.useState)(!1),r=(0,$a.a)(),{theme:n}=(0,Is.Fg)(),{search:{keyword:i,setKeyword:a},style:l}=xa(),c=(0,o.useCallback)((t=>{t?.preventDefault(),e.current&&e.current.focus()}),[]),d=(0,o.useCallback)((()=>{s(!0)}),[]),u=(0,o.useCallback)((()=>{s(!1)}),[]),p=(0,o.useCallback)((e=>{a(e.target.value)}),[a]),_=(0,o.useCallback)((()=>{a("")}),[a]),h=(0,o.useMemo)((()=>i?(0,ms.jsx)(mn.h,{icon:{name:"x-1",type:"solid"},onClick:_,size:"xs"}
227):t?null:Ga.nI?(0,ms.jsx)(Ya.T,{sx:{alignItems:"center",backgroundColor:"transparent",border:`1px solid ${n.colors.border}`,borderRadius:n.radii.default,color:n.colors["text-secondary"],display:"flex",fontFamily:"var(--font-monospace)",fontWeight:600,height:20,justifyContent:"center",width:20},children:"/"}):null),[n,t,i,_]);return(0,ms.jsxs)(hn.xu,{sx:{width:l.HEADER_SEARCH_INPUT_WIDTH},children:[(0,ms.jsx)(Ha.GlobalHotKeys,{handlers:{FOCUS_SEARCH:c},keyMap:{FOCUS_SEARCH:"/"}}),(0,ms.jsx)(Ha.HotKeys,{handlers:{BLUR:()=>{e.current&&e.current.blur()}},keyMap:{BLUR:"escape"},children:(0,ms.jsx)(Ha.ObserveKeys,{only:["escape"],children:(0,ms.jsx)(Wa.o,{icon:(0,ms.jsx)(Oi.J,{name:"zoom-2",type:"stroke"}),onBlur:u,onChange:p,onFocus:d,placeholder:"Search in put.io",ref:e,rightSection:h,styles:{icon:{color:n.colors["text-secondary"]},input:{...(0,Ba.C)(r,["paddingLeft"]),backgroundColor:n.colors["component-bg"],borderColor:"transparent",height:l.HEADER_SEARCH_INPUT_HEIGHT,minHeight:l.HEADER_SEARCH_INPUT_HEIGHT}},value:i})})})]})},Qa=o.memo((e=>{let{onToggleShowNavbar:t}=e;const{newTransfer:s,style:r}=xa();return"SM"===(0,Is.Gc)()?(0,bn.BX)(hn.kC,{as:"header",id:"header",sx:{alignItems:"center",backgroundColor:"nav-bg",gap:2,height:r.HEADER_HEIGHT,justifyContent:"space-between",paddingTop:"env(safe-area-inset-top)",paddingX:r.HEADER_PADDING_X,position:"fixed",width:r.APP_WIDTH,zIndex:"header"},children:[(0,bn.BX)(hn.kC,{sx:{flex:1,gap:2},children:[(0,bn.tZ)(mn.h,{appearance:"filled",icon:{name:"menu-2",type:"stroke"},onClick:t,variant:"default"}),(0,bn.tZ)(qa,{})]}),(0,bn.BX)(hn.kC,{sx:{gap:2},children:[(0,bn.tZ)(mn.h,{appearance:"filled",icon:{name:"plus-1",type:"stroke"},onClick:s.onNewTransfer,variant:"default"}),(0,bn.tZ)(Fa,{})]})]}):(0,bn.BX)(hn.kC,{as:"header",id:"header",sx:{alignItems:"center",backgroundColor:"nav-bg",borderBottomColor:"line",borderBottomStyle:"solid",borderBottomWidth:1,height:r.HEADER_HEIGHT,justifyContent:"space-between",paddingX:r.HEADER_PADDING_X,position:"fixed",width:r.APP_WIDTH,zIndex:"header"},children:[(0,bn.tZ)(p.rU,{sx:{borderRadius:"default",cursor:"var(--config-cursor)",margin:-1,padding:1},to:"/",children:(0,bn.tZ)(Ta.K,{height:r.HEADER_LOGO_HEIGHT})}),(0,bn.tZ)(qa,{}),(0,bn.tZ)(fn.t,{keys:["T"],label:"Show new transfer dialog",children:(0,bn.tZ)(dn.z,{icon:{name:"plus-1",type:"stroke"},onClick:s.onNewTransfer,variant:"primary",children:(0,Ws.I)("upload_action_label")})})]})})),Ka=e=>{let{children:t}=e;const s=(0,Is.Gc)(),{style:r}=xa(),[n,i]=(0,wa.Z)(!1);return(0,o.useEffect)((()=>{i(!s)}),[s,i]),(0,ms.jsxs)(ms.Fragment,{children:[(0,ms.jsx)(Va,{}),(0,ms.jsxs)(hn.xu,{sx:{margin:"0 auto",maxWidth:"100%",position:"relative",width:["100%","100%",r.APP_WIDTH]},children:[(0,ms.jsx)(va,{}),(0,ms.jsx)(Qa,{onToggleShowNavbar:i}),(0,ms.jsx)(za,{onToggleShowNavbar:i,showNavbar:n}),(0,ms.jsxs)(hn.kC,{as:"main",id:"main",sx:{backgroundColor:"app-bg",flex:1,marginBottom:"env(safe-area-inset-bottom)",minHeight:"calc(100vh - env(safe-area-inset-bottom))"},children:[(0,ms.jsx)(Ia,{}),(0,ms.jsx)(hn.xu,{as:"section",sx:{flex:1,marginLeft:"SM"===s?0:r.NAVBAR_WIDTH,marginTop:"SM"===s?0:r.HEADER_HEIGHT,paddingBottom:r.CONTENT_PADDING_BOTTOM,paddingTop:"SM"===s?r.HEADER_HEIGHT:0,paddingX:r.CONTENT_PADDING_X,position:"relative"},children:t})]})]})]})};var Ja=s(76784),Xa=s(96321);const el=["friend-request-count"],tl=async()=>(await A.Z.Friends.WaitingRequestsCount()).data.count,sl=["transfer-count"],rl=async()=>(await A.Z.Transfers.Count()).data.count,nl=e=>{let{children:t}=e;const s=(()=>{const{showNewTransferModal:e}=(0,to.c)();return{onNewTransfer:e}})(),r=(()=>{const e=(0,Ds.I0)(),[t]=(0,Xa.B)("username"),[s]=(0,Xa.B)("mail"),[r]=(0,Xa.B)("avatar_url"),[n]=(0,Xa.B)("is_sub_account"),[i]=(0,Xa.B)("can_create_sub_account"),[o]=(0,Xa.B)("is_eligible_for_friend_invitation");return{sections:[{items:[{icon:{name:"user-4",type:"stroke"},onClick:()=>e((0,_.VF)(fr.i.ROOT)),title:"Account"},{icon:{name:"settings-1",type:"stroke"},onClick:()=>e((0,_.VF)(Lr.t.ROOT)),title:"Settings"}],label:"Account"},{items:[{icon:{name:"credit-card-1",type:"stroke"},onClick:()=>e((0,_.VF)("/billing")),title:"Billing",visible:!n},{icon:{name:"group-1",type:"stroke"},onClick:()=>e((0,_.VF)(kr)),title:"Family",visible:n||i},{icon:{name:"add-user-1",type:"stroke"},onClick:()=>e((0,_.VF)("/invite-friends")),title:"Invite your friends",visible:o}].filter((e=>e.visible)),label:"Billing and Family"},{items:[{icon:{name:"film-strip-1",type:"stroke"},onClick:()=>e((0,_.VF)("/media-conversions")),title:"Video conversions"},{icon:{name:"server-1",type:"stroke"},onClick:()=>e((0,_.VF)("/api")),title:"API"},{icon:{name:"coffee-1",type:"stroke"},onClick:()=>e((0,_.VF)("/support")),title:"Support"}],label:"Ecosystem"},{items:[{icon:{name:"logout-2",type:"stroke"},onClick:()=>e((0,oa.Logout)("revoked")),title:"Log out"}],label:"Log out"}],user:{avatar_url:r,mail:s,username:t}}})(),n=(()=>{const e=(0,Ja.H)(),t=(()=>{const e=vo(),t=(0,ca.a)(sl,rl,{staleTime:Number.POSITIVE_INFINITY});return(0,o.useEffect)((()=>
227{if(e)return e.on("transfers_count",(e=>{(e=>{Qs.E.setQueryData(sl,e)})(e)}))}),[e]),t.data||0})(),s=(()=>{const e=(0,$s.NL)(),t=vo(),s=(0,ca.a)(el,tl,{staleTime:Number.POSITIVE_INFINITY}).data||0;return(0,o.useEffect)((()=>{if(t)return t.on("friend_request_count",(t=>{e.setQueryData(el,t)}))}),[t,e]),s})(),[r]=(0,Xa.B)("trash_size"),[n]=(0,Mi.R)("trash_enabled"),[i]=(0,Mi.R)("history_enabled"),[a]=(0,js.E)("seen.extensions");let l=[{enabled:!0,icon:{name:"open-folder-3",type:"solid"},path:"/files",title:"Files"},{accessory:t?{type:"badge",value:t}:void 0,enabled:!0,icon:{name:"cloud-download-1",type:"stroke"},path:"/transfers",title:(0,Ws.I)("menu_transfers")},{enabled:!0,icon:{name:"rss-1",type:"solid"},path:"/rss",title:(0,Ws.I)("menu_rssfeed")},{accessory:s?{type:"badge",value:s}:void 0,enabled:!0,icon:{name:"share-1",type:"solid"},path:"/sharing",title:(0,Ws.I)("menu_sharing")},{enabled:i,icon:{name:"history-1",type:"solid"},path:"/history",title:(0,Ws.I)("menu_dashboard")},{accessory:r?{type:"text",value:(0,z.Gj)(r,{decimalPlaces:2})}:void 0,enabled:n,icon:{name:r?"trash-2":"trash-1",type:"stroke"},path:"/trash",title:(0,Ws.I)("menu_trash")},{accessory:a?void 0:{type:"badge",value:"Updated!"},enabled:!0,icon:{name:"toolbox",type:"stroke"},path:vr,title:(0,Ws.I)("menu_extensions")}];return l=l.map((t=>({...t,active:e.pathname.startsWith(t.path)}))).filter((e=>e.enabled)),{items:l}})(),i=(()=>{const e=(0,Ds.I0)(),[t]=(0,Xa.B)("disk"),[s]=(0,js.E)("disk_usage_display_format"),[r]=(0,Mi.R)("show_optimistic_usage");return{data:t,displayFormat:s,displayType:r?"available":"used",onConfigure:()=>e((0,_.VF)("/settings#storage"))}})(),a=(()=>{const e=(0,Ds.I0)();return{keyword:(0,Ds.v9)(Ki),setKeyword:t=>e(_e(t,{source:"input"}))}})();return(0,ms.jsx)(ba,{value:{diskUsage:i,navigationMenu:n,newTransfer:s,search:a,userMenu:r},children:(0,ms.jsxs)(Ka,{children:[(0,ms.jsx)(ua,{}),(0,ms.jsx)(_a,{}),t]})})};class il extends o.PureComponent{componentDidMount(){this.props.StartApplication()}render(){const{location:e,resolved:t}=this.props,s=Wr.find((t=>`/${t.path}`===e.pathname)),r=s?.isolated||e.query.popup||e.query.isolated;return t?r?this.props.children:(0,ms.jsx)(ko,{children:(0,ms.jsx)(So,{children:(0,ms.jsxs)(to.d,{children:[(0,ms.jsx)(nl,{children:this.props.children}),(0,ms.jsx)(aa,{}),(0,ms.jsx)(ia,{})]})})}):null}}il.propTypes={StartApplication:en().func.isRequired,children:en().node.isRequired,location:en().object.isRequired,resolved:en().bool.isRequired};const ol=(0,Ds.$j)((e=>({resolved:e.getIn(["app","ready"])})),oa)(il),al=ur(Gi),ll=ur(Xi),cl=ur(_o),dl=ur(bo);class ul extends o.PureComponent{onRouteUpdate=()=>{nr.Z.pageView(),window.scrollTo(0,0)};render(){return(0,ms.jsxs)(lr,{children:[(0,ms.jsx)(tn.ZP,{defaultTitle:"put.io",titleTemplate:"%s - put.io"}),(0,ms.jsx)(os.u,{getAPIClient:A.f,children:(0,ms.jsx)(Ks,{children:(0,ms.jsx)(Jr,{...l.Z.intercom,children:(0,ms.jsxs)(Ds.zt,{store:this.props.store,children:[(0,ms.jsx)(Ps,{source:"user",children:(0,ms.jsx)(rr,{children:(0,ms.jsx)(Ys,{children:(0,ms.jsx)(Bs,{children:(0,ms.jsx)(qr,{children:(0,ms.jsxs)(p.F0,{history:this.props.history,onUpdate:this.onRouteUpdate,children:[(0,ms.jsxs)(ms.Fragment,{children:[Br.map((e=>{let{from:t,to:s}=e;return(0,ms.jsx)(p.l_,{from:t,to:s},t)})),Hr.map((e=>(0,ms.jsx)(p.AW,{component:e.component,path:e.path},e.path))),Gr.map((e=>(0,ms.jsx)(p.AW,{component:e.component,path:e.path},e.path)))]}),(0,ms.jsx)(p.l_,{from:"/",to:"/files"}),(0,ms.jsxs)(p.AW,{component:ol,path:"/",children:[(0,ms.jsx)(p.l_,{from:"user/your-files",to:"/files"}),(0,ms.jsx)(p.l_,{from:"user/your-files/:file",to:"/files/:file"}),(0,ms.jsx)(p.l_,{from:"file/:file",to:"/files/:file"}),(0,ms.jsx)(p.AW,{component:ll,path:"search"}),(0,ms.jsx)(p.l_,{path:"u/:username",to:"files/user/:username"}),(0,ms.jsxs)(p.AW,{path:"files",children:[(0,ms.jsx)(p.l_,{from:"0",to:"/"}),(0,ms.jsx)(p.fJ,{component:al}),(0,ms.jsx)(p.AW,{component:al,path:"user/:username"}),(0,ms.jsx)(p.AW,{component:al,path:":fileId"})]}),(0,ms.jsx)(p.AW,{component:cl,path:"transfers"}),(0,ms.jsx)(p.AW,{component:dl,path:"trash"}),Wr.map((e=>(0,ms.jsx)(p.AW,{component:e.component,path:e.path},e.path))),Yr?(0,ms.jsx)(p.AW,{component:Yr.component,path:Yr.path}):null]})]})})})})})}),(0,ms.jsx)(dr,{})]})})})})]})}}ul.propTypes={history:en().object.isRequired,store:en().object.isRequired},(()=>{a.S(l.Z.sentry);const e=document.getElementById("root");
227if(!e)throw new Error("Root element not found");(0,is.s)(e).render((0,ms.jsx)(ul,{history:ns(rs),store:rs}))})()},72282:(e,t,s)=>{"use strict";s.r(t),s.d(t,{CancelSubscription:()=>X,ContinueUpgradeSubscription:()=>K,GET_PAYMENT_INFO_FAILURE:()=>V,GET_PAYMENT_INFO_REQUEST:()=>z,GET_PAYMENT_INFO_SUCCESS:()=>U,GetPaymentInfo:()=>Y,PAYMENT_FETCHING_START:()=>W,PAYMENT_FETCHING_STOP:()=>H,PLAN_UPDATED:()=>Z,PlanUpdated:()=>F,StartPaymentFor:()=>Q,UpdatePaddleBillingPaymentMethod:()=>ee});var r=s(95712),n=s(4099),i=s(2754),o=s(43079),a=s(49024),l=s(98355),c=s(70028),d=s(29604),u=s(2784),p=s(73372),_=s(15490),h=s(52322);const g=e=>{let{onResolve:t,providers:s}=e;const n=(0,r.Fm)({api_payment_provider_options:s,paddle_billing_available:Boolean(d.Z.paddleBilling.production.clientToken?.trim())});return(0,h.jsx)(h.Fragment,{children:n.map((e=>({accessory:{onClick:()=>t(e),type:"clickable"},description:e.description,icon:"name"in e.icon?{name:e.icon.name,size:18,type:"stroke"}:(0,h.jsx)(p.q,{size:19,src:e.icon.url}),indicator:e.discount_percent?{type:"badge",value:`${e.discount_percent}% off!`}:void 0,key:e.title,title:e.title}))).map((e=>(0,u.createElement)(_.H,{...e,key:e.key})))})},m=e=>new c.u_({component:g,name:"payment-method-selection-modal",size:c.u_.SIZES.SMALL,title:(0,l.I)("payment_method_modal_title")}).Show(e);var f=s(55453),y=s(90330),b=s(37756),x=s(40920),w=s(55698),S=s(30766),v=s(27623),I=s(57842),k=s(38571),T=s(57671),A=s(33869),E=s(11910),M=s(91216),j=s(13980),D=s.n(j),C=s(39723),R=s(75289),N=s(18756);class P extends u.PureComponent{static Show(e){return new c.u_({content:function(){return(0,h.jsx)(P,{...e,Confirm:()=>this.Destroy(null,!0)})},name:"payment-confirm",title:e.isResult?n.ZP.payment_confirm_result_title():n.ZP.payment_confirm_title()}).Show()}render(){const{targetPlan:e}=this.props,t=null===this.props.newRemainingDays,s=e.get("period_days"),r=e.get("period_days")&&t?(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:n.ZP.payment_period_label()}),(0,h.jsx)(E.Z,{children:n.ZP.payment_confirm_new_period_days(s,s)})]}):null,o=e.get("plan_type")&&t?(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:n.ZP.payment_history_table_type()}),(0,h.jsx)(E.Z,{children:"subscription"===e.get("plan_type")?n.ZP.payment_type_subs_label():n.ZP.payment_type_onetime_label()})]}):null;let a=null;if(e.get("simulated_expiration")){const t=this.props.newRemainingDays?(0,h.jsx)("span",{className:"oldRemainingDays",children:n.ZP.payment_confirm_old_remaining_days(this.props.oldRemainingDays,this.props.oldRemainingDays)}):null;a=(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:n.ZP.payment_confirm_will_expire_label()}),(0,h.jsxs)(E.Z,{children:[t,n.ZP.payment_confirm_expire_in_label((0,i.KA)(e.get("simulated_expiration")),(0,i.KA)(e.get("simulated_expiration")),(0,i.p6)(e.get("simulated_expiration")))]})]})}const l=this.props.credit?(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:n.ZP.payment_confirm_amount_refund_label()}),(0,h.jsxs)(E.Z,{children:[this.props.credit.toFixed(2)," ",this.props.currency]})]}):null,c=this.props.isPlanChanged?(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:n.ZP.payment_confirm_new_product_label()}),(0,h.jsx)(E.Z,{children:e.get("plan_name")})]}):null,d=this.props.nextPaymentAmount?(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:"Next payment amount"}),(0,h.jsxs)(E.Z,{children:[this.props.nextPaymentAmount," ",this.props.nextPaymentCurrency]})]}):null,u=this.props.nextPaymentDate?(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:"Next billing date"}),(0,h.jsx)(E.Z,{children:this.props.nextPaymentDate})]}):null,p=null!==this.props.newRemainingDays&&this.props.newRemainingDays!==this.props.oldRemainingDays?(0,h.jsx)(C.P,{message:n.ZP.payment_confirm_convert_remaining_days_message(this.props.oldRemainingDays,this.props.newRemainingDays),type:"info"}):null,_=this.props.warning?(0,h.jsx)(C.P,{message:this.props.warning,type:"warning"}):null,g=0===this.props.newRemainingDays?(0,h.jsx)(C.P,{message:n.ZP.payment_confirm_no_remaining_days_message(),type:"info"}):null,m=(0,h.jsxs)("div",{className:"confirm-summary",children:[(0,h.jsxs)(R.kC,{style:{flexDirection:"column",gap:3},children:[p,_,g]}),(0,h.jsxs)(M.iA,{className:"payment-confirm-table first-column-label",ratio:this.props.isMobile?"12:12":"6:6",children:[r,o,a,this.renderAmountForCharge(),l,c,d,u]})]});return(0,h.jsxs)("div",{children:[m,(0,h.jsx)(k.Z,{sx:{mt:3},children:(0,h.jsx)(T.Z,{children:(0,h.jsx)(N.z,{onClick:this.props.Confirm,variant:"primary",children:n.ZP.payment_confirm_action_label()})})})]})}renderAmountForCharge(){const{targetPlan:e}=this.props;let t=null;return this.props.chargeAmount&&this.props.prorated&&(t=(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:n.ZP.payment_confirm_amount_to_charged_label()}),(0,h.jsx)(E.Z,{children:this.props.newProrated?(0,h.jsxs)("div",{children:[(0,h.jsxs)("span",{className:"old-prorated",children:[this.props.prorated.toFixed(2)," ",this.props.currency]}),this.props.newProrated.toFixed(2)," ",this.props.currency]}):(0,h.jsxs)("span",{children:[this.props.prorated.toFixed(2)," ",this.props.currency]})})]})),this.props.chargedAmount&&(t=(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:n.ZP.payment_confirm_amount_charged_label()}),(0,h.jsx)(E.Z,{children:this.props.chargedAmount})]})),e.get("is_trial_subscription")&&(t=(0,h.jsxs)(A.Z,{children:[(0,h.jsx)(E.Z,{children:n.ZP.payment_confirm_amount_to_charged_label()}),(0,h.jsx)(E.Z,{children:n.ZP.payment_confirm_trial_subscription_amount(e.get("subscription_trial_period"),e.get("price"))})]})),t}}P.propTypes={Confirm:D().func.isRequired,chargeAmount:D().bool,chargedAmount:D().any,credit:D().number,currency:D().string,currentPlan:D().instanceOf(v.D5).isRequired,isMobile:D().bool,isPlanChanged:D().bool,newProrated:D().number,newRemainingDays:D().number,nextPaymentAmount:D().any,nextPaymentCurrency:D().string,nextPaymentDate:D().string,oldRemainingDays:D().number,prorated:D().number,targetPlan:D().instanceOf(v.D5).isRequired,warning:D().string},P.defaultProps={chargeAmount:!1,chargedAmount:"",credit:null,currency:"",isMobile:!1,isPlanChanged:!1,newProrated:null,newRemainingDays:null,nextPaymentAmount:"",nextPaymentDate:"",oldRemainingDays:null,prorated:null,warning:""};var O=s(62229),L=s(3854);
227const Z="PLAN_UPDATED";function F(e){return{payload:e,type:Z}}const z="GET_PAYMENT_INFO_REQUEST",U="GET_PAYMENT_INFO_SUCCESS",V="GET_PAYMENT_INFO_FAILURE";function Y(){return async e=>{e({type:z});try{const{data:t}=await a.Z.Payment.Info();e({info:t,type:U})}catch{e({type:V})}}}const W="PAYMENT_FETCHING_START";function G(){return{type:W}}const H="PAYMENT_FETCHING_STOP";function B(){return{type:H}}function $(){return e=>{e(B()),e(Y())}}function q(e,t){return s=>{if(s(B()),"string"!=typeof e){const s=(0,O.c)(e,t);o.Z.show(s)}}}function Q(e){let{couponCode:t,paymentType:s,planPath:r}=e;return async(e,l)=>{try{e(G());const{data:c}=await a.Z.Payment.ChangePlan.GET({coupon_code:t,payment_type:s,plan_path:r});e(B());const d=l().getIn(["payment","info","expiration_date"]),u={chargeAmount:c.charge_amount,couponCode:t,credit:Number.parseFloat(c.credit),currency:c.currency,currentPlan:(0,v.d0)(c.current_plan),discount:c.discount,isMobile:l().getIn(["app","isMobile"]),isPlanChanged:c.is_product_change,newProrated:null,newRemainingDays:c.new_remaining_days,oldRemainingDays:d?(0,i.KA)(d):null,paymentType:s,planPath:r,price:c.target_plan.price,prorated:Number.parseFloat(c.prorated),targetPlan:(0,v.d0)(c.target_plan)};if(c.discount)switch(c.discount.type){case"amount":u.newProrated=u.prorated-c.discount.discount;break;case"percentage":u.newProrated=u.prorated-u.prorated/100*c.discount.discount}return"subscription"===c.target_plan.plan_type&&"subscription"===c.current_plan.plan_type&&["Paddle","PaddleBilling"].includes(c.current_plan.subscription_payment_provider)?e(function(e){return async(t,s)=>{await P.Show({...e,chargeAmount:null,credit:null,warning:n.ZP.payment_sub_upgrade_downgrade_warning()});try{t(G());const r=await a.Z.Payment.ChangePlan.POST({coupon_code:e.couponCode,payment_type:e.paymentType,plan_path:e.planPath}),{data:l,type:c}=(0,w.k1)(r.data,{payment_type:e.paymentType,plan:{code:e.targetPlan?.get?.("new_code"),path:e.planPath}});switch(t(B()),c){case"confirmation_required":return o.Z.Show({message:n.ZP.account_change_other_confirmation(),type:o.Z.TYPE.SUCCESS});case"subscription_updated":{const s={chargedAmount:l.charged_amount,currency:e.currency,currentPlan:e.currentPlan,isMobile:e.isMobile,isPlanChanged:!0,isResult:!0,nextPaymentAmount:l.next_payment.amount,nextPaymentCurrency:l.next_payment.currency,nextPaymentDate:(0,i.p6)(l.next_payment.billing_date),targetPlan:e.targetPlan};return t($()),P.Show(s)}case"checkout":return await J({coupon_code:e.couponCode,dispatch:t,getState:s,payment_type:e.paymentType,plan:{code:e.targetPlan.get("new_code"),path:e.planPath},urls:l.urls})}}catch(s){t(q(s,{payment_type:e.paymentType,plan:{code:e.targetPlan?.get?.("new_code"),path:e.planPath}}))}}}({...u,currency:c.PaddleBilling?.currency??c.Paddle?.currency??c.currency})):P.Show(u).then((()=>e(function(e){let{coupon_code:t,payment_type:s,plan:{code:r,path:i}}=e;return async(e,l)=>{try{e(G());const c=await a.Z.Payment.ChangePlan.POST({coupon_code:t,payment_type:s,plan_path:i}),d=(0,w.k1)(c.data,{payment_type:s,plan:{code:r,path:i}});switch(e(B()),d.type){case"confirmation_required":return o.Z.Show({message:n.ZP.account_change_other_confirmation(),type:o.Z.TYPE.SUCCESS});case"success":return o.Z.Show({message:n.ZP.payment_change_success_message(),type:o.Z.TYPE.SUCCESS});case"checkout":return await J({coupon_code:t,dispatch:e,getState:l,payment_type:s,plan:{code:r,path:i},urls:d.data.urls})}}catch(t){e(q(t,{payment_type:s,plan:{code:r,path:i}}))}}}({coupon_code:t,payment_type:s,plan:{code:c.target_plan.new_code,path:r}}))))}catch(t){e(q(t,{payment_type:s,plan:{path:r}}))}}}function K(e){let{confirmationCode:t,planPath:s}=e;return async(e,r)=>{e(G());try{const{data:{current_plan:l,target_plan:c}}=await a.Z.Payment.ChangePlan.GET({plan_path:s}),d=await a.Z.Payment.ChangePlan.POST({confirmation_code:t,plan_path:s}),{data:u,type:p}=(0,w.k1)(d.data,{plan:{code:c.new_code,path:s}});switch(p){case"success":return o.Z.show({message:n.ZP.payment_change_success_message()}),e($());case"subscription_updated":return e($()),P.Show({chargedAmount:u.charged_amount,currency:u.charged_currency,currentPlan:(0,v.d0)(l),isMobile:r().getIn(["app","isMobile"]),isPlanChanged:!0,isResult:!0,nextPaymentAmount:u.next_payment.amount,nextPaymentCurrency:u.next_payment.currency,nextPaymentDate:(0,i.p6)(u.next_payment.billing_date),targetPlan:(0,v.d0)(c)});case"checkout":return e(B()),await J({dispatch:e,getState:r,payment_type:"credit-card",plan:{code:c.new_code,path:s},urls:u.urls});default:throw new Error("Unexpected response type")}}catch(t){e(q(t,{payment_type:"credit-card",plan:{path:s}}))}}}
227async function J(e){let{coupon_code:t,dispatch:s,getState:i,payment_type:a,plan:{code:l,path:c},urls:d}=e;const{availableProviders:u,paddleBillingAvailable:p,skippedPaddleBillingProviderContext:_}=(0,x.Lb)(d,{payment_type:a});(0,w.XS)(_,{payment_type:a,plan:{code:l,path:c}});const h=(0,r.Fm)({api_payment_provider_options:u,paddle_billing_available:p}),g=h[0];let b=g?u.find((e=>e.provider===g.provider)):(0,x.GR)(d,{payment_type:a}),S=g?.currency??"";if(!b)throw new Error("No available payment provider");if(h.length>1){const e=await m({providers:u});S=e.currency,b=u.find((t=>t.provider===e.provider))}if(!b)throw new Error("Selected payment provider is not available");const v=i().getIn(["app","currentUser"]),I=await(0,f.$)({coupon_code:t,currency:S,payment_type:a,plan:{code:l,path:c},provider:b,user:{email:v.get("mail"),id:v.get("user_id")}});switch(I.type){case"success":return o.Z.Show({message:n.ZP.payment_success_message(),type:o.Z.TYPE.SUCCESS}),s($());case"redirect":return(0,y.w)({url:I.url});case"failure":return s(q(I.error,{payment_type:a,plan:{code:l,path:c},provider:b.provider,userId:v.get("user_id")}));default:return}}function X(){return async(e,t)=>{const s=t().getIn(["payment","info"]),r=(0,L.Z)(s.get("plan").toJS())?n.ZP.payment_subs_cancel_trial_confirmation_message((0,i.KA)(s.get("expiration_date"))):n.ZP.payment_subs_cancel_confirmation_message();I.Z.Show({name:"cancel-subscription",actionLabel:n.ZP.payment_subs_cancel_confirm_label(),cancelLabel:n.ZP.payment_subs_cancel_cancel_label(),message:r}).then((async()=>{try{e(G()),await a.Z.Payment.CancelSubscription(),e($())}catch(t){e(q(t))}}))}}function ee(){let{subscriptionId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async(t,s)=>{const r=s().getIn(["payment","info"]),i=e??r?.getIn(["plan","subscription","id"]),a=s().getIn(["app","currentUser"]),l={subscriptionId:i,userId:a?.get("user_id")};if(i)try{t(G());const{transaction_id:e}=await(0,b.p)(i);t(B());const s=await S.Y.startTransactionCheckout({transaction_id:e,user:{email:a.get("mail"),id:a.get("user_id")}});switch(s.type){case"success":return o.Z.Show({message:n.ZP.payment_method_update_success_message(),type:o.Z.TYPE.SUCCESS}),t($());case"failure":return t(q(s.error,{...l,...(0,w.D)(e)}))}}catch(e){t(q(e,l))}else t(q(new Error("Missing Paddle Billing subscription"),l))}}},15844:(e,t,s)=>{"use strict";s.r(t),s.d(t,{CHANGE_PERIOD:()=>l,CHANGE_TYPE:()=>d,ChangePeriod:()=>c,ChangeType:()=>u,GET_PLANS_FAILURE:()=>b,GET_PLANS_REQUEST:()=>f,GET_PLANS_SUCCESS:()=>y,GetPlans:()=>x,PAYMENT_CHANGE_INTENT:()=>a,PAYMENT_CHANGE_RESET:()=>h,PAYMENT_SET_CHANGE_INTENT:()=>p,Reset:()=>g,SetIntent:()=>_,StartChangePeriodFlow:()=>m});var r=s(43079),n=s(49024),i=s(32315),o=s(72282);const a={ACTIVATE_ACCOUNT:5,CAMPAIGN:4,CHANGE_PERIOD:3,CREATE_SUBSCRIPTION:2,UPGRADE_DOWNGRADE:1},l="CHANGE_PERIOD";function c(e){return{period:e,type:l}}const d="CHANGE_TYPE";function u(e){return{newType:e,type:d}}const p="PAYMENT_SET_CHANGE_INTENT";function _(e){return(t,s)=>{t({intent:e,type:p}),e===a.UPGRADE_DOWNGRADE&&t(u(s().getIn(["payment","info","plan","type"]))),e===a.CREATE_SUBSCRIPTION&&t(u("subscription")),e===a.CHANGE_PERIOD&&t(c(30===s().getIn(["payment","info","plan","period_days"])?365:30))}}const h="PAYMENT_CHANGE_RESET";function g(){return(e,t)=>{e({currentPlan:"active"===t().getIn(["currentUser","account_status"])?t().getIn(["payment","info","plan"]):null,type:h})}}function m(e,t){return(t,s)=>{const r=s().getIn(["payment","info","plan"]),n=e.find((e=>e.type===r.get("type")&&e.plan_group_code===r.get("group_code")&&e.period_days!==r.get("period_days")));n&&t((0,o.StartPaymentFor)({planPath:n.fastspring_url}))}}const f="GET_PLANS_REQUEST",y="GET_PLANS_SUCCESS",b="GET_PLANS_FAILURE";function x(e){let{intent:t}=e;return async e=>{e(g()),e({type:f}),t&&e(_(t));try{const{data:{plans:s}}=await n.Z.Payment.Plans(),r=s.reduce(((e,t)=>e.concat(t.sub_plans.map((e=>({plan_group_code:t.plan_group_code,...e,...t.common_properties}))))),[]);e({hasTrial:r.some((e=>"trial"===e.plan_group_code)),plans:r,type:y}),t===a.CHANGE_PERIOD&&e(m(r))}catch(t){e({type:b});const s=(0,i.j)(t);r.Z.Show(s)}}}},62229:(e,t,s)=>{"use strict";s.d(t,{c:()=>p});var r=s(4099),n=s(2754),i=s(36718),o=s(32315),a=s(51080),l=s(15545);const c=()=>({description:r.ZP.generic_contact_support_error(),trigger:{callback:()=>(0,l.k)(),label:r.ZP.generic_contact_support_action_label()},type:"action"}),d=(e,t)=>"subscription_payment_declined"===e.data.extra?.paddle_error_code?{message:r.ZP.payment_paddle_billing_subscription_payment_declined_error(),recoverySuggestion:{description:r.ZP.app_payment_warning_update_payment_information_message(),trigger:{callback:()=>{window.location.href="/billing"}
227,label:r.ZP.payment_method_credit_card_update()},type:"action"}}:{message:t,recoverySuggestion:c()},u=e=>(0,o.j)(e,[{kind:"match_condition",localize:()=>({message:r.ZP.payment_checkout_provider_load_error(),recoverySuggestion:{description:"",type:"instruction"}}),match:e=>e instanceof a.h&&("SDK_FAILED_TO_LOAD"===e.reason||"SDK_FAILED_TO_INITIALIZE"===e.reason)},{kind:"match_condition",localize:()=>({message:r.ZP.payment_checkout_start_error(),recoverySuggestion:c()}),match:e=>e instanceof a.h&&("CHECKOUT_ALREADY_ACTIVE"===e.reason||"CHECKOUT_FAILED"===e.reason||"INVALID_PARAMS"===e.reason||"INVALID_RESPONSE"===e.reason)},{error_type:"PADDLE_ERROR",kind:"api_error_type",localize:()=>({message:r.ZP.payment_plan_change_error(),recoverySuggestion:c()})},{error_type:"PAYMENT_SUBSCRIPTION_NOT_FOUND",kind:"api_error_type",localize:()=>({message:r.ZP.payment_subs_cancel_not_found_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_SUBSCRIPTION_TO_ONETIME_NOT_ALLOWED",kind:"api_error_type",localize:()=>({message:r.ZP.payment_change_subscription_to_onetime_not_allowed_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"CONFIRMATION_NOT_FOUND",kind:"api_error_type",localize:()=>({message:r.ZP.payment_upgrade_confirmation_not_found_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"INVALID_CONFIRMATION",kind:"api_error_type",localize:()=>({message:r.ZP.payment_upgrade_confirmation_invalid_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_COUPON_CODE_NO_LONGER_AVAILABLE",kind:"api_error_type",localize:()=>({message:r.ZP.payment_coupon_no_longer_available_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_COUPON_CODE_NOT_FOUND",kind:"api_error_type",localize:()=>({message:r.ZP.payment_coupon_not_found_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_COUPON_INVALID_PLAN",kind:"api_error_type",localize:()=>({message:r.ZP.payment_coupon_wrong_plan(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PADDLE_BILLING_INVALID_COUPON",kind:"api_error_type",localize:()=>({message:r.ZP.payment_paddle_billing_invalid_coupon_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PADDLE_BILLING_SUBSCRIPTION_CANNOT_CHANGE_PLAN",kind:"api_error_type",localize:e=>d(e,r.ZP.payment_paddle_billing_change_plan_error())},{error_type:"PADDLE_BILLING_SUBSCRIPTION_CANNOT_CANCEL",kind:"api_error_type",localize:e=>d(e,r.ZP.payment_paddle_billing_cancel_error())},{error_type:"PADDLE_BILLING_PAYMENT_NOT_FOUND",kind:"api_error_type",localize:()=>({message:r.ZP.payment_paddle_billing_invoice_not_found_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PADDLE_BILLING_INVOICE_NOT_AVAILABLE",kind:"api_error_type",localize:()=>({message:r.ZP.payment_paddle_billing_invoice_not_available_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PADDLE_BILLING_SUBSCRIPTION_NOT_FOUND",kind:"api_error_type",localize:()=>({message:r.ZP.payment_paddle_billing_subscription_not_found_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PADDLE_BILLING_SUBSCRIPTION_CANCELED",kind:"api_error_type",localize:()=>({message:r.ZP.payment_paddle_billing_subscription_canceled_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_FAMILY_ERROR",kind:"api_error_type",localize:()=>({message:r.ZP.payment_family_not_allowed_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_FASTSPRING_INACTIVE_SUBSCRIPTION",kind:"api_error_type",localize:()=>({message:r.ZP.payment_change_inactive_subscription_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_FASTSPRING_PRORATION_NOT_SUPPORTED",kind:"api_error_type",localize:()=>({message:r.ZP.payment_refund_period_expired_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_INSUFFICIENT_DISK_SPACE",kind:"api_error_type",localize:e=>{const{need_space:t}=e.data.extra;return{message:r.ZP.payment_change_insufficient_disk_space((0,n.Gj)(t,{decimalPlaces:0})),recoverySuggestion:{description:"",type:"instruction"}}}},{error_type:"PAYMENT_NOT_ENOUGH_DAYS",kind:"api_error_type",localize:()=>({message:r.ZP.payment_not_enough_days_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_PLAN_CHANGE_NOT_ALLOWED_SAME_PLAN",kind:"api_error_type",localize:()=>({message:r.ZP.payment_plan_change_same_plan_error(),recoverySuggestion:{description:r.ZP.payment_plan_change_same_plan_description(),trigger:{callback:()=>
227{window.location.href="/payment/upgrade-downgrade"},label:r.ZP.payment_plan_change_same_plan_action_label()},type:"action"}})},{error_type:"PAYMENT_PLAN_CHANGE_NOT_ALLOWED",kind:"api_error_type",localize:()=>({message:r.ZP.payment_plan_change_error(),recoverySuggestion:{description:r.ZP.generic_contact_support_error(),trigger:{callback:()=>(0,l.k)(),label:r.ZP.generic_contact_support_action_label()},type:"action"}})},{error_type:"PAYMENT_PLAN_NOT_FOUND",kind:"api_error_type",localize:()=>({message:r.ZP.payment_plan_not_found_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_PROVIDER_ERROR",kind:"api_error_type",localize:()=>({message:r.ZP.payment_change_provider_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_SUB_ACCOUNT_NOT_ALLOWED",kind:"api_error_type",localize:()=>({message:r.ZP.payment_family_member_not_allowed_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_TRIAL_ERROR",kind:"api_error_type",localize:()=>({message:r.ZP.payment_trial_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_UNKNOWN_PLAN",kind:"api_error_type",localize:()=>({message:r.ZP.payment_plan_not_found_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_UNKNOWN_PROVIDER",kind:"api_error_type",localize:()=>({message:r.ZP.payment_change_unknown_provider_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"PAYMENT_UPDATE_INFORMATION",kind:"api_error_type",localize:()=>({message:r.ZP.payment_missing_information_error(),recoverySuggestion:{description:"",type:"instruction"}})},{kind:"generic",localize:e=>{const t=(0,o.j)(e);return{message:r.ZP.payment_error_generic(),meta:t.meta,recoverySuggestion:{description:"",type:"instruction"}}}}]),p=(e,t)=>t?i.$e((s=>(s.setExtras(t),u(e)))):u(e)},3854:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});const r=e=>e.subscription&&"TRIALING"===e.subscription.status},54819:(e,t,s)=>{"use strict";s.r(t),s.d(t,{ADD_TASK:()=>_,ADD_UPLOAD_TASK:()=>g,AddTask:()=>h,AddUploadTask:()=>m,CANCEL_TASK:()=>f,CHANGE_TASKS_CONTAINER_FOLDING:()=>w,CLEAR_COMPLETED_TASKS:()=>b,CancelTask:()=>y,ClearCompletedTasks:()=>x,EXTRACT_COMPLETED_FOR_ALL_FILES:()=>$,EXTRACT_PROGRESS:()=>B,EXTRACT_UNLOCK_ERROR:()=>J,EXTRACT_UNLOCK_START:()=>Q,EXTRACT_UNLOCK_SUCCESS:()=>K,GET_DOWNLOAD_LINKS_ERROR:()=>E,GET_DOWNLOAD_LINKS_SUCCESS:()=>A,GET_EXTRACT_STATUS_ERROR:()=>H,GET_EXTRACT_STATUS_START:()=>W,GET_EXTRACT_STATUS_SUCCESS:()=>G,GET_SHARED_FILE_CLONE_STATUS_ERROR:()=>P,GET_SHARED_FILE_CLONE_STATUS_SUCCESS:()=>N,GetDownloadLinksStatus:()=>M,GetExtractStatus:()=>q,GetSharedFileCloneStatus:()=>O,START_DOWNLOAD_LINKS_TASK_ERROR:()=>k,START_DOWNLOAD_LINKS_TASK_START:()=>v,START_DOWNLOAD_LINKS_TASK_SUCCESS:()=>I,START_SHARED_FILE_CLONE_TASK_ERROR:()=>C,START_SHARED_FILE_CLONE_TASK_START:()=>j,START_SHARED_FILE_CLONE_TASK_SUCCESS:()=>D,START_ZIP_TASK_ERROR:()=>F,START_ZIP_TASK_START:()=>L,START_ZIP_TASK_SUCCESS:()=>Z,StartDownloadLinksTask:()=>T,StartSharedFileClone:()=>R,StartZipTask:()=>z,ToggleTaskContainerFolding:()=>S,UnlockExtraction:()=>X,UpdateZipTask:()=>Y,ZIPPED:()=>U,ZIP_ERROR:()=>V});var r=s(4099),n=s(57842),i=s(43079),o=s(49024),a=s(16661),l=s(32315),c=s(6899),d=s(42485),u=s(56921);const p=100,_="ADD_TASK";function h(e){return t=>{t({id:Date.now().toString(),type:_,...e})}}const g="ADD_UPLOAD_TASK";function m(e,t){return async s=>{const o=e.filter(a.s);if(o.length>p)try{await n.Z.Show({actionLabel:r.ZP.upload_100_plus_files_confirm_label(),cancelLabel:r.ZP.upload_100_plus_files_cancel_label(),message:r.ZP.upload_100_plus_files_confirm_message(o.length)})}catch{return}if(0===o.length)return i.Z.Show({message:r.ZP.upload_size_error(),type:"danger"});s({payload:{files:o,parentId:t},type:g})}}const f="CANCEL_TASK";function y(e){return t=>{t({id:e,type:f})}}const b="CLEAR_COMPLETED_TASKS";function x(){return{type:b}}const w="CHANGE_TASKS_CONTAINER_FOLDING";function S(){return(e,t)=>{e({fold:!t().getIn(["tasks","folded"]),type:w})}}const v="START_DOWNLOAD_LINKS_TASK_START",I="START_DOWNLOAD_LINKS_TASK_SUCCESS",k="START_DOWNLOAD_LINKS_TASK_
227ERROR";function T(e){return(t,s)=>{const n=s().getIn(["tasks","tasks",e]),i=n.getIn(["payload","ids"]),a=n.getIn(["payload","cursor"]),c=n.getIn(["payload","excludeIds"]);t({id:e,type:v}),o.Z.DownloadLinks.Create({cursor:a,excludeIds:c,ids:i}).then((s=>{t({downloadLinksId:s.body.id,id:e,status:d.Z.STATUS.RUNNING,type:I}),t(M(s.body.id))})).catch((s=>{const n=(0,l.j)(s,[{error_type:"DownloadLinksConcurrentLimit",kind:"api_error_type",localize:()=>({message:r.ZP.task_download_links_concurrent_limit_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"DownloadLinksTooManyChildrenRequested",kind:"api_error_type",localize:()=>({message:r.ZP.task_download_links_too_many_children_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"DownloadLinksTooManyFilesRequested",kind:"api_error_type",localize:()=>({message:r.ZP.task_download_links_too_many_files_error(),recoverySuggestion:{description:"",type:"instruction"}})}]);t({errorMessage:n.message,id:e,status:d.Z.STATUS.ERROR,type:k})}))}}const A="GET_DOWNLOAD_LINKS_STATUS_SUCCESS",E="GET_DOWNLOAD_LINKS_STATUS_ERROR";function M(e){return(t,s)=>{const n=s().getIn(["tasks","tasks"]).find((t=>t.getIn(["payload","id"])===e));n&&o.Z.DownloadLinks.Get(e).then((s=>["DONE","ERROR"].includes(s.body.links_status)?"ERROR"===s.body.links_status?t({errorMessage:s.body.error_msg||r.ZP.task_download_links_error(),id:n.get("id"),status:d.Z.STATUS.ERROR,type:E}):void t({id:n.get("id"),links:s.body.links,status:d.Z.STATUS.DONE,type:A}):setTimeout((()=>t(M(e))),1500))).catch((e=>{const s=(0,l.j)(e,[{kind:"generic",localize:()=>({message:r.ZP.task_download_links_error(),recoverySuggestion:{description:"",type:"instruction"}})}]);t({errorMessage:s.message,id:n.get("id"),status:d.Z.STATUS.ERROR,type:E})}))}}const j="START_SHARED_FILE_CLONE_TASK_START",D="START_SHARED_FILE_CLONE_TASK_SUCCESS",C="START_SHARED_FILE_CLONE_TASK_ERROR";function R(e){return(t,s)=>{const n=s().getIn(["tasks","tasks",e]),i=n.getIn(["payload","ids"]),a=n.getIn(["payload","cursor"]),c=n.getIn(["payload","excludeIds"]),u=n.getIn(["payload","parentId"]);t({id:e,type:j}),o.Z.Sharing.Clone({cursor:a,excludeIds:c,ids:i,parentId:u}).then((s=>{t({id:e,sharedFileCloneId:s.body.id,status:d.Z.STATUS.RUNNING,type:D}),t(O(s.body.id))})).catch((s=>{const n=(0,l.j)(s,[{error_type:"SharedFileCloneConcurrentLimit",kind:"api_error_type",localize:()=>({message:r.ZP.task_shared_file_clone_concurrent_limit_error(),recoverySuggestion:{description:"",type:"instruction"}})},{error_type:"SharedFileCloneTooManyFiles",kind:"api_error_type",localize:()=>({message:r.ZP.task_shared_file_clone_too_many_files_error(),recoverySuggestion:{description:"",type:"instruction"}})}]);t({errorMessage:n.message,id:e,status:d.Z.STATUS.ERROR,type:C})}))}}const N="GET_SHARED_FILE_CLONE_STATUS_SUCCESS",P="GET_SHARED_FILE_CLONE_STATUS_ERROR";function O(e){return(t,s)=>{const n=s().getIn(["tasks","tasks"]).find((t=>t.getIn(["payload","id"])===e));n&&o.Z.Sharing.CloneInfo(e).then((s=>["DONE","ERROR"].includes(s.body.shared_file_clone_status)?"ERROR"===s.body.shared_file_clone_status?t({errorMessage:s.body.error_msg||r.ZP.task_shared_file_clone_error(),id:n.get("id"),status:d.Z.STATUS.ERROR,type:P}):void t({id:n.get("id"),status:d.Z.STATUS.DONE,type:N}):setTimeout((()=>t(O(e))),1500))).catch((e=>{const s=(0,l.j)(e,[{kind:"generic",localize:()=>({message:r.ZP.task_shared_file_clone_error(),recoverySuggestion:{description:"",type:"instruction"}})}]);t({errorMessage:s.message,id:n.get("id"),status:d.Z.STATUS.ERROR,type:P})}))}}const L="START_ZIP_TASK_START",Z="START_ZIP_TASK_SUCCESS",F="START_ZIP_TASK_ERROR";function z(e){return(t,s)=>{const r=s().getIn(["tasks","tasks",e]),n=r.getIn(["payload","ids"]),i=r.getIn(["payload","cursor"]),a=r.getIn(["payload","excludeIds"]);t({id:e,type:L}),o.Z.Zips.Create({cursor:i,excludeIds:a,ids:n}).then((s=>{t({id:e,status:d.Z.STATUS.RUNNING,type:Z,zipId:s.body.zip_id}),t(Y({id:s.body.zip_id}))})).catch((s=>{t({err:s,id:e,status:d.Z.STATUS.ERROR,type:F})}))}}const U="ZIPPED",V="ZIP_ERROR";function Y(e){return(t,s)=>{const n=s().getIn(["tasks","tasks"]).find((t=>t.getIn(["payload","id"])===e.id));n&&o.Z.Zips.Get(e.id).then((s=>{if(!["DONE","ERROR"].includes(s.body.zip_status))return setTimeout((()=>t(Y(e))),1500);if(!s.body.url&&"ERROR"===s.body.zip_status)return t({errorMessage:s.body.error_msg||r.ZP.task_zip_message_error(),id:n.get("id"),status:d.Z.STATUS.ERROR,type:V});const i="ERROR"===s.body.zip_status?d.Z.STATUS.PARTIALLY_DONE:d.Z.STATUS.DONE;t({id:n.get("id"),missing_files:s.body.missing_files,size:s.body.size,status:i,type:U,url:s.body.url,zipId:s.body.id})})).catch((e=>{const s=(0,l.j)(e,[{kind:"generic",localize:()=>({message:r.ZP.task_zip_message_error(),recoverySuggestion:{description:"",type:"instruction"}})}]);t({errorMessage:s.message,id:n.get("id"),status:d.Z.STATUS.ERROR,type:V})}))}}const W="GET_EXTRACT_STATUS_START",G="GET_EXTRACT_STATUS_SUCCESS",H="GET_EXTRACT_STATUS_ERROR",B="EXTRACT_PROGRESS",$="EXTRACT_COMPLETED_FOR_ALL_FILES";function q(e){return(t,s)=>{t({type:W});const r=s().getIn(["tasks","tasks",e]);o.Z.Files.ExtractStatus().then((n=>{const i=n.body.extractions||[];if(0===i.length){const s=r.getIn(["payload","extractions","entities","extractions"]),n=s.filter((e=>"ERROR"===e.get("status"))),i=s.filter((e=>"EXTRACTED"===e.get("status")));let o=d.Z.STATUS.DONE;n.size&&!i.size?o=d.Z.STATUS.ERROR:n.size&&i.size&&(o=d.Z.STATUS.PARTIALLY_DONE),t({id:e,status:o,type:$})}t({extractions:(0,c.Fv)(i,u.ExtractionsSchema),id:e,type:B});for(const e of i)"EXTRACTED"!==r.getIn(["payload","extractions","entities",e.id.toString(),"extraction","status"])&&"EXTRACTED"===e.status&&t(u.FileInfo(s().getIn(["files","file","id"])))})).catch((e=>{const s=(0,l.j)(e,[{kind:"generic",localize:()=>({message:"Oops. Could not extract.",recoverySuggestion:{description:"",type:"instruction"}})}]);i.Z.Show(s),t({err:e,type:H})}))}}const Q="EXTRACT_UNLOCK_START",K="EXTRACT_UNLOCK_SUCCESS",J="EXTRACT_UNLOCK_ERROR";function X(e,t){return s=>{s({id:e,password:t,type:Q}),o.Z.File.Extract(e,t).then((()=>{s({id:e,password:t,type:K})})).catch((r=>{s({err:r,id:e,password:t,type:J})}))}}},55522:(e,t,s)=>{"use strict";s.d(t,{e:()=>l});var r=s(59177),n=s(13390),i=s(26671),o=s(75289),a=s(59056);const l=e=>{let{children:t,color:s="text",href:l,sx:c={},...d}=e;const u={"@media (hover: hover)":{":hover":{textDecoration:"underline"}},color:s||"text",fontSize:1,lineHeight:"body"},p=i.TS.all(u,c);return l?.startsWith("/")?(0,a.tZ)(r.rU,{sx:p,to:l,...(0,n.e)(d,["tabIndex"]),children:t}):(0,a.tZ)(o.rU,{href:l,sx:p,...d,children:t})}},80641:(e,t,s)=>{"use strict";s.d(t,{h:()=>r});const r=()=>{const e=document.getElementsByTagName("header")[0];return e?e.getBoundingClientRect():null}},7443:(e,t,s)=>{"use strict";s.d(t,{z:()=>T});var r=s(2754),n=s(2784),i=s(72674),o=s(75289),a=s(85365),l=s(94115),c=s(39723),d=s(82898),u=s(65186),p=s(27622),_=s(52322);const h=e=>{let{fullWidth:t=!1,onChange:s,options:r,trigger:n,value:i}=e;return(0,_.jsxs)(o.xu,{sx:{display:"inline-block",margin:0,position:"relative",textAlign:"center",width:t?"100%":void 0},children:[n,(0,_.jsx)("select",{onChange:e=>s(e.target.value),style:{height:"100%",left:0,opacity:0,position:"absolute",top:0,width:"100%"},value:i,children:r.map((e=>(0,_.jsx)("option",{value:e.value,children:e.label},e.value)))})]})}
227,g=[{label:".25x",value:"0.25"},{label:".5x",value:"0.5"},{label:".75x",value:"0.75"},{label:"1x",value:"1"},{label:"1.25x",value:"1.25"},{label:"1.5x",value:"1.5"},{label:"2x",value:"2"},{label:"3x",value:"3"}],m="2.4em",f=(0,a.Z)(p.k)`
228  display: block;
229  line-height: 1;
230`,y=e=>{let{muted:t,onFastForward:s,onPlayPause:r,onRewind:n,onSetPlaybackRate:i,onToggleMute:a,paused:c,playbackRate:p}=e;const y=(0,l.yU)("text");return(0,_.jsx)(d.Pd.Provider,{value:{color:y,size:"1.6em"},children:(0,_.jsxs)(o.kC,{sx:{alignItems:"center",gap:3,justifyContent:"center"},children:[(0,_.jsx)(h,{onChange:e=>i(Number(e)),options:g,trigger:(0,_.jsx)(f,{children:(0,_.jsxs)(o.xu,{sx:{backgroundColor:"text",borderRadius:"default",color:"app-bg",fontSize:0,fontWeight:"button",lineHeight:1,paddingX:2,paddingY:"2px"},children:[p,"x"]})}),value:String(p)}),(0,_.jsx)(f,{onClick:n,children:(0,_.jsx)(u.FAz,{})}),(0,_.jsx)(f,{onClick:r,children:c?(0,_.jsx)(u.Hm_,{size:m}):(0,_.jsx)(u.pkR,{size:m})}),(0,_.jsx)(f,{onClick:s,children:(0,_.jsx)(u.H_w,{})}),(0,_.jsx)(f,{onClick:a,children:t?(0,_.jsx)(u.hwG,{}):(0,_.jsx)(u.HvK,{})})]})})},b=(0,a.Z)(i.Z)`
231  width: 100%;
232  height: 3px;
233`,x=(0,a.Z)(o.xu)`
234  top: 0;
235  bottom: 0;
236  border-radius: ${e=>{let{theme:t}=e;return t.radii.circle}}px;
237  cursor: var(--config-cursor);
238`,w=(0,a.Z)(o.xu)`
239  .thumb-text {
240    opacity: 0;
241  }
242
243  &:hover {
244    .thumb-text {
245      opacity: 1;
246    }
247  }
248`,S=(0,a.Z)(o.xu)`
249  height: 18px;
250  width: 18px;
251  border-radius: ${e=>{let{theme:t}=e;return t.radii.circle}}px;
252  cursor: grab;
253  margin-top: 2px;
254`,v=(0,a.Z)(o.xv)`
255  position: absolute;
256  bottom: 24px;
257  left: -10px;
258  padding: 0px 4px;
259  border-radius: ${e=>{let{theme:t}=e;return t.radii.default}}px;
260`,I=e=>(t,s)=>(0,_.jsxs)(w,{...t,marginTop:"-7px",children:[(0,_.jsx)(S,{backgroundColor:e.colors["yellow-solid"]}),(0,_.jsx)(v,{backgroundColor:e.colors["yellow-component-bg"],className:"thumb-text",color:e.colors.text,sx:{fontSize:e.fontSizes[0]},children:(0,r.Qh)(s.valueNow)})]}),k=e=>(t,s)=>(0,_.jsx)(x,{...t,backgroundColor:0===s.index?e.colors["yellow-solid"]:e.colors.solid,sx:{paddingY:1}}),T=e=>{const t=(0,n.useRef)(null),[s,i]=(0,n.useState)({type:"loading"}),[a,d]=(0,n.useState)(0),[u,p]=(0,n.useState)(0),[h,g]=(0,n.useState)(1),[m,f]=(0,n.useState)(!1),[x,w]=(0,n.useState)(0),[S,v]=(0,n.use
260State)(!1),{theme:T}=(0,l.Fg)();return"error"===s.type?(0,_.jsx)(c.P,{action:{label:"Download",onClick:()=>window.open(e.url,"_blank")},message:"We couldn't play this file. Please try downloading it.",title:"Playback failed",type:"warning"}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(o.xu,{sx:{marginTop:3},children:[(0,_.jsx)(b,{max:u,onAfterChange:e=>{"number"==typeof e&&t.current&&(w(e),t.current.currentTime=e)},renderThumb:I(T),renderTrack:k(T),value:x}),(0,_.jsxs)(o.kC,{sx:{alignItems:"center",justifyContent:"space-between",marginBottom:"12px",marginTop:"12px"},children:[(0,_.jsx)(o.xv,{sx:{fontSize:0},children:(0,r.Qh)(a)}),(0,_.jsx)(o.xv,{sx:{fontSize:0},children:(0,r.Qh)(u)})]}),(0,_.jsx)(y,{muted:S,onFastForward:()=>{t.current&&(t.current.currentTime=a+10)},onPlayPause:()=>{t.current&&(t.current.paused?t.current.play():t.current.pause())},onRewind:()=>{t.current&&(t.current.currentTime=a-10)},onSetPlaybackRate:e=>{t.current&&(t.current.playbackRate=e)},onToggleMute:()=>v(!S),paused:!m,playbackRate:h})]}),(0,_.jsx)("audio",{autoPlay:e.autoPlay,muted:S,onEnded:()=>{e.onEnd?.(),f(!1)},onError:()=>{i({type:"error"})},onLoadedData:e=>{i({type:"playback"}),p(e.currentTarget.duration)},onPause:()=>f(!1),onPlay:()=>f(!0),onRateChange:e=>g(e.currentTarget.playbackRate),onTimeUpdate:t=>{e.onTimeUpdate?.(t.currentTarget.currentTime),d(t.currentTarget.currentTime),w(t.currentTarget.currentTime)},ref:t,src:e.url})]})}},73372:(e,t,s)=>{"use strict";s.d(t,{q:()=>o});var r=s(22850),n=s(33611),i=s(59056);const o=e=>{let{size:t=32,src:s,variant:o="user"}=e;return(0,i.BX)(r.fC,{sx:{alignItems:"center",borderRadius:"user"===o?"circle":"default",display:"inline-flex",height:t,justifyContent:"center",overflow:"hidden",userSelect:"none",verticalAlign:"middle",width:t},children:[(0,i.tZ)(r.Ee,{src:"user"===o?s.replace("s=50","s=200"):s,sx:{borderRadius:"inherit",height:"100%",objectFit:"cover",width:"100%"}}),(0,i.tZ)(r.NY,{delayMs:600,children:(0,i.tZ)(n.O,{height:t,invert:!0,width:t})})]})}},69363:(e,t,s)=>{"use strict";s.d(t,{h:()=>i});var r=s(75289),n=s(52322);const i=e=>{let{children:t,direction:s="column",spacing:i=2,inline:o=!1,sx:a={}}=e;return(0,n.jsx)(r.xu,{sx:{display:o?"inline-grid":"grid",gridAutoFlow:s,gridGap:i,...a},children:t})}},18756:(e,t,s)=>{"use strict";s.d(t,{I:()=>d,z:()=>p});var r=s(53153),n=s(2784),i=s(26671),o=s(75289),a=s(27447),l=s(94115),c=s(52322);const d=e=>(0,n.useMemo)((()=>{switch(e){case"primary":case"warning":return{":hover":{bg:"yellow-solid-hover",border:"yellow-solid-hover"},bg:"yellow-solid",border:"yellow-solid",color:"black"};case"invert":return{":hover":{bg:"text-contrast",border:"border-hover"},bg:"text",border:"border",color:"app-bg"};case"info":return{":hover":{bg:"solid-hover",border:"solid-hover"},bg:"solid",border:"solid",color:"white"};case"success":return{":hover":{bg:"green-solid-hover",border:"green-solid-hover"},bg:"green-solid",border:"green-solid",color:"white"};case"danger":return{":hover":{bg:"red-solid-hover",border:"red-solid-hover"},bg:"red-solid",border:"red-solid",color:"white"};default:return{":hover":{bg:"component-bg-hover",border:"border-hover"},bg:"component-bg",border:"border",color:"text"}}}),[e]),u=e=>"xs"===e?{fontSize:0,letterSpacing:.3}:"sm"===e?{letterSpacing:.6}:"md"===e?{letterSpacing:.8}:{letterSpacing:1},p=n.forwardRef(((e,t)=>{let{children:s,cursor:p,disabled:_=!1,fullWidth:h=!1,icon:g,loading:m=!1,size:f="md",sx:y={},type:b="button",variant:x="default",...w}=e;const{colors:S,cursor:v}=((e,t)=>{const{theme:s}=(0,l.Fg)(),n=(0,r.Fq)(e.color,.75)(s);if(t.loading){const t="transparent"===e.bg?"transparent":(0,r.Fq)(e.bg,.75)(s);return{colors:{":hover":{bg:t,border:t},bg:t,border:e.border,color:n},cursor:"default"}}if(t.disabled){const t="transparent"===e.bg?"transparent":(0,r.Fq)(e.bg,.3)(s);return{colors:{":hover":{bg:t,border:t},bg:t,border:t,color:n},cursor:"not-allowed"}}return{colors:e,cursor:"var(--config-cursor)"}})(d(x),{disabled:_,loading:m}),I=i.TS.all((e=>"xs"===e?{height:24,paddingX:2}:"sm"===e?{height:28,paddingX:3}:"md"===e?{height:32,paddingX:3}:{height:36,paddingX:3}
260)(f),{borderRadius:"default",display:h?"block":"inline-block",paddingY:0,variant:"text.button",width:h?"100%":"auto"},{":active":{bg:S[":hover"].bg,cursor:p},"@media (hover: hover)":{":hover":{bg:S[":hover"].bg,borderColor:S[":hover"].border||S[":hover"].bg,cursor:p??v}},bg:S.bg,borderColor:S.border||S.bg,borderStyle:"solid",borderWidth:"1px",color:S.color},y),k=(0,n.useMemo)((()=>g?m?(0,c.jsx)(o.xu,{sx:{marginLeft:"-2px",marginRight:2},children:(0,c.jsx)(o.$j,{size:14})}):(0,c.jsx)(o.xu,{sx:{"& > i":{color:I.color},marginRight:2},children:(0,c.jsx)(a.J,{...g})}):null),[g,m,I]),T=(0,n.useMemo)((()=>m?g?null:(0,c.jsx)(o.xu,{sx:{alignItems:"center",display:"flex",height:"100%",justifyContent:"center",position:"absolute",width:"100%"},children:(0,c.jsx)(o.$j,{size:20})}):null),[m,g]);return(0,c.jsx)(o.zx,{...w,disabled:m||_,ref:t,sx:I,type:b,variant:"translate",..."string"==typeof s?{"aria-label":s}:{},children:(0,c.jsxs)(o.kC,{sx:{alignItems:"center",justifyContent:"center",position:"relative"},children:[T,k,(0,c.jsx)(o.xv,{sx:{opacity:m&&!g?0:1,textTransform:"uppercase",userSelect:"none",...u(f)},children:s})]})})}))},18047:(e,t,s)=>{"use strict";s.d(t,{m:()=>d});var r=s(40070),n=s(2784),i=s(63259),o=s(18756),a=s(59807),l=s(27622),c=s(52322);const d=e=>{let{children:t,size:s,value:d,variant:u="icon-button"}=e;const p=(0,r.V)({timeout:1e3}),_=(0,n.useMemo)((()=>p.error?{error:p.error,type:"failure"}:p.copied?{type:"success"}:{type:"pristine"}),[p]),h=(0,n.useMemo)((()=>{switch(_.type){case"failure":return"exclamation-point-2";case"success":return"checkmark-1";default:return"clipboard"}}),[_]),g=(0,n.useMemo)((()=>{switch(_.type){case"failure":return _.error.message;case"success":return"Copied!";default:return""}}),[_]),m=(0,n.useCallback)((()=>{p.copy(d)}),[p,d]);return(0,n.useEffect)((()=>()=>p.reset()),[p]),"button"===u?(0,c.jsx)(o.z,{cursor:"copy",icon:{name:h,type:"solid"},onClick:m,size:s,children:g||"Copy"}):"unstyled"===u?(0,c.jsx)(i.u,{label:g,opened:"pristine"!==_.type,children:(0,c.jsx)(l.k,{onClick:m,sx:{"@media (hover: hover)":{":hover":{cursor:"copy",opacity:.8}}},children:t})}):(0,c.jsx)(i.u,{label:g,opened:"pristine"!==_.type,children:(0,c.jsx)(a.h,{cursor:"copy",icon:{name:h,type:"solid"},onClick:m,size:s})})}},59807:(e,t,s)=>{"use strict";s.d(t,{h:()=>d});var r=s(2784),n=s(26671),i=s(75289),o=s(27447),a=s(63259),l=s(18756),c=s(52322);const d=r.forwardRef(((e,t)=>{let{appearance:s="hover",cursor:r,fontSize:d,height:u,icon:p,loading:_,size:h="md",title:g,type:m="button",variant:f="default",width:y,...b}=e;const{bg:x,color:w,...S}=((e,t)=>{const s=(0,l.I)(e);if("filled"===t)return s;switch(e){case"primary":case"warning":return{":hover":{bg:"yellow-component-bg-hover"},bg:"transparent",color:"yellow-solid"};case"success":return{":hover":{bg:"green-component-bg-hover"},bg:"transparent",color:"green-solid"};case"danger":return{":hover":{bg:"red-component-bg-hover"},bg:"transparent",color:"red-solid"};case"info":return{":hover":{bg:"component-bg-hover"},bg:"transparent",color:"text"};default:return{":hover":{bg:"component-bg-hover"},bg:"transparent",color:"text-secondary"}}})(f,s);let v=(e=>"xs"===e?{fontSize:0,height:20,width:20}:"sm"===e?{fontSize:0,height:28,width:28}:"md"===e?{fontSize:1,height:32,width:32}:{fontSize:3,height:32,width:32})(h);y&&u&&void 0!==d&&(v={fontSize:d,height:u,width:y});const I=n.TS.all(v,{"@media (hover: hover)":{":hover":{bg:"icon"===s?"transparent":S[":hover"].bg,cursor:r??"var(--config-cursor)"}},bg:x,color:w,..."icon"===s?{backgroundColor:"transparent",border:"none",height:"auto",padding:0,width:"auto"}:{}}),k=(0,c.jsx)(i.hU,{...b,"aria-label":g,ref:t,sx:I,type:m,variant:"translate",children:_?(0,c.jsx)(i.$j,{color:"inherit",size:v.height/2}):(0,c.jsx)(o.J,{...p})});return g?(0,c.jsx)(a.u,{label:g,children:k}):k}))},27622:(e,t,s)=>{"use strict";s.d(t,{k:()=>i});var r=s(2784),n=s(59056);const i=(0,r.forwardRef)(((e,t)=>{let{sx:s={},type:r,...i}=e;return(0,n.tZ)("button",{ref:t,sx:{variant:"buttons.unstyled",...s},type:r||"button",...i})}))},88940:(e,t,s)=>{"use strict";s.d(t,{b:()=>l,e:()=>c});var r=s(98355),n=s(2754),i=s(75289),o=s(59807),a=s(52322);const l=e=>{const{data:{avail:t,size:s,used:i},displayFormat:o,displayType:a}=e,l=((e,t)=>"detailed"===t?{decimalPlaces:0,unit:e>=1099511627776?"GB":"MB"}:{decimalPlaces:0})(s,o);
260return"available"===a?(0,r.I)("usage_label_optimistic",(0,n.Gj)(t,l),(0,n.Gj)(s,l)):(0,r.I)("usage_label",(0,n.Gj)(i,l),(0,n.Gj)(s,l))},c=e=>{let{data:t,displayFormat:s,displayType:r,onConfigure:n,size:c="md"}=e;const d=l({data:t,displayFormat:s,displayType:r});return(0,a.jsxs)(i.rj,{columns:1,gap:"sm"===c?1:2,sx:{width:"100%"},children:[(0,a.jsx)(i.Ex,{max:t.size,value:t.used}),(0,a.jsxs)(i.kC,{sx:{"& > i":{color:"inherit!important"},alignItems:"center",justifyContent:n?"space-between":"center",mr:n?"-2px":0,variant:"text.caption"},children:[(0,a.jsx)(i.xv,{children:d}),n&&(0,a.jsx)(o.h,{icon:{name:"settings-2",type:"stroke"},onClick:n,size:"xs",title:"Open storage settings"})]})]})}},85125:(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var r=s(88582),n=s(79318),i=s(94115),o=s(10017),a=s(75289),l=s(27447),c=s(52322);const d=e=>{let{data:t,isSelected:s=!1,styles:r}=e;return(0,c.jsxs)(a.kC,{sx:{...r,alignItems:"center",display:"flex",justifyContent:"space-between"},children:[(0,c.jsx)(a.xu,{children:t.icon?(0,c.jsx)(a.xu,{marginRight:2,children:(0,c.jsx)(a.xv,{sx:{fontSize:12},children:(0,c.jsx)(l.J,{color:r.color,name:t.icon.name,type:t.icon.type})})}):null}),(0,c.jsx)(a.kC,{sx:{flex:1,marginBottom:"1px"},children:(0,c.jsx)(a.xv,{children:t.label})}),(0,c.jsx)(a.xu,{children:(()=>{if(!t.accessory)return s?(0,c.jsx)(a.xu,{ml:2,children:(0,c.jsx)(l.J,{color:r.color,name:"checkmark-2",size:12,type:"solid"})}):null;switch(t.accessory.kind){case"icon":return(0,c.jsx)(a.xu,{ml:2,children:(0,c.jsx)(a.xv,{sx:{fontSize:12},children:(0,c.jsx)(l.J,{color:r.color,name:t.accessory.name,type:t.accessory.type})})});case"text":return(0,c.jsx)(a.xu,{ml:2,children:(0,c.jsx)(a.xv,{sx:{fontSize:12},children:t.accessory.value})});default:(0,o.Z)(t.accessory)}})()})]})},u=e=>{const{data:t,getStyles:s,innerProps:r,innerRef:n}=e;return(0,c.jsx)("div",{ref:n,...r,children:(0,c.jsx)(d,{data:t,isSelected:e.isSelected,styles:s("option",e)})})},p=e=>{const{data:t,getStyles:s}=e;return(0,c.jsx)(d,{data:t,isSelected:!1,styles:s("singleValue",e)})},_=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return Object.assign({},...t)},h=e=>{let{clearable:t=!1,disabled:s=!1,hideSelectedOptions:o=!1,loading:a=!1,minWidth:l=160,onSelect:d,options:h,placeholder:g="",searchable:m=!1,value:f,variant:y="default"}=e;const{theme:b}=(0,i.Fg)(),x=(0,n.a)(),w=h.find((e=>e.value===f)),S="input"===y;return(0,c.jsx)(r.ZP,{components:{Option:u,SingleValue:p},hideSelectedOptions:o,isClearable:t,isDisabled:s,isLoading:a,isOptionDisabled:e=>Boolean(e.disabled),isSearchable:m,onChange:e=>d(e?e.value:""),options:h,placeholder:g,styles:{clearIndicator:e=>_(e,{margin:0,padding:0}),container:e=>_(e,{pointerEvents:"initial"}),control:(e,t)=>_(e,{":focus-within":{boxShadow:`0 0 0 1px ${b.colors["border-hover"]}`},":hover":{borderColor:t.isDisabled?b.colors.border:b.colors["border-hover"]},backgroundColor:b.colors["component-bg"],borderColor:t.menuIsOpen?b.colors["border-hover"]:b.colors.border,borderRadius:b.radii.default,borderWidth:1,boxShadow:"none",cursor:t.isDisabled?"not-allowed":"var(--config-cursor)",minHeight:"none",minWidth:l,opacity:t.isDisabled?.5:1,padding:"4px",...S?{alignItems:"center",backgroundColor:x.backgroundColor,borderColor:t.menuIsOpen?b.colors["border-hover"]:x.borderColor,borderRadius:x.borderRadius,borderWidth:x.borderWidth,boxShadow:t.menuIsOpen?`0 0 0 1px ${b.colors["border-hover"]}`:"none",color:x.color,fontFamily:x.fontFamily,fontSize:x.fontSize,fontWeight:x.fontWeight,height:36,lineHeight:x.lineHeight,minHeight:36,padding:0}:{}}),dropdownIndicator:e=>_(e,{margin:0,padding:S?"0 8px":0}),indicatorSeparator:e=>_(e,{backgroundColor:b.colors.border,margin:"8px 4px",opacity:t?1:0}),input:e=>_(e,{color:b.colors.text,fontSize:b.fontSizes[0],margin:0,padding:0}),loadingIndicator:e=>_(e,{padding:0}),menu:e=>_(e,{backgroundColor:b.colors["component-bg"],borderRadius:b.radii.default,fontSize:b.fontSizes[0]}),menuList:e=>_(e,{borderRadius:b.radii.default,borderWidth:1,padding:0}),option:(e,t)=>_(e,((e,t)=>t.isDisabled?{backgroundColor:e.colors["component-bg"],color:e.colors.text,opacity:.5}:t.isSelected?{background:e.colors["component-bg-active"],color:e.colors.text}:{":hover":{backgroundColor:e.colors["component-bg-hover"]},backgroundColor:e.colors["component-bg"],color:e.colors.text})(b,t),{cursor:"var(--config-cursor)"}),placeholder:e=>_(e,{fontSize:b.fontSizes[0]}),singleValue:e=>_(e,{color:b.colors.text,fontSize:b.fontSizes[0],margin:0}),valueContainer:e=>_(e,{minHeight:S?34:void 0,padding:S?"0 12px":"0 8px"})},value:w},w?w.value:"key")}},1030:(e,t,s)=>{"use strict";s.d(t,{u:()=>_});var r=s(15545),n=s(2784),i=s(75289),o=s(18756),a=s(27447),l=s(86794),c=s(7735),d=s(77082),u=s(69363),p=s(52322);const _=e=>{const{action:t,icon:s,message:_,title:h}=(0,n.useMemo)((()=>
260{if("error"in e){const{error:t}=e,s={action:null,icon:{color:"red-solid",name:"minus-2",type:"stroke"},message:t.recoverySuggestion.description,title:t.message};if("trigger"in t.recoverySuggestion&&(s.action=(0,p.jsx)(o.z,{onClick:t.recoverySuggestion.trigger.callback,size:"sm",variant:"invert",children:t.recoverySuggestion.trigger.label})),t.meta.id){const e=(0,p.jsx)(o.z,{size:"sm",variant:s.action?"default":"invert",onClick:()=>(0,r.k)({body:`error_id: ${t.meta.id}`,title:"I have an issue with the web app"}),children:"Contact Support"});s.action=s.action?(0,p.jsxs)(u.h,{direction:"row",inline:!0,spacing:2,children:[s.action,e]}):null}return"secondaryTrigger"in e&&(s.action=s.action?(0,p.jsxs)(u.h,{direction:"column",inline:!0,spacing:2,children:[s.action,(0,p.jsx)(o.z,{size:"sm",variant:s.action?"default":"invert",...e.secondaryTrigger})]}):null),s}return{...e,action:(0,p.jsx)(o.z,{size:"sm",variant:"primary",...e.trigger})}}),[e]);return(0,p.jsxs)(i.xu,{variant:e.variant?`boxes.${e.variant}`:"",children:[(0,p.jsxs)(i.rj,{sx:{gap:3,maxWidth:d.j.SM,mx:"auto",paddingBottom:"fullscreenOverlay"===e.variant||"fullscreen"===e.variant?"10vh":0,paddingTop:"page"===e.variant?[3,0,0]:0,px:3,textAlign:"center",width:"100%",...e.sx},children:[s?(0,p.jsx)(a.J,{...s,color:s.color||"text-secondary",style:{fontSize:24,marginBottom:-8}}):null,(0,p.jsxs)(i.rj,{sx:{gap:1},children:[(0,p.jsx)(i.__,{sx:{fontSize:2},children:h}),_?(0,p.jsx)(i.xu,{sx:{"& > p":{color:"text-secondary",whiteSpace:"pre-line",wordBreak:"break-word"},fontSize:1},children:(0,p.jsx)(l.G,{children:_})}):null]}),(0,p.jsx)(i.xu,{children:t})]}),"fullscreenOverlay"===e.variant||"overlay"===e.variant?(0,p.jsx)(c.t,{lock:!0}):null]})}},784:(e,t,s)=>{"use strict";s.d(t,{X:()=>l});var r=s(75289),n=s(27447),i=s(52322);const o=e=>{let{checked:t}=e;return{alignItems:"center",backgroundColor:"app-bg",borderColor:t?"text":"solid",borderRadius:"default",borderStyle:"solid",borderWidth:2,height:"20px",justifyContent:"center",marginRight:0,position:"relative",width:"20px"}},a={color:"transparent","input:checked ~ &":{color:"transparent"},"input:focus ~ &":{bg:"transparent",color:"transparent"},margin:0},l=e=>{let{input:{value:t,...s},label:l,labelStyle:c={}}=e;return(0,i.jsxs)(r.__,{sx:{"&:hover":{cursor:"var(--config-cursor)"},alignItems:"center",display:"flex",fontSize:0,userSelect:"none"},children:[(0,i.jsxs)(r.kC,{className:"focus-within",sx:o({checked:Boolean(s.checked)}),children:[(0,i.jsx)(r.XZ,{...s,sx:a}),(0,i.jsx)(r.kC,{sx:{alignItems:"center",fontSize:2,height:"100%",justifyContent:"center",left:0,position:"absolute",top:"1px",width:"100%"},children:s.checked?(0,i.jsx)(n.J,{color:"text",name:"checkmark-1",type:"solid"}):null})]}),l?(0,i.jsx)(r.xv,{sx:{flex:1,lineHeight:"20px",paddingLeft:2,...c},children:l}):null]})}},40238:(e,t,s)=>{"use strict";s.d(t,{D:()=>p,p:()=>u});var r=s(2644),n=s(58330),i=s(69363),o=s(59807),a=s(18047),l=s(93291),c=s(79318),d=s(52322);const u=e=>{let{description:t,error:s,label:u,rightSection:p,sensitive:_,value:h,...g}=e;const m=(0,c.a)(),[f,y]=(0,n.Z)(!_);return(0,d.jsx)(l.S,{description:t,error:s,label:u,name:g.name,children:(0,d.jsx)(r.g,{autosize:!0,disabled:!0,maxRows:12,minRows:1,rightSection:(0,d.jsxs)(i.h,{spacing:1,children:[_?(0,d.jsx)(o.h,{icon:{name:f?"eye-1":"eye-2",type:"stroke"},onClick:y,size:"sm",tabIndex:-1}):null,(0,d.jsx)(a.m,{size:"sm",value:h}),p]}),rightSectionWidth:p&&_?100:_?70:void 0,styles:{input:{...m,"::-webkit-scrollbar":{display:"none"},":disabled":{backgroundColor:m.backgroundColor,color:m.color,cursor:"default",opacity:1},fontFamily:"var(--font-monospace)",fontSize:"var(--fontSize-0)"}},value:f?h:"•".repeat(h.length),...g})})},p=e=>{let{input:t,...s}=e;return(0,d.jsx)(u,{...t,...s})}},44094:(e,t,s)=>{"use strict";s.d(t,{Y:()=>a});var r=s(75289),n=s(39723),i=s(36555),o=s(52322);const a=e=>{let{children:t,spacing:s=3,submitError:a,sx:l={},...c}=e;return(0,o.jsx)("form",{...c,children:(0,o.jsxs)(r.xu,{sx:{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:s,...l},children:[a?(0,o.jsx)(r.xu,{sx:{width:"100%"},children:"string"==typeof a?(0,o.jsx)(n.P,{message:a,type:"danger"}):(0,o.jsx)(n.P,{...(0,i.P)(a)})}):null,t]}
260)})}},69779:(e,t,s)=>{"use strict";s.d(t,{NI:()=>l});var r=s(75289),n=s(86794),i=s(52322);const o=e=>{let{children:t,htmlFor:s}=e;return(0,i.jsx)(r.__,{htmlFor:s,children:t})},a=e=>{let{children:t,style:s={}}=e;return(0,i.jsx)(r.xv,{sx:{display:"block",variant:"text.caption",...s},children:"string"==typeof t?(0,i.jsx)(n.G,{children:t}):t})},l=e=>t=>{const{helper:s,input:n,label:l,meta:c,...d}=t;let u="untouched",p="";if(c.touched){const e=c.error||c.submitError;e?(u="invalid",p=e):u="valid"}return(0,i.jsxs)(r.xu,{sx:{width:"100%"},children:[l&&(0,i.jsx)(r.xu,{mb:s?0:1,children:(0,i.jsx)(o,{htmlFor:n.name,children:l})}),s&&(0,i.jsx)(r.xu,{mb:1,children:(0,i.jsx)(a,{children:s})}),(0,i.jsx)(r.xu,{sx:{width:"100%"},children:(0,i.jsx)(e,{...t,forwardedProps:d,validationState:u})}),p&&(0,i.jsx)(r.xu,{mt:1,children:(0,i.jsx)(r.xv,{sx:{color:"red-solid",display:"block",variant:"text.caption"},children:p})})]})}},93291:(e,t,s)=>{"use strict";s.d(t,{S:()=>o});var r=s(75289),n=s(86794),i=s(52322);const o=e=>{let{children:t,description:s,error:o,label:a,name:l}=e;return(0,i.jsxs)(r.xu,{sx:{width:"100%"},children:[a&&(0,i.jsx)(r.xu,{mb:s?0:1,children:(0,i.jsx)(r.__,{htmlFor:l,children:a})}),s&&(0,i.jsx)(r.xu,{mb:1,children:(0,i.jsx)(r.xv,{sx:{display:"block",variant:"text.caption"},children:"string"==typeof s?(0,i.jsx)(n.G,{children:s}):s})}),(0,i.jsx)(r.xu,{sx:{width:"100%"},children:t}),o&&(0,i.jsx)(r.xu,{mt:1,children:(0,i.jsx)(r.xv,{sx:{color:"red-text-secondary",display:"block",variant:"text.caption"},children:o})})]})}},47873:(e,t,s)=>{"use strict";s.d(t,{W:()=>d});var r=s(58330),n=s(75289),i=s(59807),o=s(69779),a=s(10017);const l=e=>{switch(e){case"untouched":case"valid":return"border";case"invalid":return"red-border";default:(0,a.Z)(e)}};var c=s(52322);const d=(0,o.NI)((e=>{let{forwardedProps:t,input:s,validationState:o}=e;const[a,d]=(0,r.Z)(!1);return(0,c.jsxs)(n.xu,{sx:{position:"relative"},children:[(0,c.jsx)(n.II,{...s,...t,sx:{borderColor:l(o),minHeight:36,paddingRight:40,paddingX:12},type:a?"text":"password"}),(0,c.jsx)(n.kC,{sx:{height:"100%",justifyContent:"center",padding:1,position:"absolute",right:0,top:0},children:(0,c.jsx)(i.h,{icon:{name:a?"eye-1":"eye-2",type:"stroke"},onClick:d,tabIndex:-1})})]})}))},40546:(e,t,s)=>{"use strict";s.d(t,{r:()=>a,v:()=>l});var r=s(2784),n=s(75289),i=s(93291),o=s(52322);const a=e=>{const{name:t,onChange:s,options:a,value:l,...c}=e,d=(0,r.useCallback)((e=>s(e.target.value)),[s]);return(0,o.jsx)(i.S,{...c,children:(0,o.jsx)(n.xu,{sx:{display:"grid",gridGap:3},children:a.map((e=>{const s=e.value===l;return(0,o.jsx)(n.__,{children:(0,o.jsxs)(n.kC,{sx:{"@media (hover: hover)":{":hover":{bg:"list-item-bg-hover",borderColor:"border-hover",cursor:"var(--config-cursor)"}},bg:s?"list-item-bg-hover":"transparent",borderColor:s?"border-hover":"border",borderRadius:"default",borderStyle:"solid",borderWidth:1,gap:3,padding:3},children:[(0,o.jsx)(n.xu,{children:(0,o.jsx)(n.Y8,{defaultChecked:s,name:t,onChange:d,sx:{marginRight:0},value:e.value})}),(0,o.jsxs)(n.kC,{sx:{flex:1,flexDirection:"column",gap:1},children:[(0,o.jsx)(n.xu,{variant:"forms.label",children:e.title}),(0,o.jsx)(n.xu,{variant:"text.caption",children:e.description})]})]})},e.value)}))})})},l=e=>{let{input:t,meta:s,...r}=e;const n=s.error||s.submitError;return(0,o.jsx)(a,{error:n,...t,...r})}},15820:(e,t,s)=>{"use strict";s.d(t,{r:()=>l});var r=s(71726),n=s(2784),i=s(75289),o=s(85365),a=s(52322);const l=e=>{let{checked:t,disabled:s,label:l,labelPosition:c="before",labelStyle:d={},name:u,onChange:p,size:_}=e;const h=(e=>"sm"===e?{label:{fontSize:0},root:{height:"18px",width:"28px"},thumb:{gap:"2px",height:"13px",width:"13px"}}:{label:{fontSize:1},root:{height:"20px",width:"34px"},thumb:{gap:"2px",height:"16px",width:"16px"}})(_),g=(0,n.useMemo)((()=>(0,o.Z)(r.fC)`
261      all: unset;
262      width: ${h.root.width};
263      height: ${h.root.height};
264      border-radius: ${e=>{let{theme:t}=e;return t.radii.circle}}px;
265      background-color: ${e=>{let{theme:t}=e;return t.colors.border}};
266
267      &[data-state="checked"] {
268        background-color: ${e=>{let{theme:t}=e;return t.colors["green-solid"]}};
269      }
270    `),[h.root]),m=(0,n.useMemo)((()=>(0,o.Z)(r.bU)`
271      display: block;
272      width: ${h.thumb.width};
273      height: ${h.thumb.height};
274      border-radius: ${e=>{let{theme:t}=e;return t.radii.circle}}px;
275      background-color: white;
276      transition: transform 100ms;
277      transform: translateX(${h.thumb.gap});
278      will-change: transform;
279
280      &[data-state="checked"] {
281        transform: translateX(
282          calc(${h.root.width} - ${h.thumb.width} - ${h.thumb.gap})
283        );
284      }
285    `),[h.root.width,h.thumb]),f=(0,a.jsx)(g,{checked:t,disabled:s,id:u,name:u,onCheckedChange:p,children:(0,a.jsx)(m,{})});return l?(0,a.jsxs)(i.kC,{sx:{alignItems:"center",flexDirection:"before"===c?"row":"row-reverse",gap:"sm"===_?1:2,justifyContent:"before"===c?"flex-start":"flex-end"},children:[(0,a.jsx)(i.__,{htmlFor:u,sx:{width:"auto",...h.label,...d},children:l}),(0,a.jsx)(i.xu,{sx:{flexShrink:0,lineHeight:1},children:f})]}):f}},40153:(e,t,s)=>{"use strict";s.d(t,{d:()=>c});var r=s(34272),n=s(2784),i=s(93291),o=s(79318),a=s(52322);const l=e=>{let{autoSelect:t,description:s,error:l,invalid:c,label:d,...u}=e;const p=(0,o.a)({invalid:c}),_=(0,n.useRef)(null);return(0,n.useEffect)((()=>{t&&_.current&&_.current.select()}),[t]),(0,a.jsx)(i.S,{description:s,error:l,label:d,name:u.name,children:(0,a.jsx)(r.o,{ref:_,styles:{input:p},...u})})},c=e=>
285{let{input:t,meta:s,...r}=e;const n=s.error||s.submitError;return(0,a.jsx)(l,{error:n,invalid:!!n,...t,...r,type:t.type||"text"})}},30965:(e,t,s)=>{"use strict";s.d(t,{l:()=>l});var r=s(2644),n=s(93291),i=s(79318),o=s(52322);const a=e=>{let{description:t,error:s,invalid:a,label:l,...c}=e;const d=(0,i.a)({invalid:a});return(0,o.jsx)(n.S,{description:t,error:s,label:l,name:c.name,children:(0,o.jsx)(r.g,{styles:{input:d},...c})})},l=e=>{let{input:t,meta:s,...r}=e;const n=s.error||s.submitError;return(0,o.jsx)(a,{error:n,invalid:!!n,...t,...r})}},28867:(e,t,s)=>{"use strict";s.d(t,{d:()=>c,t:()=>l});var r=s(67362),n=s(75289),i=s(85365),o=s(52322);const a=(0,i.Z)(r.ck)`
286  all: unset;
287  background-color: ${e=>{let{theme:t}=e;return t.colors["segmented-control-bg"]}};
288  color: ${e=>{let{theme:t}=e;return t.colors["text-secondary"]}};
289  flex: 1 1 0%;
290  display: flex;
291  align-items: center;
292  justify-content: center;
293  font-size: inherit;
294  line-height: ${e=>{let{theme:t}=e;return t.lineHeights.button}};
295  padding: ${e=>{let{size:t,theme:s}=e;return"sm"===t?`${s.space[1]}px ${s.space[2]}px`:`${s.space[2]}px ${s.space[3]}px`}};
296  white-space: nowrap;
297
298  &:first-of-type {
299    border-top-left-radius: ${e=>{let{theme:t}=e;return t.radii.wrappedWithDefault}}px;
300    border-bottom-left-radius: ${e=>{let{theme:t}=e;return t.radii.wrappedWithDefault}}px;
301  }
302
303  &:last-of-type {
304    border-top-right-radius: ${e=>{let{theme:t}=e;return t.radii.wrappedWithDefault}}px;
305    border-bottom-right-radius: ${e=>{let{theme:t}=e;return t.radii.wrappedWithDefault}}px;
306  }
307
308  &[data-state="on"] {
309    color: ${e=>{let{theme:t}=e;return t.colors.text}};
310    font-weight: ${e=>{let{theme:t}=e;return t.fontWeights.medium}};
311    background-color: ${e=>{let{theme:t}=e;return t.colors["segmented-control-bg-active"]}};
312  }
313`,l=e=>{let{data:t,fullWidth:s,onChange:i,size:l="md",value:c}=e;return(0,o.jsx)(r.fC,{asChild:!0,onValueChange:e=>{e&&i(e)},type:"single",value:c,children:(0,o.jsx)(n.kC,{sx:{backgroundColor:"line",border:"1px solid",borderColor:"border",borderRadius:"default",display:"inline-flex",fontSize:s?1:0,gap:"1px",width:s?"100%":"auto"},children:t.map((e=>{const t="ariaLabel"in e?e.ariaLabel:e.label;return(0,o.jsx)(a,{"aria-label":t,size:l,value:e.value,children:e.label},e.value)}))})})},c=e=>{let{input:t,meta:s,...r}=e;return(0,o.jsx)(l,{...t,...r,data:s.data})}},79318:(e,t,s)=>{"use strict";s.d(t,{a:()=>i});var r=s(2784),n=s(94115);const i=e=>{const{theme:t}=(0,n.Fg)();return(0,r.useMemo)((()=>({"::placeholder":{color:t.colors["text-secondary"]},":disabled":{backgroundColor:t.colors["app-bg"],color:t.colors["text-secondary"]},":focus":{borderColor:t.colors["border-hover"]},":focus-within":{borderColor:t.colors["border-hover"],boxShadow:`0 0 0 1px ${t.colors["border-hover"]}`},backgroundColor:t.colors["app-bg"],borderColor:e?.invalid?t.colors["red-border"]:t.colors.border,borderRadius:t.radii.default,borderWidth:1,color:t.colors.text,fontFamily:t.fonts.body,fontSize:t.fontSizes[1],fontWeight:t.fontWeights.body,lineHeight:t.lineHeights.body,paddingLeft:t.space[2],transition:"none"})),[t,e])}},27447:(e,t,s)=>{"use strict";s.d(t,{J:()=>o});var r=s(85365),n=s(52322);const i=r.Z.i`
314  user-select: none;
315  color: ${e=>e.color&&e.theme.colors[e.color]?e.theme.colors[e.color]:"inherit"};
316`,o=e=>{let{color:t,name:s,size:r,style:o={},type:a}=e,l=o;return r&&(l={display:"inline-block",fontSize:r,height:r,overflow:"hidden",width:r}),(0,n.jsx)(i,{className:`flaticon ${a} ${s}`,color:t,style:l})}},47618:(e,t,s)=>{"use strict";s.d(t,{w:()=>u});var r=s(28165),n=s(59177),i=s(75289),o=s(85365),a=s(21704),l=s(2879),c=s(59056);const d=(0,o.Z)(i.X6)``,u={Body:(0,o.Z)(i.rj)`
317  gap: 3;
318`,Footer:(0,o.Z)(i.xu)`
319  * {
320    color: ${e=>{let{theme:t}=e;return t.colors["text-secondary"]}}!important;
321    font-size: ${e=>{let{theme:t}=e;return t.fontSizes[1]}}!important;
322  }
323`,Root:e=>{let{children:t,width:s=["100%",400,440]}=e;return(0,c.BX)(c.HY,{children:[(0,c.tZ)(a.l,{}),(0,c.tZ)(r.xB,{styles:e=>({body:{backgroundColor:e.colors["app-bg"],paddingBottom:"env(safe-area-inset-bottom)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",paddingTop:"env(safe-area-inset-top)"}})}),(0,c.BX)(i.rj,{as:"main",sx:{gap:3,marginX:"auto",marginY:4,paddingX:[4,0],width:s},children:[(0,c.tZ)(i.xu,{mb:3,children:(0,c.tZ)(n.rU,{sx:{borderRadius:"default",cursor:"var(--config-cursor)",display:"inline-block"},to:"/",children:(0,c.tZ)(l.K,{height:24})})}),t]})]})},Title:d}},15490:(e,t,s)=>{"use strict";s.d(t,{H:()=>j});var r=s(2784),n=s(59177),i=s(75289),o=s(27622),a=s(27447),l=s(69363),c=s(18756),d=s(59807),u=s(85125),p=s(98355);const _=[{icon:{name:"type-1",type:"stroke"},label:(0,p.I)("files_sort_name_label"),value:"NAME"},{icon:{name:"signal-bars-1",type:"solid"},label:(0,p.I)("files_sort_size_label"),value:"SIZE"},{icon:{name:"calendar-1",type:"stroke"},label:(0,p.I)("files_sort_date_added_label"),value:"DATE"},{icon:{name:"calendar-4",type:"stroke"},label:(0,p.I)("files_sort_date_modified_label"),value:"MODIFIED"},{icon:{name:"multiple-documents-1",type:"stroke"},label:(0,p.I)("files_sort_type_label"),value:"TYPE"},{icon:{name:"eye-1",type:"stroke"},label:(0,p.I)("files_sort_watch_status_label"),value:"WATCH"}].reduce(((e,t)=>e.concat([{...t,accessory:{kind:"icon",name:"up-4",type:"stroke"},value:`${t.value}_ASC`},{...t,accessory:{kind:"icon",name:"down-4",type:"stroke"},value:`${t.value}_DESC`}
323])),[]),h=e=>{const[t,s]=e.split("_");return _.filter((e=>{const[r,n]=e.value.split("_");return t===r||s===n})).map((e=>{const[r,n]=e.value.split("_"),i=t===r&&s!==n;return{...e,accessory:i?e.accessory:void 0}}))};var g=s(52322);const m=e=>{let{disabled:t=!1,loading:s=!1,onSelect:r,value:n}=e;return(0,g.jsx)(u.Z,{disabled:t,hideSelectedOptions:!0,loading:s,onSelect:r,options:h(n),value:n})};var f=s(69378),y=s.n(f);const b=JSON.parse('[{"code":"afr","name":"Afrikaans"},{"code":"alb","name":"Albanian"},{"code":"ara","name":"Arabic"},{"code":"arm","name":"Armenian"},{"code":"baq","name":"Basque"},{"code":"bel","name":"Belarusian"},{"code":"ben","name":"Bengali"},{"code":"bos","name":"Bosnian"},{"code":"bre","name":"Breton"},{"code":"bul","name":"Bulgarian"},{"code":"bur","name":"Burmese"},{"code":"cat","name":"Catalan"},{"code":"chi","name":"Chinese (simplified)"},{"code":"zho","name":"Chinese (traditional)"},{"code":"hrv","name":"Croatian"},{"code":"cze","name":"Czech"},{"code":"dan","name":"Danish"},{"code":"dut","name":"Dutch"},{"code":"eng","name":"English"},{"code":"epo","name":"Esperanto"},{"code":"est","name":"Estonian"},{"code":"fin","name":"Finnish"},{"code":"fra","name":"French"},{"code":"glg","name":"Galician"},{"code":"geo","name":"Georgian"},{"code":"ger","name":"German"},{"code":"gre","name":"Greek"},{"code":"heb","name":"Hebrew"},{"code":"hin","name":"Hindi"},{"code":"hun","name":"Hungarian"},{"code":"ice","name":"Icelandic"},{"code":"ind","name":"Indonesian"},{"code":"ita","name":"Italian"},{"code":"jpn","name":"Japanese"},{"code":"kaz","name":"Kazakh"},{"code":"khm","name":"Khmer"},{"code":"kor","name":"Korean"},{"code":"lav","name":"Latvian"},{"code":"lit","name":"Lithuanian"},{"code":"ltz","name":"Luxembourgish"},{"code":"mac","name":"Macedonian"},{"code":"may","name":"Malay"},{"code":"mal","name":"Malayalam"},{"code":"mni","name":"Manipuri"},{"code":"mon","name":"Mongolian"},{"code":"nor","name":"Norwegian"},{"code":"oci","name":"Occitan"},{"code":"per","name":"Persian"},{"code":"pol","name":"Polish"},{"code":"por","name":"Portuguese"},{"code":"pob","name":"Portuguese (BR)"},{"code":"rum","name":"Romanian"},{"code":"rus","name":"Russian"},{"code":"srp","name":"Serbian"},{"code":"sin","name":"Sinhalese"},{"code":"slo","name":"Slovak"},{"code":"slv","name":"Slovenian"},{"code":"spa","name":"Spanish"},{"code":"swa","name":"Swahili"},{"code":"swe","name":"Swedish"},{"code":"syr","name":"Syriac"},{"code":"tgl","name":"Tagalog"},{"code":"tam","name":"Tamil"},{"code":"tel","name":"Telugu"},{"code":"tha","name":"Thai"},{"code":"tur","name":"Turkish"},{"code":"ukr","name":"Ukrainian"},{"code":"urd","name":"Urdu"},{"code":"vie","name":"Vietnamese"}]').map((e=>{let{code:t,name:s}=e;return{label:s,value:t}})),x=r.memo((e=>{let{disabled:t=!1,loading:s=!1,onSelect:r,value:n,vertical:o=!1}=e;const[a,l]=n;return(0,g.jsxs)(i.kC,{sx:{flexDirection:o?"column":["column","row"],gap:2},children:[(0,g.jsx)(u.Z,{clearable:!0,disabled:t,loading:s,onSelect:e=>r([e,l]),options:b,placeholder:"Primary",searchable:!0,value:a||""}),(0,g.jsx)(u.Z,{clearable:!0,disabled:t,loading:s,onSelect:e=>r([a,e]),options:b,placeholder:"Secondary",searchable:!0,value:l||""})]})}),((e,t)=>y()(e.value,t.value)&&y()(e.disabled,t.disabled)&&y()(e.loading,t.loading)));var w=s(15820),S=s(28867);const v=e=>"danger"===e?{bg:"transparent",bgHover:"red-component-bg-hover",border:"list-item-border",description:"text-secondary",icon:"red-solid",title:"red-text-secondary"}:{bg:"transparent",bgHover:"list-item-bg-hover",border:"list-item-border",description:"text-secondary",icon:"text-secondary",title:"text"},I=e=>{let{accessory:t,indicator:s,theme:r}=e;if(!t)return null;const n=v(r);switch(t.type){case"link":case"clickable":return(0,g.jsx)(i.xu,{px:[1,1,2],children:t.label?(0,g.jsxs)(i.kC,{sx:{alignItems:"flex-start",gap:1},children:[(0,g.jsx)(i.xv,{sx:{lineHeight:1},variant:"caption",children:t.label}),(0,g.jsx)(a.J,{color:n.icon,name:"right-2",type:"solid"})]}):(0,g.jsx)(a.J,{color:n.icon,name:"right-2",type:"solid"})});case"link-with-custom-content":return(0,g.jsx)(i.xu,{px:[1,1,2],children:t.children});case"external-link":return(0,g.jsx)(i.xu,{px:[1,1,2],children:(0,g.jsx)(a.J,{color:n.icon,name:"share-1",type:"stroke"})});case"switch":return(0,g.jsx)(w.r,{...t,disabled:"busy"===s?.type});case"toggle-group":return(0,g.jsx)(S.t,{...t});case"dropdown":return(0,g.jsx)(u.Z,{...t,loading:"busy"===s?.type});case"file-sort-option-dropdown":return(0,g.jsx)(m,{...t,loading:"busy"===s?.type});case"subtitle-languages-dropdown":return(0,g.jsx)(x,{...t,loading:"busy"===s?.type});case"button":return(0,g.jsx)(c.z,{...t,type:"button"});
323case"button-group":return(0,g.jsx)(l.h,{spacing:[1,2],children:t.items.map(((e,t)=>(0,g.jsx)(c.z,{...e},t)))});case"icon-button":return(0,g.jsx)(d.h,{...t,type:"button"});case"icon-button-group":return(0,g.jsx)(l.h,{spacing:[1,2],children:t.items.map((e=>(0,g.jsx)(d.h,{...e},e.icon.name+e.icon.type)))});case"text":return(0,g.jsx)(i.xv,{variant:"text.caption",children:t.text});default:return(0,g.jsx)(g.Fragment,{children:t})}};var k=s(10017),T=s(31810),A=s(63259);const E=e=>{let{indicator:t}=e;if(!t)return null;switch(t.type){case"busy":return(0,g.jsx)(i.$j,{color:"text",size:12});case"error":return(0,g.jsx)(A.u,{label:t.message,children:(0,g.jsx)(i.xv,{sx:{fontSize:0},children:(0,g.jsx)(a.J,{color:"red-solid",name:"minus-2",type:"solid"})})});case"info":return(0,g.jsx)(A.u,{label:t.message,children:(0,g.jsx)(i.xv,{sx:{fontSize:0},children:(0,g.jsx)(a.J,{color:"solid",name:"info-2",type:"solid"})})});case"success":return(0,g.jsx)(i.xv,{sx:{fontSize:0},children:(0,g.jsx)(a.J,{color:"green-solid",name:"checkmark-2",type:"solid"})});case"warning":return(0,g.jsx)(A.u,{label:t.message,children:(0,g.jsx)(i.xv,{sx:{fontSize:0},children:(0,g.jsx)(a.J,{color:"yellow-solid",name:"exclamation-point-2",type:"solid"})})});case"badge":{const e=(0,g.jsx)(T.C,{size:"sm",value:t.value,variant:"primary"});return t.message?(0,g.jsx)(A.u,{label:t.message,children:e}):e}case"icon-button":return(0,g.jsx)(d.h,{...t,size:"xs",type:"button"});default:(0,k.Z)(t)}};var M=s(59056);const j=e=>{const{clickableContainerStyle:t,colors:s,containerStyle:l}=(0,r.useMemo)((()=>{const t=v(e.theme),s={alignItems:"center",backgroundColor:t.bg,borderBottomColor:t.border,borderBottomStyle:"solid",borderBottomWidth:1,justifyContent:"space-between",paddingLeft:[e.icon?1:0,e.icon?1:0,e.icon?2:0],paddingY:3,width:"100%"};return{clickableContainerStyle:{"@media (hover: hover)":{":hover":{backgroundColor:t.bgHover}}},colors:t,containerStyle:s}}),[e.theme,e.icon]),c=(0,r.useMemo)((()=>{return e.icon?"object"==typeof(t=e.icon)&&null!==t&&"name"in t&&"string"==typeof t?.name?(0,M.tZ)(i.xu,{sx:{color:s.icon,fontSize:2,lineHeight:e.description?"body":1},children:(0,M.tZ)(a.J,{...e.icon})}):e.icon:null;var t}),[e.icon,e.description,s.icon]),d=(0,r.useMemo)((()=>{let t="";return t=e.alignItems?e.alignItems:e.description?"flex-start":"center",(0,M.BX)(i.kC,{sx:{alignItems:t,width:"100%"},children:[c,(0,M.BX)(i.kC,{sx:{alignItems:"center",columnGap:2,flex:1,flexWrap:"wrap",justifyContent:"space-between",ml:c?["12px","12px",3]:0,rowGap:1},children:[(0,M.BX)(i.kC,{sx:{flex:1,flexDirection:"column"},children:[(0,M.BX)(i.kC,{sx:{alignItems:"badge"===e.indicator?.type?"center":"baseline",gap:"badge"===e.indicator?.type?2:1},children:[(0,M.tZ)(i.xu,{sx:{color:s.title},variant:"text.body",children:e.title}),(0,M.tZ)(E,{...e})]}),e.description?(0,M.tZ)(i.xv,{sx:{color:s.description,display:"inline-block"},variant:"text.caption",children:e.description}):null]}),(0,M.tZ)(I,{...e})]})]})}),[e,s,c]);if(!e.accessory)return(0,M.tZ)(i.kC,{sx:l,children:d});switch(e.accessory.type){case"clickable":return(0,M.tZ)(i.kC,{as:o.k,onClick:e.accessory.onClick,sx:{...l,...t},children:d});case"external-link":return(0,M.tZ)(i.rU,{href:e.accessory.to,sx:{...l,...t,display:"flex"},target:"_blank",children:d});case"link":case"link-with-custom-content":return(0,M.tZ)(n.rU,{sx:{borderRadius:"default",display:"block"},to:e.accessory.to,children:(0,M.tZ)(i.kC,{sx:{...l,...t},children:d})});default:return(0,M.tZ)(i.kC,{sx:l,children:d})}}},94085:(e,t,s)=>{"use strict";s.d(t,{c:()=>l,g:()=>a});var r=s(75289),n=s(33611),i=s(15490),o=s(52322);const a=()=>(0,o.jsx)(n.O,{children:(0,o.jsx)(i.H,{description:"description",icon:{name:"add-user-1",type:"solid"},title:"title"})}),l=e=>{let{count:t=3}=e;return(0,o.jsx)(o.Fragment,{children:Array(t).fill(0).map(((e,t)=>(0,o.jsx)(r.xu,{mb:2,children:(0,o.jsx)(a,{})},t)))})}},18361:(e,t,s)=>{"use strict";s.d(t,{f:()=>a});var r=s(52248),n=s(75289),i=s(94115),o=s(52322);const a=e=>{let{color:t,dialog:s,...a}=e;const{theme:l}=(0,i.Fg)();return(0,o.jsx)(r.f,{loader:(0,o.jsx)(n.$j,{color:l.colors.text,size:28}),overlayColor:l.colors[t||"overlay-inline"],zIndex:s?l.zIndices.overlayWithinDialog:l.zIndices.overlay,...a})}},2879:(e,t,s)=>{"use strict";s.d(t,{K:()=>a});var r=s(4683);const n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzc2IiBoZWlnaHQ9Ijk2IiB2aWV3Qm94PSIwIDAgMzc2IDk2IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgMzAuMDAwMkgyTDIgMjIuMDAwMUg0VjE4LjAwMDFINlYxNi4wMDAxSDhWMTQuMDAwMUgxMFYxMC4wMDAxSDE0VjguMDAwMDhIMTZWNi4wMDAwN0gyMFY0LjAwMDA3SDI0VjIuMDAwMDZMNDYgMi4wMDAwNlY0LjAwMDA3TDUwIDQuMDAwMDdWNi4wMDAwN0w1NCA2LjAwMDA3VjguMDAwMDhINThWMTAuMDAwMUg2MFYxMi4wMDAxSDYyVjE0LjAwMDFINjRWMTguMDAwMUg2NlYyMi4wMDAxSDY4VjI2LjAwMDFINzBWNDYuMDAwMkg2OFY1Mi4wMDAySDY2VjU2LjAwMDJINjRWNTguMDAwMkg2MlY2MC4wMDAySDYwTDYwIDYyLjAwMDNMNTggNjIuMDAwM1Y2NC4wMDAzSDU2VjY2LjAwMDNINTJW
323NjguMDAwM0g0OFY3MC4wMDAzSDQwVjcyLjAwMDNIMjBWNzQuMDAwM0gxOFY4NC4wMDAzSDE2Vjg2LjAwMDNIMTRWODguMDAwM0g0Vjg2LjAwMDNIMlY4NC4wMDAzSDBMMCAzMC4wMDAyWk0yMS45OTgxIDMwLjAwMDJWMjYuMDAwMkgyMy45OTgxVjI0LjAwMDJIMjcuOTk4MVYyMi4wMDAyTDMxLjk5ODEgMjIuMDAwMlYyMC4wMDAySDM3Ljk5ODFWMjIuMDAwMkg0My45OTgxVjI0LjAwMDJINDUuOTk4MVYyNi4wMDAySDQ3Ljk5ODFWMzAuMDAwMkg0OS45OTgxVjQyLjAwMDJINDcuOTk4MVY0NC4wMDAySDQ1Ljk5ODFWNDYuMDAwMkg0My45OTgxVjQ4LjAwMDJINDEuOTk4MVY1MC4wMDAySDI3Ljk5ODFWNDguMDAwMkgyNS45OTgxVjQ2LjAwMDJIMjMuOTk4MVY0NC4wMDAySDIxLjk5ODFWNDAuMDAwMkgxOS45OTgxTDE5Ljk5ODEgMzAuMDAwMkgyMS45OTgxWiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTEwMiAyLjAwMDA2TDg4LjAwMDEgMi4wMDAwNlY0LjAwMDA2SDg2LjAwMDFWNi4wMDAwNkg4NC4wMDAxVjQ0LjAwMDFIODYuMDAwMVY1MC4wMDAxSDg4LjAwMDFWNTYuMDAwMUg5MC4wMDAxVjU4LjAwMDFIOTIuMDAwMVY2MC4wMDAxSDk0LjAwMDFWNjIuMDAwMUg5Ni4wMDAxVjY0LjAwMDFIOTguMDAwMVY2Ni4wMDAxSDEwMFY2OC4wMDAxSDEwNFY3MC4wMDAxSDExMFY3Mi4wMDAxSDEyNFY3MC4wMDAxSDEzMlY2OC4wMDAxSDEzNlY2Ni4wMDAxSDEzOFY2NC4wMDAxSDE0MFY2Mi4wMDAxSDE0MlY2MC4wMDAxTDE0NCA2MC4wMDAxVjU4LjAwMDFIMTQ2VjU0LjAwMDFIMTQ4VjUwLjAwMDFIMTUwVjQ0LjAwMDFIMTUyVjYuMDAwMDZMMTUwIDYuMDAwMDZWNC4wMDAwNkgxNDhWMi4wMDAwNkwxMzQgMi4wMDAwNlY2LjAwMDA2SDEzMlY0Mi4wMDAxSDEzMFY0Ni4wMDAxSDEyOFY0OC4wMDAxSDEyNlY1MC4wMDAxSDEyMlY1Mi4wMDAxSDExNFY1MC4wMDAxSDExMFY0OC4wMDAxSDEwOFY0Ni4wMDAxSDEwNlY0MC4wMDAxSDEwNFY0LjAwMDA2TDEwMiA0LjAwMDA2VjIuMDAwMDZaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMjI2IDIuMDAwMDZMMTY2IDIuMDAwMDZWNC4wMDAwNkgxNjRWNi4wMDAwNkgxNjJWMTYuMDAwMUgxNjRWMTguMDAwMUgxNjZWMjAuMDAwMUgxODJWMjIuMDAwMUgxODZWNjYuMDAwMUgxODhWNzAuMDAwMUgxOTJWNzIuMDAwMUgyMDBWNzAuMDAwMUgyMDRWNjYuMDAwMUgyMDZWMjIuMDAwMUgyMTBWMjAuMDAwMUgyMjZWMTguMDAwMUgyMjhWMTYuMDAwMUgyMzBWNi4wMDAwNkwyMjggNi4wMDAwNlY0LjAwMDA2SDIyNlYyLjAwMDA2WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTIyNS45OTkgNTRIMjIzLjk5OVY2NS45OTk5SDIyNS45OTlWNjcuOTk5OUgyMjcuOTk5VjY5Ljk5OTlIMjMxLjk5OVY3MS45OTk5SDIzNy45OTlWNjkuOTk5OUgyNDEuOTk5VjY3Ljk5OTlIMjQzLjk5OVY2NS45OTk5SDI0NS45OTlWNTRIMjQzLjk5OVY1MkgyNDEuOTk5VjUwSDIyNy45OTlWNTJIMjI1Ljk5OVY1NFoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0yNjQuMDAxIDUuOTk5OTlIMjYyLjAwMVYxNkgyNjQuMDAxVjIwSDI2Ni4wMDFWMjJIMjgwLjAwMVYyMEgyODIuMDAxVjE4SDI4NC4wMDFWNS45OTk5OUgyODIuMDAxVjMuOTk5OTlMMjgwLjAwMSAzLjk5OTk5VjJMMjc2LjAwMSAyVjBMMjcwLjAwMSAwVjJMMjY2LjAwMSAyVjMuOTk5OTlMMjY0LjAwMSAzLjk5OTk5VjUuOTk5OTlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTMwMC4wMDEgMjAuMDAwMUgzMDIuMDAxVjE4LjAwMDFIMzA0LjAwMVYxNC4wMDAxSDMwNi4wMDFWMTIuMDAwMUgzMDguMDAxVjEwLjAwMDFIMzEwLjAwMVY4LjAwMDA2SDMxNC4wMDFWNi4wMDAwNkgzMTYuMDAxVjQuMDAwMDZMMzIyLjAwMSA0LjAwMDA2VjIuMDAwMDZMMzQ0LjAwMSAyLjAwMDA2VjQuMDAwMDZMMzQ4LjAwMSA0LjAwMDA2VjYuMDAwMDZMMzUyLjAwMSA2LjAwMDA2VjguMDAwMDZIMzU0LjAwMVYxMC4wMDAxSDM1Ni4wMDFWMTIuMDAwMUgzNTguMDAxVjE0LjAwMDFIMzYwLjAwMVYxNi4wMDAxSDM2Mi4wMDFWMTguMDAwMUgzNjQuMDAxVjI0LjAwMDFIMzY2LjAwMVYzMC4wMDAxSDM2OC4wMDFWNDIuMDAwMUgzNjYuMDAxVjUwLjAwMDFIMzY0LjAwMVY1NC4wMDAxSDM2Mi4wMDFWNTYuMDAwMUgzNjAuMDAxVjYwLjAwMDFIMzU4LjAwMVY2Mi4wMDAxTDM1Ni4wMDEgNjIuMDAwMVY2NC4wMDAxSDM1Mi4wMDFWNjYuMDAwMUgzNTAuMDAxVjY4LjAwMDFIMzQ0LjAwMVY3MC4wMDAxSDMzOC4wMDFWNzIuMDAwMUgzMjguMDAxVjcwLjAwMDFIMzIwLjAwMVY2OC4wMDAxSDMxNC4wMDFWNjYuMDAwMUgzMTIuMDAxVjY0LjAwMDFIMzEwLjAwMVY2Mi4wMDAxSDMwOC4wMDFWNjAuMDAwMUgzMDYuMDAxVjU4LjAwMDFIMzA0LjAwMVY1Ni4wMDAxSDMwMi4wMDFWNTIuMDAwMUgzMDAuMDAxVjQ2LjAwMDFIMjk4LjAwMVYyNi4wMDAxSDMwMC4wMDFWMjAuMDAwMVpNMzIwIDI1Ljk5OThIMzIyVjIzLjk5OTlIMzI2VjIxLjk5OTlMMzQwIDIxLjk5OTlWMjMuOTk5OUgzNDJWMjUuOTk5OEgzNDRWMjcuOTk5OEgzNDZWMjkuOTk5OEgzNDhWNDEuOTk5OEgzNDZWNDMuOTk5OEgzNDRWNDUuOTk5OEgzNDJWNDcuOTk5OEgzNDBWNDkuOTk5OEgzMjZWNDcuOTk5OEgzMjJWNDUuOTk5OEgzMjBWNDEuOTk5OEgzMThWMjkuOTk5OEgzMjBWMjUuOTk5OFoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0yNjYgMzUuOTk5OUgyNjRWNjcuOTk5OUgyNjZWNjkuOTk5OUgyNjhWNzEuOTk5OUgyNzhWNjkuOTk5OUgyODBWNjcuOTk5OUgyODJWMzUuOTk5OUgyODBWMzMuOTk5OUgyNjZWMzUuOTk5OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zMjQuMDAxIDMyLjAwMDNIMzIyLjAwMVY0MC4wMDAzSDMyNC4wMDFWNDQuMDAwM0gzMjYuMDAxVjM4LjAwMDNIMzI4LjAwMVYzNC4wMDAzSDMzMC4wMDFWMzIuMDAwM0gzMzQuMDAxVjMwLjAwMDNIMzQwLjAwMVYyOC4wMDAzSDMzOC4wMDFWMjYuMDAwM0gzMjguMDAxVjI4LjAwMDNIMzI0LjAwMVYzMi4wMDAzWiIgZmlsbD0iI0ZEQ0U0NSIvPgo8cGF0aCBkPSJNMzI4LjAwMSA3OC4wMDA0Vjc2LjAwMDRIMzQwLjAwMVY3NC4wMDA0SDM0Ni4wMDFWNzIuMDAwNEgzNTIuMDAxVjcwLjAwMDRIMzU0LjAwMVY2OC4wMDAzSDM1OC4wMDFWNjYuMDAwM0gzNjAuMDAxVjY0LjAwMDNIMzYyLjAwMVY2Mi4wMDAzSDM2NC4wMDFWNTguMDAwM0gzNjYuMDAxVjU2LjAwMDNIMzY4LjAwMVY1Mi4wMDAzSDM3MC4wMDFWNDQuMDAwM0gzNzIuMDAxVjMyLjAwMDNIMzc0LjAwMVYzOC4wMDAzSDM3Ni4wMDFWNTAuMDAwM0gzNzQuMDAxVjU4LjAwMDNIMzcyLjAwMVY2Mi4wMDAzSDM3MC4wMDFWNjQuMDAwM0gzNjguMDAxVjY4LjAwMDNIMzY2LjAwMVY3MC4wMDA0SDM2NC4wMDFWNzIuMDAwNEgzNjAuMDAxVjc0LjAwMDRIMzU4LjAwMVY3Ni4wMDA0SDM1Mi4wMDFWNzguMDAwNEgzNDYuMDAxVjgwLjAwMDRIMzM2LjAwMVY3OC4wMDA0SDMyOC4w
323MDFaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0zNzIuMDAxIDI2LjAwMDNIMzcwLjAwMVYyOC4wMDAzSDM3Mi4wMDFWMjYuMDAwM1oiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTMwLjAwMDIgMjhIMjYuMDAwMlYzMkgyNC4wMDAyVjM4SDI2LjAwMDJWNDJIMjguMDAwMlYzOEgzMC4wMDAyVjM0SDMyLjAwMDJWMzJIMzYuMDAwMlYzMEg0MC4wMDAyVjI4SDQyLjAwMDJWMjZIMzYuMDAwMlYyNEgzNC4wMDAyVjI2SDMwLjAwMDJWMjhaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik03Ni4wMDE5IDMwSDc0LjAwMTlWNDhINzIuMDAxOVY1NEg3MC4wMDE5VjU4SDY4LjAwMTlWNjBMNjYuMDAxOSA2MFY2Mkg2NC4wMDE5VjY0SDYyLjAwMTlWNjZINjAuMDAxOVY2OEg1OC4wMDE5TDU4LjAwMTkgNzBINTQuMDAxOVY3Mkg1MC4wMDE5Vjc0SDQyLjAwMTlWNzZIMjIuMDAyTDIyLjAwMiA4NkgyMC4wMDJWODhIMTguMDAyVjkwSDE2LjAwMlY5MkgxMC4wMDJWOTRIMTIuMDAyVjk2SDIyLjAwMlY5NEgyNC4wMDE5VjkySDI2LjAwMTlWODJIMjguMDAxOVY4MEg0OC4wMDE5Vjc4SDU2LjAwMTlWNzZINjAuMDAxOVY3NEg2NC4wMDE5VjcySDY2LjAwMTlWNzBINjguMDAxOVY2OEg3MC4wMDE5VjY2SDcyLjAwMTlWNjRINzQuMDAxOVY2MEg3Ni4wMDE5VjU0SDc4LjAwMTlWMzRINzYuMDAxOVYzMFoiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTExMCA5Ljk5OTk0SDEwOFYzNy45OTk5SDExMFY0My45OTk5SDExMlYxMS45OTk5SDExMFY5Ljk5OTk0WiIgZmlsbD0iI0ZEQ0U0NSIvPgo8cGF0aCBkPSJNMTU4LjAwMiAxMi4wMDAxSDE1Ni4wMDJWNDYuMDAwMUgxNTQuMDAyVjUyLjAwMDFIMTUyLjAwMlY1NkwxNTAuMDAyIDU2VjYwSDE0OC4wMDJWNjJIMTQ2LjAwMlY2NEgxNDQuMDAyVjY2SDE0Mi4wMDJWNjhIMTQwLjAwMlY3MEgxMzguMDAyVjcySDEzNC4wMDJWNzRIMTI2LjAwMlY3NkgxMTIuMDAyVjc4SDExOC4wMDJWODBIMTMyLjAwMlY3OEgxNDAuMDAyVjc2SDE0NC4wMDJWNzRIMTQ2LjAwMlY3MkgxNDguMDAyVjcwSDE1MC4wMDJWNjhIMTUyLjAwMlY2NkgxNTQuMDAyVjYySDE1Ni4wMDJWNThIMTU4LjAwMlY1Mi4wMDAxSDE2MC4wMDJWMTguMDAwMUgxNTguMDAyVjEyLjAwMDFaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0xODAuMDAxIDI0SDE3Mi4wMDFWMjZIMTc0LjAwMVYyOEgxODIuMDAxVjI2SDE4MC4wMDFWMjRaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0yMDIuMDAxIDc2SDE5Ni4wMDFWNzhIMjAwLjAwMVY4MEgyMDguMDAxVjc4SDIxMi4wMDFWNzRIMjE0LjAwMVYzMEwyMTguMDAxIDMwVjI4TDIzNC4wMDEgMjhWMjZIMjM2LjAwMVYyNEgyMzguMDAxVjE0SDIzNi4wMDFWMTJIMjM0LjAwMVYxOEgyMzIuMDAxVjIwSDIzMC4wMDFWMjJIMjI4LjAwMVYyNEwyMTIuMDAxIDI0VjI2SDIxMC4wMDFWNjhIMjA4LjAwMVY3MkgyMDYuMDAxVjc0SDIwMi4wMDFWNzZaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0yNTEuOTk5IDYwSDI0OS45OTlWNjhIMjQ3Ljk5OVY3MEgyNDUuOTk5VjcySDI0My45OTlWNzRIMjM5Ljk5OVY3NkgyMzUuOTk5Vjc4SDIzOS45OTlWODBIMjQ1Ljk5OVY3OEgyNDkuOTk5Vjc2SDI1MS45OTlWNzRIMjUzLjk5OVY2MkgyNTEuOTk5VjYwWiIgZmlsbD0iI0ZEQ0U0NSIvPgo8cGF0aCBkPSJNMjkwIDEyLjAwMDFIMjg4VjIwLjAwMDFIMjg2VjIyLjAwMDFIMjg0VjI0LjAwMDFIMjgyVjI2LjAwMDFIMjcyVjI4LjAwMDFIMjc0VjMwLjAwMDFIMjg4VjI4LjAwMDFIMjkwVjI2LjAwMDFIMjkyVjE0LjAwMDFIMjkwVjEyLjAwMDFaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0yODguMDAxIDQyLjAwMDFIMjg2LjAwMVY3MEgyODQuMDAxVjcySDI4Mi4wMDFWNzRIMjgwLjAwMVY3NkgyNzQuMDAxVjc4SDI3Ni4wMDFWODBIMjg2LjAwMVY3OEgyODguMDAxVjc2SDI5MC4wMDFWNDQuMDAwMUgyODguMDAxVjQyLjAwMDFaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0zMjIuMDAxIDc1Ljk5OTlWNzMuOTk5OUgzMjYuMDAxVjc1Ljk5OTlIMzIyLjAwMVoiIGZpbGw9IiNGRENFNDUiLz4KPC9zdmc+Cg==",i="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzc2IiBoZWlnaHQ9Ijk2IiB2aWV3Qm94PSIwIDAgMzc2IDk2IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgMzAuMDAwMkgyTDIgMjIuMDAwMUg0VjE4LjAwMDFINlYxNi4wMDAxSDhWMTQuMDAwMUgxMFYxMC4wMDAxSDE0VjguMDAwMDhIMTZWNi4wMDAwN0gyMFY0LjAwMDA3SDI0VjIuMDAwMDZMNDYgMi4wMDAwNlY0LjAwMDA3TDUwIDQuMDAwMDdWNi4wMDAwN0w1NCA2LjAwMDA3VjguMDAwMDhINThWMTAuMDAwMUg2MFYxMi4wMDAxSDYyVjE0LjAwMDFINjRWMTguMDAwMUg2NlYyMi4wMDAxSDY4VjI2LjAwMDFINzBWNDYuMDAwMkg2OFY1Mi4wMDAySDY2VjU2LjAwMDJINjRWNTguMDAwMkg2MlY2MC4wMDAySDYwTDYwIDYyLjAwMDNMNTggNjIuMDAwM1Y2NC4wMDAzSDU2VjY2LjAwMDNINTJWNjguMDAwM0g0OFY3MC4wMDAzSDQwVjcyLjAwMDNIMjBWNzQuMDAwM0gxOFY4NC4wMDAzSDE2Vjg2LjAwMDNIMTRWODguMDAwM0g0Vjg2LjAwMDNIMlY4NC4wMDAzSDBMMCAzMC4wMDAyWk0yMS45OTgxIDMwLjAwMDJWMjYuMDAwMkgyMy45OTgxVjI0LjAwMDJIMjcuOTk4MVYyMi4wMDAyTDMxLjk5ODEgMjIuMDAwMlYyMC4wMDAySDM3Ljk5ODFWMjIuMDAwMkg0My45OTgxVjI0LjAwMDJINDUuOTk4MVYyNi4wMDAySDQ3Ljk5ODFWMzAuMDAwMkg0OS45OTgxVjQyLjAwMDJINDcuOTk4MVY0NC4wMDAySDQ1Ljk5ODFWNDYuMDAwMkg0My45OTgxVjQ4LjAwMDJINDEuOTk4MVY1MC4wMDAySDI3Ljk5ODFWNDguMDAwMkgyNS45OTgxVjQ2LjAwMDJIMjMuOTk4MVY0NC4wMDAySDIxLjk5ODFWNDAuMDAwMkgxOS45OTgxTDE5Ljk5ODEgMzAuMDAwMkgyMS45OTgxWiIgZmlsbD0iIzMyMzIzMiIvPgo8cGF0aCBkPSJNMTAyIDIuMDAwMDZMODguMDAwMSAyLjAwMDA2VjQuMDAwMDZIODYuMDAwMVY2LjAwMDA2SDg0LjAwMDFWNDQuMDAwMUg4Ni4wMDAxVjUwLjAwMDFIODguMDAwMVY1Ni4wMDAxSDkwLjAwMDFWNTguMDAwMUg5Mi4wMDAxVjYwLjAwMDFIOTQuMDAwMVY2Mi4wMDAxSDk2LjAwMDFWNjQuMDAwMUg5OC4wMDAxVjY2LjAwMDFIMTAwVjY4LjAwMDFIMTA0VjcwLjAwMDFIMTEwVjcyLjAwMDFIMTI0VjcwLjAwMDFIMTMyVjY4LjAwMDFIMTM2VjY2LjAwMDFIMTM4VjY0LjAwMDFIMTQwVjYyLjAwMDFIMTQyVjYwLjAwMDFMMTQ0IDYwLjAwMDFWNTguMDAwMUgxNDZWNTQuMDAwMUgxNDhWNTAuMDAwMUgxNTBWNDQuMDAwMUgxNTJWNi4wMDAwNkwxNTAgNi4wMDAwNlY0LjAwMDA2SDE0OFYyLjAwMDA2TDEzNCAyLjAwMDA2VjYuMDAwMDZIMTMyVjQyLjAwMDFIMTMwVjQ2LjAwMDFIMTI4VjQ4LjAwMDFIMTI2VjUwLjAwMDFIMTIyVjUyLjAwMDFIMTE0VjUwLjAwMDFIMTEwVjQ4LjAwMDFIMTA4VjQ2LjAwMDFIMTA2VjQwLjAwMDFIMTA0VjQuMDAwMDZMMTAyIDQuMDAwMDZWMi4wMDAwNloiIGZpbGw9IiMzMjMyMzIiLz4KPHBhdGggZD0iTTIyNiAyLjAwMDA2TDE2NiAyLjAwMDA2VjQuMDAwMDZIMTY0VjYuMDAwMDZIMTYyVjE2LjAwMDFIMTY0VjE4LjAwMDFIMTY2VjIwLjAwMDFIMTgyVjIyLjAwMDFIMTg2VjY2LjAwMDFIMTg4VjcwLjAwMDFIMTkyVjcyLjAwMDFIMjAwVjcwLjAwMDFIMjA0VjY2LjAwMDFIMjA2VjIyLjAwMDFIMjEwVjIwLjAwMDFIMjI2VjE4LjAwMDFIMjI4VjE2LjAwMDFIMjMwVjYuMDAwMDZMMjI4IDYuMDAwMDZWNC4wMDAwNkgyMjZWMi4wMDAwNloiIGZpbGw9IiMzMjMyMzIiLz4KPHBhdGggZD0iTTIyNS45OTkgNTRIMjIzLjk5OVY2NS45OTk5SDIyNS45OTlWNjcuOTk5OUgyMjcuOTk5VjY5Ljk5OTlIMjMxLjk5OVY3MS45OTk5SDIzNy45OTlWNjkuOTk5OUgyNDEuOTk5VjY3Ljk5OTlIMjQzLjk5OVY2NS45OTk5SDI0NS45OTlWNTRIMjQzLjk
3235OVY1MkgyNDEuOTk5VjUwSDIyNy45OTlWNTJIMjI1Ljk5OVY1NFoiIGZpbGw9IiMzMjMyMzIiLz4KPHBhdGggZD0iTTI2NC4wMDEgNS45OTk5OUgyNjIuMDAxVjE2SDI2NC4wMDFWMjBIMjY2LjAwMVYyMkgyODAuMDAxVjIwSDI4Mi4wMDFWMThIMjg0LjAwMVY1Ljk5OTk5SDI4Mi4wMDFWMy45OTk5OUwyODAuMDAxIDMuOTk5OTlWMkwyNzYuMDAxIDJWMEwyNzAuMDAxIDBWMkwyNjYuMDAxIDJWMy45OTk5OUwyNjQuMDAxIDMuOTk5OTlWNS45OTk5OVoiIGZpbGw9IiMzMjMyMzIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMDAuMDAxIDIwLjAwMDFIMzAyLjAwMVYxOC4wMDAxSDMwNC4wMDFWMTQuMDAwMUgzMDYuMDAxVjEyLjAwMDFIMzA4LjAwMVYxMC4wMDAxSDMxMC4wMDFWOC4wMDAwNkgzMTQuMDAxVjYuMDAwMDZIMzE2LjAwMVY0LjAwMDA2TDMyMi4wMDEgNC4wMDAwNlYyLjAwMDA2TDM0NC4wMDEgMi4wMDAwNlY0LjAwMDA2TDM0OC4wMDEgNC4wMDAwNlY2LjAwMDA2TDM1Mi4wMDEgNi4wMDAwNlY4LjAwMDA2SDM1NC4wMDFWMTAuMDAwMUgzNTYuMDAxVjEyLjAwMDFIMzU4LjAwMVYxNC4wMDAxSDM2MC4wMDFWMTYuMDAwMUgzNjIuMDAxVjE4LjAwMDFIMzY0LjAwMVYyNC4wMDAxSDM2Ni4wMDFWMzAuMDAwMUgzNjguMDAxVjQyLjAwMDFIMzY2LjAwMVY1MC4wMDAxSDM2NC4wMDFWNTQuMDAwMUgzNjIuMDAxVjU2LjAwMDFIMzYwLjAwMVY2MC4wMDAxSDM1OC4wMDFWNjIuMDAwMUwzNTYuMDAxIDYyLjAwMDFWNjQuMDAwMUgzNTIuMDAxVjY2LjAwMDFIMzUwLjAwMVY2OC4wMDAxSDM0NC4wMDFWNzAuMDAwMUgzMzguMDAxVjcyLjAwMDFIMzI4LjAwMVY3MC4wMDAxSDMyMC4wMDFWNjguMDAwMUgzMTQuMDAxVjY2LjAwMDFIMzEyLjAwMVY2NC4wMDAxSDMxMC4wMDFWNjIuMDAwMUgzMDguMDAxVjYwLjAwMDFIMzA2LjAwMVY1OC4wMDAxSDMwNC4wMDFWNTYuMDAwMUgzMDIuMDAxVjUyLjAwMDFIMzAwLjAwMVY0Ni4wMDAxSDI5OC4wMDFWMjYuMDAwMUgzMDAuMDAxVjIwLjAwMDFaTTMyMCAyNS45OTk4SDMyMlYyMy45OTk5SDMyNlYyMS45OTk5TDM0MCAyMS45OTk5VjIzLjk5OTlIMzQyVjI1Ljk5OThIMzQ0VjI3Ljk5OThIMzQ2VjI5Ljk5OThIMzQ4VjQxLjk5OThIMzQ2VjQzLjk5OThIMzQ0VjQ1Ljk5OThIMzQyVjQ3Ljk5OThIMzQwVjQ5Ljk5OThIMzI2VjQ3Ljk5OThIMzIyVjQ1Ljk5OThIMzIwVjQxLjk5OThIMzE4VjI5Ljk5OThIMzIwVjI1Ljk5OThaIiBmaWxsPSIjMzIzMjMyIi8+CjxwYXRoIGQ9Ik0yNjYgMzUuOTk5OUgyNjRWNjcuOTk5OUgyNjZWNjkuOTk5OUgyNjhWNzEuOTk5OUgyNzhWNjkuOTk5OUgyODBWNjcuOTk5OUgyODJWMzUuOTk5OUgyODBWMzMuOTk5OUgyNjZWMzUuOTk5OVoiIGZpbGw9IiMzMjMyMzIiLz4KPHBhdGggZD0iTTMyNC4wMDEgMzIuMDAwM0gzMjIuMDAxVjQwLjAwMDNIMzI0LjAwMVY0NC4wMDAzSDMyNi4wMDFWMzguMDAwM0gzMjguMDAxVjM0LjAwMDNIMzMwLjAwMVYzMi4wMDAzSDMzNC4wMDFWMzAuMDAwM0gzNDAuMDAxVjI4LjAwMDNIMzM4LjAwMVYyNi4wMDAzSDMyOC4wMDFWMjguMDAwM0gzMjQuMDAxVjMyLjAwMDNaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0zMjguMDAxIDc4LjAwMDRWNzYuMDAwNEgzNDAuMDAxVjc0LjAwMDRIMzQ2LjAwMVY3Mi4wMDA0SDM1Mi4wMDFWNzAuMDAwNEgzNTQuMDAxVjY4LjAwMDNIMzU4LjAwMVY2Ni4wMDAzSDM2MC4wMDFWNjQuMDAwM0gzNjIuMDAxVjYyLjAwMDNIMzY0LjAwMVY1OC4wMDAzSDM2Ni4wMDFWNTYuMDAwM0gzNjguMDAxVjUyLjAwMDNIMzcwLjAwMVY0NC4wMDAzSDM3Mi4wMDFWMzIuMDAwM0gzNzQuMDAxVjM4LjAwMDNIMzc2LjAwMVY1MC4wMDAzSDM3NC4wMDFWNTguMDAwM0gzNzIuMDAxVjYyLjAwMDNIMzcwLjAwMVY2NC4wMDAzSDM2OC4wMDFWNjguMDAwM0gzNjYuMDAxVjcwLjAwMDRIMzY0LjAwMVY3Mi4wMDA0SDM2MC4wMDFWNzQuMDAwNEgzNTguMDAxVjc2LjAwMDRIMzUyLjAwMVY3OC4wMDA0SDM0Ni4wMDFWODAuMDAwNEgzMzYuMDAxVjc4LjAwMDRIMzI4LjAwMVoiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTM3Mi4wMDEgMjYuMDAwM0gzNzAuMDAxVjI4LjAwMDNIMzcyLjAwMVYyNi4wMDAzWiIgZmlsbD0iI0ZEQ0U0NSIvPgo8cGF0aCBkPSJNMzAuMDAwMiAyOEgyNi4wMDAyVjMySDI0LjAwMDJWMzhIMjYuMDAwMlY0MkgyOC4wMDAyVjM4SDMwLjAwMDJWMzRIMzIuMDAwMlYzMkgzNi4wMDAyVjMwSDQwLjAwMDJWMjhINDIuMDAwMlYyNkgzNi4wMDAyVjI0SDM0LjAwMDJWMjZIMzAuMDAwMlYyOFoiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTc2LjAwMTkgMzBINzQuMDAxOVY0OEg3Mi4wMDE5VjU0SDcwLjAwMTlWNThINjguMDAxOVY2MEw2Ni4wMDE5IDYwVjYySDY0LjAwMTlWNjRINjIuMDAxOVY2Nkg2MC4wMDE5VjY4SDU4LjAwMTlMNTguMDAxOSA3MEg1NC4wMDE5VjcySDUwLjAwMTlWNzRINDIuMDAxOVY3NkgyMi4wMDJMMjIuMDAyIDg2SDIwLjAwMlY4OEgxOC4w
323MDJWOTBIMTYuMDAyVjkySDEwLjAwMlY5NEgxMi4wMDJWOTZIMjIuMDAyVjk0SDI0LjAwMTlWOTJIMjYuMDAxOVY4MkgyOC4wMDE5VjgwSDQ4LjAwMTlWNzhINTYuMDAxOVY3Nkg2MC4wMDE5Vjc0SDY0LjAwMTlWNzJINjYuMDAxOVY3MEg2OC4wMDE5VjY4SDcwLjAwMTlWNjZINzIuMDAxOVY2NEg3NC4wMDE5VjYwSDc2LjAwMTlWNTRINzguMDAxOVYzNEg3Ni4wMDE5VjMwWiIgZmlsbD0iI0ZEQ0U0NSIvPgo8cGF0aCBkPSJNMTEwIDkuOTk5OTRIMTA4VjM3Ljk5OTlIMTEwVjQzLjk5OTlIMTEyVjExLjk5OTlIMTEwVjkuOTk5OTRaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0xNTguMDAyIDEyLjAwMDFIMTU2LjAwMlY0Ni4wMDAxSDE1NC4wMDJWNTIuMDAwMUgxNTIuMDAyVjU2TDE1MC4wMDIgNTZWNjBIMTQ4LjAwMlY2MkgxNDYuMDAyVjY0SDE0NC4wMDJWNjZIMTQyLjAwMlY2OEgxNDAuMDAyVjcwSDEzOC4wMDJWNzJIMTM0LjAwMlY3NEgxMjYuMDAyVjc2SDExMi4wMDJWNzhIMTE4LjAwMlY4MEgxMzIuMDAyVjc4SDE0MC4wMDJWNzZIMTQ0LjAwMlY3NEgxNDYuMDAyVjcySDE0OC4wMDJWNzBIMTUwLjAwMlY2OEgxNTIuMDAyVjY2SDE1NC4wMDJWNjJIMTU2LjAwMlY1OEgxNTguMDAyVjUyLjAwMDFIMTYwLjAwMlYxOC4wMDAxSDE1OC4wMDJWMTIuMDAwMVoiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTE4MC4wMDEgMjRIMTcyLjAwMVYyNkgxNzQuMDAxVjI4SDE4Mi4wMDFWMjZIMTgwLjAwMVYyNFoiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTIwMi4wMDEgNzZIMTk2LjAwMVY3OEgyMDAuMDAxVjgwSDIwOC4wMDFWNzhIMjEyLjAwMVY3NEgyMTQuMDAxVjMwTDIxOC4wMDEgMzBWMjhMMjM0LjAwMSAyOFYyNkgyMzYuMDAxVjI0SDIzOC4wMDFWMTRIMjM2LjAwMVYxMkgyMzQuMDAxVjE4SDIzMi4wMDFWMjBIMjMwLjAwMVYyMkgyMjguMDAxVjI0TDIxMi4wMDEgMjRWMjZIMjEwLjAwMVY2OEgyMDguMDAxVjcySDIwNi4wMDFWNzRIMjAyLjAwMVY3NloiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTI1MS45OTkgNjBIMjQ5Ljk5OVY2OEgyNDcuOTk5VjcwSDI0NS45OTlWNzJIMjQzLjk5OVY3NEgyMzkuOTk5Vjc2SDIzNS45OTlWNzhIMjM5Ljk5OVY4MEgyNDUuOTk5Vjc4SDI0OS45OTlWNzZIMjUxLjk5OVY3NEgyNTMuOTk5VjYySDI1MS45OTlWNjBaIiBmaWxsPSIjRkRDRTQ1Ii8+CjxwYXRoIGQ9Ik0yOTAgMTIuMDAwMUgyODhWMjAuMDAwMUgyODZWMjIuMDAwMUgyODRWMjQuMDAwMUgyODJWMjYuMDAwMUgyNzJWMjguMDAwMUgyNzRWMzAuMDAwMUgyODhWMjguMDAwMUgyOTBWMjYuMDAwMUgyOTJWMTQuMDAwMUgyOTBWMTIuMDAwMVoiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTI4OC4wMDEgNDIuMDAwMUgyODYuMDAxVjcwSDI4NC4wMDFWNzJIMjgyLjAwMVY3NEgyODAuMDAxVjc2SDI3NC4wMDFWNzhIMjc2LjAwMVY4MEgyODYuMDAxVjc4SDI4OC4wMDFWNzZIMjkwLjAwMVY0NC4wMDAxSDI4OC4wMDFWNDIuMDAwMVoiIGZpbGw9IiNGRENFNDUiLz4KPHBhdGggZD0iTTMyMi4wMDEgNzUuOTk5OVY3My45OTk5SDMyNi4wMDFWNzUuOTk5OUgzMjIuMDAxWiIgZmlsbD0iI0ZEQ0U0NSIvPgo8L3N2Zz4K";var o=s(59056);const a=e=>{const[t]=(0,r.If)();let s="dark"===t?n:i;e.theme&&(s="dark"===e.theme?n:i);const a=e.height||[30,60];return(0,o.tZ)("img",{alt:"logo",src:s,sx:{display:"block",height:a}})}},86794:(e,t,s)=>{"use strict";s.d(t,{G:()=>l});var r=s(10210),n=s(85365),i=s(52322);const o=n.Z.a`
324  text-decoration: underline;
325  &:hover {
326    opacity: 0.75;
327  }
328`,a={forceBlock:!0,namedCodesToUnicode:{percnt:"%"},overrides:{a:e=>{let{children:t,...s}=e;return(0,i.jsx)(o,{onClick:e=>e.stopPropagation(),...s,children:t})}}},l=e=>{let{children:t=""}=e;return(0,i.jsx)(r.Z,{options:a,children:t})}},39723:(e,t,s)=>{"use strict";s.d(t,{P:()=>_,t:()=>u});var r=s(18756),n=s(59807),i=s(27447),o=s(86794),a=s(10017),l=s(2784),c=s(75289),d=s(52322);const u={ERROR:"danger",INFO:"info",SUCCESS:"success",WARNING:"warning"},p=e=>{let{color:t,type:s="info"}=e;switch(s){case"danger":return(0,d.jsx)(i.J,{color:t,name:"minus-2",type:"solid"});case"success":return(0,d.jsx)(i.J,{color:t,name:"checkmark-2",type:"solid"});case"info":return(0,d.jsx)(i.J,{color:t,name:"info-2",type:"solid"});case"warning":return(0,d.jsx)(i.J,{color:t,name:"exclamation-point-2",type:"solid"});default:(0,a.Z)(s)}},_=e=>{let{action:t,dismissable:s,message:i,onDismiss:u,sx:_={},title:h,type:g="info"}=e;const m=(0,l.useMemo)((()=>{switch(g){case"info":return"solid";case"danger":return"red-solid";case"success":return"green-solid";case"warning":return"yellow-solid";default:(0,a.Z)(g)}}),[g]),f=(0,l.useCallback)((()=>{t&&t.onClick(),u&&u()}),[t,u]);return(0,d.jsx)(c.kC,{sx:{backgroundColor:"component-bg",borderColor:"line",borderRadius:"default",borderStyle:"solid",borderWidth:1,flexDirection:"column",paddingLeft:3,paddingRight:2,paddingY:3,position:"relative",width:"100%",..._},children:(0,d.jsxs)(c.kC,{children:[(0,d.jsx)(c.xu,{sx:{fontSize:2},children:(0,d.jsx)(p,{color:m,type:g})}),(0,d.jsxs)(c.kC,{sx:{flex:1,flexDirection:"column",marginX:3},children:[(0,d.jsx)(c.xu,{variant:"forms.label",children:(0,d.jsx)(o.G,{children:h||i})}),(0,d.jsxs)(c.kC,{sx:{":empty":{display:"none"},flexDirection:"column",gap:1,marginTop:1},children:[h?(0,d.jsx)(c.xv,{variant:"text.caption",children:(0,d.jsx)(o.G,{children:i})}):null,t&&(0,d.jsx)(c.xu,{mt:1,children:(0,d.jsx)(r.z,{loading:t.loading,onClick:f,size:"sm",variant:g,children:t.label})})]})]}),s?(0,d.jsx)(c.xu,{sx:{position:"absolute",right:1,top:1},children:(0,d.jsx)(n.h,{icon:{name:"x-1",type:"solid"},onClick:u,size:"xs"})}):null]})})}},31810:(e,t,s)=>{"use strict";s.d(t,{C:()=>o});var r=s(2784),n=s(75289),i=s(52322);const o=e=>{let{size:t="md",value:s,variant:o="default"}=e;const a=(0,r.useMemo)((()=>{switch(t){case"sm":return"2px 4px";case"md":return"3px 6px";case"lg":return"4px 8px"}}),[t]),l=(0,r.useMemo)((()=>{switch(t){case"sm":return"0.8rem";case"md":return 0;case"lg":return 1}}),[t]);return(0,i.jsx)(n.xu,{sx:{backgroundColor:"default"===o?"component-bg":"yellow-solid",borderRadius:"default",color:"default"===o?"text":"black",fontSize:l,lineHeight:"button",padding:a},children:s})}},36555:(e,t,s)=>{"use strict";s.d(t,{P:()=>r});const r=e=>{const t={message:e.recoverySuggestion.description,title:e.message,type:"danger"};return"trigger"in e.recoverySuggestion&&(t.action={label:e.recoverySuggestion.trigger.label,onClick:e.recoverySuggestion.trigger.callback}),t}},75778:(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var r=s(97974),n=s(2784),i=s(99085),o=s(75289),a=s(1030),l=s(15490),c=s(94085),d=s(39723),u=s(36555),p=s(2993),_=s(95909),h=s(88549),g=s(76784),m=s(13405),f=s(80641),y=s(52322);const b=n.memo((e=>{const{anchorOffset:t,pageHeaderRef:s}=(()=>{const[e,{height:t}]=(0,m.Z)(),s=(0,f.h)();return{anchorOffset:t?Math.ceil((s?s.bottom:0)+t):null,pageHeaderRef:e}})();(e=>{const t=(0,g.H)(),s=(0,n.useRef)(null);(0,n.useEffect)((()=>
328{if(null===e||s.current===t)return;const r=window.location.hash.slice(1),n=r?document.getElementById(r):null;n&&(s.current=t,n.scrollIntoView())}),[e,t])})(t);const b=(0,n.useMemo)((()=>{const{children:s,type:n}=e;return n?"error"===n?(0,y.jsx)(_.N,{type:"error",children:(0,y.jsx)(a.u,{error:e.error,variant:"page"})}):"empty"===n?(0,y.jsx)(_.N,{type:"empty",children:(0,y.jsx)(a.u,{variant:"page",...e.empty})}):"form"===n?(0,y.jsx)(_.N,{type:"form",children:s}):"list"===n?(0,y.jsx)(_.N,{type:"list",children:e.items.filter((e=>!1===Boolean(e.hidden))).map(((e,t)=>(0,y.jsx)(l.H,{...e},e.key||t)))}):"section-list"===n?(0,y.jsx)(_.N,{type:"section-list",children:e.sections.map(((e,s)=>{const{header:n}=e,i=(0,r.o)(n?.title||s.toString());let a=null;return"error"in e&&(a=(0,y.jsx)(o.xu,{my:2,children:(0,y.jsx)(d.P,{...(0,u.P)(e.error)})})),"loading"in e&&(a=(0,y.jsx)(o.xu,{my:2,children:(0,y.jsx)(c.c,{count:"number"==typeof e.loading?e.loading:void 0})})),"empty"in e&&(a=(0,y.jsx)(o.xu,{my:2,children:(0,y.jsx)(d.P,{...e.empty})})),"data"in e&&(a=(0,y.jsx)(o.xu,{my:0===s?[0,0,2]:0,children:e.data.filter((e=>!1===Boolean(e.hidden))).map((e=>(0,y.jsx)(l.H,{...e},e.key||e.title.toString())))})),(0,y.jsxs)(o.xu,{id:i,mb:5,sx:{scrollMarginTop:t??void 0},children:[n&&0!==s&&(0,y.jsx)(p.Z,{...n}),a]},i)}))}):void 0:(0,y.jsx)(_.N,{children:s})}),[t,e]);return(0,y.jsxs)(o.xu,{children:[(0,y.jsx)(i.ZP,{title:e.documentTitle||e.title}),(0,y.jsx)("div",{ref:s,children:(0,y.jsx)(h.s,{actions:e.actions,breadcrumbs:e.breadcrumbs,title:e.title,toolbar:e.toolbar})}),b]})}))},2993:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var r=s(2784),n=s(75289),i=s(52322);const o=e=>{let{actions:t,loading:s,title:o}=e;const a=(0,r.useMemo)((()=>s?(0,i.jsx)(n.$j,{color:"text",size:16}):t||void 0),[t,s]);return(0,i.jsxs)(n.kC,{sx:{alignItems:"flex-end",borderBottomColor:"line",borderBottomStyle:"solid",borderBottomWidth:1,gap:3,justifyContent:"space-between",pb:2,width:"100%"},children:[(0,i.jsx)(n.X6,{variant:"text.subheading",children:o}),a]})}},95909:(e,t,s)=>{"use strict";s.d(t,{N:()=>i});var r=s(75289),n=s(52322);const i=e=>{let{children:t,type:s}=e;switch(s){case"form":return(0,n.jsx)(r.xu,{mt:3,sx:{width:["100%","50%"]},children:t});case"list":return(0,n.jsx)(r.xu,{mt:[0,0,2],children:t});default:return(0,n.jsx)(r.xu,{children:t})}}},88549:(e,t,s)=>{"use strict";s.d(t,{s:()=>A});var r=s(2784),n=s(75289),i=s(80641),o=s(69378),a=s.n(o),l=s(59177),c=s(53968),d=s(17774),u=s(26671),p=s(55522),_=s(94115),h=s(27447),g=s(52322);const m={"& > i":{color:"text-secondary"},color:"text-secondary",fontSize:0,lineHeight:"body"},f=u.TS.all(m,{"@media (hover: hover)":{"&:hover":{"*":{color:"text"},color:"text",textDecoration:"none"}}}),y=e=>{let{title:t,to:s}=e;return(0,g.jsx)(l.rU,{to:s,children:(0,g.jsx)(n.xu,{sx:{display:"inline-block"},children:(0,g.jsxs)(n.kC,{sx:{alignItems:"center",...f},children:[(0,g.jsx)(n.xu,{mr:1,sx:m,children:(0,g.jsx)(h.J,{name:"left-4",type:"stroke"})}),(0,g.jsx)(n.xu,{sx:{paddingBottom:"1px"},children:t})]})})})},b=e=>{let{items:t}=e;const[s,i]=(0,r.useState)(t.length<5);(0,r.useEffect)((()=>{i(t.length<5)}),[t]);const o=(0,r.useMemo)((()=>s?t.map((e=>({type:"breadcrumb",...e}))):[...(0,c.q)(t,1).map((e=>({type:"breadcrumb",...e}))),{type:"toggle-button"},...(0,d.G)((0,c.q)((0,d.G)(t),2)).map((e=>({type:"breadcrumb",...e})))]),[t,s]);return(0,g.jsx)(n.kC,{sx:{alignItems:"center",flexWrap:"wrap",gap:1},children:o.map(((e,t)=>{let s=(0,g.jsx)(g.Fragment,{children:"dummy"});return s="breadcrumb"===e.type?(0,g.jsx)(l.rU,{to:e.to,children:(0,g.jsx)(n.xu,{sx:f,children:e.title})}):(0,g.jsx)(p.e,{onClick:()=>i(!0),sx:f,children:"..."}),(0,g.jsxs)(n.kC,{sx:{alignItems:"center",gap:1},children:[s,t===o.length-1?null:(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(h.J,{color:"text-secondary",name:"right-2",size:12,type:"solid"})})]},"breadcrumb"===e.type?e.to:e.type)}))})},x=r.memo((e=>{let{items:t}=e;const s=(0,_.Gc)();if("SM"===s||1===t.length){const e="SM"===s?t[t.length-1]:t[0];return(0,g.jsx)(y,{...e})}return(0,g.jsx)(b,{items:t})}),((e,t)=>a()(e.items,t.items)));var w=s(33611),S=s(28165),v=s(51032);const I=e=>{let{children:t,top:s}=e;const{theme:r}=(0,_.Fg)();return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(S.xB,{styles:e=>`\n            .sticky {}\n            .sticky.scroll {\n              background-color: ${e.colors["app-bg"]};\n            }\n          `}),(0,g.jsx)(v.Z,{innerActiveClass:"scroll",innerClass:"sticky",innerZ:r.zIndices.sticky,top:s,children:t})]})};var k=s(25969);const T={api:"API",oauth:"OAuth",rss:"RSS"},A=e=>{const{actions:t,loading:s,title:o,toolbar:a}=e,l=(0,i.h)(),c=(0,r.useMemo)((()=>e.breadcrumbs||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.pathname;const t=e=>{const t=e.split("/").reverse()[0];return T[t]||(0,k.G)(t)};return e.split("/").slice(0,-1).filter((e=>!!e)).map((e=>`/${e}`)).reduce(((e,t,s)=>{const r=e[s-1],n=r?r+t:t;return e.concat(n)}),[]).map((e=>({title:t(e),to:e})))}()),[e.breadcrumbs]);return(0,g.jsx)(I,{top:l?Math.floor(l.bottom):0,children:(0,g.jsx)(n.xu,{variant:"boxes.page",children:(0,g.jsxs)(n.xu,{children:[(0,g.jsxs)(n.kC,{sx:{alignItems:"flex-end",borderBottomStyle:"solid",borderBottomWidth:2,borderColor:"yellow-solid",flexDirection:"row",gap:3,justifyContent:"space-between",pb:2,width:"100%"},children:[s?(0,g.jsx)(w.O,{height:32,width:"25%"}):(0,g.jsxs)(n.xu,{sx:{flex:1},children:[(0,g.jsx)(n.X6,{sx:{lineHeight:1,wordBreak:"break-word"},variant:"text.heading",children:o}),c.length>0?(0,g.jsx)(n.xu,{mt:1,children:(0,g.jsx)(x,{items:c})}):null]}),t?(0,g.jsx)(n.xu,{children:t}):null]}),a]})})})}},7735:(e,t,s)=>{"use strict";s.d(t,{t:()=>o});var r=s(83844),n=s(2784),i=s(52322);const o=e=>{let{lock:t}=e;const[,s]=(0,r.P)(t);return(0,n.useEffect)((()=>{s(t)}),[t,s]),(0,i.jsx)(i.Fragment,{})}},22556:(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var r=s(75289),n=s(52322);const i=e=>{let{height:t=1,spacing:s=0}=e;return(0,n.jsx)(r.xu,{sx:{backgroundColor:"line",height:`${t}px`,my:s,width:"100%"}})}},33611:(e,t,s)=>{"use strict";s.d(t,{O:()=>c});var r=s(75289),n=s(85365),i=s(52322);const o=(0,n.Z)(r.xu,{shouldForwardProp:e=>"invert"!==e})`
329  position: relative;
330  overflow: hidden;
331  background: ${e=>{let{invert:t,theme:s}=e;return t?s.colors["app-bg"]:s.colors["component-bg"]}};
332  border-radius: ${e=>{let{theme:t}=e;return t.radii.default}}px;
333`,a=(0,n.Z)(r.xu,{shouldForwardProp:e=>"invert"!==e})`
334  position: absolute;
335  top: 0;
336  left: 0;
337  right: 0;
338  bottom: 0;
339  background: linear-gradient(
340    135deg,
341    ${e=>{let{invert:t,theme:s}=e;return t?s.colors["app-bg"]:s.colors["component-bg"]}} 0%,
342    ${e=>{let{invert:t,theme:s}=e;return t?s.colors["html-bg"]:s.colors["component-bg-hover"]}}
343      50%,
344    ${e=>{let{invert:t,theme:s}=e;return t?s.colors["app-bg"]:s.colors["component-bg"]}} 100%
345  );
346  transform: translateX(-100%);
347  animation: shimmer 1s infinite;
348  @keyframes shimmer {
349    0% {
350      transform: translateX(-100%);
351    }
352    100% {
353      transform: translateX(100%);
354    }
355  }
356`,l=(0,n.Z)(r.xu)`
357  visibility: hidden;
358`,c=e=>{let{children:t,height:s="100%",invert:r=!1,sx:n={},width:c="100%"}=e;return(0,i.jsxs)(o,{invert:r,sx:{height:s,width:c,...n},children:[(0,i.jsx)(a,{invert:r}),(0,i.jsx)(l,{children:t})]})}},35515:(e,t,s)=>{"use strict";s.d(t,{O:()=>c,m:()=>u});var r=s(90230),n=s(2784),i=s(75289),o=s(85365),a=s(86015),l=s(52322);const c=e=>{let{children:t}=e;return(0,l.jsx)(i.xu,{children:t})},d=(0,o.Z)(r.xz,{shouldForwardProp:a.Z})`
359  all: unset;
360  background-color: ${e=>{let{theme:t}=e;return t.colors["segmented-control-bg"]}};
361  color: ${e=>{let{theme:t}=e;return t.colors["text-secondary"]}};
362  font-size: ${e=>{let{size:t,theme:s}=e;return"sm"===t?s.fontSizes[0]:s.fontSizes[1]}};
363
364  display: ${e=>{let{justified:t}=e;return t?"flex":"block"}};
365  flex: ${e=>{let{justified:t,layout:s}=e;return t?"horizontal"===s?"1 1 0%":"1":"none"}};
366  align-items: center;
367  justify-content: center;
368
369  line-height: ${e=>{let{theme:t}=e;return t.lineHeights.button}};
370  padding: ${e=>{let{theme:t}=e;return`${t.space[2]}px ${t.space[3]}px`}};
371  white-space: nowrap;
372
373  &:first-of-type {
374    border-top-left-radius: ${e=>{let{theme:t}=e;return t.radii.wrappedWithDefault}}px;
375    border-top-right-radius: ${e=>{let{layout:t,theme:s}=e;return"vertical"===t?s.radii.wrappedWithDefault:0}}px;
376    border-bottom-left-radius: ${e=>{let{layout:t,theme:s}=e;return"horizontal"===t?s.radii.wrappedWithDefault:0}}px;
377  }
378
379  &:last-of-type {
380    border-bottom-right-radius: ${e=>{let{theme:t}=e;return t.radii.wrappedWithDefault}}px;
381    border-bottom-left-radius: ${e=>{let{layout:t,theme:s}=e;return"horizontal"===t?0:s.radii.wrappedWithDefault}}px;
382    border-top-right-radius: ${e=>{let{layout:t,theme:s}=e;return"vertical"===t?0:s.radii.wrappedWithDefault}}px;
383  }
384
385  &[data-state="active"] {
386    color: ${e=>{let{theme:t}=e;return t.colors.text}};
387    font-weight: ${e=>{let{theme:t}=e;return t.fontWeights.medium}};
388    background-color: ${e=>{let{theme:t}=e;return t.colors["segmented-control-bg-active"]}};
389  }
390`,u=e=>{let{children:t,justified:s=!1,layout:o="horizontal",onValueChange:a,size:c="md",value:u}=e;const p=n.Children.map(t,(e=>{let{props:t}=e;return t.title}));return(0,l.jsx)(r.fC,{defaultValue:p[0],onValueChange:a,value:u,children:(0,l.jsxs)(i.kC,{sx:{alignItems:s?"stretch":"flex-start",flexDirection:"vertical"===o?"row":"column",gap:3},children:[(0,l.jsx)(r.aV,{asChild:!0,children:(0,l.jsx)(i.kC,{sx:{backgroundColor:"horizontal"===o?"line":"transparent",borderColor:"border",borderRadius:"default",borderStyle:"solid",borderWidth:"horizontal"===o?"1px":0,flexDirection:"vertical"===o?"column":"row",gap:"1px",maxWidth:"vertical"===o?["20%","25%","30%"]:"100%"},children:p.map((e=>"horizontal"===o?(0,l.jsx)(d,{justified:s,layout:o,size:c,value:e,children:e},e):(0,l.jsx)(r.xz,{asChild:!0,value:e,children:(0,l.jsx)(i.xu,{sx:{'&[data-state="active"]':{backgroundColor:"nav-item-bg-active",color:"text"},backgroundColor:"nav-item-bg",borderRadius:"default",color:"text-secondary",cursor:"var(--config-cursor)",fontWeight:"medium",overflow:"hidden",paddingX:[1,2],paddingY:1,textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e})},e)))})}),"vertical"===o&&(0,l.jsx)(i.xu,{sx:{alignSelf:"stretch",backgroundColor:"line",height:"auto",width:1}}),(0,l.jsx)(i.xu,{sx:{flex:1},children:n.Children.map(t,(e=>(0,l.jsx)(r.VY,{style:{cursor:"inherit"},value:e.props.title,children:e})))})]})})}},97395:(e,t,s)=>{"use strict";s.d(t,{t:()=>u});var r=s(32967),n=s(2784),i=s(66582),o=s(75289),a=s(94115),l=s(63259),c=s(52322);const d=e=>"command"===e.toLowerCase()?i.Q5?"⌘":"ctrl":"backspace"===e.toLowerCase()?"⌫":e,u=e=>{let{children:t,format:s="label+key",keys:u,label:p,opened:_}=e;const{theme:h}=(0,a.Fg)(),g=(0,n.useMemo)((()=>{const e=(0,c.jsx)(o.kC,{sx:{alignItems:"center"},children:u.map(((e,t)=>(0,c.jsxs)(n.Fragment,{children:[(0,c.jsx)(r.T,{sx:{backgroundColor:h.colors["lo-contrast"],borderColor:h.colors.border,color:h.colors["hi-contrast"],fontFamily:"var(--font-monospace)",fontWeight:600,lineHeight:1,padding:"2px 4px"},children:d(e)}),t===u.length-1?null:(0,c.jsx)(o.xv,{sx:{color:"app-bg",paddingX:"2px"},children:"+"})]},e)))});return"key+label"===s?(0,c.jsxs)(o.kC,{sx:{alignItems:"center"},children:[e,p?(0,c.jsx)(o.xv,{sx:{fontSize:0,paddingLeft:1},children:p}):null]}):(0,c.jsxs)(o.kC,{sx:{alignItems:"center"},children:[p?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.xv,{sx:{fontSize:0},children:p}),(0,c.jsx)(o.xv,{sx:{color:"text-secondary",paddingX:1},children:"·"})]}):null,e]}
390)}),[s,p,u,h]);return i.nI?(0,c.jsx)(l.u,{label:g,opened:_,trigger:"mouseenter",children:t}):t}},63259:(e,t,s)=>{"use strict";s.d(t,{u:()=>l});var r=s(35155),n=(s(22352),s(85365)),i=s(94115),o=s(52322);const a=(0,n.Z)(r.ZP)`
391  background-color: ${e=>{let{theme:t}=e;return t.colors["hi-contrast"]}};
392  color: ${e=>{let{theme:t}=e;return t.colors["lo-contrast"]}};
393  font-size: ${e=>{let{theme:t}=e;return t.fontSizes[0]}};
394  overflow-wrap: break-word;
395
396  .tippy-arrow {
397    color: ${e=>{let{theme:t}=e;return t.colors["hi-contrast"]}};
398  }
399`,l=e=>{let{children:t,delay:s=[500,0],label:r,opened:n,trigger:l="mouseenter"}=e;const{theme:c}=(0,i.Fg)();return(0,o.jsx)(a,{content:r,delay:s,touch:["hold",500],trigger:l,visible:n,zIndex:c.zIndices.tooltip,children:"string"==typeof t?(0,o.jsx)("span",{children:t}):t})}},21704:(e,t,s)=>{"use strict";s.d(t,{l:()=>i});var r=s(28165),n=s(52322);const i=()=>(0,n.jsx)(r.xB,{styles:{".sb-show-main.sb-main-padded":{padding:0}}})},77082:(e,t,s)=>{"use strict";s.d(t,{j:()=>r});const r={LG:1280,MD:768,SM:640}},94115:(e,t,s)=>{"use strict";s.d(t,{AV:()=>d,Fg:()=>c,Gc:()=>l,yU:()=>u});var r=s(12504),n=s(83226),i=s(26671),o=s(4683),a=s(77082);const l=(0,n.Z)(a.j),c=i.B7,d=()=>(0,o.If)(),u=e=>(()=>{const[e]=d();return"dark"===e?r.$:r.D})()[e]},97399:(e,t,s)=>{"use strict";s.d(t,{c:()=>r});const r=e=>{if(e instanceof HTMLElement){if(["INPUT","SELECT","TEXTAREA"].includes(e.tagName))return!0;if(e.isContentEditable)return!0}return!1}},12504:(e,t,s)=>{"use strict";s.d(t,{$:()=>a,D:()=>o});var r=s(60354);const n=["bg","bg-secondary","component-bg","component-bg-hover","component-bg-active","line","border","border-hover","solid","solid-hover","text-secondary","text"],i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Object.values(e);return{...n.reduce(((e,s,n)=>(e[t?`${t}-${s}`:s]=r[n],e)),{}),...Object.entries(s).reduce(((e,s)=>{let[r,n]=s;return e[t?`${t}-${r}`:r]=n,e}),{})}},o={...i(r.MA),...i(r.ek,"green"),...i(r.Q6,"red"),...i(r.er,"yellow",{solid:"#FDCE45","solid-hover":"#FDD868"}),"html-bg":r.MA.gray2,"app-bg":"white","list-item-bg":"transparent","list-item-bg-active":r.MA.gray2,"list-item-bg-hover":r.MA.gray2,"list-item-border":r.MA.gray5,"nav-bg":"white","nav-item-bg":"transparent","nav-item-bg-hover":r.MA.gray3,"nav-item-bg-active":r.MA.gray3,"segmented-control-bg":r.MA.gray3,"segmented-control-bg-active":"white","transfer-list-item-completing-bg":r.LR.lime3,"transfer-list-item-downloading-bg":r.LR.lime3,"transfer-list-item-finished-bg":r.MA.gray2,"transfer-list-item-passive-bg":r.MA.gray1,"hi-contrast":r.MA.gray12,"lo-contrast":r.MA.gray1,"overlay-inline":r.U2.blackA3,"overlay-full":r.U2.blackA9,shadow:r.MA.gray8,transparent:"transparent"},a={...i(r.hU),...i(r.u7,"green"),...i(r.nA,"red"),...i(r.f3,"yellow",{solid:"#FDCE45","solid-hover":"#FCBE03"}),"html-bg":"black","app-bg":r.hU.gray1,"list-item-bg":"transparent","list-item-bg-hover":r.hU.gray2,"list-item-bg-active":r.hU.gray2,"list-item-border":r.hU.gray5,"nav-bg":r.hU.gray1,"nav-item-bg":"transparent","nav-item-bg-active":r.hU.gray3,"nav-item-bg-hover":r.hU.gray3,"segmented-control-bg":r.hU.gray1,"segmented-control-bg-active":r.hU.gray3,"transfer-list-item-completing-bg":r.hU.gray3,"transfer-list-item-downloading-bg":r.hU.gray3,"transfer-list-item-finished-bg":r.hU.gray2,"transfer-list-item-passive-bg":r.hU.gray2,"hi-contrast":r.hU.gray12,"lo-contrast":r.hU.gray1,"overlay-inline":r.U2.blackA9,"overlay-full":r.U2.blackA11,shadow:"black",transparent:"transparent"}},42975:(e,t,s)=>{"use strict";s.d(t,{E:()=>o,u:()=>a});var r=s(2784),n=s(52322);const i=r.createContext({getAPIClient:()=>{}}),o=()=>{const e=(()=>{const e=r.useContext(i);if(void 0===e)throw new Error("useAPI must be used within a APIProvider");return e})().getAPIClient();if(void 0===e)throw new Error("useAPI must be used within a APIProvider with a client instance");return e},a=e=>{let{children:t,getAPIClient:s}=e;return(0,n.jsx)(i.Provider,{value:{getAPIClient:s},children:t})}},34884:(e,t,s)=>{"use strict";s.d(t,{KV:()=>l,Nu:()=>c,e:()=>d,fF:()=>o,u7:()=>u,xP:()=>a});var r=s(73059),n=s(98355),i=s(2754);class o extends i.iC{}const a=function(){let{onReload:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{kind:"match_condition",localize:()=>({message:(0,n.I)("generic_network_error_title"),recoverySuggestion:e?{description:(0,n.I)("generic_network_error_message"),trigger:{callback:e,label:(0,n.I)("app_page_load_retry_label")},type:"action"}:{description:(0,n.I)("generic_network_error_message"),type:"instruction"}}),match:e=>(0,r.XR)(e)?0===e.data.status_code:e instanceof Error&&(e.message.includes("Network Error")||e.message.includes("Request aborted"))}},l={kind:"match_condition",localize:()=>({message:(0,n.I)("timeout_error_title"),recoverySuggestion:{description:(0,n.I)("timeout_error_message"),type:"instruction"}}),match:e=>(0,r.XR)(e)?408===e.data.status_code||504===e.data.status_code:e instanceof Error&&e.message.includes("timeout of")},c={kind:"api_status_code",localize:()=>({message:"Resource not found",recoverySuggestion:{description:"The resource you are looking for is not available.",type:"instruction"}}),status_code:404},d={kind:"api_status_code",localize:()=>({message:"Server error",recoverySuggestion:{description:"Something went wrong on our side.",type:"instruction"}}),status_code:500},u={error_type:"FILE_NOT_REACHABLE",kind:"api_error_type",localize:()=>({message:(0,n.I)("files_not_reachable_title"),recoverySuggestion:{description:(0,n.I)("files_not_reachable_message"),type:"instruction"}})}},28114:(e,t,s)=>{"use strict";s.d(t,{s:()=>i,z:()=>o});var r=s(4099),n=s(86468);const i=s.n(n)(),o={compose:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return e=>t.reduce(((t,s)=>t||s(e)),void 0)},isEmail:e=>{if(!i.isEmail(e))return"Please enter a valid e-mail address."},isMagnetURI:e=>{if(!i.isMagnetURI(e))return"Please enter a valid magnet URI."},isURL:e=>{if(!i.isURL(e))return"Please enter a valid URL."},lengthBetween:(e,t)=>s=>{if(!(s.length>=e&&s.length<=t))return r.ZP.validators_length_between(e,t)},lengthExact:e=>t=>{if(t.length!==e)return r.ZP.validators_length_exact(e)},noWhiteSpace:e=>{if(e.includes(" "))return"No whitespace :/"},usernameFormat:e=>{if(!/^[a-zA-Z0-9_-]+$/.test(e))return r.ZP.account_form_error_username_invalid_characters()},required:e=>{if(!e)return r.ZP.validators_required()}}},95712:(e,t,s)=>{"use strict";s.d(t,{Fm:()=>a,ao:()=>i,iw:()=>n});var r=s(86324);const n=e=>"PaddleBilling"===e.provider&&"string"==typeof e.price_id&&e.price_id.trim().length>0,i=e=>"PaddleBilling"===e.provider,o=[{currency:"USD",icon:{name:"credit-card-1"},provider:"Paddle",title:"Credit or debit card",type:"credit-card"},...(0,r.G)().map((e=>({currency:e.symbol,icon:{url:e.icon_url},provider:e.api.payment_provider,title:e.name,type:e.api.payment_type})))],a=e=>{if("api_payment_options"in e){const{api_payment_options:t}=e;return o.filter((e=>t.some((t=>t.name===e.type)))).map((e=>({...e,discount_percent:t.find((t=>t.name===e.type))?.discount_percent})))}const{api_payment_provider_options:t,paddle_billing_available:s=!1}=e,r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.find((e=>"Paddle"===e.provider||t.paddle_billing_available&&n(e)))}(t,{paddle_billing_available:s});return o.filter((e=>"credit-card"===e.type?r:t.some((t=>t.provider===e.provider)))).map((e=>{const s="credit-card"===e.type?r:t.find((t=>t.provider===e.provider));return s?{...e,provider:s.provider,discount_percent:"discount_percent"in s?s.discount_percent:0}:e}))}},86324:(e,t,s)=>{"use strict";s.d(t,{G:()=>n,y:()=>r});const r={BTC:{api:{payment_provider:"OpenNode",payment_type:"cryptocurrency"},icon_url:"https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bitcoin.svg/2880px-Bitcoin.svg.png",name:"Bitcoin",symbol:"BTC"},BTC_LN:{api:{payment_provider:"OpenNode",payment_type:"cryptocurrency"},icon_url:"https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Lightning_Network.svg/2048px-Lightning_Network.svg.png",name:"Bitcoin via Lightning Network",symbol:"LN"}},n=()=>Object.values(r)},62514:(e,t,s)=>{"use strict";s.d(t,{CT:()=>l,KP:()=>c});const r=Object.keys({AcceptNano:!0,Fastspring:!0,OpenNode:!0,Paddle:!0,PaddleBilling:!0}),n=e=>"object"==typeof e&&null!==e,i=new Set(r),o=e=>{if(!n(e))return!1;switch(e.provider){case"Paddle":return"credit-card"===e.type&&"number"==typeof e.plan_id&&"number"==typeof e.vendor_id;case"Fastspring":return(!("type"in e)||"credit-card"===e.type)&&"string"==typeof e.url;case"OpenNode":return"cryptocurrency"===e.type&&"number"==typeof e.discount_percent;case"AcceptNano":return"nano"===e.type&&"USD"===e.currency&&"string"==typeof e.amount&&"string"==typeof e.api_host&&"number"==typeof e.discount_percent&&"string"==typeof e.state;case"PaddleBilling":return!("discount_percent"in e&&"number"!=typeof e.discount_percent||"price_id"in e&&null!==e.price_id&&"string"!=typeof e.price_id);default:return!1}},a=e=>{if(o(e))return e},l=e=>{if(!n(e)||!Array.isArray(e.urls))return{malformedProviderNames:[],unnamedMalformedProviderCount:0,unknownProviderNames:[]};const t=new Set,s=new Set;let r=0;for(const a of e.urls)n(a)&&"string"==typeof a.provider?i.has(a.provider)?o(a)||t.add(a.provider):s.add(a.provider):r+=1;return{malformedProviderNames:[...t],unnamedMalformedProviderCount:r,unknownProviderNames:[...s]}},c=e=>{if(!n(e))throw new Error("Invalid change-plan response");const t=(e=>Array.isArray(e.urls)?e.urls.map(a).filter((e=>void 0!==e)):null)(e);if(t){if(t.length>0)return{data:{...e,urls:t},type:"checkout"};throw new Error("Invalid change-plan response")}if((e=>!0===e.confirmation)(e))return{data:e,type:"confirmation_required"};
399if((e=>n(e.next_payment))(e))return{data:e,type:"subscription_updated"};if(!(e=>{return t=e,s=["status"],Object.keys(t).every((e=>s.includes(e)))&&(e=>!("status"in e)||"string"==typeof e.status)(e);var t,s})(e))throw new Error("Invalid change-plan response");return{data:e,type:"success"}}},70067:(e,t,s)=>{"use strict";s.d(t,{W:()=>i,p:()=>n});var r=s(98355);const n={error_type:"FEATURE_DISABLED",kind:"api_error_type",localize:()=>({message:(0,r.I)("files_update_watch_status_feature_disabled_error_message"),recoverySuggestion:{description:(0,r.I)("files_update_watch_status_feature_disabled_error_recovery_instruction"),type:"instruction"}})},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[{status_code:410,kind:"api_status_code",localize:()=>({message:(0,r.I)("files_lost_title"),meta:{suggest_deletion:!0},recoverySuggestion:{description:(0,r.I)("files_lost_message"),...e.triggers?.goBack?{trigger:e.triggers.goBack,type:"action"}:{type:"instruction"}}})},{error_type:"FILE_LOST",kind:"api_error_type",localize:()=>({message:(0,r.I)("files_lost_title"),meta:{suggest_deletion:!0},recoverySuggestion:{description:(0,r.I)("files_lost_message"),...e.triggers?.goBack?{trigger:e.triggers.goBack,type:"action"}:{type:"instruction"}}})},{error_type:"FILE_NOT_REACHABLE",kind:"api_error_type",localize:()=>({message:(0,r.I)("files_not_reachable_title"),recoverySuggestion:{description:(0,r.I)("files_not_reachable_message"),...e.triggers?.goBack?{trigger:e.triggers.goBack,type:"action"}:{type:"instruction"}}})},{kind:"api_status_code",localize:()=>({message:(0,r.I)("files_badrequest_title"),recoverySuggestion:{description:(0,r.I)("files_badrequest_message"),...e.triggers?.goBack?{trigger:e.triggers.goBack,type:"action"}:{type:"instruction"}}}),status_code:400},{kind:"api_status_code",localize:()=>({message:(0,r.I)("files_notfound_title"),recoverySuggestion:{description:(0,r.I)("files_notfound_message"),...e.triggers?.goBack?{trigger:e.triggers.goBack,type:"action"}:{type:"instruction"}}}),status_code:404},{kind:"api_status_code",localize:()=>({message:(0,r.I)("generic_error_503_title"),recoverySuggestion:{description:(0,r.I)("generic_error_503_message"),...e.triggers?.goBack?{trigger:e.triggers.goBack,type:"action"}:{type:"instruction"}}}),status_code:503}]}},86169:(e,t,s)=>{"use strict";s.d(t,{l:()=>o});var r=s(42975),n=s(2754),i=s(2784);const o=()=>{const e=(0,r.E)();return(0,i.useMemo)((()=>{if(!e.options.baseURL||!e.token)throw new Error("API baseURL or token is not set");return new n.Nb(e.options.baseURL,e.token)}),[e.options.baseURL,e.token])}},90749:(e,t,s)=>{"use strict";s.d(t,{KL:()=>l,sc:()=>c});var r=s(42975),n=s(93599),i=s(55830),o=s(58943),a=s(2784);const l=e=>["files",e,"conversion_status"],c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=(0,r.E)(),c=l(e),d=(0,i.NL)(),u=(()=>{const e=(0,r.E)();return(0,n.D)({mutationFn:async t=>{const{data:{mp4:s}}=await e.File.ConvertToMp4(t);return s}})})(),p=(0,a.useRef)(!1);return(0,o.a)({queryFn:async()=>{const t=d.getQueryData(c);if("NEEDS_CONVERSION"===t?.status)return p.current||(p.current=!0,await u.mutateAsync(e)),{id:e,status:"IN_QUEUE"};const{data:{mp4:r}}=await s.File.ConvertStatus(e);return"NOT_AVAILABLE"===r.status&&"CONVERSION_NOT_NEEDED"===t?.status?t:r},queryKey:c,refetchInterval(e){if(!e)return!1;switch(e.status){case"IN_QUEUE":case"CONVERTING":case"NEEDS_CONVERSION":return 3e3;default:return!1}},...t})}},81669:(e,t,s)=>{"use strict";s.d(t,{Z:()=>l,s:()=>c});var r=s(42975),n=s(58943),i=s(34778),o=s(55830),a=s(90749);s(98357),s(2784);const l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{responseType:"blob",scope:"default"};const s=(0,r.E)(),i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scope:"default"};const s=(0,r.E)();return(0,n.a)({queryFn:async()=>{if("default"===t.scope){const{data:t}=await s.File.GetStorageURL(e);return t.url}const{data:r}=await s.get(`/public_share/files/${e}/url`);return r.url},queryKey:["files",t.scope,e,"storage-url"],staleTime:Number.POSITIVE_INFINITY,suspense:!0})}(e,t);return(0,n.a)({enabled:i.isSuccess,queryFn:async()=>
399{if(!i.data)throw new Error("No storage url");const{data:e}=await s.get(i.data,{responseType:t.responseType});return e},queryKey:["files",e,"raw-data"],staleTime:Number.POSITIVE_INFINITY,suspense:!0})},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scope:"default"};const s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=(0,r.E)(),i=(0,o.NL)();return(0,n.a)({onSuccess:e=>{if("number"==typeof e.parent.start_from&&i.setQueryData((e=>["files",e,"start_from"])(e.parent.id),e.parent.start_from),"boolean"==typeof e.parent.need_convert){const t={id:e.parent.id,status:e.parent.need_convert?"NEEDS_CONVERSION":"CONVERSION_NOT_NEEDED"};i.setQueryData((0,a.KL)(e.parent.id),t)}t.onSuccess&&t.onSuccess(e)},queryFn:async()=>{const{data:t}=await s.Files.Query(e.id,e);return t},queryKey:(l=e.id,["files",l]),...t});var l}({id:e},{enabled:"default"===t.scope,suspense:!0}),l=(0,i.Q8)(e,{enabled:"public-share"===t.scope,suspense:!0});return s.data?.parent.size||l.data?.parent.size||0}},80452:(e,t,s)=>{"use strict";s.d(t,{C:()=>n});const r=["hev1.2.4.L120.90","hev1.1.6.L120.90","hvc1.1.6.L150.0"],n=(e,t)=>{const s=(e=>{const t=e?.playback_issues?.[0];if(t)return{playback_issue:t,reason:"skipped-playback-issue",result:!1};if(!e?.streams)return{reason:"no-streams",result:!1};const s=window.document.createElement("video");for(const t of e.streams){const n=t.rfc6381_codec,i=n?`${e.mime_type}; codecs="${t.rfc6381_codec}"`:e.mime_type;if(n&&r.includes(n))return{codec:n,mime_type:e.mime_type,reason:"skipped-rfc6381-codec",result:!1};if("probably"!==s.canPlayType(i))return{codec:n,mime_type:e.mime_type,reason:"not-supported",result:!1}}return{result:!0}})(t);return console.log(`@putio:can-play-original-video [${e.id}]`,s,t),!0===s.result?(console.log(`@putio:can-play-original-video [${e.id}] - playing the original`),s):"skipped-playback-issue"===s.reason?(console.log(`@putio:can-play-original-video [${e.id}] - skipping the original due to ${s.playback_issue}`),s):!1===e.need_convert?e.is_mp4_available?(console.log(`@putio:can-play-original-video [${e.id}] - playing the transcoded MP4`),s):(console.log(`@putio:can-play-original-video [${e.id}] - playing the original because the API says we can.`),{result:!0}):s}},42476:(e,t,s)=>{"use strict";s.d(t,{T:()=>r});const r=e=>{const{content_type:t,extension:s,file_type:r}=e;return"string"!=typeof t?"other":"application/x-directory"===t?"folder":t.startsWith("audio")||"AUDIO"===r?"audio":t.startsWith("video")?"video":t.startsWith("image")?"image":"application/pdf"===t?"pdf":["application/x-rar","application/zip"].includes(t)?"archive":"application/epub+zip"===t?"epub":t.startsWith("text")||t.startsWith("application/x-subrip")||"TEXT"===r?t.endsWith("/markdown")||"md"===s?"text/markdown":"text":"other"}},34778:(e,t,s)=>{"use strict";s.d(t,{Iu:()=>a,Q8:()=>c,uz:()=>l});var r=s(42975),n=s(58943),i=s(55830),o=s(90749);const a=()=>{const e=(0,r.E)();return(0,n.a)({queryFn:()=>e.get("/public_share",{headers:{"cache-control":"no-cache"},params:{id:e.token}}).then((e=>e.data.public_share)),queryKey:["public-shares",e.token],staleTime:6e4,suspense:!0})},l=()=>{const e=(0,r.E)(),t=(0,i.NL)();if(!e.token)throw new Error("API token not found");const s=t.getQueryData(["public-shares",e.token]);if(!s)throw new Error("Public share not found");return{auth_token:s.token,push_token:s.push_token}},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=(0,r.E)(),a=(0,i.NL)();return(0,n.a)({onSuccess:e=>{if("boolean"==typeof e.parent.need_convert){const t={id:e.parent.id,status:e.parent.need_convert?"NEEDS_CONVERSION":"CONVERSION_NOT_NEEDED"};a.setQueryData((0,o.KL)(e.parent.id),t)}},queryFn:()=>s.get("/public_share/files/list",{params:{breadcrumbs:1,codecs_parent:1,media_info_parent:1,mp4_status_parent:1,parent_id:e,video_metadata_parent:1,stream_url_parent:1}}).then((e=>e.data)),queryKey:["public-shares","file",e],staleTime:6e4,suspense:!0,...t})}},4099:(e,t,s)=>{"use strict";s.d(t,{ZP:()=>a,t:()=>o});var r=s(6765),n=s(57223),i=s(98355);const o=i.I,a=Object.keys(n).reduce(((e,t)=>{const s=t;return(0,r.T)(e,{[s]:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,i.I)(s,...t)}})}),{})},98355:(e,t,s)=>{"use strict";s.d(t,{I:()=>o});var r=s(6362),n=s.n(r),i=s(57223);const o=(e=>{const t=new(n())({}),s=i;return function(e){const r=s[e];for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(Array.isArray(r)){const[e,s]=r,[n,o,...a]=i,l="number"==typeof n?n:0,c="number"==typeof o?o:0;return t.translate(e,s).ifPlural(l,s).fetch([c,...a])}return t.translate(r).fetch(i)}})()},43558:()=>{},53260:()=>{},57223:e=>{"use strict";e.exports=JSON.parse('{"account_2fa":"Two-factor authentication","account_2fa_description":"Secure your account by adding an additional layer of security.","account_action_label_change":"Change","account_action_label_disable":"Disable","account_action_label_enable":"Enable","account_action_label_manage":"Manage","account_action_label_start":"Start","account_action_label_view":"View","account_api_docs_title":"API Docs","account_api_title":"API","account_change_email_confirmation":"We sent you a confirmation email, please check the mailbox of your old email address.","account_change_email_modal_title":"Change your email address","account_change_other_confirmation":"We sent you a confirmation email, please check your mailbox.","account_change_password_modal_title":"Change your password","account_change_username_modal_title":"Change your username","account_clear_data":"Clear your data","account_clear_data_description":"If you fancy a fresh start, here\'s a way to wipe stuff. Be careful, we can\'t bring \'em back.","account_destroy":"Destroy your account","account_destroy_cancel":"No, I will stay 🎉","account_destroy_de
399scription":"We definitely don\'t want this to happen, <a href=\\"#\\" id=\\"putio:open-support-chat\\">please talk to</a> us before you make up your mind.","account_destroy_input_label":"Please enter your current password","account_destroy_input_placeholder":"Current Password","account_destroy_modal_message":"**%1$s**, are you 100&percnt; sure you want to destroy your account? There is no turning back!!!<br/><br/>You can <a href=\\"#\\" id=\\"%2$s\\">still talk to us</a> if there is anything we can help with.<br/><br/>","account_destroy_submit":"Yes, goodbye 😢","account_disable_two_factor_modal_title":"Disable two-factor authentication","account_disable_two_factor_success":"Two-factor authentication is disabled. Please be careful!","account_email":"Email address","account_enable_two_factor_modal_title":"Enable two-factor authentication","account_enable_two_factor_scan_qr_instruction":"Scan the QR code with your authenticator app. If you don\'t use a 2FA authenticator app, we recommend Google Authenticator for <a target=\\"_blank\\" rel=\\"noopener noreferrer\\" href=\\"https://apps.apple.com/us/app/google-authenticator/id388497605\\">iOS</a> and <a target=\\"_blank\\" rel=\\"noopener noreferrer\\"  href=\\"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&amp;hl=en_US&amp;gl=US\\">Android</a>, or <a target=\\"_blank\\" rel=\\"noopener noreferrer\\"  href=\\"https://1password.com/\\">1Password</a>.","account_enable_two_factor_success":"Two-factor authentication is enabled!","account_enable_two_factor_warning_message":"On these applications please add your six-digit authentication code to end of your password. For example \\"mypassword321222\\"","account_enable_two_factor_warning_title":"Some third party applications(ftp, webdav etc.) do not support two-factor authentication.","account_form_current_password":"Current password","account_form_current_password_helper":"We need your current password for confirmation.","account_form_email":"Email address","account_form_email_helper":"Won\'t be visible to anyone. We promise not to spam.","account_form_error_default":"Something went wrong :(","account_form_error_existing_email":"Email is already used by another account","account_form_error_invalid_current_password":"Your current password doesn\'t match the one in our records","account_form_error_invalid_email":"Invalid email address","account_form_error_invalid_new_password":"Invalid new password","account_form_error_invalid_otp_code":"Invalid 6 digit code","account_form_error_invalid_username":"Sorry, we couldn\'t update your username. Please select a different one.","account_form_error_pwned_new_password":"Sorry. This password matches with a compromised one at \\"Have I been pwned\\"s database. Please select a different one.","account_form_error_same_username":"Username is same as previous one. Please select a different one.","account_form_error_two_factor_already_enabled":"Two-factor authentication is already enabled.","account_form_error_username_in_use":"This username is being used :/","account_form_error_username_invalid_characters":"Only letters (a-z), numbers, dashes, and underscores are allowed.","account_form_error_username_whitespace_not_allowed":"Whitespace is not allowed in username","account_form_error_username_wrong_range":"Username must be between 3 and 80 characters","account_form_new_email":"New email address","account_form_new_password":"New password","account_form_new_password_confirmation":"Confirm new password","account_form_new_password_confirmation_error":"New password and confirmation don\'t match.","account_form_new_username":"New username","account_form_password":"Password","account_form_password_confirmation_label":"Please enter your current password","account_form_password_confirmation_placeholder":"Current password","account_form_password_helper":"4 to 128 characters.","account_form_save":"Save changes","account_form_save_success":"Changes successfully saved","account_form_username":"Username","account_form_username_helper":"3-80 characters. Only letters (a-z), numbers, dashes, and underscores.","account_link_description":"Connect your account with other put.io applications.","account_logout_description":"Come back anytime!","account_logout_title":"Log out","account_pagename":"Account","account_password":"Change your password","account_password_last_changed_at":"Last changed %s","account_password_last_changed_at_never"
399:"Periodically changing your password would keep your account in safe hands.","account_section_apps":"Applications","account_section_danger_zone":"Danger zone","account_section_info":"Information","account_section_item_pending_change":"There is a pending change, please visit your e-mail to approve. If you did not do this change, let us know.","account_section_security":"Security","account_sessions":"Where you are logged in","account_sessions_description":"Applications and sessions you have recently logged in with your account.","account_username":"Username","account_wipe_confirm_label":"Start Clean-Up","account_wipe_success_message":"Clean-up completed!","account_your_applications":"Apps created by you","account_your_applications_description":"Have something in mind?","app_account_ratelimit_error_message":"You have exceeded an allocated request count. Please try again later.","app_auth_error_action":"Try Again","app_auth_error_message":"We\'re unable to complete the authentication process.","app_auth_error_network_message":"Please check your network connection and try again.","app_auth_error_title":"Oops! An error occurred","app_auth_message":"wants to access your put.io account.","app_auth_revoke_guide":"You can revoke this authorization at any time from your <a href=\\"/account/authorizations\\" target=\\"_blank\\">Authorizations</a> page.","app_breadcrumb_backto_label":"Back To","app_confirm_dialog_cancel":"Cancel","app_confirm_dialog_confirm":"Confirm","app_confirm_dialog_ok":"Okay","app_dialog_close":"Close","app_drag_drop_message":"Drop your files to upload","app_expired_account_cta_label":"Keep a good thing going!","app_expired_account_family_cta_label":"Leave the family plan","app_expired_account_family_member_message":"If you\'re ready to leave the nest, you can start your own subscription too!","app_expired_account_family_member_title":"Your family plan\'s owner needs to update their payment details to keep your plan active.","app_expired_account_title":"Your account has been deactivated 😢","app_no_internet_connection":"No internet connection","app_page_load_error_message":"We couldn\'t load this page. Please try again.","app_page_load_error_title":"Sorry!","app_page_load_retry_label":"Reload","app_page_load_timeout_message":"We\'re having issues to load this page.","app_page_load_timeout_title":"It\'s taking too long...","app_passive_account_file_delete_message":"Your files are still here, but they are scheduled to be deleted in %s days.","app_passive_account_processing_payment_message":"We\'re processing your payment at the moment and your account will be activated as soon as it completes.","app_passive_account_processing_payment_title":"Payment is processing.","app_payment_warning_cta_label":"Update Payment Information","app_payment_warning_retry_message":"Our payment provider will retry on %s.","app_payment_warning_retry_title":"We were unable to receive your last payment.","app_payment_warning_title":"Heads up!","app_payment_warning_update_payment_information_message":"You need to update your payment details to continue your subscription.","app_payment_warning_update_payment_information_title":"We were unable to receive your last payment.","app_prompt_dialog_cancel":"Cancel","app_prompt_dialog_ok":"Okay","app_prompt_dialog_retry":"Retry","app_public_share_guest_header_button_label":"What sorcery is this?","app_public_share_party_start_video_button_label":"Welcome to put.io party. If all participants are ready, CLICK HERE to begin.","app_public_share_user_header_button_label":"Go to your files","app_ratelimit_error_action":"Contact Us","app_ratelimit_error_message":"You have been temporarily blocked for too many requests.","app_ratelimit_error_title":"Oops!","app_selectbox_default_value_label":"None","app_session_expired_action_label":"Go to Login","app_session_expired_login_message":"Session expired, please log in again to keep using put.io","app_session_expired_message":"Please log in again to keep using put.io","app_session_expired_title":"Session Expired","app_simultaneous_download_limit":"Your simultaneous transfer limit is %s","app_stranger_account_cta_label":"Activate your account","app_stranger_account_message":"put.io would love to start working for you, but needs a little commitment before it can do that.","app_stranger_account_title":"Welcome!","app_version_update_arrived":"Hey! We\'ve just shipped a new version.","app_version_update_refresh":"Can you please refresh this page to avoid unexpected problems.","auth.sign_in.title":"Sign in","auth.sign_in.forgot_password":"Forgot password?","auth.sign_in.no_account":"Don\'t have an account?","auth.sign_in.password":"Password","auth.sign_in.username":"Username or email address","auth.mfa.title":"Two-factor authentication","auth.mfa.otp.label":"Authentication code","auth.mfa.otp.instructions":"Enter the six-digit code generated by your authenticator app.","auth.mfa.recovery_code.label":"Recovery code","auth.mfa.recovery_code.instructions":"Enter one of your recovery codes.","auth.mfa.invalid_code_error":"The code you entered is invali
399d.","auth.mfa.already_enabled_error":"Two-factor authentication is already enabled for your account.","auth.mfa.not_enabled_error":"Two-factor authentication is not enabled for your account.","auth.mfa.not_enabled_error_instruction_action":"Please set up two-factor authentication to complete this action.","auth.mfa.not_enabled_error_instruction_login":"Please check your code and try again.","auth.mfa.not_enabled_error_message":"Two-factor authentication is not enabled for your account","auth.mfa.submit":"Continue","chromecast_play":"Play on Chromecast","chromecast_session_error_instruction":"Please refresh the page or restart your Chromecast and try again.","chromecast_stop":"Stop casting","chromecast_video_playback_type_label":"Chromecast video playback type","content_editable_cancel":"to cancel editing","content_editable_discard":"to discard changes","content_editable_edit":"Rename","content_editable_save":"to save","dashboard_action_download_label":"Download","dashboard_action_remove_label":"Clear","dashboard_ancienttimes":"Ancient times","dashboard_empty_message":"You will see information here once things start happening.","dashboard_empty_title":"This is your history. It\'s currently empty.","dashboard_item_detail_label":"Details","dashboard_item_error_message_title":"Error detail","dashboard_item_source_label":"Source","dashboard_lastweek":"Last week","dashboard_privateip_message":"Your private IP `%1$s` was temporarily down, we had to use `%2$s` for **%3$s**","dashboard_rss_error_message":"Error in transfer from %1$s for **%2$s**","dashboard_rss_file_deleted_message":"We had to delete **%s** per your instructions, since there wasn\'t enough free space.","dashboard_rss_pause_message":"**%s** is paused because we couldn\'t reach the source","dashboard_today":"Today","dashboard_transfer_callback_error_message":"Error in transfer callback for **%s**","dashboard_transfer_error_message":"Error in transfer **%s**","dashboard_upload_message":"You\'ve uploaded **%s**","dashboard_voucher_message":"Hey there. Welcome to put.io. We\'ve made you and **%s** friends. You can see their shares now.","dashboard_yesterday":"Yesterday","dashboard_zip_message":"You wanted to zip some files and they are ready.","extension_made_by":"made by","extensions_info":"We do not curate this list. These are apps that authenticate using our API, ranked according to their usage.","extensions_info_devs":"More than 10 weekly users needed in order to show up here. App creators: you\'re invited to edit your app\'s appeareance, or if you prefer, hide it completely.","family_delete_member_confirmation":"Are you sure to remove %s from your family?","family_delete_member_success":"%s is no longer a member of your family.","family_empty_state_message":"You can invite up to %s people to your family!","family_empty_state_title":"Your family is empty","family_join_action_label":"Join!","family_join_failure_active_user":"Your account needs to be deactivated before joining a family plan.","family_join_failure_active_user_instruction":"Please deactivate your account and try again.","family_join_failure_instruction_try_again":"Please check your code and try again.","family_join_failure_invalid_code":"Invite code is invalid.","family_join_failure_owner_not_active":"Owner of this invite code is no longer active","family_join_failure_owner_not_active_instruction":"Please contact the owner of this invite code to activate their account.","family_join_failure_owner_not_found":"We couldn\'t find the owner of this invite code","family_join_message":"Our mutual friend %s has asked you to join their family.","family_join_success":"Hooray, you\'ve joined %s\'s family!","family_join_title":"Hello %s!","family_leave_confirmation":"Are you sure to leave %s\'s family?","family_leave_failure":"Oops, we couldn\'t complete that. Try again?","family_leave_success":"You are no longer a member of %s\'s family :\'(","family_member_action_label":"Leave","family_member_disk_usage":"Using %s space","family_member_disk_usage_none":"Not using any space","family_member_message":"You are a part of our dear friend %1$s\'s family and you\'re using %2$s disk space.","fam
399ily_member_title":"Hello %s!","family_members_title":"Members","family_owner":"Family Owner","family_pagename":"Family","file_shared_by":"Shared by: %s","file_video_start_from_beginning_label":"Start from the beginning","file_video_start_from_continue_label":"Continue watching","file_video_start_from_subtitle":"Last saved timestamp for this video is %1$s of %2$s","file_video_start_from_title":"Where would you like to start?","files_abusedetected_message":"The file is not available anymore.","files_abusedetected_title":"File not found","files_action_mark_as_unwatched":"Mark as unwatched","files_action_mark_as_watched":"Mark as watched","files_action_next_episode_label":"Play next video","files_action_next_video_label":"Play next video","files_action_shared_file_clone_label":"Make a copy","files_badrequest_message":"We couldn\'t find that file","files_badrequest_title":"File not found","files_cannot_preview_download_message":"You can download it to your device to open it.","files_cannot_preview_message":"Sorry, we are not able to preview this kind of file in this app.","files_cannot_preview_size_limit_title":"This file is too big to preview (%s)","files_cannot_preview_title":"Unsupported file type","files_convert_bulk_failure_limit":"You cannot have more than %s files in your conversion queue.","files_convert_bulk_no_mp4":"These files are already in a playable format.","files_convert_bulk_success":"We have added those files to your conversion queue!","files_convert_done_label":"Completed","files_convert_error_label":"Error.","files_convert_error_notavideofile":"This file does not seem to be a video file.","files_convert_inqueue_label":"In Queue...","files_convert_message":"This video is not in a format that can be played in this app yet.\\nBut since you\'re here, we\'ll start transcoding.","files_convert_status_label":"CONVERSION STATUS","files_convert_waiting_label":"Waiting...","files_delete_children_limit_error":"There are more than %1$s files inside \'%2$s\'. We can not send them to trash.","files_delete_confirm":"Are you sure to delete those files?","files_delete_confirm_file_name":"Do you really want to delete %s?","files_delete_confirm_modal_title":["Delete file?","Delete %1$s files?"],"files_delete_confirm_warning_text":"This will PERMANENTLY delete these files. Sure you want to do that?","files_delete_confirm_warning_text_with_more":"This will PERMANENTLY delete these files and %1$s more. Sure you want to do that?","files_delete_no_permission_error":"You don\'t have permission to delete these files","files_delete_no_permission_partial_error":"You only have permission to delete %1$s of the selected %2$s files. Still OK?","files_delete_parent_limit_error":"There are more than %1$s files selected. We can not delete them.","files_delete_success":"Gone!","files_download_label":"Download (%s)","files_download_mp4_label":"Download MP4 (%s)","files_downloadlinks_modal_message":"Here you go. Please use a download manager with big downloads.","files_downloadlinks_modal_showall_label":"Show all","files_downloadlinks_modal_showmedia_label":"Show only media","files_downloadlinks_modal_showmp4_label":"Show only MP4","files_downloadlinks_modal_title":"Download links","files_emptystate_action_label":"Create folder","files_emptystate_message":"Maybe you\'d like to create a new folder?","files_emptystate_shared_message":"It looks like this folder is empty.","files_emptystate_title":"No files whatsoever!","files_error_extraction":"We couldn\'t extract these files. Please try again.","files_error_message":"Please try to refresh the page","files_error_nofileselected":"You should select something in order to do that.","files_error_title":"Oops! An error occurred","files_lost_message":"This file has gone missing. We can usually recover files, but rarely, a few are lost for good. Sorry.","files_lost_title":"We cannot find that file.","files_media_info_modal_title":"Media info","files_media_info_show_label":"Show media info","files_menu_convert_label":"Convert to MP4","files_menu_create_torrent_label":"Create torrent","files_menu_delete_label":"Delete","files_menu_downloadlinks_label":"Download links","files_menu_extractall_label":"Extract all","files_menu_label":"Actions","files_menu_mark_as_unwatched_label":"Unwatched","files_menu_mark_as_watched_label":"Watched","files_menu_move_label":"Move","files_menu_move_to_trash_label":"Trash","files_menu_newfolder_label":"Create folder","files_menu_public_share_label":"Exclusive access","files_menu_rename_label":"Rename","files_menu_rssfeed_label":"RSS feed","files_menu_share_label":"Share in put.io","files_menu_vlc_label":"VLC playlist","files_menu_zipdownload_label":"Zip & download","files_move_no_permission_error":"You don\'t have permission to move these files","files_move_no_permission_partial_error":"You only have permission to move %1$s of the selected %2$s files. Still OK?","files_move_success_message":"Something definitely moved!","files_move_to_trash_skip_confirmation":["This folder contains too many files. Would you want to delete it **PERMANENTLY**?","%1$s folders contain too many files. Would you want to delete them **PERMANENTLY**?"],"files_move_to_trash_skip_confirmation_confirm":"Delete","files_move_to_trash_skip_confirmation_title":"We couldn\'t send these files to trash","files_move_to_trash_success":"Moved them all to Trash!","files_name_already_exists_error":"This folder contains a file with that name, please try a different one.","files_name_already_exists_move_error":"This folder contains file(s) with matching name(s], please rename them and try again.","files_name_too_long_error":"Please use a name shorter than 255 characters.","files_newfolder_label":"Create folder","files_newfolder_path_not_found_error":"Invalid location. Please check the parent file and try again.","files_newfolder_success":"Here is a brand new folder for you.","files_next_video_flash_player_navigate_message":"Navigating to next video...","files_next_video_not_found":"We couldn\'t find anything to play next.","files_next_video_section_autoplay":"Autoplay","files_next_video_section_header":"Up Next","files_no_name_error":"Sorry, name can\'t be blank","files_not_reachable_message":"For updates, visit status.put.io","files_not_reachable_title":"We temporarily cannot access this file","files_notfound_action_label":"Go to your files","files_notfound_message":"We couldn\'t find that file.","files_notfound_title":"File not found","files_public_share_abuse_message_details":"The share will die if more than a certain 
399number of IP addresses access the file or if more than a certain amount of data is downloaded. It will also vanish after 72 hours.","files_public_share_abuse_message_title":"This is a public link, but it\'s not for the whole world to enjoy.","files_public_share_abuse_title":"Not gonna happen...","files_public_share_error_limit_exceeded":"You have reached the limit of your public links. You\'ll have to revoke some [here](/sharing/files) if you want to make more.","files_public_share_error_max_children_limit_exceeded":"This folder contains too many files to share.","files_public_share_error_max_children_limit_exceeded_details":"The maximum number of files for a shared folder is %1$s, and this folder contains %2$s files.","files_public_share_error_daily_total_link_count_exceeded":"You have reached the daily public link creation limit.","files_public_share_error_daily_total_link_count_exceeded_details":"The daily limit is %1$s links, and you have already created %2$s links today.","files_public_share_error_weekly_total_link_count_exceeded":"You have reached the weekly public link creation limit.","files_public_share_error_weekly_total_link_count_exceeded_details":"The weekly limit is %1$s links, and you have already created %2$s links this week.","files_public_share_error_max_size_limit_exceeded":"This folder is too big to share.","files_public_share_error_max_size_limit_exceeded_details":"The maximum size for a shared folder is %1$s, and this folder is %2$s.","files_public_share_error_missing_data":"Please make sure you fill out all the fields","files_public_share_error_not_allowed_plan":"You can not create public links with your current plan","files_public_share_error_unsupported_file_type":"This file type can not be shared","files_public_share_expired_message":"The link you are trying to access has expired and is not longer accessible.","files_public_share_expired_title":"Link has expired","files_public_share_sender_modal_title":"Just a few things before you go 👇","files_rename_label":"New file name","files_rename_success":"File renamed.","files_reset_label":"Reset video time","files_reset_startfrom_success_message":"Your place in this video was reset.","files_rootdir_name":"Your Files","files_rssfeed_no_folder_error":"You need to select at least one folder to create an RSS feed.","files_rssfeed_title":"RSS feeds for selected files","files_rssfeed_title_for_file":"RSS feeds for %s","files_rssmodal_all_label":"All","files_rssmodal_audio_label":"Audio only","files_rssmodal_mp4_label":"Video only but prefer MP4\'s","files_rssmodal_video_label":"Video only","files_save_subtitle_settings_error_message":"Something went wrong :(","files_save_subtitle_settings_success_message":"Changes successfully saved","files_saveasmp4_incurrent_success_message":"An MP4 will be created in the same folder within a minute.","files_saveasmp4_inroot_success_message":"An MP4 will be created in the root folder within a minute.","files_saveasmp4_label":"Save MP4 as a file","files_search_breadcrumb_title":"Search results for %s","files_search_emptystate_message":"We couldn\'t find anything for %s","files_search_emptystate_title":"No search result","files_search_page_title":"Search","files_select_all":"All %s selected","files_select_none":"Select all","files_select_partial":"%s selected","files_selected_label":["%2$s and %1$s other file","%2$s and %1$s other files"],"files_share_already_shared_error":"Parent is already shared","files_share_no_permission_error":"You don\'t have permission to share these files","files_share_no_permission_partial_error":"You only have permission to share %1$s of the selected %2$s files. Still OK?","files_share_success_message":"Shared!","files_shared_file_emptystate_message":"Seems like this user haven\'t shared any files with you.","files_shared_root_folder_name":"Your friends files","files_slash_in_name_error":"Name cannot contain / symbol","files_sort_date_added_label":"Date Added","files_sort_date_modified_label":"Date Modified","files_sort_name_label":"Name","files_sort_size_label":"Size","files_sort_sorted_label":"Sort by %s","files_sort_type_label":"Type","files_sort_watch_status_label":"Watch Status","files_streamlink_hls_label":"HLS link","files_streamlink_label":"Stream link","files_streamlink_mp4_label":"MP4 Stream link","files_subt
399itle_list_item_download_label":"Download","files_subtitles_addyourown_label":"Add your own","files_subtitles_empty_result_message":"We couldn\'t find subtitles for the selected language.","files_subtitles_failure_but_can_play_message":"Failed to load subtitles but we can still play the video without them. You can refresh the page to try again.","files_subtitles_fetching":"Fetching Subtitles...","files_subtitles_hide_label":"Hide","files_subtitles_nolanguageset_message":"You can select a language to search for subtitles.","files_subtitles_save_label":"Save changes","files_subtitles_settings_title":"Subtitle Languages","files_subtitles_show_label":"Show all","files_subtitles_title":"Subtitles","files_subtitles_uploading":"Uploading Subtitle...","files_text_file_loading":"Loading File Content","files_text_file_loading_failed":"We couldn\'t open that file :(","files_update_watch_status_feature_disabled_error_message":"Feature disabled","files_update_watch_status_feature_disabled_error_recovery_instruction":"Please enable this feature in the account settings to make it work!","files_update_watch_status_no_video_error":"Please select video files","files_update_watch_status_success":"Watch status updated!","files_upload_subtitle_error_message":"Oops. Could not upload. Can you try again?","files_upload_subtitle_success_message":"Those subtitles you just uploaded... They should be loaded in the player.","files_video_open_popup_player":"Open in popup window","files_vlc_error_noplayablefiles":"There are no playable files in this folder.","files_xspf_label":"VLC playlist","files_zip_zerobyte_error_message":"That file (or those files) are zero bytes long. Surely something\'s amiss!","friend_card_hover_title":"Go to %s\'s shared files","friend_card_join_date":"Joined %s","friendpicker_action_share_label":"Share","friendpicker_filter_placeholder":"Type to filter","friendpicker_modal_title":"Share files with friends","friendpicker_selectall_help":"You can share with all of your friends, including future ones.","friendpicker_selectall_label":"Share with all friends","friendpicker_selectpartial_label":"Share with selected friends","generic_contact_support_action_label":"Start a chat","generic_contact_support_error":"Please get in touch with us.","generic_error_402_message":"Please activate your account and try again.","generic_error_503_message":"We are having issues with this feature right now, please try again later. You can check our [status page](http://status.put.io) for the updates.","generic_error_503_title":"Service unavailable","generic_error_cta_retry":"Try Again","generic_error_go_back_label":"Go back","generic_error_known_unknown_description":"Please try again, and contact support if the issue persists.\\n%s","generic_error_known_unknown_title":"Something went wrong","generic_error_message":"Please try again later.","generic_error_title":"We couldn\'t make it work","generic_error_unknown_unknown_description":"We are truly sorry for that, and notified our team about the issue.\\n%s","generic_error_unknown_unknown_title":"Something went exceptionally wrong","generic_go_back":"Go back","generic_learn_more":"Learn more","generic_network_error_message":"Please check your internet connection and try again.","generic_network_error_title":"Network error","generic_revoke_all_label":"Revoke all","generic_revoke_label":"Revoke","generic_save_button_label":"Save","generic_submit_button_label":"Submit","generic_continue_button_label":"Continue","go_back_to_putio":"Return to put.io","go_to_putio":"Go to put.io →","history_disable_confirm":"Disabling history will also clear your current activities. Are you sure?","invitation_create_failure":"We couldn\'t create an invitation. Can you please try again?","invitation_create_label":"Create Invitation","invitation_create_limit_exceeded_error":"Seems like you\'ve already created all of your invitations.","invitation_create_request":"Creating...","invitation_create_success":"Your invitation is ready!","invitation_empty_state_action_label":"Create Invitation","invitation_links_title":"Invitations","invite_friends_dialog_friend":"Friend","invite_friends_dialog_take_this":"ಠ_ಠ... Here, take this: ","invite_friends_dialog_torrenting_is_awesome":"Torrenting with put.io is awesome!","invite_friends_dialog_why_pay":"Yeah? Why should I pay for something free?","invite_friends_dialog_you":"You","invite_friends_earned_amount":"You’ve earned: $%s","invite_friends_invite_create_label":"Create a trial pass (%1$s of %2$s)","invite_friends_invite_created":"Trial pass created!","invite_friends_joined_friends_title":"Friends who joined the party","invite_friends_link_list_title":"Trial Passes","invite_friends_motivation_message":"Treat your friends to a **free** month of put.io, and get **$9.99 credit** for each of them who stay.","invite_friends_page_title":"put.io hands together and help us!","invite_friends_pagename":"Invite your friends!","invite_friends_reminder_account_activity":"Your trial passes will only work if your account is active.","invite_friends_reminder_credit_card":"We\'ll ask your friends for their credit card info, but we won\'t charge them for 30 days.","invite_friends_reminder_credit_card_subtitle":"And even after we do, we promise to refund if they meant to cancel but forgot.","invite_friends_reminder_title":"Heads up!","invite_friends_status_converted":"Decided to stay. YAY!","invite_friends_status_in_trial":"Joined %s. Trialing.","invite_friends_status_trial_ended":"Trial ended.","invite_friends_status_trial_not_started":"Joined %s but hasn\'t started yet.","invites_desciption_1":"Here are some links that you can give out to your friends. They can try put.io for a month without any payment. We have a limited number of invites, so please consider friends who will benef
399it most from put.io.","invites_desciption_2":"Only a few, familiar customers are getting these invites. Please tell us if you genuinely need more.","invites_empty_state_title":"No vouchers whatsoever","invites_pagename":"Set your friends up with some FREE put.io!","legal_about_title":"About put.io","legal_dmca_policy_title":"DMCA policy","legal_libraries_title":"Libraries we use in %s","legal_privacy_policy_title":"Privacy policy","legal_terms_of_service_title":"Terms of service","link_device_action_label":"Link","link_device_description":"Enter the code shown on your device to link it to your put.io account.","link_device_error_message":"Please check the code and try again.","link_device_input_label":"Activation code","link_device_success_message":"You have successfully connected to %s","link_device_title":"Link your account","menu_account":"Account","menu_dashboard":"History","menu_extensions":"Extensions","menu_rssfeed":"RSS Automation","menu_settings":"Settings","menu_sharing":"Sharing","menu_transfers":"Transfers","menu_trash":"Trash","menu_yourfiles":"Your Files","network_error_action":"Refresh","network_error_message":"Please make sure you have a stable network connection and refresh the page.","network_error_title":"Network Error","non_existent_userfile_tip":"This file has been deleted.","notfound_page_action":"Go to Your Files","notfound_page_message":"The page or content you\'re looking for is not found","notfound_page_title":"404","oauth_app_callback_help":"Multiple URLs can be used by seperating them with newlines.","oauth_app_callback_label":"Callback URL","oauth_app_create_success_message":"Yaay, \\"%s\\" is here!","oauth_app_delete_label":"Delete","oauth_app_desc_help":"The description will be visible during authorization. 10 - 255 characters.","oauth_app_desc_label":"Description","oauth_app_hide_label":"Don\'t show in Extensions page","oauth_app_icon_label":"Application icon","oauth_app_name_label":"Application name","oauth_app_new_error_callback_too_long":"Application callback URL is too long (> 255 characters)","oauth_app_new_error_desc_too_short":"Application description is too short (< 10 characters)","oauth_app_new_error_name_too_short":"Application name is too short","oauth_app_new_error_same_name":"We have an application with the same name already.","oauth_app_new_error_website_too_long":"Application website URL is too long (> 255 characters)","oauth_app_new_pagename":"Create app","oauth_a
399pp_secrets_client_id_label":"Client ID","oauth_app_secrets_pagename":"Secrets for %s","oauth_app_secrets_secret_help":"Your application\'s secret. Please keep this in a safe place.","oauth_app_secrets_secret_label":"Client secret","oauth_app_secrets_token_help":"This is your own user\'s token for your application.","oauth_app_secrets_token_label":"OAuth token","oauth_app_secrets_token_regenerate":"Regenerate","oauth_app_secrets_token_regenerate_success":"We generated a new token for you. Keep it safe!","oauth_app_show_secrets_label":"Show secrets","oauth_app_update_success_message":"You have updated \\"%s\\".","oauth_app_web_site_help":"Users will see this during authorization.","oauth_app_web_site_label":"Application website","oauth_apps_authorizations":"Authorizations","oauth_apps_authorizations_label":"Applications you gave access to","oauth_apps_clients":"Active Logins","oauth_apps_clients_deleted_app":"Deleted App","oauth_apps_clients_description":"Your active logins","oauth_apps_clients_last_used_at":"Last used %s","oauth_apps_clients_not_used_yet":"Not used yet","oauth_apps_clients_show_less":"Show less ↑","oauth_apps_clients_show_more":"Show more ↓","oauth_apps_delete_confirm_message":"Are you sure to delete your application \\"%s\\"?","oauth_apps_delete_success_message":"Gone!","oauth_a
399pps_emptystate_action_label":"Create One","oauth_apps_emptystate_title":"You don\'t have any OAuth apps registered","oauth_apps_new_label":"Create app","oauth_apps_pagename":"OAuth Apps","oauth_auths_active_sessions_label":["%s session","%s sessions"],"oauth_auths_description_message":"You can revoke access to any of them unless you are the developer :)","oauth_auths_description_title":"These are the apps that you authorized via put.io API.","oauth_auths_no_item_message":"No api apps","oauth_auths_revoke_all_label":"Revoke all","oauth_auths_revoke_cancel_label":"Keep sessions","oauth_auths_revoke_confirm_label":"Revoke sessions","oauth_auths_revoke_confirm_message":"Are you sure to revoke the access to %s?","oauth_auths_revoke_label":"Revoke","oauth_auths_revoke_other_sessions_confirm_label":"Confirm","oauth_auths_revoke_other_sessions_message":"Would you like to sign out from all other devices?","oauth_auths_revoke_success_message":"Access revoked.","oauth_clients_description":"These are sessions that you authorized via put.io API. You can close any session you authorized unless you are the developer of related app.","payment_activate_account_error":"You need to activate your account to use this feature!","payment_bitcoin_cancel_no_invoice_error":"There is no such invoice","payment_change_activate_account_title":"Activate your account","payment_change_inactive_subscription_error":"You current subscription is inactive. Please stop current subscripton and start a one.","payment_change_insufficient_disk_space":"You need to open up %s free space before downgrading to that plan.","payment_change_pending_upgrade_message":"There is a pending upgrade, please check your email to approve. If you did not do this change, let us know.","payment_change_period_title":"Change your period","payment_change_plan_title":"Change your plan","payment_change_provider_error":"Something went wrong on payment provider service","payment_change_success_message":"Ahoy! Its done","payment_change_subscription_to_onetime_not_allowed_error":"You need to cancel your subscription first, then you can start a prepaid plan.","payment_change_swtich_to_subs_title":"Switch to Recurring Payments","payment_change_unknown_error_message":"Unknown error occurred!","payment_change_unknown_provider_error":"Can not recognize payment provider","payment_change_up_down_title":"Upgrade or downgrade","payment_confirm_action_label":"Confirm","payment_confirm_amount_charged_label":"Amount charged","payment_confirm_amount_refund_label":"Amount to be refunded","payment_confirm_amount_to_charged_label":"Amount to be charged","payment_confirm_cancel_label":"Cancel","payment_confirm_convert_remaining_days_message":"The remaining %1$s days on your current plan, will become %2$s days on your new plan. No payment will be necessary!","payment_confirm_expire_in_label":["%1$s day (%2$s)","%1$s days (%2$s)"],"payment_confirm_new_period_days":["%s day","%s days"],"payment_confirm_new_product_label":"New Plan Name","payment_confirm_no_remaining_days_message":"This unfortunately brings your remaining days to 0. Your account will be suspended at the end of the day.","payment_confirm_old_remaining_days":["%s day","%s days"],"payment_confirm_result_title":"Ahoy! Its done","payment_confirm_title":"Please confirm","payment_confirm_trial_subscription_amount":"Free for %1$s days, then $%2$s","payment_confirm_will_expire_label":"Will Expire In","payment_checkout_provider_load_error":"We couldn\'t load the payment form. Please try again.","payment_checkout_start_error":"We couldn\'t start checkout.","payment_default_link_cancelled_message":"You closed the payment checkout.","payment_default_link_cancelled_title":"Checkout closed","payment_default_link_failure_message":"Could not open the payment checkout.","payment_default_link_failure_title":"Payment checkout could not open","payment_default_link_missing_transaction_message":"This payment link is missing a transaction id.","payment_default_link_missing_transaction_title":"Payment link is incomplete","payment_default_link_ready_message":"Opening payment checkout...","payment_default_link_success_message":"Your payment was completed.","payment_default_link_title":"Payment checkout","payment_coupon_no_longer_available_error":"Coupon no longer available","payment_coupon_not_found_error":"Invalid coupon code","payment_coupon_wrong_plan":"Wrong plan for this coupon code","payment_error_generic":"Something went wrong :(","payment_paddle_billing_cancel_error":"We couldn\'t cancel your subscription.","payment_paddle_billing_change_plan_error":"We couldn\'t change your subscription.","payment_paddle_billing_invoice_not_available_error":"Invoice is not available for this payment.","payment_paddle_billing_invoice_not_found_error":"Cannot find an invoice for this payment.","payment_paddle_billing_invalid_coupon_error":"This coupon is not val
399id for this payment.","payment_paddle_billing_subscription_payment_declined_error":"Your payment was declined. Please update your payment information and try again.","payment_paddle_billing_subscription_canceled_error":"This subscription is already canceled.","payment_paddle_billing_subscription_not_found_error":"Cannot find a subscription for this account.","payment_expiresin_label":"Expires in","payment_expiresin_value":["%1$s day (%2$s)","%1$s days (%2$s)"],"payment_extend30":"Extend 30 days","payment_extend365":"Extend 365 days","payment_family_member_not_allowed_error":"You need to leave your family to activate your account.","payment_family_not_allowed_error":"Casual plan is not allowed to use with family.","payment_history_hide":"Hide payment history","payment_history_invoice_action_label":"View invoice","payment_history_show":"Show payment history","payment_history_table_amount":"Amount","payment_history_table_date":"Date","payment_history_table_id":"ID","payment_history_table_invoice":"Invoice","payment_history_table_plan":"Plan","payment_history_table_type":"Type","payment_history_title":"Payment History","payment_method_credit_card":"Credit Card","payment_method_credit_card_update":"Update card information","payment_method_hosted_checkout_redirect":"Redirecting you to the payment page...","payment_method_label":"Payment Method","payment_method_modal_action_label":"Select","payment_method_modal_contact_message":"If you can’t see your preferred payment method here, let us know!","payment_method_modal_title":"How would you like to pay?","payment_method_update_success_message":"Payment information updated.","payment_missing_information_error":"Please update payment information first.","payment_next_billing_date_label":"Next Billing Date","payment_not_enough_days_error":"There are not enough days left to change your plan","payment_pagename":"Billing","payment_period_label":"Payment period","payment_period_monthly_label":"Pay monthly","payment_period_trial_label":"Trial","payment_period_yearly_label":"Pay yearly","payment_plan_change_error":"We couldn\'t change your plan","payment_plan_change_same_plan_action_label":"View other plans","payment_plan_change_same_plan_description":"Your current subscription is already active. Choose another plan if you want to make a change.","payment_plan_change_same_plan_error":"You\'re already subscribed to this plan.","payment_plan_label":"Plan","payment_plan_not_found_error":"Cannot recognize provided plan code","payment_plans_action_choose_label":"Choose","payment_plans_current_plan_label":"Current plan","payment_plans_downgrade_label":"Downgrade","payment_plans_name_label":"Name","payment_plans_price_label":"Price","payment_plans_storage_label":"Storage Space","payment_plans_torrent_slot_label":"Torrent Slots","payment_plans_trial_subscription_description":"for %1$s days, then %2$s %3$s","payment_plans_trial_subscription_setup":"Continue setting up your subscription","payment_plans_trial_subscription_title":"👉 ✅ FREE! ✅ 👈","payment_plans_upgrade_label":"Upgrade","payment_refund_period_expired_error":"Oops, we couldn\'t change your plan because refund period is expired. Please contact us.","payment_sub_upgrade_downgrade_warning":"If you\'re upgrading or changing between monthly/yearly, you may be charged after confirming this change.","payment_subs_action_change_default":"Change","payment_subs_action_change_monthly":"Switch to yearly","payment_subs_action_change_yearly":"Switch to monthly","payment_subs_cancel_cancel_label":"Go back","payment_subs_cancel_confirm_label":"Yes, cancel","payment_subs_cancel_confirmation_message":"Are you sure to cancel your subscription?","payment_subs_cancel_not_found_error":"Can not find a subscription to cancel.","payment_subs_cancel_trial_confirmation_message":"If you cancel now, your account will be **deactivated immediately**. Are you sure you want to give up **%s days of trial**?","payment_subs_create":"Start subscription","payment_subs_monthly_label":"Monthly (%s days)","payment_subs_stop":"Cancel subscription","payment_subs_yearly_label":"Yearly (%s days)","payment_success_message":"Payment c
399onfirmed!","payment_trial_error":"Trial plans can be used only once. Please contact us if you\'ve cancelled unintentionally.","payment_type_label":"Payment type","payment_type_onetime_label":"Prepaid","payment_type_subs_cancelled_label":"Subscription (Cancelled)","payment_type_subs_label":"Subscription","payment_up_down_label":"Upgrade or downgrade","payment_upgrade_confirmation_invalid_error":"Confirmation code is invalid","payment_upgrade_confirmation_loading_label":"Processing...","payment_upgrade_confirmation_not_found_error":"Confirmation code is either invalid or expired.","payment_voucher_redeem":"Redeem Voucher","payment_voucher_redeem_action":"Redeem","payment_voucher_redeem_code_not_found":"This is not a valid voucher code.","payment_voucher_redeem_code_used":"This voucher code has already been used.","payment_voucher_redeem_no_subs_error":"Voucher codes only work on prepaid plans.","payment_voucher_redeem_success_message":"Voucher code applied successfully","payment_voucher_redeem_title":"Use voucher code","player_audio_label":"Audio","player_buffering":"Buffering","player_control_fullscreen":"Fullscreen","player_control_fullscreen_exit":"Exit fullscreen","player_control_mute":"Mute","player_control_pause":"Pause","player_control_pip":"Picture in picture","player_control_pip_exit":"Exit picture in picture","player_control_play":"Play","player_control_seek":"Seek","player_control_seek_back":"Back 10 seconds","player_control_seek_forward":"Forward 30 seconds","player_control_unmute":"Unmute","player_control_volume":"Volume","player_error_message":"Playback failed. You can switch back to the default player from Settings.","player_speed_label":"Playback speed","player_subtitles_label":"Subtitles","player_subtitles_off":"Off","player_time_of":"%s of %s","app_specific_passwords":"App-specific passwords","app_specific_passwords_create_cta":"Create one","app_specific_passwords_create_note_placeholder":"Write a note to remember what this password is for","app_specific_passwords_create_title":"Create an app-specific password","app_specific_passwords_description":"You can use app-specific passwords to authorize various apps to access your account.","app_specific_passwords_empty_description":"You can create one to authorize various apps to access your account.","app_specific_passwords_empty_title":"You don\'t have active app-specific passwords.","app_specific_passwords_revoke_all_confirm":"Are you sure you want to revoke all app-specific passwords?","app_specific_passwords_revoke_all_success":"All passwords revoked!","app_specific_passwords_revoke_confirm":"Are you sure you want to revoke %s?","app_specific_passwords_revoke_success":"Password revoked!","app_specific_passwords_view_cta":"Okay!","app_specific_passwords_view_description":"Here\'s a password for %s and it won\'t be shown again. Please keep it in a safe place.","app_specific_passwords_view_title":"Your app-specific password is ready!","route_settings_change_route_success":"You have changed your proxy!","route_settings_help":"Your files will pass through servers in this location when you stream or download.","route_settings_speed_test_start":"Speed Test","route_settings_speed_test_status_download_speed_label":"Download speed:","route_settings_speed_test_status_error_message":"Speed test failed!","route_settings_speed_test_status_starting_message":"Starting...","route_settings_speed_test_status_title":"Speed Test","route_settings_speed_test_status_waiting_message":"Waiting...","route_settings_speed_test_stop":"Stop","route_settings_speed_test_testing":"Connecting","route_settings_title":"Choose your proxy","saveto_action_active_label":"Use current folder","saveto_action_change_label":"Change","saveto_action_root_label":"Use root folder","saveto_label":"Saving to","saveto_loading_label":"Loading...","searchbar_placeholder":"Type to search","settings_callbackurl_title":"Configure callback URL","settings_form_callbackurl_help":"Every time a transfer finishes we will send a POST request encoded as `application/x-www-form-urlencoded` to this URL with the details.","settings_form_c
399allbackurl_label":"Callback URL","settings_form_defaultdownload_help":"Your new transfers will be saved into this folder.","settings_form_defaultdownload_label":"Choose your default download folder","settings_form_defaultsubtitle_help":"We will try to find subtitles matching these languages from <a href=\\"https://www.opensubtitles.com\\" target=\\"_blank\\">OpenSubtitles</a>.","settings_form_defaultsubtitle_label":"Subtitle languages","settings_form_dont_autoselect_subtitles_label":"Do not select subtitles by default","settings_form_error_default":"Something went wrong :(","settings_form_error_invalid_callback_url":"Invalid callback URL.","settings_form_error_invalid_no_active_download_host":"The torrent client we promised to use for your private torrents is not online.","settings_form_error_invalid_pushover_token":"This is not a correct Pushover token.","settings_form_fluid_layout_help":"Choose between fixed (max. %1$s) and fluid (%2$s) layout.","settings_form_fluid_layout_label":"Application layout","settings_form_history_help":"The History menu item will be removed and activities will not be recorded. Keep this active if you think you might need the source links of previous transfers later.","settings_form_history_label":"Log activities on the History page","settings_form_invisible_help":"You won\'t appear on the user searches.","settings_form_invisible_label":"Become invisible","settings_form_login_emails_help":"We will send you an e-mail if you authorize an application or log in from a new device.","settings_form_login_emails_label":"Get alerts about your account activity","settings_form_magnethandler_help":"This will work only in <a href=\\"https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler#browser_compatibility\\" target=\\"_blank\\">supported browsers.</a>","settings_form_magnethandler_label":"Make put.io your default magnet link handler","settings_form_nextepisode_help":"If we sense there are more audio or video files like the one you\'re enjoying, we try to find and suggest the next one.","settings_form_nextepisode_label":"Suggest playing the next media","settings_form_player_engine_jwplayer":"JW Player","settings_form_player_engine_shaka":"Shaka","settings_form_player_engine_videojs":"Default (video.js)","settings_form_player_help":"The engine used to play your videos. Try a different one if you\'re experiencing playback or buffering issues.","settings_form_player_label":"Video player engine","settings_form_privateip_label":"Use a fixed IP with private trackers","settings_form_pushover_help":"\\"<a href=\\"https://pushover.net\\" target=\\"_blank\\">Pushover</a>\\" is a service that can send push notifications to your devices.","settings_form_pushover_label":"Pushover token","settings_form_remembervideoplace_label":"Remember current place in video files","settings_form_save_success":"Changes successfully saved","settings_form_show_subtitles_label":"Show subtitles","settings_form_sort_files_help":"Your files will be sorted by this rule unless you set a specific sort setting for each folder.","settings_form_sort_files_label":"Default sort option","settings_form_sort_files_reset_label":"Restore all file specific sort settings to default","settings_form_trash_help":"If you disable this, your files will be deleted permanently. Otherwise, we\'ll keep them for 14 days.","settings_form_trash_label":"Move deleted files to trash","settings_pushover_title":"Configure Pushover token","sharing_files_configure":"Configure","sharing_files_empty":"You\'re not sharing any files with your put.io friends.","sharing_files_share":"Share","sharing_files_sharedwith_all":"Shared with all of your friends.","sharing_files_sharedwith_partial":["Shared with %s friend.","Shared with %s friends."],"sharing_files_title":"Files shared with put.io friends","sharing_files_unshare":"Unshare","sharing_friend_delete_confirm_label":"Unfriend","sharing_friend_delete_confirm_message":"Are you sure to unfriend %s?","sharing_friend_delete_success_message":"Your friendship deleted!","sharing_friend_description_sharing_each_other":"Sharing files with each other.","sharing_friend_description_sharing_with_them":"Sharing files with them.","sharing_friend_description_sharing_with_you":"Sharing files with you.","sharing_friendlist_incoming_title":"Friendship requests","sharing_friends_pagename":"Friends","
399sharing_links_revoke_confirmation":"Are you sure to revoke this link?","sharing_links_revoke_error":"Couldn\'t revoke the link, please try again.","sharing_links_revoke_label":"Revoke","sharing_links_revoke_success":"Link is revoked.","sharing_links_title":"Files shared with special people","sharing_pagename":"Sharing","sharing_public_links_created_at":"Created at %s","sharing_public_links_empty":"You don\'t have any shared links.","sharing_public_links_expires_in":"Expires at %s","sharing_search_result_empty":"We couldn\'t find any users with that name.","sharing_search_title":"Search for other put.io users","sharing_unshare_confirm_message":"Are you sure to unshare this file?","sharing_unshare_success":"File unshared!","sharing_user_action_add":"Add as a friend","sharing_user_action_add_status":"Request sent","sharing_user_action_approve":"Approve","sharing_user_action_delete":"Delete","sharing_user_action_deny":"Deny","sharing_user_action_remove":"Unfriend %s","speedtest_desc1":"Our servers and all your files are in Netherlands. Sometimes due to strange peering agreements or saturation on international exchanges, the download speeds are not as great as we want them to be from everywhere in the world.","speedtest_desc2":"We have purchased 
399servers around the world in order to battle with this problem. If you choose an alternate route, a server located in that region downloads your content from Netherlands and serves it directly to you with speeds hopefully higher than your direct download speeds.","speedtest_desc3":"put.io will remember this setting.","speedtest_desc_title":"About choosing your proxy","sub_addnew_title":"Add RSS feed","sub_create_error_invalid_url_message":"Invalid URL","sub_create_label":"Add RSS feed","sub_create_success_message":"RSS feed is added!","sub_form_defaultdownload_help":"Downloads for this feed will be placed into this folder.","sub_form_defaultdownload_title":"Download folder","sub_form_deleteoldfiles_title":"If I run out of space, make room by deleting the oldest files in the download folder PERMANENTLY. BEWARE! This is powerful.","sub_form_keywords_help":"Case insensitive. Separate with commas (,) Examples: 720p,jazz,mp3 Use ampersand (&) for AND operator. Example: foobar&720p","sub_form_keywords_title":"Download items with titles that contain these words","sub_form_negativekeywords_help":"Case insensitive. Separate with commas (,) Examples: 720p,jazz,mp3 Use ampersand (&) for AND operator. Example: foobar&720p","sub_form_negativekeywords_title":"Never transfer items with titles that contain these words","sub_form_oldfiles_title":"Don\'t process the current feed, only transfer new items.","sub_form_title_help":"So you can remember it later.","sub_form_title_title":"Display name","sub_form_url_help":"You can give us an RSS feed containing torrents or files.","sub_form_url_title":"URL of the RSS feed","sub_logs_item_failed":"Failed to process %s.","sub_logs_item_processed_at":"Processed %s.","sub_logs_pagename":"%s\'s logs","sub_update_label":"Update RSS Feed","sub_update_success_message":"RSS feed updated","subs_delete_confirm":"Are you sure to delete this RSS feed?","subs_delete_success":"Gone!","subs_emptystate_action_label":"Add a new RSS feed","subs_emptystate_message":"If you don\'t know where to start, just google \\"RSS torrents\\". You\'ll see the light.","subs_emptystate_title":"No watched RSS feeds whatsoever","subs_inactive_account_message":"Please activate your account to manage your RSS feeds","subs_item_last_failed":"Failed %s","subs_item_last_fetched":"Last fetched %s.","subs_item_last_paused":"Paused %s.","subs_logs_emptystate_message":"This place will be full of them when we get updates from this feed.","subs_logs_emptystate_title":"There are no logs to show","subs_new_label":"Add a new RSS feed","subs_notfound_error":"RSS feed not found","subs_pagename":"RSS Automation","task_download_links_concurrent_limit_error":"You exceeded concurrency limit of download links.","task_download_links_error":"Sorry. We could not get download links for these files.","task_download_links_message_done":"Your download links are ready. Please consider using a download manager for consistency.","task_download_links_message_new":"Preparing download links","task_download_links_title_done":"View Download Links for %1$s","task_download_links_title_error":"Couldn\'t Create Download Links for %1$s","task_download_links_title_new":"Creating Download Links...","task_download_links_too_many_children_error":"Files you selected have too many children to generate download links.","task_download_links_too_many_files_error":"You selected too many files for generating download links.","task_extraction_password_prompt_label":"Please enter the password","task_extraction_password_prompt_placeholder":"Password","task_extraction_status_done":"Done","task_extraction_status_extracting":"Extracting","task_extraction_status_in_queue":"In queue","task_extraction_status_new":"Sending","task_extraction_status_partially_done":"Partially Done","task_extraction_status_password_incorrect":"Password incorrect","task_extraction_status_password_obtained":"Password obtained","task_extraction_status_password_required":"Password required","task_extraction_title_done":"All files extracted","task_extraction_title_error":"Error","task_extraction_title_new":"Ready to extract","task_extraction_title_running":"Extracting...","task_shared_file_clone_concurrent_limit_error":"You exceeded concurrency limit to copy to your disk.","task_shared_file_clone_error":"Sorry. We could not copy these files to your disk.","task_shared_file_clone_message_done":"Files are copied to your disk successfully","task_shared_file_clone_message_new":"Copying \\"%1$s\\" to your disk...","task_shared_file_clone_location_selector":"Select location to copy %s","task_shared_file_clone_title_done":"Go to copied files","task_shared_file_clone_title_error":"Couldn\'t copy \\"%1$s\\" to your disk","task_shared_file_clone_title_new":"Copying...","task_shared_file_clone_too_many_files_error":"You selected too many files to copy to your disk.","task_upload_chunk_error_message":"Upload failed, please try again.","task_upload_size_bigger_than_disk_avail_message":"This file is larger than your remaining storage space.","task_upload_error_402_message":"Please activate your account to be able to upload files.","task_upload_error_429_message":"Too many requests, please re-upload in a few minutes.","task_upload_error_torrent_file_count_message":"This torrent has %2$s files. A transfer can include at most %1$s files.","task_upload_error_torrent_size_message":"This torrent is %2$s. A transfer can be at most %1$s.","task_upload_expired_error_message":"This upload is expired.","task_upload_title_done":["File uploaded","%1$s files uploaded"],"task_upload_title_none":"No active uploads","task_upload_title_running":"Uploading...","task_zip_error_missing_files_title":"Here\'s the list of missing files:","task_zip_message_done":"Please use a download manager, browsers are terrible at resuming broken downloads. Also applications monitoring your network traffic like some antivirus or firewall software may corrupt the zip file.","task_zip_message_error":"Sorry. We can\'t find some of the files in your selection. Re-fetching the torrent that brought them should fix this problem. Our apologies.","task_zip_message_new":"Preparing the package","task_zip_message_running":"Preparing the package","task_zip_title_done":"Download as zip","task_zip_title_error":"Couldn\'t Create the Package","task_zip_title_new":"Creating Package...","task_zip_title_running":"Creating Package...","tasks_clear_completed_label":"Clear completed","tasks_hide_tasks_label":"Hide tasks","tasks_show_tasks_label":"Show tasks","timeout_error_message":"Your request has t
399imed out","timeout_error_title":"Timeout Error","transfer_error_file_count_limit_message":"This transfer has more files than the %s file limit.","transfer_error_size_limit_message":"This transfer is larger than the %s limit.","transfer_error_too_many_pieces_message":"This torrent has too many pieces.","transfer_add_error_already_added":"You have already added a transfer for that source.","transfer_add_error_empty_url":"Empty URL, seems like you haven\'t provided a URL or magnet link.","transfer_add_error_invalid_torrent":"File is not a valid torrent file.","transfer_add_error_limit_reached":"You have reached your simultaneous transfer limit.","transfer_add_error_parent_not_a_folder":"We couldn\'t add this transfer because target file is not a folder.","transfer_add_error_parent_not_found":"We couldn\'t add this transfer because the target folder is deleted.","transfer_add_error_too_many_urls":"You can\'t add more than 100 URLs at once.","transfer_add_error_unsupported_uri_scheme":"We need URLs or magnet links to add transfers.","transfer_add_full_error_title":"We couldn\'t add your transfers.","transfer_add_multi_error_title":"We couldn\'t add those transfers 😔","transfer_add_partial_error_title":"We couldn\'t add some of your transfers.","transfer_add_single_error_title":"We can\'t download that 😔","transfers_availability":"availability: %s","transfers_cancel_cancel_action_label":"WAIT!","transfers_cancel_confirm_action_label":"100% Sure","transfers_cancel_confirm_message":["Are you sure you want to cancel that?","Are you sure you want to cancel selected %s transfers?"],"transfers_cancel_confirm_with_seeding":["That transfer is still seeding. Are you sure you want to cancel?","%1$s of %2$s transfers are still seeding. Are you sure you want to cancel all?"],"transfers_cancel_selected_label":"Cancel selected","transfers_clear_all_confirm_message":"Are you sure you want to clear the finished transfers?","transfers_clear_finished_label":"Clear completed","transfers_downloaded":"downloaded: %1$s of %2$s","transfers_empty_state_action_label":"New transfer","transfers_empty_state_message":"You can add some by clicking the button below.","transfers_empty_state_title":"No transfers whatsoever","transfers_error_message":"Please try to refresh the page.","transfers_error_notranferselected":"You should select something in order to do that.","transfers_error_title":"Oops! An error occurred","transfers_gotofile_label":"Go to file","transfers_info_label":"Info","transfers_item_error_label":"Error","transfers_live_stream_recording_time":"Recording live footage: %s","transfers_live_stream_stop_recording":"Stop Rec","transfers_no_peers":"No peers","transfers_peer_count":["%s peer","%s peers"],"transfers_playlist_download_count":"Downloaded: %1$s of %2$s","transfers_playlist_download_status":"Downloading...","transfers_ratio":"ratio: %s","transfers_reannounce_error_message":"Could not send reannounce request. Can you try again?","transfers_reannounce_error_not_active":"Could not send reannounce request. Torrent is inactive.","transfers_reannounce_error_not_torrent":"Sorry. We can only reannounce torrents.","transfers_reannounce_label":"Re-announce","transfers_reannounce_success_message":"Okay. We\'ll reannounce","transfers_retry_error_message":"Could not send retry request.","transfers_retry_error_not_error":"There is no error.","transfers_retry_label":"Retry","transfers_retry_success_message":"Okay. We\'ll retry","transfers_seed_ratio":"seeded: %1$s of %2$s","transfers_seed_time":"seed time: %s","transfers_seeded_for":"seeded for: %s","transfers_sort_date_added_label":"Date added","transfers_sort_downloaded_label":"Downloaded","transfers_sort_eta_label":"ETA","transfers_sort_label":"Sort by %s","transfers_sort_name_label":"Name","transfers_sort_peers_label":"Peer Count","transfers_sort_ratio_label":"Ratio","transfers_sort_status_label":"Status","transfers_sort_uploaded_label":"Uploaded","transfers_source_label":"Source","transfers_status_message_completed":"Completed","transfers_status_message_error":"Error","transfers_status_message_finishing":"Finishing...","transfers_status_message_in_queue":"In queue...","transfers_status_message_preparing_to_download":"Waiting for torrent details from the network...","transfers_status_message_preparing_to_seed":"Preparing to seed... Please do not delete/move your selected files.","transfers_status_message_seeding":"Finished & Seeding","transfers_status_message_waiting":"Waiting...","transfers_status_waiting_for_c
399omplete_queue":"Waiting to complete...","transfers_status_waiting_for_downloader":"Waiting for the selected private torrent host... If unavailable, a random host will be chosen shortly.","transfers_stop_recording_cancel_label":"Keep going","transfers_stop_recording_confirm_label":"Stop recording","transfers_stop_recording_confirm_message":["Are you sure to stop recording \\"%s\\"?","Are you sure to stop recording %s transfers?"],"transfers_uploaded":"uploaded: %1$s of %2$s","trash_action_confirm":"Are you sure to permanently delete those files?","trash_delete_success":"Aaaand they\'re gone!","trash_disable_confirm":"Disabling trash will empty your trash first. Are you sure?","trash_empty_label":"Empty Trash","trash_error_file_not_found":"File not found","trash_error_file_not_found_recovery_suggestion":"Please refresh the page and try again.","trash_error_restore_too_many_files":"You can\'t restore more than %s files at once.","trash_error_restore_too_many_files_recovery_suggestion":"Please select fewer files.","trash_error_lock_timeout":"There is another ongoing trash operation.","trash_error_still_in_progress":"We are still working on sending these files to trash.","trash_error_generic_recovery_suggestion":"Please try again later.","trash_file_deleted_at":"Deleted %s","trash_file_expires_on":"Expires on %s","trash_info":"Heads up: Files in trash have an expiry date of 14 days.","trash_menu_delete_label":"Delete","trash_menu_label":"Actions","trash_menu_restore_label":"Restore","trash_no_files_message":"When you send files to trash, we keep them here for 14 days.","trash_no_files_title":"Your trash is empty","trash_restore_failure":"Couldn\'t restore files, please try again","trash_restore_started_message":"It may take a long time if there are too many files.","trash_restore_started_title":"Restore started!","trash_restore_success":"Aaaand they\'re back!","trash_total_size":"Using %1$s","ui.form.submit":"Submit","ui.form.validators.required":"This field is required.","ui.tooltip.hide_password":"Hide password","ui.tooltip.show_password":"Show password","upload_100_plus_files_cancel_label":"Cancel","upload_100_plus_files_confirm_label":"Keep going","upload_100_plus_files_confirm_message":"Are you sure to upload %s files?","upload_action_label":"New transfer","upload_fold_label":"Cancel","upload_fromlink_label":"Paste link","upload_fromlink_title":"Paste links","upload_hash_error":"Some of the hashes couldn\'t add","upload_invalid_source_error":"Couldn\'t find anything to transfer there. \\n We accept torrent hashes, magnet links, links to torrents and s
399ome video page links.","upload_magnet_help":"Paste torrent links, magnet links, direct links or links to video pages from popular video sites.","upload_magnet_message":"Make put.io the default application when you click on a magnet link.","upload_no_link_error":"There is no link","upload_saveto_label":"Download folder","upload_size_error":"That file or those files are zero bytes long. Surely something\'s wrong!","upload_start_label":"Add transfers","upload_transfer_start_message_full_error":"We\'re unable to add transfers, please check links and try again.","upload_transfer_start_message_success":"Your transfers have been started.","upload_upload_label":"Upload file","upload_upload_selectfile_help":"Choose a file or files from your computer","upload_upload_selectfile_label":"Browse for files","upload_upload_title":"Upload files","usage_label":"%1$s of %2$s used","usage_label_optimistic":"%1$s of %2$s free","validators_length_between":"Must be between %1$s and %2$s characters.","validators_length_exact":"Must be exactly %1$s characters.","validators_required":"This field is required.","video_playback_type_hls":"HLS (default)","video_playback_type_label":"Video playback type","video_playback_type_mp4":"MP4","videojs_subtitle_off":"turn off","videojs_subtitle_offset_update_message":"Subtitle offset updated: %1$sms. Total offset: %2$sms.","videojs_subtitle_settings":"settings","videojs_subtitle_settings_defaults":"Restore Defaults","videojs_subtitle_settings_done":"Done","videojs_subtitle_style_bg":"Background","videojs_subtitle_style_black":"Black","videojs_subtitle_style_blue":"Blue","videojs_subtitle_style_cyan":"Cyan","videojs_subtitle_style_depressed":"Depressed","videojs_subtitle_style_dropshadow":"Dropshadow","videojs_subtitle_style_fg":"Foreground","videojs_subtitle_style_font_casual":"Casual","videojs_subtitle_style_font_family":"Font Family","videojs_subtitle_style_font_monospace_sans_serif":"Monospace Sans-Serif","videojs_subtitle_style_font_monospace_serif":"Monospace Serif","videojs_subtitle_style_font_proportional_sans_serif":"Proportional Sans-Serif","videojs_subtitle_style_font_proportional_serif":"Proportional Serif","videojs_subtitle_style_font_script":"Script","videojs_subtitle_style_font_size":"Font Size","videojs_subtitle_style_font_small_caps":"Small Caps","videojs_subtitle_style_green":"Green","videojs_subtitle_style_magenta":"Magenta","videojs_subtitle_style_none":"None","videojs_subtitle_style_opaque":"Opaque","videojs_subtitle_style_raised":"Raised","videojs_subtitle_style_red":"Red","videojs_subtitle_style_semi_transparent":"Semi-Transparent","videojs_subtitle_style_text":"Text","videojs_subtitle_style_text_edge_style":"Text Edge Style","videojs_subtitle_style_transparent":"Transparent","videojs_subtitle_style_uniform":"Uniform","videojs_subtitle_style_white":"White","videojs_subtitle_style_window":"Window","videojs_subtitle_style_yellow":"Yellow","warm_welcome":"┌( ಠ‿ಠ)┘ welcome!","warm_welcome_stranger":"┌( ಠ‿ಠ)┘ hello stranger!","email.error.existing_mail.title":"Email is already used","email.error.existing_mail.description":"Please try another email.","email.error.invalid_mail.title":"Invalid email address","email.error.invalid_mail.description":"Please use a valid email address.","email.error.same_email.title":"New email address is same as previous one","email.error.same_email.description":"Please use a different email address.","email.error.mail_exists.title":"Email is already used","email.error.mail_exists.description":"Did you forget your password?","email.error.mail_exists.recovery_label":"Reset password","email.error.disposable_mail_not_allowed.title":"Disposable email addresses are not allowed","email.error.disposable_mail_not_allowed.description":"Please use a non-disposable email address.","registration.code.invalid_or_used.title":"Used or invalid code","registration.code.invalid_or_used.description":"Please check your code and try again. If you think this is a mistake, get in touch with us.","registration.code.invalid_or_used.recovery_label":"Get help","registration.error.invali
399d_username.title":"Invalid username","registration.error.invalid_username.description":"Please try another username.","registration.error.invalid_registration_code.title":"Invalid registration code","registration.error.invalid_registration_code.description":"Please check your code try again.","registration.error.friend_invite_owner_not_active.title":"Friend\'s plan has expired","registration.error.friend_invite_owner_not_active.description":"Please make sure the family owner has an active put.io account.","registration.error.username_exists.title":"Username is taken","registration.error.username_exists.description":"Please try another username.","registration.error.pwned_new_password.title":"Sorry. This password matches with a compromised one at \\"Have I been pwned\\"s database.","registration.error.pwned_new_password.description":"Please try another password.","files.unreachable_but_has_mp4.title":"The original file is temporarily unreachable","files.unreachable_but_has_mp4.description":"We\'re playing its transcoded MP4 version, for updates visit [status.put.io](https://status.put.io)","files.lost_but_has_mp4.title":"The original file missing","files.lost_but_has_mp4.description":"We\'re playing its transcoded MP4 version, for updates visit [status.put.io](https://status.put.io)"}')}},e=>{e.O(0,[4736],(()=>(16970,e(e.s=16970)))),e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.