1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8331],{98623:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/seminars/[sid]/organize/attachment",function(){return n(98246)}])},24427:function(e,t,n){"use strict";n.d(t,{P:function(){return b}});var i=n(85893),s=n(67294),a=n(44623),r=n(93820),l=n(47027),c=n(68156),d=n(64042),o=n(70067),m=n(11163),h=n.n(m),f=n(41664),u=n.n(f),x=n(98997),j=n(37039),g=n(70063);let p=e=>{let{data:t}=e,[n]=(0,g.Z)(),a=(0,s.useCallback)(e=>{if(!e.seminarSession){h().push("/attachments/pdfs/".concat(e.pdfAttachment._id));return}h().push("/seminars/".concat(e.seminar,"/sessions/").concat(e.seminarSession,"/attachments/").concat(e.pdfAttachment._id))},[]);return(0,i.jsx)(j.I,{onSelect:a,header:n?t.attachment?t.attachment.filename:"".concat(t.createdAt?"PDF file created ad ".concat((0,x.p6)(new Date(t.createdAt))):"","PDF file"):t.attachment?t.attachment.filename:"".concat(t.createdAt?"".concat((0,x.p6)(new Date(t.createdAt))," ã«ä½æããã"):"","PDFãã¡ã¤ã«"),...e,children:(0,i.jsxs)(l.Z,{children:[(0,i.jsxs)(l.Z.Item,{children:[(0,i.jsx)("strong",{children:"PDF"}),":"," ",t.pdfAttachment.pages.length," ",n?"page(s)":"ãã¼ã¸"]}),t.createdAt&&(0,i.jsxs)(l.Z.Item,{children:[(0,i.jsx)("strong",{children:n?"Date":"ç»é²æ¥"}),":"," ",(0,x.p6)(new Date(t.createdAt))]}),(0,i.jsxs)(l.Z.Item,{children:[(0,i.jsx)("strong",{children:n?"Creator":"使è
"}),":"," ","object"==typeof t.createdBy&&null!==t.createdBy?(0,i.jsx)(u(),{href:"/users/".concat(t.createdBy._id),children:t.createdBy.displayName}):"-"]})]})})},b=(0,s.forwardRef)((e,t)=>{let{inverted:n,seminarId:m,seminarSessionId:h,seminarContentId:f,paperId:u,userId:x,groupBySeminarSession:j,groupByContent:b,limit:Z}=e,[v,w]=(0,s.useState)(1),[k,C]=(0,s.useState)(null),[S]=(0,g.Z)();(0,s.useEffect)(()=>{let e=!0;return C(null),d.I.list({seminarId:m,seminarSessionId:h,seminarContentId:f,paperId:u,userId:x,groupBySeminarSession:j,groupByContent:b,withAttachment:!0,limit:Z}).then(t=>{e&&t.success&&C(t.data)}),()=>{e=!1}},[m,h,f,u,x,j,b,Z]);let y=(0,s.useCallback)(e=>{C(null),d.I.list({seminarId:m,seminarSessionId:h,seminarContentId:f,paperId:u,userId:x,groupBySeminarSession:j,groupByContent:b,withAttachment:!0,page:e,limit:Z}).then(t=>{t.success&&(C(t.data),w(e))})},[m,h,f,u,x,j,b,Z]),_=(0,s.useCallback)((e,t)=>{y(t.activePage)},[y]);return((0,s.useImperativeHandle)(t,()=>({refresh:()=>y(v)}),[y,v]),k)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Z,{fluid:!0,totalPages:k.totalPages,activePage:v,onPageChange:_,className:"wrapping"}),k.docs.length>0?(0,i.jsx)(a.Z,{inverted:n,children:(0,i.jsx)(l.Z,{inverted:n,divided:!0,relaxed:!0,selection:!0,children:k.docs.map((e,t)=>(0,i.jsx)(p,{data:e},t))})}):(0,i.jsx)(c.Z,{warning:!0,content:S?"Document not found.":"çºè¡¨è³æãè¦ã¤ããã¾ããã§ãã"}),(0,i.jsx)(r.Z,{fluid:!0,totalPages:k.totalPages,activePage:v,onPageChange:_,className:"wrapping"})]}):(0,i.jsx)(a.Z,{inverted:n,children:(0,i.jsx)(o.l,{})})})},70067:function(e,t,n){"use strict";n.d(t,{l:function(){return c}});var i=n(85893),s=n(40645),a=n.n(s),r=n(40849),l=n(70063);let c=e=>{let{message:t}=e,[n]=(0,l.Z)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{id:"3393683130c2025",children:".center.jsx-3393683130c2025{text-align:center}"}),(0,i.jsx)("div",{className:"jsx-3393683130c2025 center",children:(0,i.jsx)(r.Z,{inline:!0,active:!0,content:t||(n?"Loading...":"èªã¿è¾¼ã¿ä¸â¦")})})]})}},33621:function(e,t,n){"use strict";n.d(t,{g:function(){return l}});var i=n(85893),s=n(40645),a=n.n(s),r=n(25142);let l=e=>{let{text:t,size:n,color:s}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{id:"e1d1d9aa480cb8a",children:"span.label.jsx-e1d1d9aa480cb8a{padding-left:.5em}span.label.jsx-e1d1d9aa480cb8a+span.label.jsx-e1d1d9aa480cb8a{padding-left:0}"}),(0,i.jsx)("span",{className:"jsx-e1d1d9aa480cb8a label",children:(0,i.jsx)(r.Z,{color:s,size:n,horizontal:!0,content:t})})]})}},37039:function(e,t,n){"use strict";n.d(t,{I:function(){return d}});var i=n(85893),s=n(40645),a=n.n(s),r=n(67294),l=n(47027),c=n(80967);let d=e=>{let{icon:t,href:n,header:s,data:d,onSelect:o,onDelete:m,children:h}=e,f=(0,r.useCallback)(e=>{o(d)},[d,o]),u=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),m&&m(d)},[d,m]),x=(0,i.jsxs)(i.Fragment,{children:[m&&(0,i.jsx)(l.Z.Content,{floated:"right",children:(0,i.jsx)(c.Z,{circular:!0,color:"red",size:"tiny",icon:"trash",onClick:u})}),t&&(0,i.jsx)(l.Z.Icon,{name:t}),(0,i.jsxs)(l.Z.Content,{children:[(0,i.jsx)(l.Z.Header,{children:s}),d&&h&&(0,i.jsx)(l.Z.Description,{children:h})]})]});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a(),{id:"ae7af05a6f89301b",children:".item.jsx-ae7af05a6f89301b{display:list-item;table-layout:fixed;padding:.4em!important;list-style-type:none;list-style-position:outside;line-height:1.14285714em!important}.item.sorting.jsx-ae7af05a6f89301b{border:1px dashed rgba(34,36,38,.15);border-width:1px 0;background:rgba(255,255,255,.6)}.item.inverted.sorting.jsx-ae7af05a6f89301b{border:1px solid rgba(255,255,255,.8);border-width:1px 0;background:rgba(255,255,255,.7);z-index:1010}.item.jsx-ae7af05a6f89301b>.icon{display:table-cell;min-width:1.55em;padding-right:.28571429em;vertical-align:top}.item.jsx-ae7af05a6f89301b>.content{display:table-cell;width:100%;padding:0 0 0 .5em;vertical-align:top}.item.jsx-ae7af05a6f89301b>.right.floated.content{float:right;width:auto}.item.jsx-ae7af05a6f89301b>.right.floated.content>*:last-child{margin-right:0}.item.jsx-ae7af05a6f89301b>.content>.header{font-weight:bold}.item.jsx-ae7af05a6f89301b>.content>.description>.list{margin:0;padding:.5em 0 .25em .5em}.inverted.list .item.jsx-ae7af05a6f89301b>.content>.description>.list *{color:rgba(255,255,255,.7)!important}.item.jsx-ae7af05a6f89301b>.content>.description>.list>.item{padding:.25em 0!important;color:rgba(0,0,0,.6)!important}.item.jsx-ae7af05a6f89301b>.content>.description>.list>.item.red,.item.jsx-ae7af05a6f89301b>.content>.description>.list>.item.red>*{color:#db2828!important}.item.jsx-ae7af05a6f89301b>.content>.description>.list>.item.green,.item.jsx-ae7af05a6f89301b>.content>.description>.list>.item.green>*{color:#21ba45!important}.item.jsx-ae7af05a6f89301b>.content>.description>.list>.item:hover{background:none!important}.item.jsx-ae7af05a6f89301b>.content>.description>.list>.item:first-child{padding-top:0!important}.item.jsx-ae7af05a6f89301b>.content>.description>.list>.item:last-child{padding-bottom:0!important}"}),o||!n?(0,i.jsx)("div",{onClick:o&&f,className:"jsx-ae7af05a6f89301b item",children:x}):(0,i.jsx)("a",{href:n,className:"jsx-ae7af05a6f89301b item",children:x})]})}},98246:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return F}});var i=n(85893),s=n(67294),a=n(41664),r=n.n(a),l=n(95712),c=n(21764),d=n(83875),o=n(54130),m=n(50779),h=n(39814),f=n(99991),u=n(6101),x=n(6003),j=n(44623),g=n(3623),p=n(69249),b=n(68156),Z=n(70063),v=n(70067),w=n(24427),k=n(82374);let C=e=>{let{seminar:t,scopes:n}=e,[a]=(0,Z.Z)(),r=(0,s.useMemo)(()=>t?t.sessions.filter(e=>e.authors.length>0):[],[t]),l=(0,s.useMemo)(()=>n?r.filter(e=>!!n.find(t=>t.seminarSession===e._id)):[],[r,n]),c=(0,s.useMemo)(()=>n?r.filter(e=>e.authors.length>0&&!l.includes(e)):[],[r,n,l]);return(0,s.useEffect)(()=>{window.sessions=r,window.sessionsWithAttachments=l,window.sessionsWithoutAttachments=c},[r,l,c]),(0,i.jsxs)(j.Z,{children:[(0,i.jsx)(g.Z,{as:"h2",icon:"upload",content:a?"Submission status":"æåºç¶æ³"}),(0,i.jsx)(p.Z,{menu:{stackable:!0,secondary:!0,pointing:!0},panes:[{menuItem:{key:"with",icon:"check",content:a?"Submitted":"æåºæ¸ã¿"},render:()=>n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.Z,{content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("strong",{children:r.length})," ä»¶ä¸"," ",(0,i.jsx)("strong",{children:l.length})," ä»¶"]})}),(0,i.jsx)(k.Q,{disabled:!0,divided:!0,selection:!0,seminarId:t._id,seminarAlias:t.alias,seminarMode:t.mode,seminarSessions:l})]}):(0,i.jsx)(v.l,{})},{menuItem:{key:"without",icon:"hourglass half",content:a?"Pending":"æåºå¾
ã¡"},render:()=>n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.Z,{content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("strong",{children:r.length})," ä»¶ä¸"," ",(0,i.jsx)("strong",{children:c.length})," ä»¶"]})}),(0,i.jsx)(k.Q,{disabled:!0,divided:!0,selection:!0,seminarId:t._id,seminarAlias:t.alias,seminarMode:t.mode,seminarSessions:c})]}):(0,i.jsx)(v.l,{})},{menuItem:{key:"files",icon:"file",content:a?"Files":"ãã¡ã¤ã«ã®ä¸è¦§"},render:()=>n?(0,i.jsx)(w.P,{seminarId:t._id,groupBySeminarSession:!0,limit:30}):(0,i.jsx)(v.l,{})}]})]})};var S=n(80967),y=n(30711),_=n(64042);let I=e=>{let{seminar:t,scopes:n,open:a,onClose:r,onUnite:l}
1=e,[c]=(0,Z.Z)(),[d,o]=(0,s.useState)(!1),[m,h]=(0,s.useState)(null),f=(0,s.useMemo)(()=>t&&n?t.sessions.filter(e=>e.authors.length>0).map(e=>n.find(t=>t.seminarSession===e._id)).filter(e=>e&&e.pdfAttachment).map(e=>e.pdfAttachment):[],[t,n]),u=(0,s.useCallback)(async()=>{if(t&&n){o(!0),h(null);try{let e=await _.I.unite({filename:"".concat(t.alias||t._id,".pdf"),pdfAttachments:f});if(!e.success)throw Error(e.error);await _.I.registerScope({seminarId:t._id,pdfAttachmentId:e.data._id}),o(!1),l(e)}catch(e){o(!1),h(e.message)}}},[l,f]);return(0,s.useEffect)(()=>{a&&h(null)},[a]),(0,i.jsxs)(y.Z,{basic:!0,open:a,onClose:d?void 0:r,closeOnDimmerClick:!1,closeOnDocumentClick:!1,children:[(0,i.jsxs)(y.Z.Content,{children:[t&&n?f.length>0?(0,i.jsxs)("p",{children:[(0,i.jsx)("strong",{children:f.length})," ",c?"files will be combined into one. Continue?":"ä»¶ã®è³æãä¸ã¤ã«ã¾ã¨ãã¾ããï¼"]}):(0,i.jsx)("p",{children:c?"No files available for merging.":"ã¾ã¨ããããè³æãä¸ã¤ãè¦ã¤ããã¾ããã§ããã"}):(0,i.jsx)(v.l,{}),m&&(0,i.jsx)(b.Z,{error:!0,header:"ãµã¼ãã¨ã©ã¼",content:m})]}),(0,i.jsxs)(y.Z.Actions,{children:[(0,i.jsx)(S.Z,{primary:!0,loading:d,disabled:d||f.length<=0,content:c?"Combine":"ã¾ã¨ãã",icon:"check",labelPosition:"left",onClick:u}),(0,i.jsx)(S.Z,{disabled:d,content:c?"Cancel":"ãã£ã³ã»ã«",onClick:r})]})]})},P=e=>{let{seminar:t,scopes:n,onUnite:a}=e,[r]=(0,Z.Z)(),[l,c]=(0,s.useState)(!1),d=(0,s.useCallback)(()=>{c(!0)},[]),o=(0,s.useCallback)(()=>{c(!1)},[]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(S.Z,{primary:!0,icon:"check",labelPosition:"left",content:r?"Combine submitted files":"æåºæ¸ã¿è³æãã¾ã¨ãã",onClick:d,disabled:!t||!n}),(0,i.jsx)(I,{seminar:t,scopes:n,open:l,onClose:o,onUnite:a})]})},A=e=>{let{seminar:t,scopes:n}=e,a=(0,s.useRef)(),[r]=(0,Z.Z)(),l=(0,s.useCallback)(()=>{a.current&&a.current.refresh()},[a.current]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(j.Z,{attached:"top",children:[(0,i.jsx)(g.Z,{as:"h2",icon:"file",content:r?"All uploaded slides":"çºè¡¨è³æã®ã¾ã¨ã"}
1),t?(0,i.jsx)(w.P,{ref:a,seminarId:t._id,seminarSessionId:null,seminarContentId:null,limit:30}):(0,i.jsx)(v.l,{})]}),(0,i.jsx)(j.Z,{secondary:!0,attached:"bottom",textAlign:"right",children:(0,i.jsx)(P,{seminar:t,scopes:n,onUnite:l})})]})},D=e=>{let{id:t,seminar:n}=e,[a,j]=(0,s.useState)(!!n),[g,p]=(0,s.useState)(n),[b,Z]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(a)return;if(!t){j(!0);return}let e=!0;return m.o.fetch({id:t,withSessions:!0}).then(t=>{e&&(j(!0),p(t.data?{...t.data}:null))}),()=>{e=!1}},[t]),(0,s.useEffect)(()=>{if(!g)return;let e=!0,t=1;return(async()=>{let e=[];for(;;){let n=await _.I.list({seminarId:g._id,groupBySeminarSession:!0,page:t,limit:50});if(e.push(...n.data.docs),!n.data.hasNextPage)break;t++}return e})().then(t=>{e&&Z(t)}),()=>{e=!1}},[g]);let v=a?g&&g.name||"":"èªã¿è¾¼ã¿ä¸";return(0,i.jsxs)(h.ZP,{title:g?"çºè¡¨è³æ | éå¶å§å¡ç¨ãã¼ã¸ | ".concat(g.name):null,englishTitle:g?"Slides | Organizer page | ".concat(g.name):null,children:[(0,i.jsx)(u.V,{children:(0,i.jsxs)(l.Z,{children:[(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(f.f,{}),(0,i.jsx)(c.Z.Divider,{}),(0,i.jsx)(c.Z.Section,{as:r(),href:"/seminars",children:"åå¼·ä¼ã®ä¸è¦§"}),(0,i.jsx)(c.Z.Divider,{}),(0,i.jsxs)(c.Z.Section,{as:r(),href:g?"/seminars/".concat(g.alias||g._id):void 0,children:[v,(0,i.jsx)(x.N,{seminar:g})]}),(0,i.jsx)(c.Z.Divider,{}),(0,i.jsx)(c.Z.Section,{as:r(),href:g?"/seminars/".concat(g.alias||g._id,"/organize"):void 0,children:"éå¶å§å¡ç¨ãã¼ã¸"}),(0,i.jsx)(c.Z.Divider,{})]}),(0,i.jsx)(o.X,{content:"çºè¡¨è³æ",englishContent:"Slides"})]})}),(0,i.jsxs)(l.Z,{children:[(0,i.jsxs)(d.Z,{pointing:!0,fluid:!0,stackable:!0,children:[(0,i.jsx)(d.Z.Item,{content:"ããããã¼ã¸",as:g?r():void 0,href:g?"/seminars/".concat(g.alias||g._id,"/organize"):void 0}),(0,i.jsx)(d.Z.Item,{active:!0,content:"çºè¡¨è³æ"}),(0,i.jsx)(d.Z.Item,{content:"Live Session",as:g?r():void 0,href:g?"/seminars/".concat(g.alias||g._id,"/organize/live"):void 0})]}),(0,i.jsx)(C,{seminar:g,scopes:b}),(0,i.jsx)(A,{seminar:g,scopes:b})]})]})};D.getInitialProps=async e=>{let{query:t,res:n}=e,{sid:i}=t;if("string"==typeof i)try{let e=await m.o.fetch({id:i,withSessions:!0});if(n&&e.data&&e.data._id===i&&"string"==typeof e.data.alias&&e.data.alias.length>0){n.writeHead(302,{Location:"/seminars/".concat(e.data.alias,"/organize/attachment")}),n.end();return}return{id:i,seminar:e.data}}catch(e){}return{id:null,seminar:null}};var F=D}},function(e){e.O(0,[5682,4598,711,6227,4654,9814,3604,2888,9774,179],function(){return e(e.s=98623)}),_N_E=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.