You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Cours...

1 line
20 KiB

(self.webpackChunk=self.webpackChunk||[]).push([[87922],{22596:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(4751),o=n(59301),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},s=n(68475),a=function(e,t){return o.createElement(s.Z,(0,r.Z)({},e,{ref:t,icon:c}))};var i=o.forwardRef(a)},22845:function(e,t,n){"use strict";var r=n(82242),o=n.n(r),c=(n(59301),n(19779)),s=n(3113),a=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,r=void 0===n?{}:n,i=e.styles,l=void 0===i?{}:i,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,m=e.ButtonTwo,h=e.imgStyles,x=e.loading,g=void 0!==x&&x;return(0,a.jsxs)("section",{className:"tc animated fadeIn",style:o()(o()({},{color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"}),l),children:[(0,a.jsx)("img",{src:t||c,style:o()({width:288,height:200},h)}),(0,a.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,a.jsx)(s.ZP,o()(o()({className:f,onClick:p},r),{},{children:d})),m&&m]})}},98127:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return M}});var r=n(37205),o=n.n(r),c=n(7557),s=n.n(c),a=n(41498),i=n.n(a),l=n(82242),u=n.n(l),d=n(79800),p=n.n(d),f=n(59301),m=n(99232),h=n.n(m),x=n(56102),g=n(96707),_=n(43418),v=n(98135),y=n(8591),b=n(20834),j=n(24905),w=n(38854),C=n(95237),k=n(43604),Z=n(14491),N=n(53864),I=n(22596),O=n(51836),P=n(43501),S=n(76279),T=n(22845),D=n(22961),R={flex_box_center:"flex_box_center___oNuKm",flex_space_between:"flex_space_between___U1Zic",flex_box_vertical_center:"flex_box_vertical_center___r26GC",flex_box_center_end:"flex_box_center_end___Zlv2y",flex_box_column:"flex_box_column___Ml9Kt",bg:"bg___WNwKr",containerTitle:"containerTitle___U8kcU",containerDesc:"containerDesc___UxxtF",listItem:"listItem___fnQZO",title:"title___USjS0",titleLeft:"titleLeft___PVbk6",titleRight:"titleRight___xjHF8",acitons:"acitons___l0Pb3",memberManager:"memberManager___ZFyEi",headWrap:"headWrap___G2Uc9",checkbox:"checkbox___SnMlz"},E=n(39324),L=n(87612),U=n(37712);h().locale("zh-cn");var M=(0,g.connect)((function(e){var t=e.classroomList,n=e.loading;return{classroomList:t,globalSetting:e.globalSetting,loading:n}}))((function(e){e.classroomList,e.globalSetting,e.loading;var t,n,r,c,a=e.dispatch,l=(0,f.useState)(u()(u()({},(0,g.useParams)()),{page:1,limit:20})),d=p()(l,2),m=d[0],h=d[1],M=(0,f.useState)([]),A=p()(M,2),G=A[0],z=A[1],B=(0,f.useState)({}),H=p()(B,2),J=H[0],F=H[1],W=(0,f.useRef)(),q=(0,f.useState)(!1),K=p()(q,2),Y=K[0],V=K[1],Q=(0,f.useState)([]),X=p()(Q,2),$=X[0],ee=X[1],te=(0,f.useState)(!1),ne=p()(te,2),re=ne[0],oe=ne[1],ce=(0,f.useState)([]),se=p()(ce,2),ae=se[0],ie=se[1];(0,f.useEffect)((function(){m.order=1,m.sort="asc",m.page=1,m.limit=20,m.course_group_id=m.categoryId,h(m),ue(m),le()}),[m.categoryId]);var le=function(){var e=i()(s()().mark((function e(){var t,n,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.c_)({coursesId:m.coursesId});case 2:r=e.sent,z((null==r||null===(t=r.course_groups)||void 0===t?void 0:t.map((function(e){return u()(u()({},e),{show:!0})})))||[]),ie(null==r||null===(n=r.course_groups)||void 0===n?void 0:n.filter((function(e){return e.in_current_course_group})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=i()(s()().mark((function e(t){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V(!0),e.next=3,(0,E.Rk)(t);case 3:n=e.sent,V(!1),F(n||{});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),de=function(){var e=i()(s()().mark((function e(t){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(null==$?void 0:$.length)){e.next=3;break}return y.ZP.info("请选择学生"),e.abrupt("return");case 3:return e.next=5,(0,E.wR)({coursesId:m.coursesId,course_group_id:t,students:$.map((function(e){return{course_member_id:e}}))});case 5:0===(null==(n=e.sent)?void 0:n.status)&&y.ZP.success("操作成功"),m.page=1,ee([]),h(m),ue(m);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),pe=function(){var e=i()(s()().mark((function e(t,n){var r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.wR)({coursesId:m.coursesId,course_group_id:t,students:[{course_member_id:n}]});case 2:0===(null==(r=e.sent)?void 0:r.status)&&y.ZP.success("操作成功"),m.page=1,ee([]),h(m),ue(m);case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),fe=[{name:"课堂信息",url:(0,S.NY)({url:"/api/courses/".concat(m.coursesId,"/export_couser_info.xlsx&export=true"),query:u()(u()({},m),{group_id:m.course_group_id,search:m.search?null===(t=m.search)||void 0===t?void 0:t.trim():null})})},{name:"活跃度",url:(0,S.NY)({url:"/api/courses/".concat(m.coursesId,"/export_member_act_score.xlsx&export=true"),query:u()(u()({},m),{group_id:m.course_group_id,search:m.search?null===(n=m.search)||void 0===n?void 0:n.trim():null})})},{name:"总成绩",url:(0,S.NY)({url:"/api/courses/".concat(m.coursesId,"/export_member_scores_excel.xlsx&export=true"),query:u()(u()({},m),{group_id:m.course_group_id,search:m.search?null===(r=m.search)||void 0===r?void 0:r.trim():null})})}],me=(0,U.jsxs)(b.Z,{style:{maxHeight:400,width:200,overflow:"auto",padding:10},children:[(0,U.jsx)("input",{placeholder:"搜索",className:"ant-input",onChange:function(e){var t=e.target.value;z(G.map((function(e){var n;return null!==(n=e.name)&&void 0!==n&&n.includes(t)?u()(u()({},e),{show:!0}):u()(u()({},e),{show:!1})})))},style:{width:180}}),(0,U.jsx)(b.Z.Item,{onClick:function(){return de(0)},className:"multi-llipsis1e",children:(0,U.jsx)("span",{children:"未分班"})}),null==G||null===(c=G.filter((function(e){return e.show})))||void 0===c?void 0:c.map((function(e,t){return(0,U.jsx)(b.Z.Item,{onClick:function(){return de(e.id)},className:"multi-llipsis1e",children:(0,U.jsx)("span",{children:e.name})})}))]}),he=(b.Z,fe.map((function(e,t){return(0,U.jsx)(b.Z.Item,{children:(0,U.jsx)("a",{onClick:i()(s()().mark((function t(){var n;return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,O.ZP)(e.url,{method:"get"});case 2:(n=t.sent)&&-1!==(null==n?void 0:n.status)&&-2!==(null==n?void 0:n.status)&&(0,S.xg)(e.url);case 4:case"end":return t.stop()}}),t)}))),children:e.name})},e.url)})),[(0,D.GJ)()&&{title:"",width:80,align:"center",render:function(e,t){return(0,U.jsx)(j.Z,{checked:$.includes(t.course_member_id),onChange:function(e){e.target.checked?ee([].concat(o()($),[t.course_member_id])):ee($.filter((function(e){return e!==t.course_member_id})))}})}},{title:"序号",render:function(e,t,n){return m.limit*(m.page-1)+n+1},width:80,align:"center"},{title:"姓名",dataIndex:"name",width:80,ellipsis:!0,align:"center",render:function(e,t){return(0,U.jsx)("a",{className:"c-blank",onClick:function(){return(0,S.xg)("/users/".concat(t.login))},children:e})}},{title:"学号",dataIndex:"student_id",width:80,ellipsis:!0,align:"center",sorter:!0,showSorterTooltip:!1,render:function(e){return(0,U.jsx)("span",{children:e})}},{title:"手机号",dataIndex:"user_phone",width:80,ellipsis:!0,align:"center",render:function(e){return(0,U.jsx)("span",{children:e})}},{title:"邮箱",dataIndex:"user_mail",width:80,ellipsis:!0,align:"center",render:function(e){return(0,U.jsx)("span",{children:e})}},(0,D.Gg)()&&{title:"操作",align:"center",dataIndex:"name",width:140,render:function(e,t){return(0,U.jsxs)("div",{children:[(0,U.jsx)(w.Z,{dropdownRender:function(){var e;return(0,U.jsxs)(b.Z,{style:{maxHeight:400,width:200,overflow:"auto",padding:10},children:[(0,U.jsx)("input",{placeholder:"搜索",className:"ant-input",onChange:function(e){var t=e.target.value;z(G.map((function(e){var n;return null!==(n=e.name)&&void 0!==n&&n.includes(t)?u()(u()({},e),{show:!0}):u()(u()({},e),{show:!1})})))},style:{width:180}}),(0,U.jsx)(b.Z.Item,{onClick:function(){return pe(0,t.course_member_id)},className:"multi-llipsis1e",children:(0,U.jsx)("span",{children:"未分班"})}),null==G||null===(e=G.filter((function(e){return e.show})))||void 0===e?void 0:e.map((function(e,n){return(0,U.jsx)(b.Z.Item,{onClick:function(){return pe(e.id,t.course_member_id)},className:"multi-llipsis1e",children:(0,U.jsx)("span",{children:e.name})})}))]})},className:"ml20",placement:"bottomRight",children:(0,U.jsx)("span",{className:"font14 current",style:{color:"#3061d0"},children:"移动分班"})}),(0,U.jsx)("span",{className:"current",style:{color:"red",marginLeft:10},onClick:function(){var e;_.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"是否确认删除",content:"是否确认将学生从课堂内删除?",onOk:(e=i()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,L.l3)({coursesId:m.coursesId,students:[{course_member_id:t.course_member_id}]});case 2:0===e.sent.status&&(y.ZP.success("删除成功"),m.page=1,ee([]),h(m),ue(m),a({type:"classroomList/getClassroomTopBanner",payload:{id:m.coursesId}}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"删除"})]})}}].filter((function(e){return!!e})));return(0,U.jsxs)("section",{children:[(0,U.jsxs)("aside",{className:R.bg,children:[(0,U.jsxs)(C.Z,{className:R.headWrap,children:[(0,U.jsxs)(k.Z,{flex:"1",children:[(0,U.jsx)("span",{children:(0,U.jsx)(I.Z,{className:"font16 c-black",onClick:function(){return g.history.push("/classrooms/".concat(m.coursesId,"/course_group"))}})}),(0,U.jsx)("span",{className:"".concat(R.title," ml10"),children:J.course_group_name}),(0,D.GJ)()&&J.invite_code&&(0,U.jsxs)("span",{className:"ml10",children:[(0,U.jsx)("span",{className:"c-grey-999 font16",children:"邀请码:"}),(0,U.jsx)("span",{className:"c-orange font16",children:J.invite_code}),(0,U.jsx)("span",{children:(0,U.jsx)(x.CopyToClipboard,{text:J.invite_code,className:"current",onCopy:function(){return y.ZP.success("复制成功")},children:(0,U.jsx)("span",{children:(0,U.jsx)("i",{className:"iconfont icon-fuzhi font14 ml10 c-orange"})})})})]})]}),(0,U.jsx)(k.Z,{children:(0,U.jsxs)("div",{children:[(0,D.GJ)()&&(0,U.jsx)("span",{className:[R.add,"font16","c-blue","ml20","current"].join(" "),onClick:function(){var e;_.Z.confirm({width:530,title:"提示",okText:"确定",cancelText:"取消",centered:!0,content:(0,U.jsxs)("div",{className:"tc font16",children:["该分班的学生将被移动到“未分班”",(0,U.jsx)("br",{}),"是否确认删除?"]}),onOk:(e=i()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.pv)({categoryId:m.categoryId});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(y.ZP.success("删除成功"),a({type:"classroomList/getClassroomLeftMenus",payload:{id:m.coursesId}}),g.history.push("/classrooms/".concat(m.coursesId,"/course_group")));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"删除分班"}),(0,D.GJ)()&&(0,U.jsx)("span",{className:[R.add,"font16","c-blue","ml20","current"].join(" "),onClick:function(){var e;W.current=J.course_group_name,_.Z.confirm({width:530,title:"提示",okText:"确定",cancelText:"取消",centered:!0,content:(0,U.jsx)("div",{className:"tc font16",children:(0,U.jsx)(v.Z,{defaultValue:W.current,onChange:function(e){return W.current=e.target.value}})}),onOk:(e=i()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.$T)({categoryId:m.categoryId,name:W.current});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(y.ZP.success("更新成功"),ue(m));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"分班重命名"}),(0,D.dE)()&&ae.length<=0&&(0,U.jsx)("span",{className:[R.add,"font16","c-blue","ml20","current"].join(" "),onClick:function(){var e;_.Z.confirm({width:530,title:"提示",okText:"确定",cancelText:"取消",centered:!0,content:(0,U.jsx)("div",{className:"tc font16",children:"加入分班后,需联系老师或助教才能调整分班"}),onOk:(e=i()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.i6)({coursesId:m.coursesId,course_group_id:m.categoryId});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(y.ZP.success("加入成功"),ue(m));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"加入分班"})]})})]}),(0,U.jsxs)("div",{className:R.containerDesc,children:[(0,U.jsxs)("p",{children:["共",(0,U.jsx)("span",{className:"c-orange",children:J.students_count}),"个学生"]}),(0,U.jsx)("p",{children:(0,U.jsx)(v.Z.Search,{allowClear:!0,placeholder:"请输入姓名、学号进行搜索",onSearch:function(e){m.search=e,m.page=1,h(m),ue(m)},style:{width:300}})})]})]}),0===J.students_count&&(0,U.jsx)(T.Z,{}),J.students_count>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)("aside",{className:"plr30 mt20 ".concat(R.bg),children:[(0,D.GJ)()&&(0,U.jsxs)(C.Z,{justify:"space-between",className:R.checkbox,children:[(0,U.jsx)(k.Z,{children:(0,U.jsx)(j.Z,{checked:re,onChange:function(e){var t;(oe(e.target.checked),e.target.checked)?ee(null===(t=J.students)||void 0===t?void 0:t.map((function(e){return e.course_member_id}))):ee([])},children:(0,U.jsxs)("span",{className:"font14",children:["已选",$.length,"个"]})})}),(0,U.jsx)("div",{style:{marginLeft:"auto",cursor:"pointer",color:"red"},onClick:function(){var e;0!==(null==$?void 0:$.length)?_.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"是否确认删除",content:"是否确认将学生从课堂内删除?",onOk:(e=i()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,L.l3)({coursesId:m.coursesId,students:$.map((function(e){return{course_member_id:e}}))});case 2:0===e.sent.status&&(y.ZP.success("删除成功"),m.page=1,ee([]),h(m),ue(m),a({type:"classroomList/getClassroomTopBanner",payload:{id:m.coursesId}}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})}):y.ZP.info("请选择学生")},children:"批量删除"}),(0,U.jsx)(k.Z,{children:(0,U.jsx)(w.Z,{dropdownRender:function(){return me},className:"ml20",placement:"bottomRight",children:(0,U.jsxs)("span",{className:"font14 current",style:{color:"#3061d0"},children:["移动到",(0,U.jsx)(P.Z,{className:"ml5"})]})})})]}),(0,U.jsx)(Z.Z,{className:"pt20",columns:he,dataSource:J.students,loading:Y,pagination:!1,onChange:function(e,t,n){console.log("c: ",n),"ascend"===n.order&&(m.sort="asc"),"descend"===n.order&&(m.sort="desc"),n.order||delete m.sort,h(m),ue(m)}})]}),(0,U.jsx)("aside",{className:"tc mb50 mt30",children:(0,U.jsx)(N.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,t){m.page=e,oe(!1),ee([]),h(m),ue(m)},defaultCurrent:1,defaultPageSize:20,current:m.page||1,total:J.students_count})})]})]})}))},25769:function(e,t,n){"use strict";var r=n(98040),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,c,s,a,i,l,u=!1;t||(t={}),n=t.debug||!1;try{if(s=r(),a=document.createRange(),i=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var c=o[t.format]||o.default;window.clipboardData.setData(c,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),a.selectNodeContents(l),i.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),c=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(c,e)}}finally{i&&("function"==typeof i.removeRange?i.removeRange(a):i.removeAllRanges()),l&&document.body.removeChild(l),s()}return u}},83145:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=c(n(59301)),o=c(n(25769));function c(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?f(e):t}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){function t(){var e,n;l(this,t);for(var c=arguments.length,s=new Array(c),a=0;a<c;a++)s[a]=arguments[a];return h(f(n=d(this,(e=p(t)).call.apply(e,[this].concat(s)))),"onClick",(function(e){var t=n.props,c=t.text,s=t.onCopy,a=t.children,i=t.options,l=r.default.Children.only(a),u=(0,o.default)(c,i);s&&s(c,u),l&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(e)})),n}var n,c,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(t,e),n=t,c=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=i(e,["text","onCopy","options","children"]),o=r.default.Children.only(t);return r.default.cloneElement(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(n,!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{onClick:this.onClick}))}}],c&&u(n.prototype,c),s&&u(n,s),t}(r.default.PureComponent);t.CopyToClipboard=x,h(x,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(e,t,n){"use strict";var r=n(83145).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},98040:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}}}]);