(self.webpackChunk=self.webpackChunk||[]).push([[1346],{40001:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(14809),r=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},a=n(7657),s=function(t,e){return r.createElement(a.Z,(0,i.Z)({},t,{ref:e,icon:o}))};var l=r.forwardRef(s)},84105:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(14809),r=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},a=n(7657),s=function(t,e){return r.createElement(a.Z,(0,i.Z)({},t,{ref:e,icon:o}))};var l=r.forwardRef(s)},18785:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(14809),r=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},a=n(7657),s=function(t,e){return r.createElement(a.Z,(0,i.Z)({},t,{ref:e,icon:o}))};var l=r.forwardRef(s)},15277:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(14809),r=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},a=n(7657),s=function(t,e){return r.createElement(a.Z,(0,i.Z)({},t,{ref:e,icon:o}))};var l=r.forwardRef(s)},33853:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(14809),r=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},a=n(7657),s=function(t,e){return r.createElement(a.Z,(0,i.Z)({},t,{ref:e,icon:o}))};var l=r.forwardRef(s)},12893:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(14809),r=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},a=n(7657),s=function(t,e){return r.createElement(a.Z,(0,i.Z)({},t,{ref:e,icon:o}))};var l=r.forwardRef(s)},38819:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(14809),r=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},a=n(7657),s=function(t,e){return r.createElement(a.Z,(0,i.Z)({},t,{ref:e,icon:o}))};var l=r.forwardRef(s)},47472:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var i=n(14809),r=n(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},a=n(7657),s=function(t,e){return r.createElement(a.Z,(0,i.Z)({},t,{ref:e,icon:o}))};var l=r.forwardRef(s)},35593:function(t,e,n){"use strict";n.d(e,{Z:function(){return X}});var i=n(20439),r=n(50298),o=n(62646),a=n(43403),s=n(92310),l=n.n(s),u=n(29301),c=n(76846),h=n(96452),d=n(6089),f=n(80402),p=n(34280),g=n(49658),m=n(59301),v=n(14809),y=n(77900),w=n(8654);function b(t){var e=t.prefixCls,n=t.align,i=t.arrow,r=t.arrowPos,o=i||{},a=o.className,s=o.content,u=r.x,c=void 0===u?0:u,h=r.y,d=void 0===h?0:h,f=m.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(!1!==n.autoArrow){var g=n.points[0],v=n.points[1],y=g[0],w=g[1],b=v[0],x=v[1];y!==b&&["t","b"].includes(y)?"t"===y?p.top=0:p.bottom=0:p.top=d,w!==x&&["l","r"].includes(w)?"l"===w?p.left=0:p.right=0:p.left=c}return m.createElement("div",{ref:f,className:l()("".concat(e,"-arrow"),a),style:p},s)}function x(t){var e=t.prefixCls,n=t.open,i=t.zIndex,r=t.mask,o=t.motion;return r?m.createElement(y.ZP,(0,v.Z)({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(t){var n=t.className;return m.createElement("div",{style:{zIndex:i},className:l()("".concat(e,"-mask"),n)})})):null}var S=m.memo((function(t){return t.children}),(function(t,e){return e.cache}));var P=m.forwardRef((function(t,e){var n=t.popup,o=t.className,a=t.prefixCls,s=t.style,c=t.target,h=t.onVisibleChanged,d=t.open,f=t.keepDom,g=t.fresh,P=t.onClick,k=t.mask,C=t.arrow,A=t.arrowPos,M=t.align,E=t.motion,L=t.maskMotion,T=t.forceRender,N=t.getPopupContainer,j=t.autoDestroy,I=t.portal,B=t.zIndex,O=t.onMouseEnter,D=t.onMouseLeave,R=t.onPointerEnter,F=t.ready,z=t.offsetX,G=t.offsetY,U=t.offsetR,H=t.offsetB,_=t.onAlign,Z=t.onPrepare,W=t.stretch,V=t.targetWidth,Y=t.targetHeight,X="function"==typeof n?n():n,q=d||f,K=(null==N?void 0:N.length)>0,Q=m.useState(!N||!K),J=(0,r.Z)(Q,2),$=J[0],tt=J[1];if((0,p.Z)((function(){!$&&K&&c&&tt(!0)}),[$,K,c]),!$)return null;var et="auto",nt={left:"-1000vw",top:"-1000vh",right:et,bottom:et};if(F||!d){var it,rt=M.points,ot=M.dynamicInset||(null===(it=M._experimental)||void 0===it?void 0:it.dynamicInset),at=ot&&"r"===rt[0][1],st=ot&&"b"===rt[0][0];at?(nt.right=U,nt.left=et):(nt.left=z,nt.right=et),st?(nt.bottom=H,nt.top=et):(nt.top=G,nt.bottom=et)}var lt={};return W&&(W.includes("height")&&Y?lt.height=Y:W.includes("minHeight")&&Y&&(lt.minHeight=Y),W.includes("width")&&V?lt.width=V:W.includes("minWidth")&&V&&(lt.minWidth=V)),d||(lt.pointerEvents="none"),m.createElement(I,{open:T||q,getContainer:N&&function(){return N(c)},autoDestroy:j},m.createElement(x,{prefixCls:a,open:d,zIndex:B,mask:k,motion:L}),m.createElement(u.Z,{onResize:_,disabled:!d},(function(t){return m.createElement(y.ZP,(0,v.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:T,leavedClassName:"".concat(a,"-hidden")},E,{onAppearPrepare:Z,onEnterPrepare:Z,visible:d,onVisibleChanged:function(t){var e;null==E||null===(e=E.onVisibleChanged)||void 0===e||e.call(E,t),h(t)}}),(function(n,r){var u=n.className,c=n.style,h=l()(a,u,o);return m.createElement("div",{ref:(0,w.sQ)(t,e,r),className:h,style:(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({"--arrow-x":"".concat(A.x||0,"px"),"--arrow-y":"".concat(A.y||0,"px")},nt),lt),c),{},{boxSizing:"border-box",zIndex:B},s),onMouseEnter:O,onMouseLeave:D,onPointerEnter:R,onClick:P},C&&m.createElement(b,{prefixCls:a,arrow:C,arrowPos:A,align:M}),m.createElement(S,{cache:!d&&!g},X))}))})))}));var k=m.forwardRef((function(t,e){var n=t.children,i=t.getTriggerDOMNode,r=(0,w.Yr)(n),o=m.useCallback((function(t){(0,w.mH)(e,i?i(t):t)}),[i]),a=(0,w.x1)(o,n.ref);return r?m.cloneElement(n,{ref:a}):n})),C=m.createContext(null);function A(t){return t?Array.isArray(t)?t:[t]:[]}function M(t,e,n,i){return m.useMemo((function(){var r=A(null!=n?n:e),o=A(null!=i?i:e),a=new Set(r),s=new Set(o);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]}),[t,e,n,i])}var E=n(29194);function L(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function T(t,e,n,i){for(var r=n.points,o=Object.keys(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(t)?e:t}function O(t){return B(parseFloat(t),0)}function D(t,e){var n=(0,i.Z)({},t);return(e||[]).forEach((function(t){if(!(t instanceof HTMLBodyElement||t instanceof HTMLHtmlElement)){var e=j(t).getComputedStyle(t),i=e.overflow,r=e.overflowClipMargin,o=e.borderTopWidth,a=e.borderBottomWidth,s=e.borderLeftWidth,l=e.borderRightWidth,u=t.getBoundingClientRect(),c=t.offsetHeight,h=t.clientHeight,d=t.offsetWidth,f=t.clientWidth,p=O(o),g=O(a),m=O(s),v=O(l),y=B(Math.round(u.width/d*1e3)/1e3),w=B(Math.round(u.height/c*1e3)/1e3),b=(d-f-m-v)*y,x=(c-h-p-g)*w,S=p*w,P=g*w,k=m*y,C=v*y,A=0,M=0;if("clip"===i){var E=O(r);A=E*y,M=E*w}var L=u.x+k-A,T=u.y+S-M,N=L+u.width+2*A-k-C-b,I=T+u.height+2*M-S-P-x;n.left=Math.max(n.left,L),n.top=Math.max(n.top,T),n.right=Math.min(n.right,N),n.bottom=Math.min(n.bottom,I)}})),n}function R(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="".concat(e),i=n.match(/^(.*)\%$/);return i?t*(parseFloat(i[1])/100):parseFloat(n)}function F(t,e){var n=e||[],i=(0,r.Z)(n,2),o=i[0],a=i[1];return[R(t.width,o),R(t.height,a)]}function z(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[t[0],t[1]]}function G(t,e){var n,i=e[0],r=e[1];return n="t"===i?t.y:"b"===i?t.y+t.height:t.y+t.height/2,{x:"l"===r?t.x:"r"===r?t.x+t.width:t.x+t.width/2,y:n}}function U(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map((function(t,i){return i===e?n[t]||"c":t})).join("")}function H(t,e,n,o,a,s,l){var u=m.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[o]||{}}),h=(0,r.Z)(u,2),f=h[0],g=h[1],v=m.useRef(0),y=m.useMemo((function(){return e?I(e):[]}),[e]),w=m.useRef({});t||(w.current={});var b=(0,d.Z)((function(){if(e&&n&&t){var u,h,d,f=e,p=f.ownerDocument,m=j(f).getComputedStyle(f),v=m.width,b=m.height,x=m.position,S=f.style.left,P=f.style.top,k=f.style.right,C=f.style.bottom,A=f.style.overflow,M=(0,i.Z)((0,i.Z)({},a[o]),s),L=p.createElement("div");if(null===(u=f.parentElement)||void 0===u||u.appendChild(L),L.style.left="".concat(f.offsetLeft,"px"),L.style.top="".concat(f.offsetTop,"px"),L.style.position=x,L.style.height="".concat(f.offsetHeight,"px"),L.style.width="".concat(f.offsetWidth,"px"),f.style.left="0",f.style.top="0",f.style.right="auto",f.style.bottom="auto",f.style.overflow="hidden",Array.isArray(n))d={x:n[0],y:n[1],width:0,height:0};else{var T=n.getBoundingClientRect();d={x:T.x,y:T.y,width:T.width,height:T.height}}var N=f.getBoundingClientRect(),I=p.documentElement,O=I.clientWidth,R=I.clientHeight,H=I.scrollWidth,_=I.scrollHeight,Z=I.scrollTop,W=I.scrollLeft,V=N.height,Y=N.width,X=d.height,q=d.width,K={left:0,top:0,right:O,bottom:R},Q={left:-W,top:-Z,right:H-W,bottom:_-Z},J=M.htmlRegion,$="visible",tt="visibleFirst";"scroll"!==J&&J!==tt&&(J=$);var et=J===tt,nt=D(Q,y),it=D(K,y),rt=J===$?it:nt,ot=et?it:rt;f.style.left="auto",f.style.top="auto",f.style.right="0",f.style.bottom="0";var at=f.getBoundingClientRect();f.style.left=S,f.style.top=P,f.style.right=k,f.style.bottom=C,f.style.overflow=A,null===(h=f.parentElement)||void 0===h||h.removeChild(L);var st=B(Math.round(Y/parseFloat(v)*1e3)/1e3),lt=B(Math.round(V/parseFloat(b)*1e3)/1e3);if(0===st||0===lt||(0,c.Sh)(n)&&!(0,E.Z)(n))return;var ut=M.offset,ct=M.targetOffset,ht=F(N,ut),dt=(0,r.Z)(ht,2),ft=dt[0],pt=dt[1],gt=F(d,ct),mt=(0,r.Z)(gt,2),vt=mt[0],yt=mt[1];d.x-=vt,d.y-=yt;var wt=M.points||[],bt=(0,r.Z)(wt,2),xt=bt[0],St=z(bt[1]),Pt=z(xt),kt=G(d,St),Ct=G(N,Pt),At=(0,i.Z)({},M),Mt=kt.x-Ct.x+ft,Et=kt.y-Ct.y+pt;function xe(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rt,i=N.x+t,r=N.y+e,o=i+Y,a=r+V,s=Math.max(i,n.left),l=Math.max(r,n.top),u=Math.min(o,n.right),c=Math.min(a,n.bottom);return Math.max(0,(u-s)*(c-l))}var Lt,Tt,Nt,jt,It=xe(Mt,Et),Bt=xe(Mt,Et,it),Ot=G(d,["t","l"]),Dt=G(N,["t","l"]),Rt=G(d,["b","r"]),Ft=G(N,["b","r"]),zt=M.overflow||{},Gt=zt.adjustX,Ut=zt.adjustY,Ht=zt.shiftX,_t=zt.shiftY,Zt=function(t){return"boolean"==typeof t?t:t>=0};function Se(){Lt=N.y+Et,Tt=Lt+V,Nt=N.x+Mt,jt=Nt+Y}Se();var Wt=Zt(Ut),Vt=Pt[0]===St[0];if(Wt&&"t"===Pt[0]&&(Tt>ot.bottom||w.current.bt)){var Yt=Et;Vt?Yt-=V-X:Yt=Ot.y-Ft.y-pt;var Xt=xe(Mt,Yt),qt=xe(Mt,Yt,it);Xt>It||Xt===It&&(!et||qt>=Bt)?(w.current.bt=!0,Et=Yt,pt=-pt,At.points=[U(Pt,0),U(St,0)]):w.current.bt=!1}if(Wt&&"b"===Pt[0]&&(LtIt||Qt===It&&(!et||Jt>=Bt)?(w.current.tb=!0,Et=Kt,pt=-pt,At.points=[U(Pt,0),U(St,0)]):w.current.tb=!1}var $t=Zt(Gt),te=Pt[1]===St[1];if($t&&"l"===Pt[1]&&(jt>ot.right||w.current.rl)){var ee=Mt;te?ee-=Y-q:ee=Ot.x-Ft.x-ft;var ne=xe(ee,Et),ie=xe(ee,Et,it);ne>It||ne===It&&(!et||ie>=Bt)?(w.current.rl=!0,Mt=ee,ft=-ft,At.points=[U(Pt,1),U(St,1)]):w.current.rl=!1}if($t&&"r"===Pt[1]&&(NtIt||oe===It&&(!et||ae>=Bt)?(w.current.lr=!0,Mt=re,ft=-ft,At.points=[U(Pt,1),U(St,1)]):w.current.lr=!1}Se();var se=!0===Ht?0:Ht;"number"==typeof se&&(Ntit.right&&(Mt-=jt-it.right-ft,d.x>it.right-se&&(Mt+=d.x-it.right+se)));var le=!0===_t?0:_t;"number"==typeof le&&(Ltit.bottom&&(Et-=Tt-it.bottom-pt,d.y>it.bottom-le&&(Et+=d.y-it.bottom+le)));var ue=N.x+Mt,ce=ue+Y,he=N.y+Et,de=he+V,fe=d.x,pe=fe+q,ge=d.y,me=ge+X,ve=(Math.max(ue,fe)+Math.min(ce,pe))/2-ue,ye=(Math.max(he,ge)+Math.min(de,me))/2-he;null==l||l(e,At);var we=at.right-N.x-(Mt+N.width),be=at.bottom-N.y-(Et+N.height);g({ready:!0,offsetX:Mt/st,offsetY:Et/lt,offsetR:we/st,offsetB:be/lt,arrowX:ve/st,arrowY:ye/lt,scaleX:st,scaleY:lt,align:At})}})),x=function(){g((function(t){return(0,i.Z)((0,i.Z)({},t),{},{ready:!1})}))};return(0,p.Z)(x,[o]),(0,p.Z)((function(){t||x()}),[t]),[f.ready,f.offsetX,f.offsetY,f.offsetR,f.offsetB,f.arrowX,f.arrowY,f.scaleX,f.scaleY,f.align,function(){v.current+=1;var t=v.current;Promise.resolve().then((function(){v.current===t&&b()}))}]}var _=n(95190);function Z(t,e,n,i,r){(0,p.Z)((function(){if(t&&e&&n){var o=n,a=I(e),s=I(o),l=j(o),u=new Set([l].concat((0,_.Z)(a),(0,_.Z)(s)));function c(){i(),r()}return u.forEach((function(t){t.addEventListener("scroll",c,{passive:!0})})),l.addEventListener("resize",c,{passive:!0}),i(),function(){u.forEach((function(t){t.removeEventListener("scroll",c),l.removeEventListener("resize",c)}))}}}),[t,e,n])}n(48736);var W=n(16089);function V(t,e,n,i,o,a,s,l){var u=m.useRef(t),c=m.useRef(!1);u.current!==t&&(c.current=!0,u.current=t),m.useEffect((function(){var t=(0,W.Z)((function(){c.current=!1}));return function(){W.Z.cancel(t)}}),[t]),m.useEffect((function(){if(e&&i&&(!o||a)){var t=function(){var t=!1;return[function(e){var n=e.target;t=s(n)},function(e){var n=e.target;c.current||!u.current||t||s(n)||l(!1)}]},d=t(),f=(0,r.Z)(d,2),p=f[0],g=f[1],m=t(),v=(0,r.Z)(m,2),y=v[0],w=v[1],b=j(i);b.addEventListener("mousedown",p,!0),b.addEventListener("click",g,!0),b.addEventListener("contextmenu",g,!0);var x=(0,h.A)(n);return x&&(x.addEventListener("mousedown",y,!0),x.addEventListener("click",w,!0),x.addEventListener("contextmenu",w,!0)),function(){b.removeEventListener("mousedown",p,!0),b.removeEventListener("click",g,!0),b.removeEventListener("contextmenu",g,!0),x&&(x.removeEventListener("mousedown",y,!0),x.removeEventListener("click",w,!0),x.removeEventListener("contextmenu",w,!0))}}}),[e,n,i,o,a])}var Y=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];var X=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z,e=m.forwardRef((function(e,n){var a=e.prefixCls,s=void 0===a?"rc-trigger-popup":a,v=e.children,y=e.action,w=void 0===y?"hover":y,b=e.showAction,x=e.hideAction,S=e.popupVisible,A=e.defaultPopupVisible,E=e.onPopupVisibleChange,L=e.afterPopupVisibleChange,j=e.mouseEnterDelay,I=e.mouseLeaveDelay,B=void 0===I?.1:I,O=e.focusDelay,D=e.blurDelay,R=e.mask,F=e.maskClosable,z=void 0===F||F,G=e.getPopupContainer,U=e.forceRender,_=e.autoDestroy,W=e.destroyPopupOnHide,X=e.popup,q=e.popupClassName,K=e.popupStyle,Q=e.popupPlacement,J=e.builtinPlacements,$=void 0===J?{}:J,tt=e.popupAlign,et=e.zIndex,nt=e.stretch,it=e.getPopupClassNameFromAlign,rt=e.fresh,ot=e.alignPoint,at=e.onPopupClick,st=e.onPopupAlign,lt=e.arrow,ut=e.popupMotion,ct=e.maskMotion,ht=e.popupTransitionName,dt=e.popupAnimation,ft=e.maskTransitionName,pt=e.maskAnimation,gt=e.className,mt=e.getTriggerDOMNode,vt=(0,o.Z)(e,Y),yt=_||W||!1,wt=m.useState(!1),bt=(0,r.Z)(wt,2),xt=bt[0],St=bt[1];(0,p.Z)((function(){St((0,g.Z)())}),[]);var Pt=m.useRef({}),kt=m.useContext(C),Ct=m.useMemo((function(){return{registerSubPopup:function(t,e){Pt.current[t]=e,null==kt||kt.registerSubPopup(t,e)}}}),[kt]),At=(0,f.Z)(),Mt=m.useState(null),Et=(0,r.Z)(Mt,2),Lt=Et[0],Tt=Et[1],Nt=(0,d.Z)((function(t){(0,c.Sh)(t)&&Lt!==t&&Tt(t),null==kt||kt.registerSubPopup(At,t)})),jt=m.useState(null),It=(0,r.Z)(jt,2),Bt=It[0],Ot=It[1],Dt=m.useRef(null),Rt=(0,d.Z)((function(t){(0,c.Sh)(t)&&Bt!==t&&(Ot(t),Dt.current=t)})),Ft=m.Children.only(v),zt=(null==Ft?void 0:Ft.props)||{},Gt={},Ut=(0,d.Z)((function(t){var e,n,i=Bt;return(null==i?void 0:i.contains(t))||(null===(e=(0,h.A)(i))||void 0===e?void 0:e.host)===t||t===i||(null==Lt?void 0:Lt.contains(t))||(null===(n=(0,h.A)(Lt))||void 0===n?void 0:n.host)===t||t===Lt||Object.values(Pt.current).some((function(e){return(null==e?void 0:e.contains(t))||t===e}))})),Ht=N(s,ut,dt,ht),_t=N(s,ct,pt,ft),Zt=m.useState(A||!1),Wt=(0,r.Z)(Zt,2),Vt=Wt[0],Yt=Wt[1],Xt=null!=S?S:Vt,qt=(0,d.Z)((function(t){void 0===S&&Yt(t)}));(0,p.Z)((function(){Yt(S||!1)}),[S]);var Kt=m.useRef(Xt);Kt.current=Xt;var Qt=m.useRef([]);Qt.current=[];var Jt=(0,d.Z)((function(t){var e;qt(t),(null!==(e=Qt.current[Qt.current.length-1])&&void 0!==e?e:Xt)!==t&&(Qt.current.push(t),null==E||E(t))})),$t=m.useRef(),te=function(){clearTimeout($t.current)},ee=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;te(),0===e?Jt(t):$t.current=setTimeout((function(){Jt(t)}),1e3*e)};m.useEffect((function(){return te}),[]);var ne=m.useState(!1),ie=(0,r.Z)(ne,2),re=ie[0],oe=ie[1];(0,p.Z)((function(t){t&&!Xt||oe(!0)}),[Xt]);var ae=m.useState(null),se=(0,r.Z)(ae,2),le=se[0],ue=se[1],ce=m.useState([0,0]),he=(0,r.Z)(ce,2),de=he[0],fe=he[1],pe=function(t){fe([t.clientX,t.clientY])},ge=H(Xt,Lt,ot?de:Bt,Q,$,tt,st),me=(0,r.Z)(ge,11),ve=me[0],ye=me[1],we=me[2],be=me[3],xe=me[4],Se=me[5],Pe=me[6],ke=me[7],Ce=me[8],Ae=me[9],Me=me[10],Ee=M(xt,w,b,x),Le=(0,r.Z)(Ee,2),Te=Le[0],Ne=Le[1],je=Te.has("click"),Ie=Ne.has("click")||Ne.has("contextMenu"),Be=(0,d.Z)((function(){re||Me()}));Z(Xt,Bt,Lt,Be,(function(){Kt.current&&ot&&Ie&&ee(!1)})),(0,p.Z)((function(){Be()}),[de,Q]),(0,p.Z)((function(){!Xt||null!=$&&$[Q]||Be()}),[JSON.stringify(tt)]);var Oe=m.useMemo((function(){var t=T($,s,Ae,ot);return l()(t,null==it?void 0:it(Ae))}),[Ae,it,$,s,ot]);m.useImperativeHandle(n,(function(){return{nativeElement:Dt.current,forceAlign:Be}}));var De=m.useState(0),Re=(0,r.Z)(De,2),Fe=Re[0],ze=Re[1],Ge=m.useState(0),Ue=(0,r.Z)(Ge,2),He=Ue[0],_e=Ue[1],Ze=function(){if(nt&&Bt){var t=Bt.getBoundingClientRect();ze(t.width),_e(t.height)}};function We(t,e,n,i){Gt[t]=function(r){var o;null==i||i(r),ee(e,n);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l1?n-1:0),r=1;r1?n-1:0),r=1;ri.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+i.defaultValue);var r=go.Shape._FigureParameters[e];r||(r=[],go.Shape._FigureParameters[e]=r),r[n]=i};var e=[];function n(t,n){var i=e.pop();return void 0===i?new go.Point(t,n):(i.x=t,i.y=n,i)}function i(){var t=e.pop();return void 0===t?new go.Point:t}function r(t){e.push(t)}function o(t,e,n,i,r,o,a,s,l){l||(l=new go.Point);var u,c,h,d=t-n,f=r-a,p=NaN,g=NaN;0===d?0===f?t===n&&(p=t,g=e):g=(c=(o-s)/f)*(p=t)+(o-c*r):g=0===f?(u=(e-i)/d)*(p=r)+(h=e-u*t):(u=(e-i)/d)*(p=(o-(c=(o-s)/f)*r-(h=e-u*t))/(u-c))+h;return l.x=p,l.y=g,l}function a(t,e,n,i,r,o,a,s,l,u,c,h,d,f){var p=1-l,g=t*p+n*l,m=e*p+i*l,v=n*p+r*l,y=i*p+o*l,w=r*p+a*l,b=o*p+s*l,x=g*p+v*l,S=m*p+y*l,P=v*p+w*l,k=y*p+b*l,C=x*p+P*l,A=S*p+k*l;u.x=g,u.y=m,c.x=x,c.y=S,h.x=C,h.y=A,d.x=P,d.y=k,f.x=w,f.y=b}var s=new go.Spot(.156,.156),l=new go.Spot(.844,.844),u=(Math.sqrt(2)-1)/3*4;go.Shape.setFigureParameter("RoundedRectangle",0,new t("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",(function(t,e,n){var i=t?t.parameter1:NaN;(isNaN(i)||i<0)&&(i=5),i=Math.min(i,e/3);var r=(i=Math.min(i,n/3))*u,o=(new go.Geometry).add(new go.PathFigure(i,0,!0).add(new go.PathSegment(go.PathSegment.Line,e-i,0)).add(new go.PathSegment(go.PathSegment.Bezier,e,i,e-r,0,e,r)).add(new go.PathSegment(go.PathSegment.Line,e,n-i)).add(new go.PathSegment(go.PathSegment.Bezier,e-i,n,e,n-r,e-r,n)).add(new go.PathSegment(go.PathSegment.Line,i,n)).add(new go.PathSegment(go.PathSegment.Bezier,0,n-i,r,n,0,n-r)).add(new go.PathSegment(go.PathSegment.Line,0,i)).add(new go.PathSegment(go.PathSegment.Bezier,i,0,0,r,r,0).close()));return r>1&&(o.spot1=new go.Spot(0,0,r,r),o.spot2=new go.Spot(1,1,-r,-r)),o})),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,.25,.5,.75)})),go.Shape.defineFigureGenerator("TriangleDown",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,.5*e,n).close())).setSpots(.25,0,.75,.5)})),go.Shape.defineFigureGenerator("TriangleLeft",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(e,n).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,e,0).close())).setSpots(.5,.25,1,.75)})),go.Shape.defineFigureGenerator("TriangleUp",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(e,n).add(new go.PathSegment(go.PathSegment.Line,0,n)).add(new go.PathSegment(go.PathSegment.Line,.5*e,0).close())).setSpots(.25,.5,.75,1)})),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(.5*e,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.5*e,n)).add(new go.PathSegment(go.PathSegment.Line,e,.5*n).close())).setSpots(.25,.25,.75,.75)})),go.Shape.defineFigureGenerator("LineH",(function(t,e,n){var i=new go.Geometry(go.Geometry.Line);return i.startX=0,i.startY=n/2,i.endX=e,i.endY=n/2,i})),go.Shape.defineFigureGenerator("LineV",(function(t,e,n){var i=new go.Geometry(go.Geometry.Line);return i.startX=e/2,i.startY=0,i.endX=e/2,i.endY=n,i})),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,n/2,!1).add(new go.PathSegment(go.PathSegment.Line,e,n/2)).add(new go.PathSegment(go.PathSegment.Move,e/2,0)).add(new go.PathSegment(go.PathSegment.Line,e/2,n)))})),go.Shape.defineFigureGenerator("XLine",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,e,n)))})),go.Shape.defineFigureGenerator("LineRight",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(.25*e,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.25*e,n)))})),go.Shape.defineFigureGenerator("LineDown",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,.25*n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*e,.75*n)).add(new go.PathSegment(go.PathSegment.Line,e,.25*n)))})),go.Shape.defineFigureGenerator("LineLeft",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(.75*e,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.75*e,n)))})),go.Shape.defineFigureGenerator("LineUp",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,.75*n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*e,.25*n)).add(new go.PathSegment(go.PathSegment.Line,e,.75*n)))})),go.Shape.defineFigureGenerator("AsteriskLine",(function(t,e,n){var i=.2/Math.SQRT2;return(new go.Geometry).add(new go.PathFigure(i*e,(1-i)*n,!1).add(new go.PathSegment(go.PathSegment.Line,(1-i)*e,i*n)).add(new go.PathSegment(go.PathSegment.Move,i*e,i*n)).add(new go.PathSegment(go.PathSegment.Line,(1-i)*e,(1-i)*n)).add(new go.PathSegment(go.PathSegment.Move,0,n/2)).add(new go.PathSegment(go.PathSegment.Line,e,n/2)).add(new go.PathSegment(go.PathSegment.Move,e/2,0)).add(new go.PathSegment(go.PathSegment.Line,e/2,n)))})),go.Shape.defineFigureGenerator("CircleLine",(function(t,e,n){var i=e/2,r=(new go.Geometry).add(new go.PathFigure(e,e/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,i,i,i,i).close()));return r.spot1=s,r.spot2=l,r.defaultStretch=go.GraphObject.Uniform,r})),go.Shape.defineFigureGenerator("Line1",(function(t,e,n){var i=new go.Geometry(go.Geometry.Line);return i.startX=0,i.startY=0,i.endX=e,i.endY=n,i})),go.Shape.defineFigureGenerator("Line2",(function(t,e,n){var i=new go.Geometry(go.Geometry.Line);return i.startX=e,i.startY=0,i.endX=0,i.endY=n,i})),go.Shape.defineFigureGenerator("Curve1",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,e,n,u*e,0,e,(1-u)*n)))})),go.Shape.defineFigureGenerator("Curve2",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,e,n,0,u*n,(1-u)*e,n)))})),go.Shape.defineFigureGenerator("Curve3",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(e,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,n,e,u*n,u*e,n)))})),go.Shape.defineFigureGenerator("Curve4",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(e,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,n,(1-u)*e,0,0,(1-u)*n)))})),go.Shape.defineFigureGenerator("TriangleDownLeft",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,.5,.5,1)})),go.Shape.defineFigureGenerator("TriangleDownRight",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(e,0,!0).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(.5,.5,1,1)})),go.Shape.defineFigureGenerator("TriangleUpLeft",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,0,.5,.5)})),go.Shape.defineFigureGenerator("TriangleUpRight",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e,n).close())).setSpots(.5,0,1,.5)})),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new t("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)?i=.1:i<-1?i=-1:i>1&&(i=1);var r=Math.abs(i)*e;if(0===i)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=e,o.endY=n,o;var o=new go.Geometry;return i>0?o.add(new go.PathFigure(r,0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e-r,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,e-r,0)).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,r,n).close())),re&&(i=e);var r=Math.abs(i);if(0===i)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=e,o.endY=n,o;var o=new go.Geometry;return i>0?o.add(new go.PathFigure(r,0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e-r,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,e-r,0)).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,r,n).close())),r.5&&(i=.5);var r=Math.abs(i)*e;if(0===i)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=e,o.endY=n,o;var o=new go.Geometry;return i>0?o.add(new go.PathFigure(r,0).add(new go.PathSegment(go.PathSegment.Line,e-r,0)).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e-r,n)).add(new go.PathSegment(go.PathSegment.Line,r,n).close())),re&&(i=e/2);var r=Math.abs(i);if(0===i)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=e,o.endY=n,o;var o=new go.Geometry;return i>0?o.add(new go.PathFigure(r,0).add(new go.PathSegment(go.PathSegment.Line,e-r,0)).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e-r,n)).add(new go.PathSegment(go.PathSegment.Line,r,n).close())),re&&(i=e/2);var r=Math.abs(i);if(0===i)return(o=new go.Geometry(go.Geometry.Rectangle)).startX=0,o.startY=0,o.endX=e,o.endY=n,o;var o=new go.Geometry;return i>0?o.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e-r,n)).add(new go.PathSegment(go.PathSegment.Line,r,n).close())):o.add(new go.PathFigure(r,0).add(new go.PathSegment(go.PathSegment.Line,e-r,0)).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())),r0&&(a.add(new go.PathSegment(go.PathSegment.Move,e/2+u,e/2)),a.add(new go.PathSegment(go.PathSegment.Arc,0,-360,r,r,u,u).close())),o.spot1=s,o.spot2=l,o.defaultStretch=go.GraphObject.Uniform,o})),go.Shape.defineFigureGenerator("Cloud",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(.08034461*e,.1944299*n,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*e,.05349299*n,-.09239631*e,.07836421*n,.1406031*e,-.0542823*n)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*e,.074219*n,.2450511*e,-.00697547*n,.3776197*e,-.01112067*n)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*e,.07004196*n,.4539471*e,0,.6066018*e,-.02526587*n)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*e,.08370865*n,.6914277*e,-.01904177*n,.8921095*e,-.01220843*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*e,.3194596*n,1.036446*e,.04105738*n,1.020377*e,.3022052*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*e,.562044*n,1.04448*e,.360238*n,.992256*e,.5219009*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*e,.8217117*n,1.032337*e,.5771781*n,1.018411*e,.8120651*n)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*e,.9156953*n,1.028411*e,.9571472*n,.8556702*e,1.052487*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*e,.9310455*n,.7431877*e,1.009325*n,.5624123*e,1.021761*n)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*e,.9344623*n,.4820677*e,1.031761*n,.3030112*e,1.002796*n)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*e,.870098*n,.2329994*e,1.01518*n,.03213784*e,1.01518*n)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*e,.6545475*n,-.02812061*e,.9032597*n,-.01205169*e,.6835638*n)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*e,.4265613*n,-.01812061*e,.6089503*n,-.00606892*e,.4555777*n)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*e,.1944299*n,-.01606892*e,.3892545*n,-.01205169*e,.1944299*n))).setSpots(.1,.1,.9,.9)})),go.Shape.defineFigureGenerator("StopSign",(function(t,e,n){var i=1/(Math.SQRT2+2);return(new go.Geometry).add(new go.PathFigure(i*e,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-i)*e,0)).add(new go.PathSegment(go.PathSegment.Line,e,i*n)).add(new go.PathSegment(go.PathSegment.Line,e,(1-i)*n)).add(new go.PathSegment(go.PathSegment.Line,(1-i)*e,n)).add(new go.PathSegment(go.PathSegment.Line,i*e,n)).add(new go.PathSegment(go.PathSegment.Line,0,(1-i)*n)).add(new go.PathSegment(go.PathSegment.Line,0,i*n).close())).setSpots(i/2,i/2,1-i/2,1-i/2)})),go.Shape.setFigureParameter("Pie",0,new t("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new t("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",(function(t,e,n){var i=t?t.parameter1:NaN,r=t?t.parameter2:NaN;isNaN(i)&&(i=0),isNaN(r)&&(r=315);var o=i%360;o<0&&(o+=360);var a=r%360,s=Math.min(e,n)/2;return(new go.Geometry).add(new go.PathFigure(s,s).add(new go.PathSegment(go.PathSegment.Arc,o,a,s,s,s,s).close()))})),go.Shape.defineFigureGenerator("PiePiece",(function(t,e,n){var i=u/Math.SQRT2*.5,r=Math.SQRT2/2,o=1-Math.SQRT2/2;return(new go.Geometry).add(new go.PathFigure(e,n,!0).add(new go.PathSegment(go.PathSegment.Bezier,r*e,o*n,e,(1-i)*n,(r+i)*e,(o+i)*n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close()))})),go.Shape.setFigureParameter("ThickCross",0,new t("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",(function(t,e,n){var i=t?t.parameter1:NaN;(isNaN(i)||i<0)&&(i=30);var r=Math.min(i,e)/2,o=e/2,a=n/2;return(new go.Geometry).add(new go.PathFigure(o-r,0,!0).add(new go.PathSegment(go.PathSegment.Line,o+r,0)).add(new go.PathSegment(go.PathSegment.Line,o+r,a-r)).add(new go.PathSegment(go.PathSegment.Line,e,a-r)).add(new go.PathSegment(go.PathSegment.Line,e,a+r)).add(new go.PathSegment(go.PathSegment.Line,o+r,a+r)).add(new go.PathSegment(go.PathSegment.Line,o+r,n)).add(new go.PathSegment(go.PathSegment.Line,o-r,n)).add(new go.PathSegment(go.PathSegment.Line,o-r,a+r)).add(new go.PathSegment(go.PathSegment.Line,0,a+r)).add(new go.PathSegment(go.PathSegment.Line,0,a-r)).add(new go.PathSegment(go.PathSegment.Line,o-r,a-r).close()))})),go.Shape.setFigureParameter("ThinCross",0,new t("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",(function(t,e,n){var i=t?t.parameter1:NaN;(isNaN(i)||i<0)&&(i=10);var r=Math.min(i,e)/2,o=e/2,a=n/2;return(new go.Geometry).add(new go.PathFigure(o-r,0,!0).add(new go.PathSegment(go.PathSegment.Line,o+r,0)).add(new go.PathSegment(go.PathSegment.Line,o+r,a-r)).add(new go.PathSegment(go.PathSegment.Line,e,a-r)).add(new go.PathSegment(go.PathSegment.Line,e,a+r)).add(new go.PathSegment(go.PathSegment.Line,o+r,a+r)).add(new go.PathSegment(go.PathSegment.Line,o+r,n)).add(new go.PathSegment(go.PathSegment.Line,o-r,n)).add(new go.PathSegment(go.PathSegment.Line,o-r,a+r)).add(new go.PathSegment(go.PathSegment.Line,0,a+r)).add(new go.PathSegment(go.PathSegment.Line,0,a-r)).add(new go.PathSegment(go.PathSegment.Line,o-r,a-r).close()))})),go.Shape.setFigureParameter("ThickX",0,new t("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",(function(t,e,n){var i=t?t.parameter1:NaN;if((isNaN(i)||i<0)&&(i=30),0===e||0===n)return(u=new go.Geometry(go.Geometry.Rectangle)).startX=0,u.startY=0,u.endX=e,u.endY=n,u;var r=e/2,o=n/2,a=Math.atan2(n,e),s=i-Math.min(Math.cos(a)*i/2,r),l=i-Math.min(Math.sin(a)*i/2,o),u=new go.Geometry,c=new go.PathFigure(s,0,!0);return u.add(c),c.add(new go.PathSegment(go.PathSegment.Line,r,.2*n)),c.add(new go.PathSegment(go.PathSegment.Line,e-s,0)),c.add(new go.PathSegment(go.PathSegment.Line,e,l)),c.add(new go.PathSegment(go.PathSegment.Line,.8*e,o)),c.add(new go.PathSegment(go.PathSegment.Line,e,n-l)),c.add(new go.PathSegment(go.PathSegment.Line,e-s,n)),c.add(new go.PathSegment(go.PathSegment.Line,r,.8*n)),c.add(new go.PathSegment(go.PathSegment.Line,s,n)),c.add(new go.PathSegment(go.PathSegment.Line,0,n-l)),c.add(new go.PathSegment(go.PathSegment.Line,.2*e,o)),c.add(new go.PathSegment(go.PathSegment.Line,0,l).close()),u})),go.Shape.setFigureParameter("ThinX",0,new t("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",(function(t,e,n){var i=t?t.parameter1:NaN;(isNaN(i)||i<0)&&(i=10);var r=new go.Geometry,o=new go.PathFigure(.1*e,0,!0);return r.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*e,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.1*n).close()),r})),go.Shape.setFigureParameter("SquareIBeam",0,new t("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)&&(i=.2);var r=new go.Geometry,o=new go.PathFigure(0,0,!0);return r.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,i*n)),o.add(new go.PathSegment(go.PathSegment.Line,(.5+i/2)*e,i*n)),o.add(new go.PathSegment(go.PathSegment.Line,(.5+i/2)*e,(1-i)*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,(1-i)*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,(1-i)*n)),o.add(new go.PathSegment(go.PathSegment.Line,(.5-i/2)*e,(1-i)*n)),o.add(new go.PathSegment(go.PathSegment.Line,(.5-i/2)*e,i*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,i*n).close()),r})),go.Shape.setFigureParameter("RoundedIBeam",0,new t("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)&&(i=.5);var r=new go.Geometry,o=new go.PathFigure(0,0,!0);return r.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,e,n,Math.abs(1-i)*e,.25*n,Math.abs(1-i)*e,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,0,i*e,.75*n,i*e,.25*n).close()),r})),go.Shape.defineFigureGenerator("HalfEllipse",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,u*e,0,e,(.5-u/2)*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,n,e,(.5+u/2)*n,u*e,n).close())).setSpots(0,.156,.844,.844)})),go.Shape.defineFigureGenerator("Crescent",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,n,e,0,e,n)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*e,.75*n,.5*e,.25*n).close())).setSpots(.311,.266,.744,.744)})),go.Shape.defineFigureGenerator("Heart",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(.5*e,n,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*n,.1*e,.8*n,0,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.3*n,0,0,.45*e,0)).add(new go.PathSegment(go.PathSegment.Bezier,e,.3*n,.55*e,0,e,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n,e,.5*n,.9*e,.8*n).close())).setSpots(.14,.29,.86,.78)})),go.Shape.defineFigureGenerator("Spade",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(.5*e,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*e,.01*n)).add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,.6*e,.2*n,e,.25*n)).add(new go.PathSegment(go.PathSegment.Bezier,.55*e,.7*n,e,.8*n,.6*e,.8*n)).add(new go.PathSegment(go.PathSegment.Bezier,.75*e,n,.5*e,.75*n,.55*e,.95*n)).add(new go.PathSegment(go.PathSegment.Line,.25*e,n)).add(new go.PathSegment(go.PathSegment.Bezier,.45*e,.7*n,.45*e,.95*n,.5*e,.75*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.4*e,.8*n,0,.8*n)).add(new go.PathSegment(go.PathSegment.Bezier,.49*e,.01*n,0,.25*n,.4*e,.2*n).close())).setSpots(.14,.26,.86,.78)})),go.Shape.defineFigureGenerator("Club",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.4*e,.6*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.15*e,n,.5*e,.75*n,.45*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.85*e,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.6*e,.6*n,.55*e,.95*n,.5*e,.75*n));var o=.2,a=.3,s=0,l=o*u;return r.add(new go.PathSegment(go.PathSegment.Bezier,(.5+a)*e,(.5+o+s)*n,(.5-o+a)*e,(.5+l+s)*n,(.5-l+a)*e,(.5+o+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o+a)*e,(.5+s)*n,(.5+l+a)*e,(.5+o+s)*n,(.5+o+a)*e,(.5+l+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(.5+a)*e,(.5-o+s)*n,(.5+o+a)*e,(.5-l+s)*n,(.5+l+a)*e,(.5-o+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.65*e,.36771243*n,(.5-l+a)*e,(.5-o+s)*n,(.5-o+a+.05)*e,(.5-l+s-.02)*n)),a=0,s=-.3,l=(o=.2)*u,r.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o+a)*e,(.5+s)*n,(.5+l+a)*e,(.5+o+s)*n,(.5+o+a)*e,(.5+l+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(.5+a)*e,(.5-o+s)*n,(.5+o+a)*e,(.5-l+s)*n,(.5+l+a)*e,(.5-o+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(.5-o+a)*e,(.5+s)*n,(.5-l+a)*e,(.5-o+s)*n,(.5-o+a)*e,(.5-l+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(.5-l+a)*e,(.5+o+s)*n,(.5-o+a)*e,(.5+l+s)*n,(.5-l+a)*e,(.5+o+s)*n)),a=-.3,s=0,l=(o=.2)*u,r.add(new go.PathSegment(go.PathSegment.Bezier,(.5+a)*e,(.5-o+s)*n,(.5+o+a-.05)*e,(.5-l+s-.02)*n,(.5+l+a)*e,(.5-o+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(.5-o+a)*e,(.5+s)*n,(.5-l+a)*e,(.5-o+s)*n,(.5-o+a)*e,(.5-l+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(.5+a)*e,(.5+o+s)*n,(.5-o+a)*e,(.5+l+s)*n,(.5-l+a)*e,(.5+o+s)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.4*e,.6*n,(.5+l+a)*e,(.5+o+s)*n,(.5+o+a)*e,(.5+l+s)*n).close()),i.setSpots(.06,.33,.93,.68),i})),go.Shape.defineFigureGenerator("YinYang",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Arc,270,180,.5*e,.5*e,.5*e,.5*e)),r.add(new go.PathSegment(go.PathSegment.Arc,90,-180,.5*e,.75*e,.25*e,.25*e)),r.add(new go.PathSegment(go.PathSegment.Arc,90,180,.5*e,.25*e,.25*e,.25*e));var o=.1,a=.5,s=.25;return r.add(new go.PathSegment(go.PathSegment.Move,.6*e,s*n)),r.add(new go.PathSegment(go.PathSegment.Arc,0,-360,e*a,n*s,o*e,o*e).close()),r=new go.PathFigure(.5*e,0,!1),i.add(r),r.add(new go.PathSegment(go.PathSegment.Arc,270,-180,.5*e,.5*e,.5*e,.5*e)),s=.75,r=new go.PathFigure(.6*e,s*n,!0),i.add(r),r.add(new go.PathSegment(go.PathSegment.Arc,0,360,e*a,n*s,o*e,o*e).close()),i.defaultStretch=go.GraphObject.Uniform,i})),go.Shape.defineFigureGenerator("Peace",(function(t,e,n){var i=.8535533905932737,r=.5*e,o=.5*n;return(new go.Geometry).add(new go.PathFigure(r,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,r,o,r,o)).add(new go.PathSegment(go.PathSegment.Line,r,n)).add(new go.PathSegment(go.PathSegment.Move,r,o)).add(new go.PathSegment(go.PathSegment.Line,(1-i)*e,i*n)).add(new go.PathSegment(go.PathSegment.Move,r,o)).add(new go.PathSegment(go.PathSegment.Line,i*e,i*n)))})),go.Shape.defineFigureGenerator("NotAllowed",(function(t,e,n){var o=new go.Geometry,s=.5*u,l=.5,c=.5,h=.5,d=new go.PathFigure(c*e,(h-l)*n);o.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,(c-l)*e,h*n,(c-s)*e,(h-l)*n,(c-l)*e,(h-s)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h+l)*n,(c-l)*e,(h+s)*n,(c-s)*e,(h+l)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(c+l)*e,h*n,(c+s)*e,(h+l)*n,(c+l)*e,(h+s)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h-l)*n,(c+l)*e,(h-s)*n,(c+s)*e,(h-l)*n)),l=.4,s=.4*u;var f=i(),p=i(),g=i(),m=i();a(c,h-l,c+s,h-l,c+l,h-s,c+l,h,.42,f,p,g,m,m);var v=i(),y=i(),w=i();a(c,h-l,c+s,h-l,c+l,h-s,c+l,h,.58,m,m,w,v,y);var b=i(),x=i(),S=i();a(c,h+l,c-s,h+l,c-l,h+s,c-l,h,.42,b,x,S,m,m);var P=i(),k=i(),C=i();return a(c,h+l,c-s,h+l,c-l,h+s,c-l,h,.58,m,m,C,P,k),d.add(new go.PathSegment(go.PathSegment.Move,C.x*e,C.y*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(c-l)*e,h*n,P.x*e,P.y*n,k.x*e,k.y*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h-l)*n,(c-l)*e,(h-s)*n,(c-s)*e,(h-l)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,g.x*e,g.y*n,f.x*e,f.y*n,p.x*e,p.y*n)),d.add(new go.PathSegment(go.PathSegment.Line,C.x*e,C.y*n).close()),d.add(new go.PathSegment(go.PathSegment.Move,S.x*e,S.y*n)),d.add(new go.PathSegment(go.PathSegment.Line,w.x*e,w.y*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(c+l)*e,h*n,v.x*e,v.y*n,y.x*e,y.y*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h+l)*n,(c+l)*e,(h+s)*n,(c+s)*e,(h+l)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,S.x*e,S.y*n,b.x*e,b.y*n,x.x*e,x.y*n).close()),r(f),r(p),r(g),r(m),r(v),r(y),r(w),r(b),r(x),r(S),r(P),r(k),r(C),o.defaultStretch=go.GraphObject.Uniform,o})),go.Shape.defineFigureGenerator("Fragile",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*e,0)).add(new go.PathSegment(go.PathSegment.Line,.2*e,.15*n)).add(new go.PathSegment(go.PathSegment.Line,.3*e,.25*n)).add(new go.PathSegment(go.PathSegment.Line,.29*e,.33*n)).add(new go.PathSegment(go.PathSegment.Line,.35*e,.25*n)).add(new go.PathSegment(go.PathSegment.Line,.3*e,.15*n)).add(new go.PathSegment(go.PathSegment.Line,.4*e,0)).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*e,.5*n,e,.25*n,.75*e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.55*e,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.7*e,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.7*e,n)).add(new go.PathSegment(go.PathSegment.Line,.3*e,n)).add(new go.PathSegment(go.PathSegment.Line,.3*e,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.45*e,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.45*e,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*e,.5*n,0,.25*n).close()))})),go.Shape.setFigureParameter("HourGlass",0,new t("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",(function(t,e,n){var i=t?t.parameter1:NaN;(isNaN(i)||i<0)&&(i=30),i>e&&(i=e);var r=(e-i)/2,o=r+i;return(new go.Geometry).add(new go.PathFigure(o,.5*n).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,0,n)).add(new go.PathSegment(go.PathSegment.Line,r,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,e,0).close()))})),go.Shape.defineFigureGenerator("Lightning",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,.55*n).add(new go.PathSegment(go.PathSegment.Line,.6*e,0)).add(new go.PathSegment(go.PathSegment.Line,.3*e,.45*n)).add(new go.PathSegment(go.PathSegment.Line,e,.45*n)).add(new go.PathSegment(go.PathSegment.Line,.4*e,n)).add(new go.PathSegment(go.PathSegment.Line,.7*e,.55*n).close()))})),go.Shape.defineFigureGenerator("GenderMale",(function(t,e,o){var s=new go.Geometry,l=.4*u,c=.4,h=.5,d=.5,f=i(),p=i(),g=i(),m=i(),v=new go.PathFigure((h-c)*e,d*o,!1);s.add(v),v.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d-c)*o,(h-c)*e,(d-l)*o,(h-l)*e,(d-c)*o)),a(h,d-c,h+l,d-c,h+c,d-l,h+c,d,.44,g,m,p,f,f),v.add(new go.PathSegment(go.PathSegment.Bezier,p.x*e,p.y*o,g.x*e,g.y*o,m.x*e,m.y*o));var y=n(p.x,p.y);a(h,d-c,h+l,d-c,h+c,d-l,h+c,d,.56,f,f,p,g,m);var w=n(p.x,p.y);v.add(new go.PathSegment(go.PathSegment.Line,(.1*y.x+.855)*e,.1*y.y*o)),v.add(new go.PathSegment(go.PathSegment.Line,.85*e,.1*y.y*o)),v.add(new go.PathSegment(go.PathSegment.Line,.85*e,0)),v.add(new go.PathSegment(go.PathSegment.Line,e,0)),v.add(new go.PathSegment(go.PathSegment.Line,e,.15*o)),v.add(new go.PathSegment(go.PathSegment.Line,(.1*w.x+.9)*e,.15*o)),v.add(new go.PathSegment(go.PathSegment.Line,(.1*w.x+.9)*e,(.1*w.y+.05*.9)*o)),v.add(new go.PathSegment(go.PathSegment.Line,w.x*e,w.y*o)),v.add(new go.PathSegment(go.PathSegment.Bezier,(h+c)*e,d*o,g.x*e,g.y*o,m.x*e,m.y*o)),v.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d+c)*o,(h+c)*e,(d+l)*o,(h+l)*e,(d+c)*o)),v.add(new go.PathSegment(go.PathSegment.Bezier,(h-c)*e,d*o,(h-l)*e,(d+c)*o,(h-c)*e,(d+l)*o)),c=.35,l=.35*u;var b=new go.PathFigure(h*e,(d-c)*o,!1);s.add(b),b.add(new go.PathSegment(go.PathSegment.Bezier,(h-c)*e,d*o,(h-l)*e,(d-c)*o,(h-c)*e,(d-l)*o)),b.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d+c)*o,(h-c)*e,(d+l)*o,(h-l)*e,(d+c)*o)),b.add(new go.PathSegment(go.PathSegment.Bezier,(h+c)*e,d*o,(h+l)*e,(d+c)*o,(h+c)*e,(d+l)*o)),b.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d-c)*o,(h+c)*e,(d-l)*o,(h+l)*e,(d-c)*o));var x=new go.PathFigure((h-c)*e,d*o,!1);return s.add(x),r(f),r(p),r(g),r(m),r(y),r(w),s.spot1=new go.Spot(.202,.257),s.spot2=new go.Spot(.792,.739),s.defaultStretch=go.GraphObject.Uniform,s})),go.Shape.defineFigureGenerator("GenderFemale",(function(t,e,n){var i=new go.Geometry,r=.375,o=0,a=-.125,s=r*u,l=new go.PathFigure((.525+o)*e,(.5+r+a)*n,!1);i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,(.5+r+o)*e,(.5+a)*n,(.5+s+o)*e,(.5+r+a)*n,(.5+r+o)*e,(.5+s+a)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o)*e,(.5-r+a)*n,(.5+r+o)*e,(.5-s+a)*n,(.5+s+o)*e,(.5-r+a)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(.5-r+o)*e,(.5+a)*n,(.5-s+o)*e,(.5-r+a)*n,(.5-r+o)*e,(.5-s+a)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(.475+o)*e,(.5+r+a)*n,(.5-r+o)*e,(.5+s+a)*n,(.5-s+o)*e,(.5+r+a)*n)),l.add(new go.PathSegment(go.PathSegment.Line,.475*e,.85*n)),l.add(new go.PathSegment(go.PathSegment.Line,.425*e,.85*n)),l.add(new go.PathSegment(go.PathSegment.Line,.425*e,.9*n)),l.add(new go.PathSegment(go.PathSegment.Line,.475*e,.9*n)),l.add(new go.PathSegment(go.PathSegment.Line,.475*e,n)),l.add(new go.PathSegment(go.PathSegment.Line,.525*e,n)),l.add(new go.PathSegment(go.PathSegment.Line,.525*e,.9*n)),l.add(new go.PathSegment(go.PathSegment.Line,.575*e,.9*n)),l.add(new go.PathSegment(go.PathSegment.Line,.575*e,.85*n)),l.add(new go.PathSegment(go.PathSegment.Line,.525*e,.85*n).close()),o=0,a=-.125,s=(r=.325)*u;l=new go.PathFigure((.5+r+o)*e,(.5+a)*n,!1);i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o)*e,(.5+r+a)*n,(.5+r+o)*e,(.5+s+a)*n,(.5+s+o)*e,(.5+r+a)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(.5-r+o)*e,(.5+a)*n,(.5-s+o)*e,(.5+r+a)*n,(.5-r+o)*e,(.5+s+a)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o)*e,(.5-r+a)*n,(.5-r+o)*e,(.5-s+a)*n,(.5-s+o)*e,(.5-r+a)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(.5+r+o)*e,(.5+a)*n,(.5+s+o)*e,(.5-r+a)*n,(.5+r+o)*e,(.5-s+a)*n));l=new go.PathFigure((.525+o)*e,(.5+r+a)*n,!1);return i.add(l),i.spot1=new go.Spot(.232,.136),i.spot2=new go.Spot(.682,.611),i.defaultStretch=go.GraphObject.Uniform,i})),go.Shape.defineFigureGenerator("LogicImplies",(function(t,e,n){var i=t?t.parameter1:NaN;return isNaN(i)&&(i=.2),(new go.Geometry).add(new go.PathFigure((1-i)*e,0,!1).add(new go.PathSegment(go.PathSegment.Line,e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,(1-i)*e,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,e,.5*n))).setSpots(0,0,.8,.5)})),go.Shape.defineFigureGenerator("LogicIff",(function(t,e,n){var i=t?t.parameter1:NaN;return isNaN(i)&&(i=.2),(new go.Geometry).add(new go.PathFigure((1-i)*e,0,!1).add(new go.PathSegment(go.PathSegment.Line,e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,(1-i)*e,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,e,.5*n)).add(new go.PathSegment(go.PathSegment.Move,i*e,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,i*e,n))).setSpots(.2,0,.8,.5)})),go.Shape.defineFigureGenerator("LogicNot",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e,n)))})),go.Shape.defineFigureGenerator("LogicAnd",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*e,0)).add(new go.PathSegment(go.PathSegment.Line,e,n))).setSpots(.25,.5,.75,1)})),go.Shape.defineFigureGenerator("LogicOr",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*e,n)).add(new go.PathSegment(go.PathSegment.Line,e,0))).setSpots(.219,0,.78,.409)})),go.Shape.defineFigureGenerator("LogicXor",(function(t,e,n){var i=(new go.Geometry).add(new go.PathFigure(.5*e,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*e,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,e,.5*n)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*e,.5*n,.5*e,.5*n)));return i.defaultStretch=go.GraphObject.Uniform,i})),go.Shape.defineFigureGenerator("LogicTruth",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Move,.5*e,0)).add(new go.PathSegment(go.PathSegment.Line,.5*e,n)))})),go.Shape.defineFigureGenerator("LogicFalsity",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Move,.5*e,n)).add(new go.PathSegment(go.PathSegment.Line,.5*e,0)))})),go.Shape.defineFigureGenerator("LogicThereExists",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Move,e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,0,n)))})),go.Shape.defineFigureGenerator("LogicForAll",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*e,n)).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Move,.25*e,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.75*e,.5*n))).setSpots(.25,0,.75,.5)})),go.Shape.defineFigureGenerator("LogicIsDefinedAs",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,e,.5*n)).add(new go.PathSegment(go.PathSegment.Move,0,n)).add(new go.PathSegment(go.PathSegment.Line,e,n))).setSpots(.01,.01,.99,.49)})),go.Shape.defineFigureGenerator("LogicIntersect",(function(t,e,n){var i=.5;return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,0,i*n)).add(new go.PathSegment(go.PathSegment.Arc,180,180,i*e,i*n,i*e,i*n)).add(new go.PathSegment(go.PathSegment.Line,e,n))).setSpots(0,.5,1,1)})),go.Shape.defineFigureGenerator("LogicUnion",(function(t,e,n){var i=.5;return(new go.Geometry).add(new go.PathFigure(e,0,!1).add(new go.PathSegment(go.PathSegment.Line,e,i*n)).add(new go.PathSegment(go.PathSegment.Arc,0,180,i*e,i*n,i*e,i*n)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)})),go.Shape.setFigureParameter("Arrow",0,new t("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new t("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=.3);var s=t?t.parameter2:NaN;isNaN(s)&&(s=.3);var l=(1-a)*e,u=(.5-s/2)*n,c=(.5+s/2)*n,h=new go.Geometry,d=new go.PathFigure(0,u,!0);h.add(d),d.add(new go.PathSegment(go.PathSegment.Line,l,u)),d.add(new go.PathSegment(go.PathSegment.Line,l,0)),d.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),d.add(new go.PathSegment(go.PathSegment.Line,l,n)),d.add(new go.PathSegment(go.PathSegment.Line,l,c)),d.add(new go.PathSegment(go.PathSegment.Line,0,c).close()),h.spot1=new go.Spot(0,u/n);var f=o(0,c/n,1,c/n,l/e,1,1,.5,i());return h.spot2=new go.Spot(f.x,f.y),r(f),h})),go.Shape.setFigureParameter("Arrow2",0,new t("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new t("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=30),a>e&&(a=e);var s=t?t.parameter2:NaN;isNaN(s)&&(s=30);var l=e-a,u=(n-(s=Math.min(s,n/2)))/2,c=u+s,h=new go.Geometry,d=new go.PathFigure(0,u,!0);h.add(d),d.add(new go.PathSegment(go.PathSegment.Line,l,u)),d.add(new go.PathSegment(go.PathSegment.Line,l,0)),d.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),d.add(new go.PathSegment(go.PathSegment.Line,l,n)),d.add(new go.PathSegment(go.PathSegment.Line,l,c)),d.add(new go.PathSegment(go.PathSegment.Line,0,c).close()),h.spot1=new go.Spot(0,u/n);var f=o(0,c/n,1,c/n,l/e,1,1,.5,i());return h.spot2=new go.Spot(f.x,f.y),r(f),h})),go.Shape.defineFigureGenerator("Chevron",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n).close()),i})),go.Shape.defineFigureGenerator("DoubleArrow",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,.214*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,.786*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,1*n).close()),i})),go.Shape.setFigureParameter("DoubleEndArrow",0,new t("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=.3);var s=(.5-a/2)*n,l=(.5+a/2)*n,u=new go.Geometry,c=new go.PathFigure(e,.5*n,!0);u.add(c),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,n)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,l)),c.add(new go.PathSegment(go.PathSegment.Line,.3*e,l)),c.add(new go.PathSegment(go.PathSegment.Line,.3*e,n)),c.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),c.add(new go.PathSegment(go.PathSegment.Line,.3*e,0)),c.add(new go.PathSegment(go.PathSegment.Line,.3*e,s)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,s)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,0).close());var h=o(0,.5,.3,0,0,s/n,.1,s/n,i());return u.spot1=new go.Spot(h.x,h.y),h=o(.7,1,1,.5,0,l/n,1,l/n,h),u.spot2=new go.Spot(h.x,h.y),r(h),u})),go.Shape.setFigureParameter("DoubleEndArrow2",0,new t("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new t("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=40);var s=t?t.parameter2:NaN;isNaN(s)&&(s=100);var l=(n-a)/2,u=l+a,c=(n-s)/2,h=c+s;(a>n||s>n)&&(s>a?(u=(l=(n-(a=a*n/s))/2)+a,c=0,h=n):(l=0,u=n,c=0,h=n));var d=new go.Geometry,f=new go.PathFigure(e,.5*n,!0);d.add(f),f.add(new go.PathSegment(go.PathSegment.Line,.7*e,h)),f.add(new go.PathSegment(go.PathSegment.Line,.7*e,u)),f.add(new go.PathSegment(go.PathSegment.Line,.3*e,u)),f.add(new go.PathSegment(go.PathSegment.Line,.3*e,h)),f.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),f.add(new go.PathSegment(go.PathSegment.Line,.3*e,c)),f.add(new go.PathSegment(go.PathSegment.Line,.3*e,l)),f.add(new go.PathSegment(go.PathSegment.Line,.7*e,l)),f.add(new go.PathSegment(go.PathSegment.Line,.7*e,c).close());var p=o(0,.5,.3,c/n,0,l/n,1,l/n,i());return d.spot1=new go.Spot(p.x,p.y),p=o(.7,h/n,1,.5,0,u/n,1,u/n,p),d.spot2=new go.Spot(p.x,p.y),r(p),d})),go.Shape.setFigureParameter("IBeamArrow",0,new t("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=.3);var s=(.5-a/2)*n,l=(.5+a/2)*n,u=new go.Geometry,c=new go.PathFigure(e,.5*n,!0);u.add(c),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,n)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,l)),c.add(new go.PathSegment(go.PathSegment.Line,.2*e,l)),c.add(new go.PathSegment(go.PathSegment.Line,.2*e,n)),c.add(new go.PathSegment(go.PathSegment.Line,0,n)),c.add(new go.PathSegment(go.PathSegment.Line,0,0)),c.add(new go.PathSegment(go.PathSegment.Line,.2*e,0)),c.add(new go.PathSegment(go.PathSegment.Line,.2*e,s)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,s)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,0).close()),u.spot1=new go.Spot(0,s/n);var h=o(.7,1,1,.5,0,l/n,1,l/n,i());return u.spot2=new go.Spot(h.x,h.y),r(h),u})),go.Shape.setFigureParameter("IBeamArrow2",0,new t("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new t("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=40);var s=t?t.parameter2:NaN;isNaN(s)&&(s=100);var l=(n-a)/2,u=l+a,c=(n-s)/2,h=c+s;(a>n||s>n)&&(s>a?(u=(l=(n-(a=a*n/s))/2)+a,c=0,h=n):(l=0,u=n,c=0,h=n));var d=new go.Geometry,f=new go.PathFigure(e,.5*n,!0);d.add(f),f.add(new go.PathSegment(go.PathSegment.Line,.7*e,h)),f.add(new go.PathSegment(go.PathSegment.Line,.7*e,u)),f.add(new go.PathSegment(go.PathSegment.Line,.2*e,u)),f.add(new go.PathSegment(go.PathSegment.Line,.2*e,h)),f.add(new go.PathSegment(go.PathSegment.Line,0,h)),f.add(new go.PathSegment(go.PathSegment.Line,0,c)),f.add(new go.PathSegment(go.PathSegment.Line,.2*e,c)),f.add(new go.PathSegment(go.PathSegment.Line,.2*e,l)),f.add(new go.PathSegment(go.PathSegment.Line,.7*e,l)),f.add(new go.PathSegment(go.PathSegment.Line,.7*e,c).close()),d.spot1=new go.Spot(0,l/n);var p=o(.7,h/n,1,.5,0,u/n,1,u/n,i());return d.spot2=new go.Spot(p.x,p.y),r(p),d})),go.Shape.setFigureParameter("Pointer",0,new t("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=.1);var s=new go.Geometry,l=new go.PathFigure(e,.5*n,!0);s.add(l),l.add(new go.PathSegment(go.PathSegment.Line,0,n)),l.add(new go.PathSegment(go.PathSegment.Line,a*e,.5*n)),l.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),s.spot1=new go.Spot(a,.35);var u=o(.2,.65,1,.65,0,1,1,.5,i());return s.spot2=new go.Spot(u.x,u.y),r(u),s})),go.Shape.setFigureParameter("RoundedPointer",0,new t("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=.3);var s=new go.Geometry,l=new go.PathFigure(e,.5*n,!0);s.add(l),l.add(new go.PathSegment(go.PathSegment.Line,0,n)),l.add(new go.PathSegment(go.PathSegment.Bezier,0,0,a*e,.75*n,a*e,.25*n).close()),s.spot1=new go.Spot(a,.35);var u=o(0,.65,1,.65,0,1,1,.5,i());return s.spot2=new go.Spot(u.x,u.y),r(u),s})),go.Shape.setFigureParameter("SplitEndArrow",0,new t("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=.4);var s=(.5-a/2)*n,l=(.5+a/2)*n,u=new go.Geometry,c=new go.PathFigure(e,.5*n,!0);u.add(c),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,n)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,l)),c.add(new go.PathSegment(go.PathSegment.Line,0,l)),c.add(new go.PathSegment(go.PathSegment.Line,.2*e,.5*n)),c.add(new go.PathSegment(go.PathSegment.Line,0,s)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,s)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,0).close()),u.spot1=new go.Spot(.2,.3);var h=o(.7,1,1,.5,0,l/n,1,l/n,i());return u.spot2=new go.Spot(h.x,h.y),r(h),u})),go.Shape.setFigureParameter("SplitEndArrow2",0,new t("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",(function(t,e,n){var a=t?t.parameter1:NaN;isNaN(a)&&(a=50);var s=(n-a)/2,l=s+a;a>n&&(s=0,l=n);var u=new go.Geometry,c=new go.PathFigure(e,.5*n,!0);u.add(c),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,n)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,l)),c.add(new go.PathSegment(go.PathSegment.Line,0,l)),c.add(new go.PathSegment(go.PathSegment.Line,.2*e,.5*n)),c.add(new go.PathSegment(go.PathSegment.Line,0,s)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,s)),c.add(new go.PathSegment(go.PathSegment.Line,.7*e,0).close()),u.spot1=new go.Spot(.2,s/n);var h=o(.7,1,1,.5,0,l/n,1,l/n,i());return u.spot2=new go.Spot(h.x,h.y),r(h),u})),go.Shape.setFigureParameter("SquareArrow",0,new t("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)&&(i=.7);var r=new go.Geometry,o=new go.PathFigure(e,.5*n,!0);return r.add(o),o.add(new go.PathSegment(go.PathSegment.Line,i*e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Line,i*e,0).close()),r.spot1=go.Spot.TopLeft,r.spot2=new go.Spot(i,1),r})),go.Shape.defineFigureGenerator("Cone1",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.1*u,a=new go.PathFigure(0,.9*n,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),a.add(new go.PathSegment(go.PathSegment.Line,e,.9*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n,e,(.9+o)*n,(.5+r)*e,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-r)*e,n,0,(.9+o)*n).close()),i.spot1=new go.Spot(.25,.5),i.spot2=new go.Spot(.75,.97),i})),go.Shape.defineFigureGenerator("Cone2",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.9*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,e,.9*n,(1-.85/.9)*e,n,.85/.9*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,0,.9*n).close());var o=new go.PathFigure(0,.9*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,e,.9*n,(1-.85/.9)*e,.8*n,.85/.9*e,.8*n)),i.spot1=new go.Spot(.25,.5),i.spot2=new go.Spot(.75,.82),i})),go.Shape.defineFigureGenerator("Cube1",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.15*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,0,.15*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.85*n).close());var o=new go.PathFigure(.5*e,n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.15*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*e,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,.15*n)),i.spot1=new go.Spot(0,.3),i.spot2=new go.Spot(.5,.85),i})),go.Shape.defineFigureGenerator("Cube2",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.3*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,0).close());var o=new go.PathFigure(0,.3*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.7*e,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Move,.7*e,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*e,n)),i.spot1=new go.Spot(0,.3),i.spot2=new go.Spot(.7,1),i})),go.Shape.defineFigureGenerator("Cylinder1",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)&&(i=5),i=Math.min(i,n/3);var r=new go.Geometry,o=.5*u,a=new go.PathFigure(0,i,!0);r.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0,0,u*i,(.5-o)*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,1*e,i,(.5+o)*e,0,1*e,u*i)),a.add(new go.PathSegment(go.PathSegment.Line,e,n-i)),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,1*n,1*e,n-u*i,(.5+o)*e,1*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,n-i,(.5-o)*e,1*n,0,n-u*i)),a.add(new go.PathSegment(go.PathSegment.Line,0,i));var s=new go.PathFigure(e,i,!1);return r.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,2*i,1*e,2*i-u*i,(.5+o)*e,2*i)),s.add(new go.PathSegment(go.PathSegment.Bezier,0,i,(.5-o)*e,2*i,0,2*i-u*i)),r.spot1=new go.Spot(0,0,0,2*i),r.spot2=new go.Spot(1,1),r})),go.Shape.defineFigureGenerator("Cylinder2",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)&&(i=5),i=Math.min(i,n/3);var r=new go.Geometry,o=.5*u,a=new go.PathFigure(0,n-i,!0);r.add(a),a.add(new go.PathSegment(go.PathSegment.Line,0,i)),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0,0,u*i,(.5-o)*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,i,(.5+o)*e,0,e,u*i)),a.add(new go.PathSegment(go.PathSegment.Line,e,n-i)),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n,e,n-u*i,(.5+o)*e,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,n-i,(.5-o)*e,n,0,n-u*i));var s=new go.PathFigure(0,n-i,!1);return r.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n-2*i,0,n-i-u*i,(.5-o)*e,n-2*i)),s.add(new go.PathSegment(go.PathSegment.Bezier,e,n-i,(.5+o)*e,n-2*i,e,n-i-u*i)),r.spot1=new go.Spot(0,0),r.spot2=new go.Spot(1,1,0,-2*i),r})),go.Shape.defineFigureGenerator("Cylinder3",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)&&(i=5),i=Math.min(i,e/3);var r=new go.Geometry,o=.5*u,a=new go.PathFigure(i,0,!0);r.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e-i,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,e-u*i,0,e,(.5-o)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,e-i,n,e,(.5+o)*n,e-u*i,n)),a.add(new go.PathSegment(go.PathSegment.Line,i,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,u*i,n,0,(.5+o)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,i,0,0,(.5-o)*n,u*i,0));var s=new go.PathFigure(i,0,!1);return r.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,2*i,.5*n,i+u*i,0,2*i,(.5-o)*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,i,n,2*i,(.5+o)*n,i+u*i,n)),r.spot1=new go.Spot(0,0,2*i,0),r.spot2=new go.Spot(1,1),r})),go.Shape.defineFigureGenerator("Cylinder4",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)&&(i=5),i=Math.min(i,e/3);var r=new go.Geometry,o=.5*u,a=new go.PathFigure(e-i,0,!0);r.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,e-u*i,0,e,(.5-o)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,e-i,n,e,(.5+o)*n,e-u*i,n)),a.add(new go.PathSegment(go.PathSegment.Line,i,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,u*i,n,0,(.5+o)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,i,0,0,(.5-o)*n,u*i,0)),a.add(new go.PathSegment(go.PathSegment.Line,e-i,0));var s=new go.PathFigure(e-i,0,!1);return r.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,e-2*i,.5*n,e-i-u*i,0,e-2*i,(.5-o)*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,e-i,n,e-2*i,(.5+o)*n,e-i-u*i,n)),r.spot1=new go.Spot(0,0),r.spot2=new go.Spot(1,1,-2*i,0),r})),go.Shape.defineFigureGenerator("Prism1",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.25*e,.25*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var o=new go.PathFigure(.25*e,.25*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),i.spot1=new go.Spot(.408,.172),i.spot2=new go.Spot(.833,.662),i})),go.Shape.defineFigureGenerator("Prism2",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.25*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var o=new go.PathFigure(0,n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.25*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,.25*n)),o.add(new go.PathSegment(go.PathSegment.Move,0,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*e,.5*n)),i.spot1=new go.Spot(.25,.5),i.spot2=new go.Spot(.75,.75),i})),go.Shape.defineFigureGenerator("Pyramid1",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.75*n).close());var o=new go.PathFigure(.5*e,0,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),i.spot1=new go.Spot(.25,.367),i.spot2=new go.Spot(.75,.875),i})),go.Shape.defineFigureGenerator("Pyramid2",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.85*n).close());var o=new go.PathFigure(.5*e,0,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.85*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*e,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,.85*n)),i.spot1=new go.Spot(.25,.367),i.spot2=new go.Spot(.75,.875),i})),go.Shape.defineFigureGenerator("Actor",(function(t,e,n){var i=new go.Geometry,r=.2,o=.1,a=u*r,s=u*o,l=.5,c=.1,h=new go.PathFigure(l*e,(c+o)*n,!0);i.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,(l-r)*e,c*n,(l-a)*e,(c+o)*n,(l-r)*e,(c+s)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c-o)*n,(l-r)*e,(c-s)*n,(l-a)*e,(c-o)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(l+r)*e,c*n,(l+a)*e,(c-o)*n,(l+r)*e,(c-s)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c+o)*n,(l+r)*e,(c+s)*n,(l+a)*e,(c+o)*n));var d=.05,f=u*d;l=.05,c=.25;var p=new go.PathFigure(.5*e,.2*n,!0);return i.add(p),p.add(new go.PathSegment(go.PathSegment.Line,.95*e,.2*n)),l=.95,c=.25,p.add(new go.PathSegment(go.PathSegment.Bezier,(l+d)*e,c*n,(l+f)*e,(c-d)*n,(l+d)*e,(c-f)*n)),p.add(new go.PathSegment(go.PathSegment.Line,e,.6*n)),p.add(new go.PathSegment(go.PathSegment.Line,.85*e,.6*n)),p.add(new go.PathSegment(go.PathSegment.Line,.85*e,.35*n)),f=u*(d=.025),l=.825,c=.35,p.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c-d)*n,(l+d)*e,(c-f)*n,(l+f)*e,(c-d)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,(l-d)*e,c*n,(l-f)*e,(c-d)*n,(l-d)*e,(c-f)*n)),p.add(new go.PathSegment(go.PathSegment.Line,.8*e,n)),p.add(new go.PathSegment(go.PathSegment.Line,.55*e,n)),p.add(new go.PathSegment(go.PathSegment.Line,.55*e,.7*n)),f=u*(d=.05),l=.5,c=.7,p.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c-d)*n,(l+d)*e,(c-f)*n,(l+f)*e,(c-d)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,(l-d)*e,c*n,(l-f)*e,(c-d)*n,(l-d)*e,(c-f)*n)),p.add(new go.PathSegment(go.PathSegment.Line,.45*e,n)),p.add(new go.PathSegment(go.PathSegment.Line,.2*e,n)),p.add(new go.PathSegment(go.PathSegment.Line,.2*e,.35*n)),f=u*(d=.025),l=.175,c=.35,p.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c-d)*n,(l+d)*e,(c-f)*n,(l+f)*e,(c-d)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,(l-d)*e,c*n,(l-f)*e,(c-d)*n,(l-d)*e,(c-f)*n)),p.add(new go.PathSegment(go.PathSegment.Line,.15*e,.6*n)),p.add(new go.PathSegment(go.PathSegment.Line,0,.6*n)),p.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),f=u*(d=.05),l=.05,c=.25,p.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c-d)*n,(l-d)*e,(c-f)*n,(l-f)*e,(c-d)*n)),p.add(new go.PathSegment(go.PathSegment.Line,.5*e,.2*n)),i.spot1=new go.Spot(.2,.2),i.spot2=new go.Spot(.8,.65),i})),go.Shape.setFigureParameter("Card",0,new t("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",(function(t,e,n){var i=t?t.parameter1:NaN;isNaN(i)&&(i=.2);var r=new go.Geometry,o=new go.PathFigure(e,0,!0);return r.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,i*n)),o.add(new go.PathSegment(go.PathSegment.Line,i*e,0).close()),r.spot1=new go.Spot(0,i),r.spot2=go.Spot.BottomRight,r})),go.Shape.defineFigureGenerator("Collate",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,.5*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n));var o=new go.PathFigure(.5*e,.5*n,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n)),i.spot1=new go.Spot(.25,0),i.spot2=new go.Spot(.75,.25),i})),go.Shape.defineFigureGenerator("CreateRequest",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)&&(r=.1);var o=new go.PathFigure(0,0,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var a=new go.PathFigure(0,r*n,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e,r*n)),a.add(new go.PathSegment(go.PathSegment.Move,0,(1-r)*n)),a.add(new go.PathSegment(go.PathSegment.Line,e,(1-r)*n)),i})),go.Shape.defineFigureGenerator("Database",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.1*u,a=new go.PathFigure(e,.1*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e,.9*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n,e,(.9+o)*n,(.5+r)*e,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-r)*e,n,0,(.9+o)*n)),a.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0,0,(.1-o)*n,(.5-r)*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,.1*n,(.5+r)*e,0,e,(.1-o)*n));var s=new go.PathFigure(e,.1*n,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.2*n,e,(.1+o)*n,(.5+r)*e,.2*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*n,(.5-r)*e,.2*n,0,(.1+o)*n)),s.add(new go.PathSegment(go.PathSegment.Move,e,.2*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.3*n,e,(.2+o)*n,(.5+r)*e,.3*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*n,(.5-r)*e,.3*n,0,(.2+o)*n)),s.add(new go.PathSegment(go.PathSegment.Move,e,.3*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.4*n,e,(.3+o)*n,(.5+r)*e,.4*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*n,(.5-r)*e,.4*n,0,(.3+o)*n)),i.spot1=new go.Spot(0,.4),i.spot2=new go.Spot(1,.9),i})),go.Shape.defineFigureGenerator("DataStorage",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,.75*e,n,e,0,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*e,.9*n,.25*e,.1*n).close()),i.spot1=new go.Spot(.226,0),i.spot2=new go.Spot(.81,1),i})),go.Shape.defineFigureGenerator("DiskStorage",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.1*u,a=new go.PathFigure(e,.1*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e,.9*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n,e,(.9+o)*n,(.5+r)*e,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-r)*e,n,0,(.9+o)*n)),a.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0,0,(.1-o)*n,(.5-r)*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,.1*n,(.5+r)*e,0,e,(.1-o)*n));var s=new go.PathFigure(e,.1*n,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.2*n,e,(.1+o)*n,(.5+r)*e,.2*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*n,(.5-r)*e,.2*n,0,(.1+o)*n)),s.add(new go.PathSegment(go.PathSegment.Move,e,.2*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.3*n,e,(.2+o)*n,(.5+r)*e,.3*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*n,(.5-r)*e,.3*n,0,(.2+o)*n)),i.spot1=new go.Spot(0,.3),i.spot2=new go.Spot(1,.9),i})),go.Shape.defineFigureGenerator("Display",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.25*e,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,.75*e,n,e,0,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close()),i.spot1=new go.Spot(.25,0),i.spot2=new go.Spot(.75,1),i})),go.Shape.defineFigureGenerator("DividedEvent",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)?r=.2:r<.15&&(r=.15);var o=.2*u,a=new go.PathFigure(0,.2*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,.2*e,0,0,(.2-o)*n,(.2-o)*e,0)),a.add(new go.PathSegment(go.PathSegment.Line,.8*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,.2*n,(.8+o)*e,0,e,(.2-o)*n)),a.add(new go.PathSegment(go.PathSegment.Line,e,.8*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,n,e,(.8+o)*n,(.8+o)*e,n)),a.add(new go.PathSegment(go.PathSegment.Line,.2*e,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*n,(.2-o)*e,n,0,(.8+o)*n)),a.add(new go.PathSegment(go.PathSegment.Line,0,.2*n));var s=new go.PathFigure(0,r*n,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,e,r*n)),i})),go.Shape.defineFigureGenerator("DividedProcess",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;(isNaN(r)||r<.1)&&(r=.1);var o=new go.PathFigure(0,0,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var a=new go.PathFigure(0,r*n,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e,r*n)),i})),go.Shape.defineFigureGenerator("Document",(function(t,e,n){var i=new go.Geometry;n/=.8;var r=new go.PathFigure(0,.7*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*e,.4*n,.5*e,n).close()),i.spot1=go.Spot.TopLeft,i.spot2=new go.Spot(1,.6),i})),go.Shape.defineFigureGenerator("ExternalOrganization",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;(isNaN(r)||r<.2)&&(r=.2);var o=new go.PathFigure(0,0,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var a=new go.PathFigure(r*e,0,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,0,r*n)),a.add(new go.PathSegment(go.PathSegment.Move,e,r*n)),a.add(new go.PathSegment(go.PathSegment.Line,(1-r)*e,0)),a.add(new go.PathSegment(go.PathSegment.Move,0,(1-r)*n)),a.add(new go.PathSegment(go.PathSegment.Line,r*e,n)),a.add(new go.PathSegment(go.PathSegment.Move,(1-r)*e,n)),a.add(new go.PathSegment(go.PathSegment.Line,e,(1-r)*n)),i})),go.Shape.defineFigureGenerator("ExternalProcess",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close());var o=new go.PathFigure(.1*e,.4*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.1*e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Move,.9*e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Move,.6*e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Move,.4*e,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*e,.9*n)),i.spot1=new go.Spot(.25,.25),i.spot2=new go.Spot(.75,.75),i})),go.Shape.defineFigureGenerator("File",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var o=new go.PathFigure(.75*e,0,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*e,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,.25*n)),i.spot1=new go.Spot(0,.25),i.spot2=go.Spot.BottomRight,i})),go.Shape.defineFigureGenerator("Interrupt",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(e,.5*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n));var o=new go.PathFigure(e,.5*n,!1);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,n));var a=new go.PathFigure(e,.5*n,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e,0)),i.spot1=new go.Spot(0,.25),i.spot2=new go.Spot(.5,.75),i})),go.Shape.defineFigureGenerator("InternalStorage",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN,o=t?t.parameter2:NaN;isNaN(r)&&(r=.1),isNaN(o)&&(o=.1);var a=new go.PathFigure(0,0,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e,0)),a.add(new go.PathSegment(go.PathSegment.Line,e,n)),a.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var s=new go.PathFigure(r*e,0,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,r*e,n)),s.add(new go.PathSegment(go.PathSegment.Move,0,o*n)),s.add(new go.PathSegment(go.PathSegment.Line,e,o*n)),i})),go.Shape.defineFigureGenerator("Junction",(function(t,e,n){var i=new go.Geometry,r=1/Math.SQRT2,o=(1-1/Math.SQRT2)/2,a=.5*u,s=.5,l=new go.PathFigure(e,s*n,!0);i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,s*e,n,e,(s+a)*n,(s+a)*e,n)),l.add(new go.PathSegment(go.PathSegment.Bezier,0,s*n,(s-a)*e,n,0,(s+a)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,s*e,0,0,(s-a)*n,(s-a)*e,0)),l.add(new go.PathSegment(go.PathSegment.Bezier,e,s*n,(s+a)*e,0,e,(s-a)*n));var c=new go.PathFigure((o+r)*e,(o+r)*n,!1);return i.add(c),c.add(new go.PathSegment(go.PathSegment.Line,o*e,o*n)),c.add(new go.PathSegment(go.PathSegment.Move,o*e,(o+r)*n)),c.add(new go.PathSegment(go.PathSegment.Line,(o+r)*e,o*n)),i})),go.Shape.defineFigureGenerator("LinedDocument",(function(t,e,n){var i=new go.Geometry;n/=.8;var r=new go.PathFigure(0,.7*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*e,.4*n,.5*e,n).close());var o=new go.PathFigure(.1*e,0,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.1*e,.75*n)),i.spot1=new go.Spot(.1,0),i.spot2=new go.Spot(1,.6),i})),go.Shape.defineFigureGenerator("LoopLimit",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n).close()),i.spot1=new go.Spot(0,.25),i.spot2=go.Spot.BottomRight,i})),go.Shape.defineFigureGenerator("MagneticTape",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.5,a=new go.PathFigure(.5*e,n,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,0,o*n,(o-r)*e,n,0,(o+r)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,o*e,0,0,(o-r)*n,(o-r)*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,o*n,(o+r)*e,0,e,(o-r)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,.6*e,.9*n,e,(o+r)*n,(o+r)*e,.9*n)),a.add(new go.PathSegment(go.PathSegment.Line,e,.9*n)),a.add(new go.PathSegment(go.PathSegment.Line,e,n)),a.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),i.spot1=new go.Spot(.15,.15),i.spot2=new go.Spot(.85,.8),i})),go.Shape.defineFigureGenerator("ManualInput",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(e,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.25*n).close()),i.spot1=new go.Spot(0,.25),i.spot2=go.Spot.BottomRight,i})),go.Shape.defineFigureGenerator("MessageFromUser",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)&&(r=.7);var o=new go.PathFigure(0,0,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,r*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i.spot1=go.Spot.TopLeft,i})),go.Shape.defineFigureGenerator("MicroformProcessing",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)&&(r=.25);var o=new go.PathFigure(0,0,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,r*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,(1-r)*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i})),go.Shape.defineFigureGenerator("MicroformRecording",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.15*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i.spot1=new go.Spot(0,.25),i.spot2=new go.Spot(1,.75),i})),go.Shape.defineFigureGenerator("MultiDocument",(function(t,e,n){var i=new go.Geometry;n/=.8;var r=new go.PathFigure(e,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.9*e,.44*n,.96*e,.47*n,.93*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,.54*n,.86*e,.57*n,.83*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.4*e,.4*n,.4*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,0).close());var o=new go.PathFigure(.1*e,.2*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.54*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*e,.44*n)),i.spot1=new go.Spot(0,.25),i.spot2=new go.Spot(.8,.77),i})),go.Shape.defineFigureGenerator("MultiProcess",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.1*e,.1*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,.2*n).close());var o=new go.PathFigure(.2*e,.1*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.9*e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*e,.8*n)),o.add(new go.PathSegment(go.PathSegment.Move,.1*e,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.9*n)),i.spot1=new go.Spot(0,.2),i.spot2=new go.Spot(.8,1),i})),go.Shape.defineFigureGenerator("OfflineStorage",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)&&(r=.1);var o=new go.PathFigure(0,0,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,n).close());var a=new go.PathFigure(.5*r*e,r*n,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,(1-.5*r)*e,r*n)),i})),go.Shape.defineFigureGenerator("OffPageConnector",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i.spot1=go.Spot.TopLeft,i.spot2=new go.Spot(.75,1),i})),go.Shape.defineFigureGenerator("Or",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.5,a=new go.PathFigure(e,o*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,o*e,n,e,(o+r)*n,(o+r)*e,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,o*n,(o-r)*e,n,0,(o+r)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,o*e,0,0,(o-r)*n,(o-r)*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,o*n,(o+r)*e,0,e,(o-r)*n));var s=new go.PathFigure(e,.5*n,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),s.add(new go.PathSegment(go.PathSegment.Move,.5*e,n)),s.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),i})),go.Shape.defineFigureGenerator("PaperTape",(function(t,e,n){var i=new go.Geometry;n/=.8;var r=new go.PathFigure(0,.7*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,.3*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,e,.3*n,.5*e,.6*n,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*e,.4*n,.5*e,n).close()),i.spot1=new go.Spot(0,.49),i.spot2=new go.Spot(1,.75),i})),go.Shape.defineFigureGenerator("PrimitiveFromCall",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN,o=t?t.parameter2:NaN;isNaN(r)&&(r=.1),isNaN(o)&&(o=.3);var a=new go.PathFigure(0,0,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e,0)),a.add(new go.PathSegment(go.PathSegment.Line,(1-o)*e,.5*n)),a.add(new go.PathSegment(go.PathSegment.Line,e,n)),a.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i})),go.Shape.defineFigureGenerator("PrimitiveToCall",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN,o=t?t.parameter2:NaN;isNaN(r)&&(r=.1),isNaN(o)&&(o=.3);var a=new go.PathFigure(0,0,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,(1-o)*e,0)),a.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),a.add(new go.PathSegment(go.PathSegment.Line,(1-o)*e,n)),a.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i})),go.Shape.defineFigureGenerator("Procedure",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)&&(r=.1);var o=new go.PathFigure(0,0,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var a=new go.PathFigure((1-r)*e,0,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,(1-r)*e,n)),a.add(new go.PathSegment(go.PathSegment.Move,r*e,0)),a.add(new go.PathSegment(go.PathSegment.Line,r*e,n)),i})),go.Shape.defineFigureGenerator("Process",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)&&(r=.1);var o=new go.PathFigure(0,0,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var a=new go.PathFigure(r*e,0,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,r*e,n)),i.spot2=go.Spot.BottomRight,i})),go.Shape.defineFigureGenerator("Sort",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close());var o=new go.PathFigure(0,.5*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),i.spot1=new go.Spot(.25,.25),i.spot2=new go.Spot(.75,.5),i})),go.Shape.defineFigureGenerator("Start",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)&&(r=.25);var o=new go.PathFigure(r*e,0,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*e,.5*n,.25*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*e,.5*n,.25*e,.5*n));var a=new go.PathFigure(r*e,0,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,r*e,n)),a.add(new go.PathSegment(go.PathSegment.Move,(1-r)*e,0)),a.add(new go.PathSegment(go.PathSegment.Line,(1-r)*e,n)),i.spot1=new go.Spot(r,0),i.spot2=new go.Spot(1-r,1),i})),go.Shape.defineFigureGenerator("Terminator",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.25*e,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*e,.5*n,.25*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*e,.5*n,.25*e,.5*n)),i.spot1=new go.Spot(.23,0),i.spot2=new go.Spot(.77,1),i})),go.Shape.defineFigureGenerator("TransmittalTape",(function(t,e,n){var i=new go.Geometry,r=t?t.parameter1:NaN;isNaN(r)&&(r=.1);var o=new go.PathFigure(0,0,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*e,(1-r)*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,(1-r)*n).close()),i.spot1=go.Spot.TopLeft,i})),go.Shape.defineFigureGenerator("AndGate",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=new go.PathFigure(0,0,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,(.5+r)*e,0,e,(.5-r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n,e,(.5+r)*n,(.5+r)*e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i.spot1=go.Spot.TopLeft,i.spot2=new go.Spot(.55,1),i})),go.Shape.defineFigureGenerator("Buffer",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i.spot1=new go.Spot(0,.25),i.spot2=new go.Spot(.5,.75),i})),go.Shape.defineFigureGenerator("Clock",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.5,a=new go.PathFigure(e,o*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,o*e,n,e,(o+r)*n,(o+r)*e,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,o*n,(o-r)*e,n,0,(o+r)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,o*e,0,0,(o-r)*n,(o-r)*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,o*n,(o+r)*e,0,e,(o-r)*n));var s=new go.PathFigure(e,o*n,!1);i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,e,o*n));var l=new go.PathFigure(.8*e,.75*n,!1);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.8*e,.25*n)),l.add(new go.PathSegment(go.PathSegment.Line,.6*e,.25*n)),l.add(new go.PathSegment(go.PathSegment.Line,.6*e,.75*n)),l.add(new go.PathSegment(go.PathSegment.Line,.4*e,.75*n)),l.add(new go.PathSegment(go.PathSegment.Line,.4*e,.25*n)),l.add(new go.PathSegment(go.PathSegment.Line,.2*e,.25*n)),l.add(new go.PathSegment(go.PathSegment.Line,.2*e,.75*n)),i})),go.Shape.defineFigureGenerator("Ground",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Move,.2*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Move,.3*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Move,.4*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,n)),i})),go.Shape.defineFigureGenerator("Inverter",(function(t,e,n){var i=new go.Geometry,r=.1*u,o=.9,a=.5,s=new go.PathFigure(.8*e,.5*n,!0);i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,0,n)),s.add(new go.PathSegment(go.PathSegment.Line,0,0)),s.add(new go.PathSegment(go.PathSegment.Line,.8*e,.5*n));var l=new go.PathFigure(1*e,a*n,!0);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,o*e,.6*n,1*e,(a+r)*n,(o+r)*e,.6*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,a*n,(o-r)*e,.6*n,.8*e,(a+r)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,o*e,.4*n,.8*e,(a-r)*n,(o-r)*e,.4*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,1*e,a*n,(o+r)*e,.4*n,1*e,(a-r)*n)),i.spot1=new go.Spot(0,.25),i.spot2=new go.Spot(.4,.75),i})),go.Shape.defineFigureGenerator("NandGate",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.4*u,a=.1*u,s=.9,l=.5,c=new go.PathFigure(.8*e,.5*n,!0);i.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,.4*e,n,.8*e,(.5+o)*n,(.4+r)*e,n)),c.add(new go.PathSegment(go.PathSegment.Line,0,n)),c.add(new go.PathSegment(go.PathSegment.Line,0,0)),c.add(new go.PathSegment(go.PathSegment.Line,.4*e,0)),c.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,.5*n,(.4+r)*e,0,.8*e,(.5-o)*n));var h=new go.PathFigure(1*e,l*n,!0);return i.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,s*e,.6*n,1*e,(l+a)*n,(s+a)*e,.6*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,l*n,(s-a)*e,.6*n,.8*e,(l+a)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,s*e,.4*n,.8*e,(l-a)*n,(s-a)*e,.4*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,1*e,l*n,(s+a)*e,.4*n,1*e,(l-a)*n)),i.spot1=new go.Spot(0,.05),i.spot2=new go.Spot(.55,.95),i})),go.Shape.defineFigureGenerator("NorGate",(function(t,e,n){var i=new go.Geometry,r=.5,o=u*r,a=0,s=.5,l=new go.PathFigure(.8*e,.5*n,!0);i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.7*e,(s+o)*n,(a+o)*e,(s+r)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*e,.75*n,.25*e,.25*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,.5*n,(a+o)*e,(s-r)*n,.7*e,(s-o)*n)),r=.1,o=.1*u,a=.9,s=.5;var c=new go.PathFigure((a-r)*e,s*n,!0);return i.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s-r)*n,(a-r)*e,(s-o)*n,(a-o)*e,(s-r)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,(a+r)*e,s*n,(a+o)*e,(s-r)*n,(a+r)*e,(s-o)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s+r)*n,(a+r)*e,(s+o)*n,(a+o)*e,(s+r)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,(a-r)*e,s*n,(a-o)*e,(s+r)*n,(a-r)*e,(s+o)*n)),i.spot1=new go.Spot(.2,.25),i.spot2=new go.Spot(.6,.75),i})),go.Shape.defineFigureGenerator("OrGate",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.5,a=new go.PathFigure(0,0,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,(0+r+r)*e,0*n,.8*e,(o-r)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.8*e,(o+r)*n,(0+r+r)*e,1*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*e,.75*n,.25*e,.25*n).close()),i.spot1=new go.Spot(.2,.25),i.spot2=new go.Spot(.75,.75),i})),go.Shape.defineFigureGenerator("XnorGate",(function(t,e,n){var i=new go.Geometry,r=.5,o=u*r,a=.2,s=.5,l=new go.PathFigure(.1*e,0,!1);i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,.1*e,n,.35*e,.25*n,.35*e,.75*n));var c=new go.PathFigure(.8*e,.5*n,!0);i.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,.2*e,n,.7*e,(s+o)*n,(a+o)*e,(s+r)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,.2*e,0,.45*e,.75*n,.45*e,.25*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,.5*n,(a+o)*e,(s-r)*n,.7*e,(s-o)*n)),r=.1,o=.1*u,a=.9,s=.5;var h=new go.PathFigure((a-r)*e,s*n,!0);return i.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s-r)*n,(a-r)*e,(s-o)*n,(a-o)*e,(s-r)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(a+r)*e,s*n,(a+o)*e,(s-r)*n,(a+r)*e,(s-o)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s+r)*n,(a+r)*e,(s+o)*n,(a+o)*e,(s+r)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(a-r)*e,s*n,(a-o)*e,(s+r)*n,(a-r)*e,(s+o)*n)),i.spot1=new go.Spot(.4,.25),i.spot2=new go.Spot(.65,.75),i})),go.Shape.defineFigureGenerator("XorGate",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.5,a=new go.PathFigure(.1*e,0,!1);i.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,.1*e,n,.35*e,.25*n,.35*e,.75*n));var s=new go.PathFigure(.2*e,0,!0);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,(.2+r)*e,0*n,.9*e,(o-r)*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,.2*e,n,.9*e,(o+r)*n,(.2+r)*e,1*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,.2*e,0,.45*e,.75*n,.45*e,.25*n).close()),i.spot1=new go.Spot(.4,.25),i.spot2=new go.Spot(.8,.75),i})),go.Shape.defineFigureGenerator("Capacitor",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Move,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),i})),go.Shape.defineFigureGenerator("Resistor",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.5*n,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,.5*n)),i})),go.Shape.defineFigureGenerator("Inductor",(function(t,e,n){var i=new go.Geometry,r=.1*u,o=.1,a=.1,s=new go.PathFigure((a-.5*r)*e,n,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,(a+o)*e,0,(a-r)*e,n,(a-o)*e,0)),a=.3,s.add(new go.PathSegment(go.PathSegment.Bezier,a*e,n,(a+o)*e,0,(a+r)*e,n)),s.add(new go.PathSegment(go.PathSegment.Bezier,(a+o)*e,0,(a-r)*e,n,(a-o)*e,0)),a=.5,s.add(new go.PathSegment(go.PathSegment.Bezier,a*e,n,(a+o)*e,0,(a+r)*e,n)),s.add(new go.PathSegment(go.PathSegment.Bezier,(a+o)*e,0,(a-r)*e,n,(a-o)*e,0)),a=.7,s.add(new go.PathSegment(go.PathSegment.Bezier,a*e,n,(a+o)*e,0,(a+r)*e,n)),s.add(new go.PathSegment(go.PathSegment.Bezier,(a+o)*e,0,(a-r)*e,n,(a-o)*e,0)),a=.9,s.add(new go.PathSegment(go.PathSegment.Bezier,(a+.5*r)*e,n,(a+o)*e,0,(a+r)*e,n)),i})),go.Shape.defineFigureGenerator("ACvoltageSource",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.5,a=.5,s=new go.PathFigure(0*e,a*n,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,o*e,0*n,0*e,(a-r)*n,(o-r)*e,0*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,1*e,a*n,(o+r)*e,0*n,1*e,(a-r)*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,o*e,1*n,1*e,(a+r)*n,(o+r)*e,1*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,0*e,a*n,(o-r)*e,1*n,0*e,(a+r)*n)),s.add(new go.PathSegment(go.PathSegment.Move,.1*e,a*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,.9*e,a*n,o*e,0*n,o*e,1*n)),i})),go.Shape.defineFigureGenerator("DCvoltageSource",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.75*n,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),r.add(new go.PathSegment(go.PathSegment.Move,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),i})),go.Shape.defineFigureGenerator("Diode",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(e,0,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),i.spot1=new go.Spot(0,.25),i.spot2=new go.Spot(.5,.75),i})),go.Shape.defineFigureGenerator("Wifi",(function(t,e,n){var i=new go.Geometry,r=.8*u,o=.8,a=0,s=.5,l=(e-(e*=.38))/2,c=(n-(n*=.6))/2,h=new go.PathFigure(a*e+l,(s+o)*n+c,!0);i.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,(a-o)*e+l,s*n+c,(a-r)*e+l,(s+o)*n+c,(a-o)*e+l,(s+r)*n+c)),h.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s-o)*n+c,(a-o)*e+l,(s-r)*n+c,(a-r)*e+l,(s-o)*n+c)),h.add(new go.PathSegment(go.PathSegment.Bezier,(a-o+.5*r)*e+l,s*n+c,a*e+l,(s-o)*n+c,(a-o+.5*r)*e+l,(s-r)*n+c)),h.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s+o)*n+c,(a-o+.5*r)*e+l,(s+r)*n+c,a*e+l,(s+o)*n+c).close()),r=.4*u,o=.4,a=.2,s=.5;var d=new go.PathFigure(a*e+l,(s+o)*n+c,!0);i.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,(a-o)*e+l,s*n+c,(a-r)*e+l,(s+o)*n+c,(a-o)*e+l,(s+r)*n+c)),d.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s-o)*n+c,(a-o)*e+l,(s-r)*n+c,(a-r)*e+l,(s-o)*n+c)),d.add(new go.PathSegment(go.PathSegment.Bezier,(a-o+.5*r)*e+l,s*n+c,a*e+l,(s-o)*n+c,(a-o+.5*r)*e+l,(s-r)*n+c)),d.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s+o)*n+c,(a-o+.5*r)*e+l,(s+r)*n+c,a*e+l,(s+o)*n+c).close()),r=.2*u,o=.2,a=.5,s=.5;var f=new go.PathFigure((a-o)*e+l,s*n+c,!0);i.add(f),f.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s-o)*n+c,(a-o)*e+l,(s-r)*n+c,(a-r)*e+l,(s-o)*n+c)),f.add(new go.PathSegment(go.PathSegment.Bezier,(a+o)*e+l,s*n+c,(a+r)*e+l,(s-o)*n+c,(a+o)*e+l,(s-r)*n+c)),f.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s+o)*n+c,(a+o)*e+l,(s+r)*n+c,(a+r)*e+l,(s+o)*n+c)),f.add(new go.PathSegment(go.PathSegment.Bezier,(a-o)*e+l,s*n+c,(a-r)*e+l,(s+o)*n+c,(a-o)*e+l,(s+r)*n+c)),r=.4*u,o=.4,a=.8,s=.5;var p=new go.PathFigure(a*e+l,(s-o)*n+c,!0);i.add(p),p.add(new go.PathSegment(go.PathSegment.Bezier,(a+o)*e+l,s*n+c,(a+r)*e+l,(s-o)*n+c,(a+o)*e+l,(s-r)*n+c)),p.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s+o)*n+c,(a+o)*e+l,(s+r)*n+c,(a+r)*e+l,(s+o)*n+c)),p.add(new go.PathSegment(go.PathSegment.Bezier,(a+o-.5*r)*e+l,s*n+c,a*e+l,(s+o)*n+c,(a+o-.5*r)*e+l,(s+r)*n+c)),p.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s-o)*n+c,(a+o-.5*r)*e+l,(s-r)*n+c,a*e+l,(s-o)*n+c).close()),r=.8*u,o=.8,a=1,s=.5;var g=new go.PathFigure(a*e+l,(s-o)*n+c,!0);return i.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,(a+o)*e+l,s*n+c,(a+r)*e+l,(s-o)*n+c,(a+o)*e+l,(s-r)*n+c)),g.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s+o)*n+c,(a+o)*e+l,(s+r)*n+c,(a+r)*e+l,(s+o)*n+c)),g.add(new go.PathSegment(go.PathSegment.Bezier,(a+o-.5*r)*e+l,s*n+c,a*e+l,(s+o)*n+c,(a+o-.5*r)*e+l,(s+r)*n+c)),g.add(new go.PathSegment(go.PathSegment.Bezier,a*e+l,(s-o)*n+c,(a+o-.5*r)*e+l,(s-r)*n+c,a*e+l,(s-o)*n+c).close()),i})),go.Shape.defineFigureGenerator("Email",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var o=new go.PathFigure(0,0,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,0)),o.add(new go.PathSegment(go.PathSegment.Move,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*e,.54*n)),o.add(new go.PathSegment(go.PathSegment.Move,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*e,.54*n)),i})),go.Shape.defineFigureGenerator("Ethernet",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.35*e,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,0).close());var o=new go.PathFigure(.1*e,n,!0,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.4*e,n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*e,n).close());var a=new go.PathFigure(.6*e,n,!0,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.9*e,n)),a.add(new go.PathSegment(go.PathSegment.Line,.9*e,.6*n)),a.add(new go.PathSegment(go.PathSegment.Line,.6*e,.6*n)),a.add(new go.PathSegment(go.PathSegment.Line,.6*e,n).close());var s=new go.PathFigure(0,.5*n,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),s.add(new go.PathSegment(go.PathSegment.Move,.5*e,.5*n)),s.add(new go.PathSegment(go.PathSegment.Line,.5*e,.4*n)),s.add(new go.PathSegment(go.PathSegment.Move,.75*e,.5*n)),s.add(new go.PathSegment(go.PathSegment.Line,.75*e,.6*n)),s.add(new go.PathSegment(go.PathSegment.Move,.25*e,.5*n)),s.add(new go.PathSegment(go.PathSegment.Line,.25*e,.6*n)),i})),go.Shape.defineFigureGenerator("Power",(function(t,e,o){var s=new go.Geometry,l=.4*u,c=.4,h=.5,d=.5,f=i(),p=i(),g=i(),m=i();a(h,d-c,h+l,d-c,h+c,d-l,h+c,d,.5,f,f,p,g,m);var v=n(p.x,p.y),y=new go.PathFigure(p.x*e,p.y*o,!0);s.add(y),y.add(new go.PathSegment(go.PathSegment.Bezier,(h+c)*e,d*o,g.x*e,g.y*o,m.x*e,m.y*o)),y.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d+c)*o,(h+c)*e,(d+l)*o,(h+l)*e,(d+c)*o)),y.add(new go.PathSegment(go.PathSegment.Bezier,(h-c)*e,d*o,(h-l)*e,(d+c)*o,(h-c)*e,(d+l)*o)),a(h-c,d,h-c,d-l,h-l,d-c,h,d-c,.5,g,m,p,f,f),y.add(new go.PathSegment(go.PathSegment.Bezier,p.x*e,p.y*o,g.x*e,g.y*o,m.x*e,m.y*o)),a(h-(c=.3),d,h-c,d-(l=.3*u),h-l,d-c,h,d-c,.5,g,m,p,f,f),y.add(new go.PathSegment(go.PathSegment.Line,p.x*e,p.y*o)),y.add(new go.PathSegment(go.PathSegment.Bezier,(h-c)*e,d*o,m.x*e,m.y*o,g.x*e,g.y*o)),y.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d+c)*o,(h-c)*e,(d+l)*o,(h-l)*e,(d+c)*o)),y.add(new go.PathSegment(go.PathSegment.Bezier,(h+c)*e,d*o,(h+l)*e,(d+c)*o,(h+c)*e,(d+l)*o)),a(h,d-c,h+l,d-c,h+c,d-l,h+c,d,.5,f,f,p,g,m),y.add(new go.PathSegment(go.PathSegment.Bezier,p.x*e,p.y*o,m.x*e,m.y*o,g.x*e,g.y*o).close());y=new go.PathFigure(.45*e,0,!0);return s.add(y),y.add(new go.PathSegment(go.PathSegment.Line,.45*e,.5*o)),y.add(new go.PathSegment(go.PathSegment.Line,.55*e,.5*o)),y.add(new go.PathSegment(go.PathSegment.Line,.55*e,0).close()),r(f),r(p),r(g),r(m),r(v),s.spot1=new go.Spot(.25,.45),s.spot2=new go.Spot(.75,.8),s})),go.Shape.defineFigureGenerator("Fallout",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,n/2,!0);function o(t,i,r){t.add(new go.PathSegment(go.PathSegment.Move,(.3+i)*e,(.8+r)*n)),t.add(new go.PathSegment(go.PathSegment.Line,(.5+i)*e,(.5+r)*n)),t.add(new go.PathSegment(go.PathSegment.Line,(.1+i)*e,(.5+r)*n)),t.add(new go.PathSegment(go.PathSegment.Line,(.3+i)*e,(.8+r)*n).close())}return i.add(r),r.add(new go.PathSegment(go.PathSegment.Arc,180,360,e/2,n/2,e/2,n/2)),o(r,0,0),o(r,.4,0),o(r,.2,-.3),i})),go.Shape.defineFigureGenerator("IrritationHazard",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.2*e,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.3*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.2*n).close()),i.spot1=new go.Spot(.3,.3),i.spot2=new go.Spot(.7,.7),i})),go.Shape.defineFigureGenerator("ElectricalHazard",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.37*e,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.11*n)),r.add(new go.PathSegment(go.PathSegment.Line,.77*e,.04*n)),r.add(new go.PathSegment(go.PathSegment.Line,.33*e,.49*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.37*n)),r.add(new go.PathSegment(go.PathSegment.Line,.63*e,.86*n)),r.add(new go.PathSegment(go.PathSegment.Line,.77*e,.91*n)),r.add(new go.PathSegment(go.PathSegment.Line,.34*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.34*e,.78*n)),r.add(new go.PathSegment(go.PathSegment.Line,.44*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,.56*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.68*n).close()),i})),go.Shape.defineFigureGenerator("FireHazard",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.1*e,n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.29*e,0,-.25*e,.63*n,.45*e,.44*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.51*e,.42*n,.48*e,.17*n,.54*e,.35*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.59*e,.18*n,.59*e,.29*n,.58*e,.28*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.75*e,.6*n,.8*e,.34*n,.88*e,.43*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.88*e,.31*n,.87*e,.48*n,.88*e,.43*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.9*e,n,1.17*e,.76*n,.82*e,.8*n).close()),i.spot1=new go.Spot(.07,.445),i.spot2=new go.Spot(.884,.958),i})),go.Shape.defineFigureGenerator("BpmnActivityLoop",(function(t,e,n){var i=new go.Geometry,r=.5,o=r*u,a=.4*Math.SQRT2/2+.5,s=.5-.5*Math.SQRT2/2,l=new go.PathFigure(a*e,(1-s)*n,!1);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,1*e,.5*n,1*e,.7*n,1*e,.5*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0*n,1*e,(.5-o+0)*n,(.5+o+0)*e,0*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,0*e,.5*n,(.5-o+0)*e,0*n,0*e,(.5-o+0)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.35*e,.9*n,0*e,(.5+o+0)*n,(.5-o+0)*e,.9*n)),l.add(new go.PathSegment(go.PathSegment.Move,.25*e,.8*n)),l.add(new go.PathSegment(go.PathSegment.Line,.35*e,.9*n)),l.add(new go.PathSegment(go.PathSegment.Line,.2*e,.95*n)),i})),go.Shape.defineFigureGenerator("BpmnActivityParallel",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Move,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),i})),go.Shape.defineFigureGenerator("BpmnActivitySequential",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Move,0,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Move,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),i})),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!1);i.add(r);var o=new go.PathFigure(e,n,!1);i.add(o);var a=new go.PathFigure(0,.5*n,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.5*n,.2*e,.35*n,.3*e,.35*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,.7*e,.65*n,.8*e,.65*n)),i})),go.Shape.defineFigureGenerator("BpmnActivityCompensation",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.5*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n).close()),i})),go.Shape.defineFigureGenerator("BpmnTaskMessage",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.2*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.8*n).close());r=new go.PathFigure(0,.2*n,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.2*n)),i})),go.Shape.defineFigureGenerator("BpmnTaskScript",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.7*e,n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.3*e,0,.6*e,.5*n,0,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,.7*e,n,.4*e,.5*n,e,.5*n).close());var o=new go.PathFigure(.45*e,.73*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.7*e,.73*n)),o.add(new go.PathSegment(go.PathSegment.Move,.38*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.63*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Move,.31*e,.27*n)),o.add(new go.PathSegment(go.PathSegment.Line,.56*e,.27*n)),i})),go.Shape.defineFigureGenerator("BpmnTaskUser",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!1);i.add(r);var o=new go.PathFigure(.335*e,(1-.555)*n,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.335*e,.595*n)),o.add(new go.PathSegment(go.PathSegment.Line,.665*e,.595*n)),o.add(new go.PathSegment(go.PathSegment.Line,.665*e,(1-.555)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,e,.68*n,.88*e,.46*n,.98*e,.54*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.68*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.335*e,(1-.555)*n,.02*e,.54*n,.12*e,.46*n)),o.add(new go.PathSegment(go.PathSegment.Line,.365*e,.405*n));var a=.5-.285,s=.5,l=a,u=Math.PI/4,c=4*(1-Math.cos(u))/(3*Math.sin(u)),h=a,d=a,f=c*h,p=c*d;o.add(new go.PathSegment(go.PathSegment.Bezier,.285*e,l*n,(s-(f+h)/2)*e,(l+(d+p)/2)*n,.285*e,(l+p)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,s*e,0*n,.285*e,(l-p)*n,(s-f)*e,0*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(s+h)*e,l*n,(s+f)*e,0*n,(s+h)*e,(l-p)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.635*e,.405*n,(s+h)*e,(l+p)*n,(s+(f+h)/2)*e,(l+(d+p)/2)*n)),o.add(new go.PathSegment(go.PathSegment.Line,.635*e,.405*n)),o.add(new go.PathSegment(go.PathSegment.Line,.665*e,(1-.555)*n)),o.add(new go.PathSegment(go.PathSegment.Line,.665*e,.595*n)),o.add(new go.PathSegment(go.PathSegment.Line,.335*e,.595*n));var g=new go.PathFigure(.2*e,n,!1);i.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.2*e,.8*n));var m=new go.PathFigure(.8*e,n,!1);return i.add(m),m.add(new go.PathSegment(go.PathSegment.Line,.8*e,.8*n)),i})),go.Shape.defineFigureGenerator("BpmnEventConditional",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.1*e,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,n).close());var o=new go.PathFigure(.2*e,.2*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.2*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*e,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.8*n)),i})),go.Shape.defineFigureGenerator("BpmnEventError",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.33*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.33*e,.5*n).close()),i})),go.Shape.defineFigureGenerator("BpmnEventEscalation",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!1);i.add(r);var o=new go.PathFigure(e,n,!1);i.add(o);var a=new go.PathFigure(.1*e,n,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),a.add(new go.PathSegment(go.PathSegment.Line,.9*e,n)),a.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n).close()),i})),go.Shape.defineFigureGenerator("Caution",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.05*e,n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.1*e,.8*n,0,n,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.55*e,.1*n,.5*e,0,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.95*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.9*e,n,e,n,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.05*e,n));var o=.05;return r.add(new go.PathSegment(go.PathSegment.Move,.45*e,.875*n)),r.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*e,.875*n,o*e,o*n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.325*n,.575*e,.725*n,.625*e,.375*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.75*n,.375*e,.375*n,.425*e,.725*n)),i})),go.Shape.defineFigureGenerator("Recycle",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.45*e,.95*n,!1);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.185*e,.85*n,.17*e,.95*n,.15*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.235*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,.625*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,.65*n)),r.add(new go.PathSegment(go.PathSegment.Line,.275*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.05*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.05*e,.575*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.1875*e,.95*n,0,.675*n,0,.7*n)),r.add(new go.PathSegment(go.PathSegment.Move,.45*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.775*n)),r.add(new go.PathSegment(go.PathSegment.Line,.22*e,.775*n));var o=new go.PathFigure(.475*e,.2*n,!1);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.4*e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.225*e,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,.275*e,.175*n)),o.add(new go.PathSegment(go.PathSegment.Line,.325*e,.05*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.4*e,.05*n,.35*e,0,.375*e,0)),o.add(new go.PathSegment(go.PathSegment.Line,.575*e,.375*n)),o.add(new go.PathSegment(go.PathSegment.Line,.525*e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*e,.475*n)),o.add(new go.PathSegment(go.PathSegment.Line,.85*e,.315*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.32*n)),o.add(new go.PathSegment(go.PathSegment.Line,.65*e,.05*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.575*e,0,.65*e,.05*n,.625*e,0)),o.add(new go.PathSegment(go.PathSegment.Line,.38*e,.0105*n));var a=new go.PathFigure(.675*e,.575*n,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.875*e,.525*n)),a.add(new go.PathSegment(go.PathSegment.Line,e,.775*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,.85*e,.95*n,e,.8*n,e,.85*n)),a.add(new go.PathSegment(go.PathSegment.Line,.65*e,.95*n)),a.add(new go.PathSegment(go.PathSegment.Line,.65*e,n)),a.add(new go.PathSegment(go.PathSegment.Line,.55*e,.85*n)),a.add(new go.PathSegment(go.PathSegment.Line,.65*e,.725*n)),a.add(new go.PathSegment(go.PathSegment.Line,.65*e,.775*n)),a.add(new go.PathSegment(go.PathSegment.Line,.7*e,.775*n)),a.add(new go.PathSegment(go.PathSegment.Line,e,.775*n)),a.add(new go.PathSegment(go.PathSegment.Move,.675*e,.575*n)),a.add(new go.PathSegment(go.PathSegment.Line,.775*e,.775*n)),i})),go.Shape.defineFigureGenerator("BpmnEventTimer",(function(t,e,n){var i=new go.Geometry,r=.5,o=.5*u,a=new go.PathFigure(e,r*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Bezier,r*e,n,e,(r+o)*n,(r+o)*e,n)),a.add(new go.PathSegment(go.PathSegment.Bezier,0,r*n,(r-o)*e,n,0,(r+o)*n)),a.add(new go.PathSegment(go.PathSegment.Bezier,r*e,0,0,(r-o)*n,(r-o)*e,0)),a.add(new go.PathSegment(go.PathSegment.Bezier,e,r*n,(r+o)*e,0,e,(r-o)*n));var s=new go.PathFigure(r*e,0,!1);return i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,r*e,.15*n)),s.add(new go.PathSegment(go.PathSegment.Move,r*e,n)),s.add(new go.PathSegment(go.PathSegment.Line,r*e,.85*n)),s.add(new go.PathSegment(go.PathSegment.Move,0,r*n)),s.add(new go.PathSegment(go.PathSegment.Line,.15*e,r*n)),s.add(new go.PathSegment(go.PathSegment.Move,e,r*n)),s.add(new go.PathSegment(go.PathSegment.Line,.85*e,r*n)),s.add(new go.PathSegment(go.PathSegment.Move,r*e,r*n)),s.add(new go.PathSegment(go.PathSegment.Line,.58*e,.1*n)),s.add(new go.PathSegment(go.PathSegment.Move,r*e,r*n)),s.add(new go.PathSegment(go.PathSegment.Line,.78*e,.54*n)),i})),go.Shape.defineFigureGenerator("Package",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.15*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,.15*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var o=new go.PathFigure(0,.15*n,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Line,.6*e,0)),o.add(new go.PathSegment(go.PathSegment.Line,.65*e,.15*n).close()),i.spot1=new go.Spot(0,.1),i.spot2=new go.Spot(1,1),i})),go.Shape.defineFigureGenerator("Class",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var o=new go.PathFigure(0,.2*n,!1);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,.2*n).close());var a=new go.PathFigure(0,.5*n,!1);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,e,.5*n).close()),i})),go.Shape.defineFigureGenerator("Component",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(e,n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n).close());var o=new go.PathFigure(0,.2*n,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.45*e,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.2*n).close());var a=new go.PathFigure(0,.6*n,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.45*e,.6*n)),a.add(new go.PathSegment(go.PathSegment.Line,.45*e,.8*n)),a.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),a.add(new go.PathSegment(go.PathSegment.Line,0,.6*n).close()),i})),go.Shape.defineFigureGenerator("Boat Shipment",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.15*e,.6*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.85*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.85*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,.6*n));var o=new go.PathFigure(.15*e,.6*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.85*e,.6*n)),i})),go.Shape.defineFigureGenerator("Customer/Supplier",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(e,n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,.33*n)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.33*e,.33*n)),r.add(new go.PathSegment(go.PathSegment.Line,.33*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,0,.33*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n).close()),i})),go.Shape.defineFigureGenerator("Workcell",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),i})),go.Shape.defineFigureGenerator("Supermarket",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.33*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.33*n)),r.add(new go.PathSegment(go.PathSegment.Move,e,.33*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.66*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.66*n)),r.add(new go.PathSegment(go.PathSegment.Move,e,.66*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),i})),go.Shape.defineFigureGenerator("TruckShipment",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var o=new go.PathFigure(e,.8*n,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*e,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*e,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,.8*n).close());var a=.1,s=.1*u,l=.2,c=.9,h=new go.PathFigure((l-a)*e,c*n,!0);i.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c-a)*n,(l-a)*e,(c-s)*n,(l-s)*e,(c-a)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(l+a)*e,c*n,(l+s)*e,(c-a)*n,(l+a)*e,(c-s)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c+a)*n,(l+a)*e,(c+s)*n,(l+s)*e,(c+a)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(l-a)*e,c*n,(l-s)*e,(c+a)*n,(l-a)*e,(c+s)*n).close()),a=.1,s=.1*u,l=.8,c=.9;var d=new go.PathFigure((l-a)*e,c*n,!0);return i.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c-a)*n,(l-a)*e,(c-s)*n,(l-s)*e,(c-a)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(l+a)*e,c*n,(l+s)*e,(c-a)*n,(l+a)*e,(c-s)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,l*e,(c+a)*n,(l+a)*e,(c+s)*n,(l+s)*e,(c+a)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(l-a)*e,c*n,(l-s)*e,(c+a)*n,(l-a)*e,(c+s)*n).close()),i})),go.Shape.defineFigureGenerator("KanbanPost",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.2*e,0,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,0)),r.add(new go.PathSegment(go.PathSegment.Move,.5*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,n)),i})),go.Shape.defineFigureGenerator("Forklift",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,0,0));var o=new go.PathFigure(0,.5*n,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var a=new go.PathFigure(.5*e,.8*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.5*e,.1*n)),a.add(new go.PathSegment(go.PathSegment.Line,.55*e,.1*n)),a.add(new go.PathSegment(go.PathSegment.Line,.55*e,.8*n)),a.add(new go.PathSegment(go.PathSegment.Line,.5*e,.8*n));var s=new go.PathFigure(.5*e,.7*n,!1);i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,e,.7*n));var l=.1,c=.1*u,h=.1,d=.9,f=new go.PathFigure((h-l)*e,d*n,!0);i.add(f),f.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d-l)*n,(h-l)*e,(d-c)*n,(h-c)*e,(d-l)*n)),f.add(new go.PathSegment(go.PathSegment.Bezier,(h+l)*e,d*n,(h+c)*e,(d-l)*n,(h+l)*e,(d-c)*n)),f.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d+l)*n,(h+l)*e,(d+c)*n,(h+c)*e,(d+l)*n)),f.add(new go.PathSegment(go.PathSegment.Bezier,(h-l)*e,d*n,(h-c)*e,(d+l)*n,(h-l)*e,(d+c)*n)),l=.1,c=.1*u,h=.4,d=.9;var p=new go.PathFigure((h-l)*e,d*n,!0);return i.add(p),p.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d-l)*n,(h-l)*e,(d-c)*n,(h-c)*e,(d-l)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,(h+l)*e,d*n,(h+c)*e,(d-l)*n,(h+l)*e,(d-c)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,h*e,(d+l)*n,(h+l)*e,(d+c)*n,(h+c)*e,(d+l)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,(h-l)*e,d*n,(h-c)*e,(d+l)*n,(h-l)*e,(d+c)*n)),i})),go.Shape.defineFigureGenerator("RailShipment",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.1*e,.4*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,.4*n).close());var o=new go.PathFigure(.45*e,.7*n,!1);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.55*e,.7*n));var a=new go.PathFigure(.55*e,.4*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.9*e,.4*n)),a.add(new go.PathSegment(go.PathSegment.Line,.9*e,.9*n)),a.add(new go.PathSegment(go.PathSegment.Line,.55*e,.9*n)),a.add(new go.PathSegment(go.PathSegment.Line,.55*e,.4*n).close());var s=.05,l=.05*u,c=.175,h=.95,d=new go.PathFigure((c-s)*e,h*n,!0);i.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h-s)*n,(c-s)*e,(h-l)*n,(c-l)*e,(h-s)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(c+s)*e,h*n,(c+l)*e,(h-s)*n,(c+s)*e,(h-l)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h+s)*n,(c+s)*e,(h+l)*n,(c+l)*e,(h+s)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(c-s)*e,h*n,(c-l)*e,(h+s)*n,(c-s)*e,(h+l)*n));s=.05,l=.05*u,c=.375,h=.95;var f=new go.PathFigure((c-s)*e,h*n,!0);i.add(f),f.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h-s)*n,(c-s)*e,(h-l)*n,(c-l)*e,(h-s)*n)),f.add(new go.PathSegment(go.PathSegment.Bezier,(c+s)*e,h*n,(c+l)*e,(h-s)*n,(c+s)*e,(h-l)*n)),f.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h+s)*n,(c+s)*e,(h+l)*n,(c+l)*e,(h+s)*n)),f.add(new go.PathSegment(go.PathSegment.Bezier,(c-s)*e,h*n,(c-l)*e,(h+s)*n,(c-s)*e,(h+l)*n));s=.05,l=.05*u,c=.625,h=.95;var p=new go.PathFigure((c-s)*e,h*n,!0);i.add(p),p.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h-s)*n,(c-s)*e,(h-l)*n,(c-l)*e,(h-s)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,(c+s)*e,h*n,(c+l)*e,(h-s)*n,(c+s)*e,(h-l)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h+s)*n,(c+s)*e,(h+l)*n,(c+l)*e,(h+s)*n)),p.add(new go.PathSegment(go.PathSegment.Bezier,(c-s)*e,h*n,(c-l)*e,(h+s)*n,(c-s)*e,(h+l)*n));s=.05,l=.05*u,c=.825,h=.95;var g=new go.PathFigure((c-s)*e,h*n,!0);i.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h-s)*n,(c-s)*e,(h-l)*n,(c-l)*e,(h-s)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(c+s)*e,h*n,(c+l)*e,(h-s)*n,(c+s)*e,(h-l)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h+s)*n,(c+s)*e,(h+l)*n,(c+l)*e,(h+s)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,(c-s)*e,h*n,(c-l)*e,(h+s)*n,(c-s)*e,(h+l)*n).close());var m=new go.PathFigure(0,n,!1);return i.add(m),m.add(new go.PathSegment(go.PathSegment.Line,e,n).close()),i})),go.Shape.defineFigureGenerator("Warehouse",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var o=new go.PathFigure(0,.2*n,!1);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,.2*n).close());var a=new go.PathFigure(.15*e,n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.15*e,.5*n)),a.add(new go.PathSegment(go.PathSegment.Line,.4*e,.5*n)),a.add(new go.PathSegment(go.PathSegment.Line,.4*e,n)),a.add(new go.PathSegment(go.PathSegment.Line,.15*e,n).close());var s=.05,l=.05*u,c=.35,h=.775,d=new go.PathFigure(.3*e,h*n,!0);return i.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,c*e,.725*n,.3*e,(h-l)*n,(c-l)*e,.725*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(c+s)*e,h*n,(c+l)*e,.725*n,(c+s)*e,(h-l)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,c*e,(h+s)*n,(c+s)*e,(h+l)*n,(c+l)*e,(h+s)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.3*e,h*n,(c-l)*e,(h+s)*n,.3*e,(h+l)*n).close()),i})),go.Shape.defineFigureGenerator("ControlCenter",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Move,.1*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,.8*n).close()),i})),go.Shape.defineFigureGenerator("Bluetooth",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.75*n,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),i})),go.Shape.defineFigureGenerator("Bookmark",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,0,0)),r.add(new go.PathSegment(go.PathSegment.Move,.2*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Move,.2*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.4*n)),i})),go.Shape.defineFigureGenerator("Bookmark",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),r.add(new go.PathSegment(go.PathSegment.Line,0,0)),r.add(new go.PathSegment(go.PathSegment.Move,.2*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Move,.2*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.4*n)),i})),go.Shape.defineFigureGenerator("Globe",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Move,0,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*e,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,e,.5*n,.75*e,0,e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n,e,.75*n,.75*e,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.25*e,n,0,.75*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0,0,.25*n,.25*e,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,n,.15*e,.25*n,.15*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0,.85*e,.75*n,.85*e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Move,.1675*e,.15*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.8325*e,.15*n,.35*e,.3*n,.65*e,.3*n)),r.add(new go.PathSegment(go.PathSegment.Move,.1675*e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.8325*e,.85*n,.35*e,.7*n,.65*e,.7*n)),i})),go.Shape.defineFigureGenerator("Wave",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.25*n,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.3*e,.25*n,.1*e,0,.2*e,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,.7*e,.25*n,.425*e,.5*n,.575*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,e,.25*n,.8*e,0,.9*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Move,0,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.75*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.3*e,.75*n,.1*e,.5*n,.2*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.7*e,.75*n,.425*e,n,.575*e,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,e,.75*n,.8*e,.5*n,.9*e,.5*n)),i})),go.Shape.defineFigureGenerator("Operator",(function(t,e,n){var i=new go.Geometry,r=.3,o=.3*u,a=.5,s=.7,l=new go.PathFigure(.2*e,s*n,!0);i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s-r)*n,.2*e,(s-o)*n,(a-o)*e,(s-r)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,s*n,(a+o)*e,(s-r)*n,.8*e,(s-o)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,a*e,1*n,.8*e,(s+o)*n,(a+o)*e,1*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.2*e,s*n,(a-o)*e,1*n,.2*e,(s+o)*n));var c=new go.PathFigure(0,.7*n,!1);return i.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,e,.7*n,0,0,e,0)),i})),go.Shape.defineFigureGenerator("TripleFanBlades",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.65*n,.65*e,.3*n,.65*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0,.35*e,.5*n,.35*e,.3*n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*e,.65*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.3*e,.6*n,.1*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.65*n,.2*e,n,.35*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*e,.65*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,e,n,.7*e,.6*n,.9*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.65*n,.8*e,n,.65*e,.95*n)),i})),go.Shape.defineFigureGenerator("CentrifugalPump",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(e,0,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,0,.075*n,0,.5*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.4*e,n,0,n,.4*e,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,.4*n,.8*e,n,.85*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,0)),i})),go.Shape.defineFigureGenerator("Battery",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Move,.4*e,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.1*n));var o=new go.PathFigure(0,.6*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Move,0,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,.4*n)),i})),go.Shape.defineFigureGenerator("Delete",(function(t,e,n){var i=new go.Geometry,r=.5*u,o=.5,a=.5,s=new go.PathFigure(0*e,a*n,!0);i.add(s),s.add(new go.PathSegment(go.PathSegment.Bezier,o*e,0*n,0*e,(a-r)*n,(o-r)*e,0*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,1*e,a*n,(o+r)*e,0*n,1*e,(a-r)*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,o*e,1*n,1*e,(a+r)*n,(o+r)*e,1*n)),s.add(new go.PathSegment(go.PathSegment.Bezier,0*e,a*n,(o-r)*e,1*n,0*e,(a+r)*n));var l=new go.PathFigure(.15*e,.5*n,!1);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.85*e,.5*n)),i})),go.Shape.defineFigureGenerator("Flag",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.1*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Move,0,.1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.1*n,.15*e,0,.35*e,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,e,.1*n,.65*e,.2*n,.85*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.5*n,.85*e,.6*n,.65*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.35*e,.4*n,.15*e,.4*n).close()),i})),go.Shape.defineFigureGenerator("Help",(function(t,e,n){var i=new go.Geometry,r=.5,o=.5*u,a=.5,s=.5,l=new go.PathFigure((a-r)*e,s*n,!1);i.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s-r)*n,(a-r)*e,(s-o)*n,(a-o)*e,(s-r)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(a+r)*e,s*n,(a+o)*e,(s-r)*n,(a+r)*e,(s-o)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s+r)*n,(a+r)*e,(s+o)*n,(a+o)*e,(s+r)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(a-r)*e,s*n,(a-o)*e,(s+r)*n,(a-r)*e,(s+o)*n).close()),r=.05,o=.05*u,a=.5,s=.8;var c=new go.PathFigure((a-r)*e,s*n,!1);return i.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s-r)*n,(a-r)*e,(s-o)*n,(a-o)*e,(s-r)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,(a+r)*e,s*n,(a+o)*e,(s-r)*n,(a+r)*e,(s-o)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,a*e,(s+r)*n,(a+r)*e,(s+o)*n,(a+o)*e,(s+r)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,(a-r)*e,s*n,(a-o)*e,(s+r)*n,(a-r)*e,(s+o)*n).close()),c.add(new go.PathSegment(go.PathSegment.Move,.5*e,.7*n)),c.add(new go.PathSegment(go.PathSegment.Line,.5*e,.5*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,.5*e,.2*n,.75*e,.475*n,.75*e,.225*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,.3*e,.35*n,.4*e,.2*n,.3*e,.25*n)),i})),go.Shape.defineFigureGenerator("Location",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(.5*e,n,!0).add(new go.PathSegment(go.PathSegment.Line,.75*e,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5*e,0,.975*e,.025*n,.5*e,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*e,.5*n,.5*e,0,.025*e,.025*n).close()).add(new go.PathSegment(go.PathSegment.Move,.5*e,.2*n)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*e,.3*n,.1*e,.1*n).close()))})),go.Shape.defineFigureGenerator("Lock",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.5*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var o=new go.PathFigure(.2*e,.5*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Move,.2*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*e,.3*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,.3*n,.25*e,0,.75*e,0)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.3*n)),i})),go.Shape.defineFigureGenerator("Unlocked",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.5*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var o=new go.PathFigure(.2*e,.5*n,!1);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Move,.2*e,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*e,.3*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.8*e,.3*n,.25*e,0,.75*e,0)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.35*n)),i})),go.Shape.defineFigureGenerator("Gear",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(.9375*e,.56246875*n,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*e,.4375*n)).add(new go.PathSegment(go.PathSegment.Line,.80621875*e,.4375*n)).add(new go.PathSegment(go.PathSegment.Bezier,.763*e,.3316875*n,.79840625*e,.39915625*n,.7834375*e,.3635*n)).add(new go.PathSegment(go.PathSegment.Line,.8566875*e,.23796875*n)).add(new go.PathSegment(go.PathSegment.Line,.76825*e,.14959375*n)).add(new go.PathSegment(go.PathSegment.Line,.67596875*e,.24184375*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*e,.19378125*n,.64228125*e,.2188125*n,.603875*e,.2021875*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*e,.0625*n)).add(new go.PathSegment(go.PathSegment.Line,.4375*e,.0625*n)).add(new go.PathSegment(go.PathSegment.Line,.4375*e,.19378125*n)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*e,.239375*n,.39759375*e,.20190625*n,.36053125*e,.2176875*n)).add(new go.PathSegment(go.PathSegment.Line,.2379375*e,.14959375*n)).add(new go.PathSegment(go.PathSegment.Line,.14953125*e,.2379375*n)).add(new go.PathSegment(go.PathSegment.Line,.23934375*e,.3278125*n)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*e,.4375*n,.21765625*e,.36059375*n,.201875*e,.397625*n)).add(new go.PathSegment(go.PathSegment.Line,.0625*e,.4375*n)).add(new go.PathSegment(go.PathSegment.Line,.0625*e,.5625*n)).add(new go.PathSegment(go.PathSegment.Line,.1938125*e,.5625*n)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*e,.67596875*n,.20221875*e,.603875*n,.21884375*e,.64228125*n)).add(new go.PathSegment(go.PathSegment.Line,.1495625*e,.76825*n)).add(new go.PathSegment(go.PathSegment.Line,.238*e,.8566875*n)).add(new go.PathSegment(go.PathSegment.Line,.3316875*e,.76296875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*e,.80621875*n,.36353125*e,.78340625*n,.3991875*e,.79840625*n)).add(new go.PathSegment(go.PathSegment.Line,.43753125*e,.9375*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*e,.9375*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*e,.80621875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*e,.760625*n,.602375*e,.79809375*n,.63946875*e,.78234375*n)).add(new go.PathSegment(go.PathSegment.Line,.76828125*e,.8566875*n)).add(new go.PathSegment(go.PathSegment.Line,.85671875*e,.76825*n)).add(new go.PathSegment(go.PathSegment.Line,.76065625*e,.67221875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*e,.56246875*n,.78234375*e,.63940625*n,.798125*e,.602375*n)).add(new go.PathSegment(go.PathSegment.Line,.9375*e,.56246875*n).close()).add(new go.PathSegment(go.PathSegment.Move,.5*e,.6*n)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*e,.5*n,.1*e,.1*n).close()))})),go.Shape.defineFigureGenerator("Hand",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.5*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.1*e,.3*n,0,.375*n,.05*e,.325*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.45*e,.075*n,.3*e,.225*n,.4*e,.175*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.525*e,.075*n,.46*e,.05*n,.525*e,.05*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.3*e,.4*n,.525*e,.275*n,.475*e,.325*n)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.9*e,.55*n,e,.4*n,e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.425*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.6*e,.7*n,.675*e,.55*n,.675*e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Line,.575*e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.575*e,.85*n,.65*e,.7*n,.65*e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,.525*e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.535*e,n,.61*e,.85*n,.61*e,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,.435*e,n,0,n).close()),i})),go.Shape.defineFigureGenerator("Map",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,.2*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),r.add(new go.PathSegment(go.PathSegment.Move,.25*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,n)),r.add(new go.PathSegment(go.PathSegment.Move,.75*e,0)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.8*n)),i})),go.Shape.defineFigureGenerator("Eject",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,e,n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.7*n).close());var o=new go.PathFigure(0,.6*n,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,0).close()),i})),go.Shape.defineFigureGenerator("Pencil",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*e,.1*n)).add(new go.PathSegment(go.PathSegment.Line,e,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.9*e,n)).add(new go.PathSegment(go.PathSegment.Line,.1*e,.2*n).close()))})),go.Shape.defineFigureGenerator("Building",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(1*e,1*n,!1);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,.046*e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,.046*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.3*n)),r.add(new go.PathSegment(go.PathSegment.Line,.046*e,.3*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.954*e,.3*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.3*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.954*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.954*e,.85*n)),r.add(new go.PathSegment(go.PathSegment.Line,e,.85*n).close());var o=new go.PathFigure(.126*e,.85*n,!1);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.126*e,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.322*e,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.322*e,.85*n).close());var a=new go.PathFigure(.402*e,.85*n,!1);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.402*e,.45*n)),a.add(new go.PathSegment(go.PathSegment.Line,.598*e,.45*n)),a.add(new go.PathSegment(go.PathSegment.Line,.598*e,.85*n).close());var s=new go.PathFigure(.678*e,.85*n,!1);i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,.678*e,.45*n)),s.add(new go.PathSegment(go.PathSegment.Line,.874*e,.45*n)),s.add(new go.PathSegment(go.PathSegment.Line,.874*e,.85*n).close());var l=new go.PathFigure(.5*e,.1*n,!1);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.196*e,.3*n)),l.add(new go.PathSegment(go.PathSegment.Line,.804*e,.3*n).close()),i})),go.Shape.defineFigureGenerator("Staircase",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,1*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,.15*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.15*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.35*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*e,.35*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.95*n).close()),i})),go.Shape.defineFigureGenerator("5Bars",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,1*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.184*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.184*e,n*(1-.184)).close());var o=new go.PathFigure(.204*e,n,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.204*e,n*(1-.184))),o.add(new go.PathSegment(go.PathSegment.Line,.388*e,.632*n)),o.add(new go.PathSegment(go.PathSegment.Line,.388*e,1*n).close());var a=new go.PathFigure(.408*e,n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.408*e,.632*n)),a.add(new go.PathSegment(go.PathSegment.Line,.592*e,n*(1-.552))),a.add(new go.PathSegment(go.PathSegment.Line,.592*e,1*n).close());var s=new go.PathFigure(.612*e,n,!0);i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,.612*e,n*(1-.552))),s.add(new go.PathSegment(go.PathSegment.Line,.796*e,.264*n)),s.add(new go.PathSegment(go.PathSegment.Line,.796*e,1*n).close());var l=new go.PathFigure(.816*e,n,!0);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.816*e,.264*n)),l.add(new go.PathSegment(go.PathSegment.Line,1*e,n*(1-.184*5))),l.add(new go.PathSegment(go.PathSegment.Line,1*e,1*n).close()),i})),go.Shape.defineFigureGenerator("PC",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,0).close());var o=new go.PathFigure(.055*e,.07*n,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.245*e,.07*n)),o.add(new go.PathSegment(go.PathSegment.Line,.245*e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.055*e,.1*n).close());var a=new go.PathFigure(.055*e,.13*n,!0);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.245*e,.13*n)),a.add(new go.PathSegment(go.PathSegment.Line,.245*e,.16*n)),a.add(new go.PathSegment(go.PathSegment.Line,.055*e,.16*n).close());var s=new go.PathFigure(.055*e,.18*n,!0);i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,.245*e,.18*n)),s.add(new go.PathSegment(go.PathSegment.Line,.245*e,.21*n)),s.add(new go.PathSegment(go.PathSegment.Line,.055*e,.21*n).close());var l=new go.PathFigure(1*e,0,!0);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.4*e,0)),l.add(new go.PathSegment(go.PathSegment.Line,.4*e,.65*n)),l.add(new go.PathSegment(go.PathSegment.Line,1*e,.65*n).close()),i})),go.Shape.defineFigureGenerator("Plane",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.55*e,n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,.7*n)),r.add(new go.PathSegment(go.PathSegment.Line,.1*e,.475*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.35*e,.525*n,0,.4*n,.225*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.4*e,.475*n)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,.35*n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,.325*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.325*n)),r.add(new go.PathSegment(go.PathSegment.Line,.85*e,.1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.9*e,.2*n,.975*e,0,e,.08*n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*e,n).close()),i})),go.Shape.defineFigureGenerator("Key",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(1*e,.5*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.4*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.35*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.35*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,.2*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.35*n)),r.add(new go.PathSegment(go.PathSegment.Line,0,.65*n)),r.add(new go.PathSegment(go.PathSegment.Line,.15*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.65*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.65*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,.6*n)),r.add(new go.PathSegment(go.PathSegment.Line,.85*e,.575*n)),r.add(new go.PathSegment(go.PathSegment.Line,.9*e,.6*n).close()),r.add(new go.PathSegment(go.PathSegment.Move,.17*e,.425*n)),r.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*e,.5*n,.075*e,.075*n).close()),i})),go.Shape.defineFigureGenerator("FilmTape",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0,0,!1);i.add(r),r.add(new go.PathSegment(go.PathSegment.Arc,270,180,0*e,.3*e,.055*e)),r.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.08*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.08*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.136*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.136*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.192*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.192*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.248*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.248*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.304*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.304*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.28),.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.28),1*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.336),1*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.336),.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.392),.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.392),1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.528*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.528*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.584*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.584*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.64*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.64*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.696*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,.696*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.752*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.752*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.728),.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.728),1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.864*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.864*e,.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.84),.95*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(.08+.84),1*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,1*n));var o=new go.PathFigure(0,0,!1);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,1*e,0*n)),o.add(new go.PathSegment(go.PathSegment.Arc,270,-180,1*e,.3*e,.055*e)),o.add(new go.PathSegment(go.PathSegment.Line,1*e,1*n));var a=new go.PathFigure(.11*e,.1*n,!1);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.35133333*e,.1*n)),a.add(new go.PathSegment(go.PathSegment.Line,.35133333*e,.8*n)),a.add(new go.PathSegment(go.PathSegment.Line,.11*e,.8*n).close());var s=new go.PathFigure(.37933333*e,.1*n,!1);i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,.62066666*e,.1*n)),s.add(new go.PathSegment(go.PathSegment.Line,.62066666*e,.8*n)),s.add(new go.PathSegment(go.PathSegment.Line,.37933333*e,.8*n).close());var l=new go.PathFigure(e*(.59266666+.056),.1*n,!1);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Line,e*(.83399999+.056),.1*n)),l.add(new go.PathSegment(go.PathSegment.Line,e*(.83399999+.056),.8*n)),l.add(new go.PathSegment(go.PathSegment.Line,e*(.59266666+.056),.8*n).close()),i})),go.Shape.defineFigureGenerator("FloppyDisk",(function(t,e,n){var i=new go.Geometry,r=8*u,o=new go.PathFigure(8,0,!1);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.86*e,0)),o.add(new go.PathSegment(go.PathSegment.Line,1*e,.14*n)),o.add(new go.PathSegment(go.PathSegment.Line,e,n-8)),o.add(new go.PathSegment(go.PathSegment.Bezier,e-8,n,e,n-r,e-r,n)),o.add(new go.PathSegment(go.PathSegment.Line,8,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,n-8,r,n,0,n-r)),o.add(new go.PathSegment(go.PathSegment.Line,0,8)),o.add(new go.PathSegment(go.PathSegment.Bezier,8,0,0,r,r,0).close());var a=new go.PathFigure(.83*e,0,!1);i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.83*e,.3*n)),a.add(new go.PathSegment(go.PathSegment.Line,.17*e,.3*n)),a.add(new go.PathSegment(go.PathSegment.Line,.17*e,0*n).close());var s=new go.PathFigure(.83*e,1*n,!1);i.add(s),s.add(new go.PathSegment(go.PathSegment.Line,.83*e,.5*n)),s.add(new go.PathSegment(go.PathSegment.Line,.17*e,.5*n)),s.add(new go.PathSegment(go.PathSegment.Line,.17*e,1*n).close());var l=new go.PathFigure(.78*e,.05*n,!1);return i.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.66*e,.05*n)),l.add(new go.PathSegment(go.PathSegment.Line,.66*e,.25*n)),l.add(new go.PathSegment(go.PathSegment.Line,.78*e,.25*n).close()),i})),go.Shape.defineFigureGenerator("SpeechBubble",(function(t,e,n){var i=t?t.parameter1:NaN;(isNaN(i)||i<0)&&(i=15),i=Math.min(i,e/3);var r=(i=Math.min(i,n/3))*u,o=.8*n,a=new go.Geometry,s=new go.PathFigure(i,0,!0);return a.add(s),s.add(new go.PathSegment(go.PathSegment.Line,e-i,0)),s.add(new go.PathSegment(go.PathSegment.Bezier,e,i,e-r,0,e,r)),s.add(new go.PathSegment(go.PathSegment.Line,e,o-i)),s.add(new go.PathSegment(go.PathSegment.Bezier,e-i,o,e,o-r,e-r,o)),s.add(new go.PathSegment(go.PathSegment.Line,.7*e,o)),s.add(new go.PathSegment(go.PathSegment.Line,.7*e,n)),s.add(new go.PathSegment(go.PathSegment.Line,.55*e,o)),s.add(new go.PathSegment(go.PathSegment.Line,i,o)),s.add(new go.PathSegment(go.PathSegment.Bezier,0,o-i,r,o,0,o-r)),s.add(new go.PathSegment(go.PathSegment.Line,0,i)),s.add(new go.PathSegment(go.PathSegment.Bezier,i,0,0,r,r,0).close()),r>1?(a.spot1=new go.Spot(0,0,r,r),a.spot2=new go.Spot(1,.8,-r,-r)):(a.spot1=go.Spot.TopLeft,a.spot2=new go.Spot(1,.8)),a})),go.Shape.defineFigureGenerator("Repeat",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0*e,.45*n,!0);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.6*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.2*e,.45*n).close());var o=new go.PathFigure(1*e,.55*n,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*e,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*e,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*e,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*e,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*e,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*e,.55*n).close()),i})),go.Shape.defineFigureGenerator("Windows",(function(t,e,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,e,0)).add(new go.PathSegment(go.PathSegment.Line,e,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close()).add(new go.PathSegment(go.PathSegment.Move,.4*e,.4*n)).add(new go.PathSegment(go.PathSegment.Line,.4*e,.8*n)).add(new go.PathSegment(go.PathSegment.Line,.9*e,.8*n)).add(new go.PathSegment(go.PathSegment.Line,.9*e,.4*n).close()).add(new go.PathSegment(go.PathSegment.Move,.2*e,.1*n)).add(new go.PathSegment(go.PathSegment.Line,.2*e,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.7*e,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.7*e,.1*n).close()).add(new go.PathSegment(go.PathSegment.Move,.1*e,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.1*e,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.5*e,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.5*e,.6*n).close()))})),go.Shape.defineFigureGenerator("Terminal",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0*e,.1*n,!1);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,1*e,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,.9*n)),r.add(new go.PathSegment(go.PathSegment.Line,0*e,.9*n).close());var o=new go.PathFigure(.1*e,.2*n,!0);i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.1*e,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.22*e,.285*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*e,.32*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*e,.37*n)),o.add(new go.PathSegment(go.PathSegment.Line,.275*e,.32*n)),o.add(new go.PathSegment(go.PathSegment.Line,.275*e,.25*n).close());var a=new go.PathFigure(.28*e,.37*n,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.45*e,.37*n)),a.add(new go.PathSegment(go.PathSegment.Line,.45*e,.41*n)),a.add(new go.PathSegment(go.PathSegment.Line,.28*e,.41*n).close()),i})),go.Shape.defineFigureGenerator("Beaker",(function(t,e,n){var i=new go.Geometry,r=15*u,o=new go.PathFigure(.62*e,.475*n,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,e,n-15)),o.add(new go.PathSegment(go.PathSegment.Bezier,e-15,n,e,n-r,e-r,n)),o.add(new go.PathSegment(go.PathSegment.Line,15,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,n-15,r,n,0,n-r)),o.add(new go.PathSegment(go.PathSegment.Line,.38*e,.475*n)),o.add(new go.PathSegment(go.PathSegment.Line,.38*e,.03*n)),o.add(new go.PathSegment(go.PathSegment.Line,.36*e,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.64*e,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.62*e,.03*n).close()),r>1?(i.spot1=new go.Spot(0,0,r,r),i.spot2=new go.Spot(1,1,-r,-r)):(i.spot1=go.Spot.TopLeft,i.spot2=go.Spot.BottomRight),i})),go.Shape.defineFigureGenerator("Download",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0*e,1*n,!0);i.add(r);var o=.1/.3;r.add(new go.PathSegment(go.PathSegment.Line,1*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,.755*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,.93*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.64*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.61*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.39*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.36*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.07*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.245*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.66),.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.66),0*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.8),0*n)),r.add(new go.PathSegment(go.PathSegment.Line,0*e,n*(1-o)).close());var a=new go.PathFigure(.4*e,0*n,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.4*e,.44*n)),a.add(new go.PathSegment(go.PathSegment.Line,.26*e,.44*n)),a.add(new go.PathSegment(go.PathSegment.Line,.5*e,.66*n)),a.add(new go.PathSegment(go.PathSegment.Line,.74*e,.44*n)),a.add(new go.PathSegment(go.PathSegment.Line,.6*e,.44*n)),a.add(new go.PathSegment(go.PathSegment.Line,.6*e,0*n).close()),i})),go.Shape.defineFigureGenerator("Bin",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0*e,1*n,!0);i.add(r);var o=.1/.3;return r.add(new go.PathSegment(go.PathSegment.Line,1*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,.755*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,.93*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.64*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.61*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.39*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.36*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.07*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.245*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.66),.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.66),0*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.8),0*n)),r.add(new go.PathSegment(go.PathSegment.Line,0*e,n*(1-o)).close()),i})),go.Shape.defineFigureGenerator("Upload",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(0*e,1*n,!0);i.add(r);var o=.1/.3;r.add(new go.PathSegment(go.PathSegment.Line,1*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.8*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.66*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,.755*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,.93*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.64*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.61*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.39*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.36*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.07*e,n*(1-o))),r.add(new go.PathSegment(go.PathSegment.Line,.245*e,.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.66),.055*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.66),0*n)),r.add(new go.PathSegment(go.PathSegment.Line,e*(1-.8),0*n)),r.add(new go.PathSegment(go.PathSegment.Line,0*e,n*(1-o)).close());var a=new go.PathFigure(.5*e,0*n,!0);return i.add(a),a.add(new go.PathSegment(go.PathSegment.Line,.26*e,.25*n)),a.add(new go.PathSegment(go.PathSegment.Line,.4*e,.25*n)),a.add(new go.PathSegment(go.PathSegment.Line,.4*e,.63*n)),a.add(new go.PathSegment(go.PathSegment.Line,.6*e,.63*n)),a.add(new go.PathSegment(go.PathSegment.Line,.6*e,.25*n)),a.add(new go.PathSegment(go.PathSegment.Line,.74*e,.25*n).close()),i})),go.Shape.defineFigureGenerator("EmptyDrink",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.15*e,0*n,!1);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.85*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,1*n).close()),i})),go.Shape.defineFigureGenerator("Drink",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.15*e,0*n,!1);i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.85*e,0*n)),r.add(new go.PathSegment(go.PathSegment.Line,.7*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.3*e,1*n).close());var o=new go.PathFigure(.235*e,.28*n,!0);return i.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.765*e,.28*n)),o.add(new go.PathSegment(go.PathSegment.Line,.655*e,.97*n)),o.add(new go.PathSegment(go.PathSegment.Line,.345*e,.97*n).close()),i})),go.Shape.defineFigureGenerator("4Arrows",(function(t,e,n){var i=new go.Geometry,r=new go.PathFigure(.5*e,0*n,!0);return i.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.35*n)),r.add(new go.PathSegment(go.PathSegment.Line,1*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.65*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.65*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*e,1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.75*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,.55*n)),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,.65*n)),r.add(new go.PathSegment(go.PathSegment.Line,0*e,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,.35*n)),r.add(new go.PathSegment(go.PathSegment.Line,.25*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.45*e,.25*n)),r.add(new go.PathSegment(go.PathSegment.Line,.35*e,.25*n).close()),i})),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},35702:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var t={},e="5.0",n={},i=null,r=!1,o=!1,a=null,s=!1,l=null,u=null,c=0;c4?parseFloat(t):5};function S(){try{return window.self!==window.top}catch(t){return!0}}function P(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}t.setHTML5Codebase=function(t,e){u=t,R(t,e)},t.setJavaCodebase=t.setJavaCodebaseVersion=t.isCompiledInstalled=t.setPreCompiledScriptPath=t.setPreCompiledResourcePath=function(){},t.setHTML5CodebaseVersion=function(t,e){var n=parseFloat(t);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(l=t,D(t,e))},t.getHTML5CodebaseVersion=function(){return g},t.getParameters=function(){return n},t.setFontsCSSURL=function(t){b=t},t.setGiacJSURL=function(t){},t.setJNLPFile=function(t){t},t.setJNLPBaseDir=function(t){},t.inject=function(){function e(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var i,r="auto",o=n.id,a=!1,l=0;l=5)return!0;var e=t.getAppletObject();return!(!e||"function"!=typeof e.recalculateEnvironments)&&(e.recalculateEnvironments(),!0)},t.startAnimation=function(){var e=t.getAppletObject();return!(!e||"function"!=typeof e.startAnimation)&&(e.startAnimation(),!0)},t.stopAnimation=function(){var e=t.getAppletObject();return!(!e||"function"!=typeof e.stopAnimation)&&(e.stopAnimation(),!0)},t.getAppletObject=function(){var t=void 0!==n.id?n.id:"ggbApplet";return window[t]},t.resize=function(){};var M=function(t){return t&&"false"!==t},E=function(e,n,i){x(g)<=4.2&&(i=!0);var r=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==g||ggbHTML5LoadedCodebaseIsWebSimple&&!v)&&(r=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var o=document.createElement("div");o.classList.add("appletParameters","notranslate");var a=n.width,s=n.height;if(n.disableAutoScale=void 0===n.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():n.disableAutoScale,void 0!==n.width)if(x(g)<=4.4)M(n.showToolBar)&&(n.height-=7),M(n.showAlgebraInput)&&(n.height-=37),n.width<605&&M(n.showToolBar)&&(n.width=605,a=605);else{var c=100;(M(n.showToolBar)||M(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),c=M(n.showMenuBar)?245:155),a=5?(n.appletOnLoad=function(t){var n=e.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(y),window.GGBT_wsf_view&&$(window).trigger("resize"),f(t)},w||y.appendChild(S)):o.appendChild(S),y.appendChild(o),w||e.appendChild(y),setTimeout((function(){t.resize()}),1)}function P(t,e){e&&"function"==typeof e.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(t,e.appletOnLoad):renderGGBElement(t),F("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",e)}function k(t,e){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:t,params:e}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(t){P(t.article,t.params)})),html5AppletsToProcess=null)},x(g)<5&&(t.className+=" geogebraweb")):P(t,e)}if(r){scriptLoadStarted=!0;for(var C=0;C0?(r.remove(),s.attr("id","fullscreencontent").show(),jQuery(o).append(s),window.dispatchEvent(new Event("resize"))):E(r,e,!1),window.GGBT_wsf_view.launchFullScreen(o)}else p=i,E(t,e,!1);if(!window.GGBT_wsf_view)for(a=0;at/4*3&&(s=t/4*3),l=s/5.8,a.setAttribute("src",w),a.setAttribute("width",s),a.setAttribute("height",l);var c=(t-s)/2,h=(e-l)/2;a.style.left=c+"px",a.style.top=h+"px",r.appendChild(a)}return r.appendChild(u),r},B=function(t){return"html5"===(t=t.toLowerCase())||"screenshot"===t?t:"html5"},O=["web","webSimple","web3d","tablet","tablet3d","phone"],D=function(t,e){if(g=t,e)R(g,!0);else{var o,a,s=!r;if(s){var l=x(g);!isNaN(l)&&l<4.4&&(s=!1)}o="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var u=g.indexOf("//");for(var c in a=u>0?g:0===u?o+g:"https://www.geogebra.org/apps/5.2.814.0/",O)if(g.slice(-1*O[c].length)===O[c]||g.slice(-1*(O[c].length+1))===O[c]+"/")return void R(a,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!s||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||M(n.showToolBar)||M(n.showMenuBar)||M(n.showAlgebraInput)||M(n.enableRightClick)||n.appName&&"classic"!=n.appName?a+="web3d/":a+="webSimple/",R(a,!1)}},R=function(t,e){if(t.requirejs)d=t;else{"/"!==t.slice(-1)&&(t+="/"),d=t,null===e&&(e=-1===t.indexOf("http")),f=e,m="web.nocache.js",v=!1;var n=d.split("/");n.length>1&&(e||"webSimple"!==n[n.length-2]?O.indexOf(n[n.length-2])>=0&&(m=n[n.length-2]+".nocache.js"):(m="webSimple.nocache.js",v=!0)),n=t.split("/"),"test"===(g=n[n.length-3]).substr(0,4)?g=g.substr(4,1)+"."+g.substr(5,1):"war"!==g.substr(0,3)&&"beta"!==g.substr(0,4)||(g="5.0");var i=parseFloat(g);NaN!==i&&i<5&&t.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+i+" is deprecated. Using version latest instead."),D("5.0",e))}},F=function(t,e){window.console&&window.console.log&&(!e||void 0===e.showLogging||e.showLogging&&"false"!==e.showLogging)&&console.log(t)};function z(){var t=e;null!==l?t=l:parseFloat(t)<5&&(t="5.0"),D(t,!1),null!==u&&R(u,f),s=!0}return void 0!==n.material_id?k(z):z(),t},GGBAppletUtils=function(){"use strict";function t(){return void 0!==window.GGBT_wsf_edit}function e(t,e){1!=e?(t.style.transformOrigin="0% 0% 0px",t.style.webkitTransformOrigin="0% 0% 0px",t.style.transform="scale("+e+","+e+")",t.style.webkitTransform="scale("+e+","+e+")",t.style.maxWidth="initial",null!==t.querySelector(".ggb_preview")&&(t.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==t.querySelectorAll(".ggb_preview img")[0]&&(t.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==t.querySelectorAll(".ggb_preview img")[1]&&(t.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(t.style.transform="none",t.style.webkitTransform="none")}function n(t,e,n,i,r){if(t.isScreenshoGenerator)return 1;var o,a=void 0!==i&&i,s=null!=t.noScaleMargin&&t.noScaleMargin,l=(o=t.autoHeight)&&"false"!==o,u=function(t,e,n,i,r,o){var a=null;if(null!=o&&""!=o)for(var s=t.parentNode;null!=s;){if((" "+s.className+" ").indexOf(" "+o+" ")>-1){a=s;break}s=s.parentNode}var l=0,u=0,c=0,h=0,d=0,f=0,p=0;if(a)l=a.offsetWidth,u=Math.max(i?a.offsetWidth:0,a.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(l=Math.min(window.innerWidth,document.documentElement.clientWidth),u=Math.min(window.innerHeight,document.documentElement.clientHeight),c=l):(l=window.innerWidth,u=window.innerHeight,c=window.innerWidth),t){var g=t.getBoundingClientRect();g.left>0&&g.left<=l&&(void 0===r||!r)&&("rtl"===document.dir?(d=l-g.width-g.left,f=c<=480?10:30):(f=g.left,d=c<=480?10:30),h=f+d)}t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(t.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(h=40,p=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(h=0,p=40))}return t&&((void 0===n||!n)&&e>0&&e+h1&&(a=!0)),e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(a=!0),t.hasOwnProperty("disableAutoScale")&&t.disableAutoScale?o:(r=n(t,e,a,i,t.scaleContainerClass),!a||t.hasOwnProperty("scale")&&1!==o?Math.min(o,r):r)}function r(t){var e=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),i=t.getBoundingClientRect(),r=(e-i.width)/2,o=(n-i.height)/2;o<0&&(o=0),t.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(t.style.left=r<40?"40px":r+"px",t.style.top=o+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(t.style.top=o<40?"40px":o+"px",t.style.left=r+"px")}return{responsiveResize:function(n,o){var a=n.querySelector(".appletParameters");if(a){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(o.id!==a.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(n)}if(a.parentElement&&/fullscreen/.test(a.parentElement.className))return;var s=i(o,n);t()&&a.setAttribute("data-param-scale",s);for(var l=null,u=0;u=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(t){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(t){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(t){var e=c[t];return null==e?null:e},r=d,webModule.__errFn=e}function B(){function t(t){var e=t.lastIndexOf(rb);-1==e&&(e=t.length);var n=t.indexOf(sb);-1==n&&(n=t.length);var i=t.lastIndexOf(tb,Math.min(n,e));return i>=O?t.substring(O,i+P):W}var e,n=null!=(e=__gwt_getMetaProperty(wb))?e:W;return n==W&&(n=function(){for(var e=o.getElementsByTagName(_),n=O;nO?t[t.length-P].href:W}()),n==W&&function(){var t=o.location;return t.href==t.protocol+zb+t.host+t.pathname+t.search+t.hash}()&&(n=t(o.location.href)),n=function(e){if(e.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=e+vb,e=t(n.src)}return e}(n),n}function C(t){return t.match(/^\//)||t.match(/^[a-zA-Z]+:\/\//)?t:webModule.__moduleBase+t}function D(){var t,e=O,i=[],o=[];function a(t){var e=o[t](),n=i[t];if(e in n)return e;var a=[];for(var s in n)a[n[s]]=s;throw r&&r(t,a,e),null}if(__gwt_isKnownPropertyValue=function(t,e){return e in i[t]},webModule.__getPropMap=function(){var t={};for(var e in i)i.hasOwnProperty(e)&&(t[e]=a(e));return t},webModule.__computePropValue=a,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var s=(t=Cb).indexOf(Db);-1!=s&&(e=parseInt(t.substring(s+P),$),t=t.substring(O,s))}catch(t){}return webModule.__softPermutationId=e,C(t+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(t){var e=s[L].bindings;s[L].bindings=function(){for(var n=e?e():{},i=t[webModule.__softPermutationId],r=O;r1&&void 0!==c[1]&&c[1],l=a?e:G()(G()({},o),i),f(!0),s(l),n.next=6,t(l);case 6:return u=n.sent,f(!1),v(u),n.abrupt("return",u);case 10:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}();return[o,d,y,m,v]}var Pt=[{id:"type",name:"筛选",children:[{name:"全部",id:"all",type:"type"},{name:"我的",id:"mine",type:"type"}]},{id:"diff",name:"难度",children:[{name:"全部",id:"",type:"diff"},{name:"初级",id:1,type:"diff"},{name:"中级",id:2,type:"diff"},{name:"中高级",id:3,type:"diff"},{name:"高级",id:4,type:"diff"}]}],kt=(0,d.connect)((function(t){return{classroomList:t.classroomList,loading:t.loading}}))((function(t){var e,n,i=t.classroomList,o=t.loading,s=t.dispatch,u=t.cb,c=t.shixunIds,f=void 0===c?[]:c,p=((0,d.useParams)(),(0,d.useLocation)(),X.Z.useForm()),g=(l()(p,1)[0],i.shixunLists),m=(0,h.useState)([]),v=l()(m,2),y=v[0],w=v[1],b=(0,h.useState)([]),x=l()(b,2),S=x[0],P=x[1],k=(0,h.useState)([]),C=l()(k,2),A=C[0],M=C[1],E=(null==i||null===(e=i.actionTabs)||void 0===e?void 0:e.isMissionLevel)||!1,L=St(lt.xG,{}),T=l()(L,3),N=T[1],j=T[2],I=[{name:"最新",id:"created_at"},{name:"最热",id:"myshixuns_count"}].filter((function(t){return!!t})),B=(0,h.useState)({page:1,type:(0,xt.Ny)()?"all":"mine",diff:0,status:"all",order:"desc",limit:20,sort:"myshixuns_count",group_id:null,need:1,load_jupyter_evaluate:!0,is_subject:!0}),O=l()(B,2),D=O[0],R=O[1];(0,h.useEffect)((function(){"选用实践项目"===i.actionTabs.key&&(F(),D.page=1,s({type:"classroomList/getShixunLists",payload:G()({},D)}))}),[i.actionTabs.key]);var F=function(){var t=a()(r()().mark((function t(){var e;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,it.ZP)("/api/users/user_setting_groups.json",{method:"get",params:{type:"Shixun"}});case 2:e=t.sent,w([{id:null,name:"全部"},{id:-1,name:"未加入目录"}].concat(Y()((null==e?void 0:e.groups)||[])));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),z=function(){s({type:"classroomList/setActionTabs",payload:{}}),R({page:1,type:(0,xt.Ny)()?"all":"mine",diff:0,status:"all",order:"desc",limit:20,sort:"myshixuns_count",group_id:null,need:1,load_jupyter_evaluate:!0,is_subject:!0}),M([])};return"选用实践项目"!==i.actionTabs.key?null:(0,at.jsxs)(q.Z,{placement:"bottom",height:"100%",closable:!1,open:"选用实践项目"===i.actionTabs.key,rootClassName:ut,footer:(0,at.jsxs)("div",{className:"flex justify-center gap-8px",children:[(0,at.jsx)(K.ZP,{size:"middle",onClick:function(){z(),P([]),u("取消")},children:" 取消 "}),(0,at.jsx)(K.ZP,{size:"middle",loading:N,onClick:a()(r()().mark((function t(){var e,n,o,a,s,l;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r()().mark((function t(){var e,n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=S[o],!f.includes(e)){t.next=4;break}return H.ZP.info("请勿重复选择:".concat(null==g||null===(n=g.shixun_list)||void 0===n||null===(n=n.find((function(t){return t.id===e})))||void 0===n?void 0:n.title)),t.abrupt("return",{v:void 0});case 4:case"end":return t.stop()}}),t)})),o=0;case 2:if(!(o<(null==S?void 0:S.length))){t.next=10;break}return t.delegateYield(e(),"t0",4);case 4:if(!(n=t.t0)){t.next=7;break}return t.abrupt("return",n.v);case 7:o++,t.next=2;break;case 10:if(a=[],E&&A.forEach((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];a.push.apply(a,Y()(t.filter((function(t){return-1!==t}))))})),!E){t.next=18;break}return t.next=15,j({stage_id:i.actionTabs.id,subject_id:i.actionTabs.subject_id,challenge_ids:a});case 15:t.t1=t.sent,t.next=21;break;case 18:return t.next=20,(0,lt.Ep)({id:i.actionTabs.id,subject_id:i.actionTabs.subject_id,shixun_ids:Y()(S)});case 20:t.t1=t.sent;case 21:s=t.t1,P([]),(E?0===(null==s?void 0:s.status):null==s?void 0:s.shixuns_list)&&(z(),u(E?null==s||null===(l=s.data)||void 0===l?void 0:l.list:s.shixuns_list));case 24:case"end":return t.stop()}}),t)}))),type:"primary",children:" 确定 "})]}),children:[(0,at.jsx)("section",{className:"tc",children:(0,at.jsx)(st,{onChange:function(t){R(G()(G()(G()({},D),t),{},{page:1})),s({type:"classroomList/getShixunLists",payload:G()(G()(G()({},D),t),{},{page:1})})}})}),(0,at.jsx)(_.Z,{spinning:o.effects["classroomList/getShixunLists"],children:(0,at.jsxs)("section",{className:"edu-container",children:[Pt.map((function(t,e){var n;return(0,at.jsxs)("ul",{className:ct,children:[(0,at.jsx)("li",{children:t.name}),null==t||null===(n=t.children)||void 0===n?void 0:n.map((function(e,n){return(0,xt.Ny)()||"type"!==t.id||"全部"!==e.name?(0,at.jsx)("li",{className:D[t.id]==e.id?ht:"",onClick:function(){D[t.id]=e.id,D.page=1,R(G()({},D)),s({type:"classroomList/getShixunLists",payload:G()({},D)})},children:(0,at.jsx)("strong",{children:e.name})},n):(0,at.jsx)(at.Fragment,{})}))]},e)})),"mine"===D.type&&(0,at.jsxs)("ul",{className:ct,children:[(0,at.jsx)("li",{children:"目录"}),null==y?void 0:y.map((function(t,e){return(0,at.jsx)("li",{className:D.group_id==t.id?ht:"",onClick:function(){D.group_id=t.id,D.page=1,R(G()({},D)),s({type:"classroomList/getShixunLists",payload:G()({},D)})},children:(0,at.jsx)("strong",{children:t.name})},t.name)}))]}),(0,at.jsxs)(Q.Z,{align:"middle",children:[(0,at.jsx)(J.Z,{flex:"1",className:vt,children:I.map((function(t,e){return(0,at.jsx)(K.ZP,{className:"mr20",type:D.sort===t.id?"primary":"default",onClick:function(){D.sort=t.id,R(G()({},D)),s({type:"classroomList/getShixunLists",payload:G()({},D)})},children:t.name},e)}))}),(0,at.jsx)(J.Z,{className:"c-grey-999",children:(0,at.jsx)("div",{className:yt,children:(0,at.jsx)("ul",{children:(0,at.jsxs)("li",{className:"current",onClick:function(){D.order="asc"===D.order?"desc":"asc",R(G()({},D)),s({type:"classroomList/getShixunLists",payload:G()({},D)})},children:["学习人数",(0,at.jsxs)("p",{className:"edu-sorter current ".concat(D.order),children:[(0,at.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}),(0,at.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})]})]})})})})]}),null==g||null===(n=g.shixun_list)||void 0===n?void 0:n.map((function(t,e){var n;return(0,at.jsxs)("div",{className:dt,children:[!E&&(0,at.jsx)($.Z,{checked:S.includes(t.id),value:t.id,onChange:function(e){S.indexOf(t.id);S.indexOf(t.id)>-1?P(S.filter((function(e){return e!==t.id}))):P(S.concat(t.id))},disabled:"未发布"==(null==t?void 0:t.shixun_tag_num_name)}),(0,at.jsxs)("div",{className:ft,children:[(0,at.jsx)("div",{className:pt,children:(0,at.jsxs)("div",{className:gt,children:[(0,at.jsx)("a",{className:"c-black",href:"/shixuns/".concat(null==t?void 0:t.identifier,"/challenges"),target:"_blank",children:(0,at.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:t.title}})}),(0,xt.Ny)()&&1===(null==t?void 0:t.mark_status)&&(0,at.jsx)(tt.Z,{title:null==t?void 0:t.mark_content,children:(0,at.jsx)("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10",children:"正常"})}),(0,xt.Ny)()&&2===(null==t?void 0:t.mark_status)&&(0,at.jsx)(tt.Z,{title:null==t?void 0:t.mark_content,children:(0,at.jsx)("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10",children:"需完善"})}),(0,xt.Ny)()&&3===(null==t?void 0:t.mark_status)&&(0,at.jsx)(tt.Z,{title:null==t?void 0:t.mark_content,children:(0,at.jsx)("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10",children:"无法使用"})}),"未发布"==(null==t?void 0:t.shixun_tag_num_name)&&(0,at.jsx)(tt.Z,{zIndex:1e4,title:"实训需发布后才能选用到课程中,点击名称可前往实训详情",children:(0,at.jsx)("span",{style:{marginRight:"auto",background:"#999"},className:"tag-style current ml10",children:"未发布"})})]})}),(0,at.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,at.jsx)("span",{className:mt,dangerouslySetInnerHTML:{__html:t.description}})}),E?(0,at.jsx)(tt.Z,{title:null!=t&&t.task_pass&&"未发布"!=(null==t?void 0:t.shixun_tag_num_name)?"":"禁止跳关和未发布的实训任务关卡,不能选用到课程中",children:(0,at.jsx)("div",{className:"mt15",children:(0,at.jsx)($.Z.Group,{disabled:!(null!=t&&t.task_pass)||"未发布"==(null==t?void 0:t.shixun_tag_num_name),options:[{value:-1,label:"全选"}].concat(Y()((null==t||null===(n=t.challenges)||void 0===n?void 0:n.map((function(t,e){return{value:null==t?void 0:t.id,label:"第".concat(null==t?void 0:t.position,"关 ").concat(null==t?void 0:t.subject)}})))||[])),value:(null==A?void 0:A[e])||[],onChange:function(n){var i,r,o,a=(null==n?void 0:n.filter((function(t){return-1!==t})))||[],s=(null==t||null===(i=t.challenges)||void 0===i?void 0:i.map((function(t){return null==t?void 0:t.id})))||[];null!=n&&n.includes(-1)?A[e]=null!=A&&null!==(r=A[e])&&void 0!==r&&r.includes(-1)?(null==a?void 0:a.length)!==(null==s?void 0:s.length)?a:[]:[].concat(Y()(s),[-1]):A[e]=null!=A&&null!==(o=A[e])&&void 0!==o&&o.includes(-1)?[]:(null==n?void 0:n.length)===(null==s?void 0:s.length)?[].concat(Y()(s),[-1]):n;M(Y()(A))}})})}):(0,at.jsx)("div",{className:" mt15",children:t.challenge_names.map((function(t,e){return(0,at.jsxs)("span",{className:"mr30 font12",children:["第",e+1,"关 ",t," "]},e)}))}),(0,at.jsx)(et.Z,{dashed:!0}),(0,at.jsxs)("div",{className:"c-light-black mt20 font12",style:{display:"flex",justifyContent:"space-between"},children:[(0,at.jsxs)("div",{children:[(0,at.jsx)(tt.Z,{overlayClassName:bt,title:(0,at.jsx)("div",{children:(0,at.jsx)("span",{dangerouslySetInnerHTML:{__html:null==t?void 0:t.member_user_names}})}),children:(0,at.jsx)("span",{className:wt,dangerouslySetInnerHTML:{__html:null==t?void 0:t.member_user_names}})}),t.author_school_name&&(0,at.jsx)(h.Fragment,{children:(0,at.jsx)("span",{dangerouslySetInnerHTML:{__html:t.author_school_name}})})]}),(0,at.jsxs)("div",{children:[(0,at.jsxs)("span",{className:"mr30",children:["难度系数  ",t.level]}),(0,at.jsxs)("span",{children:["学习人数  ",t.study_count]})]})]})]})]},e)})),(0,at.jsx)("p",{})]})}),(0,at.jsx)("div",{className:"tc",children:(0,at.jsx)(nt.Z,{current:D.page||1,hideOnSinglePage:!0,showSizeChanger:!1,defaultPageSize:20,showQuickJumper:!0,total:null==g?void 0:g.shixuns_count,onChange:function(t){D.page=t,s({type:"classroomList/getShixunLists",payload:G()({},D)})}})})]},"bottom")})),Ct=n(91232),At=n.n(Ct),Mt=n(38819),Et=n(92310),Lt=n.n(Et),Tt=n(14809),Nt=n(95190),jt=n(50298),It=n(93664),Bt=n(18929),Ot=n(48736),Dt=n(62646),Rt=n(11592),Ft=n(4635),zt=n(77900),Gt=n(10228),Ut=h.forwardRef((function(t,e){var n=t.prefixCls,i=t.forceRender,r=t.className,o=t.style,a=t.children,s=t.isActive,l=t.role,u=h.useState(s||i),c=(0,jt.Z)(u,2),d=c[0],f=c[1];return h.useEffect((function(){(i||s)&&f(!0)}),[i,s]),d?h.createElement("div",{ref:e,className:Lt()("".concat(n,"-content"),(0,Ft.Z)((0,Ft.Z)({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),r),style:o,role:l},h.createElement("div",{className:"".concat(n,"-content-box")},a)):null}));Ut.displayName="PanelContent";var Ht=Ut,_t=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],Zt=h.forwardRef((function(t,e){var n=t.showArrow,i=void 0===n||n,r=t.headerClass,o=t.isActive,a=t.onItemClick,s=t.forceRender,l=t.className,u=t.prefixCls,c=t.collapsible,d=t.accordion,f=t.panelKey,p=t.extra,g=t.header,m=t.expandIcon,v=t.openMotion,y=t.destroyInactivePanel,w=t.children,b=(0,Dt.Z)(t,_t),x="disabled"===c,S="header"===c,P="icon"===c,k=null!=p&&"boolean"!=typeof p,C=function(){null==a||a(f)},A="function"==typeof m?m(t):h.createElement("i",{className:"arrow"});A&&(A=h.createElement("div",{className:"".concat(u,"-expand-icon"),onClick:["header","icon"].includes(c)?C:void 0},A));var M=Lt()((0,Ft.Z)((0,Ft.Z)((0,Ft.Z)({},"".concat(u,"-item"),!0),"".concat(u,"-item-active"),o),"".concat(u,"-item-disabled"),x),l),E={className:Lt()(r,(0,Ft.Z)((0,Ft.Z)((0,Ft.Z)({},"".concat(u,"-header"),!0),"".concat(u,"-header-collapsible-only"),S),"".concat(u,"-icon-collapsible-only"),P)),"aria-expanded":o,"aria-disabled":x,onKeyDown:function(t){"Enter"!==t.key&&t.keyCode!==Gt.Z.ENTER&&t.which!==Gt.Z.ENTER||C()}};return S||P||(E.onClick=C,E.role=d?"tab":"button",E.tabIndex=x?-1:0),h.createElement("div",(0,Tt.Z)({},b,{ref:e,className:M}),h.createElement("div",E,i&&A,h.createElement("span",{className:"".concat(u,"-header-text"),onClick:"header"===c?C:void 0},g),k&&h.createElement("div",{className:"".concat(u,"-extra")},p)),h.createElement(zt.ZP,(0,Tt.Z)({visible:o,leavedClassName:"".concat(u,"-content-hidden")},v,{forceRender:s,removeOnLeave:y}),(function(t,e){var n=t.className,i=t.style;return h.createElement(Ht,{ref:e,prefixCls:u,className:n,style:i,isActive:o,forceRender:s,role:d?"tabpanel":void 0},w)})))})),Wt=Zt,Vt=["children","label","key","collapsible","onItemClick","destroyInactivePanel"];var Yt=function(t,e,n){return Array.isArray(t)?function(t,e){var n=e.prefixCls,i=e.accordion,r=e.collapsible,o=e.destroyInactivePanel,a=e.onItemClick,s=e.activeKey,l=e.openMotion,u=e.expandIcon;return t.map((function(t,e){var c=t.children,d=t.label,f=t.key,p=t.collapsible,g=t.onItemClick,m=t.destroyInactivePanel,v=(0,Dt.Z)(t,Vt),y=String(null!=f?f:e),w=null!=p?p:r,b=null!=m?m:o,x=!1;return x=i?s[0]===y:s.indexOf(y)>-1,h.createElement(Wt,(0,Tt.Z)({},v,{prefixCls:n,key:y,panelKey:y,isActive:x,accordion:i,openMotion:l,expandIcon:u,header:d,collapsible:w,onItemClick:function(t){"disabled"!==w&&(a(t),null==g||g(t))},destroyInactivePanel:b}),c)}))}(t,n):(0,Rt.Z)(e).map((function(t,e){return function(t,e,n){if(!t)return null;var i=n.prefixCls,r=n.accordion,o=n.collapsible,a=n.destroyInactivePanel,s=n.onItemClick,l=n.activeKey,u=n.openMotion,c=n.expandIcon,d=t.key||String(e),f=t.props,p=f.header,g=f.headerClass,m=f.destroyInactivePanel,v=f.collapsible,y=f.onItemClick,w=!1;w=r?l[0]===d:l.indexOf(d)>-1;var b=null!=v?v:o,x={key:d,panelKey:d,header:p,headerClass:g,isActive:w,prefixCls:i,destroyInactivePanel:null!=m?m:a,openMotion:u,accordion:r,children:t.props.children,onItemClick:function(t){"disabled"!==b&&(s(t),null==y||y(t))},expandIcon:c,collapsible:b};return"string"==typeof t.type?t:(Object.keys(x).forEach((function(t){void 0===x[t]&&delete x[t]})),h.cloneElement(t,x))}(t,e,n)}))},Xt=n(26112);function qt(t){var e=t;if(!Array.isArray(e)){var n=(0,It.Z)(e);e="number"===n||"string"===n?[e]:[]}return e.map((function(t){return String(t)}))}var Kt=h.forwardRef((function(t,e){var n=t.prefixCls,i=void 0===n?"rc-collapse":n,r=t.destroyInactivePanel,o=void 0!==r&&r,a=t.style,s=t.accordion,l=t.className,u=t.children,c=t.collapsible,d=t.openMotion,f=t.expandIcon,p=t.activeKey,g=t.defaultActiveKey,m=t.onChange,v=t.items,y=Lt()(i,l),w=(0,Bt.Z)([],{value:p,onChange:function(t){return null==m?void 0:m(t)},defaultValue:g,postState:qt}),b=(0,jt.Z)(w,2),x=b[0],S=b[1];(0,Ot.ZP)(!u,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var P=Yt(v,u,{prefixCls:i,accordion:s,openMotion:d,expandIcon:f,collapsible:c,destroyInactivePanel:o,onItemClick:function(t){return S((function(){return s?x[0]===t?[]:[t]:x.indexOf(t)>-1?x.filter((function(e){return e!==t})):[].concat((0,Nt.Z)(x),[t])}))},activeKey:x});return h.createElement("div",(0,Tt.Z)({ref:e,className:y,style:a,role:s?"tablist":void 0},(0,Xt.Z)(t,{aria:!0,data:!0})),P)})),Qt=Object.assign(Kt,{Panel:Wt}),Jt=Qt,$t=(Qt.Panel,n(2738)),te=n(62892),ee=n(92343),ne=n(36355),ie=n(19716);var re=h.forwardRef(((t,e)=>{const{getPrefixCls:n}=h.useContext(ne.E_),{prefixCls:i,className:r,showArrow:o=!0}=t,a=n("collapse",i),s=Lt()({[`${a}-no-arrow`]:!o},r);return h.createElement(Jt.Panel,Object.assign({ref:e},t,{prefixCls:a,className:s}))})),oe=n(17313),ae=n(8378),se=n(83116),le=n(37613);const ue=t=>{const{componentCls:e,contentBg:n,padding:i,headerBg:r,headerPadding:o,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:u,lineType:c,colorBorder:h,colorText:d,colorTextHeading:f,colorTextDisabled:p,fontSize:g,fontSizeLG:m,lineHeight:v,marginSM:y,paddingSM:w,paddingLG:b,paddingXS:x,motionDurationSlow:S,fontSizeIcon:P,contentPadding:k}=t,C=`${u}px ${c} ${h}`;return{[e]:Object.assign(Object.assign({},(0,oe.Wf)(t)),{backgroundColor:r,border:C,borderBottom:0,borderRadius:`${l}px`,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:C,"&:last-child":{[`\n &,\n & > ${e}-header`]:{borderRadius:`0 0 ${l}px ${l}px`}},[`> ${e}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:f,lineHeight:v,cursor:"pointer",transition:`all ${S}, visibility 0s`,[`> ${e}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${e}-expand-icon`]:{height:g*v,display:"flex",alignItems:"center",paddingInlineEnd:y},[`${e}-arrow`]:Object.assign(Object.assign({},(0,oe.Ro)()),{fontSize:P,svg:{transition:`transform ${S}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}},[`${e}-header-collapsible-only`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"}},[`${e}-icon-collapsible-only`]:{cursor:"default",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-content`]:{color:d,backgroundColor:n,borderTop:C,[`& > ${e}-content-box`]:{padding:k},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:a,paddingInlineStart:x,[`> ${e}-expand-icon`]:{marginInlineStart:w-x}},[`> ${e}-content > ${e}-content-box`]:{padding:w}}},"&-large":{[`> ${e}-item`]:{fontSize:m,[`> ${e}-header`]:{padding:s,paddingInlineStart:i,[`> ${e}-expand-icon`]:{height:m*v,marginInlineStart:b-i}},[`> ${e}-content > ${e}-content-box`]:{padding:b}}},[`${e}-item:last-child`]:{[`> ${e}-content`]:{borderRadius:`0 0 ${l}px ${l}px`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:p,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:y}}}}})}},ce=t=>{const{componentCls:e}=t;return{[`${e}-rtl`]:{[`> ${e}-item > ${e}-header ${e}-arrow svg`]:{transform:"rotate(180deg)"}}}},he=t=>{const{componentCls:e,headerBg:n,paddingXXS:i,colorBorder:r}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${r}`},[`\n > ${e}-item:last-child,\n > ${e}-item:last-child ${e}-header\n `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{paddingTop:i}}}},de=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}};var fe=(0,se.Z)("Collapse",(t=>{const e=(0,le.TS)(t,{collapseHeaderPaddingSM:`${t.paddingXS}px ${t.paddingSM}px`,collapseHeaderPaddingLG:`${t.padding}px ${t.paddingLG}px`,collapsePanelBorderRadius:t.borderRadiusLG});return[ue(e),he(e),de(e),ce(e),(0,ae.Z)(e)]}),(t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer})));const pe=h.forwardRef(((t,e)=>{const{getPrefixCls:n,direction:i,collapse:r}=h.useContext(ne.E_),{prefixCls:o,className:a,rootClassName:s,style:l,bordered:u=!0,ghost:c,size:d,expandIconPosition:f="start",children:p,expandIcon:g}=t,m=(0,ie.Z)((t=>{var e;return null!==(e=null!=d?d:t)&&void 0!==e?e:"middle"})),v=n("collapse",o),y=n(),[w,b]=fe(v),x=h.useMemo((()=>"left"===f?"start":"right"===f?"end":f),[f]),S=Lt()(`${v}-icon-position-${x}`,{[`${v}-borderless`]:!u,[`${v}-rtl`]:"rtl"===i,[`${v}-ghost`]:!!c,[`${v}-${m}`]:"middle"!==m},null==r?void 0:r.className,a,s,b),P=Object.assign(Object.assign({},(0,te.Z)(y)),{motionAppear:!1,leavedClassName:`${v}-content-hidden`}),k=h.useMemo((()=>p?(0,Rt.Z)(p).map(((t,e)=>{var n,i;if(null===(n=t.props)||void 0===n?void 0:n.disabled){const n=null!==(i=t.key)&&void 0!==i?i:String(e),{disabled:r,collapsible:o}=t.props,a=Object.assign(Object.assign({},(0,$t.Z)(t.props,["disabled"])),{key:n,collapsible:null!=o?o:r?"disabled":void 0});return(0,ee.Tm)(t,a)}return t})):null),[p]);return w(h.createElement(Jt,Object.assign({ref:e,openMotion:P},(0,$t.Z)(t,["rootClassName"]),{expandIcon:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=g?g(t):h.createElement(Mt.Z,{rotate:t.isActive?90:void 0});return(0,ee.Tm)(e,(()=>({className:Lt()(e.props.className,`${v}-arrow`)})))},prefixCls:v,className:S,style:Object.assign(Object.assign({},null==r?void 0:r.style),l)}),k))}));var ge=Object.assign(pe,{Panel:re}),me=n(8070),ve=n(20834),ye=n(5112),we=n(99267),be=n(36785),xe=n(47729),Se=n(14088);const Pe=t=>{const{lineWidth:e,fontSizeIcon:n}=t,i=t.fontSizeSM,r=t.lineHeightSM*i+"px";return(0,le.TS)(t,{tagFontSize:i,tagLineHeight:r,tagIconSize:n-2*e,tagPaddingHorizontal:8,tagBorderlessBg:t.colorFillTertiary})},ke=t=>({defaultBg:t.colorFillQuaternary,defaultColor:t.colorText});var Ce=(0,se.Z)("Tag",(t=>(t=>{const{paddingXXS:e,lineWidth:n,tagPaddingHorizontal:i,componentCls:r}=t,o=i-n,a=e-n;return{[r]:Object.assign(Object.assign({},(0,oe.Wf)(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:o,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},[`${r}-close-icon`]:{marginInlineStart:a,color:t.colorTextDescription,fontSize:t.tagIconSize,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:o}}),[`${r}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}})(Pe(t))),ke),Ae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r{const{prefixCls:e,style:n,className:i,checked:r,onChange:o,onClick:a}=t,s=Ae(t,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:l,tag:u}=h.useContext(ne.E_),c=l("tag",e),[d,f]=Ce(c),p=Lt()(c,`${c}-checkable`,{[`${c}-checkable-checked`]:r},null==u?void 0:u.className,i,f);return d(h.createElement("span",Object.assign({},s,{style:Object.assign(Object.assign({},n),null==u?void 0:u.style),className:p,onClick:t=>{null==o||o(!r),null==a||a(t)}})))},Ee=n(45157);var Le=(0,se.b)(["Tag","preset"],(t=>(t=>(0,Ee.Z)(t,((e,n)=>{let{textColor:i,lightBorderColor:r,lightColor:o,darkColor:a}=n;return{[`${t.componentCls}-${e}`]:{color:i,background:o,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}})))(Pe(t))),ke);const Te=(t,e,n)=>{const i="string"!=typeof(r=n)?r:r.charAt(0).toUpperCase()+r.slice(1);var r;return{[`${t.componentCls}-${e}`]:{color:t[`color${n}`],background:t[`color${i}Bg`],borderColor:t[`color${i}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Ne=(0,se.b)(["Tag","status"],(t=>{const e=Pe(t);return[Te(e,"success","Success"),Te(e,"processing","Info"),Te(e,"error","Error"),Te(e,"warning","Warning")]}),ke),je=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r{const{prefixCls:n,className:i,rootClassName:r,style:o,children:a,icon:s,color:l,onClose:u,closeIcon:c,closable:d,bordered:f=!0}=t,p=je(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:g,direction:m,tag:v}=h.useContext(ne.E_),[y,w]=h.useState(!0);h.useEffect((()=>{"visible"in p&&w(p.visible)}),[p.visible]);const b=(0,be.o2)(l),x=(0,be.yT)(l),S=b||x,P=Object.assign(Object.assign({backgroundColor:l&&!S?l:void 0},null==v?void 0:v.style),o),k=g("tag",n),[C,A]=Ce(k),M=Lt()(k,null==v?void 0:v.className,{[`${k}-${l}`]:S,[`${k}-has-color`]:l&&!S,[`${k}-hidden`]:!y,[`${k}-rtl`]:"rtl"===m,[`${k}-borderless`]:!f},i,r,A),E=t=>{t.stopPropagation(),null==u||u(t),t.defaultPrevented||w(!1)},[,L]=(0,xe.Z)(d,c,(t=>null===t?h.createElement(we.Z,{className:`${k}-close-icon`,onClick:E}):h.createElement("span",{className:`${k}-close-icon`,onClick:E},t)),null,!1),T="function"==typeof p.onClick||a&&"a"===a.type,N=s||null,j=N?h.createElement(h.Fragment,null,N,a&&h.createElement("span",null,a)):a,I=h.createElement("span",Object.assign({},p,{ref:e,className:M,style:P}),j,L,b&&h.createElement(Le,{key:"preset",prefixCls:k}),x&&h.createElement(Ne,{key:"status",prefixCls:k}));return C(T?h.createElement(Se.Z,{component:"Tag"},I):I)},Be=h.forwardRef(Ie);Be.CheckableTag=Me;var Oe=Be,De=n(99313),Re=n(57809),Fe=n(32418),ze="scoremodal___CwnRQ",Ge="selectWrapper___Jdp94",Ue="search___zSf8A",He="searchIcon___ApAIo",_e="header_style___RfAxp",Ze="tabWrap___YTk4j",We="form_style___c9uGg",Ve=n(46172),Ye=n(23003),Xe="scoremodal___cmAHe",qe="tabWrap___Xnuvu",Ke="RenderHtml_content___pmH_q",Qe="RenderHtml_style___tvtS0",Je="content_list___jvOz0",$e="content_value___DkebT",tn="content_text___oRKdm",en=n(61186),nn=n.n(en),rn=n(5627),on="list___KhJas",an="row___GGtIx",sn="title___o_xqf",ln="size___OVRoL",un="download___ZLcIH",cn="preview___gi0kI",hn="annotation___KVSwj",dn=n(97562),fn="imageDimensions___a7crR",pn="img___Kroat",gn="fullWidth___c492T",mn=function(t,e){return(mn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function vn(t,e){function n(){this.constructor=t}mn(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function yn(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}function wn(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(t){var n=document.createElement("div");n.className=""+e.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",t.typeName),n.innerHTML=t.icon,n.addEventListener("click",(function(){e.markerToolbarButtonClicked(n,t)})),e.buttons.push(n),e.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var i=document.createElement("div");i.className=this.toolbarBlockStyleClass.name,i.style.whiteSpace="nowrap",i.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(i),this.addActionButton(i,'',"render"),this.addActionButton(i,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),Ln=function(){function t(t,e,n,i){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=n,this.styles=i,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new Mn("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new Mn("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Mn("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Mn("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new Mn("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new Mn("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new Mn("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Mn("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Mn("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new An("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new An("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,n,i=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=i.uiStyleSettings;var n=document.createElement("div");n.className=i.toolboxButtonStyleClass.name+" "+(null!==(e=i.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:i.toolboxButtonStyleColorsClass.name),n.innerHTML=t.icon,n.title=t.title,n.addEventListener("click",(function(){i.panelButtonClick(t)})),i.panelButtons.push(n),i.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,n=-1;if(t!==this.activePanel){n=this.panels.indexOf(t),this.panelRow.innerHTML="";var i=t.getUi();i.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(i),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,i){var r,o;t.className=e.toolboxButtonStyleClass.name+" "+(i===n?""+(null!==(r=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==r?r:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:e.toolboxButtonStyleColorsClass.name))}))},t}(),Tn=function(t,e){this.title=t,this.icon=e},Nn=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=i,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return vn(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(n){var i=t.getColorBox(n);e.appendChild(i),t.colorBoxes.push(i)})),e},e.prototype.getColorBox=function(t){var e=this,n=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-n,r=document.createElement("div");r.style.display="inline-block",r.style.boxSizing="content-box",r.style.width=i-2+"px",r.style.height=i-2+"px",r.style.padding="1px",r.style.marginRight="2px",r.style.marginBottom="2px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderRadius=(i+2)/2+"px",r.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentColor(t,r)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=i-2+"px",o.style.height=i-2+"px",o.style.backgroundColor=t,o.style.borderRadius=i/2+"px","transparent"===t&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='\n \n '),r.appendChild(o),r},e.prototype.setCurrentColor=function(t,e){var n=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(Tn),jn=function(){function t(t,e,n){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),In=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),Bn=function(){function t(){this.GRIP_SIZE=10,this.visual=xn.createGroup(),this.visual.appendChild(xn.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(xn.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),On=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),Dn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.left=0,r.top=0,r.width=0,r.height=0,r.defaultSize={x:50,y:20},r.offsetX=0,r.offsetY=0,r.rotationAngle=0,r.CB_DISTANCE=10,r._suppressMarkerCreateEvent=!1,r.container.transform.baseVal.appendItem(xn.createTransform()),r.setupControlBox(),r}return vn(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=xn.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.left=e.x,this.top=e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var i=this.unrotatePoint(e);if(this.manipulationStartX=i.x,this.manipulationStartY=i.y,this.offsetX=i.x-this.left,this.offsetY=i.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var r=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=r.x-this.width/2,this.top=r.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,n=this.manipulationStartWidth,i=this.manipulationStartTop,r=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:i=this.manipulationStartTop+t.y-this.manipulationStartY,r=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:r=this.manipulationStartHeight+t.y-this.manipulationStartY}n>=0?(this.left=e,this.width=n):(this.left=e+n,this.width=-n),r>=0?(this.top=i,this.height=r):(this.top=i+r,this.height=-r),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),n=xn.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var n=xn.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=xn.createGroup();var t=xn.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=xn.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=xn.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new In,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},e.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new Bn;return t.visual.transform.baseVal.appendItem(xn.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,n=e,i=(this.width+this.CB_DISTANCE)/2-t/2,r=(this.height+this.CB_DISTANCE)/2-t/2,o=this.height+this.CB_DISTANCE-t/2,a=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,n),this.positionGrip(this.controlGrips.topCenter.visual,i,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,e,r),this.positionGrip(this.controlGrips.centerRight.visual,a,r),this.positionGrip(this.controlGrips.bottomLeft.visual,e,o),this.positionGrip(this.controlGrips.bottomCenter.visual,i,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,i,n-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,n){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,n),t.transform.baseVal.replaceItem(i,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:On.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:On.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(On.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(On.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n);var i=this.rotatePoint({x:this.left,y:this.top}),r=this.unrotatePoint({x:i.x*e,y:i.y*n});this.left=r.x,this.top=r.y,this.width=this.width*e,this.height=this.height*n,this.adjustControlBox()},e}(jn),Rn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r}return vn(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=xn.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),xn.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&xn.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&xn.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&xn.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&xn.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var n=e;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize()},e.title="Rectangle marker",e}(Dn),Fn=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=i,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return vn(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentWidth(n,i)})),e.appendChild(i);var r=document.createElement("div");r.innerText=n.toString(),r.style.marginRight="5px",i.appendChild(r);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+t.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),i.appendChild(o),t.widthBoxes.push(i)})),e},e.prototype.setCurrentWidth=function(t,e){var n=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(Tn),zn=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=i,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return vn(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.styles.length-5+"%",i.style.borderColor=n===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentStyle(n,i)})),e.appendChild(i);var r=document.createElement("div");r.style.minHeight="20px",r.style.flexGrow="2",r.style.overflow="hidden";var o='\n \n ";r.innerHTML=o,i.appendChild(r),t.styleBoxes.push(i)})),e},e.prototype.setCurrentStyle=function(t,e){var n=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(Tn),Gn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new Nn("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new Fn("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new zn("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return vn(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="FrameMarker",e.title="Frame marker",e.icon='',e}(Rn),Un=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Hn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.x1=0,r.y1=0,r.x2=0,r.y2=0,r.defaultLength=50,r.manipulationStartX=0,r.manipulationStartY=0,r.manipulationStartX1=0,r.manipulationStartY1=0,r.manipulationStartX2=0,r.manipulationStartY2=0,r.setupControlBox(),r}return vn(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(this.x1=e.x,this.y1=e.y,this.x2=e.x,this.y2=e.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=xn.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new Bn;return t.visual.transform.baseVal.appendItem(xn.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,n){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,n),t.transform.baseVal.replaceItem(i,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.x1=this.x1*e,this.y1=this.y1*n,this.x2=this.x2*e,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},e}(jn),_n=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new Nn("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new Fn("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new zn("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return vn(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=xn.createGroup(),this.selectorLine=xn.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=xn.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),xn.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),xn.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),xn.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='',e}(Hn),Zn=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=i,o.setCurrentFont=o.setCurrentFont.bind(o),o}return vn(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(n){var i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.fonts.length-5+"%",i.style.borderColor=n===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentFont(n,i)})),e.appendChild(i);var r=document.createElement("div");r.style.display="flex",r.style.minHeight="20px",r.style.flexGrow="2",r.style.fontFamily=n,r.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",r.appendChild(o),i.appendChild(r),t.fontBoxes.push(i)})),e},e.prototype.setCurrentFont=function(t,e){var n=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(Tn),Wn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.color="transparent",r.padding=5,r.DEFAULT_TEXT="请输入文本",r.text=r.DEFAULT_TEXT,r.isMoved=!1,r.color=i.defaultColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setColor=r.setColor.bind(r),r.setFont=r.setFont.bind(r),r.renderText=r.renderText.bind(r),r.sizeText=r.sizeText.bind(r),r.textEditDivClicked=r.textEditDivClicked.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.setSize=r.setSize.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.colorPanel=new Nn("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.fontFamilyPanel=new Zn("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r}return vn(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(n=!0)})),n},e.prototype.createVisual=function(){this.visual=xn.createGroup(),this.bgRectangle=xn.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=xn.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(xn.createTransform()),this.textElement.transform.baseVal.appendItem(xn.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(e){t.textElement.appendChild(xn.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var n=(1*this.width-this.width*this.padding*2/100)/t.width,i=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(n,i)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),n=0,i=0;return e.width>0&&e.height>0&&(n=(this.width-e.width*t)/2,i=this.height/2-e.height*t/2),{x:n,y:i}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),n=this.getTextPosition(e);n.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(xn.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xn.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),i={x:n.width*t,y:n.height*t};e.x-=i.x/2,e.y-=i.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,n){t.prototype.dblClick.call(this,e,n),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&xn.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&xn.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){var n=e;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='',e}(Dn),Vn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.color="transparent",r.lineWidth=3,r.drawing=!1,r.pixelRatio=1,r.color=i.defaultColor,r.lineWidth=i.defaultStrokeWidth,r.pixelRatio=i.freehandPixelRatio,r.setColor=r.setColor.bind(r),r.addCanvas=r.addCanvas.bind(r),r.finishCreation=r.finishCreation.bind(r),r.setLineWidth=r.setLineWidth.bind(r),r.colorPanel=new Nn("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.lineWidthPanel=new Fn("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.lineWidthPanel.onWidthChanged=r.setLineWidth,r}return vn(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=xn.createGroup(),this.drawingImage=xn.createImage(),this.visual.appendChild(this.drawingImage);var t=xn.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),xn.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),xn.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=e[0],i=e[1],r=e[2],o=e[3],a=!1,s=0;s0&&(a=!0,so&&(o=s),l>r&&(r=l));if(a){this.left=n/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(r-n)/this.pixelRatio,this.height=(o-i)/this.pixelRatio;var u=document.createElement("canvas");u.width=r-n,u.height=o-i,u.getContext("2d").putImageData(this.canvasContext.getImageData(n,i,r-n,o-i),0,0),this.drawingImgUrl=u.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){xn.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),xn.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='',e}(Dn),Yn=function(t){function e(e,n,i){var r=t.call(this,e,i||'')||this;return r.typeBoxes=[],r.currentType=n,r.setCurrentType=r.setCurrentType.bind(r),r}return vn(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var n=function(n){var r="both";switch(n){case 0:r="both";break;case 1:r="start";break;case 2:r="end";break;case 3:r="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=r===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentType(r,o)})),e.appendChild(o),"both"===r||"start"===r){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='\n \n ',a.style.marginLeft="5px",o.appendChild(a)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),o.appendChild(s),"both"===r||"end"===r){var u=document.createElement("div");u.style.display="flex",u.style.alignItems="center",u.style.minHeight="20px",u.innerHTML='\n \n ',u.style.marginRight="5px",o.appendChild(u)}i.typeBoxes.push(o)},i=this,r=0;r<4;r++)n(r);return e},e.prototype.setCurrentType=function(t,e){var n=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(Tn),Xn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.arrowType="end",r.arrowBaseHeight=10,r.arrowBaseWidth=10,r.getArrowPoints=r.getArrowPoints.bind(r),r.setArrowType=r.setArrowType.bind(r),r.arrowTypePanel=new Yn("Arrow type","end"),r.arrowTypePanel.onArrowTypeChanged=r.setArrowType,r}return vn(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var n=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return t-n/2+","+(e+i/2)+" "+t+","+(e-i/2)+" "+(t+n/2)+","+(e+i/2)},e.prototype.createTips=function(){this.arrow1=xn.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(xn.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=xn.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(xn.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",xn.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),xn.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var e=0;Math.abs(this.x1-this.x2)>.1&&(e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var i=this.arrow2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(i,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='',e}(_n),qn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor=i.defaultFillColor,r.strokeWidth=0,r.fillPanel=new Nn("Color",i.defaultColorSet,i.defaultFillColor),r.fillPanel.onColorChanged=r.setFillColor,r}return vn(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="CoverMarker",e.title="Cover marker",e.icon='',e}(Rn),Kn=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=i,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return vn(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(n,i)})),e.appendChild(i);var r=document.createElement("div");r.innerText=100*n+"%",i.appendChild(r),t.opacityBoxes.push(i)})),e},e.prototype.setCurrentOpacity=function(t,e){var n=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(Tn),Qn=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.setOpacity=r.setOpacity.bind(r),r.fillColor=i.defaultHighlightColor,r.strokeWidth=0,r.opacity=i.defaultHighlightOpacity,r.fillPanel=new Nn("Color",i.defaultColorSet,r.fillColor),r.fillPanel.onColorChanged=r.setFillColor,r.opacityPanel=new Kn("Opacity",i.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return vn(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&xn.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='',e}(qn),Jn='',$n='',ti=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.bgColor="transparent",r.tipPosition={x:0,y:0},r.tipBase1Position={x:0,y:0},r.tipBase2Position={x:0,y:0},r.tipMoving=!1,r.color=i.defaultStrokeColor,r.bgColor=i.defaultFillColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setBgColor=r.setBgColor.bind(r),r.getTipPoints=r.getTipPoints.bind(r),r.positionTip=r.positionTip.bind(r),r.setTipPoints=r.setTipPoints.bind(r),r.colorPanel=new Nn("Text color",i.defaultColorSet,r.color,Jn),r.colorPanel.onColorChanged=r.setColor,r.bgColorPanel=new Nn("Fill color",i.defaultColorSet,r.bgColor,$n),r.bgColorPanel.onColorChanged=r.setBgColor,r.fontFamilyPanel=new Zn("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.tipGrip=new Bn,r.tipGrip.visual.transform.baseVal.appendItem(xn.createTransform()),r.controlBox.appendChild(r.tipGrip.visual),r}return vn(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){xn.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=xn.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,n){"new"===this.state&&t.prototype.pointerDown.call(this,e,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var n="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(n),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var n=this.unrotatePoint(e);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(xn.setAttributes(this.bgRectangle,[["fill",t]]),xn.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),n=this.height/5;t&&(this.tipPosition={x:e+n/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?i.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var i=this.tip2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(i,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='',e}(_n),ii=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokePanel.colors=i.defaultColorSet,r.fillColor="transparent",r}return vn(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='',e}(ei),ri=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),oi=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.curveX=0,r.curveY=0,r.manipulationStartCurveX=0,r.manipulationStartCurveY=0,r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.positionGrips=r.positionGrips.bind(r),r.addControlGrips=r.addControlGrips.bind(r),r.adjustVisual=r.adjustVisual.bind(r),r.setupControlBox=r.setupControlBox.bind(r),r.resize=r.resize.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new Nn("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new Fn("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new zn("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return vn(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=xn.createGroup(),this.selectorCurve=xn.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=xn.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),xn.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),xn.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),xn.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=xn.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=xn.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.prototype.positionGrips.call(this);var e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-e/2,this.curveY-e/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,n){this.curveX=this.curveX*e,this.curveY=this.curveY*n,t.prototype.scale.call(this,e,n)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='',e}(Hn),ai=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.textColor="transparent",r.fontSize="1rem",r.isMoved=!1,r.captionText="Caption",r.PADDING=5,r.captionBoxWidth=0,r.captionBoxHeight=0,r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.fillColor=i.defaultFillColor,r.textColor=i.defaultStrokeColor,r.fontFamily=i.defaultFontFamily,r.fontSize=i.defaultCaptionFontSize,r.captionText=i.defaultCaptionText,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r.sizeCaption=r.sizeCaption.bind(r),r.setCaptionText=r.setCaptionText.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.finishTextEditing=r.finishTextEditing.bind(r),r.setFont=r.setFont.bind(r),r.setTextColor=r.setTextColor.bind(r),r.strokePanel=new Nn("Line color",bn(i.defaultColorSet,["transparent"]),r.strokeColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new Nn("Fill color",bn(i.defaultColorSet,["transparent"]),r.fillColor,$n),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new Fn("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new zn("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.fontFamilyPanel=new Zn("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.textColorPanel=new Nn("Text color",i.defaultColorSet,r.textColor,Jn),r.textColorPanel.onColorChanged=r.setTextColor,r}return vn(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.frame&&e!==this.captionBg&&e!==this.captionElement)},e.prototype.createVisual=function(){this.visual=xn.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=xn.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=xn.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=xn.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},e.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();""!==this.captionText.trim()?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),xn.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),xn.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(e){"Enter"===e.key&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},e.prototype.positionTextEditor=function(){"edit"===this.state&&(void 0===this.textEditBox?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},e.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},e.prototype.setFont=function(t){this.captionElement&&xn.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},e.prototype.setTextColor=function(t){this.captionElement&&xn.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},e.prototype.setSize=function(){t.prototype.setSize.call(this),xn.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.dblClick=function(e,n){t.prototype.dblClick.call(this,e,n),this.showTextEditor()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&xn.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&xn.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&xn.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&xn.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var e=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},t.prototype.getState.call(this));return e.typeName=this.typeName,e},e.prototype.restoreState=function(e){var n=e;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.textColor=n.textColor,this.fontFamily=n.fontFamily,this.captionText=n.captionText,this.fontSize=n.fontSize,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize()},e.typeName="CaptionFrameMarker",e.title="Caption frame marker",e.icon='',e}(Dn),si=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),li=function(t){function e(e,n,i){var r=t.call(this,e,!1)||this;return r.dataUrl=n,r.state=i,r}return vn(e,t),e}(si),ui=function(t){function e(e,n,i){void 0===i&&(i=!1);var r=t.call(this,e,i)||this;return r.marker=n,r}return vn(e,t),e}(si),ci=function(){function t(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var n=this[t].indexOf(e);n>-1&&this[t].splice(n,1)},t}(),hi=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Un,this._isOpen=!1,this.undoRedoManager=new ri,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new ci,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new Cn(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[Gn,Vn,Xn,Wn,ii,ei,Qn,ti,ni,qn,_n,oi,ai]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Gn,Vn,Xn,Wn,ei,Qn,ti]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Gn,Vn,Xn,Wn,Qn]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var n=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==n&&e._availableMarkerTypes.push(n)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),Sn.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==kn.styleSheetRoot&&(this.styles.styleSheetRoot=kn.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new si(t))}))},t.prototype.render=function(){return yn(this,void 0,void 0,(function(){var t;return wn(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new Pn).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var n=!1;t||this.eventListeners.beforeclose.forEach((function(t){var i=new si(e,!0);t(i),i.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new si(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,n=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},t.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=void 0!==this.settings.uiOffsetTop?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new En(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),void 0===this.settings.uiOffsetTop&&this.target.offsetTop-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)switch(e){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new ui(t,t._currentMarker,!0);n(i),i.defaultPrevented&&(e=!0)})),!e){var n=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(e){return e(new ui(t,n))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new ui(t,void 0,!0);n(i),i.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var n=function(e){var n=i.markers[e];i.setCurrentMarker(i.markers[e]),i._currentMarker.dispose(),i.markerImage.removeChild(i._currentMarker.container),i.markers.splice(i.markers.indexOf(i._currentMarker),1),i.eventListeners.markerdelete.forEach((function(e){return e(new ui(t,n))}))},i=this,r=this.markers.length-1;r>=0;r--)n(r);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===e.width&&n.height===e.height){var i=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),i1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.markerImage.getBoundingClientRect();return{x:(t-n.left)/this.zoomLevel,y:(e-n.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},t.prototype.addLicenseKey=function(t){Sn.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new si(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new si(t))})))},t.instanceCounter=0,t}(),di=function(t){var e=t.data,n=t.className,i=t.fullWidth,o=t.style,s=void 0===o?{}:o,u=t.onClose,c=t.onOk,d=t.showFullTools,f=t.noAssociationId,p=(0,h.useRef)(null),g=(0,h.useRef)(null),m=(0,h.useRef)(null),v=(0,h.useRef)(null),y=(0,h.useState)(!1),w=l()(y,2),b=w[0],x=w[1],S=(0,h.useState)("正在加载中"),P=l()(S,2),k=P[0],C=P[1];(0,h.useEffect)((function(){return m.current||(m.current=document.createElement("style"),document.head.appendChild(m.current)),null!=e&&e.visible?(document.body.setAttribute("data-custom","y-hidden"),m.current.innerHTML=" html { overflow-y: hidden; }",null!=e&&e.src&&A()):(document.body.removeAttribute("data-custom"),m.current&&(document.head.removeChild(m.current),m.current=null)),function(){document.body.removeAttribute("data-custom"),m.current&&(document.head.removeChild(m.current),m.current=null)}}),[null==e?void 0:e.visible]);var A=function(){var t=a()(r()().mark((function t(){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return x(!0),C("正在加载中"),t.next=4,(0,F.ZJ)(null==e?void 0:e.src);case 4:n=t.sent,p.current.src="",p.current.src=n,p.current.onload=function(){E()},x(!1),C("");case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=a()(r()().mark((function t(n){var i;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return x(!0),C("正在保存中"),t.next=4,(0,it.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:e.title,file:n.dataUrl}});case 4:if(null==(i=t.sent)||!i.id||f){t.next=12;break}return t.next=8,(0,it.ZP)("/api/attachments/".concat(e.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==i?void 0:i.id,settings:JSON.stringify(n.state)}});case 8:0===t.sent.status&&c(),t.next=13;break;case 12:null!=i&&i.id&&c(i);case 13:x(!1),C("");case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),E=function(){g.current=new hi(p.current),g.current.targetRoot=v.current,g.current.addEventListener("render",M),g.current.addEventListener("beforeclose",u),d&&(g.current.availableMarkerTypes=g.current.ALL_MARKER_TYPES,g.current.uiStyleSettings.redoButtonVisible=!0,g.current.uiStyleSettings.notesButtonVisible=!0,g.current.uiStyleSettings.zoomButtonVisible=!0,g.current.uiStyleSettings.zoomOutButtonVisible=!0,g.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=g.current.uiStyleSettings,g.current.show(),null!=e&&e.snapshotData&&g.current.restoreState(e.snapshotData),setTimeout((function(){var t;window.scrollTo(0,0),(t=document.querySelector('a[href="https://markerjs.com/"]'))&&t.parentNode&&(t.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"选择"},{name:'[data-action="delete"]',title:"删除元素"},{name:'[data-action="undo"]',title:"撤销"},{name:'[data-type-name="FrameMarker"]',title:"矩形"},{name:'[data-type-name="FreehandMarker"]',title:"画线"},{name:'[data-type-name="ArrowMarker"]',title:"箭头"},{name:'[data-type-name="TextMarker"]',title:"文本"},{name:'[data-type-name="EllipseMarker"]',title:"椭圆"},{name:'[data-type-name="HighlightMarker"]',title:"方块"},{name:'[data-type-name="CalloutMarker"]',title:"注释"},{name:'[data-action="render"]',title:"保存"},{name:'[data-action="close"]',title:"退出"}].forEach((function(t){var e=document.querySelector(t.name);e&&e.setAttribute("title",t.title)}))}),300)};return(0,at.jsx)(h.Fragment,{children:(null==e?void 0:e.visible)&&(0,at.jsx)(_.Z,{spinning:b,tip:k,style:{position:"absolute",width:"100vw"},children:(0,at.jsx)("div",{ref:v,className:Lt()(fn,n,i?gn:""),style:s,children:(0,at.jsx)("img",{className:pn,ref:p})})})})},fi=n(67390),pi=(0,d.connect)((function(t){return{classroomList:t.classroomList}}))((function(t){var e,n=t.className,i=t.style,o=t.dataSource,s=void 0===o?[]:o,u=t.authority,c=void 0!==u&&u,d=t.callback,f=t.showDimensions,p=void 0===f||f,g=t.classroomList,m=(0,h.useState)({content:"",type:""}),v=l()(m,2),y=v[0],w=v[1],b=(0,h.useState)({}),x=l()(b,2),S=x[0],P=x[1],k=(0,h.useState)(!1),C=l()(k,2),A=C[0],M=C[1],E=(0,h.useState)({title:"",visible:!1,src:"",snapshotData:{}}),L=l()(E,2),T=L[0],N=L[1],j=(0,h.useRef)(),I=function(){var t=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(P(e),"txt"!==e.file_type){t.next=6;break}return t.next=4,(0,it.ZP)(e.url,{method:"get",headers:{"Content-Type":"application/xml"}});case 4:n=t.sent,j.current=n;case 6:w({type:e.file_type,content:fi.Z.API_SERVER+e.url});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),B=function(t){var e;N({visible:!0,src:fi.Z.API_SERVER+t.url,id:t.id,title:t.title,snapshotData:null==t||null===(e=t.subitem)||void 0===e?void 0:e.settings})},O=function(){var t=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:w({type:e.file_type,content:fi.Z.API_SERVER+(null==e||null===(n=e.subitem)||void 0===n?void 0:n.url)});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return null!=s&&s.length?(0,at.jsxs)(h.Fragment,{children:[(0,at.jsx)("div",{className:Lt()(on,n),style:i,children:s.map((function(t,e){var n,i,r;return(0,at.jsxs)("div",{className:an,children:[(0,at.jsxs)("div",{className:sn,onClick:function(){return I(t)},children:[(0,at.jsx)("i",{className:"iconfont icon-fujian1"}),(0,at.jsx)("span",{title:t.title,children:t.title})]}),(0,at.jsx)("div",{className:ln,children:t.filesize}),(0,at.jsxs)("div",{className:un,onClick:function(){var e,n;!(0,xt.Rm)()||null!==(e=g.AssistantObject.normal)&&void 0!==e&&e.can_download?(0,F.Nd)("","".concat(fi.Z.API_SERVER).concat(null===(n=t.url)||void 0===n?void 0:n.replace("disposition=inline",""))):H.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:[(0,at.jsx)("i",{className:"iconfont icon-xiazai4"}),"下载"]}),!["other","download"].includes(null==t?void 0:t.file_type)&&(0,at.jsxs)("div",{className:cn,onClick:function(){return I(t)},children:[(0,at.jsx)("i",{className:"iconfont icon-yulan"}),"预览"]}),["image"].includes(null==t?void 0:t.file_type)&&p&&(c?(0,at.jsxs)("div",{className:hn,onClick:function(){return B(t)},children:[(0,at.jsx)("i",{className:"iconfont icon-pizhu"}),null!==(n=t.subitem)&&void 0!==n&&n.id?"修改批注":"批注"]}):(null===(i=t.subitem)||void 0===i?void 0:i.id)&&(0,at.jsxs)("div",{className:hn,onClick:function(){return O(t)},children:[(0,at.jsx)("i",{className:"iconfont icon-chakanlaoshipizhu1"}),"查看老师批注"]})),["image"].includes(null==t?void 0:t.file_type)&&(null===(r=t.subitem)||void 0===r?void 0:r.id)&&(0,at.jsxs)("div",{className:un,style:{marginLeft:20},onClick:function(){var e;(0,F.Nd)("","".concat(fi.Z.API_SERVER).concat(null==t||null===(e=t.subitem)||void 0===e||null===(e=e.url)||void 0===e?void 0:e.replace("disposition=inline","")))},children:[(0,at.jsx)("i",{className:"iconfont icon-xiazai4"}),"下载批注文件"]}),["office"].includes(null==t?void 0:t.file_type)&&(0,xt.eB)()&&["xlsx","docx","pptx"].includes(null==t?void 0:t.file_sub)&&p&&(0,at.jsxs)("div",{className:hn,onClick:function(){M(!0),I(t)},children:[(0,at.jsx)("i",{className:"iconfont icon-pizhu"}),t.is_edit?"修改批注":"批注"]}),t.is_edit&&(0,xt.dE)()&&p&&(0,at.jsxs)("div",{className:hn,onClick:function(){I(t)},children:[(0,at.jsx)("i",{className:"iconfont icon-sousuo7"}),"查看老师批注"]})]},e)}))}),(0,at.jsx)(dn.Z,{close:!0,data:null==y?void 0:y.content,type:null==y?void 0:y.type,hasMask:!0,disabledDownload:(0,xt.Rm)()&&!(null!==(e=g.AssistantObject.normal)&&void 0!==e&&e.can_download),editOffice:A?"edit":"view",monacoEditor:{value:j.current,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onImgDimensions:c&&p&&"image"===y.type?function(){return B(S)}:null,onClose:function(){d(),M(!1),w({content:"",type:""})}}),(0,at.jsx)(di,{onOk:function(){d(),N({visible:!1})},onClose:function(){return N({visible:!1})},data:T,showFullTools:!0})]}):null}));nn().locale("ZH-cn");var gi=["","简单","中等","困难"],mi=function(t){var e,n,i,o,s=t.setScoreShow,u=t.ScoreShow,c=t.modalDdata,f=t.homeType,p=(t.homeId,(0,h.useState)(G()(G()({},(0,d.useParams)()),{},{per_page:10}))),g=l()(p,2),m=g[0],v=g[1],y=(0,h.useState)("1"),w=l()(y,2),b=w[0],x=w[1];return(0,h.useEffect)((function(){v(G()({},m))}),[]),(0,at.jsx)("div",{children:(0,at.jsxs)(U.Z,{title:"详情",footer:!1,open:u,width:900,centered:!0,className:Xe,onCancel:function(){s(!1)},children:[(0,at.jsx)(De.Z,{className:qe,activeKey:b,onChange:function(t){x(t)},items:[{label:"".concat("HomeworkCommon"==f?"说明":"作业描述"),key:"1"},{label:"".concat("HomeworkCommon"==f?"题目列表":"参考答案"),key:"2"}]}),"HomeworkCommon"==f?(0,at.jsxs)("div",{className:Ke,children:["1"==b&&(0,at.jsxs)("section",{className:" edu-container",style:{background:"#fff",width:"100%"},children:[!(null!=c&&c.description)&&(0,at.jsx)(Ve.Z,{customText:"暂无说明"}),(0,at.jsx)(rn.Z,{value:(null==c?void 0:c.description)||""})]}),"2"==b&&(0,at.jsxs)("div",{children:[(0,at.jsx)("section",{className:" edu-container",style:{background:"#fff",width:"100%"},children:(null==c||null===(e=c.data)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.identifier)&&(0,at.jsx)(Fe.Z,{dataSource:null==c?void 0:c.data,rowKey:function(t){return null==t?void 0:t.identifier},pagination:!1,expandable:{expandedRowRender:function(t){return(0,at.jsxs)("div",{style:{padding:"10px 48px",borderRadius:2},children:[(0,at.jsxs)("p",{children:["题目:",null==t?void 0:t.name]}),(0,at.jsxs)("p",{children:["描述:",null==t?void 0:t.description]}),!(0,xt.dE)()&&(0,at.jsxs)("p",{children:["题目解析:",(0,at.jsx)(rn.Z,{style:{fontSize:"14px"},value:(null==t?void 0:t.analysis)||"暂无解析"})]})]})},defaultExpandedRowKeys:null==c||null===(n=c.data)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.identifier},columns:[{title:"题目",dataIndex:"name",ellipsis:!0,key:"name"},{title:"难度",dataIndex:"difficult",key:"difficult",render:function(t,e,n){return(0,at.jsx)("div",{children:gi[t]})}},{title:"知识点",dataIndex:"tag_discipline",ellipsis:!0,key:"tag_discipline"},{title:"操作",dataIndex:"identifier",key:"identifier",render:function(t,e,n){return(0,at.jsx)("div",{children:(0,at.jsx)("a",{onClick:a()(r()().mark((function t(){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,it.ZP)("/api/problems/".concat(null==e?void 0:e.identifier,"/start.json"),{method:"get"});case 2:(n=t.sent)&&window.open("/myproblems/".concat(null==n?void 0:n.identifier,"?type=1&backUrl=/paths/").concat(null==m?void 0:m.pathId));case 4:case"end":return t.stop()}}),t)}))),children:"体验"})})}}]})}),(0,at.jsx)("aside",{className:"tc mt30 pb30",children:(0,at.jsx)(nt.Z,{defaultCurrent:1,total:null==c?void 0:c.count,hideOnSinglePage:!0,showTotal:function(t){return(0,at.jsxs)("span",{children:["共",t,"条"]})},current:m.page||1,pageSize:m.per_page||10,onChange:function(t,e){m.page=t,m.per_page=e,v(G()({},m))}})})]})]}):(0,at.jsxs)("div",{className:Ke,children:["1"==b&&(null!=c&&c.description||(null==c||null===(i=c.attachments)||void 0===i?void 0:i.length)>0?"group"==(null==c?void 0:c.homework_type)?(0,at.jsxs)("div",{children:[(0,at.jsx)(rn.Z,{value:null==c?void 0:c.description,className:Qe,style:{color:"#5f6367"}}),(0,at.jsxs)("div",{className:Je,children:["分组要求",(0,at.jsxs)("span",{className:$e,children:[null==c?void 0:c.min_num,"-",null==c?void 0:c.max_num]}),"人",(0,at.jsx)("span",{className:tn,children:"(学生提交作品时需要关联同组成员,组内成员作品共享)"})]}),(0,at.jsxs)("div",{className:Je,children:["基于项目实施",(0,at.jsx)("span",{className:$e,children:null!=c&&c.base_on_project?"是":"否"}),(0,at.jsx)("span",{className:tn,children:null!=c&&c.base_on_project?"(学生必须在平台创建项目,项目管理员可以提交作品)":"(学生不需要在本平台创建项目,所有学生可以提交作品)"})]}),(0,at.jsx)(pi,{callback:function(){},dataSource:null==c?void 0:c.attachments})]}):(0,at.jsxs)("div",{children:[(0,at.jsx)(rn.Z,{value:null==c?void 0:c.description,style:{color:"#5f6367",fontSize:14}}),(0,at.jsx)(pi,{callback:function(){},dataSource:null==c?void 0:c.attachments})]}):(0,at.jsx)(Ve.Z,{styles:{margin:"80px auto"}})),"2"==b&&(null!=c&&c.reference_answer||(null==c||null===(o=c.ref_attachments)||void 0===o?void 0:o.length)>0?(0,at.jsxs)("div",{children:[(0,at.jsx)(rn.Z,{value:null==c?void 0:c.reference_answer,style:{color:"#5f6367",fontSize:14}}),(0,at.jsx)(pi,{callback:function(){},dataSource:null==c?void 0:c.ref_attachments})]}):(0,at.jsx)(Ve.Z,{styles:{margin:"80px auto"}}))]})]})})},vi=n(31468),yi=n.n(vi),wi=n(82100),bi=n.n(wi),xi=n(29186),Si=n.n(xi),Pi=function(){function t(){bi()(this,t)}return Si()(t,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Object.assign=Object.assign||function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n ").concat(n);t.ENABLE_CALLBACK&&t.emitter.emit("log","error",i),t.ENABLE_ERROR&&(console.error?console.error(i):console.warn?console.warn(i):console.log(i))}},{key:"i",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var i="[".concat(e,"] > ").concat(n);t.ENABLE_CALLBACK&&t.emitter.emit("log","info",i),t.ENABLE_INFO&&(console.info?console.info(i):console.log(i))}},{key:"w",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var i="[".concat(e,"] > ").concat(n);t.ENABLE_CALLBACK&&t.emitter.emit("log","warn",i),t.ENABLE_WARN&&(console.warn?console.warn(i):console.log(i))}},{key:"d",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var i="[".concat(e,"] > ").concat(n);t.ENABLE_CALLBACK&&t.emitter.emit("log","debug",i),t.ENABLE_DEBUG&&(console.debug?console.debug(i):console.log(i))}},{key:"v",value:function(e,n){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var i="[".concat(e,"] > ").concat(n);t.ENABLE_CALLBACK&&t.emitter.emit("log","verbose",i),t.ENABLE_VERBOSE&&console.log(i)}}]),t}();Mi.GLOBAL_TAG="flv.js",Mi.FORCE_GLOBAL_TAG=!1,Mi.ENABLE_ERROR=!0,Mi.ENABLE_INFO=!0,Mi.ENABLE_WARN=!0,Mi.ENABLE_DEBUG=!0,Mi.ENABLE_VERBOSE=!0,Mi.ENABLE_CALLBACK=!1,Mi.emitter=new(Ai());var Ei=Mi,Li=function(){function t(){bi()(this,t),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Si()(t,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(t){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=t,this._totalBytes+=t):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=t,this._totalBytes+=t):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=t,this._totalBytes+=t,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var t=(this._now()-this._lastCheckpoint)/1e3;return 0==t&&(t=1),this._intervalBytes/t/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var t=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/t/1024}}]),t}(),Ti=n(80619),Ni=n.n(Ti),ji=n(47074),Ii=n.n(ji),Bi=function(){function t(e){bi()(this,t),this._message=e}return Si()(t,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),t}(),Oi=function(t){Ni()(n,t);var e=Ii()(n);function n(t){return bi()(this,n),e.call(this,t)}return Si()(n,[{key:"name",get:function(){return"IllegalStateException"}}]),n}(Bi),Di=function(t){Ni()(n,t);var e=Ii()(n);function n(t){return bi()(this,n),e.call(this,t)}return Si()(n,[{key:"name",get:function(){return"InvalidArgumentException"}}]),n}(Bi),Ri=function(t){Ni()(n,t);var e=Ii()(n);function n(t){return bi()(this,n),e.call(this,t)}return Si()(n,[{key:"name",get:function(){return"NotImplementedException"}}]),n}(Bi),Fi={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},zi={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},Gi=function(){function t(e){bi()(this,t),this._type=e||"undefined",this._status=Fi.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Si()(t,[{key:"destroy",value:function(){this._status=Fi.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===Fi.kConnecting||this._status===Fi.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(t){this._onContentLengthKnown=t}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(t){this._onURLRedirect=t}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(t){this._onDataArrival=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onComplete",get:function(){return this._onComplete},set:function(t){this._onComplete=t}},{key:"open",value:function(t,e){throw new Ri("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new Ri("Unimplemented abstract function!")}}]),t}(),Ui=n(4811),Hi=n.n(Ui),_i=n(34577),Zi=n.n(_i),Wi={};!function(){var t=self.navigator.userAgent.toLowerCase(),e=/(edge)\/([\w.]+)/.exec(t)||/(opr)[\/]([\w.]+)/.exec(t)||/(chrome)[ \/]([\w.]+)/.exec(t)||/(iemobile)[\/]([\w.]+)/.exec(t)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(t)||[],n=/(ipad)/.exec(t)||/(ipod)/.exec(t)||/(windows phone)/.exec(t)||/(iphone)/.exec(t)||/(kindle)/.exec(t)||/(android)/.exec(t)||/(windows)/.exec(t)||/(mac)/.exec(t)||/(linux)/.exec(t)||/(cros)/.exec(t)||[],i={browser:e[5]||e[3]||e[1]||"",version:e[2]||e[4]||"0",majorVersion:e[4]||e[2]||"0",platform:n[0]||""},r={};if(i.browser){r[i.browser]=!0;var o=i.majorVersion.split(".");r.version={major:parseInt(i.majorVersion,10),string:i.version},o.length>1&&(r.version.minor=parseInt(o[1],10)),o.length>2&&(r.version.build=parseInt(o[2],10))}if(i.platform&&(r[i.platform]=!0),(r.chrome||r.opr||r.safari)&&(r.webkit=!0),r.rv||r.iemobile){r.rv&&delete r.rv;var a="msie";i.browser=a,r[a]=!0}if(r.edge){delete r.edge;var s="msedge";i.browser=s,r[s]=!0}if(r.opr){var l="opera";i.browser=l,r[l]=!0}if(r.safari&&r.android){var u="android";i.browser=u,r[u]=!0}for(var c in r.name=i.browser,r.platform=i.platform,Wi)Wi.hasOwnProperty(c)&&delete Wi[c];Object.assign(Wi,r)}();var Vi=Wi,Yi=function(t){Ni()(n,t);var e=Ii()(n);function n(t,i){var r;return bi()(this,n),(r=e.call(this,"fetch-stream-loader")).TAG="FetchStreamLoader",r._seekHandler=t,r._config=i,r._needStash=!0,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r}return Si()(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),Hi()(Zi()(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(t,e){var n=this;this._dataSource=t,this._range=e;var i=t.url;this._config.reuseRedirectedURL&&null!=t.redirectedURL&&(i=t.redirectedURL);var r=this._seekHandler.getConfig(i,e),o=new self.Headers;if("object"===yi()(r.headers)){var a=r.headers;for(var s in a)a.hasOwnProperty(s)&&o.append(s,a[s])}var l={method:"GET",headers:o,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===yi()(this._config.headers))for(var u in this._config.headers)o.append(u,this._config.headers[u]);!1===t.cors&&(l.mode="same-origin"),t.withCredentials&&(l.credentials="include"),t.referrerPolicy&&(l.referrerPolicy=t.referrerPolicy),this._status=Fi.kConnecting,self.fetch(r.url,l).then((function(t){if(n._requestAbort)return n._requestAbort=!1,void(n._status=Fi.kIdle);if(t.ok&&t.status>=200&&t.status<=299){if(t.url!==r.url&&n._onURLRedirect){var e=n._seekHandler.removeURLParameters(t.url);n._onURLRedirect(e)}var i=t.headers.get("Content-Length");return null!=i&&(n._contentLength=parseInt(i),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,t.body.getReader())}if(n._status=Fi.kError,!n._onError)throw new Bi("FetchStreamLoader: Http code invalid, "+t.status+" "+t.statusText);n._onError(zi.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})})).catch((function(t){if(n._status=Fi.kError,!n._onError)throw t;n._onError(zi.EXCEPTION,{code:-1,msg:t.message})}))}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(t){var e=this;return t.read().then((function(n){if(n.done)if(null!==e._contentLength&&e._receivedLength=15048,e=!Vi.msedge||t;return self.fetch&&self.ReadableStream&&e}catch(t){return!1}}}]),n}(Gi),Xi=Yi,qi=function(t){Ni()(n,t);var e=Ii()(n);function n(t,i){var r;return bi()(this,n),(r=e.call(this,"xhr-moz-chunked-loader")).TAG="MozChunkedLoader",r._seekHandler=t,r._config=i,r._needStash=!0,r._xhr=null,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r}return Si()(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),Hi()(Zi()(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(t,e){this._dataSource=t,this._range=e;var n=t.url;this._config.reuseRedirectedURL&&null!=t.redirectedURL&&(n=t.redirectedURL);var i=this._seekHandler.getConfig(n,e);this._requestURL=i.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",i.url,!0),r.responseType="moz-chunked-arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onloadend=this._onLoadEnd.bind(this),r.onerror=this._onXhrError.bind(this),t.withCredentials&&(r.withCredentials=!0),"object"===yi()(i.headers)){var o=i.headers;for(var a in o)o.hasOwnProperty(a)&&r.setRequestHeader(a,o[a])}if("object"===yi()(this._config.headers)){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&r.setRequestHeader(l,s[l])}this._status=Fi.kConnecting,r.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=Fi.kComplete}},{key:"_onReadyStateChange",value:function(t){var e=t.target;if(2===e.readyState){if(null!=e.responseURL&&e.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(e.responseURL);this._onURLRedirect(n)}if(0!==e.status&&(e.status<200||e.status>299)){if(this._status=Fi.kError,!this._onError)throw new Bi("MozChunkedLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(zi.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}else this._status=Fi.kBuffering}}},{key:"_onProgress",value:function(t){if(this._status!==Fi.kError){null===this._contentLength&&null!==t.total&&0!==t.total&&(this._contentLength=t.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var e=t.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(t){!0!==this._requestAbort?this._status!==Fi.kError&&(this._status=Fi.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(t){this._status=Fi.kError;var e=0,n=null;if(this._contentLength&&t.loaded=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:e,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(t,e){this._lastTimeLoaded=0;var n=t.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=t.redirectedURL&&(n=t.redirectedURL));var i=this._seekHandler.getConfig(n,e);this._currentRequestURL=i.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",i.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),t.withCredentials&&(r.withCredentials=!0),"object"===yi()(i.headers)){var o=i.headers;for(var a in o)o.hasOwnProperty(a)&&r.setRequestHeader(a,o[a])}if("object"===yi()(this._config.headers)){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&r.setRequestHeader(l,s[l])}r.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=Fi.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(t){var e=t.target;if(2===e.readyState){if(null!=e.responseURL){var n=this._seekHandler.removeURLParameters(e.responseURL);e.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(e.status>=200&&e.status<=299){if(this._waitForTotalLength)return;this._status=Fi.kBuffering}else{if(this._status=Fi.kError,!this._onError)throw new Bi("RangeLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(zi.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})}}}},{key:"_onProgress",value:function(t){if(this._status!==Fi.kError){if(null===this._contentLength){var e=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,e=!0;var n=t.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,e)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var i=t.loaded-this._lastTimeLoaded;this._lastTimeLoaded=t.loaded,this._speedSampler.addBytes(i)}}},{key:"_normalizeSpeed",value:function(t){var e=this._chunkSizeKBList,n=e.length-1,i=0,r=0,o=n;if(t=e[i]&&t=3&&(e=this._speedSampler.currentKBps)),0!==e){var n=this._normalizeSpeed(e);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var i=t.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=i.byteLength;var o=!1;null!=this._contentLength&&this._receivedLength0&&this._receivedLength0)for(var o=n.split("&"),a=0;a0;s[0]!==this._startName&&s[0]!==this._endName&&(l&&(r+="&"),r+=o[a])}return 0===r.length?e:e+"?"+r}}]),t}(),ir=nr,rr=function(){function t(e,n,i){bi()(this,t),this.TAG="IOController",this._config=n,this._extraData=i,this._stashInitialSize=393216,null!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new Li,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Si()(t,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(t){this._extraData=t}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(t){this._onDataArrival=t}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(t){this._onSeeked=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onComplete",get:function(){return this._onComplete},set:function(t){this._onComplete=t}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(t){this._onRedirect=t}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(t){this._onRecoveredEarlyEof=t}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===Ji?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var t=this._config;if("range"===t.seekType)this._seekHandler=new er(this._config.rangeLoadZeroStart);else if("param"===t.seekType){var e=t.seekParamStart||"bstart",n=t.seekParamEnd||"bend";this._seekHandler=new ir(e,n)}else{if("custom"!==t.seekType)throw new Di("Invalid seekType in config: ".concat(t.seekType));if("function"!=typeof t.customSeekHandler)throw new Di("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new t.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=tr;else if(Xi.isSupported())this._loaderClass=Xi;else if(Ki.isSupported())this._loaderClass=Ki;else{if(!Ji.isSupported())throw new Bi("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=Ji}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(t){this._currentRange={from:0,to:-1},t&&(this._currentRange.from=t),this._speedSampler.reset(),t||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var t=this._resumeFrom;this._resumeFrom=0,this._internalSeek(t,!0)}}},{key:"seek",value:function(t){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(t,!0)}},{key:"_internalSeek",value:function(t,e){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(e),this._loader.destroy(),this._loader=null;var n={from:t,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(t){if(!t||"string"!=typeof t||0===t.length)throw new Di("Url must be a non-empty string!");this._dataSource.url=t}},{key:"_expandBuffer",value:function(t){for(var e=this._stashSize;e+10485760){var i=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,e).set(i,0)}this._stashBuffer=n,this._bufferSize=e}}},{key:"_normalizeSpeed",value:function(t){var e=this._speedNormalizeList,n=e.length-1,i=0,r=0,o=n;if(t=e[i]&&t=512&&t<=1024?Math.floor(1.5*t):2*t)>8192&&(e=8192);var n=1024*e+1048576;this._bufferSize0){var a=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(a,this._stashByteStart);if(s0){var l=new Uint8Array(a,s);o.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+t.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+t.byteLength),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(t),this._stashUsed),this._stashUsed+=t.byteLength}else{var u=this._dispatchChunks(t,e);if(uthis._bufferSize&&(this._expandBuffer(c),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(t,u),0),this._stashUsed+=c,this._stashByteStart=e+u}}}else if(0===this._stashUsed){var h=this._dispatchChunks(t,e);if(hthis._bufferSize&&this._expandBuffer(d),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(t,h),0),this._stashUsed+=d,this._stashByteStart=e+h}}else{this._stashUsed+t.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+t.byteLength);var f=new Uint8Array(this._stashBuffer,0,this._bufferSize);f.set(new Uint8Array(t),this._stashUsed),this._stashUsed+=t.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p0){var g=new Uint8Array(this._stashBuffer,p);f.set(g,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(t){if(this._stashUsed>0){var e=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(e,this._stashByteStart),i=e.byteLength-n;if(n0){var r=new Uint8Array(this._stashBuffer,0,this._bufferSize),o=new Uint8Array(e,n);r.set(o,0),this._stashUsed=o.byteLength,this._stashByteStart+=n}return 0}Ei.w(this.TAG,"".concat(i," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,i}return 0}},{key:"_onLoaderComplete",value:function(t,e){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(t,e){if(Ei.e(this.TAG,"Loader error, code = ".concat(e.code,", msg = ").concat(e.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,t=zi.UNRECOVERABLE_EARLY_EOF),t===zi.EARLY_EOF){if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n0){var n=t.getConfig();e.emit("change",n)}}},{key:"registerListener",value:function(e){t.emitter.addListener("change",e)}},{key:"removeListener",value:function(e){t.emitter.removeListener("change",e)}},{key:"addLogListener",value:function(e){Ei.emitter.addListener("log",e),Ei.emitter.listenerCount("log")>0&&(Ei.ENABLE_CALLBACK=!0,t._notifyChange())}},{key:"removeLogListener",value:function(e){Ei.emitter.removeListener("log",e),0===Ei.emitter.listenerCount("log")&&(Ei.ENABLE_CALLBACK=!1,t._notifyChange())}}]),t}();hr.emitter=new(Ai());var dr=hr,fr=function(){function t(){bi()(this,t),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Si()(t,[{key:"isComplete",value:function(){var t=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,e=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&t&&e}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(t){if(null==this.keyframesIndex)return null;var e=this.keyframesIndex,n=this._search(e.times,t);return{index:n,milliseconds:e.times[n],fileposition:e.filepositions[n]}}},{key:"_search",value:function(t,e){var n=0,i=t.length-1,r=0,o=0,a=i;for(e=t[r]&&e=128){e.push(String.fromCharCode(65535&o)),i+=2;continue}}}else if(n[i]<240){if(gr(n,i,2)){var a=(15&n[i])<<12|(63&n[i+1])<<6|63&n[i+2];if(a>=2048&&55296!=(63488&a)){e.push(String.fromCharCode(65535&a)),i+=3;continue}}}else if(n[i]<248&&gr(n,i,3)){var s=(7&n[i])<<18|(63&n[i+1])<<12|(63&n[i+2])<<6|63&n[i+3];if(s>65536&&s<1114112){s-=65536,e.push(String.fromCharCode(s>>>10|55296)),e.push(String.fromCharCode(1023&s|56320)),i+=4;continue}}e.push(String.fromCharCode(65533)),++i}return e.join("")},yr=(mr=new ArrayBuffer(2),new DataView(mr).setInt16(0,256,!0),256===new Int16Array(mr)[0]),wr=function(){function t(){bi()(this,t)}return Si()(t,null,[{key:"parseScriptData",value:function(e,n,i){var r={};try{var o=t.parseValue(e,n,i),a=t.parseValue(e,n+o.size,i-o.size);r[o.data]=a.data}catch(t){Ei.e("AMF",t.toString())}return r}},{key:"parseObject",value:function(e,n,i){if(i<3)throw new Oi("Data not enough when parse ScriptDataObject");var r=t.parseString(e,n,i),o=t.parseValue(e,n+r.size,i-r.size),a=o.objectEnd;return{data:{name:r.data,value:o.data},size:r.size+o.size,objectEnd:a}}},{key:"parseVariable",value:function(e,n,i){return t.parseObject(e,n,i)}},{key:"parseString",value:function(t,e,n){if(n<2)throw new Oi("Data not enough when parse String");var i=new DataView(t,e,n).getUint16(0,!yr);return{data:i>0?vr(new Uint8Array(t,e+2,i)):"",size:2+i}}},{key:"parseLongString",value:function(t,e,n){if(n<4)throw new Oi("Data not enough when parse LongString");var i=new DataView(t,e,n).getUint32(0,!yr);return{data:i>0?vr(new Uint8Array(t,e+4,i)):"",size:4+i}}},{key:"parseDate",value:function(t,e,n){if(n<10)throw new Oi("Data size invalid when parse Date");var i=new DataView(t,e,n),r=i.getFloat64(0,!yr),o=i.getInt16(8,!yr);return{data:new Date(r+=60*o*1e3),size:10}}},{key:"parseValue",value:function(e,n,i){if(i<1)throw new Oi("Data not enough when parse Value");var r,o=new DataView(e,n,i),a=1,s=o.getUint8(0),l=!1;try{switch(s){case 0:r=o.getFloat64(1,!yr),a+=8;break;case 1:r=!!o.getUint8(1),a+=1;break;case 2:var u=t.parseString(e,n+1,i-1);r=u.data,a+=u.size;break;case 3:r={};var c=0;for(9==(16777215&o.getUint32(i-4,!yr))&&(c=3);a32)throw new Di("ExpGolomb: readBits() bits exceeded max 32bits!");if(t<=this._current_word_bits_left){var e=this._current_word>>>32-t;return this._current_word<<=t,this._current_word_bits_left-=t,e}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var i=t-this._current_word_bits_left;this._fillCurrentWord();var r=Math.min(i,this._current_word_bits_left),o=this._current_word>>>32-r;return this._current_word<<=r,this._current_word_bits_left-=r,n=n<>>t))return this._current_word<<=t,this._current_word_bits_left-=t,t;return this._fillCurrentWord(),t+this._skipLeadingZero()}},{key:"readUEG",value:function(){var t=this._skipLeadingZero();return this.readBits(t+1)-1}},{key:"readSEG",value:function(){var t=this.readUEG();return 1&t?t+1>>>1:-1*(t>>>1)}}]),t}(),Sr=function(){function t(){bi()(this,t)}return Si()(t,null,[{key:"_ebsp2rbsp",value:function(t){for(var e=t,n=e.byteLength,i=new Uint8Array(n),r=0,o=0;o=2&&3===e[o]&&0===e[o-1]&&0===e[o-2]||(i[r]=e[o],r++);return new Uint8Array(i.buffer,0,r)}},{key:"parseSPS",value:function(e){var n=t._ebsp2rbsp(e),i=new xr(n);i.readByte();var r=i.readByte();i.readByte();var o=i.readByte();i.readUEG();var a=t.getProfileString(r),s=t.getLevelString(o),l=1,u=420,c=8;if((100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r)&&(3===(l=i.readUEG())&&i.readBits(1),l<=3&&(u=[0,420,422,444][l]),c=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool()))for(var h=3!==l?8:12,d=0;d0&&T<16?(k=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][T-1],C=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][T-1]):255===T&&(k=i.readByte()<<8|i.readByte(),C=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){var N=i.readBits(32),j=i.readBits(32);M=i.readBool(),A=(E=j)/(L=2*N)}}var I=1;1===k&&1===C||(I=k/C);var B=0,O=0;0===l?(B=1,O=2-w):(B=3===l?1:2,O=(1===l?2:1)*(2-w));var D=16*(v+1),R=16*(y+1)*(2-w);D-=(b+x)*B,R-=(S+P)*O;var F=Math.ceil(D*I);return i.destroy(),i=null,{profile_string:a,level_string:s,bit_depth:c,ref_frames:m,chroma_format:u,chroma_format_string:t.getChromaFormatString(u),frame_rate:{fixed:M,fps:A,fps_den:L,fps_num:E},sar_ratio:{width:k,height:C},codec_size:{width:D,height:R},present_size:{width:F,height:R}}}},{key:"_skipScalingList",value:function(t,e){for(var n=8,i=8,r=0;r13))return 0;i=t.probe(e).dataOffset}this._firstParse&&(this._firstParse=!1,n+i!==this._dataOffset&&Ei.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(e,i).getUint32(0,!r)&&Ei.w(this.TAG,"PrevTagSize0 !== 0 !!!"),i+=4);for(;ie.byteLength)break;var a=o.getUint8(0),s=16777215&o.getUint32(0,!r);if(i+11+s+4>e.byteLength)break;if(8===a||9===a||18===a){var l=o.getUint8(4),u=o.getUint8(5),c=o.getUint8(6)|u<<8|l<<16|o.getUint8(7)<<24;0!==(16777215&o.getUint32(7,!r))&&Ei.w(this.TAG,"Meet tag which has StreamID != 0!");var h=i+11;switch(a){case 8:this._parseAudioData(e,h,s,c);break;case 9:this._parseVideoData(e,h,s,c,n+i);break;case 18:this._parseScriptData(e,h,s)}var d=o.getUint32(11+s,!r);d!==11+s&&Ei.w(this.TAG,"Invalid PrevTagSize ".concat(d)),i+=11+s+4}else Ei.w(this.TAG,"Unsupported tag type ".concat(a,", skipped")),i+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),i}},{key:"_parseScriptData",value:function(t,e,n){var i=br.parseScriptData(t,e,n);if(i.hasOwnProperty("onMetaData")){if(null==i.onMetaData||"object"!==yi()(i.onMetaData))return void Ei.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&Ei.w(this.TAG,"Found another onMetaData tag!"),this._metadata=i;var r=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},r)),"boolean"==typeof r.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=r.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof r.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=r.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof r.audiodatarate&&(this._mediaInfo.audioDataRate=r.audiodatarate),"number"==typeof r.videodatarate&&(this._mediaInfo.videoDataRate=r.videodatarate),"number"==typeof r.width&&(this._mediaInfo.width=r.width),"number"==typeof r.height&&(this._mediaInfo.height=r.height),"number"==typeof r.duration){if(!this._durationOverrided){var o=Math.floor(r.duration*this._timescale);this._duration=o,this._mediaInfo.duration=o}}else this._mediaInfo.duration=0;if("number"==typeof r.framerate){var a=Math.floor(1e3*r.framerate);if(a>0){var s=a/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=s,this._referenceFrameRate.fps_num=a,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=s}}if("object"===yi()(r.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var l=r.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(l),r.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=r,Ei.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(i).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},i))}},{key:"_parseKeyframesIndex",value:function(t){for(var e=[],n=[],i=1;i>>4;if(2===o||10===o){var a=0,s=(12&r)>>>2;if(s>=0&&s<=4){a=this._flvSoundRateTable[s];var l=1&r,u=this._audioMetadata,c=this._audioTrack;if(u||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(u=this._audioMetadata={}).type="audio",u.id=c.id,u.timescale=this._timescale,u.duration=this._duration,u.audioSampleRate=a,u.channelCount=0===l?1:2),10===o){var h=this._parseAACAudioData(t,e+1,n-1);if(null==h)return;if(0===h.packetType){u.config&&Ei.w(this.TAG,"Found another AudioSpecificConfig!");var d=h.data;u.audioSampleRate=d.samplingRate,u.channelCount=d.channelCount,u.codec=d.codec,u.originalCodec=d.originalCodec,u.config=d.config,u.refSampleDuration=1024/u.audioSampleRate*u.timescale,Ei.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",u);var f=this._mediaInfo;f.audioCodec=u.originalCodec,f.audioSampleRate=u.audioSampleRate,f.audioChannelCount=u.channelCount,f.hasVideo?null!=f.videoCodec&&(f.mimeType='video/x-flv; codecs="'+f.videoCodec+","+f.audioCodec+'"'):f.mimeType='video/x-flv; codecs="'+f.audioCodec+'"',f.isComplete()&&this._onMediaInfo(f)}else if(1===h.packetType){var p=this._timestampBase+i,g={unit:h.data,length:h.data.byteLength,dts:p,pts:p};c.samples.push(g),c.length+=h.data.length}else Ei.e(this.TAG,"Flv: Unsupported AAC data type ".concat(h.packetType))}else if(2===o){if(!u.codec){var m=this._parseMP3AudioData(t,e+1,n-1,!0);if(null==m)return;u.audioSampleRate=m.samplingRate,u.channelCount=m.channelCount,u.codec=m.codec,u.originalCodec=m.originalCodec,u.refSampleDuration=1152/u.audioSampleRate*u.timescale,Ei.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",u);var v=this._mediaInfo;v.audioCodec=u.codec,v.audioSampleRate=u.audioSampleRate,v.audioChannelCount=u.channelCount,v.audioDataRate=m.bitRate,v.hasVideo?null!=v.videoCodec&&(v.mimeType='video/x-flv; codecs="'+v.videoCodec+","+v.audioCodec+'"'):v.mimeType='video/x-flv; codecs="'+v.audioCodec+'"',v.isComplete()&&this._onMediaInfo(v)}var y=this._parseMP3AudioData(t,e+1,n-1,!1);if(null==y)return;var w=this._timestampBase+i,b={unit:y,length:y.byteLength,dts:w,pts:w};c.samples.push(b),c.length+=y.length}}else this._onError(kr.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+s)}else this._onError(kr.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+o)}}},{key:"_parseAACAudioData",value:function(t,e,n){if(!(n<=1)){var i={},r=new Uint8Array(t,e,n);return i.packetType=r[0],0===r[0]?i.data=this._parseAACAudioSpecificConfig(t,e+1,n-1):i.data=r.subarray(1),i}Ei.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(t,e,n){var i,r,o=new Uint8Array(t,e,n),a=null,s=0,l=null;if(s=i=o[0]>>>3,(r=(7&o[0])<<1|o[1]>>>7)<0||r>=this._mpegSamplingRates.length)this._onError(kr.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var u=this._mpegSamplingRates[r],c=(120&o[1])>>>3;if(!(c<0||c>=8)){5===s&&(l=(7&o[1])<<1|o[2]>>>7,(124&o[2])>>>2);var h=self.navigator.userAgent.toLowerCase();return-1!==h.indexOf("firefox")?r>=6?(s=5,a=new Array(4),l=r-3):(s=2,a=new Array(2),l=r):-1!==h.indexOf("android")?(s=2,a=new Array(2),l=r):(s=5,l=r,a=new Array(4),r>=6?l=r-3:1===c&&(s=2,a=new Array(2),l=r)),a[0]=s<<3,a[0]|=(15&r)>>>1,a[1]=(15&r)<<7,a[1]|=(15&c)<<3,5===s&&(a[1]|=(15&l)>>>1,a[2]=(1&l)<<7,a[2]|=8,a[3]=0),{config:a,samplingRate:u,channelCount:c,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+i}}this._onError(kr.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(t,e,n,i){if(!(n<4)){this._littleEndian;var r=new Uint8Array(t,e,n),o=null;if(i){if(255!==r[0])return;var a=r[1]>>>3&3,s=(6&r[1])>>1,l=(240&r[2])>>>4,u=(12&r[2])>>>2,c=3!==(r[3]>>>6&3)?2:1,h=0,d=0;switch(a){case 0:h=this._mpegAudioV25SampleRateTable[u];break;case 2:h=this._mpegAudioV20SampleRateTable[u];break;case 3:h=this._mpegAudioV10SampleRateTable[u]}switch(s){case 1:34,l>>4,s=15&o;7===s?this._parseAVCVideoPacket(t,e+1,n-1,i,r,a):this._onError(kr.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(s))}}},{key:"_parseAVCVideoPacket",value:function(t,e,n,i,r,o){if(n<4)Ei.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var a=this._littleEndian,s=new DataView(t,e,n),l=s.getUint8(0),u=(16777215&s.getUint32(0,!a))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(t,e+4,n-4);else if(1===l)this._parseAVCVideoData(t,e+4,n-4,i,r,o,u);else if(2!==l)return void this._onError(kr.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(l))}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(t,e,n){if(n<7)Ei.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var i=this._videoMetadata,r=this._videoTrack,o=this._littleEndian,a=new DataView(t,e,n);i?void 0!==i.avcc&&Ei.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(i=this._videoMetadata={}).type="video",i.id=r.id,i.timescale=this._timescale,i.duration=this._duration);var s=a.getUint8(0),l=a.getUint8(1);a.getUint8(2),a.getUint8(3);if(1===s&&0!==l)if(this._naluLengthSize=1+(3&a.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var u=31&a.getUint8(5);if(0!==u){u>1&&Ei.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(u));for(var c=6,h=0;h1&&Ei.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(S)),c++;for(var P=0;P=n){Ei.w(this.TAG,"Malformed Nalu near timestamp ".concat(f,", offset = ").concat(h,", dataSize = ").concat(n));break}var g=l.getUint32(h,!s);if(3===d&&(g>>>=8),g>n-d)return void Ei.w(this.TAG,"Malformed Nalus near timestamp ".concat(f,", NaluSize > DataSize!"));var m=31&l.getUint8(h+d);5===m&&(p=!0);var v=new Uint8Array(t,e+h,d+g),y={type:m,data:v};u.push(y),c+=v.byteLength,h+=d+g}if(u.length){var w=this._videoTrack,b={units:u,length:c,isKeyframe:p,dts:f,cts:a,pts:f+a};p&&(b.fileposition=r),w.samples.push(b),w.length+=c}}}],[{key:"probe",value:function(t){var e=new Uint8Array(t),n={match:!1};if(70!==e[0]||76!==e[1]||86!==e[2]||1!==e[3])return n;var i,r,o=(4&e[4])>>>2!=0,a=0!=(1&e[4]),s=(i=e)[r=5]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3];return s<9?n:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:o,hasVideoTrack:a}}}]),t}(),Ar=Cr,Mr=function(){function t(){bi()(this,t)}return Si()(t,null,[{key:"init",value:function(){for(var e in t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var n=t.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(t){for(var e=8,n=null,i=Array.prototype.slice.call(arguments,1),r=i.length,o=0;o>>24&255,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n.set(t,4);for(var a=8,s=0;s>>24&255,e>>>16&255,e>>>8&255,255&e,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(e){return t.box(t.types.trak,t.tkhd(e),t.mdia(e))}},{key:"tkhd",value:function(e){var n=e.id,i=e.duration,r=e.presentWidth,o=e.presentHeight;return t.box(t.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,o>>>8&255,255&o,0,0]))}},{key:"mdia",value:function(e){return t.box(t.types.mdia,t.mdhd(e),t.hdlr(e),t.minf(e))}},{key:"mdhd",value:function(e){var n=e.timescale,i=e.duration;return t.box(t.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}},{key:"hdlr",value:function(e){var n=null;return n="audio"===e.type?t.constants.HDLR_AUDIO:t.constants.HDLR_VIDEO,t.box(t.types.hdlr,n)}},{key:"minf",value:function(e){var n=null;return n="audio"===e.type?t.box(t.types.smhd,t.constants.SMHD):t.box(t.types.vmhd,t.constants.VMHD),t.box(t.types.minf,n,t.dinf(),t.stbl(e))}},{key:"dinf",value:function(){return t.box(t.types.dinf,t.box(t.types.dref,t.constants.DREF))}},{key:"stbl",value:function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.constants.STTS),t.box(t.types.stsc,t.constants.STSC),t.box(t.types.stsz,t.constants.STSZ),t.box(t.types.stco,t.constants.STCO))}},{key:"stsd",value:function(e){return"audio"===e.type?"mp3"===e.codec?t.box(t.types.stsd,t.constants.STSD_PREFIX,t.mp3(e)):t.box(t.types.stsd,t.constants.STSD_PREFIX,t.mp4a(e)):t.box(t.types.stsd,t.constants.STSD_PREFIX,t.avc1(e))}},{key:"mp3",value:function(e){var n=e.channelCount,i=e.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return t.box(t.types[".mp3"],r)}},{key:"mp4a",value:function(e){var n=e.channelCount,i=e.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return t.box(t.types.mp4a,r,t.esds(e))}},{key:"esds",value:function(e){var n=e.config||[],i=n.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(n).concat([6,1,2]));return t.box(t.types.esds,r)}},{key:"avc1",value:function(e){var n=e.avcc,i=e.codecWidth,r=e.codecHeight,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return t.box(t.types.avc1,o,t.box(t.types.avcC,n))}},{key:"mvex",value:function(e){return t.box(t.types.mvex,t.trex(e))}},{key:"trex",value:function(e){var n=e.id,i=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return t.box(t.types.trex,i)}},{key:"moof",value:function(e,n){return t.box(t.types.moof,t.mfhd(e.sequenceNumber),t.traf(e,n))}},{key:"mfhd",value:function(e){var n=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return t.box(t.types.mfhd,n)}},{key:"traf",value:function(e,n){var i=e.id,r=t.box(t.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),o=t.box(t.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),a=t.sdtp(e),s=t.trun(e,a.byteLength+16+16+8+16+8+8);return t.box(t.types.traf,r,o,s,a)}},{key:"sdtp",value:function(e){for(var n=e.samples||[],i=n.length,r=new Uint8Array(4+i),o=0;o>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s>>24&255,l>>>16&255,l>>>8&255,255&l,u>>>24&255,u>>>16&255,u>>>8&255,255&u,c.isLeading<<2|c.dependsOn,c.isDependedOn<<6|c.hasRedundancy<<4|c.isNonSync,0,0,h>>>24&255,h>>>16&255,h>>>8&255,255&h],12+16*s)}return t.box(t.types.trun,a)}},{key:"mdat",value:function(e){return t.box(t.types.mdat,e)}}]),t}();Mr.init();var Er=Mr,Lr=function(){function t(){bi()(this,t)}return Si()(t,null,[{key:"getSilentFrame",value:function(t,e){if("mp4a.40.2"===t){if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),t}(),Tr=Si()((function t(e,n,i,r,o){bi()(this,t),this.dts=e,this.pts=n,this.duration=i,this.originalDts=r,this.isSyncPoint=o,this.fileposition=null})),Nr=function(){function t(){bi()(this,t),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Si()(t,[{key:"appendSyncPoint",value:function(t){t.isSyncPoint=!0,this.syncPoints.push(t)}}]),t}(),jr=function(){function t(){bi()(this,t),this._list=[]}return Si()(t,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(t){var e=this._list;0!==t.length&&(e.length>0&&t[0].originalDts=e[r].dts&&te[i].lastSample.originalDts&&t=e[i].lastSample.originalDts&&(i===e.length-1||i0&&(r=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,n)}},{key:"getLastSegmentBefore",value:function(t){var e=this._searchNearestSegmentBefore(t);return e>=0?this._list[e]:null}},{key:"getLastSampleBefore",value:function(t){var e=this.getLastSegmentBefore(t);return null!=e?e.lastSample:null}},{key:"getLastSyncPointBefore",value:function(t){for(var e=this._searchNearestSegmentBefore(t),n=this._list[e].syncPoints;0===n.length&&e>0;)e--,n=this._list[e].syncPoints;return n.length>0?n[n.length-1]:null}}]),t}(),Br=function(){function t(e){bi()(this,t),this.TAG="MP4Remuxer",this._config=e,this._isLive=!0===e.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Ir("audio"),this._videoSegmentInfoList=new Ir("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!Vi.chrome||!(Vi.version.major<50||50===Vi.version.major&&Vi.version.build<2661)),this._fillSilentAfterSeek=Vi.msedge||Vi.msie,this._mp3UseMpegAudio=!Vi.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Si()(t,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(t){return t.onDataAvailable=this.remux.bind(this),t.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(t){this._onInitSegment=t}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(t){this._onMediaSegment=t}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(t){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(t,e){if(!this._onMediaSegment)throw new Oi("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(t,e),this._remuxVideo(e),this._remuxAudio(t)}},{key:"_onTrackMetadataReceived",value:function(t,e){var n=null,i="mp4",r=e.codec;if("audio"===t)this._audioMeta=e,"mp3"===e.codec&&this._mp3UseMpegAudio?(i="mpeg",r="",n=new Uint8Array):n=Er.generateInitSegment(e);else{if("video"!==t)return;this._videoMeta=e,n=Er.generateInitSegment(e)}if(!this._onInitSegment)throw new Oi("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(t,{type:t,data:n.buffer,codec:r,container:"".concat(t,"/").concat(i),mediaDuration:e.duration})}},{key:"_calculateDtsBase",value:function(t,e){this._dtsBaseInited||(t.samples&&t.samples.length&&(this._audioDtsBase=t.samples[0].dts),e.samples&&e.samples.length&&(this._videoDtsBase=e.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var t=this._videoStashedLastSample,e=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=t&&(n.samples.push(t),n.length=t.length);var i={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=e&&(i.samples.push(e),i.length=e.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(i,!0)}},{key:"_remuxAudio",value:function(t,e){if(null!=this._audioMeta){var n,i=t,r=i.samples,o=void 0,a=-1,s=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,u=this._dtsBaseInited&&void 0===this._audioNextDts,c=!1;if(r&&0!==r.length&&(1!==r.length||e)){var h=0,d=null,f=0;l?(h=0,f=i.length):(h=8,f=8+i.length);var p=null;if(r.length>1&&(f-=(p=r.pop()).length),null!=this._audioStashedLastSample){var g=this._audioStashedLastSample;this._audioStashedLastSample=null,r.unshift(g),f+=g.length}null!=p&&(this._audioStashedLastSample=p);var m=r[0].dts-this._dtsBase;if(this._audioNextDts)o=m-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())o=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(c=!0);else{var v=this._audioSegmentInfoList.getLastSampleBefore(m);if(null!=v){var y=m-(v.originalDts+v.duration);y<=3&&(y=0),o=m-(v.dts+v.duration+y)}else o=0}if(c){var w=m-o,b=this._videoSegmentInfoList.getLastSegmentBefore(m);if(null!=b&&b.beginDts=1?k[k.length-1].duration:Math.floor(s);var N=!1,j=null;if(T>1.5*s&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!Vi.safari){N=!0;var I=Math.abs(T-s),B=Math.ceil(I/s),O=L+s;Ei.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"dts: ".concat(L+T," ms, expected: ").concat(L+Math.round(s)," ms, ")+"delta: ".concat(Math.round(I)," ms, generate: ").concat(B," frames"));var D=Lr.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==D&&(Ei.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),D=M),j=[];for(var R=0;R0){var z=j[j.length-1];z.duration=F-z.dts}var G={dts:F,pts:F,cts:0,unit:D,size:D.byteLength,duration:0,originalDts:E,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};j.push(G),f+=G.size,O+=s}var U=j[j.length-1];U.duration=L+T-U.dts,T=Math.round(s)}k.push({dts:L,pts:L,cts:0,unit:A.unit,size:A.unit.byteLength,duration:T,originalDts:E,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),N&&k.push.apply(k,j)}l?d=new Uint8Array(f):((d=new Uint8Array(f))[0]=f>>>24&255,d[1]=f>>>16&255,d[2]=f>>>8&255,d[3]=255&f,d.set(Er.types.mdat,4));for(var H=0;H1&&(h-=(d=o.pop()).length),null!=this._videoStashedLastSample){var f=this._videoStashedLastSample;this._videoStashedLastSample=null,o.unshift(f),h+=f.length}null!=d&&(this._videoStashedLastSample=d);var p=o[0].dts-this._dtsBase;if(this._videoNextDts)a=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())a=0;else{var g=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=g){var m=p-(g.originalDts+g.duration);m<=3&&(m=0),a=p-(g.dts+g.duration+m)}else a=0}for(var v=new Nr,y=[],w=0;w=1?y[y.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(S){var M=new Tr(P,C,A,b.dts,!0);M.fileposition=b.fileposition,v.appendSyncPoint(M)}y.push({dts:P,pts:C,cts:k,units:b.units,size:b.length,isKeyframe:S,duration:A,originalDts:x,flags:{isLeading:0,dependsOn:S?2:1,isDependedOn:S?1:0,hasRedundancy:0,isNonSync:S?0:1}})}(c=new Uint8Array(h))[0]=h>>>24&255,c[1]=h>>>16&255,c[2]=h>>>8&255,c[3]=255&h,c.set(Er.types.mdat,4);for(var E=0;E0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(t,e);else if((i=Ar.probe(t)).match){this._demuxer=new Ar(i,this._config),this._remuxer||(this._remuxer=new Or(this._config));var o=this._mediaDataSource;null==o.duration||isNaN(o.duration)||(this._demuxer.overridedDuration=o.duration),"boolean"==typeof o.hasAudio&&(this._demuxer.overridedHasAudio=o.hasAudio),"boolean"==typeof o.hasVideo&&(this._demuxer.overridedHasVideo=o.hasVideo),this._demuxer.timestampBase=o.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(t,e)}else i=null,Ei.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){n._internalAbort()})),this._emitter.emit(Dr.DEMUX_ERROR,kr.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r}},{key:"_onMediaInfo",value:function(t){var e=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},t),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,pr.prototype));var n=Object.assign({},t);Object.setPrototypeOf(n,pr.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var t=e._pendingSeekTime;e._pendingSeekTime=null,e.seek(t)}))}},{key:"_onMetaDataArrived",value:function(t){this._emitter.emit(Dr.METADATA_ARRIVED,t)}},{key:"_onScriptDataArrived",value:function(t){this._emitter.emit(Dr.SCRIPTDATA_ARRIVED,t)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(t){var e=t+1;e0&&n[0].originalDts===i&&(i=n[0].pts),this._emitter.emit(Dr.RECOMMEND_SEEKPOINT,i)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(t){var e=this._mediaInfo.segments[t],n=Object.assign({},e);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(Dr.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var t={};t.url=this._ioctl.currentURL,t.hasRedirect=this._ioctl.hasRedirect,t.hasRedirect&&(t.redirectedURL=this._ioctl.currentRedirectedURL),t.speed=this._ioctl.currentSpeed,t.loaderType=this._ioctl.loaderType,t.currentSegmentIndex=this._currentSegmentIndex,t.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Dr.STATISTICS_INFO,t)}}]),t}(),Fr=Rr,zr=function(t){var e=null,n=function(e,n){t.postMessage({msg:"logcat_callback",data:{type:e,logcat:n}})}.bind(this);function i(e,n){var i={msg:Dr.INIT_SEGMENT,data:{type:e,data:n}};t.postMessage(i,[n.data])}function r(e,n){var i={msg:Dr.MEDIA_SEGMENT,data:{type:e,data:n}};t.postMessage(i,[n.data])}function o(){var e={msg:Dr.LOADING_COMPLETE};t.postMessage(e)}function a(){var e={msg:Dr.RECOVERED_EARLY_EOF};t.postMessage(e)}function s(e){var n={msg:Dr.MEDIA_INFO,data:e};t.postMessage(n)}function l(e){var n={msg:Dr.METADATA_ARRIVED,data:e};t.postMessage(n)}function u(e){var n={msg:Dr.SCRIPTDATA_ARRIVED,data:e};t.postMessage(n)}function c(e){var n={msg:Dr.STATISTICS_INFO,data:e};t.postMessage(n)}function h(e,n){t.postMessage({msg:Dr.IO_ERROR,data:{type:e,info:n}})}function d(e,n){t.postMessage({msg:Dr.DEMUX_ERROR,data:{type:e,info:n}})}function f(e){t.postMessage({msg:Dr.RECOMMEND_SEEKPOINT,data:e})}ki.install(),t.addEventListener("message",(function(p){switch(p.data.cmd){case"init":(e=new Fr(p.data.param[0],p.data.param[1])).on(Dr.IO_ERROR,h.bind(this)),e.on(Dr.DEMUX_ERROR,d.bind(this)),e.on(Dr.INIT_SEGMENT,i.bind(this)),e.on(Dr.MEDIA_SEGMENT,r.bind(this)),e.on(Dr.LOADING_COMPLETE,o.bind(this)),e.on(Dr.RECOVERED_EARLY_EOF,a.bind(this)),e.on(Dr.MEDIA_INFO,s.bind(this)),e.on(Dr.METADATA_ARRIVED,l.bind(this)),e.on(Dr.SCRIPTDATA_ARRIVED,u.bind(this)),e.on(Dr.STATISTICS_INFO,c.bind(this)),e.on(Dr.RECOMMEND_SEEKPOINT,f.bind(this));break;case"destroy":e&&(e.destroy(),e=null),t.postMessage({msg:"destroyed"});break;case"start":e.start();break;case"stop":e.stop();break;case"seek":e.seek(p.data.param);break;case"pause":e.pause();break;case"resume":e.resume();break;case"logging_config":var g=p.data.param;dr.applyConfig(g),!0===g.enableCallback?dr.addLogListener(n):dr.removeLogListener(n)}}))},Gr=function(){function t(e,i){if(bi()(this,t),this.TAG="Transmuxer",this._emitter=new(Ai()),i.enableWorker&&"undefined"!=typeof Worker)try{var r=n(82059);this._worker=r(zr),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[e,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},dr.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:dr.getConfig()})}catch(t){Ei.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new Fr(e,i)}else this._controller=new Fr(e,i);if(this._controller){var o=this._controller;o.on(Dr.IO_ERROR,this._onIOError.bind(this)),o.on(Dr.DEMUX_ERROR,this._onDemuxError.bind(this)),o.on(Dr.INIT_SEGMENT,this._onInitSegment.bind(this)),o.on(Dr.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),o.on(Dr.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),o.on(Dr.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),o.on(Dr.MEDIA_INFO,this._onMediaInfo.bind(this)),o.on(Dr.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),o.on(Dr.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),o.on(Dr.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),o.on(Dr.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Si()(t,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),dr.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(t){this._worker?this._worker.postMessage({cmd:"seek",param:t}):this._controller.seek(t)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(t,e){var n=this;Promise.resolve().then((function(){n._emitter.emit(Dr.INIT_SEGMENT,t,e)}))}},{key:"_onMediaSegment",value:function(t,e){var n=this;Promise.resolve().then((function(){n._emitter.emit(Dr.MEDIA_SEGMENT,t,e)}))}},{key:"_onLoadingComplete",value:function(){var t=this;Promise.resolve().then((function(){t._emitter.emit(Dr.LOADING_COMPLETE)}))}},{key:"_onRecoveredEarlyEof",value:function(){var t=this;Promise.resolve().then((function(){t._emitter.emit(Dr.RECOVERED_EARLY_EOF)}))}},{key:"_onMediaInfo",value:function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(Dr.MEDIA_INFO,t)}))}},{key:"_onMetaDataArrived",value:function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(Dr.METADATA_ARRIVED,t)}))}},{key:"_onScriptDataArrived",value:function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(Dr.SCRIPTDATA_ARRIVED,t)}))}},{key:"_onStatisticsInfo",value:function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(Dr.STATISTICS_INFO,t)}))}},{key:"_onIOError",value:function(t,e){var n=this;Promise.resolve().then((function(){n._emitter.emit(Dr.IO_ERROR,t,e)}))}},{key:"_onDemuxError",value:function(t,e){var n=this;Promise.resolve().then((function(){n._emitter.emit(Dr.DEMUX_ERROR,t,e)}))}},{key:"_onRecommendSeekpoint",value:function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(Dr.RECOMMEND_SEEKPOINT,t)}))}},{key:"_onLoggingConfigChanged",value:function(t){this._worker&&this._worker.postMessage({cmd:"logging_config",param:t})}},{key:"_onWorkerMessage",value:function(t){var e=t.data,n=e.data;if("destroyed"===e.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(e.msg){case Dr.INIT_SEGMENT:case Dr.MEDIA_SEGMENT:this._emitter.emit(e.msg,n.type,n.data);break;case Dr.LOADING_COMPLETE:case Dr.RECOVERED_EARLY_EOF:this._emitter.emit(e.msg);break;case Dr.MEDIA_INFO:Object.setPrototypeOf(n,pr.prototype),this._emitter.emit(e.msg,n);break;case Dr.METADATA_ARRIVED:case Dr.SCRIPTDATA_ARRIVED:case Dr.STATISTICS_INFO:this._emitter.emit(e.msg,n);break;case Dr.IO_ERROR:case Dr.DEMUX_ERROR:this._emitter.emit(e.msg,n.type,n.info);break;case Dr.RECOMMEND_SEEKPOINT:this._emitter.emit(e.msg,n);break;case"logcat_callback":Ei.emitter.emit("log",n.type,n.logcat)}}}]),t}(),Ur=Gr,Hr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},_r=function(){function t(e){bi()(this,t),this.TAG="MSEController",this._config=e,this._emitter=new(Ai()),this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new jr}return Si()(t,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(t,e){this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"attachMediaElement",value:function(t){if(this._mediaSource)throw new Oi("MediaSource has been attached to an HTMLMediaElement!");var e=this._mediaSource=new window.MediaSource;e.addEventListener("sourceopen",this.e.onSourceOpen),e.addEventListener("sourceended",this.e.onSourceEnded),e.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=t,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),t.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var t=this._mediaSource;for(var e in this._sourceBuffers){var n=this._pendingSegments[e];n.splice(0,n.length),this._pendingSegments[e]=null,this._pendingRemoveRanges[e]=null,this._lastInitSegments[e]=null;var i=this._sourceBuffers[e];if(i){if("closed"!==t.readyState){try{t.removeSourceBuffer(i)}catch(t){Ei.e(this.TAG,t.message)}i.removeEventListener("error",this.e.onSourceBufferError),i.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[e]=null,this._sourceBuffers[e]=null}}if("open"===t.readyState)try{t.endOfStream()}catch(t){Ei.e(this.TAG,t.message)}t.removeEventListener("sourceopen",this.e.onSourceOpen),t.removeEventListener("sourceended",this.e.onSourceEnded),t.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(t,e){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(t),void this._pendingSegments[t.type].push(t);var n=t,i="".concat(n.container);n.codec&&n.codec.length>0&&(i+=";codecs=".concat(n.codec));var r=!1;if(Ei.v(this.TAG,"Received Initialization Segment, mimeType: "+i),this._lastInitSegments[n.type]=n,i!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])Ei.v(this.TAG,"Notice: ".concat(n.type," mimeType changed, origin: ").concat(this._mimeTypes[n.type],", target: ").concat(i));else{r=!0;try{var o=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(i);o.addEventListener("error",this.e.onSourceBufferError),o.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(t){return Ei.e(this.TAG,t.message),void this._emitter.emit(Hr.ERROR,{code:t.code,msg:t.message})}}this._mimeTypes[n.type]=i}e||this._pendingSegments[n.type].push(n),r||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),Vi.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(t){var e=t;this._pendingSegments[e.type].push(e),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[e.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(t){for(var e in this._sourceBuffers)if(this._sourceBuffers[e]){var n=this._sourceBuffers[e];if("open"===this._mediaSource.readyState)try{n.abort()}catch(t){Ei.e(this.TAG,t.message)}this._idrList.clear();var i=this._pendingSegments[e];if(i.splice(0,i.length),"closed"!==this._mediaSource.readyState){for(var r=0;r=1&&t-i.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var t=this._mediaElement.currentTime;for(var e in this._sourceBuffers){var n=this._sourceBuffers[e];if(n){for(var i=n.buffered,r=!1,o=0;o=this._config.autoCleanupMaxBackwardDuration){r=!0;var l=t-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[e].push({start:a,end:l})}}else s0&&(isNaN(e)||n>e)&&(Ei.v(this.TAG,"Update MediaSource duration from ".concat(e," to ").concat(n)),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var t in this._pendingRemoveRanges)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating)for(var e=this._sourceBuffers[t],n=this._pendingRemoveRanges[t];n.length&&!e.updating;){var i=n.shift();e.remove(i.start,i.end)}}},{key:"_doAppendSegments",value:function(){var t=this._pendingSegments;for(var e in t)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating&&t[e].length>0){var n=t[e].shift();if(n.timestampOffset){var i=this._sourceBuffers[e].timestampOffset,r=n.timestampOffset/1e3;Math.abs(i-r)>.1&&(Ei.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(i," to ").concat(r)),this._sourceBuffers[e].timestampOffset=r),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[e].appendBuffer(n.data),this._isBufferFull=!1,"video"===e&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(t){this._pendingSegments[e].unshift(n),22===t.code?(this._isBufferFull||this._emitter.emit(Hr.BUFFER_FULL),this._isBufferFull=!0):(Ei.e(this.TAG,t.message),this._emitter.emit(Hr.ERROR,{code:t.code,msg:t.message}))}}}},{key:"_onSourceOpen",value:function(){if(Ei.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var t=this._pendingSourceBufferInit;t.length;){var e=t.shift();this.appendInitSegment(e,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Hr.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){Ei.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){Ei.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var t=this._pendingSegments;return t.video.length>0||t.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var t=this._pendingRemoveRanges;return t.video.length>0||t.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Hr.UPDATE_END)}},{key:"_onSourceBufferError",value:function(t){Ei.e(this.TAG,"SourceBuffer Error: ".concat(t))}}]),t}(),Zr=_r,Wr={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Vr={NETWORK_EXCEPTION:zi.EXCEPTION,NETWORK_STATUS_CODE_INVALID:zi.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:zi.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:zi.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:kr.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:kr.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:kr.CODEC_UNSUPPORTED},Yr=function(){function t(e,n){if(bi()(this,t),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(Ai()),this._config=sr(),"object"===yi()(n)&&Object.assign(this._config,n),"flv"!==e.type.toLowerCase())throw new Di("FlvPlayer requires an flv MediaDataSource input!");!0===e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=Vi.chrome&&(Vi.version.major<50||50===Vi.version.major&&Vi.version.build<2661);this._alwaysSeekKeyframe=!!(i||Vi.msedge||Vi.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Si()(t,[{key:"destroy",value:function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(t,e){var n=this;t===cr.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){n._emitter.emit(cr.MEDIA_INFO,n.mediaInfo)})):t===cr.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){n._emitter.emit(cr.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(t,e)}},{key:"off",value:function(t,e){this._emitter.removeListener(t,e)}},{key:"attachMediaElement",value:function(t){var e=this;if(this._mediaElement=t,t.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),t.addEventListener("seeking",this.e.onvSeeking),t.addEventListener("canplay",this.e.onvCanPlay),t.addEventListener("stalled",this.e.onvStalled),t.addEventListener("progress",this.e.onvProgress),this._msectl=new Zr(this._config),this._msectl.on(Hr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Hr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Hr.SOURCE_OPEN,(function(){e._mseSourceOpened=!0,e._hasPendingLoad&&(e._hasPendingLoad=!1,e.load())})),this._msectl.on(Hr.ERROR,(function(t){e._emitter.emit(cr.ERROR,Wr.MEDIA_ERROR,Vr.MEDIA_MSE_ERROR,t)})),this._msectl.attachMediaElement(t),null!=this._pendingSeekTime)try{t.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var t=this;if(!this._mediaElement)throw new Oi("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new Oi("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Ur(this._mediaDataSource,this._config),this._transmuxer.on(Dr.INIT_SEGMENT,(function(e,n){t._msectl.appendInitSegment(n)})),this._transmuxer.on(Dr.MEDIA_SEGMENT,(function(e,n){if(t._msectl.appendMediaSegment(n),t._config.lazyLoad&&!t._config.isLive){var i=t._mediaElement.currentTime;n.info.endDts>=1e3*(i+t._config.lazyLoadMaxDuration)&&null==t._progressChecker&&(Ei.v(t.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),t._suspendTransmuxer())}})),this._transmuxer.on(Dr.LOADING_COMPLETE,(function(){t._msectl.endOfStream(),t._emitter.emit(cr.LOADING_COMPLETE)})),this._transmuxer.on(Dr.RECOVERED_EARLY_EOF,(function(){t._emitter.emit(cr.RECOVERED_EARLY_EOF)})),this._transmuxer.on(Dr.IO_ERROR,(function(e,n){t._emitter.emit(cr.ERROR,Wr.NETWORK_ERROR,e,n)})),this._transmuxer.on(Dr.DEMUX_ERROR,(function(e,n){t._emitter.emit(cr.ERROR,Wr.MEDIA_ERROR,e,{code:-1,msg:n})})),this._transmuxer.on(Dr.MEDIA_INFO,(function(e){t._mediaInfo=e,t._emitter.emit(cr.MEDIA_INFO,Object.assign({},e))})),this._transmuxer.on(Dr.METADATA_ARRIVED,(function(e){t._emitter.emit(cr.METADATA_ARRIVED,e)})),this._transmuxer.on(Dr.SCRIPTDATA_ARRIVED,(function(e){t._emitter.emit(cr.SCRIPTDATA_ARRIVED,e)})),this._transmuxer.on(Dr.STATISTICS_INFO,(function(e){t._statisticsInfo=t._fillStatisticsInfo(e),t._emitter.emit(cr.STATISTICS_INFO,Object.assign({},t._statisticsInfo))})),this._transmuxer.on(Dr.RECOMMEND_SEEKPOINT,(function(e){t._mediaElement&&!t._config.accurateSeek&&(t._requestSetTime=!0,t._mediaElement.currentTime=e/1e3)})),this._transmuxer.open()))}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(t){this._mediaElement.volume=t}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(t){this._mediaElement.muted=t}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(t){this._mediaElement?this._internalSeek(t):this._pendingSeekTime=t}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(t){if(t.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return t;var e=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):e=!1;return e&&(t.decodedFrames=n,t.droppedFrames=i),t}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var t=this._mediaElement.buffered,e=this._mediaElement.currentTime,n=0,i=0;i=e+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(Ei.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){Ei.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var t=this._mediaElement.currentTime,e=this._mediaElement.buffered,n=!1,i=0;i=r&&t=o-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(Ei.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(t){for(var e=this._mediaElement.buffered,n=0;n=i&&t0){var r=this._mediaElement.buffered.start(0);(r<1&&t0&&e.currentTime0){var i=n.start(0);if(i<1&&e0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(t){this._mediaElement.volume=t}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(t){this._mediaElement.muted=t}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(t){this._mediaElement?this._mediaElement.currentTime=t:this._pendingSeekTime=t}},{key:"mediaInfo",get:function(){var t={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight)),t}},{key:"statisticsInfo",get:function(){var t={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return t;var e=!0,n=0,i=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();n=r.totalVideoFrames,i=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,i=this._mediaElement.webkitDroppedFrameCount):e=!1;return e&&(t.decodedFrames=n,t.droppedFrames=i),t}},{key:"_onvLoadedMetadata",value:function(t){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(cr.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(cr.STATISTICS_INFO,this.statisticsInfo)}}]),t}();ki.install();var Kr={createPlayer:function(t,e){var n=t;if(null==n||"object"!==yi()(n))throw new Di("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new Di("MediaDataSource must has type field to indicate video file type!");return"flv"===n.type?new Xr(n,e):new qr(n,e)},isSupported:function(){return ur.supportMSEH264Playback()},getFeatureList:function(){return ur.getFeatureList()}};Kr.BaseLoader=Gi,Kr.LoaderStatus=Fi,Kr.LoaderErrors=zi,Kr.Events=cr,Kr.ErrorTypes=Wr,Kr.ErrorDetails=Vr,Kr.FlvPlayer=Xr,Kr.NativePlayer=qr,Kr.LoggingControl=dr,Object.defineProperty(Kr,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Qr=Kr,Jr=n(15360),$r=n(56102);function to(){var t=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement;document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",t),window.isFullScreen?window.isFullScreen:null!=t}var eo={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"};function no(t){if(isNaN(t))return{minutes:"00",seconds:"00"};var e=new Date(1e3*t).toISOString().substr(11,8);return{hour:e.substr(0,2),minutes:e.substr(3,2),seconds:e.substr(6,2)}}function io(t,e){return t-e}function ro(t){t.sort(io);for(var e=0,n=0;n0&&!this.paused&&!this.ended&&this.readyState>2)}});var oo=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i,ao=(0,h.forwardRef)((function(t,e){var n,i,o=t.allow_skip,s=t.src,u=t.toLog,c=t.videoId,d=t.logWatchHistory,f=t.courseId,p=void 0===f?null:f,g=t.startTime,m=t.handlePause,v=void 0===m?function(){}:m,y=t.handlePlay,w=void 0===y?function(){}:y,b=t.handlePlayEnded,x=void 0===b?function(){}:b,S=t.autoPlay,P=void 0!==S&&S,k=t.onPlayEnded,C=void 0===k?function(){}:k,A=t.isShowWaterMark,M=void 0===A||A,E="flv"===(null===(i=s=null===(n=s)||void 0===n?void 0:n.replace("http://","https://"))||void 0===i||null===(i=i.split("."))||void 0===i?void 0:i.pop()),L=(0,h.useRef)(),T=(0,h.useRef)(),N=(0,h.useRef)(),j=(0,h.useRef)(),I=(0,h.useRef)(),B=(0,h.useRef)(),O=(0,h.useRef)(),D=(0,h.useRef)(),R=(0,h.useRef)(),F=(0,h.useRef)(),z=(0,h.useRef)(),G=(0,h.useRef)(),U=(0,h.useRef)(),_=(0,h.useRef)(),Z=navigator.userAgent.toLowerCase().match(oo),W=Z?Z[0]:"pc",V=(0,h.useRef)(!1),Y=(0,xt.eY)(),X=0,q=0,K=0,Q=null,J=!1,$=20,tt=1,et=!1,nt=!1,it=[];(0,h.useImperativeHandle)(e,(function(){return{getLastUpdatedTime:function(){return L.current.currentTime},getDuration:function(){return L.current.duration}}})),H.ZP.config({maxCount:1,getContainer:function(){return N.current}});var rt=(0,h.useCallback)((function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={point:L.current.currentTime};function i(){return o.apply(this,arguments)}function o(){return(o=a()(r()().mark((function e(){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return et=!0,e.next=3,null==d?void 0:d(n);case 3:i=e.sent,Q=i,et=!1,t&&t();case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Q?(n.log_id=Q,n.watch_duration=ro(it),n.total_duration=q):(p?(n.video_id=parseInt(c,10),n.course_id=p):n.video_id=c,n.duration=X,n.device=W),e&&(n.ed="1"),i()}),[c,p]);function ot(){L.current.paused?(j.current.style.display="none",I.current.style.display="block"):(j.current.style.display="block",I.current.style.display="none")}function st(){z.current.style.display="none",U.current.style.display="none",G.current.style.display="none",L.current.muted||0===L.current.volume?z.current.style.display="block":L.current.volume>0&&L.current.volume<=.5?U.current.style.display="block":G.current.style.display="block"}(0,h.useEffect)((function(){var t;L.current&&(j.current.style.display="none",I.current.style.display="block"),H.ZP.destroy();var e=null;return Qr.isSupported&&E&&s&&(null===(t=s)||void 0===t?void 0:t.indexOf(".m3u8"))<0?(e=Qr.createPlayer({type:"flv",volume:.8,cors:!0,url:s,muted:!1}),L.current&&(e.attachMediaElement(L.current),e.load())):L.current.setAttribute("src",s),st(),function(){e&&(e.unload(),e.pause(),e.destroy(),e=null)}}),[L,E,s]),(0,h.useEffect)((function(){document.getElementById("play"),document.querySelectorAll(".playback-icons use");function t(){w(),g&&!V.current&&(L.current.currentTime=g),V.current=!0,it.push(L.current.currentTime),J||(J=!0,u&&rt())}function e(){return n.apply(this,arguments)}function n(){return(n=a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ot(),it.push(L.current.currentTime),u&&rt((function(){Q=null,K=0,J=!1,et=!1,nt=!1,it=[],q=0,tt=1}),!0),C();case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function i(){B.current.value=Math.round(L.current.currentTime),O.current.value=Math.round(L.current.currentTime)}function s(){var t,e,n,i,r,o=Math.round(null===(t=L.current)||void 0===t?void 0:t.duration);null===(e=B.current)||void 0===e||null===(n=e.setAttribute)||void 0===n||n.call(e,"max",o),null===(i=O.current)||void 0===i||null===(r=i.setAttribute)||void 0===r||r.call(i,"max",o);var a,s,l=no(o);D.current&&(D.current.innerText="".concat(l.hour>0?l.hour+":":"").concat(l.minutes,":").concat(l.seconds),null===(a=(s=D.current).setAttribute)||void 0===a||a.call(s,"datetime","".concat(l.hour>0?" "+l.hour+" ":"").concat(l.minutes,"m ").concat(l.seconds,"s")))}function l(){try{var t=Math.round(L.current.duration);B.current.setAttribute("max",t),O.current.setAttribute("max",t);var e=no(t);D.current.innerText="".concat(e.hour>0?e.hour+":":"").concat(e.minutes,":").concat(e.seconds),D.current.setAttribute("datetime","".concat(e.hour>0?" "+e.hour+" ":"").concat(e.minutes,"m ").concat(e.seconds,"s")),i(),function(){var t=no(Math.round(L.current.currentTime));R.current.innerText="".concat(t.hour>0?t.hour+":":"").concat(t.minutes,":").concat(t.seconds),R.current.setAttribute("datetime","".concat(t.hour>0?" "+t.hour+" ":"").concat(t.minutes,"m ").concat(t.seconds,"s"))}();var n=T.current.getBoundingClientRect(),r=n.width,o=(n.height,n.x),a=n.y;if(o<0||a<0||!r)return;if(!nt){var s=L.current.currentTime,l=s-K;Math.abs(l)<10?(q+=Math.abs(l),K=s,et||q-tt*$>=0&&(tt++,it.push(K),u&&rt())):(K=s,u&&rt())}}catch(t){console.log(t)}}function c(){nt=!0}function h(){L.current.playing&&it.push(L.current.currentTime,K),K=L.current.currentTime,nt=!1}function d(){(X=L.current.duration)<=20&&($=X/3),L.current.addEventListener("play",t)}function f(){v()}function p(t){if(o){var e=t.target.dataset.seek?t.target.dataset.seek:t.target.value;L.current.currentTime=e,O.current.value=e,B.current.value=e}else H.ZP.warning("该视频禁止快进/后退播放")}function m(t){var e=Math.round(t.offsetX/t.target.clientWidth*parseInt(t.target.getAttribute("max"),10));B.current.setAttribute("data-seek",e);var n=no(e);F.current.textContent="".concat(n.hour>0?n.hour+":":"").concat(n.minutes,":").concat(n.seconds);var i=L.current.getBoundingClientRect();F.current.style.left="".concat(t.pageX-i.left,"px")}function y(t){switch(t.code){case"Space":t.preventDefault(),ht();break;case"ArrowRight":if(t.preventDefault(),!o){H.ZP.warning("该视频禁止快进/后退播放");break}if(L.current.currentTime>=L.current.duration)break;L.current.currentTime=parseInt(L.current.currentTime)+5,i();break;case"ArrowLeft":if(t.preventDefault(),!o){H.ZP.warning("该视频禁止快进/后退播放");break}if(0===L.current.currentTime)break;L.current.currentTime=parseInt(L.current.currentTime)-5,i();break;case"ArrowUp":t.preventDefault(),L.current.volume<1&&(L.current.volume=(parseInt(10*L.current.volume)+1)/10);break;case"ArrowDown":t.preventDefault(),L.current.volume>0&&(L.current.volume=(parseInt(10*L.current.volume)-1)/10)}}return N.current.addEventListener(document.webkitExitFullscreen?"webkitfullscreenchange":document.exitFullscreen?"fullscreenchange":document.msExitFullscreen?"msfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":void 0,(function(t){t.preventDefault(),to()?(L.current.style.width="100%",L.current.style.height="100%"):L.current.style.cssText=""})),L.current.addEventListener("canplay",d),L.current.addEventListener("ended",e),L.current.addEventListener("seeking",c),L.current.addEventListener("seeked",h),L.current.addEventListener("loadedmetadata",s),B.current.addEventListener("mousemove",m),B.current.addEventListener("input",p),L.current.addEventListener("timeupdate",l),L.current.addEventListener("pause",f),L.current.addEventListener("volumechange",st),document.addEventListener("keydown",y),function(){var n,i,r,o,a,g,v,w,b,x,S,P;null===(n=L.current)||void 0===n||n.removeEventListener("canplay",d),null===(i=L.current)||void 0===i||i.removeEventListener("play",t),null===(r=L.current)||void 0===r||r.removeEventListener("ended",e),null===(o=L.current)||void 0===o||o.removeEventListener("seeking",c),null===(a=L.current)||void 0===a||a.removeEventListener("seeked",h),null===(g=B.current)||void 0===g||g.removeEventListener("mousemove",m),null===(v=B.current)||void 0===v||v.removeEventListener("input",p),null===(w=L.current)||void 0===w||w.removeEventListener("timeupdate",l),null===(b=L.current)||void 0===b||b.removeEventListener("pause",f),null===(x=L.current)||void 0===x||x.removeEventListener("loadedmetadata",s),null===(S=L.current)||void 0===S||S.removeEventListener("volumechange",st),document.removeEventListener("keydown",y),null!==(P=L.current)&&void 0!==P&&P.playing&&(it.push(K,L.current.currentTime),u&&rt())}}),[L,s]),(0,h.useEffect)((function(){var t;if(L.current.onended=function(){x(L)},L.current.oncontextmenu=function(){return!1},(null===(t=s)||void 0===t?void 0:t.indexOf(".m3u8"))>-1)if(L.current.canPlayType("application/vnd.apple.mpegurl"))L.current.src=s;else if(Jr.ZP.isSupported()){var e=new Jr.ZP;e.loadSource(s),e.attachMedia(L.current)}}),[s]);var lt=(0,h.useState)(1),ut=l()(lt,2),ct=(ut[0],ut[1]),ht=function(){L.current.paused||L.current.ended?L.current.play():L.current.pause(),ot()};return(0,at.jsxs)("div",{style:{position:"relative"},ref:N,children:[(0,at.jsx)("div",{ref:T,className:"".concat(eo.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(eo.animate__loop),children:M&&Y?Y.login:" "}),(0,at.jsx)("div",{className:eo.container,children:(0,at.jsxs)("div",{className:eo["video-container"],id:"video-container",children:[(0,at.jsx)("div",{className:eo["playback-animation"],id:"playback-animation",children:(0,at.jsxs)("svg",{className:eo["playback-icons"],children:[(0,at.jsx)("use",{className:"hidden",href:"#play-icon"}),(0,at.jsx)("use",{href:"#pause"})]})}),(0,at.jsx)("video",{className:eo.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:L,autoPlay:P}),(0,at.jsxs)("div",{className:"".concat(eo["video-controls"]," "),id:"video-controls",children:[(0,at.jsxs)("div",{className:eo["bottom-controls"],children:[(0,at.jsxs)("div",{className:eo["left-controls"],children:[(0,at.jsx)("button",{"data-title":"播放/暂停",id:"play",onClick:ht,children:(0,at.jsxs)("svg",{className:eo["playback-icons"],children:[(0,at.jsx)("use",{ref:I,href:"#play-icon"}),(0,at.jsx)("use",{ref:j,style:{display:"none"},href:"#pause"})]})}),(0,at.jsxs)("div",{className:eo.time,children:[(0,at.jsx)("time",{id:"time-elapsed",ref:R,children:"00:00"}),(0,at.jsx)("span",{children:" / "}),(0,at.jsx)("time",{id:"duration",ref:D,children:"00:00"})]})]}),(0,at.jsxs)("div",{className:eo["right-controls"],children:[o&&(0,at.jsx)(me.Z,{placement:"top",overlayClassName:eo.rateOverlay,getPopupContainer:function(t){return t.parentNode},menu:{items:[{key:"1",label:(0,at.jsx)("span",{onClick:function(){ct(1),L.current.playbackRate=1},children:"1.0x"})},{key:"2",label:(0,at.jsx)("span",{onClick:function(){ct(1.5),L.current.playbackRate=1.5},children:"1.5x"})},{key:"3",label:(0,at.jsx)("span",{onClick:function(){ct(2),L.current.playbackRate=2},children:"2.0x"})}]},children:(0,at.jsx)("div",{className:"".concat(eo.controlText," mr5"),children:"倍速"})}),(0,at.jsx)($r.CopyToClipboard,{text:s,onCopy:function(){return H.ZP.success("复制成功")},children:(0,at.jsx)("button",{"data-title":"复制链接",children:(0,at.jsx)("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}})})}),(0,at.jsxs)("div",{className:eo["volume-controls"],children:[(0,at.jsxs)("button",{"data-title":"开启/关闭声音",className:eo["volume-button"],id:"volume-button",onClick:function(){L.current.muted=!L.current.muted,L.current.muted?(_.current.setAttribute("data-volume",volume.value),_.current.value=0):_.current.value=_.current.dataset.volume},children:[(0,at.jsx)("i",{ref:z,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),(0,at.jsx)("i",{ref:U,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),(0,at.jsx)("i",{ref:G,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})]}),(0,at.jsx)("input",{className:eo.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:_,style:{display:"none"},onClick:st})]}),(0,at.jsx)("button",{"data-title":"全屏/退出全屏",className:eo["fullscreen-button"],onClick:function(){to()?window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen():function(t){try{t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()}catch(t){console.log(t,":e")}}(N.current)},children:(0,at.jsx)("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})})]})]}),(0,at.jsxs)("div",{className:eo["video-progress"],children:[(0,at.jsx)("progress",{ref:O,value:"0",min:"0"}),(0,at.jsx)("input",{className:eo.seek,ref:B,value:"0",min:"0",type:"range",step:"1"}),(0,at.jsx)("div",{className:eo["seek-tooltip"],ref:F,id:"seek-tooltip",children:"00:00"})]})]})]})}),(0,at.jsx)("svg",{style:{display:"none"},children:(0,at.jsxs)("defs",{children:[(0,at.jsx)("symbol",{id:"pause",viewBox:"0 0 24 24",children:(0,at.jsx)("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})}),(0,at.jsx)("symbol",{id:"play-icon",viewBox:"0 0 24 24",children:(0,at.jsx)("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})}),(0,at.jsx)("symbol",{id:"volume-high",viewBox:"0 0 24 24",children:(0,at.jsx)("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})}),(0,at.jsx)("symbol",{id:"volume-low",viewBox:"0 0 24 24",children:(0,at.jsx)("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})}),(0,at.jsx)("symbol",{id:"volume-mute",viewBox:"0 0 24 24",children:(0,at.jsx)("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})}),(0,at.jsx)("symbol",{id:"fullscreen",viewBox:"0 0 24 24",children:(0,at.jsx)("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})}),(0,at.jsx)("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24",children:(0,at.jsx)("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})}),(0,at.jsx)("symbol",{id:"pip",viewBox:"0 0 24 24",children:(0,at.jsx)("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})})]})})]})})),so="modal___LGwws",lo="closeIcon___vsUXI",uo=n(24334),co=function(t){var e=t.visible,n=t.width,i=t.videoId,r=t.file_url,o=t.course_id,a=(t.copyUrl,t.toLog),s=void 0===a||a,l=t.logWatchHistory,u=void 0===l?function(){}:l,c=t.allow_skip,h=t.onClose,d=void 0===h?function(){}:h,f=t.autoPlay,p=void 0!==f&&f,g=t.onPlayEnded,m=void 0===g?function(){}:g;return(0,at.jsxs)(U.Z,{centered:!0,keyboard:!1,closable:!1,destroyOnClose:!0,open:e,title:null,footer:null,width:n,className:so,children:[(0,at.jsx)("i",{className:"".concat(lo," iconfont icon-guanbi10"),onClick:d}),e&&(0,at.jsx)(ao,{onPlayEnded:m,autoPlay:p,allow_skip:c,courseId:o,src:null!=r&&r.startsWith("http")?r:uo.Base64.decode(r),videoId:i,toLog:s,logWatchHistory:u})]})},ho=(0,d.connect)((function(t){return{user:t.user,dispatch:t.dispatch}}))((function(t){var e,n=t.setScoreShow,i=t.ScoreShow,o=t.modalType,s=t.user,u=t.id,c=t.subjectId,f=t.dispatch,p=t.getData,g=t.openPreview,m=(0,h.useState)({page:1,type:"1",per_page:10,category:"manage",search:"",homework_type:"3",association_id:""}),v=l()(m,2),y=v[0],w=v[1],b=(0,h.useState)([]),x=l()(b,2),S=x[0],P=x[1],k=(0,h.useState)([]),C=l()(k,2),A=C[0],M=C[1],E=(0,h.useState)([]),L=l()(E,2),T=L[0],N=L[1],j=(0,h.useState)(!1),I=l()(j,2),B=I[0],O=I[1],D=X.Z.useForm(),R=l()(D,1)[0],z=(0,h.useState)(0),_=l()(z,2),Z=_[0],W=_[1],V=(0,h.useState)(!1),q=l()(V,2),K=q[0],Q=q[1],J=(0,h.useState)(""),$=l()(J,2),tt=$[0],et=$[1],it=(0,h.useState)([]),ot=l()(it,2),st=ot[0],ut=ot[1],ct=(0,h.useRef)(new Set),ht=(0,h.useRef)(new Set),dt=(0,h.useState)([{}]),ft=l()(dt,2),pt=ft[0],gt=ft[1],mt=(0,h.useState)(),vt=l()(mt,2),yt=vt[0],wt=vt[1],bt=(0,h.useState)({}),xt=l()(bt,2),St=xt[0],Pt=xt[1],kt=(0,h.useState)(""),Ct=l()(kt,2),Mt=Ct[0],Et=Ct[1],Lt=(0,h.useState)(""),Tt=l()(Lt,2),Nt=Tt[0],jt=Tt[1],It=((0,d.useParams)(),(0,h.useState)(!1)),Bt=l()(It,2),Ot=Bt[0],Dt=Bt[1],Rt=[{title:"名称",dataIndex:"3"==(null==y?void 0:y.type)?"title":"name",key:"name",render:function(t,e,n){var i,r;return(0,at.jsxs)("div",{children:["1"==(null==y?void 0:y.homework_type)&&(null==e?void 0:e.name),"3"==(null==y?void 0:y.homework_type)&&(null==e?void 0:e.name),"5"==(null==y?void 0:y.homework_type)&&(null==e?void 0:e.name),"7"==(null==y?void 0:y.homework_type)&&(null==e||null===(i=e.video)||void 0===i?void 0:i.title),"8"==(null==y?void 0:y.homework_type)&&"1"==(null==y?void 0:y.type)?null==e?void 0:e.filename:null==e||null===(r=e.attachment)||void 0===r?void 0:r.filename,"3"==(null==y?void 0:y.type)&&t]})}},{title:"1"==(null==y?void 0:y.type)?"所属课堂":"所属实践课程",dataIndex:"1"==(null==y?void 0:y.type)?"course_name":"subject_name",width:"55%",key:"1"==(null==y?void 0:y.type)?"course_name":"subject_name",ellipsis:!0,hidden:"3"==(null==y?void 0:y.type)},{title:"操作",dataIndex:"id",width:"60px",key:"item_type",render:function(t,e,n){return(0,at.jsx)("div",{style:{flex:1,textAlign:"start"},children:(0,at.jsx)("a",{onClick:function(){if(null!=e&&e.link)(0,F.xg)(e.link);else if("教学课件"==o)g(e);else if("视频项目"==o){var t,n;if(null!=e&&e.video)wt(!0),Pt({videoId:null==e||null===(t=e.video)||void 0===t?void 0:t.id,file_url:null==e||null===(n=e.video)||void 0===n?void 0:n.play_url});else"3"==(null==y?void 0:y.type)?(wt(!0),Pt({videoId:e.id,file_url:e.play_url||e.file_url})):H.ZP.error("没有视频资源")}else"编程作业"==o?(0,lt.NV)({id:null==e?void 0:e.id,source:"course"}).then((function(t){var e;0==(null==t?void 0:t.status)&&(et(null==t||null===(e=t.data)||void 0===e?void 0:e.homework),jt(null==t?void 0:t.course_id));Et("HomeworkCommon"),Q(!0)})):(0,lt.NV)({id:null==e?void 0:e.id,source:"1"==(null==y?void 0:y.type)?"course":"subject"}).then((function(t){var e;0==(null==t?void 0:t.status)&&et(null==t||null===(e=t.data)||void 0===e?void 0:e.homework);Q(!0)}))},children:"查看"})})}}].filter((function(t){return!t.hidden})),Ft={type:"checkbox",selectedRowKeys:S,onSelect:function(t,e,n){if(e)P([].concat(Y()(S),[t.id])),ut([].concat(Y()(st),[t])),"2"===y.type?ct.current.add(t.id):ht.current.add(t.id),W(1),M([].concat(Y()(A),[t.id]));else{var i=st.filter((function(e){return e.id!==t.id}));ut(i);var r=i.map((function(t){return t.id}));P(Y()(r)),"2"===y.type?ct.current.delete(t.id):ht.current.delete(t.id);var o=A.filter((function(e){return e!==t.id}));M(o)}},onSelectAll:function(t,e,n){if(t){var i=n.map((function(t){return t.id}));ut([].concat(Y()(st),Y()(n))),P([].concat(Y()(S),Y()(i))),M([].concat(Y()(A),Y()(i)));var r,o=At()(n);try{for(o.s();!(r=o.n()).done;){var a=r.value;"2"===y.type?ct.current.add(a.id):ht.current.add(a.id)}}catch(t){o.e(t)}finally{o.f()}}else{var s=n.map((function(t){return t.id})),l=S.filter((function(t){return!s.some((function(e){return e===t}))})),u=st.filter((function(t){return!s.some((function(e){return e===t.id}))}));ut(u),P(Y()(l)),M(Y()(l));var c,h=At()(s);try{for(h.s();!(c=h.n()).done;){var d=c.value;"2"===y.type?ct.current.delete(d):ht.current.delete(d)}}catch(t){h.e(t)}finally{h.f()}}}};(0,h.useEffect)((function(){i&&(y.search="",y.type="1",y.homework_type="分组作业"==o?"3":"图文作业"==o?"1":"视频项目"==o?"7":"编程作业"==o?"5":"8",w(y),Kt(y),R.setFieldsValue({association_id:"",search:null}),ct.current.clear(),ht.current.clear(),ut([]),P([]),M([]))}),[i]);var zt=(0,h.useState)(1),Gt=l()(zt,2),Ut=Gt[0],Ht=Gt[1],_t=(0,h.useState)([]),Zt=l()(_t,2),Wt=Zt[0],Vt=Zt[1];(0,h.useEffect)((function(){1!=Ut&&i&&Yt(Ut)}),[Ut]),(0,h.useEffect)((function(){i&&(Vt([]),Ht(1),Yt(1))}),[y.type]);var Yt=function(t){"1"==y.type?Xt(t):"2"==y.type&&qt(t)},Xt=function(t){var e;(0,Ye.Ho)({page:t,category:"manage",status:"",sort_by:"updated_at",sort_direction:"desc",username:null==s||null===(e=s.userInfo)||void 0===e?void 0:e.login}).then((function(e){Vt(1==t?[{id:"",name:"全部教学课堂"}].concat(Y()(null==e?void 0:e.courses)):[].concat(Y()(Wt),Y()(null==e?void 0:e.courses)))}))},qt=function(t){var e;(0,Ye.w3)({page:t,category:"manage",status:"",sort_by:"updated_at",sort_direction:"desc",username:null==s||null===(e=s.userInfo)||void 0===e?void 0:e.login}).then((function(e){Vt(1==t?[{id:"",name:"全部实践课程"}].concat(Y()(null==e?void 0:e.subjects)):[].concat(Y()(Wt),Y()(null==e?void 0:e.subjects)))}))};function Kt(t){return Qt.apply(this,arguments)}function Qt(){return(Qt=a()(r()().mark((function t(e){var n,i,o,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(O(!0),w(G()({},e)),"1"!=e.type){t.next=6;break}(0,lt.A7)(G()({user_id:null==s||null===(n=s.userInfo)||void 0===n?void 0:n.login},e)).then((function(t){0==(null==t?void 0:t.status)&&N(null==t?void 0:t.data)})),t.next=15;break;case 6:if("2"!=e.type){t.next=10;break}(0,lt.jT)(G()({user_id:null==s||null===(i=s.userInfo)||void 0===i?void 0:i.login},e)).then((function(t){0==(null==t?void 0:t.status)&&N(null==t?void 0:t.data)})),t.next=15;break;case 10:if("3"!=e.type){t.next=15;break}return t.next=13,f({type:"userDetail/getVideos",payload:G()(G()({},e),{},{category:"all",sort_by:"published_at",sort_direction:"desc",username:null===(o=s.userInfo)||void 0===o?void 0:o.login})});case 13:a=t.sent,N({count:null==a?void 0:a.count,list:null==a?void 0:a.videos});case 15:O(!1);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,h.useEffect)((function(){Z>0&&setTimeout((function(){W(0)}),2e3)}),[Z]),(0,at.jsxs)("div",{children:[(0,at.jsxs)(U.Z,{title:"选用"+o,open:i,width:900,centered:!0,zIndex:10,className:ze,onCancel:function(){n(!1)},confirmLoading:Ot,onOk:a()(r()().mark((function t(){var e;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((null==A?void 0:A.length)<=0)){t.next=3;break}return H.ZP.info("当前暂未选择数据"),t.abrupt("return");case 3:return Dt(!0),t.next=6,(0,lt._C)({id:u,subject_id:c,homework_type:"3"==y.type?"9":"分组作业"==o?"3":"图文作业"==o?"1":"视频项目"==o?"7":"编程作业"==o?"5":"8",homework_ids:Y()(ht.current),subject_homework_ids:Y()(ct.current)});case 6:0==(null==(e=t.sent)?void 0:e.status)&&(H.ZP.success("选用成功"),p(),n(!1)),Dt(!1);case 9:case"end":return t.stop()}}),t)}))),children:[(0,at.jsxs)("div",{className:_e,children:[(0,at.jsx)(De.Z,{className:Ze,activeKey:y.type,onChange:function(t){y.type=t,y.page=1,y.updated_at="",y.association_id=null,y.search=null,R.setFieldsValue({association_id:"",search:null}),w(G()({},y)),Kt(G()({},y))},items:[{label:"从教学课堂选用",key:"1"},"编程作业"!=o&&("视频项目"==o?{label:"从个人主页选用",key:"3"}:{label:"从实践课程选用",key:"2"})]}),(0,at.jsxs)(X.Z,{layout:"inline",className:We,form:R,onValuesChange:function(t,e){y.page=1,t.search||""===t.search||R.submit()},onFinish:function(t){w(G()(G()({},y),t)),Kt(G()(G()({},y),t))},children:["3"!=y.type&&(0,at.jsx)(X.Z.Item,{name:"association_id",children:(0,at.jsx)(Re.default,{onPopupScroll:function(t){var e=t.target;e.scrollHeight-e.clientHeight===e.scrollTop&&Ht(Ut+1)},className:Ge,style:{width:200},size:"large",children:Wt.map((function(t,e){return(0,at.jsx)(Re.default.Option,{children:null==t?void 0:t.name},null==t?void 0:t.id)}))})}),(0,at.jsx)(X.Z.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"search",children:(0,at.jsx)(rt.Z.Search,{className:Ue,placeholder:"视频项目"==o?"请输入视频名称进行搜索":"教学课件"==o?"请输入课件名称进行搜索":"请输入作业名称进行搜索",allowClear:!0,suffix:(0,at.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(He),onClick:function(){return R.submit()}}),onSearch:function(t){R.submit()}})})]})]}),(null==T||null===(e=T.list)||void 0===e?void 0:e.length)>0?(0,at.jsx)(Fe.Z,{style:{marginTop:20,marginBottom:20},scroll:{y:260},dataSource:null==T?void 0:T.list,pagination:!1,loading:B,rowKey:function(t){return t.id},rowSelection:Ft,columns:Rt}):(0,at.jsx)(Ve.Z,{}),(null==T?void 0:T.count)>0&&(0,at.jsx)(nt.Z,{current:y.page,total:null==T?void 0:T.count,style:{marginBottom:20},defaultPageSize:y.per_page,showTotal:function(t){return(0,at.jsxs)("span",{children:["共 ",(0,at.jsx)("span",{style:{color:"#165DFF"},children:t})," 条数据"]})},pageSize:y.per_page,onChange:function(t,e){y.page=t,y.per_page=e,w(G()({},y)),Kt(G()({},y))}})]}),(0,at.jsx)(mi,{setScoreShow:Q,ScoreShow:K,modalDdata:tt,homeType:Mt,homeId:Nt}),(0,at.jsx)(dn.Z,{close:!0,data:null==pt?void 0:pt.content,type:null==pt?void 0:pt.type,hasMask:!0,monacoEditor:{value:"",language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){gt({content:"",type:""})}}),(0,at.jsx)(co,G()(G()({},St),{},{visible:yt,allow_skip:!0,width:800,onClose:function(){wt(!1),Pt({})}}))]})})),fo=n(85573),po=n.n(fo),mo=n(89780),vo=n.n(mo),yo=n(76374),wo=(n(6313),n(25717),n(99498),n(25419),n(67549),function(t){var e=t.value,n=void 0===e?"":e,i=(t.className,t.showTextOnly,t.showLines,t.style,(0,h.useMemo)((function(){return""}),[n]));return(0,at.jsx)(at.Fragment,{children:(0,at.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})}),bo=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学图像",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function xo(t){var e=t.onActionCallback,n=t.title,i=t.icon,r=t.actionName,o=t.className,a=void 0===o?"":o,s=t.children;return(0,at.jsxs)("a",{title:n,className:a,onClick:function(){e(r)},children:[(0,at.jsx)("i",{className:"".concat(i)}),s]})}var So=function(t){var e=t.watch,n=t.showNullButton,i=t.showNullProgramButton,r=t.onActionCallback,o=t.fullScreen,a=t.insertTemp,s=t.hidetoolBar,l=t.extraUse,u=[].concat(bo,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,at.jsxs)("ul",{className:"markdown-toolbar-container",children:[!s&&u.map((function(t,e){return(0,at.jsx)("li",{children:t.actionName?(0,at.jsx)(xo,G()(G()({},t),{},{onActionCallback:r})):(0,at.jsx)("span",{className:"v-line"})},e)})),n?(0,at.jsx)("li",{children:(0,at.jsx)(xo,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,at.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)("li",{children:(0,at.jsx)(xo,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,at.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,at.jsx)("li",{children:(0,at.jsx)(xo,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,at.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,a&&(0,at.jsx)("li",{children:(0,at.jsx)(xo,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r,children:(0,at.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),l&&(0,at.jsx)("li",{children:l}),(0,at.jsx)("li",{className:"btn-full-screen",children:(0,at.jsx)(xo,{icon:"".concat(o?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:o?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},Po=n(4676),ko=function(t){Ni()(n,t);var e=Ii()(n);function n(t){var i;bi()(this,n),i=e.call(this,t);var r=window.document;return i.node=r.createElement("div"),r.body.appendChild(i.node),i}return Si()(n,[{key:"render",value:function(){var t=this.props.children;return(0,Po.createPortal)(t,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(h.Component),Co={labelCol:{span:4},wrapperCol:{span:20}},Ao=function(t){var e=t.callback,n=t.onCancel;return(0,at.jsxs)(X.Z,G()(G()({},Co),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)},style:{width:500},children:[(0,at.jsx)(X.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,at.jsx)(rt.Z,{})}),(0,at.jsx)(X.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,at.jsx)(rt.Z,{})}),(0,at.jsxs)("div",{className:"flex-container flex-end",children:[(0,at.jsx)(K.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,at.jsx)(K.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))},Mo=Re.default.Option,Eo={labelCol:{span:4},wrapperCol:{span:20}},Lo={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]},To=function(t){var e=t.callback,n=t.onCancel,i=(0,h.useState)("python"),r=l()(i,2),o=r[0],a=r[1];return(0,at.jsxs)(X.Z,G()(G()({},Eo),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)},style:{width:500},children:[(0,at.jsx)(X.Z.Item,{label:"代码语言",name:"language",children:(0,at.jsx)(Re.default,{getPopupContainer:function(t){return t.parentNode},onChange:function(t){a(Lo[t][1])},children:Object.keys(Lo).map((function(t){return(0,at.jsx)(Mo,{value:t,children:Lo[t][0]},t)}))})}),(0,at.jsx)(X.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,at.jsx)(No,{mode:o})}),(0,at.jsxs)("div",{className:"flex-container flex-end",children:[(0,at.jsx)(K.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,at.jsx)(K.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))};function No(t){var e=t.value,n=t.onChange,i=t.mode,r=t.options,o=void 0===r?{}:r,a=(0,h.useRef)(),s=(0,h.useState)(),u=l()(s,2),c=u[0],d=u[1];return(0,h.useEffect)((function(){if(c){var t=function(t){var e=t.getValue();n&&n(e)};return c.on("change",t),function(){c.off("change",t)}}}),[c,n]),(0,h.useEffect)((function(){c&&c.setOption("mode",i)}),[c,i]),(0,h.useEffect)((function(){c&&(e===c.getValue()&&""!==e||setTimeout((function(){c.setValue(e||"")}),300))}),[c,e]),(0,h.useEffect)((function(){if(a.current&&!c){var t=vo().fromTextArea(a.current,G()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));d(t)}}),[a.current,c]),(0,at.jsx)("div",{className:"my-codemirror-container",children:(0,at.jsx)("textarea",{ref:a})})}var jo=n(53302),Io=function(t){var e=t.callback,n=t.onCancel,i=document.createElement("canvas"),r=i.getContext("2d");i.width=1e3,i.height=800,r.fillStyle="#ffffff",r.fillRect(0,0,i.width,i.height);var o=i.toDataURL("image/png");return(0,at.jsx)(U.Z,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1,children:(0,at.jsx)(Q.Z,{style:{height:"100vh"},children:(0,at.jsx)(di,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(t){e({src:t.url})},onClose:n})})})},Bo=n(12378);function Oo(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Oo,go.CommandHandler),Oo.prototype.canAlignSelection=function(){var t=this.diagram;return null!==t&&!t.isReadOnly&&!t.isModelReadOnly&&!(t.selection.count<2)},Oo.prototype.alignLeft=function(){var t=this.diagram;t.startTransaction("aligning left");var e=1/0;t.selection.each((function(t){t instanceof go.Link||(e=Math.min(t.position.x,e))})),t.selection.each((function(t){t instanceof go.Link||t.move(new go.Point(e,t.position.y))})),t.commitTransaction("aligning left")},Oo.prototype.alignRight=function(){var t=this.diagram;t.startTransaction("aligning right");var e=-1/0;t.selection.each((function(t){if(!(t instanceof go.Link)){var n=t.actualBounds.x+t.actualBounds.width;e=Math.max(n,e)}})),t.selection.each((function(t){t instanceof go.Link||t.move(new go.Point(e-t.actualBounds.width,t.position.y))})),t.commitTransaction("aligning right")},Oo.prototype.alignTop=function(){var t=this.diagram;t.startTransaction("alignTop");var e=1/0;t.selection.each((function(t){t instanceof go.Link||(e=Math.min(t.position.y,e))})),t.selection.each((function(t){t instanceof go.Link||t.move(new go.Point(t.position.x,e))})),t.commitTransaction("alignTop")},Oo.prototype.alignBottom=function(){var t=this.diagram;t.startTransaction("aligning bottom");var e=-1/0;t.selection.each((function(t){if(!(t instanceof go.Link)){var n=t.actualBounds.y+t.actualBounds.height;e=Math.max(n,e)}})),t.selection.each((function(t){t instanceof go.Link||t.move(new go.Point(t.actualBounds.x,e-t.actualBounds.height))})),t.commitTransaction("aligning bottom")},Oo.prototype.alignCenterX=function(){var t=this.diagram,e=t.selection.first();if(e){t.startTransaction("aligning Center X");var n=e.actualBounds.x+e.actualBounds.width/2;t.selection.each((function(t){t instanceof go.Link||t.move(new go.Point(n-t.actualBounds.width/2,t.actualBounds.y))})),t.commitTransaction("aligning Center X")}},Oo.prototype.alignCenterY=function(){var t=this.diagram,e=t.selection.first();if(e){t.startTransaction("aligning Center Y");var n=e.actualBounds.y+e.actualBounds.height/2;t.selection.each((function(t){t instanceof go.Link||t.move(new go.Point(t.actualBounds.x,n-t.actualBounds.height/2))})),t.commitTransaction("aligning Center Y")}},Oo.prototype.alignColumn=function(t){var e=this.diagram;e.startTransaction("align Column"),void 0===t&&(t=0),t=parseFloat(t);var n=new Array;e.selection.each((function(t){t instanceof go.Link||n.push(t)}));for(var i=0;i0){for(var i=a.elt(s-1);null!==i&&i.isTreeExpanded&&!i.isTreeLeaf;){i=this._sortTreeChildrenByY(i).last()}null!==i&&t.select(i)}else t.select(o)}else if("Down"===n.key){var r;if(e.isTreeExpanded&&!e.isTreeLeaf)null!==(r=this._sortTreeChildrenByY(e).first())&&t.select(r);else for(;null!==e;){var o,a,s;if(null===(o=e.findTreeParentNode()))break;if((s=(a=this._sortTreeChildrenByY(o)).indexOf(e))i.y?1:n.xi.x?1:0})),e},Oo.prototype.copyToClipboard=function(t){go.CommandHandler.prototype.copyToClipboard.call(this,t),this._lastPasteOffset.set(this.pasteOffset)},Oo.prototype.pasteFromClipboard=function(){var t=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(t,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),t},Object.defineProperty(Oo.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(t){if("move"!==t&&"select"!==t&&"scroll"!==t&&"tree"!==t&&"none"!==t)throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+t);this._arrowKeyBehavior=t}}),Object.defineProperty(Oo.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(t){if(!(t instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+t);this._pasteOffset.set(t)}});var Do=Oo,Ro=(n(77164),"myPaletteDiv___Xjz2I"),Fo="flowChartWrp____f45r",zo="maxH60___Pd4Re";var Go=function(t){var e=t.onCancel,n=t.callback,i=(0,h.useRef)(),o=(0,h.useRef)(),s=(0,h.useRef)(),u=(0,h.useRef)(!1),c=(0,h.useRef)(!1),d=(0,h.useState)(0),f=l()(d,2),p=f[0],g=f[1],m=function(){var t=a()(r()().mark((function t(){var e,o,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i.current.makeImage(),t.next=3,(0,it.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:o.src,file_data:JSON.stringify({login:null===(e=(0,xt.eY)())||void 0===e?void 0:e.login,data:JSON.parse(i.current.model.toJson())})}});case 3:a=t.sent,n({src:a.url});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,h.useEffect)((function(){return setTimeout((function(){!function(){var t=Bo.bx.make,e="#ff3333",n="#3358ff",r="#25ad23",a="#d533ff",l="#7d33ff",u="#ff6233",c="#ffffff",h="#000000",d="#fffcd5",f="#d5ebff",p="#f2dfe0",g="#a5d2fa",m="#cccccc",v="#b3e6b3",y="#fcbbbd";function w(e,n){var i=function(t,n){t.handled=!0,t.diagram.model.commit((function(i){var r=n.part.adornedPart,o=(new Bo.E9).setRectSpot(r.actualBounds,e);o.subtract(r.location),o.scale(2,2),o.x+=130*Math.sign(o.x),o.y+=130*Math.sign(o.y),o.add(r.location),o.snapToGridPoint(t.diagram.grid.gridOrigin,t.diagram.grid.gridCellSize);var a=i.copyNodeData(r.data);i.setGroupKeyForNodeData(a,i.getGroupKeyForNodeData(r.data)),i.addNodeData(a);var s={from:r.key,to:i.getKeyForNodeData(a)};i.addLinkData(s);var l=t.diagram.findNodeForData(a);l.location=o,t.diagram.select(l),setTimeout((function(){t.diagram.commandHandler.editTextBlock()}),20)}))};return t(Bo.bn,{figure:n,alignment:e,alignmentFocus:e.opposite(),width:e.equals(Bo.z6.Top)||e.equals(Bo.z6.Bottom)?25:18,height:e.equals(Bo.z6.Top)||e.equals(Bo.z6.Bottom)?18:25,fill:"orange",stroke:c,strokeWidth:4,mouseEnter:function(t,e){return e.fill="dodgerblue"},mouseLeave:function(t,e){return e.fill="orange"},isActionable:!0,click:i,contextClick:i})}function b(e){return t(Bo.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:function(t,e){return e.fill="dodgerblue"},mouseLeave:function(t,e){return e.fill="orange"},click:function(t,e){t.diagram.commandHandler.showContextMenu(e.part.adornedPart)}},e||{})}function x(t,e){return function(n,i){n.handled=!0,n.diagram.model.commit((function(n){n.set(i.part.adornedPart.data,t,e)}))}}function S(e,n){return n||(n="color"),t(Bo.bn,{width:16,height:16,stroke:"lightgray",fill:e,margin:1,background:"transparent",mouseEnter:function(t,e){return e.stroke="dodgerblue"},mouseLeave:function(t,e){return e.stroke="lightgray"},click:x(n,e),contextClick:x(n,e)})}function P(){return[t("ContextMenuButton",t(Bo.s_,"Horizontal",S(c,"fill"),S(d,"fill"),S(f,"fill"),S(p,"fill"))),t("ContextMenuButton",t(Bo.s_,"Horizontal",S(m,"fill"),S(v,"fill"),S(g,"fill"),S(y,"fill")))]}function k(){return[t("ContextMenuButton",t(Bo.s_,"Horizontal",S(h),S(r),S(n),S(e))),t("ContextMenuButton",t(Bo.s_,"Horizontal",S(c),S(a),S(l),S(u)))]}function C(e,n){return n||(n="thickness"),t(Bo.bn,"LineH",{width:16,height:16,strokeWidth:e,margin:1,background:"transparent",mouseEnter:function(t,e){return e.background="dodgerblue"},mouseLeave:function(t,e){return e.background="transparent"},click:x(n,e),contextClick:x(n,e)})}function A(e,n){return n||(n="dash"),t(Bo.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:e,margin:1,background:"transparent",mouseEnter:function(t,e){return e.background="dodgerblue"},mouseLeave:function(t,e){return e.background="transparent"},click:x(n,e),contextClick:x(n,e)})}function M(){return[t("ContextMenuButton",t(Bo.s_,"Horizontal",C(1),C(2),C(3),C(4))),t("ContextMenuButton",t(Bo.s_,"Horizontal",A(null),A([2,4]),A([4,4])))]}function E(e,n){return n||(n="figure"),t(Bo.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:e,margin:1,background:"transparent",mouseEnter:function(t,e){return e.fill="dodgerblue"},mouseLeave:function(t,e){return e.fill="lightgray"},click:x(n,e),contextClick:x(n,e)})}function L(e){return t(Bo.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(e+4).toString()+" H3"})}function T(e){var n="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return 0===e?n="M0 0 M16 16 M0 8 L16 8":2===e&&(n="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),t(Bo.bn,{geometryString:n,margin:2,background:"transparent",mouseEnter:function(t,e){return e.background="dodgerblue"},mouseLeave:function(t,e){return e.background="transparent"},click:x("dir",e),contextClick:x("dir",e)})}function N(e){var n=function(t,n){t.handled=!0,t.diagram.model.commit((function(t){var i=n.part.adornedPart;t.set(i.data,e?"toSpot":"fromSpot",Bo.z6.stringify(Bo.z6.AllSides)),(e?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return t(Bo.bn,{width:12,height:12,fill:"transparent",mouseEnter:function(t,e){return e.background="dodgerblue"},mouseLeave:function(t,e){return e.background="transparent"},click:n,contextClick:n})}function j(e,n){var i=0,r=Bo.z6.RightSide;e.equals(Bo.z6.Top)?(i=270,r=Bo.z6.TopSide):e.equals(Bo.z6.Left)?(i=180,r=Bo.z6.LeftSide):e.equals(Bo.z6.Bottom)&&(i=90,r=Bo.z6.BottomSide),n||(i-=180);var o=function(t,e){t.handled=!0,t.diagram.model.commit((function(t){var i=e.part.adornedPart;t.set(i.data,n?"toSpot":"fromSpot",Bo.z6.stringify(r)),(n?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return t(Bo.bn,{alignment:e,alignmentFocus:e.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:i,background:"transparent",mouseEnter:function(t,e){return e.background="dodgerblue"},mouseLeave:function(t,e){return e.background="transparent"},click:o,contextClick:o})}i.current=new Bo.S0(o.current,{padding:20,grid:t(Bo.s_,"Grid",t(Bo.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),t(Bo.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:function(t){t.diagram.commandHandler.addTopLevelParts(t.diagram.selection,!0)||t.diagram.currentTool.doCancel()},commandHandler:t(Do),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(t){var e=t.subject;e.location=e.location.copy().snapToGridPoint(t.diagram.grid.gridOrigin,t.diagram.grid.gridCellSize),setTimeout((function(){t.diagram.commandHandler.editTextBlock()}),20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:function(t){t.subject,setTimeout((function(){t.diagram.commandHandler.editTextBlock()}))},LinkRelinked:function(t){t.parameter.part.invalidateConnectedLinks();var e=t.subject;t.diagram.toolManager.linkingTool.isForwards?e.toNode.invalidateConnectedLinks():e.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),i.current.nodeTemplate=t(Bo.NB,"Auto",{locationSpot:Bo.z6.Center,locationObjectName:"SHAPE",desiredSize:new Bo.$u(120,60),minSize:new Bo.$u(40,40),resizable:!0,resizeCellSize:new Bo.$u(10,10),rotatable:!0},new Bo.KX("location","loc",Bo.E9.parse).makeTwoWay(Bo.E9.stringify),new Bo.KX("desiredSize","size",Bo.$u.parse).makeTwoWay(Bo.$u.stringify),t(Bo.bn,{name:"SHAPE",fill:c,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Bo.z6.AllSides,toSpot:Bo.z6.AllSides},new Bo.KX("figure"),new Bo.KX("fill"),new Bo.KX("stroke","borderColor"),new Bo.KX("strokeWidth","thickness"),new Bo.KX("strokeDashArray","dash")),t(Bo.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),t(Bo.al,{margin:1,textAlign:"center",overflow:Bo.al.OverflowEllipsis,editable:!0},new Bo.KX("text").makeTwoWay(),new Bo.KX("stroke","color"))),i.current.nodeTemplate.toolTip=t("ToolTip",t(Bo.s_,"Vertical",{maxSize:new Bo.$u(200,NaN)},t(Bo.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Bo.KX("text")),t(Bo.al,{font:"10pt sans-serif",textAlign:"center"},new Bo.KX("text","details")))),i.current.nodeTemplate.selectionAdornmentTemplate=t(Bo.uz,"Spot",t(Bo.Vm,{padding:10}),w(Bo.z6.Top,"TriangleUp"),w(Bo.z6.Left,"TriangleLeft"),w(Bo.z6.Right,"TriangleRight"),w(Bo.z6.Bottom,"TriangleDown"),b({alignment:new Bo.z6(.75,0)})),i.current.nodeTemplate.contextMenu=t("ContextMenu",t("ContextMenuButton",t(Bo.s_,"Horizontal",E("Rectangle"),E("RoundedRectangle"),E("Ellipse"),E("Diamond"))),t("ContextMenuButton",t(Bo.s_,"Horizontal",E("Parallelogram2"),E("ManualOperation"),E("Procedure"),E("Cylinder1"))),t("ContextMenuButton",t(Bo.s_,"Horizontal",E("Terminator"),E("CreateRequest"),E("Document"),E("TriangleDown"))),P(),k(),M()),i.current.groupTemplate=t(Bo.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Bo.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:function(t,e){e.addMembers(e.diagram.selection,!0)||e.diagram.currentTool.doCancel()},avoidable:!1},new Bo.KX("location","loc",Bo.E9.parse).makeTwoWay(Bo.E9.stringify),t(Bo.s_,"Auto",{name:"BODY"},t(Bo.bn,{parameter1:10,fill:c,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Bo.z6.AllSides,toSpot:Bo.z6.AllSides},new Bo.KX("fill"),new Bo.KX("stroke","color"),new Bo.KX("strokeWidth","thickness"),new Bo.KX("strokeDashArray","dash")),t(Bo.Vm,{background:"transparent",margin:20})),t(Bo.al,{alignment:Bo.z6.Top,alignmentFocus:Bo.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Bo.KX("text"),new Bo.KX("stroke","color"))),i.current.groupTemplate.selectionAdornmentTemplate=t(Bo.uz,"Spot",t(Bo.s_,"Auto",t(Bo.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),t(Bo.Vm,{margin:1.5})),b({alignment:Bo.z6.TopRight,alignmentFocus:Bo.z6.BottomRight})),i.current.groupTemplate.contextMenu=t("ContextMenu",P(),k(),M()),i.current.linkTemplate=t(Bo.rU,{layerName:"Foreground",routing:Bo.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Bo.KX("fromSpot","fromSpot",Bo.z6.parse),new Bo.KX("toSpot","toSpot",Bo.z6.parse),new Bo.KX("fromShortLength","dir",(function(t){return t>=1?10:0})),new Bo.KX("toShortLength","dir",(function(t){return t>=1?10:0})),new Bo.KX("points").makeTwoWay(),t(Bo.bn,{strokeWidth:2},new Bo.KX("stroke","color"),new Bo.KX("strokeWidth","thickness"),new Bo.KX("strokeDashArray","dash")),t(Bo.bn,{segmentIndex:0,segmentOffset:new Bo.E9(15,0),segmentOrientation:Bo.rU.OrientAlong,alignmentFocus:Bo.z6.Right,figure:"circle",width:10,strokeWidth:0},new Bo.KX("fill","color"),new Bo.KX("visible","dir",(function(t){return 1===t}))),t(Bo.bn,{segmentIndex:-1,segmentOffset:new Bo.E9(-10,6),segmentOrientation:Bo.rU.OrientPlus90,alignmentFocus:Bo.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Bo.KX("fill","color"),new Bo.KX("visible","dir",(function(t){return t>=1})),new Bo.KX("width","thickness",(function(t){return 7+3*t})),new Bo.KX("height","thickness",(function(t){return 7+3*t})),new Bo.KX("segmentOffset","thickness",(function(t){return new Bo.E9(-15,4+1.5*t)}))),t(Bo.bn,{segmentIndex:0,segmentOffset:new Bo.E9(15,-6),segmentOrientation:Bo.rU.OrientMinus90,alignmentFocus:Bo.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Bo.KX("fill","color"),new Bo.KX("visible","dir",(function(t){return 2===t})),new Bo.KX("width","thickness",(function(t){return 7+3*t})),new Bo.KX("height","thickness",(function(t){return 7+3*t})),new Bo.KX("segmentOffset","thickness",(function(t){return new Bo.E9(-15,4+1.5*t)}))),t(Bo.al,{alignmentFocus:new Bo.z6(0,1,-4,0),editable:!0},new Bo.KX("text").makeTwoWay(),new Bo.KX("stroke","color"))),i.current.linkTemplate.selectionAdornmentTemplate=t(Bo.uz,t(Bo.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:L(2)},new Bo.KX("pathPattern","thickness",L)),b({alignmentFocus:new Bo.z6(0,0,-6,-4)})),i.current.linkTemplate.contextMenu=t("ContextMenu",k(),M(),t("ContextMenuButton",t(Bo.s_,"Horizontal",T(0),T(1),T(2))),t("ContextMenuButton",t(Bo.s_,"Horizontal",t(Bo.s_,"Spot",N(!1),j(Bo.z6.Top,!1),j(Bo.z6.Left,!1),j(Bo.z6.Right,!1),j(Bo.z6.Bottom,!1)),t(Bo.s_,"Spot",{margin:new Bo.Zt(0,0,0,2)},N(!0),j(Bo.z6.Top,!0),j(Bo.z6.Left,!0),j(Bo.z6.Right,!0),j(Bo.z6.Bottom,!0)))));var I=new Bo.YI(s.current,{maxSelectionCount:1,linkTemplate:t(Bo.rU,{locationSpot:Bo.z6.Center,selectionAdornmentTemplate:t(Bo.uz,"Link",{locationSpot:Bo.z6.Center},t(Bo.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),t(Bo.bn,{toArrow:"Standard",stroke:null}))},{routing:Bo.rU.AvoidsNodes,curve:Bo.rU.JumpOver,corner:5,toShortLength:4},new Bo.KX("points"),t(Bo.bn,{isPanelMain:!0,strokeWidth:2}),t(Bo.bn,{toArrow:"Standard",stroke:null})),model:new Bo.FJ([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(Y()(Bo.bn.getFigureGenerators().toArray().map((function(t){return{text:"未命名",size:"100 100",figure:t.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))});i.current.addDiagramListener("TextEdited",(function(t){var e,n=t.subject.part,r=null===(e=document.activeElement)||void 0===e?void 0:e.value;"string"==typeof r&&""===r.trim()&&i.current.model.commit((function(t){t.set(n.data,"text","未命名"),i.current.commandHandler.stopCommand()}),"increment")})),I.nodeTemplate=t(Bo.NB,"Auto",{locationSpot:Bo.z6.Center},new Bo.KX("location","location",Bo.E9.parse).makeTwoWay(Bo.E9.stringify),t(Bo.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new Bo.KX("stroke").makeTwoWay(),new Bo.KX("fill").makeTwoWay(),new Bo.KX("figure")),t(Bo.al,{margin:new Bo.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Bo.$u(16,16),maxSize:new Bo.$u(10,NaN),textAlign:"center",editable:!0},new Bo.KX("key").makeTwoWay())),setTimeout((function(){i.current.grid=t(Bo.s_,"Grid",t(Bo.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),t(Bo.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),i.current.grid.visible=!0,i.current.grid.gridCellStroke="darkgray",i.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=i.current,i.current}()}),500),g(p+1),function(){i.current=null}}),[]),(0,at.jsx)("div",{ref:c,className:u.current?"".concat(zo," body-overflow-initial"):"body-overflow-initial",children:(0,at.jsx)(U.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!p,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:(0,at.jsxs)(Q.Z,{children:[(0,at.jsx)(J.Z,{flex:1,children:"插入流程图"}),(0,at.jsx)(J.Z,{onClick:function(){var t=i.current.selection.first();if(u.current=!u.current,document.activeElement&&t){var e,n=null===(e=document.activeElement)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.trim();"string"==typeof n&&i.current.model.commit((function(e){e.set(t.data,"text",n||"未命名"),i.current.commandHandler.stopCommand()}),"increment")}g(p+1)},children:(0,at.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:e,children:(0,at.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Fo,children:[(0,at.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,at.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,at.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,at.jsx)("div",{style:{height:"calc(100% - 50px)"},className:Ro,ref:s})]}),(0,at.jsx)("div",{style:{flex:1,position:"relative"},children:(0,at.jsx)("div",{ref:o,style:{height:"80vh"}})})]}),(0,at.jsx)("div",{className:"tr",children:(0,at.jsx)(K.ZP,{size:"large",onClick:m,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},Uo=n(31060),Ho=ye.ZP.Group,_o={margin:"0 8px"},Zo=function(t){var e=t.callback,n=t.onCancel;return(0,at.jsxs)(X.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)},children:[(0,at.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,at.jsx)("span",{style:_o,children:"单元格数:"}),(0,at.jsx)("span",{style:_o,children:"行数"}),(0,at.jsx)(X.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,at.jsx)(Uo.Z,{})}),(0,at.jsx)("span",{style:_o,children:"列数"}),(0,at.jsx)(X.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,at.jsx)(Uo.Z,{})})]}),(0,at.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,at.jsx)("span",{style:_o,children:"对齐方式:"}),(0,at.jsx)(X.Z.Item,{name:"align",children:(0,at.jsxs)(Ho,{children:[(0,at.jsx)(ye.ZP,{value:"default",children:(0,at.jsx)("i",{className:"fa fa-align-justify"})}),(0,at.jsx)(ye.ZP,{value:"left",children:(0,at.jsx)("i",{className:"fa fa-align-left"})}),(0,at.jsx)(ye.ZP,{value:"center",children:(0,at.jsx)("i",{className:"fa fa-align-center"})}),(0,at.jsx)(ye.ZP,{value:"right",children:(0,at.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,at.jsxs)("div",{className:"flex-container flex-end",children:[(0,at.jsx)(K.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,at.jsx)(K.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},Wo=n(58617),Vo=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Yo=h.forwardRef((function(t,e){var n,i=t.prefixCls,r=void 0===i?"rc-switch":i,o=t.className,a=t.checked,s=t.defaultChecked,l=t.disabled,u=t.loadingIcon,c=t.checkedChildren,d=t.unCheckedChildren,f=t.onClick,p=t.onChange,g=t.onKeyDown,m=(0,Dt.Z)(t,Vo),v=(0,Bt.Z)(!1,{value:a,defaultValue:s}),y=(0,jt.Z)(v,2),w=y[0],b=y[1];function x(t,e){var n=w;return l||(b(n=t),null==p||p(n,e)),n}var S=Lt()(r,o,(n={},(0,Ft.Z)(n,"".concat(r,"-checked"),w),(0,Ft.Z)(n,"".concat(r,"-disabled"),l),n));return h.createElement("button",(0,Tt.Z)({},m,{type:"button",role:"switch","aria-checked":w,disabled:l,className:S,ref:e,onKeyDown:function(t){t.which===Gt.Z.LEFT?x(!1,t):t.which===Gt.Z.RIGHT&&x(!0,t),null==g||g(t)},onClick:function(t){var e=x(!w,t);null==f||f(e,t)}}),u,h.createElement("span",{className:"".concat(r,"-inner")},h.createElement("span",{className:"".concat(r,"-inner-checked")},c),h.createElement("span",{className:"".concat(r,"-inner-unchecked")},d)))}));Yo.displayName="Switch";var Xo=Yo,qo=n(1684),Ko=n(60654);const Qo=t=>{const{componentCls:e,trackHeightSM:n,trackPadding:i,trackMinWidthSM:r,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:s}=t,l=`${e}-inner`;return{[e]:{[`&${e}-small`]:{minWidth:r,height:n,lineHeight:`${n}px`,[`${e}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${s+2*i}px - ${2*a}px)`,marginInlineEnd:`calc(100% - ${s+2*i}px + ${2*a}px)`},[`${l}-unchecked`]:{marginTop:-n,marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:s,height:s},[`${e}-loading-icon`]:{top:(s-t.switchLoadingIconSize)/2,fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${s+2*i}px + ${2*a}px)`,marginInlineEnd:`calc(-100% + ${s+2*i}px - ${2*a}px)`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${s+i}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:t.marginXXS/2,marginInlineEnd:-t.marginXXS/2}},[`&${e}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:-t.marginXXS/2,marginInlineEnd:t.marginXXS/2}}}}}}},Jo=t=>{const{componentCls:e,handleSize:n}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:(n-t.fontSize)/2,color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},$o=t=>{const{componentCls:e,motion:n,trackPadding:i,handleBg:r,handleShadow:o,handleSize:a}=t,s=`${e}-handle`;return{[e]:{[s]:{position:"absolute",top:i,insetInlineStart:i,width:a,height:a,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a/2,boxShadow:o,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${s}`]:{insetInlineStart:`calc(100% - ${a+i}px)`},[`&:not(${e}-disabled):active`]:n?{[`${s}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}:{}}}},ta=t=>{const{componentCls:e,trackHeight:n,trackPadding:i,innerMinMargin:r,innerMaxMargin:o,handleSize:a}=t,s=`${e}-inner`;return{[e]:{[s]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:r,transition:`padding-inline-start ${t.switchDuration} ease-in-out, padding-inline-end ${t.switchDuration} ease-in-out`,[`${s}-checked, ${s}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,transition:`margin-inline-start ${t.switchDuration} ease-in-out, margin-inline-end ${t.switchDuration} ease-in-out`,pointerEvents:"none"},[`${s}-checked`]:{marginInlineStart:`calc(-100% + ${a+2*i}px - ${2*o}px)`,marginInlineEnd:`calc(100% - ${a+2*i}px + ${2*o}px)`},[`${s}-unchecked`]:{marginTop:-n,marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${s}`]:{paddingInlineStart:r,paddingInlineEnd:o,[`${s}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${s}-unchecked`]:{marginInlineStart:`calc(100% - ${a+2*i}px + ${2*o}px)`,marginInlineEnd:`calc(-100% + ${a+2*i}px - ${2*o}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${s}`]:{[`${s}-unchecked`]:{marginInlineStart:2*i,marginInlineEnd:2*-i}},[`&${e}-checked ${s}`]:{[`${s}-checked`]:{marginInlineStart:2*-i,marginInlineEnd:2*i}}}}}},ea=t=>{const{componentCls:e,trackHeight:n,trackMinWidth:i}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,oe.Wf)(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i,height:n,lineHeight:`${n}px`,verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),(0,oe.Qy)(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}};var na=(0,se.Z)("Switch",(t=>{const e=(0,le.TS)(t,{switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchLoadingIconSize:.75*t.fontSizeIcon,switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ea(e),ta(e),$o(e),Jo(e),Qo(e)]}),(t=>{const{fontSize:e,lineHeight:n,controlHeight:i,colorWhite:r}=t,o=e*n,a=i/2,s=o-4,l=a-4;return{trackHeight:o,trackHeightSM:a,trackMinWidth:2*s+8,trackMinWidthSM:2*l+4,trackPadding:2,handleBg:r,handleSize:s,handleSizeSM:l,handleShadow:`0 2px 4px 0 ${new Ko.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:s/2,innerMaxMargin:s+2+4,innerMinMarginSM:l/2,innerMaxMarginSM:l+2+4}})),ia=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r{const{prefixCls:n,size:i,disabled:r,loading:o,className:a,rootClassName:s,style:l}=t,u=ia(t,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:c,direction:d,switch:f}=h.useContext(ne.E_),p=h.useContext(qo.Z),g=(null!=r?r:p)||o,m=c("switch",n),v=h.createElement("div",{className:`${m}-handle`},o&&h.createElement(Wo.Z,{className:`${m}-loading-icon`})),[y,w]=na(m),b=(0,ie.Z)(i),x=Lt()(null==f?void 0:f.className,{[`${m}-small`]:"small"===b,[`${m}-loading`]:o,[`${m}-rtl`]:"rtl"===d},a,s,w),S=Object.assign(Object.assign({},null==f?void 0:f.style),l);return y(h.createElement(Se.Z,{component:"Switch"},h.createElement(Xo,Object.assign({},u,{prefixCls:m,className:x,style:S,disabled:g,ref:e,loadingIcon:v}))))}));ra.__ANT_SWITCH=!0;var oa=ra,aa=n(35702),sa=n.n(aa),la=(0,h.forwardRef)((function(t,e){var n=t.use3d,i=t.width,r=t.height,o=t.callback,a=(t.showSaveButton,(0,h.useRef)()),s=(0,h.useRef)(),u=(0,h.useState)(!1),c=l()(u,2),d=c[0],f=c[1],p=(0,h.useRef)({id:a,appName:"graphing",width:i||1e3,height:r||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,h.useEffect)((function(){s.current=new(sa())(p.current,!0),window.onload=function(){s.current.inject("applet_container")}}),[]);var g=function(){var t=window.ggbApplet.getPNGBase64(1,!0,72);return o&&o(t),t};return(0,h.useEffect)((function(){p.current.appName=d?"3D":"graphing",s.current.inject("applet_container")}),[d]),(0,h.useEffect)((function(){f(n)}),[n]),(0,h.useImperativeHandle)(e,(function(){return{getImgData:g}})),(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:a}),(0,at.jsxs)(Q.Z,{align:"middle",children:[(0,at.jsx)(J.Z,{flex:1,children:(0,at.jsx)(oa,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:d,onChange:function(t){return f(t)}})}),(0,at.jsx)(J.Z,{children:(0,at.jsx)(K.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),ua=la,ca=n(34685),ha="link",da="upload-image",fa="add-flowchart",pa="draw-image",ga="code-block",ma="add-table",va="------------",ya={default:va,left:":".concat(va),center:":".concat(va,":"),right:"".concat(va,":")};var wa="@▁▁@",ba=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function xa(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var Sa,Pa=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ka=po()(po()({},Pa+"-B","bold"),Pa+"-I","italic"),Ca=po()(po()(po()(po()(po()(po()(po()(po()({},ha,"添加链接"),ga,"添加代码块"),da,"添加图片"),pa,"添加画图"),fa,"插入流程图"),ma,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),Aa=function(t){var e=t.defaultValue,n=void 0===e?"":e,i=t.onChange,r=t.width,o=void 0===r?"100%":r,a=t.height,s=void 0===a?400:a,u=t.miniToolbar,c=void 0!==u&&u,d=t.isFocus,f=void 0!==d&&d,p=t.watch,g=t.insertTemp,m=t.mode,v=void 0===m?"markdown":m,y=t.id,w=void 0===y?"markdown-editor-id":y,b=t.showResizeBar,x=void 0!==b&&b,S=t.noStorage,P=void 0!==S&&S,k=t.showNullButton,C=void 0!==k&&k,A=t.showNullProgramButton,M=void 0!==A&&A,E=t.hidetoolBar,L=void 0!==E&&E,T=t.fullScreen,N=void 0!==T&&T,j=t.onBlur,I=t.onCMBeforeChange,B=t.onFullScreen,O=t.className,D=void 0===O?"":O,R=t.disablePaste,F=void 0!==R&&R,z=t.disabled,G=void 0!==z&&z,_=t.disabledFill,Z=void 0!==_&&_,W=t.placeholder,V=void 0===W?"":W,Y=t.values,X=void 0===Y?"":Y,q=t.extraUse,K=(0,h.useState)(null),Q=l()(K,2),J=Q[0],$=Q[1],tt=(0,h.useState)(n),et=l()(tt,2),nt=et[0],it=et[1],rt=(0,h.useState)(p),ot=l()(rt,2),st=ot[0],lt=ot[1],ut=(0,h.useState)(N),ct=l()(ut,2),ht=ct[0],dt=ct[1],ft=(0,h.useState)(""),pt=l()(ft,2),gt=pt[0],mt=pt[1],vt=(0,h.useState)(0),yt=l()(vt,2),wt=yt[0],bt=yt[1],xt=(0,h.useState)(s),St=l()(xt,2),Pt=St[0],kt=St[1],Ct=(0,h.useState)(!1),Mt=l()(Ct,2),Et=(Mt[0],Mt[1]),Lt=(0,h.useState)(0),Tt=l()(Lt,2),Nt=Tt[0],jt=Tt[1],It=(0,h.useState)(0),Bt=l()(It,2),Ot=Bt[0],Dt=Bt[1],Rt=(0,h.useRef)(),Ft=(0,h.useRef)(),zt=(0,h.useRef)(),Gt=(0,h.useRef)();(0,h.useEffect)((function(){var t=window.scrollY||window.pageYOffset;it(X),null==J||J.setValue(X),window.scrollTo(0,t)}),[X]),(0,h.useEffect)((function(){null==B||B(ht)}),[ht]),(0,h.useEffect)((function(){if(Rt.current){var t=function(t,n){if(!F){var i=n.clipboardData;if(i){var r=i.types.toString(),o=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==v)return;try{var a,s=o[1];"file"===(null===(a=o[0])||void 0===a?void 0:a.kind)&&(s=o[0]);var l=s.getAsFile(),u=l.name.split(".").pop();(0,jo.I)(l,(function(t){var n,i,r;t.id?(null==l||null===(n=l.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection('','')):(null==l||null===(i=l.type)||void 0===i?void 0:i.indexOf("video"))>-1?e.replaceSelection('')):(null==l||null===(r=l.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?e.replaceSelection('').concat(l.name,"")):ba.includes(u)?e.replaceSelection('').concat(l.name,"")):e.replaceSelection("[".concat(l.name,"](/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){H.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},e=vo().fromTextArea(Rt.current,{mode:v,lineNumbers:!c,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return e.on("keyup",(function(t,n){8===n.keyCode&&(""==t.getValue()?e.setOption("placeholder",V):e.setOption("placeholder",null))})),e.on("keydown",(function(t,e){if(8===e.keyCode){var n=function(t,e){var n=t.getDoc(),i=n.getCursor(),r=n.getLine(i.line),o=r.charAt(i.ch-1),a=r.lastIndexOf("@▁@",i.ch),s=r.lastIndexOf("@▁▁@",i.ch),l=a>s?a:s,u=a>s?3:4;if(-1===wa.indexOf(o))return null;if(console.log("change1:",e,t,r,i,l,a,s,o),l>=0&&i.ch-l<5){var c=l+u;return n.replaceRange("",{line:i.line,ch:l},{line:i.line,ch:c}),{line:i.line,ch:c}}return null}(t);n&&e.preventDefault()}})),f&&e.focus(),e.on("paste",t),G&&e.on("beforeChange",(function(t,e){"paste"!==e.origin&&"+input"!==e.origin||e.cancel()})),$(e),function(){e.off("paste",t)}}}),[]);var Ut,Ht,_t,Zt=(0,h.useCallback)((function(){Ft.current}),[Pt,Ft,ht]);(0,h.useEffect)((function(){if(J){var t=function(){var t=new yo.Z((function(t){var e,n=At()(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(Zt(),J.setSize("100%","100%"),J.refresh())}}catch(t){n.e(t)}finally{n.f()}}));return t.observe(Rt.current.parentElement),t}();return function(){var e,n;null!==(e=Rt.current)&&void 0!==e&&e.parentElement&&t.unobserve(null===(n=Rt.current)||void 0===n?void 0:n.parentElement)}}}),[J,Zt]),(0,h.useEffect)((function(){if(J){for(var t=[],e=function(){var e=l()(i[n],2),r=e[0],o=e[1],a=po()({},r,(function(){Wt(o)}));t.push(a),J.addKeyMap(a)},n=0,i=Object.entries(ka);n0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(w);t>=wt+1e4&&(!e||e!==nt)&&(window.sessionStorage.setItem(w,nt),Et(!0))}},Ht=1e4,_t=(0,h.useRef)(),(0,h.useEffect)((function(){_t.current=Ut})),(0,h.useEffect)((function(){if(null!==Ht){var t=setInterval((function(){_t.current()}),Ht);return function(){return clearInterval(t)}}}),[Ht]),(0,h.useEffect)((function(){lt(p)}),[J,p]),(0,h.useEffect)((function(){J&&f&&J.focus()}),[J,f]),(0,h.useEffect)((function(){if(st&&J){var t=function(t){var e=t.target;if(Gt.current){var n=e.scrollTop/e.scrollHeight;Gt.current.scrollTop=Gt.current.scrollHeight*n}},e=J.getScrollerElement();return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[J,st]),(0,h.useEffect)((function(){if(J&&I){var t=function(t,e){I(t,e)};return J.on("beforeChange",t),function(){J.off("beforeChange",t)}}}),[J,I]),(0,h.useEffect)((function(){if(J&&j){var t=function(){j(J.getValue())};return J.on("blur",t),function(){J.off("blur",t)}}}),[J,j]),(0,h.useEffect)((function(){if(J){var t=function(t,e){var n=t.getValue();it(n),bt((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(M?i(n,Kt(n)):i(n))};return J.on("change",t),function(){J.off("change",t)}}}),[J,i]),(0,h.useEffect)((function(){if(J)if(null==n)J.setValue(""),it("");else{var t=window.scrollY||window.pageYOffset;n!==J.getValue()&&(J.setValue(n),it(n),J.setCursor(G?1:J.lineCount(),0),window.scrollTo(0,t))}}),[J,n]);var Wt=(0,h.useCallback)((function(t){var e=J.getCursor(),n=J.getSelection(),i=n.split("\n");switch(t){case"bold":return J.replaceSelection("**"+n+"**"),""===n&&J.setCursor(e.line,e.ch+2),J.focus();case"italic":return J.replaceSelection("*"+n+"*"),""===n&&J.setCursor(e.line,e.ch+1),J.focus();case"code":return J.replaceSelection("`"+n+"`"),""===n&&J.setCursor(e.line,e.ch+1),J.focus();case"inline-latex":return mt("inline-latex"),J.focus();case"latex":return J.replaceSelection("```latex\n"+n+"\n```"),J.setCursor(e.line+1,n.length+1),J.focus();case"line-break":return J.replaceSelection("
\n"),J.focus();case"list-ul":return""===n?J.replaceSelection("- "+n):J.replaceSelection(i.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),J.focus();case"list-ol":return""===n?J.replaceSelection("1. "+n):J.replaceSelection(i.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),J.focus();case"add-null-ch":return""===n&&J.setCursor(e.line,e.ch),J.replaceSelection("▁"),J.focus();case"add-signal":return""===n&&J.setCursor(e.line,e.ch),J.replaceSelection("@▁@"),J.focus();case"add-multiple":return""===n&&J.setCursor(e.line,e.ch),J.replaceSelection(wa),J.focus();case"inster-template-1":return""===n&&J.setCursor(e.line,e.ch),J.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),J.focus();case"eraser":return J.setValue(""),J.focus();case"trigger-watch":return lt(!st),J.focus();case"trigger-full-screen":return dt(!ht),J.focus();case ha:return void mt(ha);case ga:return void mt(ga);case da:return void mt(da);case pa:return void mt(pa);case"maths-latex":return void mt("maths-latex");case fa:return void mt(fa);case ma:return void mt(ma);default:throw new Error}}),[J,st,ht]),Vt=(0,h.useCallback)((function(t,e){var n,i,r,o,a;switch(mt(""),gt){case ha:var s=t.title,l=t.link;return J.replaceSelection("[".concat(s,"](").concat(l,")")),J.focus();case ga:var u=t.language,c=t.content;return J.replaceSelection(["```"+u,c,"```"].join("\n")),J.focus();case"maths-latex":for(var h=atob(t),d=new Uint8Array(h.length),f=0;f-1||null==v||!v.type?null!=v&&v.align||null!=v&&v.width?J.replaceSelection('

').concat(m||

')):J.replaceSelection('').concat(m||')):(null==v||null===(o=v.type)||void 0===o?void 0:o.indexOf("video"))>-1?J.replaceSelection('')):(null==v||null===(a=v.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?J.replaceSelection('').concat(v.name,"")):ba.includes(y)?J.replaceSelection('').concat(v.name,"")):J.replaceSelection("[".concat(v.name,"](").concat(g,")")),J.focus();case ma:for(var w=t.row,b=t.col,x=t.align,S="\n",P=0;P300&&(e=300),kt(s+e+"px")}},i=zt.current,r=!1,o=0;return i.addEventListener("mousedown",t),document.addEventListener("mousemove",n),document.addEventListener("mouseup",e),function(){i.removeEventListener("mousedown",t),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",e)}}}),[J,zt]),(0,h.useEffect)((function(){kt(s)}),[s]);var qt={width:xa(o),height:xa(Pt)},Kt=((0,h.useMemo)((function(){if(wt){var t=new Date(wt),e=t.getHours(),n=t.getMinutes(),i=t.getSeconds();return n=n<10?"0"+n:n,i=i<10?"0"+i:i,"".concat(e=e<10?"0"+e:e,":").concat(n,":").concat(i)}return 0}),[wt]),function(t){var e=[];if(M){t=t.replace(/(@▁▁@|@▁@)/g,(function(t,n,i){e.push({multiLine:!("@▁@"===t)})}))}return e});(0,h.useEffect)((function(){Ca[gt]&>!==pa&>!==fa&&setTimeout((function(){var t=document.getElementsByClassName("markdown-popup-form")[0],e=window.innerWidth/2-t.offsetWidth/2,n=window.innerHeight/2-t.offsetHeight/2;jt(e),Dt(n)}),0)}),[gt]);var Qt=function(t,e,n,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(t<20&&n>t||t>o-20&&ne||e>r-20&&i1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return!(!Na(t)||!ja(t,e,n,i,r))},Na=function(t){return!!(0,xt.bg)()||(t({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},ja=function(t){var e,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=(0,d.getDvaApp)()._store.getState(),a=o.user;return!(null===(e=a.userInfo)||void 0===e||!e.profile_completed)||(n?t({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:i,isCurrentPage:r}}):U.Z.confirm({title:"提示",width:530,centered:!0,content:"您需要去完善您的个人资料,才能使用此功能",okText:"立即完善",cancelText:"稍后完善",onOk:function(){(0,F.xg)("/account/profile/edit"),Ia()}}),!1)},Ia=function(){U.Z.success({title:"提示",width:430,closable:!0,centered:!0,content:"已完善个人资料?请刷新页面",okText:"立即刷新",icon:null,onOk:function(){location.reload()}})},Ba=function(t,e){return!!t||(U.Z.confirm({centered:!0,zIndex:1e4,width:530,title:"提示",content:(0,at.jsxs)("div",{children:[(0,at.jsx)("p",{children:e||"该实践资源需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。"}),(0,at.jsxs)("div",{style:{marginLeft:"110px"},children:[(0,at.jsx)("img",{src:"data:image/png;base64,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",width:200}),(0,at.jsxs)("div",{style:{marginLeft:"35px"},children:["群号:","714336072"]})]})]}),okText:"立即联系",cancelText:"取消",onOk:function(){(0,F.xg)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},Oa=n(26613),Da=n(93948),Ra={modal:"modal___EKlPQ",uploadWrap:"uploadWrap___YGxav",upload:"upload___ouqG9",uploadLink:"uploadLink___nuif6",fileProgress:"fileProgress___tf4qy",fileCancel:"fileCancel___Bh3Wh",videoName:"videoName___Ra0NM",contentItem:"contentItem___zMdIq","tagsList-content":"tagsList-content___sDVph"},Fa=n(93125),za=n.n(Fa),Ga="",Ua="";function Ha(t){!function(t){Sa=new(za().Vod)({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(e){console.log("addFileSuccess: "+e.file.name),t.addFileSuccess&&t.addFileSuccess(e),Sa.startUpload()},onUploadstarted:function(e){var n=e.file.name;if(e.videoId){var i="/api/users/".concat(Ga,"/video_auths.json");(0,it.ZP)(i,{method:"put",body:{video_id:e.videoId,title:n,file_name:n,virtual_classroom_id:Ua}}).then((function(n){if(-1!=n.status){var i=n.data,r=i.UploadAuth,o=i.UploadAddress;i.VideoId;Sa.setUploadAuthAndAddress(e,r,o)}else t.onUploadError&&t.onUploadError(e)})).catch((function(t){Sa.deleteFile(Sa._curIndex),Sa.nextUpload(),console.log(t)}))}else{var r="/api/users/".concat(Ga,"/video_auths.json"),o="";(0,it.ZP)(r,{method:"Post",body:{title:o+n,file_name:o+n,virtual_classroom_id:Ua}}).then((function(t){if(t){var n=t.data,i=n.UploadAuth,r=n.UploadAddress,o=n.VideoId;Sa.setUploadAuthAndAddress(e,i,r,o)}})).catch((function(t){Sa.deleteFile(Sa._curIndex),Sa.nextUpload(),console.log(t)})),console.log("文件开始上传...")}},onUploadSucceed:function(e){t.onUploadSucceed&&t.onUploadSucceed(e),console.log("文件上传成功!")},onUploadFailed:function(e,n,i){t.onUploadFailed&&t.onUploadFailed(e),console.log("文件上传失败!")},onUploadCanceled:function(t,e,n){console.log("文件上传已暂停!")},onUploadProgress:function(e,n,i){t.onUploadProgress&&t.onUploadProgress(e,n,i);Math.ceil(100*i);console.log("文件上传中...")},onUploadTokenExpired:function(t){console.log("文件上传超时!");var e="/api/users/".concat(Ga,"/video_auths.json");(0,it.ZP)(e,{method:"put",body:{video_id:t.videoId}}).then((function(t){var e=t.data.UploadAuth;Sa.resumeUploadWithAuth(e)})).catch((function(t){console.log(t)}))},onUploadEnd:function(e){t.onUploadEnd&&t.onUploadEnd(e),console.log("onUploadEnd: uploaded all the files")}}),t.gotUploader&&t.gotUploader(Sa)}(t)}var _a=n(70091),Za={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},Wa=n(7657),Va=function(t,e){return h.createElement(Wa.Z,(0,Tt.Z)({},t,{ref:e,icon:Za}))};var Ya=h.forwardRef(Va),Xa=n(19248),qa="img___BgL9D",Ka=function(t){var e=t.value,n=t.onChange,i=t.getFileProgress,r=(0,h.useState)(!1),o=l()(r,2),a=o[0],s=o[1],u=(0,at.jsx)(K.ZP,{loading:a,icon:(0,at.jsx)(Ya,{}),children:"选择上传文件"});return(0,at.jsx)(h.Fragment,{children:e?(0,at.jsxs)("div",{className:qa,children:[(0,at.jsx)("img",{src:fi.Z.API_SERVER+"/api/attachments/"+e,alt:"avatar",style:{width:288}}),(0,at.jsx)("div",{children:(0,at.jsx)(Xa.Z,{onClick:function(){return n("")},style:{fontSize:"16px",color:"red"}})})]}):(0,at.jsxs)("div",{children:[(0,at.jsx)(_a.Z,{withCredentials:!0,name:"file",showUploadList:!1,action:"".concat(fi.Z.API_SERVER,"/api/attachments.json"),onChange:function(t){if(i&&i(t),"uploading"!==t.file.status){if("done"===t.file.status){var e,r,o;if(s(!1),"done"===t.file.status&&-1===(null===(e=t.file)||void 0===e||null===(e=e.response)||void 0===e?void 0:e.status))return void H.ZP.error(null===(o=t.file)||void 0===o||null===(o=o.response)||void 0===o?void 0:o.message);n(null==t||null===(r=t.file)||void 0===r||null===(r=r.response)||void 0===r?void 0:r.id)}}else s(!0)},accept:"image/*",children:u}),(0,at.jsx)("div",{className:"mt20 c-light-black",children:"说明:支持上传jpg/png等格式文件,文件大小不能超过2M,建议使用288*158像素;"}),(0,at.jsx)("div",{className:"c-light-black",children:"如不上传,默认使用系统图片。"})]})})},Qa=rt.Z.TextArea,Ja=function(t,e){var n,i=(e.payload||{}).uploadInfo,r=void 0===i?{}:i;switch(e.type){case"addVideo":return{videoList:[].concat(Y()(t.videoList),[{name:r.file.name,size:r.file.size,type:r.file.type,fileHash:r.fileHash,state:r.state,videoId:r.videoId,loaded:r.loaded||0,title:""}])};case"removeVideo":return{videoList:t.videoList.filter((function(t){return t.name!==e.payload.name}))};case"removeAll":default:return{videoList:[]};case"updateProgress":return{videoList:t.videoList.map((function(t){return t.name===e.payload.uploadInfo.file.name?G()(G()({},t),{loaded:e.payload.progressPercent,videoId:r.videoId,fileHash:r.fileHash}):t}))};case"updateTitle":return{videoList:null===(n=t.videoList)||void 0===n?void 0:n.map((function(t){return t.name===e.payload.item.name?G()(G()({},t),{title:e.payload.title}):t}))}}},$a=(0,d.connect)((function(t){var e=t.user,n=t.loading;return{user:e,globalSetting:t.globalSetting,loading:n}}))((function(t){var e,n=t.user,i=(t.globalSetting,t.loading,t.dispatch,t.visible),o=t.editData,s=t.onCancel,u=void 0===s?function(){}:s,c=t.onOk,f=void 0===c?function(){}:c,p=t.queryParams,g=void 0===p?{}:p,m=((0,d.useParams)(),X.Z.useForm()),v=l()(m,1)[0],y=(0,h.useReducer)(Ja,{videoList:[]}),w=l()(y,2),b=w[0],x=w[1],S=(0,h.useState)(!1),P=l()(S,2),k=(P[0],P[1]),C=(0,h.useRef)(),A=(0,h.useState)(),M=l()(A,2),E=M[0],L=M[1],T=(0,h.useState)(!1),N=l()(T,2),j=N[0],I=N[1],B=(0,h.useState)(!1),O=l()(B,2),D=O[0],R=O[1],F=(0,xt.Ny)()?3:1;(0,h.useEffect)((function(){var t,e,n;i&&o&&(I(o.is_link),L(o.link),!o.is_link&&x({type:"addVideo",payload:{uploadInfo:{file:{name:o.filename||""},videoId:o.video_id,loaded:100}}}),st((null==o||null===(t=o.tags)||void 0===t?void 0:t.map((function(t){return null==t?void 0:t.name})))||[]),v.setFieldsValue({name:o.name,description:o.description,attachment_id:null==o||null===(e=o.video)||void 0===e?void 0:e.attachment_id,allow_skip:null==o||null===(n=o.video_item)||void 0===n?void 0:n.allow_skip}))}),[o,i]);var z,_,Z,W,V,q,K,Q=function(){document.getElementById("fileUpload").value=""},J=function(t){var e,i,r,o,a='{"Vod":{}}';(k(!0),C.current)?C.current.addFile(t,null,null,null,a):(i=null===(e=n.userInfo)||void 0===e?void 0:e.login,o={create:!C,addFileSuccess:function(t){x({type:"addVideo",payload:{uploadInfo:t}})},onUploadProgress:function(t,e,n){var i=Math.ceil(100*n);x({type:"updateProgress",payload:{uploadInfo:t,progressPercent:i}}),Q()},onUploadFailed:function(t){H.ZP.info("视频云服务出现异常,请重新上传。")},onUploadEnd:function(t){k(!1)},onUploadSucceed:function(t){k(!1)},onUploadError:function(t){k(!1)},gotUploader:function(e){e.addFile(t,null,null,null,a),C.current=e}},i&&(Ga=i),(r="")&&(Ua=r),Ha(o))},tt=function(){var t=a()(r()().mark((function t(){var e,n,i,o;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v.validateFields();case 2:if((j||null!==(e=b.videoList)&&void 0!==e&&e.length)&&(!j||E)){t.next=5;break}return H.ZP.info("请先上传视频或者添加外链"),t.abrupt("return");case 5:return R(!0),i=j?{link:E}:{video_id:null===(n=b.videoList)||void 0===n?void 0:n[0].videoId},t.next=9,f(G()(G()(G()({},i),g),{name:v.getFieldValue("name"),attachment_id:v.getFieldValue("attachment_id"),description:v.getFieldValue("description"),tags:v.getFieldValue("tag"),allow_skip:v.getFieldValue("allow_skip")}));case 9:o=t.sent,R(!1),o.id&&et();case 12:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),et=function(){v.resetFields(),x({type:"removeAll"}),L(null),st([]),I(null)},nt=(0,h.useState)([]),it=l()(nt,2),ot=it[0],st=it[1];return(0,at.jsx)(U.Z,{centered:!0,maskClosable:!1,destroyOnClose:!0,title:o?"编辑视频项目":"新建视频项目",width:740,className:Ra.modal,open:i,confirmLoading:D,onOk:tt,onCancel:function(){u(),et()},children:(0,at.jsxs)(X.Z,{form:v,children:[(0,at.jsx)("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:function(t){var e;I(!1);var n=t.target.files[0];if(n){var i=n.name.toLowerCase();return i&&-1==i.indexOf(".avi")&&-1==i.indexOf(".flv")&&-1==i.indexOf(".f4v")&&-1==i.indexOf(".m4v")&&-1==i.indexOf(".mov")&&-1==i.indexOf(".mp4")&&-1==i.indexOf(".rmvb")&&-1==i.indexOf(".swf")&&-1==i.indexOf(".webm")&&-1==i.indexOf(".wmv")?(H.ZP.info("不支持的视频格式"),void Q()):n.size>1024*F*1024*1024?(H.ZP.info("视频大小超过".concat(F,"G")),void Q()):null!==(e=b.videoList)&&void 0!==e&&e.find((function(t){return t.name===n.name}))?(H.ZP.info("你不能上传同一个视频文件名称,请重新选择。"),void Q()):void J(n)}Q()},accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}),(0,at.jsx)(X.Z.Item,{label:"项目名称",name:"name",rules:[{required:!0,message:"请输入项目名称"}],children:(0,at.jsx)(rt.Z,{maxLength:40,placeholder:"请输入不超过40字的项目名称"})}),(0,at.jsx)(X.Z.Item,{label:"项目内容",name:"content",className:Ra.contentItem,children:(0,at.jsxs)(at.Fragment,{children:[!j&&!(null===(z=b.videoList)||void 0===z||!z.length)&&(0,at.jsxs)("div",{className:Ra.fileProgress,children:[100==(null===(_=b.videoList)||void 0===_||null===(_=_[0])||void 0===_?void 0:_.loaded)?(0,at.jsx)("div",{className:"".concat(Ra.videoName," font14"),children:null===(Z=b.videoList)||void 0===Z||null===(Z=Z[0])||void 0===Z?void 0:Z.name}):(0,at.jsx)(Da.Z,{style:{width:"80%"},percent:null===(W=b.videoList)||void 0===W||null===(W=W[0])||void 0===W?void 0:W.loaded,status:100==(null===(V=b.videoList)||void 0===V||null===(V=V[0])||void 0===V?void 0:V.loaded)?"normal":"active"}),(0,at.jsx)("div",{className:Ra.fileCancel,onClick:function(){var t,e,n,i;return n=null===(t=b.videoList)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,i=100==(null===(e=b.videoList)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.loaded),void U.Z.confirm({title:"提示",centered:!0,okText:"确定",cancelText:"取消",content:(0,at.jsxs)("div",{className:"tc",children:["您确认要",i?"删除":"取消上传","该视频吗?"]}),onOk:function(){Q(),x({type:"removeVideo",payload:{name:n}})}})},children:100===(null===(q=b.videoList)||void 0===q||null===(q=q[0])||void 0===q?void 0:q.loaded)?"删除":"取消上传"})]}),!(null!==(K=b.videoList)&&void 0!==K&&K.length)&&(0,at.jsxs)("div",{className:Ra.uploadWrap,children:[(0,at.jsxs)("label",{htmlFor:"fileUpload",className:Ra.upload,children:[(0,at.jsx)("i",{className:"iconfont icon-shangchuanshipin1 mr5"}),"上传视频"]}),(0,at.jsxs)("label",{className:"".concat(Ra.upload," ").concat(Ra.uploadLink),onClick:function(){return I(!0)},children:[(0,at.jsx)("i",{className:"iconfont icon-lianjie1 mr5"}),"添加外链"]})]}),j&&(0,at.jsx)(rt.Z,{className:"mt5",placeholder:"请输入视频链接",value:E,onChange:function(t){return L(t.target.value)}})]})}),(0,at.jsx)(X.Z.Item,{name:"attachment_id",label:"上传封面图:",children:(0,at.jsx)(Ka,{getFileProgress:function(t){"uploading"!==t.file.status?"done"===t.file.status&&R(!1):R(!0)}})}),(0,at.jsx)(X.Z.Item,{label:"项目简介",name:"description",className:"ml8",children:(0,at.jsx)(Qa,{rows:5,maxLength:800,placeholder:"请输入本视频简介,最多不超过800字"})}),(0,at.jsx)(X.Z.Item,{label:"知识标签",name:"tag",className:"ml8",children:(0,at.jsx)(rt.Z,{onKeyUp:function(t){if("Enter"==t.key){var e=v.getFieldValue("tag");if(v.setFieldsValue({tag:""}),!e)return void H.ZP.info("标签不能为空");if(ot.filter((function(t){return t===e})).length>0)return void H.ZP.info("已有相同名称标签");ot.push(e),st(Y()(ot))}}})}),(0,at.jsx)(X.Z.Item,{label:"播放设置",name:"allow_skip",valuePropName:"checked",className:"ml8",initialValue:!0,children:(0,at.jsx)($.Z,{children:"允许快进播放"})}),(0,at.jsx)("div",{className:Ra["tagsList-content"],children:ot.map((function(t,e){return(0,at.jsx)(Oe,{closable:!0,onClose:function(e){!function(t,e){t.preventDefault(),st(Y()(ot.filter((function(t){return t!=e}))))}(e,t)},children:t},e+t)}))}),(0,at.jsxs)("div",{className:"c-grey-999",children:[(0,at.jsx)("div",{children:"注意:"}),(0,at.jsxs)("div",{children:["1、上传视频,即表示您已同意",(0,at.jsx)(d.Link,{to:"/users/".concat(null===(e=n.userInfo)||void 0===e?void 0:e.login,"/videos/protocol"),target:"_blank",className:Ra.colorBlue,children:"上传内容协议"}),",不得上传未经他人授权的作品;"]}),(0,at.jsxs)("div",{children:["2、不支持断点续传,文件大小请勿超过",F,"G;"]}),(0,at.jsx)("div",{children:"3、支持文件格式:avi、flv、f4v、m4v、mov、mp4、rmvb、swf、webm、wmv;"}),(0,at.jsx)("div",{children:"4、如果视频来自于外部链接,本网站不提供播放页面,无法提供统计数据。"})]})]})})}));function ts(t){return es.apply(this,arguments)}function es(){return(es=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,it.IV)("attachments/".concat(e,".json"));case 2:return n=t.sent,t.abrupt("return",0===n.status);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ns="  ";function is(t){if(0==t)return"0 Byte";var e=parseInt(""+Math.floor(Math.log(t)/Math.log(1024)),10);return(t/Math.pow(1024,e)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][e]}var rs={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},os=function(t,e){return h.createElement(Wa.Z,(0,Tt.Z)({},t,{ref:e,icon:rs}))};var as=h.forwardRef(os),ss=n(89392);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var ls=_a.Z.Dragger;function us(t){var e=[];return t&&t.length>0&&(e=t.map((function(t){return{uid:t.id,id:t.id,name:t.title+ns+t.filesize,url:t.url,filesize:t.filesize,status:"done",response:{id:t.id}}}))),e}var cs=function(t){var e=t.value,n=t.onChange,i=t.action,o=t.data,s=t.className,u=t.maxSize,c=void 0===u?150:u,d=t.title,f=void 0===d?"上传附件":d,p=t.showRemoveModal,g=void 0!==p&&p,m=t.accept,v=void 0===m?"":m,y=t.additionalText,w=t.isDragger,b=t.number,x=void 0===b?1e3:b,S=t.aloneClear,P=void 0!==S&&S,k=t.realTimeRemove,C=void 0===k||k,A=t.uploadText,M=t.setFileProgress,E=t.showFileProgress,L=(0,h.useState)(!1),T=l()(L,2),N=T[0],j=T[1],I=(0,h.useState)(e||[]),B=l()(I,2),O=B[0],D=B[1],R=(0,h.useState)(1),F=l()(R,2),z=F[0],_=F[1];(0,h.useEffect)((function(){e&&(1===z&&D(Y()(e)),_(2),x===(null==e?void 0:e.length)&&j(!0))}),[e]);var Z=function(){setTimeout((function(){O.pop(),D(Y()(O))}),500)};E&&M(O.some((function(t){return"uploading"===t.status})));var W,V={multiple:!0,disabled:N,accept:v,withCredentials:!0,fileList:O,beforeUpload:function(t,e){var n=t.size/1024/1024;return O.concat(e).length>x?(O.pop(),D(Y()(O)),H.ZP.error("最多只能上传".concat(x,"个文件")),P?Promise.reject():(Z(),!1)):n=x?j(!0):j(!1),D(Y()(O)),O=O.map((function(t){var e,n;null!=t&&null!==(e=t.response)&&void 0!==e&&e.id&&(t.url=null==t||null===(n=t.response)||void 0===n?void 0:n.url);return-1===t.name.indexOf(ns)&&(t.name="".concat(t.name).concat(ns).concat(is(t.size))),G()({},t)})),console.log("info:",t,O),n(O)):H.ZP.error(null===(i=t.file)||void 0===i||null===(i=i.response)||void 0===i?void 0:i.message)},onRemove:(W=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(C){t.next=2;break}return t.abrupt("return",!0);case 2:if(n=function(){var t=a()(r()().mark((function t(){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e.response?e.response.id:e.id)){t.next=8;break}return t.next=4,ts(e.response?e.response.id:e.uid);case 4:return n=t.sent,t.abrupt("return",Promise.resolve(n));case 8:return t.abrupt("return",!0);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),!g){t.next=7;break}return t.abrupt("return",new Promise((function(t,e){var i;U.Z.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:(0,at.jsx)("div",{className:"tc font16",children:"是否确认删除?"}),onOk:(i=a()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n();case 2:e.sent,H.ZP.success("删除成功"),t(!0);case 5:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)}),onCancel:function(){return t(!1)}})})));case 7:return t.next=9,n();case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t)}))),function(t){return W.apply(this,arguments)})};return(0,at.jsxs)("div",{className:"multi-upload ".concat(s||""),children:[w&&(0,at.jsxs)(ls,G()(G()({},V),{},{children:[(0,at.jsx)("p",{className:"ant-upload-drag-icon",children:(0,at.jsx)(as,{})}),(0,at.jsxs)("p",{className:"ant-upload-text",children:["点击上传图标,选择要上传的文件或将文件拖拽到此",(0,at.jsx)("br",{}),"(单个文件最大限制为",c,"MB)"," "]}),y]})),!w&&(0,at.jsxs)(_a.Z,G()(G()({},V),{},{children:[(0,at.jsxs)(K.ZP,{disabled:N,className:"upload_button",children:[(0,at.jsx)("img",{className:"aBtn_img",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4="}),f]}),(0,at.jsx)("span",{onClick:function(t){t.preventDefault(),t.stopPropagation()},className:"upload_text",children:A||"(单个文件最大".concat(c,"MB)")})]}))]})},hs=n(177),ds={tree:"tree___u23Lf",learn:"learn___gQiNJ",name:"name___1D14q",sign:"sign___Ki_95",pdf_name:"pdf_name___T3MPw",name_style:"name_style___nfuvC",color333:"color333___P8iqP",DirectoryTree:"DirectoryTree___umMQK",EditDom:"EditDom___Be0Pl"},fs=n(84105),ps=n(91454),gs="text___FxbAX",ms="wrap___UlBQ1",vs="contact____pUDq",ys="img___BapAv",ws=function(t){var e=t.type,n=t.style,i=(0,at.jsxs)("div",{className:ms,onClick:function(t){t.preventDefault(),t.stopPropagation()},children:[(0,at.jsxs)("p",{children:["shixun"===e||"paths"===e?"当前实践项目是高消耗类型的实验。":"当前试卷包含高消耗类型的实验。",(0,at.jsx)("br",{}),"根据平台使用规则,需要授权才能使用。","paths"===e?"发送到课堂":"发布","使用之前,请先联系平台管理员获取授权码。"]}),(0,at.jsxs)("div",{className:vs,children:[(0,at.jsx)("div",{className:ys,children:(0,at.jsx)("img",{src:La,width:"124px",height:"124px"})}),(0,at.jsx)("div",{className:"tc font14 mt10",style:{color:"#777A93"},children:"扫一扫,获取授权码"})]})]});return(0,at.jsx)(ps.Z,{content:i,children:(0,at.jsx)("span",{className:gs,style:n,children:"高消耗"})})},bs="data:image/png;base64,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",xs="data:image/png;base64,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",Ss=["pathsDetail","globalSetting","user","loading","updateSort","isPaths","dispatch","isShowSchedule","getData"],Ps=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(null==t?void 0:t.item_type){case"Challenge":return(0,at.jsx)(tt.Z,{title:"实战形式:任务关卡",children:(0,at.jsx)("i",{className:"iconfont icon-renwuguanka1 font20",style:{color:"#39B97E"}})});case"VideoItem":return(0,at.jsx)(tt.Z,{title:"教学视频",children:(0,at.jsx)("i",{className:"iconfont icon-shipin2 c-purple-8C1 font20"})});case"StageCatalog":return(0,at.jsx)("i",{className:"iconfont icon-kongbai c-brilliant-blue font20"});case"SubjectHomework":if("group"===(null==t?void 0:t.homework_type))return(0,at.jsx)(tt.Z,{title:"作业形式:分组作业",children:(0,at.jsx)("i",{className:"iconfont icon-fenzuzuoye3 font20",style:{color:"#acc218"}})});if("normal"===(null==t?void 0:t.homework_type))return(0,at.jsx)(tt.Z,{title:"作业形式:图文作业",children:(0,at.jsx)("i",{className:"iconfont icon-tuwenzuoye font20",style:{color:"#1db37f"}})});break;case"ExaminationBank":return(0,at.jsx)(tt.Z,{title:"测验形式:在线考试",children:(0,at.jsx)("i",{className:"iconfont icon-zhangjieceshibeifen font20",style:{color:"#e9a318"}})});case"HomeworkCommon":if("hack"===(null==t?void 0:t.homework_type))return(0,at.jsx)(tt.Z,{title:"作业形式:编程作业",children:(0,at.jsx)("i",{className:"iconfont icon-bianchengzuoye1 font20",style:{color:"#E99237"}})});break;case"Shixun":return null!=t&&t.is_all_choice?(0,at.jsx)(tt.Z,{title:"实战形式:选择题",children:(0,at.jsx)("i",{className:"iconfont icon-xuanzeti4 c-lake-blue font20"})}):null!=t&&t.is_unity_3d?(null==t||null===(e=t.challenge_types)||void 0===e?void 0:e.length)<=1?(0,at.jsx)(tt.Z,{title:"实战形式:虚拟仿真",children:(0,at.jsx)("i",{className:"iconfont icon-xunifangzhenti1 font20",style:{color:"#A504D8"}})}):(0,at.jsx)(tt.Z,{title:"实战形式:选择题+虚拟仿真",children:(0,at.jsx)("i",{className:"iconfont icon-rongheti1 font20",style:{color:"#44B7D7"}})}):(null==t||null===(n=t.challenge_types)||void 0===n?void 0:n.length)>1?(0,at.jsx)(tt.Z,{title:"实战形式:选择题+编程开发",children:(0,at.jsx)("i",{className:"iconfont icon-rongheti1 font20",style:{color:"#44B7D7"}})}):null!=t&&t.is_jupyter_lab?(0,at.jsx)(tt.Z,{title:"实战类型:JupyterLab",children:(0,at.jsx)("img",{width:20,src:bs})}):null!=t&&t.is_jupyter?(0,at.jsx)(tt.Z,{title:"实战类型:Jupyter Notebook",children:(0,at.jsx)("img",{width:20,src:xs})}):(0,at.jsx)(tt.Z,{title:"实战形式:编程开发",children:(0,at.jsx)("i",{className:"iconfont icon-shixunti2 c-light-primary font20"})});var e,n;default:return(0,at.jsx)(tt.Z,{title:"教学课件",children:(0,at.jsx)("i",{className:"iconfont icon-kejian1 c-cyan-blue font20"})})}},ks=(0,d.connect)((function(t){var e=t.pathsDetail,n=t.loading,i=t.user;return{pathsDetail:e,globalSetting:t.globalSetting,user:i,loading:n.effects}}))((function(t){var e=t.pathsDetail,n=(t.globalSetting,t.user),i=(t.loading,t.updateSort),o=(t.isPaths,t.dispatch),s=t.isShowSchedule,u=t.getData,f=c()(t,Ss),p=e.keywords,g=e.visibleType,m=void 0===g?"All":g,v=(0,h.useState)([]),y=l()(v,2),w=y[0],b=y[1],x=(0,h.useState)([]),S=l()(x,2),P=S[0],k=(S[1],(0,h.useState)([])),C=l()(k,2),A=C[0],M=C[1],E=(0,h.useState)([]),L=l()(E,2),T=(L[0],L[1],(0,h.useState)([])),N=l()(T,2),j=(N[0],N[1],(0,d.useParams)()),I=(0,h.useState)([]),B=l()(I,2),O=B[0],D=B[1],R=(0,h.useState)({}),z=l()(R,2),W=z[0],V=z[1],X=(0,h.useState)(!1),q=l()(X,2),K=q[0],$=q[1],et=(0,h.useRef)(!1);(0,h.useEffect)((function(){if(f.data&&!(0,ss.isEqual)(f.data,O)){P=[];var t=JSON.parse(JSON.stringify(f.data));ut(t,0),D(Y()(t)),null!=f&&f.expandAll||"All"!=m?b(Y()(P)):b([])}}),[f.data,m,null==f?void 0:f.expandAll]),(0,h.useEffect)((function(){console.log(888)}),[]),(0,h.useEffect)((function(){var t,n,i,r;if(null!==(t=e.detail)&&void 0!==t&&t.has_start){var o,a=null===(o=e.detail)||void 0===o||null===(o=o.courses)||void 0===o?void 0:o.findIndex((function(t){var e;return 1===parseInt(null===(e=t.course_status)||void 0===e?void 0:e.status)}));i=a>-1?a:0}else{var s,l,u=null===(s=e.detail)||void 0===s||null===(s=s.courses)||void 0===s||null===(s=s.map((function(t){var e;return parseInt(null===(e=t.course_status)||void 0===e?void 0:e.status)})))||void 0===s?void 0:s.lastIndexOf(2);i=u>-1?u:0,i=(u=null===(l=e.detail)||void 0===l||null===(l=l.courses)||void 0===l?void 0:l.findIndex((function(t){var e;return 0===parseInt(null===(e=t.course_status)||void 0===e?void 0:e.status)})))>-1?u:i}null!==(n=e.detail)&&void 0!==n&&n.courses&&V((null===(r=e.detail)||void 0===r?void 0:r.courses[i])||{})}),[e.detail]);var nt=function(){var t=a()(r()().mark((function t(e,n){var i,o,a=arguments;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=a.length>2&&void 0!==a[2]?a[2]:{},!n){t.next=7;break}return t.next=4,(0,Z.BK)({id:e,challenge_id:null==i?void 0:i.challenge_id,subject_id:j.pathId});case 4:t.t0=t.sent,t.next=10;break;case 7:return t.next=9,(0,Z.Ir)({id:e,challenge_id:null==i?void 0:i.challenge_id,subject_id:j.pathId});case 9:t.t0=t.sent;case 10:if(!(null!=(o=t.t0)&&o.game_identifier||null!=o&&o.identifier)){t.next=14;break}return(0,F.xg)(n?"/tasks/".concat(null==o?void 0:o.identifier,"/jupyter"):"/tasks/".concat(o.game_identifier,"?subject_id=").concat(j.pathId||"")),t.abrupt("return");case 14:-3===(null==o?void 0:o.status)?(0,F.eF)():2===(null==o?void 0:o.status)?it(null==o?void 0:o.message):3===(null==o?void 0:o.status)&&rt(null==o?void 0:o.message);case 15:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),it=function t(e){var n,i;e=null!==(n=e)&&void 0!==n&&n.includes(".json")?e:"".concat(e,".json"),U.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,at.jsx)("div",{className:"tc font16",children:"实训已经更新了,正在为您重置!"}),onOk:(i=a()(r()().mark((function n(){var i,o;return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Oa.L8)({url:e});case 2:if(i=n.sent){n.next=5;break}return n.abrupt("return");case 5:return H.ZP.success("重置成功,正在进入实践项目!"),n.next=8,(0,Z.Ir)({id:i.shixun_identifier});case 8:if(null==(o=n.sent)||!o.game_identifier){n.next=12;break}return(0,F.xg)("/tasks/".concat(o.game_identifier)),n.abrupt("return");case 12:2===(null==o?void 0:o.status)?t(null==o?void 0:o.message):3===(null==o?void 0:o.status)&&rt(null==o?void 0:o.message);case 13:case"end":return n.stop()}}),n)}))),function(){return i.apply(this,arguments)})})},rt=function(t){U.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,at.jsxs)("div",{className:"tc font16",children:["目前该实践项目尚在内测中,将于",t,"之后开放,谢谢!"]})})},ot=function(t){console.log("onDragEnter:",t)},st=function(){var t=a()(r()().mark((function t(e){var n,o,a,s,l,u,c,h,d,p,g,m,v,y;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("onDrop:",e),l=e.node.props.eventKey,u=e.dragNode.props.eventKey,c=e.node.props.pos.split("-"),h=e.dropPosition-Number(c[c.length-1]),!(c.length>3)||e.node.dragOverGapBottom||e.node.dragOverGapTop){t.next=7;break}return t.abrupt("return",!1);case 7:if(!(e.node.dragOver&&e.dragNodesKeys.length>1)){t.next=9;break}return t.abrupt("return",!1);case 9:if(!(c.length>2&&e.dragNodesKeys.length>1)){t.next=11;break}return t.abrupt("return",!1);case 11:if(!(d=["Attachment","Hack","Shixun","SubjectHomework","Videoltem"]).includes(null===(n=e.dragNode)||void 0===n?void 0:n.item_type)||"StageCatalog"==(null===(o=e.node)||void 0===o?void 0:o.item_type)||0!==h){t.next=14;break}return t.abrupt("return",!1);case 14:if("StageCatalog"!==(null===(a=e.dragNode)||void 0===a?void 0:a.item_type)||!d.includes(null===(s=e.node)||void 0===s?void 0:s.item_type)||0!==h){t.next=16;break}return t.abrupt("return",!1);case 16:return p=function t(e,n,i){for(var r=0;r0&&e.node.props.expanded&&1===h?p(g,l,(function(t){t.children=t.children||[],t.children.unshift(m)})):(p(g,l,(function(t,e,n){v=n,y=e})),-1===h?v.splice(y,0,m):v.splice(y+1,0,m)):p(g,l,(function(t){t.children=t.children||[],t.children.unshift(m)})),t.next=22,i({stage_id:f.stage_id,list:g});case 22:ut(g,0,0,!0),console.log("data:",g),D(Y()(g)),b([].concat(Y()(w),[e.node.key]));case 26:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ut=function t(e,n,i,r){n=n||0,e.map((function(e,o){try{var a;return e.key2=n+1+"-"+(o+1),e.key3=f.index+1+"-"+(o+1),e.title="",r||(e.key=n+1+"-"+(o+1)),e.index=n?i+"-"+(o+1):e.key3,null!==(a=e.children)&&void 0!==a&&a.length&&(P.push(e.key2),t(e.children,e.key2,e.index,r)),e}catch(t){}}))},ct=function(t){t=t||"";var e=new RegExp(p,"ig"),n=t.replace(e,'$&');return p?(0,at.jsx)("span",{dangerouslySetInnerHTML:{__html:n}}):t},ht=function(t){"All"===m&&(w.includes(t)?b(w.filter((function(e){return e!=t}))):b(w.concat(t)))};console.log(w,O,et.current,"openkeys");var dt=function(){var t=a()(r()().mark((function t(e,n){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Ta(o,!0)){t.next=2;break}return t.abrupt("return");case 2:if(null==e||!e.need_authorize){t.next=5;break}return Ba(!1),t.abrupt("return");case 5:return t.next=7,nt(e.identifier,e.is_jupyter||e.is_jupyter_lab,e);case 7:n(),null!=W&&W.course_id&&(0,lt.JS)({id:null==W?void 0:W.course_id});case 9:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),ft=function(){var t=a()(r()().mark((function t(i){var a,s,l,c,h,d;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Ta(o)){t.next=2;break}return t.abrupt("return");case 2:if(null!==(a=n.userInfo)&&void 0!==a&&a.admin||null!==(s=n.userInfo)&&void 0!==s&&s.business||i.can_view||"Attachment"===i.item_type){t.next=4;break}return t.abrupt("return",U.Z.info({centered:!0,width:400,okText:"知道啦",icon:null,content:(0,at.jsx)("div",{className:"tc font14",children:"当前视频为创建者所属单位内部教学资料,外单位用户无观看权限"})}));case 4:if(i.link&&(0,Ma.DH)({is_f:1,id:i.id,point:0,total:0}),h=null!=f&&f.course_id?"course_id=".concat(null==f?void 0:f.course_id):"subject_id=".concat(j.pathId||f.subject_id),".ZIP"!==(null==i||null===(l=i.name)||void 0===l?void 0:l.substr(null==i||null===(c=i.name)||void 0===c?void 0:c.lastIndexOf("."))).toUpperCase()){t.next=14;break}if(null!==(d=e.detail)&&void 0!==d&&d.allow_download){t.next=11;break}return H.ZP.info("教学课件不支持下载"),t.abrupt("return");case 11:(0,F.FH)(i.name,fi.Z.API_SERVER+i.url),t.next=15;break;case 14:(0,F.xg)(i.link||"/video/".concat(i.id,"?").concat(h));case 15:if("Attachment"!==i.item_type||2==i.complete_status){t.next=19;break}return t.next=18,(0,lt.rS)({attachment_id:i.id,status:2});case 18:t.sent;case 19:"Attachment"!==i.item_type&&"VideoItem"!==i.item_type||u({stage_id:f.stage_id});case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),pt=(0,h.useRef)(!1),gt=(0,h.useMemo)((function(){return(0,at.jsx)(_.Z,{spinning:!1,children:(0,at.jsx)(hs.Z,{className:ds.tree,disabled:f.disabled,expandedKeys:Y()(w),draggable:!0,onDragEnter:ot,onDrop:st,onExpand:ht,blockNode:!0,titleRender:function(t){var e,i,l,u,c,h,d,p,g,v=t;null==t||null===(e=t.learning_status)||void 0===e||e[0];return(0,at.jsxs)(Q.Z,{align:"middle",className:"font14",onClick:function(){return ht(v.key)},style:{flexWrap:"nowrap",whiteSpace:"nowrap"},onMouseOver:function(){return v.key,void(K||$(!0))},children:[(0,at.jsx)(J.Z,{flex:"30px",style:{display:"flex",alignItems:"center"},children:Ps(t)}),(0,at.jsxs)(J.Z,{flex:"1",className:ds.color333,style:{display:"flex",alignItems:"center",width:300},children:[f.cust_seq&&(0,at.jsxs)("span",{className:"".concat(ds.color333," mr10"),children:[" ",t.index," "]}),"Attachment"!==t.item_type&&(0,at.jsx)("div",{className:ds.name_style,children:(0,at.jsx)(tt.Z,{placement:"topLeft",title:t.name,children:(h=t,d=!1,p=h.learning_status,g=h.name,"can"===(null==p?void 0:p[0])&&"try"===(null==p?void 0:p[1])?(0,at.jsxs)("div",{className:ds.learn,children:[(0,at.jsx)("span",{className:ds.name,children:d?g:ct(g)}),(0,at.jsx)("span",{className:ds.sign,children:"免费试学"})]}):d?g:ct(g))})}),"Attachment"===t.item_type&&(0,at.jsx)("a",{target:"_blank",className:ds.pdf_name,title:t.name,onClick:a()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ta(o)){e.next=2;break}return e.abrupt("return");case 2:if(null==W||!W.course_id){e.next=6;break}return e.next=5,(0,lt.JS)({id:null==W?void 0:W.course_id});case 5:e.sent;case 6:e.t0=t.item_type,e.next="Attachment"===e.t0?9:"VideoItem"===e.t0?11:"ExaminationBank"===e.t0?13:"HomeworkCommon"===e.t0?15:"SubjectHomework"===e.t0?17:"Shixun"===e.t0?19:21;break;case 9:return ft(v),e.abrupt("break",21);case 11:case 13:case 15:return ft(t),e.abrupt("break",21);case 17:return("group"==t.homework_type||"normal"==t.homework_type)&&ft(t),e.abrupt("break",21);case 19:return dt(t),e.abrupt("break",21);case 21:case"end":return e.stop()}}),e)}))),children:t.name}),("Shixun"===t.item_type||"Challenge"===t.item_type)&&t.high_resources_consume&&(0,at.jsx)(ws,{type:"paths",style:{marginLeft:10}}),("Shixun"===t.item_type||"Challenge"===t.item_type)&&(null==t||null===(i=t.shixun_marks)||void 0===i?void 0:i.length)>0&&(1==(null==n||null===(l=n.userInfo)||void 0===l?void 0:l.role)||2==(null==n||null===(u=n.userInfo)||void 0===u?void 0:u.role))&&(null==t?void 0:t.shixun_marks.map((function(t,e){return(0,at.jsx)(tt.Z,{title:"".concat(t),children:(0,at.jsx)("span",{style:{background:"#43a2ff",color:"#fff",borderRadius:"13px",marginLeft:"5px",height:"20px",textAlign:"center",fontSize:"12px",maxWidth:"70px",padding:"0px 13px",overflow:"hidden",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",justifyContent:"center",textOverflow:"ellipsis"},children:t})},e)}))),!(null===(c=t.schools)||void 0===c||!c.length)&&(0,at.jsx)(tt.Z,{title:"该实践项目面向指定单位开放",children:(0,at.jsx)("i",{className:"iconfont icon-zhidinggongkai1 ml10 c-orange",style:{transform:"translateY(1px)",display:"inline-block"}})}),("Shixun"===t.item_type||"Challenge"===t.item_type)&&!(null==t||!t.finished_challenges_count)&&(0,at.jsx)(tt.Z,{title:"完成度:".concat(Math.round((null==t?void 0:t.finished_challenges_count)/(null==t?void 0:t.challenges_count)*100),"%"),children:(0,at.jsx)("i",{className:"iconfont icon-a-wanchengdu100 ml10 ".concat((null==t?void 0:t.finished_challenges_count)-(null==t?void 0:t.challenges_count)==0?"c-light-green":"c-grey-333"),style:{transform:"translateY(1px)",display:"inline-block"}})})]}),!f.disabled&&(0,at.jsx)("aside",{style:{color:"#0152d9",fontSize:"14px",marginRight:"20px"},children:"拖动可以改变项目显示顺序"}),(0,at.jsxs)(J.Z,{children:[f.disabled&&"暂未公开"===v.shixun_status&&(0,at.jsx)("span",{className:"".concat(ds.color204," ml5"),children:"暂未发布"}),"已删除"===v.shixun_status&&(0,at.jsx)("span",{className:"".concat(ds.color204," ml5"),children:"已删除"}),f.disabled&&!s&&("Shixun"===v.item_type||"Challenge"===v.item_type)&&!!v.challenges_count&&(0,at.jsxs)("span",{className:"experˆiment-number ml5 c-grey-999",children:[" 实验数 ","Challenge"===v.item_type?1:v.challenges_count," "]}),f.disabled&&s&&("Shixun"===v.item_type||"Challenge"===v.item_type)&&!!v.challenges_count&&"暂未公开"!==v.shixun_status&&"已删除"!==v.shixun_status&&(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)("i",{className:"iconfont icon-wanchenggouxuan font14",style:{marginLeft:"5px",color:v.finished_challenges_count===v.challenges_count?"#50DAAE":"#DEDEDE"}}),(0,at.jsxs)("span",{style:{marginLeft:"4px"},children:[(0,at.jsx)("span",{style:{color:"#165DFF",fontSize:"14px"},children:v.finished_challenges_count}),(0,at.jsxs)("span",{style:{color:"#DEDEDE",fontSize:"14px"},children:["/",v.challenges_count]})]})]}),f.disabled&&s&&("VideoItem"===v.item_type||"Attachment"===v.item_type)&&(0==v.complete_status?(0,at.jsx)("i",{className:"iconfont icon-weidianjixuexi font14",style:{color:"#DEDEDE"}}):1==v.complete_status?(0,at.jsx)("i",{className:"iconfont icon-yidianjixuexiweiwancheng font14",style:{color:"#50DAAE"}}):(0,at.jsx)("i",{className:"iconfont icon-xuexiwancheng font14",style:{color:"#50DAAE"}})),"All"===m&&"StageCatalog"===t.item_type&&(0,at.jsx)("span",{className:"ml10",children:w.includes(t.key)?(0,at.jsx)(fs.Z,{}):(0,at.jsx)(Mt.Z,{})})]})]})},treeData:O,loadedKeys:A,loadData:function(){var t=a()(r()().mark((function t(e){var n,i,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log(e,22),pt.current=!0,M(null==A?void 0:A.concat([e.key])),"StageCatalog"===e.item_type){t.next=5;break}return t.abrupt("return",pt.current=!1);case 5:return t.next=7,o({type:"pathsDetail/getStageChildrenData",payload:{id:e.stage_item_id}});case 7:n=t.sent,pt.current=!1,i=function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;return i.map((function(i){var r;return i.id==e.id?G()(G()({},i),{},{children:n.data.items}):G()(G()({},i),{},{children:(null==i||null===(r=i.children)||void 0===r?void 0:r.length)>0?t(i.children):[]})}))},a=i(),ut(a,0),D(Y()(a));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()})})}),[O,P,w,m,K,A]);return(0,at.jsx)(at.Fragment,{children:gt})})),Cs=["pathsDetail","user","globalSetting","loading","exercise","dispatch","classroomList","val","allData","index","visibleTypeNew","getData","selectExercise","openPreview","UpdataStageChildrenData"],As=["tagName"],Ms=["application/pdf","application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/ZIP"],Es=(0,d.connect)((function(t){var e=t.pathsDetail,n=t.user,i=t.loading,r=t.globalSetting,o=t.classroomList,a=t.exercise;return{pathsDetail:e,user:n,globalSetting:r,loading:i.effects,classroomList:o,exercise:a}}))((function(t){var e,n,i,o=t.pathsDetail,s=t.user,u=t.globalSetting,f=(t.loading,t.exercise,t.dispatch),p=(t.classroomList,t.val),g=t.allData,m=t.index,v=t.visibleTypeNew,y=t.getData,w=t.selectExercise,b=t.openPreview,x=t.UpdataStageChildrenData,S=(c()(t,Cs),X.Z.useForm()),P=l()(S,1)[0],k=(0,h.useState)(),C=l()(k,2),A=C[0],M=(C[1],X.Z.useForm()),E=l()(M,1)[0],L=X.Z.useForm(),T=l()(L,1)[0],N=X.Z.useForm(),j=l()(N,1)[0],I=(0,d.useParams)(),B=o.stageData,O=o.keywords,D=o.visibleType,R=void 0===D?"All":D,F=o.editKey,z=(0,h.useState)({}),Z=l()(z,2),V=Z[0],q=Z[1],$=(0,h.useRef)(),tt=(0,h.useState)(!1),et=l()(tt,2),nt=et[0],ot=et[1],st=(0,h.useState)(!1),ut=l()(st,2),ct=ut[0],ht=ut[1],dt=(0,h.useState)(!1),ft=l()(dt,2),pt=ft[0],gt=ft[1],mt=(0,h.useState)(!1),vt=l()(mt,2),yt=vt[0],wt=vt[1],bt=(0,h.useState)(!1),St=l()(bt,2),Pt=St[0],kt=St[1],Ct=(0,h.useState)(!1),Mt=l()(Ct,2),Et=Mt[0],Lt=Mt[1],Tt=(0,h.useState)(),Nt=l()(Tt,2),jt=Nt[0],It=Nt[1],Bt=(0,h.useState)(!1),Ot=l()(Bt,2),Dt=Ot[0],Rt=Ot[1],Ft=(0,h.useState)(!1),zt=l()(Ft,2),Gt=zt[0],Ut=zt[1],Ht=(0,h.useState)(""),_t=l()(Ht,2),Zt=_t[0],Wt=_t[1],Vt=(0,h.useState)(""),Yt=l()(Vt,2),Xt=Yt[0],qt=Yt[1],Kt=(0,h.useState)(""),Qt=l()(Kt,2),Jt=Qt[0],$t=Qt[1],te=(0,h.useState)(""),ee=l()(te,2),ne=ee[0],ie=ee[1],re=(0,h.useState)(),oe=l()(re,2),ae=oe[0],se=oe[1],le=(0,h.useState)(!0),ue=l()(le,2),ce=ue[0],he=(ue[1],(0,h.useState)([])),de=l()(he,2),fe=de[0],pe=de[1],we=(0,h.useState)(),be=l()(we,2),xe=be[0],Se=be[1],Pe=(0,h.useState)([]),ke=l()(Pe,2),Ce=ke[0],Ae=ke[1],Me=(null===(e=o.detail)||void 0===e?void 0:e.is_free)||(null===(n=o.detail)||void 0===n?void 0:n.can_learning);null!==(i=o.detail)&&void 0!==i&&i.can_managed;(0,h.useEffect)((function(){console.log(555)}),[]);var Ee=function(){var t=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,lt.Ex)(G()({},e));case 2:return n=t.sent,V.items=e.list,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Le=function(){var t=a()(r()().mark((function t(e){var n,i;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(xe){t.next=7;break}return t.next=3,(0,lt.A2)(G()({id:V.stage_id,subject_id:I.pathId},e));case 3:t.sent.id&&(kt(!1),x({stage_id:V.stage_id})),t.next=11;break;case 7:return t.next=9,(0,lt.M2)(G()(G()({id:null==xe?void 0:xe.id,subject_id:I.pathId},e),{},{video_id:(null==e?void 0:e.video_id)||(null==xe||null===(n=xe.video_item)||void 0===n?void 0:n.video_id),link:(null==e?void 0:e.link)||(null==xe||null===(i=xe.video_item)||void 0===i?void 0:i.link)}));case 9:t.sent&&(H.ZP.success("修改成功"),kt(!1),x({stage_id:V.stage_id}));case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Te=function(){var t=a()(r()().mark((function t(e){var n,i,o,a,s,l,u,h;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e&&e.name&&""!==(null==e?void 0:e.name.replace(/(^\s*)|(\s*$)/g,""))){t.next=2;break}return t.abrupt("return",H.ZP.info("请先输入章节名称!"));case 2:return o=[].concat(Y()((null==V||null===(n=V.shixuns_list)||void 0===n?void 0:n.map((function(t){return{type:t.item_type,id:t.id}})))||[]),Y()((null==V||null===(i=V.attachments_list)||void 0===i?void 0:i.map((function(t){return{type:"Attachment",id:t.id}})))||[])),a=e.tagName,s=c()(e,As),l=G()(G()({},s),{},{id:V.stage_id,type:Array.from(new Set(o.map((function(t){return t.type})))),list:o}),u=V.tag&&V.tag.id||"",l=G()(G()({},l),{},{stage_tag_attributes:u?{id:u,name:a}:{name:a||""}}),t.next=9,(0,lt.xn)(G()({},l));case 9:null!=(h=t.sent)&&h.subject_id&&x(G()(G()(G()({},V),h),{},{stage_name:l.name,stage_description:l.description,tag:l.stage_tag_attributes}));case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ne=function(t){var e;U.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"本操作将删除当前目录及下属子目录的全部内容,确认要删除吗?",onOk:(e=a()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,lt.WW)(t);case 2:0===e.sent.status&&(H.ZP.success("删除成功"),x({stage_id:p.stage_id||V.stage_id}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},je=function(){var t=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,lt.FD)({id:null==e?void 0:e.stage_item_id,type:null==e?void 0:e.homework_type});case 2:(n=t.sent)&&("HomeworkCommon"==(null==e?void 0:e.item_type)?$t(null==n?void 0:n.hack_homework):$t(null==n?void 0:n.subject_homework),Wt(null==e?void 0:e.item_type),qt(null==e?void 0:e.stage_item_id),Ut(!0));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Ie=function(){var t=a()(r()().mark((function t(e){var n,i,o,s,l,u;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("VideoItem"!==(null==e?void 0:e.item_type)){t.next=8;break}return t.next=3,(0,Ma.TJ)({id:null==e?void 0:e.stage_item_id});case 3:n=t.sent,Se(n),"VideoItem"===(null==e?void 0:e.item_type)?kt(!0):(Ae((null==n||null===(i=n.tags)||void 0===i?void 0:i.map((function(t){return null==t?void 0:t.name})))||[]),T.setFieldsValue({files:[{uid:null==n||null===(o=n.attachment)||void 0===o?void 0:o.id,name:null==n?void 0:n.name,response:{id:null==n||null===(s=n.attachment)||void 0===s?void 0:s.id}}]}),gt(!0)),t.next=9;break;case 8:"ExaminationBank"===(null==e?void 0:e.item_type)?d.history.push("/paperlibrary/add/".concat(null==e?void 0:e.id,"?defaultActiveKey=0&type=2&pageType=course&updateType=course&courseId=").concat(I.pathId,"&stageId=").concat(p.stage_id)):"HomeworkCommon"===(null==e?void 0:e.item_type)?d.history.push("/paths/".concat(I.pathId,"/").concat(V.stage_id,"/program_homework/").concat(null==e?void 0:e.id,"/edit")):"Attachment"===(null==e?void 0:e.item_type)?U.Z.confirm({title:"修改课件名称",icon:null,centered:!0,okText:"确认修改",cancelText:"取消",content:(0,at.jsx)(rt.Z,{value:l,onChange:function(t){l=t.target.value},placeholder:"请输入课件名称"}),onOk:function(){var t=a()(r()().mark((function t(){var n,i;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l){t.next=3;break}return H.ZP.info("名称不能为空"),t.abrupt("return",Promise.reject());case 3:return t.next=5,(0,it.ZP)("/api/attachments/".concat(null==e?void 0:e.id,".json"),{method:"put",body:{name:l+(null==e||null===(n=e.name)||void 0===n?void 0:n.substr(null==e||null===(i=e.name)||void 0===i?void 0:i.lastIndexOf(".")))}});case 5:t.sent,l="",x({stage_id:null==e?void 0:e.stage_id});case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}):"SubjectHomework"===(null==e?void 0:e.item_type)?f({type:"classroomList/setActionTabs",payload:{key:"group"==(null==e?void 0:e.homework_type)?"课程编辑分组作业":"课程编辑图文作业",id:null==e?void 0:e.stage_item_id,type:null==e?void 0:e.homework_type}}):U.Z.confirm({title:"修改小节名称",icon:null,centered:!0,okText:"确认修改",cancelText:"取消",content:(0,at.jsx)(rt.Z,{defaultValue:null==e?void 0:e.name,value:u,maxLength:40,onChange:function(t){console.log(t.target.value),u=t.target.value},placeholder:"请输入小节名称"}),onOk:function(){var t=a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((u||(null==e?void 0:e.name)).replaceAll(" ","")){t.next=3;break}return H.ZP.info("名称不能为空"),t.abrupt("return",Promise.reject());case 3:return t.next=5,(0,it.ZP)("/api/stages/".concat(null==e?void 0:e.stage_id,"/update_item_name.json"),{method:"put",body:{name:u||(null==e?void 0:e.name),item_id:null==e?void 0:e.id}});case 5:t.sent,u="",x({stage_id:null==e?void 0:e.stage_id});case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Be=function(){Te(P.getFieldsValue(),"edit")},De=function(t){var e,n,i=[];t.items&&null!==(e=t.items)&&void 0!==e&&e.length&&(null===(n=t.items)||void 0===n||n.forEach((function(t){var e;i.push(t),t.children&&null!==(e=t.children)&&void 0!==e&&e.length&&(i=i.concat(t.children))})));return!!i.find((function(t){return(0,ss.isEqual)(t.learning_status,["can","try"])}))?(0,at.jsx)("aside",{className:W.learn,children:"免费试学"}):null},Re=function(t,e){var n,i,l,c,h,p=(null==t?void 0:t.items)||[];console.log(p,"kdata");var m,b,S,k;"All"===R&&((null===(m=s.userInfo)||void 0===m?void 0:m.admin)||(null===(b=s.userInfo)||void 0===b?void 0:b.business)||null===(S=o.detail)||void 0===S||S.allow_statistics,null!==(k=o.detail)&&void 0!==k&&k.allow_add_member&&Me&&!nt&&(null==B||B.length));var C,M,L,N,O,D=function(){var n=a()(r()().mark((function n(i){return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:pe(i),null!=p&&p.length||!i.includes("".concat(e))||x({stage_id:t.stage_id||V.stage_id});case 2:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}();return(0,at.jsx)(_.Z,{spinning:!1,children:(0,at.jsx)(ge,{className:"mt20 ".concat(W.ChapterStyle),activeKey:fe,bordered:!1,expandIconPosition:"end",expandIcon:function(t){var e=t.isActive;return(0,at.jsx)("i",{className:"iconfont icon-zhankai1 fon14",style:{transform:"rotate(".concat(e?90:0,"deg) "),transition:".3s"}})},onChange:D,items:[{key:e,label:(0,at.jsxs)(Q.Z,{id:"Edit_".concat(e),wrap:!1,align:"middle",gutter:5,children:[(0,at.jsx)(J.Z,{children:(0,at.jsxs)("span",{className:"font18 blod c-3061d0",children:[t.stage_name||"第".concat(null==g?void 0:g.length,"章节"),De(t)]})}),t.tag&&t.tag.name&&(0,at.jsx)(J.Z,{children:(0,at.jsx)("span",{className:"".concat(W.tag),children:t.tag.name})})]}),children:(0,at.jsxs)(_.Z,{spinning:!1,children:[!nt&&(t.stage_description?(0,at.jsx)("aside",{className:"pl20 pr20",children:(0,at.jsx)("div",{ref:$,className:"".concat(W.introContent," ").concat(""),children:(0,at.jsx)(rn.Z,{value:null==t?void 0:t.stage_description})})}):0==(null==p?void 0:p.length)?(0,at.jsx)("div",{className:W.nodata,children:"暂无内容~"}):null),nt&&(0,at.jsxs)("div",{className:"pl20 pr20",children:[(0,at.jsx)(X.Z.Item,{name:"name",label:"名称",rules:[{required:!0,message:"章节名称不能为空"},{whitespace:!0,message:"不能输入空格"}],children:(0,at.jsx)(rt.Z,{size:"middle",maxLength:60,placeholder:"请输入第".concat(e+1,"章节名称,最大限制60个字符"),onBlur:Be})}),(0,at.jsx)(X.Z.Item,{name:"description",label:"描述",className:"ml10",children:(0,at.jsx)(Aa,{defaultValue:null==A?void 0:A.description,placeholder:"请输入第".concat(e+1,"章节描述"),height:300,onBlur:Be})}),(0,at.jsx)(X.Z.Item,{label:"标签",name:"tagName",rules:[{max:10,message:"标签不能超过10个字”"}],children:(0,at.jsx)(rt.Z,{placeholder:"请输入标签名称",onBlur:Be})}),(0,at.jsxs)("aside",{className:"mt20 mb20",children:[(0,at.jsx)(K.ZP,{size:"middle",style:{padding:"4px 11px"},ghost:!0,type:"primary",icon:(0,at.jsx)("i",{className:"iconfont icon-tianjiafangda mr5 "}),onClick:function(){if(null==V||!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&(wt(!0),j.resetFields())},children:"小节"}),(0,at.jsx)(me.Z,{placement:"bottomCenter",overlayClassName:W.dro,menu:{items:[{key:"1",label:"新建实践项目"},{key:"2",label:"选用实践项目"},{key:"3",label:"选用任务关卡"}],onClick:function(t){var e=t.key;t.keyPath,t.domEvent;if(!V.stage_id)return H.ZP.info("请先输入章节名称!");if("1"===e){if(!Ta(f)||!(0,xt.V9)()&&(U.Z.warning({centered:!0,width:530,title:"提示",content:(0,at.jsxs)("div",{className:"tc",style:{marginLeft:-38},children:[(0,at.jsx)("p",{children:"扫码加 助教,申请操作权限"}),(0,at.jsx)("img",{src:Ea,width:200})]}),okText:"我知道了",maskClosable:!0}),1))return;Lt(!1),ht(!0),E.setFieldsValue({name:"",is_jupyter:!1})}"2"===e&&f({type:"classroomList/setActionTabs",payload:{key:"选用实践项目",id:V.stage_id,subject_id:I.pathId}}),"3"===e&&f({type:"classroomList/setActionTabs",payload:{key:"选用实践项目",id:V.stage_id,subject_id:I.pathId,isMissionLevel:!0}})}},children:(0,at.jsxs)(K.ZP,{size:"middle",style:{marginLeft:15,padding:"4px 11px"},ghost:!0,type:"primary",children:[(0,at.jsx)("span",{className:"iconfont icon-tianjiafangda mr5"}),"实践项目"]})}),!(null!=u&&null!==(n=u.setting)&&void 0!==n&&n.is_local)&&(0,at.jsx)(at.Fragment,{children:(0,at.jsx)(me.Z,{placement:"bottomCenter",overlayClassName:W.dro,dropdownRender:function(){return(0,at.jsxs)(ve.Z,{children:[(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Se(""),kt(!0)},children:"新建视频项目"},3),(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&(It("视频项目"),Rt(!0),ie(V.stage_id))},children:"选用视频项目"},4)]})},children:(0,at.jsxs)(K.ZP,{size:"middle",style:{marginLeft:15,padding:"4px 11px"},ghost:!0,type:"primary",children:[(0,at.jsx)("span",{className:"iconfont icon-tianjiafangda mr5 "}),"视频项目"]})})}),(0,at.jsx)(me.Z,{placement:"bottomCenter",overlayClassName:W.dro,dropdownRender:function(){return(0,at.jsxs)(ve.Z,{children:[(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&(Se(""),Ae([]),Lt(!1),gt(!0),T.resetFields())},children:"新建教学课件"},5),(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&(It("教学课件"),Rt(!0),ie(V.stage_id))},children:"选用教学课件"},6)]})},children:(0,at.jsxs)(K.ZP,{size:"middle",style:{marginLeft:15,padding:"4px 11px"},ghost:!0,type:"primary",children:[(0,at.jsx)("span",{className:"iconfont icon-tianjiafangda mr5 "}),"教学课件"]})}),(0,at.jsx)(me.Z,{placement:"bottomCenter",overlayClassName:W.dro,dropdownRender:function(){return(0,at.jsxs)(ve.Z,{children:[(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&f({type:"classroomList/setActionTabs",payload:{key:"课程新建分组作业",id:V.stage_id,subject_id:I.pathId}})},children:"新建分组作业"},7),(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&f({type:"classroomList/setActionTabs",payload:{key:"课程新建图文作业",id:V.stage_id,subject_id:I.pathId}})},children:"新建图文作业"},8),(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&d.history.push("/paths/".concat(I.pathId,"/").concat(V.stage_id,"/program_homework/null/add"))},children:"新建编程作业"},9),(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&(It("分组作业"),Rt(!0),ie(V.stage_id))},children:"选用分组作业"},10),(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&(It("图文作业"),Rt(!0),ie(V.stage_id))},children:"选用图文作业"},11),(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&(It("编程作业"),Rt(!0),ie(V.stage_id))},children:"选用编程作业"},12)]})},children:(0,at.jsxs)(K.ZP,{size:"middle",style:{marginLeft:15,padding:"4px 11px"},ghost:!0,type:"primary",children:[(0,at.jsx)("span",{className:"iconfont icon-tianjiafangda mr5 "}),"作业"]})}),(0,at.jsx)(me.Z,{placement:"bottomCenter",overlayClassName:W.dro,dropdownRender:function(){return(0,at.jsxs)(ve.Z,{children:[(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){d.history.push("/paperlibrary/add?pageType=course&courseId=".concat(I.pathId,"&stageId=").concat(t.stage_id))},children:"新建试卷"},13),(0,at.jsx)(ve.Z.Item,{style:{textAlign:"center"},onClick:function(){if(!V.stage_id)return H.ZP.info("请先输入章节名称!");Ta(f)&&w(t)},children:"选用试卷"},14)]})},children:(0,at.jsxs)(K.ZP,{size:"middle",style:{marginLeft:15,padding:"4px 11px"},ghost:!0,type:"primary",children:[(0,at.jsx)("span",{className:"iconfont icon-tianjiafangda mr5 "}),"测验"]},e)}),(0,at.jsx)("br",{})]}),(0,at.jsxs)("aside",{className:"c-light-black mt10 pb20",children:["所有项目均可以通过拖动排序或升降级。",(0,at.jsx)("br",{}),"新建项目名称指本项目下没有实质内容,仅展示名称,不可点击。"]})]}),(0,at.jsx)("aside",{className:"".concat(null!=t&&t.stage_description?"mt10":""," ").concat(W.shixuns),children:!(null==p||!p.length)&&(0,at.jsx)(Fe,{visibleType:v,data:p,stage_id:t.stage_id,disabled:!nt,deleteStages:Ne,editVidoItem:Ie,showInfoModal:je,updateSort:Ee,index:e,expandAll:null==o||null===(i=o.detail)||void 0===i?void 0:i.show_course_section,cust_seq:!(null==o||null===(l=o.detail)||void 0===l||!l.cust_seq),showVideoPlay:(null===(c=s.userInfo)||void 0===c?void 0:c.admin)||(null===(h=s.userInfo)||void 0===h?void 0:h.business)||((null===(C=o.detail)||void 0===C||null===(C=C.courses)||void 0===C?void 0:C.length)>0?null===(M=o.detail)||void 0===M?void 0:M.allow_visit:!("学生"===(null===(L=s.userInfo)||void 0===L?void 0:L.user_identity)&&null!==(N=o.detail)&&void 0!==N&&N.allow_visit&&null!==(O=o.detail)&&void 0!==O&&O.courses)),isPaths:!0,isShowSchedule:o.isShowSchedule,getData:y})}),nt&&(0,at.jsxs)("aside",{className:W.buttons,children:[(0,at.jsx)(K.ZP,{onClick:function(){ot(!1),f({type:"pathsDetail/save",payload:{editKey:-1}}),f({type:"pathsDetail/getPathsDetail",payload:{id:I.pathId}})},type:"primary",size:"middle",ghost:!0,children:"取消"}),(0,at.jsx)(K.ZP,{onClick:a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:P.submit(),f({type:"pathsDetail/save",payload:{editKey:-1}}),f({type:"pathsDetail/getPathsDetail",payload:{id:I.pathId}});case 3:case"end":return t.stop()}}),t)}))),size:"middle",type:"primary",children:"保存"})]})]})}]})})},Fe=h.memo(ks);(0,h.useMemo)((function(){return console.log(V,"data1"),V?Re(V,m):null}),[V,O,v,R,ae,ce,fe,nt,F]);return(0,h.useEffect)((function(){q(G()({},p)),P.setFieldsValue(G()(G()({},p),{},{name:null==p?void 0:p.stage_name}))}),[p]),(0,h.useEffect)((function(){var t;if(F===m){ot(!0);var e=document.getElementById("Edit_".concat(F));e&&setTimeout((function(){return e.scrollIntoView({block:"start",behavior:"smooth"})}))}else ot(!1);pe(null==V||!V.limit_expansion||(null==V||null===(t=V.items)||void 0===t?void 0:t.length)>0||F===m?["".concat(m)]:[])}),[V,F]),(0,h.useEffect)((function(){if($.current){var t=function(){var t,e=new ResizeObserver((function(t){var e,n=At()(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;se(i.target.offsetHeight>=280)}}catch(t){n.e(t)}finally{n.f()}}));return e.observe(null===(t=$.current)||void 0===t?void 0:t.firstElementChild),e}();return function(){var e,n;(null===(e=$.current)||void 0===e?void 0:e.firstElementChild)&&t.unobserve(null===(n=$.current)||void 0===n?void 0:n.firstElementChild)}}}),[$.current,V]),(0,at.jsxs)("section",{children:[(0,at.jsx)(X.Z,{form:P,onFinish:Te,children:Re(V,m)}),(0,at.jsx)(U.Z,{centered:!0,title:"新建实践项目",open:ct,confirmLoading:Et,destroyOnClose:!0,onOk:a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:E.submit();case 1:case"end":return t.stop()}}),t)}))),onCancel:function(){ht(!1)},children:(0,at.jsxs)(X.Z,{form:E,initialValues:{name:"",is_jupyter:!1},onFinish:function(){var t=a()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Lt(!0),t.next=3,(0,lt.vf)(G()({id:V.stage_id,subject_id:I.pathId},e));case 3:t.sent.id&&(E.resetFields(),H.ZP.success("添加成功"),x(G()({},V)),ht(!1)),Lt(!1);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),children:[(0,at.jsx)(X.Z.Item,{label:"类型",name:"is_jupyter",rules:[{required:!0,message:"请选择类型"}],children:(0,at.jsxs)(ye.ZP.Group,{children:[(0,at.jsx)(ye.ZP,{value:!1,children:" 全栈实践项目 "}),(0,at.jsx)(ye.ZP,{value:!0,children:"Jupyter Notebook实践项目"})]})}),(0,at.jsx)(X.Z.Item,{label:"名称",name:"name",rules:[{required:!0,message:"请输入名称"},{whitespace:!0,message:"请勿输入空格"}],children:(0,at.jsx)(rt.Z,{showCount:!0,maxLength:60,placeholder:"请输入不超过60字的名称"})})]})}),(0,at.jsx)(U.Z,{centered:!0,title:xe?"编辑教学课件":"新建教学课件",open:pt,confirmLoading:Et,onCancel:function(){gt(!1),Ae([]),Se("")},destroyOnClose:!0,onOk:a()(r()().mark((function t(){var e,n,i,o,a,s;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=T.getFieldsValue(),Lt(!0),!(i=n.files.find((function(t){return!t.response||!t.response.id})))){t.next=6;break}return H.ZP.error("".concat(null==i?void 0:i.name," 文件上传失败,请重新上传")),t.abrupt("return");case 6:if(a=G()(G()({},n),{},{subject_id:I.pathId,tags:Ce,attachment_ids:null==n||null===(e=n.files)||void 0===e?void 0:e.map((function(t){return t.response.id}))}),xe){t.next=13;break}return t.next=10,(0,lt.s0)(G()(G()({},a),{},{id:V.stage_id}));case 10:o=t.sent,t.next=16;break;case 13:return t.next=15,(0,lt.M2)(G()(G()({},a),{},{id:null==xe?void 0:xe.id,attachment_id:null==a||null===(s=a.attachment_ids)||void 0===s?void 0:s[0]}));case 15:o=t.sent;case 16:0===o.status&&(H.ZP.success("修改成功"),gt(!1),x(G()({},V))),Lt(!1);case 18:case"end":return t.stop()}}),t)}))),children:(0,at.jsxs)(X.Z,{form:T,children:[(0,at.jsx)(X.Z.Item,{label:"课件内容",name:"files",rules:[{required:!0,message:"请上传课件内容"}],children:(0,at.jsx)(cs,{aloneClear:!0,maxSize:(0,xt.Ny)()?500:100,accept:Ms.toString(),number:xe?1:10})}),(0,at.jsx)(X.Z.Item,{style:{marginLeft:8},label:"知识标签",name:"tags",children:(0,at.jsx)(rt.Z,{onKeyUp:function(t){if("Enter"==t.key){var e=T.getFieldValue("tag");if(T.setFieldsValue({tag:""}),!e)return void H.ZP.info("标签不能为空");if(Ce.filter((function(t){return t===e})).length>0)return void H.ZP.info("已有相同名称标签");Ce.push(e),Ae(Y()(Ce))}}})}),(0,at.jsx)("div",{className:W["tagsList-content"],children:Ce.map((function(t,e){return(0,at.jsx)(Oe,{closable:!0,onClose:function(e){!function(t,e){t.preventDefault(),Ae(Y()(Ce.filter((function(t){return t!=e}))))}(e,t)},children:t},e+t)}))}),(0,at.jsxs)("div",{children:[(0,at.jsx)("span",{className:"c-red",children:"注意:"}),(0,at.jsx)("br",{}),"1、上传课件,即表示您已同意",(0,at.jsx)(d.Link,{to:"/users/mmipb3zhj/videos/protocol",target:"_blank",children:"上传内容协议"}),",不得上传未经他人授权的作品;",(0,at.jsx)("br",{}),"2、上传课件默认设置为不允许下载,若要开启下载功能,可进入课程编辑页面设置;",(0,at.jsx)("br",{}),"3、不支持断点续传,单个文件大小请勿超过",(0,xt.Ny)()?500:100,"M;",(0,at.jsx)("br",{}),"4、当前仅限支持pdf、word、excel、ppt、zip文件;",(0,at.jsx)("br",{}),"5、文件名将被自动读取为系统内该课件的名称,上传前请注意这一点;",(0,at.jsx)("br",{}),"6、一次最多上传10个文件。"]})]})}),(0,at.jsx)(U.Z,{centered:!0,title:"新建小节名称",open:yt,confirmLoading:Et,onOk:a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:j.submit();case 1:case"end":return t.stop()}}),t)}))),onCancel:function(){wt(!1),j.resetFields()},children:(0,at.jsx)(X.Z,{form:j,onFinish:function(){var t=a()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Lt(!0),t.next=3,(0,lt.Mt)(G()(G()({},e),{},{id:null==V?void 0:V.stage_id,subject_id:I.pathId}));case 3:0===t.sent.status&&(H.ZP.success("添加成功"),wt(!1),j.resetFields(),x(G()({},V))),Lt(!1);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),children:(0,at.jsx)(X.Z.Item,{label:"",name:"name",rules:[{required:!0,message:"请输入不超过40字的小节名称"},{whitespace:!0,message:"请勿输入空格"}],children:(0,at.jsx)(rt.Z,{showCount:!0,maxLength:40,placeholder:"请输入不超过40字的小节名称"})})})}),(0,at.jsx)($a,{visible:Pt,editData:xe,onCancel:function(){return kt(!1)},onOk:Le}),(0,at.jsx)(ho,{setScoreShow:Rt,getData:function(){x({stage_id:p.stage_id||V.stage_id})},id:ne,ScoreShow:Dt,modalType:jt,subjectId:I.pathId,openPreview:b}),(0,at.jsx)(mi,{setScoreShow:Ut,ScoreShow:Gt,homeType:Zt,homeId:Xt,modalDdata:Jt})]})})),Ls=(0,d.connect)((function(t){var e=t.shixunsDetail,n=t.loading;return{shixunsDetail:e,globalSetting:t.globalSetting,loading:n.models.index}}))((function(t){t.user;var e=t.onReplyDiscuss,n=t.dispatch,i=t.id,r=t.activeDiscussIndex,o=t.placeholder,a=(0,h.useState)(""),s=l()(a,2),u=s[0],c=s[1];var f=(0,d.useParams)();return(0,at.jsxs)("div",{className:"discuss-item-editor",style:{display:r===i?"block":"none",width:"100%"},children:[(0,at.jsx)(Aa,{miniToolbar:!0,startInit:r===i,defaultValue:u,id:i,noStorage:!0,watch:!1,height:155,placeholder:o||"我要回复",showResizeBar:!0,onChange:function(t){c(t)}}),(0,at.jsx)("a",{onClick:function(){u?(e(i,u),n({type:"pathsDetail/getPathsDetail",payload:{id:f.pathId}}),c("")):H.ZP.info("回复内容不能为空!")},className:"btn-send",children:"发送"})]},i)})),Ts=(0,d.connect)((function(t){var e=t.shixunsDetail,n=t.loading;return{shixunsDetail:e,globalSetting:t.globalSetting,loading:n.models.index}}))((function(t){var e=t.user,n=t.upDataList,i=(t.page,t.dispatch,t.keywords),o=(0,d.useParams)(),s=function(){var t=a()(r()().mark((function t(e,o){var a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,lt.WD)({id:e,content:o});case 2:0===(null==(a=t.sent)?void 0:a.status)&&n(1,i);case 4:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}();return(0,at.jsxs)("div",{className:"discuss-item-container bg-white",children:[(0,at.jsx)("a",{href:"/users/".concat(e.login),target:"_blank",children:(0,at.jsx)("img",{alt:"用户头像",height:"50",src:"".concat(fi.Z.IMG_SERVER,"/images/").concat(e.image_url),width:"50"})}),(0,at.jsx)("section",{children:(0,at.jsx)(Ls,{id:o.pathId,activeDiscussIndex:o.pathId,onReplyDiscuss:s,placeholder:"我要讨论"})})]})})),Ns="GET_DISCUSSES",js="SHOW_DISCUSSES_LOADING",Is="TOP_OR_DOWN_DISCUSS",Bs="PLUS_DISCUSS",Os="SET_ACTION_TYPE",Ds="SHOW_REWARD_DIALOG",Rs="CANCEL_REWARD_DIALOG",Fs="SET_REWARD",zs="ACTIVE_DISCUSS_INDEX";function Gs(t,e){return(0,it.v_)("/discusses/".concat(t,"/top_or_down_discuss.json"),{top:e})}function Us(t,e){return(0,it.v_)("/discusses/".concat(t,"/plus.json"),{container_type:"Discuss",type:e?1:0})}function Hs(t,e){return(0,it.v_)("/discusses/".concat(t,"/hidden.json"),e)}function _s(t,e){return(0,it.v_)("/discusses/".concat(t,"/reward_code.json"),e)}function Zs(t){return(0,it.ZP)("/api/discusses/".concat(t,".json"),{method:"delete"})}function Ws(t,e){return(0,it.v_)("/discusses/".concat(t,"/reply.json"),{container_type:"Shixun",content:e})}var Vs=n(1499);function Ys(t){var e=t.data,n=t.index,i=t.adminOrOperator,r=t.parentDiscussIndex,o=t.shixunIdentifier,a=(t.isDelete,t.user,t.onSetRewardData),s=t.onSetActionType,l=t.deleteCommentAlert,u=t.shixunName,c=t.keywords,h=e.author,d=(e.can_delete,e.manage),f=e.content,p=e.hidden,g=e.id,m=e.reward,v=e.time;return(0,at.jsxs)("div",{className:"second-level-discuss",children:[(0,at.jsxs)("div",{className:"discuss-info-body",style:{marginTop:"8px",marginBottom:"8px"},children:[(0,at.jsxs)("div",{className:"discuss-info",children:[(0,at.jsx)("a",{href:"/users/".concat(h.login),target:"_blank",children:h.name}),(0,at.jsx)("span",{className:"grey",children:v}),m?(0,at.jsxs)("a",{className:"c-orange gift",title:"已奖励金币".concat(m),children:[(0,at.jsx)("i",{className:"iconfont icon-gift c-orange "}),(0,at.jsx)("span",{children:m})]}):null]}),(0,at.jsxs)("div",{className:c?"hidden":"btn-group",style:{marginBottom:"0px"},children:[i?(0,at.jsx)("a",{onClick:function(){a({id:g,index:n,user_id:h.user_id,parentDiscussIndex:r})},title:"给TA奖励金币",children:(0,at.jsx)("i",{className:"iconfont icon-jiangli"})}):null,i?(0,at.jsx)("a",{onClick:function(){s({id:g,index:n,params:{hidden:p?"0":"1",container_identifier:o},type:"hidden-discuss",parentDiscussIndex:r,message:p?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:p?"取消隐藏":"隐藏评论",children:(0,at.jsx)("i",{className:p?"iconfont icon-yincangbiyan":"fa fa-eye"})}):null,d?(0,at.jsx)("a",{onClick:function(){l?U.Z.info({title:"提示",content:(0,at.jsxs)("div",{className:"tc",children:[" ","该条评论来自《",u,"》实践项目,您不是该实践项目的管理者,不能删除评论!"]}),onOk:function(){}}):s({id:g,index:n,type:"delete-discuss",parentDiscussIndex:r,message:"确定要删除该条回复吗"})},title:"删除",style:{minWidth:"unset"},children:(0,at.jsx)("i",{className:"iconfont icon-shanchu"})}):null]})]}),(0,at.jsx)(rn.Z,{className:"discuss-content",value:f,highlightKeywords:c})]})}var Xs=function(t){var e=t.data,n=t.index,i=t.shixunIdentifier,r=t.adminOrOperator,o=t.identity,a=(t.onTopOrDownDiscuss,t.onPlusDiscuss),s=t.onSetActionType,l=t.onSetRewardData,u=t.user,c=t.isDelete,h=t.activeDiscussIndex,d=t.onReplyDiscuss,f=t.onSetActiveDiscussIndex,p=t.keywords,g=e.content,m=e.children,v=e.game_url,y=e.hidden,w=e.id,b=e.position,x=e.praise_count,S=e.reward,P=(e.sticky,e.time),k=e.user_praise,C=e.game_passed,A=e.delete_comment_alert,M=e.author,E=e.shixun_name,L=e.manage;var T=function(t){var e=t.target,n=e.nodeName,i=e.src;"IMG"===n&&(Vs.Z.publish("preview-image",i),console.log("src:",i))};return(0,at.jsxs)("div",{className:"discuss-item-container",children:[(0,at.jsx)("a",{href:"/users/".concat(M.login),target:"_blank",children:(0,at.jsx)("img",{alt:"用户头像",height:"50",src:"".concat(fi.Z.IMG_SERVER,"/images/").concat(M.image_url),width:"50"})}),(0,at.jsxs)("section",{children:[(0,at.jsxs)("div",{className:"discuss-info",children:[(0,at.jsx)("a",{href:"/users/".concat(M.login),target:"_blank",children:M.name}),(0,at.jsx)("span",{className:"grey",children:P}),b?(0,at.jsxs)("span",{className:"c-green",children:[" [第",b,"关] "]}):null,v?(0,at.jsx)("a",{href:v,target:"_blank",className:"view-code",title:"点击查看TA的代码页面",children:"查看"}):null,S?(0,at.jsxs)("a",{className:"c-orange gift",title:"已奖励金币".concat(S),children:[(0,at.jsx)("i",{className:"iconfont icon-gift c-orange "}),(0,at.jsx)("span",{children:S})]}):null,o<=5?(0,at.jsx)("span",{style:{flex:"1",textAlign:"right",color:1===C?"#29bd8b":""},children:C||0===C?1===C?"已通关":"未通关":""}):null]}),(0,at.jsx)("div",{onClick:T,children:(0,at.jsx)(rn.Z,{className:"discuss-content",value:g,highlightKeywords:p})}),m&&m.length>0?(0,at.jsx)("div",{className:"reply-discuss-container",onClick:T,children:m.map((function(t,e){return(0,at.jsx)(Ys,{data:t,index:e,deleteCommentAlert:A,shixunName:E,shixunIdentifier:i,adminOrOperator:r,user:u,isDelete:c,onSetRewardData:l,onSetActionType:s,parentDiscussIndex:n,keywords:p},t.id)}))}):null,(0,at.jsxs)("div",{className:p?"hidden":"btn-group",children:[r?(0,at.jsx)("a",{onClick:function(){l({id:w,index:n,user_id:M.user_id})},title:"给TA奖励金币",children:(0,at.jsx)("i",{className:"iconfont icon-jiangli"})}):null,r?(0,at.jsx)("a",{onClick:function(){s({id:w,index:n,params:{hidden:y?"0":"1",container_identifier:i},type:"hidden-discuss",message:y?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:y?"取消隐藏":"隐藏评论",children:(0,at.jsx)("i",{className:y?"iconfont icon-yincangbiyan":"fa fa-eye"})}):null,L&&(!m||0==m.length)&&(0,at.jsx)("a",{onClick:function(){A?U.Z.info({title:"提示",content:(0,at.jsxs)("div",{className:"tc",children:[" ","该条评论来自《",E,"》实践项目,您不是该实践项目的管理者,不能删除评论!"]}),onOk:function(){}}):s({id:w,index:n,type:"delete-discuss",message:"确定要删除该条回复吗"})},title:"删除",children:(0,at.jsx)("i",{className:"iconfont icon-shanchu"})}),(0,at.jsx)("a",{onClick:function(){f(w)},title:"回复",children:(0,at.jsx)("i",{className:"iconfont icon-huifu1"})}),(0,at.jsxs)("a",{onClick:function(){a(w,!k,n)},style:{whiteSpace:"nowrap"},className:k?"c-orange":"",children:[(0,at.jsx)("i",{className:k?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),(0,at.jsx)("span",{children:x||""})]})]}),(0,at.jsx)(Ls,{id:w,activeDiscussIndex:h,onReplyDiscuss:d})]})]},w)},qs={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function Ks(t,e){switch(e.type){case js:return G()(G()({},t),{},{loading:!0});case Ds:return G()(G()({},t),{},{showRewardDialog:!0});case Rs:return G()(G()({},t),{},{showRewardDialog:!1});case Ns:case Is:case Bs:case Os:case Fs:case zs:return G()(G()({},t),e.payload);default:throw new Error}}var Qs=function(t){var e=t.shixunIdentifier,n=t.identity,i=t.activeIndex,o=t.user,s=(t.isShixunDetail,t.isDelete),u=t.keywords,c=t.refreshCount,f=(0,h.useReducer)(Ks,qs),p=l()(f,2),g=p[0],m=p[1],v=g.page,y=g.loading,w=g.data,b=g.actionType,x=g.showRewardDialog,S=g.activeDiscussIndex,P=(0,h.useRef)(),k=(0,h.useRef)(),C=(0,d.useParams)();function A(t){return M.apply(this,arguments)}function M(){return(M=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!y){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,m({type:js}),t.next=6,(0,lt.Ax)(G()(G()({},C),{},{page:e,keywords:u}));case 6:n=t.sent,m({type:Ns,payload:{activeDiscussIndex:null,page:e,data:n,loading:!1}}),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(2),console.log(t.t0);case 13:case"end":return t.stop()}}),t,null,[[2,10]])})))).apply(this,arguments)}function E(t){document.body.scrollIntoView(),A(t)}function L(t,e,n){return T.apply(this,arguments)}function T(){return(T=a()(r()().mark((function t(e,n,i){var o;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Us(e,n);case 3:o=t.sent,Z[i].user_praise=n,Z[i].praise_count=o.praise_count,m({type:Bs,payload:{data:G()(G()({},w),{},{comments:Z})}}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))).apply(this,arguments)}function N(t,e,n){return j.apply(this,arguments)}function j(){return(j=a()(r()().mark((function t(e,n,i){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Gs(e,n);case 3:Z[i].sticky=n,m({type:Is,payload:{data:G()(G()({},w),{},{comments:Z})}}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}function I(){return I=a()(r()().mark((function t(){var e,n,i,o,a,s,l,u;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=b.id,n=b.params,i=b.type,o=b.index,a=b.parentDiscussIndex,"hidden-discuss"!==i){t.next=6;break}return t.next=4,Hs(e,n);case 4:a?Z[a].children[o].hidden=1==n.hidden:Z[o].hidden=1==n.hidden,m({type:Os,payload:{actionType:null,data:G()(G()({},w),{},{comments:Z})}});case 6:if("delete-discuss"!==i){t.next=32;break}return t.next=9,Zs(e);case 9:if(!a&&0!==a){t.next=22;break}s=Z[a].children,l=s.length-1;case 12:if(!(l>=0)){t.next=19;break}if(s[l].id!==e){t.next=16;break}return s.splice(l,1),t.abrupt("break",19);case 16:l--,t.next=12;break;case 19:Z[a].children=s,t.next=30;break;case 22:u=Z.length-1;case 23:if(!(u>=0)){t.next=30;break}if(Z[u].id!==e){t.next=27;break}return Z.splice(u,1),t.abrupt("break",30);case 27:u--,t.next=23;break;case 30:m({type:Os,payload:{actionType:null,data:G()(G()({},w),{},{comments:Z})}}),c();case 32:case"end":return t.stop()}}),t)}))),I.apply(this,arguments)}function B(t){m({type:Os,payload:{actionType:t}})}function O(){return(O=a()(r()().mark((function t(){var e,n,i,o,a,s,l;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=P.current,n=e.id,i=e.index,o=e.score,a=e.user_id,s=e.parentDiscussIndex,t.next=3,_s(n,{container_type:"Discusses",score:o,user_id:a});case 3:l=t.sent,s?Z[s].children[i].reward=l.code:Z[i].reward=l.code,m({type:Fs,payload:{showRewardDialog:!1,data:G()(G()({},w),{},{comments:Z})}}),P.current=null;case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t){P.current=t,m({type:Ds})}function R(t,e){return F.apply(this,arguments)}function F(){return(F=a()(r()().mark((function t(e,n){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Ws(e,n);case 3:A(v),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log(t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function z(t){m(S===t?{type:zs,payload:{activeDiscussIndex:null}}:{type:zs,payload:{activeDiscussIndex:t}})}if((0,h.useEffect)((function(){function t(){return(t=a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(3!==i||w||!e){t.next=3;break}return t.next=3,A(v);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[C.pathId,u]),(0,h.useEffect)((function(){A(v)}),[u]),!w)return(0,at.jsx)(_.Z,{spinning:!0,children:(0,at.jsx)("div",{style:{height:"300px",width:"100%"}})});var H=w.disscuss_count,Z=w.comments,W=(w.all,w.can_hidden);return(0,at.jsxs)(h.Fragment,{children:[(0,at.jsxs)("div",{className:"discuss-container",ref:k,children:[0===H?(0,at.jsx)(Ve.Z,{}):null,(0,xt.bg)()&&!u&&(0,at.jsx)(Ts,{upDataList:A,page:v,user:o,keywords:u}),(0,at.jsx)("aside",{className:"bg-white",children:null==Z?void 0:Z.map((function(t,i){return(0,at.jsx)(Xs,{user:o,data:t,index:i,identity:n,onPaginationChange:E,shixunIdentifier:e,isDelete:s,onSetActionType:B,onTopOrDownDiscuss:N,adminOrOperator:W,onPlusDiscuss:L,onSetRewardData:D,activeDiscussIndex:S,onSetActiveDiscussIndex:z,onReplyDiscuss:R,keywords:u},t.id)}))}),H>10?(0,at.jsx)("div",{className:"pagination-container tc",children:(0,at.jsx)(nt.Z,{showQuickJumper:!0,showSizeChanger:!1,onChange:E,current:v,total:H})}):null]}),(0,at.jsxs)(ko,{children:[(0,at.jsx)(U.Z,{centered:!0,title:"提示",open:!!b,onOk:function(){return I.apply(this,arguments)},onCancel:function(){m({type:Os,payload:{actionType:null}})},children:(0,at.jsx)("p",{children:b?b.message:""})}),(0,at.jsx)(U.Z,{centered:!0,width:400,title:"奖励设置",open:x,onCancel:function(){m({type:Rs})},onOk:function(){return O.apply(this,arguments)},children:(0,at.jsx)(Uo.Z,{placeholder:"请输入奖励的金币数量",min:1,onChange:function(t){P.current.score=t},style:{width:"228px"}})})]})]})},Js="scoremodal___YNtb3",$s="wrap___BauIT",tl="wrap_title___ZWoHv",el="radioWrap___Jh9vt",nl="radio___Ydt8R",il="colorFF0000___JOb5w",rl="pagination___d1fv4",ol="search___Pjuzg",al="searchIcon___v01bz",sl="orangeColor___U5vU6",ll="redColor___qYa6X",ul="statustitle___pTBLm",cl="statusbody___qUPQx",hl="flex___VtL45",dl=function(t){var e=t.type,n=t.resdata,i=t.onok,o=t.oktext,s=t.okloading,u=(0,h.useState)(!1),c=l()(u,2),d=c[0],f=c[1],p=n.can_copy_list,g=n.can_copy_num,m=n.challenge_type,v=(n.course_data_list,n.no_copy_list),y=n.no_copy_num,w=n.no_use_list,b=(n.no_use_num,n.repeat_shixun_num,n.student_count),x=(n.total_num,n.use_num),S=g>0||"exercise"===e;(0,h.useEffect)((function(){(null==n?void 0:n.student_count)>0&&f(!0)}),[n]),console.log("---11",s),(0,h.useEffect)((function(){s||f(!1)}),[s]);return(0,at.jsx)(U.Z,{open:d,onCancel:function(){f(!1)},cancelText:"取消",title:"提示",width:700,centered:!0,cancelButtonProps:{style:{display:!S&&"none"}},zIndex:1003,confirmLoading:s,okText:S?o:"我知道了",onOk:a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!S){t.next=5;break}return t.next=3,i([].concat(Y()(p),Y()(w)));case 3:t.next=6;break;case 5:f(!1);case 6:case"end":return t.stop()}}),t)}))),children:(0,at.jsxs)("div",{style:{maxHeight:600,overflow:"auto"},children:["exercise"===e&&1===m?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:sl,children:b}),"名学生已在其他考试中挑战过其中的",(0,at.jsx)("span",{className:sl,children:x}),"个实践项目,",(0,at.jsx)("span",{className:ll,children:"重复发送会导致这部分学生无法作答已挑战过的实训题。"})]}):"exercise"===e&&2===m?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:sl,children:b}),"名学生已在课堂实验中挑战过其中的",(0,at.jsx)("span",{className:sl,children:x}),"个实践项目,且作业已开启“作业截止后不允许学生编辑代码”设置项,",(0,at.jsx)("span",{className:ll,children:"重复发布会导致这部分学生无法再提交作业。"})]}):"shixun"===e&&1===m?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:sl,children:b}),"名学生已在考试中挑战过该实践项目,",(0,at.jsx)("span",{className:ll,children:"重复发送会导致这部分学生无法再提交作业。"})]}):"shixun"===e&&2===m?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:sl,children:b}),"名学生已在课堂实验中挑战过该实践项目,且作业已开启“作业截止后不允许学生编辑代码”设置项,",(0,at.jsx)("span",{className:ll,children:"重复发送会导致这部分学生无法再提交作业。"})]}):"subject"===e&&1===m?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:sl,children:b}),"名学生已在考试中挑战过其中的",(0,at.jsx)("span",{className:sl,children:x}),"个实践项目,",(0,at.jsx)("span",{className:ll,children:"重复发送会导致这部分学生无法再提交作业。"})]}):"subject"===e&&2===m?(0,at.jsxs)(at.Fragment,{children:["课堂内有 ",(0,at.jsx)("span",{className:sl,children:b})," 名学生已在课堂实验挑战过其中的 ",(0,at.jsx)("span",{className:sl,children:x})," 个实践项目,且作业已开启“作业截止后不允许学生编辑代码”设置项,",(0,at.jsx)("span",{className:ll,children:"重复发送会导致这部分学生无法再提交作业。"})]}):"exercisepush"===e?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:sl,children:b}),"名学生已在其他考试中挑战过试卷中的",(0,at.jsx)("span",{className:sl,children:x}),"个实践项目 ,",(0,at.jsx)("span",{className:ll,children:"重复发布会导致这部分学生无法在当前考试中进行作答。"})]}):"shixunpush"===e&&1===m?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:sl,children:b}),"名学生已在考试中挑战过其中的",(0,at.jsx)("span",{className:sl,children:x}),"个实践项目,",(0,at.jsx)("span",{className:ll,children:"重复发布会导致这部分学生无法再提交作业。"})]}):"shixunpush"===e&&2===m?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:sl,children:b}),"名学生已在课堂实验中挑战过",(0,at.jsx)("span",{className:sl,children:x}),"个实践项目,且作业已开启“作业截止后不允许学生编辑代码”设置项,",(0,at.jsx)("span",{className:ll,children:"重复发布会导致这部分学生无法再提交作业。"})]}):void 0,"exercise"===e||"subject"===e||"exercisepush"===e||"shixunpush"===e?(0,at.jsxs)("div",{style:{marginTop:20},children:[y>0&&(0,at.jsxs)("div",{children:[(0,at.jsxs)("span",{className:hl,children:[(0,at.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",style:{width:14}}),(0,at.jsx)("span",{className:ul,children:"不支持复制的实践项目"})]}),(0,at.jsxs)("div",{className:cl,children:["exercise"===e&&(0,at.jsxs)("div",{style:{marginBottom:15},children:["没有复制权限的实践项目,",(0,at.jsx)("span",{className:ll,children:"以下试题将不会被发送至课堂中。"}),"您也可以联系项目创建者开启复制权限或者联系平台教研助理进行协助。"]}),("subject"===e||"exercisepush"===e)&&(0,at.jsxs)("div",{style:{marginBottom:15},children:["没有复制权限的实践项目,",S&&(0,at.jsx)("span",{className:ll,children:"一键复制不会复制此部分项目。"}),"您可以联系项目创建者开启复制权限或者联系平台教研助理进行协助。"]}),"shixunpush"===e&&(0,at.jsxs)("div",{style:{marginBottom:15},children:["没有复制权限的实践项目,",S&&(0,at.jsx)("span",{className:ll,children:"一键复制不会复制此部分项目。"}),"建议您重新选择实践项目再发布作业,也可联系项目创建者开启复制权限或联系平台教研助理进行协助。"]}),(0,at.jsx)("div",{children:null==v?void 0:v.map((function(t,e){return(0,at.jsxs)("a",{href:"/shixuns/".concat(t.identifier,"/challenges"),target:"_blank",children:["《",null==t?void 0:t.name,"》",e+1!==y&&"、"]})}))})]})]}),g>0&&(0,at.jsxs)("div",{style:{marginTop:20},children:[(0,at.jsxs)("span",{className:hl,children:[(0,at.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",style:{width:14}}),(0,at.jsx)("span",{className:ul,children:"支持复制的实践项目"})]}),(0,at.jsxs)("div",{className:cl,children:["exercise"===e&&(0,at.jsx)("div",{style:{marginBottom:15},children:"建议您一键复制并替换试题(将复制并创建一个新的项目替换试卷中的原试题,不会复制学生的挑战记录,新的项目支持进行编辑并与原项目信息互不影响)。"}),("subject"===e||"exercisepush"===e)&&(0,at.jsx)("div",{style:{marginBottom:15},children:"建议您一键复制并发送(将复制并创建一个新的项目,不会复制学生的挑战记录,新的项目支持进行编辑并与原项目信息互不影响)。"}),"shixunpush"===e&&(0,at.jsx)("div",{style:{marginBottom:15},children:"建议您一键复制并替换试题(将复制并创建一个新的项目替换当前作业中的实践项目,不会复制学生的挑战记录,新的项目支持进行编辑并与原项目信息互不影响)。"}),(0,at.jsx)("div",{children:null==p?void 0:p.map((function(t,e){return(0,at.jsxs)("a",{href:"/shixuns/".concat(t.identifier,"/challenges"),target:"_blank",children:["《",null==t?void 0:t.name,"》",e+1!==g&&"、"]})}))})]})]})]}):"shixun"===e?(0,at.jsx)("div",{style:{marginTop:20},children:g>0?"该项目支持复制,建议您一键复制并发送(将复制并创建一个新的项目,不会复制学生的挑战记录,新的项目支持进行编辑并与原项目信息互不影响)。":"该项目不支持复制,您可以联系项目创建者开启复制权限或者联系平台教研助理进行协助。"}):void 0]})})},fl=["shixunsDetail","dispatch"],pl=(rt.Z.Search,(0,d.connect)((function(t){return{shixunsDetail:t.shixunsDetail}}))((function(t){var e,n,i=t.shixunsDetail,o=t.dispatch,s=(c()(t,fl),(0,d.useParams)()),u=(0,h.useState)(0),f=l()(u,2),p=f[0],g=f[1],m=(0,h.useState)([]),v=l()(m,2),y=v[0],w=v[1],b=(0,h.useState)(""),x=l()(b,2),S=x[0],P=x[1],k=(0,h.useState)(),C=l()(k,2),A=C[0],M=C[1],E=(0,h.useState)(!1),L=l()(E,2),T=L[0],N=L[1],j=(0,h.useState)(!1),I=l()(j,2),B=(I[0],I[1]),O=(0,h.useState)(!1),D=l()(O,2),R=D[0],z=D[1],H=(0,h.useState)({}),_=l()(H,2),W=_[0],V=_[1],Y=(0,h.useState)({page:1,limit:10,type:"video"}),X=l()(Y,2),q=X[0],K=X[1];(0,h.useEffect)((function(){var t,e;if(P(""),"Stage-SendModal"===i.actionTabs.key)if("分组作业"==(null==i||null===(t=i.actionTabs)||void 0===t||null===(t=t.params)||void 0===t?void 0:t.title)){var n={page:1,limit:10,type:"group"};K(n),Q(G()(G()({},n),{},{search:encodeURI(S)}))}else if("图文作业"==(null==i||null===(e=i.actionTabs)||void 0===e||null===(e=e.params)||void 0===e?void 0:e.title)){var r={page:1,limit:10,type:"normal"};K(r),Q(G()(G()({},r),{},{search:encodeURI(S)}))}else K(q),Q(G()(G()({},q),{},{search:encodeURI(S)}))}),[i.actionTabs.key]);var Q=function(){var t=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o({type:"shixunsDetail/searchUserCourses",payload:e});case 2:401===(n=t.sent).status?(o({type:"shixunsDetail/setActionTabs",payload:{}}),B(!1)):(g((null==n?void 0:n.courses_count)||0),w((null==n?void 0:n.course_list)||[]));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),J=function(){var t=a()(r()().mark((function t(){var e,n,o,a,l,u,c,h,d,f;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A){t.next=3;break}return N(!0),t.abrupt("return");case 3:return d=null===(e=i.actionTabs.params)||void 0===e?void 0:e.id,B(!1),t.next=7,(0,Z.Tr)({id:"测验"==(null==i||null===(n=i.actionTabs)||void 0===n||null===(n=n.params)||void 0===n?void 0:n.title)?null==i||null===(o=i.actionTabs)||void 0===o||null===(o=o.params)||void 0===o?void 0:o.examinationid:null==s?void 0:s.pathId,course_id:"测验"==(null==i||null===(a=i.actionTabs)||void 0===a||null===(a=a.params)||void 0===a?void 0:a.title)?[A]:A,type:"分组作业"==(null==i||null===(l=i.actionTabs)||void 0===l||null===(l=l.params)||void 0===l?void 0:l.title)?"group":"图文作业"==(null==i||null===(u=i.actionTabs)||void 0===u||null===(u=u.params)||void 0===u?void 0:u.title)?"normal":"测验"==(null==i||null===(c=i.actionTabs)||void 0===c||null===(c=c.params)||void 0===c?void 0:c.title)?"examination_bank":"编程作业"==(null==i||null===(h=i.actionTabs)||void 0===h||null===(h=h.params)||void 0===h?void 0:h.title)?"hack":"subject",stage_item_id:d,sync_catelog:0});case 7:if(0!==(null==(f=t.sent)?void 0:f.student_count)){t.next=13;break}return t.next=11,$(null==f?void 0:f.no_use_list);case 11:t.next=14;break;case 13:V(f);case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),$=function(){var t=a()(r()().mark((function t(e){var n,o,a,l,u,c,h,d,f,p,g,m,v,y,w;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null===(n=i.actionTabs.params)||void 0===n?void 0:n.id,z(!0),null===(o=i.actionTabs.params)||void 0===o||!o.is_jupyter){t.next=9;break}return c=null===(u=i.actionTabs.params)||void 0===u?void 0:u.identifier,t.next=6,(0,it.ZP)("/api/shixuns/".concat(c,"/send_to_course.json"),{method:"Post",body:{courses:[{course_id:A,identifier:c,type:"normal",is_copy:e,is_use:1}]}});case 6:l=t.sent,t.next=18;break;case 9:if("测验"!=(null==i||null===(h=i.actionTabs)||void 0===h||null===(h=h.params)||void 0===h?void 0:h.title)){t.next=15;break}return t.next=12,(0,lt.p4)({id:null==i||null===(d=i.actionTabs)||void 0===d||null===(d=d.params)||void 0===d?void 0:d.examinationid,course_id:[A],shixuns_info:e?null==e?void 0:e.map((function(t){return t.shixun_id=t.id,t})):[]});case 12:l=t.sent,t.next=18;break;case 15:return t.next=17,(0,lt.Q)({id:null==s?void 0:s.pathId,course_id:A,stage_shixuns:e,sync_catelog:0,type:"实训"===(null===(f=i.actionTabs.params)||void 0===f?void 0:f.title)?"shixun":"分组作业"==(null==i||null===(p=i.actionTabs)||void 0===p||null===(p=p.params)||void 0===p?void 0:p.title)?"group":"图文作业"==(null==i||null===(g=i.actionTabs)||void 0===g||null===(g=g.params)||void 0===g?void 0:g.title)?"normal":"视频"==(null==i||null===(m=i.actionTabs)||void 0===m||null===(m=m.params)||void 0===m?void 0:m.title)?"video":"编程作业"==(null==i||null===(v=i.actionTabs)||void 0===v||null===(v=v.params)||void 0===v?void 0:v.title)?"hack":""});case 17:l=t.sent;case 18:tt(),"测验"==(null==i||null===(a=i.actionTabs)||void 0===a||null===(a=a.params)||void 0===a?void 0:a.title)?0===(null===(y=l)||void 0===y?void 0:y.status)&&U.Z.confirm({title:"提示",centered:!0,icon:null,okText:"立即前往",cancelText:"稍后再说",content:(0,at.jsx)("div",{style:{textAlign:"left"},children:"发送成功!是否前往对应的教学课堂?"}),onOk:function(){(0,F.xg)("".concat(l.data[0].first_category_url,"/").concat(l.data[0].exercise_id,"/detail?random=").concat(l.data[0].is_random,"&tabs=3"))}}):1===(null===(w=l)||void 0===w?void 0:w.status)&&U.Z.confirm({title:"提示",centered:!0,icon:null,okText:"立即前往",cancelText:"稍后再说",content:(0,at.jsx)("div",{style:{textAlign:"left"},children:"发送成功!是否前往对应的教学课堂?"}),onOk:function(){var t,e,n,r,o,a;if(null!==(t=i.actionTabs.params)&&void 0!==t&&t.is_jupyter)(0,F.xg)(null===(o=l)||void 0===o?void 0:o.first_category_url);else if("分组作业"==(null==i||null===(e=i.actionTabs)||void 0===e||null===(e=e.params)||void 0===e?void 0:e.title)||"图文作业"==(null==i||null===(n=i.actionTabs)||void 0===n||null===(n=n.params)||void 0===n?void 0:n.title))(0,F.xg)(null===(a=l)||void 0===a?void 0:a.url);else if("编程作业"==(null==i||null===(r=i.actionTabs)||void 0===r||null===(r=r.params)||void 0===r?void 0:r.title)){var s,u=null===(s=l)||void 0===s||null===(s=s.url.split("/"))||void 0===s?void 0:s[2];(0,F.xg)("/classrooms/".concat(u,"/program_homework"))}else{var c,h=null===(c=l)||void 0===c||null===(c=c.url.split("/"))||void 0===c?void 0:c[2];(0,F.xg)("/classrooms/".concat(h,"/shixun_homework"))}}});case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),tt=function(){P(""),M(null),N(!1),o({type:"shixunsDetail/setActionTabs",payload:{}}),B(!1),z(!1)};return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(U.Z,{title:"发送".concat((null===(e=i.actionTabs.params)||void 0===e?void 0:e.title)||"实训"),open:"Stage-SendModal"===i.actionTabs.key,centered:!0,className:Js,onCancel:tt,onOk:J,children:(0,at.jsxs)("div",{className:$s,children:[(0,at.jsxs)("div",{className:tl,children:["选择的","".concat((null===(n=i.actionTabs.params)||void 0===n?void 0:n.title)||"实训"),"将会发送到指定课堂"]}),(0,at.jsx)("div",{className:"mb10",children:(0,at.jsx)(rt.Z.Search,{className:ol,placeholder:"输入课堂名称的关键字进行搜索",allowClear:!0,value:S,onChange:function(t){return P(t.target.value)},suffix:(0,at.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(al),onClick:function(){P(S);var t=G()(G()({},q),{page:1,limit:10,search:encodeURI(S)});K(t),Q(t)}}),onSearch:function(t){P(t);var e=G()(G()({},q),{page:1,limit:10,search:encodeURI(t)});K(e),Q(e)}})}),(0,at.jsx)("div",{className:el,children:(0,at.jsx)(ye.ZP.Group,{value:A,onChange:function(t){M(t.target.value),N(!1)},children:y.map((function(t,e){return(0,at.jsx)(ye.ZP,{className:nl,value:t.course_id,children:(0,at.jsx)("span",{title:t.name,children:t.name})},e)}))})}),T&&(0,at.jsx)("div",{className:il,children:"请选择你要发送的课堂"}),p>10&&(0,at.jsx)("div",{className:rl,children:(0,at.jsx)(nt.Z,{size:"small",className:"mb20",showQuickJumper:!0,showSizeChanger:!1,defaultCurrent:1,current:null==q?void 0:q.page,pageSize:10,total:p,onChange:function(t){var e=G()(G()({},q),{page:t,limit:10,search:encodeURI(S)});K(e),Q(e)}})})]})}),(0,at.jsx)(dl,{resdata:W,type:"shixun",okloading:R,oktext:"一键复制并发送",onok:function(t){var e;$(null!==(e=i.actionTabs.params)&&void 0!==e&&e.is_jupyter?1:t)}})]})}))),gl={bg:"bg___F_x5V",title:"title___QEshf",fieldWrap:"fieldWrap___zSBF2",mdWrap:"mdWrap___V2EBb",footer_style:"footer_style___lwvvM",submit_button:"submit_button___gNsfc",close_button:"close_button___K6_8I"},ml=n(12893),vl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},yl=function(t,e){return h.createElement(Wa.Z,(0,Tt.Z)({},t,{ref:e,icon:vl}))};var wl=h.forwardRef(yl),bl={},xl=($.Z.Group,(0,d.connect)((function(t){var e=t.classroomList,n=t.loading,i=t.globalSetting,r=t.user;return{classroomList:e,globalSetting:i,loading:n.effects,user:r}}))((function(t){t.classroomList,t.loading,t.user,t.exercise_id,t.homework_common_id;var e,n,i,o,s,u,c,f,p=t.setitem,g=t.item,m=(t.type,t.rz),v=(t.dispatch,(0,h.useState)([])),y=l()(v,2),w=(y[0],y[1],(0,h.useState)({zydatas:[],jbdatas:[],kcdatas:[],zsdatas:[],page:1,per_page:20})),b=l()(w,2),x=b[0],S=b[1],P=((0,d.useParams)(),(0,h.useState)(!1)),k=l()(P,2),C=(k[0],k[1],(0,h.useState)(!1)),A=l()(C,2),M=(A[0],A[1],X.Z.useForm()),E=l()(M,1)[0];function L(){return(L=a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("----",g),t.next=3,T(null==g?void 0:g.ec_major_school_id);case 3:return t.next=5,j(null==g?void 0:g.ec_year_id);case 5:return t.next=7,B(null==g?void 0:g.ec_course_id);case 7:E.setFieldsValue({ec_course_id:null==g?void 0:g.ec_course_id,ec_major_school_id:null==g?void 0:g.ec_major_school_id,ec_point_ids:null==g?void 0:g.ec_point_ids,ec_year_id:null==g?void 0:g.ec_year_id});case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(t){return N.apply(this,arguments)}function N(){return N=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,it.ZP)("/api/ec_major_schools/".concat(e,"/ec_years/get_year_list.json"),{method:"get"});case 2:n=t.sent,x.jbdatas=null==n?void 0:n.data,S(G()({},x)),E.setFieldsValue({ec_year_id:"",ec_course_id:"",ec_point_ids:[]});case 6:case"end":return t.stop()}}),t)}))),N.apply(this,arguments)}function j(t){return I.apply(this,arguments)}function I(){return I=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,it.ZP)("/api/ec_years/".concat(e,"/ec_courses/get_courses.json"),{method:"get"});case 2:n=t.sent,x.kcdatas=null==n?void 0:n.data,S(G()({},x)),E.setFieldsValue({ec_course_id:"",ec_point_ids:[]});case 6:case"end":return t.stop()}}),t)}))),I.apply(this,arguments)}(0,h.useEffect)((function(){m&&(x.zydatas=m,S(G()({},x)),null!=g&&g.ec_course_id&&function(){L.apply(this,arguments)}())}),[g,m]);var B=function(){var t=a()(r()().mark((function t(e){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,it.ZP)("/api/ec_courses/".concat(e,"/ec_points.json"),{method:"get",params:{ec_course_id:e}});case 2:n=t.sent,x.zsdatas=null==n?void 0:n.data,S(G()({},x));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return(0,at.jsx)("div",{className:bl.from,children:(0,at.jsxs)(X.Z,{form:E,layout:"inline",onValuesChange:function(t){console.log("----",t),t.ec_major_school_id&&(x.jbdatas=[],x.kcdatas=[],x.zsdatas=[],S(G()({},x)),T(t.ec_major_school_id)),t.ec_year_id&&(x.kcdatas=[],x.zsdatas=[],S(G()({},x)),j(t.ec_year_id)),t.ec_course_id&&(x.zsdatas=[],S(G()({},x)),B(t.ec_course_id))},onFinish:function(){var t=a()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:p(e);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),children:[(0,at.jsx)(X.Z.Item,{label:"认证专业",name:"ec_major_school_id",children:(0,at.jsx)(Re.default,{style:{width:150},disabled:(null===(e=x.zydatas)||void 0===e?void 0:e.length)<=0,placeholder:"请选择认证专业",children:null==x||null===(n=x.zydatas)||void 0===n?void 0:n.map((function(t,e){return(0,at.jsx)(Re.default.Option,{value:null==t?void 0:t.ec_major_school_id,children:null==t?void 0:t.name},e)}))})}),(0,at.jsx)(X.Z.Item,{label:"认证届别",name:"ec_year_id",children:(0,at.jsx)(Re.default,{style:{width:150},disabled:(null===(i=x.jbdatas)||void 0===i?void 0:i.length)<=0,placeholder:"请选择认证届别",children:null==x||null===(o=x.jbdatas)||void 0===o?void 0:o.map((function(t,e){return(0,at.jsx)(Re.default.Option,{value:null==t?void 0:t.ec_year_id,children:null==t?void 0:t.year},e)}))})}),(0,at.jsx)(X.Z.Item,{label:"课程",name:"ec_course_id",children:(0,at.jsx)(Re.default,{style:{width:150},disabled:(null===(s=x.kcdatas)||void 0===s?void 0:s.length)<=0,placeholder:"请选择课程",children:null==x||null===(u=x.kcdatas)||void 0===u?void 0:u.map((function(t,e){return(0,at.jsx)(Re.default.Option,{value:null==t?void 0:t.id,children:null==t?void 0:t.name},e)}))})}),(0,at.jsx)(X.Z.Item,{label:"知识点",name:"ec_point_ids",children:(0,at.jsx)(Re.default,{onChange:function(){E.submit()},style:{width:150},mode:"multiple",disabled:(null===(c=x.zsdatas)||void 0===c?void 0:c.length)<=0,placeholder:"请选择知识点",children:null==x||null===(f=x.zsdatas)||void 0===f?void 0:f.map((function(t,e){return(0,at.jsx)(Re.default.Option,{value:null==t?void 0:t.id,children:null==t?void 0:t.name},e)}))})})]})})}))),Sl=($.Z.Group,(0,d.connect)((function(t){var e=t.classroomList,n=t.loading,i=t.globalSetting,r=t.user;return{classroomList:e,globalSetting:i,loading:n.effects,user:r}}))((function(t){t.classroomList,t.loading;var e,n,i=t.user,o=t.exercise_id,s=void 0===o?null:o,u=t.homework_common_id,c=void 0===u?null:u,d=t.setitem,f=(t.type,t.dispatch,(0,h.useState)([{}])),p=l()(f,2),g=p[0],m=p[1],v=(0,h.useState)([]),y=l()(v,2),w=y[0],b=y[1];function x(){return S.apply(this,arguments)}function S(){return S=a()(r()().mark((function t(){var e,n,i,o,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,it.ZP)("/api/ec_courses/".concat(0,"/ec_points/get_work_points.json"),{method:"get",params:{exercise_id:s,homework_common_id:c}});case 2:(null==(n=t.sent)||null===(e=n.data)||void 0===e?void 0:e.length)>0&&(a=[],null==n||null===(i=n.data)||void 0===i||i.map((function(t){var e;null==t||null===(e=t.ec_point_ids)||void 0===e||e.map((function(t){a.push(t)}))})),d(G()(G()({},null==n||null===(o=n.data)||void 0===o?void 0:o[0]),{},{ec_point_ids:a})),m(null==n?void 0:n.data));case 4:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}function P(){return(P=a()(r()().mark((function t(){var e,n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,it.ZP)("/api/schools/".concat(null==i||null===(e=i.userInfo)||void 0===e||null===(e=e.course)||void 0===e?void 0:e.course_school_id,"/ec_majors/get_major_list.json"),{method:"get"});case 2:n=t.sent,b(null==n?void 0:n.data),(c||s)&&x();case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,h.useEffect)((function(){var t;null!=i&&null!==(t=i.userInfo)&&void 0!==t&&null!==(t=t.course)&&void 0!==t&&t.course_school_id&&function(){P.apply(this,arguments)}()}),[null==i||null===(e=i.userInfo)||void 0===e||null===(e=e.course)||void 0===e?void 0:e.course_school_id]),(0,at.jsxs)("div",{style:{display:null!==(n=i.userInfo.course)&&void 0!==n&&n.is_openengineering?"":"none"},children:[(0,at.jsx)("p",{style:{fontSize:"16px",fontWeight:400},children:"工程认证考核知识点"}),null==g?void 0:g.map((function(t,e){return(0,at.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,at.jsx)(xl,{rz:w,item:t,type:e,setitem:function(t){g.splice(e,1,t),m(Y()(g));var n=[];null==g||g.map((function(t){var e;null==t||null===(e=t.ec_point_ids)||void 0===e||e.map((function(t){n.push(t)}))})),d(G()(G()({},t),{},{ec_point_ids:n}))}}),0!=e&&(0,at.jsx)(ml.Z,{onClick:function(){g.splice(e,1),m(Y()(g))},style:{marginLeft:10,fontSize:"20px"}}),(0,at.jsx)(wl,{onClick:function(){g.push({}),m(Y()(g))},style:{marginLeft:10,fontSize:"20px"}})]},e)}))]})}))),Pl=(0,d.connect)((function(t){var e=t.shixunHomeworks,n=t.newCourse,i=t.loading,r=t.globalSetting;return{classroomList:t.classroomList,shixunHomeworks:e,newCourse:n,globalSetting:r,loading:i.effects}}))((function(t){var e,n,i=t.shixunHomeworks,o=(t.newCourse,t.globalSetting),s=(t.loading,t.dispatch),u=t.classroomList,c=((0,d.useParams)(),X.Z.useForm()),f=l()(c,1)[0],p=(0,h.useState)({}),g=l()(p,2),m=g[0],v=g[1],y=((0,h.useRef)(),i.commonHomeWorkAddDefaultData,(0,h.useState)({})),w=l()(y,2),b=w[0],x=w[1];(0,h.useEffect)((function(){f.resetFields()}),[u.actionTabs.key]);function S(t){return P.apply(this,arguments)}function P(){return(P=a()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=b&&b.ec_point_ids){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,(0,it.ZP)("/api/ec_courses/".concat(null==b?void 0:b.ec_course_id,"/ec_points/set_work_points.json"),{method:"post",body:G()({homework_common_id:e},b)});case 4:t.sent;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,at.jsxs)(q.Z,{placement:"bottom",height:"100%",closable:!1,open:"课程新建分组作业"===u.actionTabs.key,className:gl.drawer,children:[(0,at.jsxs)("section",{className:gl.bg,children:[(0,at.jsx)("aside",{className:gl.title,children:"新建分组作业"}),(0,at.jsxs)(X.Z,{form:f,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){v(G()({},f.getFieldsValue()))},children:[(0,at.jsx)("div",{className:gl.fieldWrap,children:(0,at.jsx)(X.Z.Item,{name:"name",label:"标题",rules:[{required:!0,message:"请输入标题"}],children:(0,at.jsx)(rt.Z,{maxLength:60,suffix:"".concat((null===(e=m.name)||void 0===e?void 0:e.length)||0,"/60"),placeholder:"例如:从Python程序设计-入门精通"})})}),(0,at.jsxs)("div",{className:gl.mdWrap,children:[(0,at.jsx)(X.Z.Item,{name:"description",style:{marginTop:"-10px"},label:"内容",rules:[{required:!0,message:"请输入作业的简介"},{max:5e3,message:"作业简介最大限制5000个字符"}],children:(0,at.jsx)(Aa,{watch:!0,defaultValue:m.intro})}),(0,at.jsx)("div",{children:(0,at.jsx)(X.Z.Item,{name:"attachment_ids",style:{marginTop:"-15px"},children:(0,at.jsx)(cs,{})})}),(0,at.jsxs)(Q.Z,{gutter:[20,20],style:{marginTop:20},children:[(0,at.jsx)(J.Z,{flex:"230px",children:(0,at.jsx)(X.Z.Item,{name:"min_num",label:"分组设置",rules:[{required:!0,message:"请填写每组最小人数"}],children:(0,at.jsx)(Uo.Z,{style:{width:200,height:40},min:1,placeholder:"请填写每组最小人数"})})}),(0,at.jsx)(J.Z,{flex:"230px",children:(0,at.jsx)(X.Z.Item,{name:"max_num",label:(0,at.jsx)("div",{children:" "}),rules:[{validator:function(t,e){return e?Promise.resolve():Promise.reject(new Error("请填写每组最大人数"))}}],children:(0,at.jsx)(Uo.Z,{style:{width:200,height:40},max:100,placeholder:"请填写每组最大人数"})})}),(0,at.jsx)(J.Z,{children:(0,at.jsx)("div",{className:"mt40",style:{color:"#536367",marginLeft:"-20px"},children:"(学生提交作品时需要关联同组成员,组内成员作品共享)"})})]}),!(null!=o&&null!==(n=o.setting)&&void 0!==n&&n.is_local)&&(0,at.jsx)(Q.Z,{style:{marginTop:"-10px"},children:(0,at.jsxs)(J.Z,{children:[(0,at.jsx)(X.Z.Item,{name:"base_on_project",valuePropName:"checked",style:{marginBottom:5},children:(0,at.jsx)($.Z,{value:!0,style:{color:"#5F6368"},children:"基于项目实施"})}),(0,at.jsx)("span",{className:"c-light-black",style:{color:"#999999"},children:"(选中,则必须在本平台创建项目,项目管理员可以提交作品;不选中,无需在平台创建项目,任意小组成员均可以提交作品)"})]})})]}),(0,at.jsxs)("div",{className:gl.mdWrap,children:[(0,at.jsx)(X.Z.Item,{name:"reference_answer",label:"参考答案",style:{marginTop:10},children:(0,at.jsx)(Aa,{watch:!0,defaultValue:m.notice})}),(0,at.jsx)("div",{children:(0,at.jsx)(X.Z.Item,{name:"reference_attachment_ids",style:{marginTop:"-15px"},children:(0,at.jsx)(cs,{})})})]})]}),(0,at.jsx)("div",{className:gl.mdWrap,children:(0,at.jsx)(Sl,{setitem:function(t){return x(G()({},t))}})})]}),(0,at.jsxs)("div",{className:gl.footer_style,children:[(0,at.jsx)("div",{className:gl.close_button,onClick:function(){s({type:"classroomList/setActionTabs",payload:{key:""}})},children:"取消"}),(0,at.jsx)("div",{onClick:function(){f.validateFields().then(a()(r()().mark((function t(){var e,n,i,o;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(m.min_num>m.max_num)){t.next=3;break}return H.ZP.info("最大人数不能小于最小人数"),t.abrupt("return");case 3:return(e=G()({},m)).attachment_ids&&(e.attachment_ids=null==e||null===(n=e.attachment_ids)||void 0===n?void 0:n.map((function(t){return t.response.id}))),e.reference_attachment_ids&&(e.reference_attachment_ids=null==e||null===(i=e.reference_attachment_ids)||void 0===i?void 0:i.map((function(t){return t.response.id}))),e.base_on_project||(e.base_on_project=!1),t.next=9,(0,lt.DQ)(G()(G()({id:u.actionTabs.id,subject_id:u.actionTabs.subject_id},e),{},{homework_type:3}));case 9:0===(o=t.sent).status&&(S(o.homework_id),(0,F.L9)(["教学课堂","分组作业","新建分组作业"]),H.ZP.success("新建成功"),s({type:"classroomList/setActionTabs",payload:{key:"closePathsTabs"}}));case 11:case"end":return t.stop()}}),t)}))))},className:gl.submit_button,children:"提交"})]})]},"bottom")})),kl={bg:"bg___oLxz5",title:"title___bfvam",fieldWrap:"fieldWrap___A5u2u",mdWrap:"mdWrap___zugL3",footer_style:"footer_style___unO7C",submit_button:"submit_button___t8Hvx",close_button:"close_button___oswUb"},Cl=(0,d.connect)((function(t){var e=t.shixunHomeworks,n=t.newCourse,i=t.loading,r=t.globalSetting,o=t.classroomList;return{shixunHomeworks:e,newCourse:n,globalSetting:r,loading:i.effects,classroomList:o}}))((function(t){var e,n,i=t.shixunHomeworks,o=(t.newCourse,t.globalSetting),s=(t.loading,t.dispatch),u=t.classroomList,c=(0,d.useParams)(),f=X.Z.useForm(),p=l()(f,1)[0],g=(0,h.useState)({}),m=l()(g,2),v=m[0],y=m[1],w=(0,h.useState)(!1),b=l()(w,2),x=b[0],S=b[1],P=(0,h.useState)({}),k=l()(P,2),C=k[0],A=k[1],M=(0,h.useState)({}),E=l()(M,2),L=E[0],T=E[1];(0,h.useRef)(),i.commonHomeWorkEditDefaultData;(0,h.useEffect)((function(){"课程编辑分组作业"==u.actionTabs.key&&N()}),[u.actionTabs.key]);var N=function(){var t=a()(r()().mark((function t(){var e,n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,lt.FD)({id:u.actionTabs.id,type:u.actionTabs.type});case 2:(e=t.sent)&&(n=G()(G()({},e.subject_homework),{},{attachment_ids:us(e.subject_homework.attachments),reference_attachment_ids:us(e.subject_homework.ref_attachments)}),p.setFieldsValue(G()({},n)),y(G()({},n)),S(!0),T(new Date));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function j(t){return I.apply(this,arguments)}function I(){return(I=a()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=C&&C.ec_point_ids){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,(0,it.ZP)("/api/ec_courses/".concat(null==C?void 0:C.ec_course_id,"/ec_points/set_work_points.json"),{method:"post",body:G()({homework_common_id:e},C)});case 4:t.sent;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,at.jsxs)(q.Z,{placement:"bottom",height:"100%",closable:!1,open:"课程编辑分组作业"===u.actionTabs.key,className:kl.drawer,children:[(0,at.jsxs)("section",{className:kl.bg,children:[(0,at.jsx)("aside",{className:kl.title,children:"编辑分组作业"}),(0,at.jsxs)(X.Z,{form:p,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){y(G()({},p.getFieldsValue()))},children:[(0,at.jsx)("div",{className:kl.fieldWrap,children:(0,at.jsx)(X.Z.Item,{name:"name",label:"标题:",rules:[{required:!0,message:"请输入标题"}],children:(0,at.jsx)(rt.Z,{maxLength:60,suffix:"".concat((null===(e=v.name)||void 0===e?void 0:e.length)||0,"/60"),placeholder:"例如:从Python程序设计-入门精通"})})}),(0,at.jsxs)("div",{className:kl.mdWrap,children:[(0,at.jsx)(X.Z.Item,{name:"description",label:"简介:",style:{marginTop:"-10px"},rules:[{required:!0,message:"请输入作业的简介"},{max:5e3,message:"作业简介最大限制5000个字符"}],children:(0,at.jsx)(Aa,{watch:!0,defaultValue:v.description})}),(0,at.jsx)("div",{children:(0,at.jsx)(X.Z.Item,{name:"attachment_ids",style:{marginTop:"-15px"},children:x&&(0,at.jsx)(cs,{},L)})}),(0,at.jsxs)(Q.Z,{gutter:[20,20],style:{marginTop:20},children:[(0,at.jsx)(J.Z,{flex:"230px",children:(0,at.jsx)(X.Z.Item,{name:"min_num",label:"分组设置",rules:[{required:!0,message:"请填写每组最小人数"}],children:(0,at.jsx)(Uo.Z,{style:{width:200,height:40},min:1,placeholder:"请填写每组最小人数"})})}),(0,at.jsx)(J.Z,{flex:"230px",children:(0,at.jsx)(X.Z.Item,{name:"max_num",label:(0,at.jsx)("div",{children:" "}),rules:[{validator:function(t,e){return e?Promise.resolve():Promise.reject(new Error("请填写每组最大人数"))}}],children:(0,at.jsx)(Uo.Z,{style:{width:200,height:40},max:100,placeholder:"请填写每组最大人数"})})}),(0,at.jsx)(J.Z,{children:(0,at.jsx)("div",{className:"mt35",style:{color:"#536367",marginLeft:"-20px"},children:"(学生提交作品时需要关联同组成员,组内成员作品共享)"})})]}),!(null!=o&&null!==(n=o.setting)&&void 0!==n&&n.is_local)&&(0,at.jsx)(Q.Z,{style:{marginTop:"-10px"},children:(0,at.jsxs)(J.Z,{children:[(0,at.jsx)(X.Z.Item,{name:"base_on_project",valuePropName:"checked",style:{marginBottom:5,marginTop:5},children:(0,at.jsx)($.Z,{value:!0,defaultChecked:!0,style:{color:"#5F6368"},children:"基于项目实施"})}),(0,at.jsx)("span",{className:"c-light-black",style:{color:"#999999",marginTop:"-10px"},children:"(选中,则必须在本平台创建项目,项目管理员可以提交作品;不选中,无需在平台创建项目,任意小组成员均可以提交作品)"})]})})]}),(0,at.jsxs)("div",{className:kl.mdWrap,children:[(0,at.jsx)(X.Z.Item,{name:"reference_answer",label:"参考答案:",style:{marginTop:10},children:(0,at.jsx)(Aa,{defaultValue:v.reference_answer,watch:!0})}),(0,at.jsx)("div",{children:(0,at.jsx)(X.Z.Item,{name:"reference_attachment_ids",style:{marginTop:"-15px"},children:x&&(0,at.jsx)(cs,{},L)})})]})]}),(0,at.jsx)("div",{className:kl.mdWrap,children:(0,at.jsx)(Sl,{setitem:function(t){return A(G()({},t))},homework_common_id:c.categoryId})})]}),(0,at.jsxs)("div",{className:kl.footer_style,children:[(0,at.jsx)("div",{className:kl.close_button,onClick:function(){s({type:"classroomList/setActionTabs",payload:{key:""}})},children:"取消"}),(0,at.jsx)("div",{onClick:function(){p.validateFields().then(a()(r()().mark((function t(){var e,n,i;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(v.min_num>v.max_num)){t.next=3;break}return H.ZP.info("最大人数不能小于最小人数"),t.abrupt("return");case 3:return(e=G()({},v)).attachment_ids&&(e.attachment_ids=null==e||null===(n=e.attachment_ids)||void 0===n?void 0:n.map((function(t){return t.response.id}))),e.reference_attachment_ids&&(e.reference_attachment_ids=null==e||null===(i=e.reference_attachment_ids)||void 0===i?void 0:i.map((function(t){return t.response.id}))),e.base_on_project||(e.base_on_project=!1),t.next=9,(0,lt.VO)(G()(G()(G()({},c),e),{},{base_on_project:e.base_on_project,homework_type:3,id:u.actionTabs.id}));case 9:0===t.sent.status&&(H.ZP.success("编辑成功"),j(c.categoryId),s({type:"classroomList/setActionTabs",payload:{key:"closePathsTabs"}}));case 11:case"end":return t.stop()}}),t)}))))},className:kl.submit_button,children:"提交"})]})]},"bottom")})),Al={bg:"bg___fOlTw",title:"title___G3D9y",fieldWrap:"fieldWrap___imjS7",mdWrap:"mdWrap___aKGYo",footer_style:"footer_style___BWH5p",submit_button:"submit_button___yxKUd",close_button:"close_button___nRK7d"},Ml=(0,d.connect)((function(t){var e=t.shixunHomeworks,n=t.newCourse,i=t.loading,r=t.globalSetting,o=t.classroomList;return{shixunHomeworks:e,newCourse:n,globalSetting:r,loading:i.effects,classroomList:o}}))((function(t){var e,n=t.shixunHomeworks,i=(t.newCourse,t.globalSetting,t.loading,t.dispatch),o=t.classroomList,s=((0,d.useParams)(),X.Z.useForm()),u=l()(s,1)[0],c=(0,h.useState)({}),f=l()(c,2),p=f[0],g=f[1],m=(0,h.useState)(),v=l()(m,2),y=(v[0],v[1],(0,h.useRef)(),n.commonHomeWorkAddDefaultData,(0,h.useState)({})),w=l()(y,2),b=w[0],x=w[1];(0,h.useEffect)((function(){u.resetFields()}),[o.actionTabs.key]);function S(t){return P.apply(this,arguments)}function P(){return(P=a()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=b&&b.ec_point_ids){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,(0,it.ZP)("/api/ec_courses/".concat(null==b?void 0:b.ec_course_id,"/ec_points/set_work_points.json"),{method:"post",body:G()({homework_common_id:e},b)});case 4:t.sent;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,at.jsxs)(q.Z,{placement:"bottom",height:"100%",closable:!1,open:"课程新建图文作业"===o.actionTabs.key,className:Al.drawer,children:[(0,at.jsxs)("section",{className:Al.bg,children:[(0,at.jsx)("aside",{className:Al.title,children:"新建图文作业"}),(0,at.jsxs)(X.Z,{form:u,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){console.log("onchange: ",u.getFieldsValue()),g(G()({},u.getFieldsValue()))},children:[(0,at.jsx)("div",{className:Al.fieldWrap,children:(0,at.jsx)(X.Z.Item,{name:"name",label:"标题:",rules:[{required:!0,message:"请输入标题"}],children:(0,at.jsx)(rt.Z,{maxLength:60,suffix:"".concat((null===(e=p.name)||void 0===e?void 0:e.length)||0,"/60"),placeholder:"例如:从Python程序设计-入门精通"})})}),(0,at.jsxs)("div",{className:Al.mdWrap,children:[(0,at.jsx)(X.Z.Item,{name:"description",label:"简介:",style:{marginTop:"-10px"},rules:[{required:!0,message:"请输入作业的简介"},{max:5e3,message:"作业简介最大限制5000个字符"}],children:(0,at.jsx)(Aa,{watch:!0,defaultValue:p.intro})}),(0,at.jsx)("div",{children:(0,at.jsx)(X.Z.Item,{name:"attachment_ids",style:{marginTop:"-15px"},children:(0,at.jsx)(cs,{})})})]}),(0,at.jsxs)("div",{className:Al.mdWrap,children:[(0,at.jsx)(X.Z.Item,{name:"reference_answer",style:{marginTop:"-10px"},label:"参考答案:",children:(0,at.jsx)(Aa,{watch:!0,defaultValue:p.notice})}),(0,at.jsx)("div",{children:(0,at.jsx)(X.Z.Item,{name:"reference_attachment_ids",style:{marginTop:"-15px"},children:(0,at.jsx)(cs,{})})})]})]}),(0,at.jsx)("div",{className:Al.mdWrap,children:(0,at.jsx)(Sl,{setitem:function(t){return x(G()({},t))}})})]}),(0,at.jsxs)("div",{className:Al.footer_style,children:[(0,at.jsx)("div",{className:Al.close_button,onClick:function(){i({type:"classroomList/setActionTabs",payload:{key:""}})},children:"取消"}),(0,at.jsx)("div",{onClick:function(){u.validateFields().then(a()(r()().mark((function t(){var e,n,a,s;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=G()({},p)).attachment_ids&&(e.attachment_ids=null==e||null===(n=e.attachment_ids)||void 0===n?void 0:n.map((function(t){return t.response.id}))),e.reference_attachment_ids&&(e.reference_attachment_ids=null==e||null===(a=e.reference_attachment_ids)||void 0===a?void 0:a.map((function(t){return t.response.id}))),t.next=5,(0,lt.DQ)(G()(G()({id:o.actionTabs.id,subject_id:o.actionTabs.subject_id},e),{},{homework_type:1}));case 5:0===(null==(s=t.sent)?void 0:s.status)&&(S(s.homework_id),(0,F.L9)(["教学课堂","图文作业","新建图文作业"]),H.ZP.success("新建成功"),i({type:"classroomList/setActionTabs",payload:{key:"closePathsTabs"}}));case 7:case"end":return t.stop()}}),t)}))))},className:Al.submit_button,children:"提交"})]})]},"bottom")})),El={bg:"bg___Sx8dX",title:"title___GKPKJ",fieldWrap:"fieldWrap___fIL9U",mdWrap:"mdWrap___iwCM_",footer_style:"footer_style___KYp6i",submit_button:"submit_button___Rnntu",close_button:"close_button___Drc5k"},Ll=(0,d.connect)((function(t){var e=t.shixunHomeworks,n=t.newCourse,i=t.loading,r=t.globalSetting,o=t.classroomList;return{shixunHomeworks:e,newCourse:n,globalSetting:r,loading:i.effects,classroomList:o}}))((function(t){var e,n=t.shixunHomeworks,i=(t.newCourse,t.globalSetting,t.loading,t.dispatch),o=t.classroomList,s=(0,d.useParams)(),u=X.Z.useForm(),c=l()(u,1)[0],f=(0,h.useState)({}),p=l()(f,2),g=p[0],m=p[1],v=(0,h.useState)(!1),y=l()(v,2),w=y[0],b=y[1],x=(0,h.useState)({}),S=l()(x,2),P=S[0],k=S[1],C=(0,h.useState)({}),A=l()(C,2),M=A[0],E=A[1];(0,h.useRef)(),n.commonHomeWorkEditDefaultData;(0,h.useEffect)((function(){"课程编辑图文作业"==o.actionTabs.key&&L()}),[o.actionTabs.key]);var L=function(){var t=a()(r()().mark((function t(){var e,n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,lt.FD)({id:o.actionTabs.id,type:o.actionTabs.type});case 2:(e=t.sent)&&(n={name:e.subject_homework.name,description:e.subject_homework.description,reference_answer:e.subject_homework.reference_answer,attachment_ids:us(e.subject_homework.attachments),reference_attachment_ids:us(e.subject_homework.ref_attachments)},console.log(n),c.setFieldsValue(G()({},n)),m(G()({},n)),b(!0),E(new Date));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function T(t){return N.apply(this,arguments)}function N(){return(N=a()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=P&&P.ec_point_ids){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,(0,it.ZP)("/api/ec_courses/".concat(null==P?void 0:P.ec_course_id,"/ec_points/set_work_points.json"),{method:"post",body:G()({homework_common_id:e},P)});case 4:t.sent;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,at.jsxs)(q.Z,{placement:"bottom",height:"100%",closable:!1,open:"课程编辑图文作业"===o.actionTabs.key,className:El.drawer,children:[(0,at.jsxs)("section",{className:El.bg,children:[(0,at.jsx)("aside",{className:El.title,children:"编辑图文作业"}),(0,at.jsxs)(X.Z,{form:c,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(){m(G()({},c.getFieldsValue()))},children:[(0,at.jsx)("div",{className:El.fieldWrap,children:(0,at.jsx)(X.Z.Item,{name:"name",label:"标题:",rules:[{required:!0,message:"请输入标题"}],children:(0,at.jsx)(rt.Z,{maxLength:60,suffix:"".concat((null===(e=g.name)||void 0===e?void 0:e.length)||0,"/60"),placeholder:"例如:从Python程序设计-入门精通"})})}),(0,at.jsxs)("div",{className:El.mdWrap,children:[(0,at.jsx)(X.Z.Item,{name:"description",label:"简介:",style:{marginTop:"-10px"},rules:[{required:!0,message:"请输入作业的简介"},{max:5e3,message:"作业简介最大限制5000个字符"}],children:(0,at.jsx)(Aa,{watch:!0,defaultValue:g.description})}),(0,at.jsx)("div",{children:(0,at.jsx)(X.Z.Item,{name:"attachment_ids",style:{marginTop:"-15px"},children:w&&(0,at.jsx)(cs,{},M)})})]}),(0,at.jsxs)("div",{className:El.mdWrap,children:[(0,at.jsx)(X.Z.Item,{name:"reference_answer",label:"参考答案:",style:{marginTop:"-10px"},children:(0,at.jsx)(Aa,{defaultValue:g.reference_answer,watch:!0})}),(0,at.jsx)("div",{children:(0,at.jsx)(X.Z.Item,{name:"reference_attachment_ids",style:{marginTop:"-15px"},children:w&&(0,at.jsx)(cs,{},M)})})]})]}),(0,at.jsx)("div",{className:El.mdWrap,children:(0,at.jsx)(Sl,{setitem:function(t){return k(G()({},t))},homework_common_id:s.categoryId})})]}),(0,at.jsxs)("div",{className:El.footer_style,children:[(0,at.jsx)("div",{className:El.close_button,onClick:function(){i({type:"classroomList/setActionTabs",payload:{key:""}})},children:"取消"}),(0,at.jsx)("div",{onClick:function(){c.validateFields().then(a()(r()().mark((function t(){var e,n,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=G()({},g)).attachment_ids&&(e.attachment_ids=null==e||null===(n=e.attachment_ids)||void 0===n?void 0:n.map((function(t){var e;return null===(e=t.response)||void 0===e?void 0:e.id}))),e.reference_attachment_ids&&(e.reference_attachment_ids=null==e||null===(a=e.reference_attachment_ids)||void 0===a?void 0:a.map((function(t){var e;return null===(e=t.response)||void 0===e?void 0:e.id}))),t.next=5,(0,lt.VO)(G()(G()(G()({},s),e),{},{base_on_project:!0,homework_type:1,id:o.actionTabs.id}));case 5:0===t.sent.status&&(H.ZP.success("编辑成功"),T(s.categoryId),i({type:"classroomList/setActionTabs",payload:{key:"closePathsTabs"}}));case 7:case"end":return t.stop()}}),t)}))))},className:El.submit_button,children:"提交"})]})]},"bottom")})),Tl=n(26724),Nl=n.n(Tl),jl=n(9221),Il=["onResize","width"],Bl={header:{cell:function(t){var e=t.onResize,n=t.width,i=c()(t,Il);return n?(0,at.jsx)(jl.Resizable,{width:n,height:0,handle:(0,at.jsx)("span",{className:"react-resizable-handle",onClick:function(t){t.stopPropagation()}}),onResize:e,draggableOpts:{enableUserSelectHack:!1},children:(0,at.jsx)("th",G()({},i))}):(0,at.jsx)("th",G()({},i))}}},Ol=["pagination","resColumns","dataSource","onRow"],Dl=function(t){var e=t.pagination,n=t.resColumns,i=t.dataSource,r=t.onRow,o=c()(t,Ol),a=(0,h.useState)(!1),s=l()(a,2),u=s[0],d=(s[1],(0,h.useState)([{}])),f=l()(d,2),p=f[0],g=f[1],m=(0,h.useRef)(null);(0,h.useEffect)((function(){var t=n;t=t.map((function(t,e){return G()(G()({},t),{},{onHeaderCell:function(t){return{width:t.width,onResize:v(e)}}})})),g(t)}),[]),(0,h.useEffect)((function(){m.current=p}),[p]);var v=function(t){return function(e,n){var i=n.size,r=Y()(m.current);r[t]=G()(G()({},r[t]),{},{width:i.width}),g(r)}};return(0,at.jsx)("div",{children:(0,at.jsx)(Fe.Z,G()(G()({bordered:!0,components:Bl,columns:p,dataSource:i,pagination:e,loading:u,onRow:r},o),{},{rowKey:function(t){return t.key||t.id}}))})},Rl="hideHeadCheckbox___Hq5gw",Fl="tabSearch___NaKI4",zl="warpModal___HLUgh",Gl="modalColumn___F7R5w",Ul="modalRow___L6ghw",Hl="sup___VGKXV",_l="brief___LOzpE",Zl="contentTitle___xkdcN",Wl="content___Vtri0",Vl="antdTable___s8T2N",Yl="tableCell___kN9Fw",Xl="antdModal___WVBk3",ql="orangeColor___ryB2u",Kl=["isImportMultipleCourse"],Ql=function(t){var e=t.studentNames,n=t.total;return n>3?(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:ql,children:null==e?void 0:e.join("、")}),"等",(0,at.jsx)("span",{className:ql,children:n}),"名学生"]}):(0,at.jsxs)(at.Fragment,{children:["课堂内有",(0,at.jsx)("span",{className:ql,children:null==e?void 0:e.join("、")}),["","一","两","三"][n],"名学生"]})},Jl=function(t){var e=t.onCancel,n=t.onOk,i=t.visible,o=(t.inPaper,t.renderData),s=(t.type,t.isMultipleCourse),u=void 0!==s&&s,c=X.Z.useForm(),d=l()(c,1)[0],f=(0,h.useState)(1),p=l()(f,2),g=p[0],m=p[1],v=(0,h.useState)(!1),y=l()(v,2),w=y[0],b=y[1],x=(0,h.useMemo)((function(){return 1===(null==o?void 0:o.total_num)&&1===(null==o?void 0:o.can_copy_num)}),[o]),S=(0,h.useMemo)((function(){var t;return null==o||null===(t=o.course_data_list)||void 0===t?void 0:t.filter((function(t){return t.is_show}))}),[o]);return(0,at.jsx)(at.Fragment,{children:x?(0,at.jsxs)(U.Z,{centered:!0,closable:!0,open:i,destroyOnClose:!0,title:"提示",className:Xl,width:682,confirmLoading:w,onCancel:e,onOk:a()(r()().mark((function t(){var e,i,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return b(!0),e=g,u&&(a=G()({},d.getFieldsValue()),e=null==o||null===(i=o.course_data_list)||void 0===i?void 0:i.map((function(t){return void 0!==a[t.id]?G()(G()({},t),{},{is_copy:a[t.id]}):t}))),t.next=5,n(e);case 5:b(!1);case 6:case"end":return t.stop()}}),t)}))),children:[(0,at.jsx)("div",{className:Wl,style:{marginBottom:20},children:u?"检测到以下课堂已在教学课堂中使用,请问是否复制成新的实训发送至教学课堂中?":(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(Ql,{studentNames:null==o?void 0:o.student_names,total:null==o?void 0:o.student_count}),"学习过该实践项目。该项目支持复制,请选择是否将该项目复制为新项目发送至课堂中?"]})}),u?(0,at.jsx)(X.Z,{form:d,preserve:!1,children:null==S?void 0:S.map((function(t){return(0,at.jsxs)(h.Fragment,{children:[(0,at.jsx)("h3",{className:"ml15 mb5",children:t.name}),(0,at.jsx)(X.Z.Item,{name:t.id,initialValue:1,children:(0,at.jsxs)(ye.ZP.Group,{className:Wl,children:[(0,at.jsx)(ye.ZP,{value:1,style:{color:"#464f66"},children:"复制实训"}),(0,at.jsx)(ye.ZP,{value:0,style:{color:"#464f66"},children:"不复制实训"})]})})]},t.id)}))}):(0,at.jsxs)(ye.ZP.Group,{value:g,onChange:function(t){return m(t.target.value)},className:Wl,style:{marginBottom:30},children:[(0,at.jsx)(ye.ZP,{value:1,style:{color:"#464f66"},children:"复制"}),(0,at.jsx)(ye.ZP,{value:0,style:{color:"#464f66"},children:"不复制"})]}),(0,at.jsxs)("div",{children:[(0,at.jsx)("div",{className:Wl,style:{marginBottom:10},children:"* 说明:"}),(0,at.jsx)("div",{className:Wl,style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,at.jsx)("div",{className:"".concat(Wl," ").concat(ql),children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]})]}):(0,at.jsx)(U.Z,{centered:!0,closable:!0,destroyOnClose:!0,open:i,confirmLoading:w,title:"提示",width:682,onCancel:e,onOk:a()(r()().mark((function t(){var e,i,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return b(!0),e=0,u&&(a=G()({},d.getFieldsValue()),e=null==o||null===(i=o.course_data_list)||void 0===i?void 0:i.map((function(t){return void 0!==a[t.id]?G()(G()({},t),{},{is_use:a[t.id]}):t}))),t.next=5,n(e);case 5:b(!1);case 6:case"end":return t.stop()}}),t)}))),children:(0,at.jsxs)("div",{className:Wl,children:[(0,at.jsx)(Ql,{studentNames:null==o?void 0:o.student_names,total:null==o?void 0:o.student_count}),"学习过该实践项目。",u?(0,at.jsxs)(X.Z,{form:d,preserve:!1,children:[(0,at.jsx)("h3",{children:"当前实训不可复制,已经检测到以下课堂存在该实训,同一实训在课堂中重复使用时,会导致成绩互相影响,请确认是否继续使用"}),null==S?void 0:S.map((function(t){return(0,at.jsxs)(h.Fragment,{children:[(0,at.jsx)("h3",{className:"ml15 mb5",children:t.name}),(0,at.jsx)(X.Z.Item,{name:t.id,initialValue:1,children:(0,at.jsxs)(ye.ZP.Group,{className:Wl,children:[(0,at.jsx)(ye.ZP,{value:1,style:{color:"#464f66"},children:"继续使用"}),(0,at.jsx)(ye.ZP,{value:0,style:{color:"#464f66"},children:"不使用"})]})})]},t.id)}))]}):(0,at.jsxs)("div",{children:["该项目不支持复制,若确认继续发送,",(0,at.jsx)("span",{className:ql,children:"当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"}),"(如果不想清空学生之前的挑战记录,建议参照该实践项目的内容自行创建一个新的项目,或者尝试联系项目创建人开放本项目的复制权限)。"]})]})})})},$l=function(t){var e=X.Z.useForm(),n=l()(e,1)[0],i=(0,h.useState)(!1),o=l()(i,2),s=o[0],u=o[1],c=t.onCancel,d=t.onOk,f=t.visible,p=t.inPaper,g=void 0!==p&&p,m=t.renderData,v=t.type,y=t.isMultipleCourse,w=void 0!==y&&y,b=t.position,x=(0,h.useMemo)((function(){return g?[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:Yl,render:function(t,e){return(0,at.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:t})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(t,e){return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?e.stage_shixun_id:e.shixun_course_id||e.id),"is_copy"],initialValue:1,children:(0,at.jsxs)(ye.ZP.Group,{children:[(0,at.jsx)(ye.ZP,{value:1,children:"是"}),(0,at.jsx)(ye.ZP,{value:0,children:"否"})]})}),(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_use"],hidden:!0,initialValue:1,children:(0,at.jsx)(rt.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:Yl,render:function(t,e){return(0,at.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:t})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(t,e){return(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?e.stage_shixun_id:e.shixun_course_id||e.id),"is_use"],initialValue:1,children:(0,at.jsxs)(ye.ZP.Group,{children:[(0,at.jsx)(ye.ZP,{value:1,children:"是"}),(0,at.jsx)(ye.ZP,{value:0,children:"否"})]})})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(t,e){return(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?e.stage_shixun_id:e.shixun_course_id||e.id),"is_copy"],initialValue:1,children:(0,at.jsxs)(ye.ZP.Group,{children:[(0,at.jsx)(ye.ZP,{value:1,children:"是"}),(0,at.jsx)(ye.ZP,{value:0,children:"否"})]})})}}]}),[g]),S=(0,h.useMemo)((function(){return g?[{title:"实践项目名称",dataIndex:"name",width:424,className:Yl,align:"center",ellipsis:!0,render:function(t,e){return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:t}),(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_copy"],hidden:!0,initialValue:0,children:(0,at.jsx)(rt.Z,{type:"hidden"})}),(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_use"],hidden:!0,initialValue:1,children:(0,at.jsx)(rt.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,className:Yl,ellipsis:!0,align:"center",render:function(t,e){return(0,at.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:t})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(t,e){return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_use"],initialValue:0,children:(0,at.jsxs)(ye.ZP.Group,{children:[(0,at.jsx)(ye.ZP,{value:1,children:"是"}),(0,at.jsx)(ye.ZP,{value:0,children:"否"})]})}),(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_copy"],hidden:!0,initialValue:0,children:(0,at.jsx)(rt.Z,{type:"hidden"})})]})}}]}),[g]);if(w){var P={title:"课堂名称",ellipsis:!0,dataIndex:"course_name",width:190,align:"center",className:Yl,render:function(t,e){return(0,at.jsx)("a",{href:"/classrooms/".concat(e.course_id),children:t})}};x=[P].concat(Y()(x)),S=[P].concat(Y()(S))}var k=(0,h.useMemo)((function(){return function(t){var e=t.used,n=t.copy,i=t.canNotCopy,r=t.studentNames,o=t.studentCount,a=t.inPaper,s=t.is_random,l=void 0!==s&&s,u=t.position,c=(void 0===u?"":u)||(a?"试卷":"课程");return(0,at.jsxs)("span",{children:[(0,at.jsx)(Ql,{studentNames:r,total:o}),"学习过",c,"中的",(0,at.jsx)("span",{className:ql,children:e}),"个项目,",n>0&&i>0?(0,at.jsxs)(at.Fragment,{children:["其中",(0,at.jsx)("span",{className:ql,children:n}),"个项目支持复制,",(0,at.jsx)("span",{className:ql,children:i}),"个项目不支持复制"]}):n>0&&0===i?(0,at.jsxs)(at.Fragment,{children:["其中",(0,at.jsx)("span",{className:ql,children:n}),"个项目支持复制"]}):0===n&&i>0?(0,at.jsxs)(at.Fragment,{children:["其中",(0,at.jsx)("span",{className:ql,children:i}),"个项目不支持复制"]}):void 0,"。请选择",l?"":"是否继续使用和","是否复制为新项目发送至课堂中?"]})}({used:null==m?void 0:m.repeat_shixun_num,copy:null==m?void 0:m.can_copy_num,canNotCopy:null==m?void 0:m.no_copy_num,studentNames:null==m?void 0:m.student_names,studentCount:null==m?void 0:m.student_count,is_random:null==m?void 0:m.is_random,inPaper:g,position:b})}),[m,g,b]);return(0,at.jsx)(U.Z,{title:"提示",centered:!0,open:f,confirmLoading:s,onOk:a()(r()().mark((function t(){var e,i;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u(!0),e=n.getFieldsValue(),i=Object.keys(e).map((function(t){return{id:parseInt(t.split("_")[0]),course_id:parseInt(t.split("_")[1]),is_use:e[t].is_use,is_copy:e[t].is_copy}})),t.next=5,d(i);case 5:u(!1);case 6:case"end":return t.stop()}}),t)}))),onCancel:c,width:880,okText:"确认",className:Xl,destroyOnClose:!0,children:(0,at.jsxs)(X.Z,{form:n,preserve:!1,children:[(0,at.jsx)("div",{className:_l,children:k}),(0,at.jsxs)("div",{style:{marginBottom:30},children:[(0,at.jsx)("div",{style:{marginBottom:20},children:"* 说明"}),(0,at.jsx)("div",{style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,at.jsx)("div",{className:ql,children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]}),(null==m?void 0:m.can_copy_num)>0&&(0,at.jsxs)("div",{children:[(0,at.jsx)("div",{className:Zl,children:"支持复制的项目"}),(0,at.jsx)(Fe.Z,{columns:x,className:Vl,dataSource:null==m?void 0:m.can_copy_list,rowKey:"subject"===v?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})]}),(null==m?void 0:m.no_copy_num)>0&&(0,at.jsxs)("div",{children:[(0,at.jsx)("div",{className:Zl,children:"不支持复制的项目"}),(0,at.jsx)(Fe.Z,{columns:S,className:Vl,dataSource:null==m?void 0:m.no_copy_list,rowKey:"subject"===v?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})]}),(null==m?void 0:m.no_use_list.length)>0&&(null==m?void 0:m.no_use_list.map((function(t){return(0,at.jsxs)("div",{children:[(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?null==t?void 0:t.stage_shixun_id:t.shixun_course_id||t.id),"is_copy"],hidden:!0,initialValue:0,children:(0,at.jsx)(rt.Z,{type:"hidden"})}),(0,at.jsx)(X.Z.Item,{name:["".concat("subject"===v?null==t?void 0:t.stage_shixun_id:t.shixun_course_id||t.id),"is_use"],hidden:!0,initialValue:1,children:(0,at.jsx)(rt.Z,{type:"hidden"})})]},"subject"===v?t.stage_shixun_id:t.shixun_course_id||t.id)})))]})})},tu=function(t){return"multiple"===t.modalType?(0,at.jsx)($l,G()({},t)):(0,at.jsx)(Jl,G()({},t))},eu=n(12554),nu=De.Z.TabPane,iu=(0,d.connect)((function(t){return{exercise:t.exercise,loading:t.loading,classroomList:t.classroomList}}))((function(t){t.classroomList;var e,n=t.exercise,i=t.saveExercise,o=(t.loading,t.dispatch),s=(0,d.useParams)(),u=((0,d.useLocation)(),X.Z.useForm()),f=(l()(u,1)[0],n.brankList,(0,h.useState)(!0)),p=l()(f,2),g=p[0],m=p[1],v=(0,h.useState)(!1),y=l()(v,2),w=y[0],b=y[1],x=(0,h.useState)("myself"),S=l()(x,2),P=S[0],k=S[1],C=(0,h.useState)([]),A=l()(C,2),M=A[0],E=A[1],L=(0,h.useState)([]),T=l()(L,2),N=T[0],j=T[1],I=(0,h.useState)(),B=l()(I,2),O=B[0],D=B[1],R=(0,h.useState)([]),z=l()(R,2),_=z[0],W=z[1],V=(0,h.useRef)(null),q=(0,h.useState)(!1),Q=l()(q,2),J=Q[0],$=Q[1],tt=(0,h.useState)(""),et=l()(tt,2),nt=et[0],it=et[1],ot=(0,h.useState)(""),st=l()(ot,2),lt=st[0],ut=st[1],ct=[{title:"试卷名称",dataIndex:"name",width:150,ellipsis:!0,align:"left"},{title:"方向&课程",dataIndex:"course_list_name",width:150,ellipsis:!0,align:"left"},{title:"类型",dataIndex:"is_random",width:90,align:"left",render:function(t){return t?"随机组卷":"人工组卷"}},{title:"更新时间",dataIndex:"updated_at",width:150,align:"left"},{title:"试题数",dataIndex:"item_num",width:60,align:"center"},{title:"总分",dataIndex:"total_score",width:60,align:"center"},{title:"操作",dataIndex:"is_random",width:60,align:"center",render:function(t,e){return(0,at.jsx)("a",{href:t?"/randompaper/detail/".concat(e.id):"/paperlibrary/see/".concat(e.id,"?defaultActiveKey=").concat("public"==(null==ft?void 0:ft.filter)?"1":"teacher"==(null==ft?void 0:ft.filter)?"2":"0"),target:"_blank>",children:"预览"})}}],ht=(0,h.useState)({page:0,limit:20,group_id:null,object_type:"examination_bank",search:"",filter:"myself",is_random:null,is_encrypt:0}),dt=l()(ht,2),ft=dt[0],pt=dt[1];(0,h.useEffect)((function(){"试卷选用"===n.actionTabs.key&&(vt(),W([]),gt())}),[n.actionTabs.key]);var gt=function(){var t=a()(r()().mark((function t(){var e;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o({type:"paperlibrary/getTeachGroupData"});case 2:e=t.sent,j(e);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),mt=function(t){var e=parseInt(t);return isNaN(e)?"":e},vt=function(){var t=a()(r()().mark((function t(){var e,n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!g){t.next=12;break}return++ft.page,m(!1),ft.is_random="myself"==ft.filter?2:null,t.next=6,o({type:"exercise/getBrankList",payload:G()({},ft)});case 6:n=t.sent,M=null!=n&&n.object_list?Y()(M.concat(null==n?void 0:n.object_list)):M,D(n.is_teacher),(null===(e=n.object_list)||void 0===e?void 0:e.length)50?"block":"none"}})]}),(0,at.jsx)("div",{style:{display:"none",marginLeft:106},id:"model_error",className:"c-red",children:"请输入1-50之间的整数"})]}),okText:"确认",cancelText:"取消",onCancel:wt,onOk:function(){var t=a()(r()().mark((function t(){var e;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(c<1||c>50)){t.next=4;break}return document.getElementById("model_error").style.display="block",t.abrupt("return",Promise.reject());case 4:return h.update({cancelButtonProps:{disabled:!0}}),t.next=7,o({type:"exercise/saveBanks",payload:{course_id:s.coursesId,object_type:"examination_bank",bank_id:_,shixuns_info:l,num:c}});case 7:e=t.sent,h.update({cancelButtonProps:{disabled:!1}}),e&&0===e.status?((0,F.L9)(["教学课堂","试卷","试卷选用"]),U.Z.destroyAll(),o({type:"classroomList/getClassroomExercisesList",payload:G()({},n.actionTabs.params)}),wt(),Pt(),H.ZP.success("生成试卷成功")):(wt(),Pt());case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());return(0,at.jsxs)(at.Fragment,{children:[(0,at.jsxs)(U.Z,{centered:!0,width:980,title:"选择试卷",maskClosable:!1,destroyOnClose:!0,open:"试卷选用"===n.actionTabs.key,okText:"确定",cancelText:"取消",confirmLoading:w,bodyStyle:{minHeight:200},wrapClassName:zl,onOk:a()(r()().mark((function t(){var e;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_.length){t.next=3;break}return H.ZP.error("请选择试卷"),t.abrupt("return");case 3:if(b(!0),e=!1,!1,M.forEach((function(t){_.includes(t.id)&&t.need_authorize&&(e=t.need_authorize),_.includes(t.id)&&t.is_random})),!e){t.next=10;break}return Ba(!1,"该试卷中包含实训需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。"),t.abrupt("return");case 10:i(_[0]),wt(),b(!1);case 13:case"end":return t.stop()}}),t)}))),onCancel:wt,children:[(0,at.jsxs)(De.Z,{activeKey:P,onTabClick:function(){var t=a()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:V.current.scrollTop=0,M=[],P!==e&&W([]),k(e),ft.page=0,ft.filter=e,ft.group_id=null,g=!0,vt();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),children:[(0,at.jsx)(nu,{tab:(0,at.jsx)("span",{children:"我的试卷库"})},"myself"),(0,at.jsx)(nu,{tab:(0,at.jsx)("span",{children:"教研共享"})},"teacher"),(0,at.jsx)(nu,{tab:(0,at.jsx)("span",{children:"公共试卷库"})},"public")]}),(0,at.jsxs)("div",{className:Fl,children:["teacher"===P&&(0,at.jsxs)(Re.default,{value:ft.group_id,onChange:function(t){V.current.scrollTop=0,M=[],ft.page=0,ft.group_id=t,g=!0,W([]),pt(G()({},ft)),vt()},size:"middle",style:{width:200,marginRight:30},children:[(0,at.jsx)(Re.default.Option,{value:null,children:"全部教研团队"}),null==N||null===(e=N.groups)||void 0===e?void 0:e.map((function(t){return(0,at.jsx)(Re.default.Option,{value:null==t?void 0:t.group_id,children:null==t?void 0:t.name},null==t?void 0:t.group_id)}))]}),(0,at.jsx)(rt.Z.Search,{placeholder:"请输入试卷名称进行搜索",value:ft.search,onChange:function(t){ft.search=t.target.value,pt(G()({},ft))},onSearch:function(t){V.current.scrollTop=0,M=[],ft.page=0,g=!0,W([]),t&&(0,eu.tk)({name:t,copywriting:t,position:"Exercise"}),vt()}})]}),(0,at.jsxs)("div",{ref:V,style:{maxHeight:350,overflowY:"auto",overflowX:"hidden",marginTop:10,paddingBottom:20},children:[!O&&"public"===P&&(0,at.jsxs)("div",{style:{display:"flex",flexDirection:"column",paddingTop:"30px",alignItems:"center",justifyContent:"center"},children:[(0,at.jsx)("span",{children:"通过职业认证的教师才能访问公共课程资源库"}),(0,at.jsx)("p",{style:{cursor:"pointer",background:"#ff6800",height:"30px",textAlign:"center",marginTop:"5px",padding:"5px 0px",color:"#fff",width:"80px"},onClick:function(){window.open("/account/certification")},children:"立即认证"})]}),(0,at.jsx)(Nl(),{initialLoad:!1,pageStart:0,loadMore:function(){vt()},hasMore:g,useWindow:!1,children:"试卷选用"===n.actionTabs.key&&O&&(0,at.jsx)(Dl,{className:Rl,pagination:!1,hideSelectAll:!0,dataSource:M,onRow:function(t){return{onClick:function(){W([null==t?void 0:t.id])}}},resColumns:ct,rowSelection:yt})})]})]}),(0,at.jsx)(U.Z,{title:"提示",open:J,confirmLoading:!1,centered:!0,okText:"设置规则",cancelText:"修改试卷",footer:(0,at.jsxs)("div",{children:[(0,at.jsx)(K.ZP,{onClick:function(){$(!1),d.history.push(lt)},children:"修改试卷"}),(0,at.jsx)(K.ZP,{type:"primary",onClick:function(){d.history.push(nt),$(!1)},children:"设置规则"})]}),onCancel:function(){$(!1)},children:(0,at.jsx)("p",{children:"试卷创建完成!目前处于未发布状态,是否设置考试规则?"})}),(0,at.jsx)(tu,{inPaper:!0,visible:St,onCancel:Pt,onOk:Ct,renderData:kt,modalType:"multiple",type:"examination_bank"})]})})),ru=n(61621),ou={delay_publish:0,is_public:[!1],description:"",title:"",link:"",publish_time:""},au=(0,d.connect)((function(t){var e=t.attachment,n=t.loading;return{attachment:e,globalSetting:t.globalSetting,loading:n,user:t.user}}))((function(t){var e=t.attachment,n=t.dispatch,i=t.loading,o=t.globalSetting,s=(0,d.useParams)(),u=(e.detail,X.Z.useForm()),c=l()(u,1)[0],f=(0,h.useState)(!1),p=l()(f,2),g=p[0],m=p[1],v=(0,h.useState)([]),y=l()(v,2),w=y[0],b=y[1],x=(0,h.useState)(G()({},ou)),S=l()(x,2),P=S[0],k=S[1],C=(0,h.useState)({name:"",filename:"",type:"",className:"",data:"",close:!0,style:{position:"fixed",zIndex:9999,background:"rgba(0,0,0,.7)"},disabledDownload:!1,monacoEditor:{value:"",language:"",theme:"vs",options:{readOnly:!0}}}),A=l()(C,2),M=A[0],E=A[1];s.id=s.coursesId,s.course_id=s.coursesId;var L=function(){var t=a()(r()().mark((function t(){var i,o,a,l,u,h,d;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={},a="课程内教学课件预览"==(null==e||null===(i=e.actionTabs)||void 0===i||null===(i=i.params)||void 0===i?void 0:i.openType)?G()({},e.actionTabs.params):G()({},s),t.next=4,n({type:"attachment/getDetail",payload:a});case 4:(l=t.sent).delay_publish=l.delay_publish?1:0,P.is_public=[l.is_public],P.description=l.description,P.delay_publish=l.delay_publish,P.publish_time=l.publish_time,c.setFieldsValue(P),b([G()({},l)].concat(Y()(null==l?void 0:l.attachment_histories))),null!=l&&null!==(o=l.attachment_histories)&&void 0!==o&&o.length?m(!0):(M.type=l.file_type,M.data=fi.Z.API_SERVER+l.url,M.recordInfo={id:null==e||null===(u=e.actionTabs)||void 0===u||null===(u=u.selectArrs)||void 0===u?void 0:u.id,course_id:null==e||null===(h=e.actionTabs)||void 0===h||null===(h=h.params)||void 0===h?void 0:h.course_id},"txt"===l.file_type&&(M.monacoEditor.value=l.content),M.disabledDownload=(0,xt.dE)()&&Boolean(null==e||null===(d=e.actionTabs)||void 0===d||null===(d=d.selectArrs)||void 0===d?void 0:d.download_setting),E(G()({},M)));case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,h.useEffect)((function(){var t;"资源下载"===e.actionTabs.key?(s.id=null===(t=e.actionTabs.selectArrs)||void 0===t?void 0:t.id,c.resetFields(),L()):m(!1)}),[e.actionTabs.key,s.id]),(0,h.useEffect)((function(){return function(){E(G()(G()({},M),{},{type:""})),n({type:"attachment/setActionTabs",payload:{}})}}),[]),(0,at.jsxs)(at.Fragment,{children:[(0,at.jsx)(U.Z,{centered:!0,title:"资源下载",open:g,okText:"确定",destroyOnClose:!0,maskClosable:!1,cancelText:"取消",width:600,onOk:a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n({type:"attachment/setActionTabs",payload:{}});case 1:case"end":return t.stop()}}),t)}))),onCancel:function(){k(G()({},ou)),n({type:"attachment/setActionTabs",payload:{}})},children:(0,at.jsx)("section",{className:"pl20 pr20 pt10",children:(0,at.jsxs)(ru.Z,{loading:i["attachment/getDetail"],active:!0,avatar:{size:40},paragraph:{rows:5},className:"mt30",children:[(0,at.jsxs)(Q.Z,{align:"middle",justify:"center",style:{background:"#eee"},gutter:[20,8],children:[(0,at.jsx)(J.Z,{flex:"307px",children:"资源名称"}),(0,at.jsx)(J.Z,{flex:"80px",children:"下载"}),(0,at.jsx)(J.Z,{flex:"140px",children:"版本号"})]}),null==w?void 0:w.map((function(t,n){return(0,at.jsxs)(Q.Z,{align:"middle",justify:"center",style:{borderBottom:"1px solid #eaeaea"},gutter:[20,8],children:[(0,at.jsx)(J.Z,{flex:"307px",children:(0,at.jsx)(tt.Z,{title:t.title,children:(0,at.jsxs)(Q.Z,{children:[(0,at.jsx)(J.Z,{children:(0,at.jsx)("a",{href:fi.Z.API_SERVER+t.url,target:"_blank",className:"multi_ellipsis1 c-grey-333 mr5",onClick:function(n){var i;t.link||"application/pdf"===t.content_type||o.setting.is_local||(n.preventDefault(),M.type=t.file_type,M.data=fi.Z.API_SERVER+t.url,"txt"===t.file_type&&(M.monacoEditor.value=t.content),M.disabledDownload=(0,xt.dE)()&&Boolean(null==e||null===(i=e.actionTabs)||void 0===i||null===(i=i.selectArrs)||void 0===i?void 0:i.download_setting),E(G()({},M)))},children:t.title})}),(0,at.jsx)(J.Z,{children:(0,at.jsx)(Oe,{className:"",color:0===n?"green":"orange",children:0===n?"当前版本":"历史版本"})})]})})}),(0,at.jsx)(J.Z,{flex:"80px",children:t.downloads_count}),(0,at.jsx)(J.Z,{flex:"140px",children:nn()(t.created_on).format("YYYY-MM-DD HH:mm")})]},n)}))]})})}),(0,at.jsx)(dn.Z,G()(G()({},M),{},{onClose:function(){E(G()(G()({},M),{},{type:""})),n({type:"attachment/setActionTabs",payload:{}})}}))]})})),su=["pathsDetail","user","loading","dispatch","classroomList"],lu=function(t){return t.All="",t.Shixun="shixun",t.VideoItem="video",t.Attachment="attachment",t.group_count="group_homework",t.normal_count="normal_homework",t.ExaminationBank="exercise",t.HomeworkCommon="hack_homework",t.Discusses="Discusses",t.Challenge="challenge",t}(lu||{}),uu=(0,d.connect)((function(t){var e=t.pathsDetail,n=t.user,i=t.loading,r=t.classroomList;return{pathsDetail:e,user:n,loading:i.effects,classroomList:r}}))((function(t){var e,n,i,o,s,u=t.pathsDetail,f=t.user,p=t.loading,g=t.dispatch,m=t.classroomList,v=(c()(t,su),null===(e=(0,F.cV)())||void 0===e||e.url,(null===(n=(0,F.cV)())||void 0===n?void 0:n.conversable_id)||""),y=((0,d.useParams)(),u.stageData),w=u.visibleType,b=void 0===w?"All":w,x=u.keywords,S=u.editKey,P=null==u?void 0:u.detail,k=P.shixuns_count,C=void 0===k?0:k,A=P.videos_count,M=void 0===A?0:A,E=P.attachment_count,L=void 0===E?0:E,T=P.chapter_statis,N=P.group_count,j=void 0===N?0:N,I=P.normal_count,B=void 0===I?0:I,O=(P.disscuss_count,P.banks_count),D=void 0===O?0:O,R=P.hack_count,z=void 0===R?0:R,U=(0,h.useState)([]),Z=l()(U,2),V=Z[0],Y=Z[1],X=(0,h.useState)({content:"",type:""}),q=l()(X,2),K=q[0],Q=q[1],J=(0,h.useState)([]),$=l()(J,2),tt=$[0],et=($[1],(0,h.useState)("All")),nt=l()(et,2),it=nt[0],rt=nt[1],ot=(0,h.useState)(""),st=l()(ot,2),ut=st[0],ct=st[1],ht=St(lt.CI,{}),dt=l()(ht,3),ft=(dt[1],dt[2],null!==(i=u.detail)&&void 0!==i&&i.can_managed,[{name:"全部",type:"All",number:C+M+L+j+B+D+z+((null==T?void 0:T.challenge_count)||0),isShow:!0},{name:"实践项目",type:"Shixun",number:C,isShow:C>0},{name:"视频",type:"VideoItem",number:M,isShow:M>0},{name:"课件",type:"Attachment",number:L,isShow:L>0},{name:"关卡",type:"Challenge",number:null==T?void 0:T.challenge_count,isShow:(null==T?void 0:T.challenge_count)>0},{name:"分组作业",type:"group_count",number:j,isShow:!(0,xt.JA)()&&j>0},{name:"图文作业",type:"normal_count",number:B,isShow:!(0,xt.JA)()&&B>0},{name:"编程作业",type:"HomeworkCommon",number:z,isShow:!(0,xt.JA)()&&z>0},{name:"测验",type:"ExaminationBank",number:D,isShow:!(0,xt.JA)()&&D>0}].filter((function(t){return t.isShow}))),pt=function(){var t=a()(r()().mark((function t(){var e,n=arguments;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.next=3,g({type:"pathsDetail/getStageData",payload:G()(G()({tab:lu[b]},e),{},{subject_id:v,keywords:x})});case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),gt=function(){var t=a()(r()().mark((function t(){var e,n,i,o=arguments;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==(e=o.length>0&&void 0!==o[0]?o[0]:{})||!e.stage_id){t.next=7;break}return t.next=4,g({type:"pathsDetail/getStageChildrenData",payload:{id:null==e?void 0:e.stage_id,type:"stage",keywords:x,tab:lu[b]}});case 4:n=t.sent,i=V.map((function(t){var i;return t.stage_id==(null==e?void 0:e.stage_id)?G()(G()(G()({},t),e),{},{items:null===(i=n.data)||void 0===i?void 0:i.items}):t})),g({type:"pathsDetail/save",payload:{stageData:i}});case 7:g({type:"pathsDetail/getPathsDetail",payload:{id:v}});case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),mt=(0,h.useMemo)((function(){return null==V?void 0:V.map((function(t,e){return(0,at.jsx)("div",{children:(0,at.jsx)(Es,{val:t,allData:V,index:e,selectExercise:function(t){ct(null==t?void 0:t.stage_id),g({type:"exercise/setActionTabs",payload:{key:"试卷选用"}})},openPreview:function(t){var e,n;null!=t&&t.container_id?g({type:"attachment/setActionTabs",payload:{key:"资源下载",selectArrs:null==t?void 0:t.attachment_detail,params:{course_id:null==t?void 0:t.container_id,coursesId:null==t?void 0:t.container_id,id:null==t?void 0:t.id,openType:"课程内教学课件预览"}}}):Q({content:fi.Z.API_SERVER+(null==t||null===(e=t.attachment_detail)||void 0===e?void 0:e.url),type:null==t||null===(n=t.attachment_detail)||void 0===n?void 0:n.file_type})},visibleTypeNew:it,UpdataStageChildrenData:gt,getData:gt})},e)}))}),[V,it]);return(0,h.useEffect)((function(){Y(y)}),[y]),(0,h.useEffect)((function(){console.log(555)}),[]),(0,h.useEffect)((function(){"closePathsTabs"==m.actionTabs.key&>({stage_id:ut||(null==u?void 0:u.stage_id)})}),[m.actionTabs.key]),(0,at.jsxs)("section",{children:[(0,at.jsxs)(_.Z,{spinning:p["pathsDetail/getStageChildrenData"]||p["pathsDetail/getStageData"]||p["pathsDetail/getPathsDetail"],children:[(0,at.jsx)("aside",{className:W.actionTabs,children:ft.map((function(t,e){return(0,at.jsxs)("div",{className:"".concat(t.type===b?W.tabActive:W.tab),onClick:function(){-1===S?("group_count"==t.type||"normal_count"==t.type?rt("SubjectHomework"):rt(t.type),"Discusses"!==t.type&&pt({tab:lu[t.type]}),g({type:"pathsDetail/save",payload:{visibleType:t.type,editKey:-1}})):H.ZP.warning("请先取消编辑状态")},children:[(0,at.jsx)("span",{className:W.s1,children:t.name}),(0,at.jsx)("span",{className:W.s2,children:t.number})]},e)}))}),"Discusses"!==b&&(0,at.jsxs)(at.Fragment,{children:[mt,0===(null==V?void 0:V.length)&&(0,at.jsx)(Ve.Z,{styles:{backgroundColor:"#fff",padding:"100px 0",margin:"20px auto"}})]}),"Discusses"===b&&(0,at.jsx)("aside",{className:"mt20",children:(0,at.jsx)(Qs,{activeIndex:3,isDelete:null===(o=u.detail)||void 0===o?void 0:o.allow_add_member,shixunIdentifier:11,identity:null===(s=f.userInfo)||void 0===s?void 0:s.role,user:f.userInfo,isShixunDetail:!0,keywords:x,refreshCount:function(){g({type:"pathsDetail/getPathsDetail",payload:{id:v,keywords:x}})}})})]}),(0,at.jsx)(pl,{}),(0,at.jsx)(kt,{shixunIds:tt,cb:function(t){var e;"取消"!==t&>({stage_id:null==m||null===(e=m.actionTabs)||void 0===e?void 0:e.id})}}),(0,at.jsx)(Pl,{}),(0,at.jsx)(Cl,{}),(0,at.jsx)(Ml,{}),(0,at.jsx)(Ll,{}),(0,at.jsx)(iu,{saveExercise:function(t){(0,lt._C)({id:ut,subject_id:v,homework_type:"exercise",examination_bank_ids:[t]}).then((function(t){0==(null==t?void 0:t.status)&&(H.ZP.success("选用成功"),gt({stage_id:ut||(null==u?void 0:u.stage_id)}))}))}}),(0,at.jsx)(au,{}),(0,at.jsx)(dn.Z,{close:!0,data:null==K?void 0:K.content,type:null==K?void 0:K.type,hasMask:!0,monacoEditor:{language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onClose:function(){Q({content:"",type:""})}})]})})),cu=["homePage","loading","globalSetting","user","dispatch","location","pathsDetail"],hu=[{img:n(20828),name:"视频资源",content:"平台提供课程讲解视频、实验演示视频、习题讲解视频、知识点总结视频等多种类型的视频资料。"},{img:n(13129),name:"课件文档",content:"平台提供 PPT、PDF、Word 等多种格式的课件文档,方便教师根据实际需求进行使用。"},{img:n(99127),name:"数据集",content:"提供丰富的数据集,涵盖图像、文本、语音等多种类型"},{img:n(4575),name:"试题",content:"平台提供选择题、填空题、判断题、多选题、编程题、简答题、组合题、程序设计题等多种题型,满足不同的练习需求。"}],du=[{img:n(67836),name:"教师备课",content:"为学生提供 7*24 小时在线答疑服务解答学习疑问,提供学习建议"},{img:n(48739),name:"课堂教学",content:"教师可以利用平台资源进行课堂AI教学,增强课堂互动性和趣味性"},{img:n(3647),name:"自主学习",content:"学生可以基于平台资源个性化推荐资源自主学习,拓展知识面,提升学习效率"}],fu=(0,d.connect)((function(t){return{loading:t.loading,globalSetting:t.globalSetting,user:t.user,homePage:t.homePage,pathsDetail:t.pathsDetail}}))((function(t){var e,i,o=t.homePage,s=(t.loading,t.globalSetting,t.user,t.dispatch),u=(t.location,t.pathsDetail),d=(c()(t,cu),(0,h.useState)(0)),z=l()(d,2),G=z[0],U=z[1],H=(0,h.useState)(0),_=l()(H,2),Z=_[0],W=_[1],V=(0,h.useState)(null),Y=l()(V,2),X=(Y[0],Y[1],(0,h.useState)(!1)),q=l()(X,2),K=(q[0],q[1],(0,h.useState)("Subject"===(0,F.cV)().questionable_type?1:2)),Q=l()(K,2),J=Q[0],$=Q[1],tt=null==u?void 0:u.detail,et=tt.shixuns_count,nt=void 0===et?0:et,it=tt.videos_count,rt=void 0===it?0:it,ot=tt.attachment_count,st=void 0===ot?0:ot,lt=tt.chapter_statis,ut=tt.group_count,ct=void 0===ut?0:ut,ht=tt.normal_count,dt=void 0===ht?0:ht,ft=(tt.disscuss_count,tt.banks_count),pt=void 0===ft?0:ft,gt=tt.hack_count,mt=void 0===gt?0:gt;(0,h.useEffect)((function(){s({type:"homePage/home",payload:{}})}),[]),(0,h.useEffect)((function(){vt()}),[]);var vt=function(){var t=a()(r()().mark((function t(){var e,n,i;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("Subject"===(0,F.cV)().questionable_type){t.next=2;break}return t.abrupt("return");case 2:return n=null===(e=(0,F.cV)())||void 0===e?void 0:e.conversable_id,t.next=5,s({type:"pathsDetail/getPathsDetail",payload:{id:n}});case 5:return i=t.sent,t.next=8,s({type:"pathsDetail/getStageData",payload:{subject_id:n,show_course_section:null==i?void 0:i.show_course_section}});case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),yt=(null==o||null===(e=o.shixun_demo)||void 0===e?void 0:e.length)>0?null==o?void 0:o.shixun_demo.filter((function(t){return"智能助教"!==t.name&&"智能课程"!==t.name})):[],wt="Subject"===(0,F.cV)().questionable_type?[{id:1,name:"本课程智慧资源概览"},{id:0,name:"智慧资源开发环境"},{id:2,name:"智慧资源简介"}]:[{id:2,name:"智慧资源简介"}],bt=[{img:n(20614),name:"资源总数",count:nt+rt+st+ct+dt+pt+mt+((null==lt?void 0:lt.challenge_count)||0)},{img:n(16702),name:"实践项目数",count:nt},{img:n(1426),name:"视频数",count:rt},{img:n(70521),name:"课件",count:st},{img:n(72838),name:"作业数",count:ct+dt+mt},{img:n(45787),name:"测验数",count:pt}];return(0,at.jsx)("div",{className:k,children:(0,at.jsxs)("div",{className:C,children:[(0,at.jsx)(R.Z,{title:"智慧资源",subTitle:"汇聚海量资源,打造智慧教育生态"}),(0,at.jsx)(D.Z,{dataSource:wt,className:"mt20",value:J,onChange:function(t){var e,n;0===t?(0,F.xg)((null===(e=(0,F.cV)())||void 0===e?void 0:e.url)+"/paths/".concat(null===(n=(0,F.cV)())||void 0===n?void 0:n.conversable_id,"?skipSource=ai")):$(t)}}),1===J&&(0,at.jsxs)("div",{className:I,children:[(0,at.jsx)("div",{className:B,children:bt.map((function(t){return(0,at.jsxs)("aside",{children:[(0,at.jsx)("img",{src:t.img}),(0,at.jsx)("div",{className:"font16 c-grey-666 mt20 mb6",children:t.name}),(0,at.jsx)("b",{className:"font24 c-grey-333",children:t.count})]})}))}),(0,at.jsx)("div",{className:O,children:(0,at.jsx)(uu,{keywords:""})})]}),2===J&&(0,at.jsxs)("div",{children:[(0,at.jsxs)("div",{style:{marginTop:30,display:"flex",border:"1px solid #E7EEFF",borderRadius:20},children:[(0,at.jsxs)("div",{className:A,children:[(0,at.jsxs)("div",{children:[(0,at.jsx)("div",{className:v,children:"实验资源"}),(0,at.jsx)("div",{className:f,style:{width:80,marginTop:24},children:yt.map((function(t,e){return(0,at.jsx)("div",{className:"".concat(p," ").concat(G===e?g:""),onClick:function(){return U(e)},children:null==t?void 0:t.name},e)}))})]}),(0,at.jsx)("div",{className:m,children:(0,at.jsx)("video",{src:null===(i=yt[G])||void 0===i?void 0:i.video,controls:!0,autoPlay:!0,controlsList:"nodownload",onEnded:function(){U(G+1>=yt.length?0:G+1)},style:{width:"100%",height:"100%",objectFit:"fill"}})})]}),(0,at.jsxs)("div",{className:M,children:[(0,at.jsx)("div",{className:E,children:"智慧资源,赋能教育创新未来"}),(0,at.jsx)("div",{className:L,children:"人工智能与智慧资源的深度融合,基于学生学习数据和行为分析,精准推荐个性化学习资源,实时评估学习进度并提供个性化建议,帮助学生查漏补缺。同时提供在线答疑服务,即时解答学生疑问,打造高效、智能的学习体验。"})]})]}),(0,at.jsxs)("div",{style:{marginTop:20,display:"flex"},children:[(0,at.jsxs)("div",{className:N,style:{width:552},children:[(0,at.jsxs)("div",{style:{display:"flex"},children:[(0,at.jsx)("div",{className:T,style:{flex:1},children:"学习资源"}),(0,at.jsx)("div",{className:"flex item-center",style:{height:32},children:hu.map((function(t,e){return(0,at.jsx)("div",{className:"".concat(y," ").concat(Z===e?w:""),onClick:function(){return W(e)},children:t.name},e)}))})]}),(0,at.jsxs)("div",{className:j,children:[(0,at.jsx)("img",{src:hu[Z].img}),(0,at.jsx)("div",{style:{marginTop:17,color:"#191919",fontSize:14},children:hu[Z].content})]})]}),(0,at.jsxs)("div",{className:N,style:{width:428,marginLeft:20},children:[(0,at.jsx)("div",{className:T,children:"应用场景"}),(0,at.jsx)("div",{style:{marginTop:20},children:du.map((function(t,e){return(0,at.jsxs)("div",{className:b,children:[(0,at.jsx)("img",{src:t.img,width:114,height:84}),(0,at.jsxs)("div",{className:S,children:[(0,at.jsx)("div",{className:x,children:t.name}),(0,at.jsx)("div",{className:P,children:t.content})]})]},e)}))})]})]})]})]})})}))},8944:function(){},93125:function(t,e,n){var i;i=function(){return function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[a]={exports:{}};e[a][0].call(u.exports,(function(t){return r(e[a][1][t]||t)}),u,u.exports,t,e,n,i)}return n[a].exports}for(var o=void 0,a=0;a0?e["Content-Type"]=t.mime:e["Content-Type"]=d.getType(t.mime||c.extname(t.object||""))||"application/octet-stream"),t.content&&(e["Content-Md5"]=u.createHash("md5").update(new i(t.content,"utf8")).digest("base64"),e["Content-Length"]||(e["Content-Length"]=t.content.length));var n=this._getResource(t);e.authorization=this.authorization(t.method,n,t.subres,e);var r=this._getReqUrl(t);l("request %s %s, with headers %j, !!stream: %s",t.method,r,e,!!t.stream);var o=t.timeout||this.options.timeout;return{url:r,params:{agent:this.agent,method:t.method,content:t.content,stream:t.stream,headers:e,timeout:o,writeStream:t.writeStream,customResponse:t.customResponse,ctx:t.ctx||this.ctx}}},E.request=a.default.mark((function t(e){var n,i,r,o;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.createRequest(e),i=void 0,r=void 0,t.prev=3,t.next=6,this.urllib.request(n.url,n.params);case 6:i=t.sent,l("response %s %s, got %s, headers: %j",e.method,n.url,i.status,i.headers),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),r=t.t0;case 13:if(o=void 0,!i||!e.successStatuses||-1!==e.successStatuses.indexOf(i.status)){t.next=26;break}return t.next=17,this.requestError(i);case 17:if("RequestTimeTooSkewed"!==(o=t.sent).code){t.next=23;break}return this.options.amendTimeSkewed=+new Date(o.serverTime)-new Date,t.next=22,this.request(e);case 22:return t.abrupt("return",t.sent);case 23:o.params=e,t.next=30;break;case 26:if(!r){t.next=30;break}return t.next=29,this.requestError(r);case 29:o=t.sent;case 30:if(!o){t.next=32;break}throw o;case 32:if(!e.xmlResponse){t.next=36;break}return t.next=35,this.parseXML(i.data);case 35:i.data=t.sent;case 36:return t.abrupt("return",i);case 37:case"end":return t.stop()}}),t,this,[[3,10]])})),E._getResource=function(t){var e="/";return t.bucket&&(e+=t.bucket+"/"),t.object&&(e+=t.object),e},E._isIP=function(t){return A._isIP(t)},E._escape=function(t){return b.encodeURIComponent(t).replace(/%2F/g,"/")},E._getReqUrl=function(t){var e={};h(this.options.endpoint).to(e);var n=this._isIP(e.hostname),i=this.options.cname;!t.bucket||i||n||(e.host=t.bucket+"."+e.host);var r="/";t.bucket&&n&&(r+=t.bucket+"/"),t.object&&(r+=this._escape(t.object).replace(/\+/g,"%2B")),e.pathname=r;var o={};if(t.query&&m(o,t.query),t.subres){var a={};y.string(t.subres)?a[t.subres]="":y.array(t.subres)?t.subres.forEach((function(t){a[t]=""})):a=t.subres,m(o,a)}return e.query=o,v.format(e)},E._getUserAgent=function(){var t="aliyun-sdk-"+(n&&n.browser?"js":"nodejs")+"/"+S.version,e=w.description;return!e&&n&&(e="Node.js "+n.version.slice(1)+" on "+n.platform+" "+n.arch),this._checkUserAgent(t+" "+e)},E._checkUserAgent=function(t){return t.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},E.checkBrowserAndVersion=function(t,e){return k.name===t&&k.version.split(".")[0]===e},E.parseXML=function(t){return function(e){i.isBuffer(t)&&(t=t.toString()),f.parseString(t,{explicitRoot:!1,explicitArray:!1},e)}},E.requestError=a.default.mark((function t(e){var n,i,r,o;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=null,e.data&&e.data.length){t.next=5;break}-1===e.status||-2===e.status?((n=new Error(e.message)).name=e.name,n.status=e.status,n.code=e.name):(404===e.status?((n=new Error("Object not exists")).name="NoSuchKeyError",n.status=404,n.code="NoSuchKey"):412===e.status?((n=new Error("Pre condition failed")).name="PreconditionFailedError",n.status=412,n.code="PreconditionFailed"):((n=new Error("Unknow error, status: "+e.status)).name="UnknowError",n.status=e.status),n.requestId=e.headers["x-oss-request-id"],n.host=""),t.next=30;break;case 5:return i=String(e.data),l("request response error data: %s",i),r=void 0,t.prev=8,t.next=11,this.parseXML(i)||{};case 11:r=t.sent,t.next=21;break;case 14:return t.prev=14,t.t0=t.catch(8),l(i),t.t0.message+="\nraw xml: "+i,t.t0.status=e.status,t.t0.requestId=e.headers["x-oss-request-id"],t.abrupt("return",t.t0);case 21:o=r.Message||"unknow request error, status: "+e.status,r.Condition&&(o+=" (condition: "+r.Condition+")"),(n=new Error(o)).name=r.Code?r.Code+"Error":"UnknowError",n.status=e.status,n.code=r.Code,n.requestId=r.RequestId,n.hostId=r.HostId,n.serverTime=r.ServerTime;case 30:return l("generate error %j",n),t.abrupt("return",n);case 32:case"end":return t.stop()}}),t,this,[[8,14]])}))}).call(this,t("_process"),t("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(t,e,n){(function(e){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(this instanceof r))return new r(t,e);f.call(this,e),this.file=t,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var o=i(t("babel-runtime/core-js/array/from")),a=i(t("babel-runtime/regenerator")),s=t("is-type-of"),l=t("util"),u=t("path"),c=t("mime"),h=t("copy-to"),d=n;d.multipartUpload=a.default.mark((function t(e,n,i){var r,o,l,h,d,f,p,g,m;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.resetCancelFlag(),!(i=i||{}).checkpoint||!i.checkpoint.uploadId){t.next=6;break}return t.next=5,this._resumeMultipart(i.checkpoint,i);case 5:case 38:return t.abrupt("return",t.sent);case 6:return r=102400,i.mime||(s.file(n)?i.mime=c.getType(u.extname(n.name)):s.blob(n)?i.mime=n.type:i.mime=c.getType(u.extname(n))),i.headers=i.headers||{},this._convertMetaToHeaders(i.meta,i.headers),t.next=12,this._getFileSize(n);case 12:if(!((o=t.sent)0&&h(u).to(d),f=this._divideParts(r,s),p=f.length,g=!1,m=a.default.mark((function t(r,o){var s,h,m;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.isCancel()){t.next=21;break}return t.prev=1,s=f[o-1],h={stream:r._createStream(i,s.start,s.end),size:s.end-s.start},t.next=6,r._uploadPart(c,l,o,h);case 6:if(m=t.sent,r.isCancel()||g){t.next=13;break}if(e.doneParts.push({number:o,etag:m.res.headers.etag}),d.push({number:o,etag:m.res.headers.etag}),!n||!n.progress){t.next=13;break}return t.next=13,n.progress(u.length/p,e,m.res);case 13:t.next=21;break;case 15:if(t.prev=15,t.t0=t.catch(1),r.isCancel()){t.next=21;break}throw r.cancel(),t.t0.partNum=o,t.t0;case 21:case"end":return t.stop()}}),t,this,[[1,15]])})),v=(0,o.default)(new Array(p),(function(t,e){return e+1})),y=d.map((function(t){return t.number})),w=v.filter((function(t){return y.indexOf(t)<0})),b=n.parallel||5,!this.checkBrowserAndVersion("Internet Explorer","10")&&1!==b){t.next=26;break}x=0;case 16:if(!(x0)){t.next=37;break}throw this.resetCancelFlag(),(C=k[0]).message="Failed to upload some parts with error: "+C.toString()+" part_num: "+C.partNum,C;case 37:if(!this.isCancel()){t.next=40;break}throw S=null,this._makeCancelEvent();case 40:return t.next=42,this.completeMultipartUpload(c,l,d,n);case 42:return t.abrupt("return",t.sent);case 43:case"end":return t.stop()}}),t,this)})),s.file=function(t){return"undefined"!=typeof File&&t instanceof File},s.blob=function(t){return"undefined"!=typeof Blob&&t instanceof Blob},d._getFileSize=a.default.mark((function t(e){var n;return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!s.buffer(e)){t.next=4;break}return t.abrupt("return",e.length);case 4:if(!s.blob(e)&&!s.file(e)){t.next=6;break}return t.abrupt("return",e.size);case 6:if(!s.string(e)){t.next=11;break}return t.next=9,this._statFile(e);case 9:return n=t.sent,t.abrupt("return",n.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return t.stop()}}),t,this)}));var f=t("stream").Readable;l.inherits(r,f),r.prototype.readFileAndPush=function(t){if(this.fileBuffer)for(var e=!0;e&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:i,this.start=i,e=this.push(this.fileBuffer.slice(n,i))}},r.prototype._read=function(t){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);t=t||16384;var n=this;this.reader.onload=function(i){n.fileBuffer=new e(new Uint8Array(i.target.result)),n.file=null,n.readFileAndPush(t)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(t)},d._createStream=function(t,e,n){if(s.blob(t)||s.file(t))return new r(t.slice(e,n));throw new Error("_createStream requires File/String.")},d._getPartSize=function(t,e){return e?Math.max(Math.ceil(t/1e4),e):1048576},d._divideParts=function(t,e){for(var n=Math.ceil(t/e),i=[],r=0;rtrue\n":i+=" false\n",r=0;r"+s.escape(this._objectName(e[r]))+"\n";return a("delete multi objects: %s",i+=""),n.subres="delete",(l=this._objectRequestParams("POST","",n)).mime="xml",l.content=i,l.xmlResponse=!0,l.successStatuses=[200],t.next=14,this.request(l);case 14:return u=t.sent,c=u.data,(h=c&&c.Deleted||null)&&(Array.isArray(h)||(h=[h]),h=h.map((function(t){return t.Key}))),t.abrupt("return",{res:u.res,deleted:h});case 19:case"end":return t.stop()}}),t,this)})),m.copy=o.default.mark((function t(e,n,i){var a,s,l;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=i||{}).headers=i.headers||{},(0,r.default)(i.headers).forEach((function(t){i.headers["x-oss-copy-source-"+t.toLowerCase()]=i.headers[t]})),i.meta&&(i.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(i.meta,i.headers),n="/"!==n[0]?"/"+this.options.bucket+"/"+encodeURIComponent(n):"/"+encodeURIComponent(n.slice(1)),i.headers["x-oss-copy-source"]=n,(a=this._objectRequestParams("PUT",e,i)).xmlResponse=!0,a.successStatuses=[200,304],t.next=12,this.request(a);case 12:return s=t.sent,(l=s.data)&&(l={etag:l.ETag,lastModified:l.LastModified}),t.abrupt("return",{data:l,res:s.res});case 16:case"end":return t.stop()}}),t,this)})),m.putMeta=o.default.mark((function t(e,n,i){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.copy(e,e,{meta:n||{},timeout:i&&i.timeout,ctx:i&&i.ctx});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)})),m.list=o.default.mark((function t(e,n){var i,r,a,s,l;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=this._objectRequestParams("GET","",n)).query=e,i.xmlResponse=!0,i.successStatuses=[200],t.next=6,this.request(i);case 6:return r=t.sent,a=r.data.Contents,s=this,a&&(Array.isArray(a)||(a=[a]),a=a.map((function(t){return{name:t.Key,url:s._objectUrl(t.Key),lastModified:t.LastModified,etag:t.ETag,type:t.Type,size:Number(t.Size),storageClass:t.StorageClass,owner:{id:t.Owner.ID,displayName:t.Owner.DisplayName}}}))),(l=r.data.CommonPrefixes||null)&&(Array.isArray(l)||(l=[l]),l=l.map((function(t){return t.Prefix}))),t.abrupt("return",{res:r.res,objects:a,prefixes:l,nextMarker:r.data.NextMarker||null,isTruncated:"true"===r.data.IsTruncated});case 13:case"end":return t.stop()}}),t,this)})),m.putACL=o.default.mark((function t(e,n,i){var r,a;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=i||{}).subres="acl",i.headers=i.headers||{},i.headers["x-oss-object-acl"]=n,e=this._objectName(e),(r=this._objectRequestParams("PUT",e,i)).successStatuses=[200],t.next=9,this.request(r);case 9:return a=t.sent,t.abrupt("return",{res:a.res});case 11:case"end":return t.stop()}}),t,this)})),m.getACL=o.default.mark((function t(e,n){var i,r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=n||{}).subres="acl",e=this._objectName(e),(i=this._objectRequestParams("GET",e,n)).successStatuses=[200],i.xmlResponse=!0,t.next=8,this.request(i);case 8:return r=t.sent,t.abrupt("return",{acl:r.data.AccessControlList.Grant,owner:{id:r.data.Owner.ID,displayName:r.data.Owner.DisplayName},res:r.res});case 10:case"end":return t.stop()}}),t,this)})),m.restore=o.default.mark((function t(e,n){var i,r;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=n||{}).subres="restore",(i=this._objectRequestParams("POST",e,n)).successStatuses=[202],t.next=6,this.request(i);case 6:return r=t.sent,t.abrupt("return",{res:r.res});case 8:case"end":return t.stop()}}),t,this)})),m.signatureUrl=function(t,e){e=e||{},t=this._objectName(t),e.method=e.method||"GET";var n=s.timestamp()+(e.expires||1800),i={bucket:this.options.bucket,object:t},r=this._getResource(i);this.options.stsToken&&(e["security-token"]=this.options.stsToken);var o=g._signatureForURL(this.options.accessKeySecret,e,r,n),a=c.parse(this._getReqUrl(i));return a.query={OSSAccessKeyId:this.options.accessKeyId,Expires:n,Signature:o.Signature},h(o.subResource).to(a.query),a.format()},m.getObjectUrl=function(t,e){return e?"/"!==e[e.length-1]&&(e+="/"):e=this.options.endpoint.format(),e+this._escape(this._objectName(t))},m._objectUrl=function(t){return this._getReqUrl({bucket:this.options.bucket,object:t})},m.generateObjectUrl=function(t,e){if(e)"/"!==e[e.length-1]&&(e+="/");else{e=this.options.endpoint.format();var n=c.parse(e),i=this.options.bucket;n.hostname=i+"."+n.hostname,n.host=i+"."+n.host,e=n.format()}return e+this._escape(this._objectName(t))},m._objectRequestParams=function(t,e,n){if(!this.options.bucket)throw new Error("Please create a bucket first");n=n||{};var i={object:e=this._objectName(e),bucket:this.options.bucket,method:t,subres:n&&n.subres,timeout:n&&n.timeout,ctx:n&&n.ctx};return n.headers&&(i.headers={},h(n.headers).to(i.headers)),i},m._objectName=function(t){return t.replace(/^\/+/,"")},m._statFile=function(t){return function(e){l.stat(t,e)}},m._convertMetaToHeaders=function(t,e){t&&(0,r.default)(t).forEach((function(n){e["x-oss-meta-"+n]=t[n]}))},m._deleteFileSafe=function(t){return function(e){l.exists(t,(function(n){n?l.unlink(t,(function(n){n&&a("unlink %j error: %s",t,n),e()})):e()}))}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(t,e,n){"use strict";n.version="5.3.1"},{}],6:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t){return t&&"function"==typeof t.next&&"function"==typeof t.throw}function o(t){if(!t)return!1;var e=t.constructor;return!!e&&("GeneratorFunction"===e.name||"GeneratorFunction"===e.displayName||r(e.prototype)||r(t.prototype))}function a(t,e){var n=new t(e),i=(0,u.default)(n),r=(0,u.default)((0,l.default)(n));i.concat(r).forEach((function(t){o(n[t])?this[t]=c.wrap(n[t]).bind(n):this[t]=n[t]}),this)}function s(t){if(!(this instanceof s))return new s(t);a.call(this,h,t)}var l=i(t("babel-runtime/core-js/object/get-prototype-of")),u=i(t("babel-runtime/core-js/object/keys")),c=t("co"),h=t("./client");e.exports=s,s.STS=function t(e){if(!(this instanceof t))return new t(e);a.call(this,h.STS,e)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(t,e,n){(function(e){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=i(t("babel-runtime/core-js/object/keys")),o=i(t("babel-runtime/core-js/json/stringify"));n.encodeCallback=function(t,n){if(t.headers=t.headers||{},!Object.prototype.hasOwnProperty.call(t.headers,"x-oss-callback")&&n.callback){var i={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};n.callback.host&&(i.callbackHost=n.callback.host),n.callback.contentType&&(i.callbackBodyType=n.callback.contentType);var a=new e((0,o.default)(i)).toString("base64");if(t.headers["x-oss-callback"]=a,n.callback.customValue){var s={};(0,r.default)(n.callback.customValue).forEach((function(t){s["x:"+t]=n.callback.customValue[t]})),t.headers["x-oss-callback-var"]=new e((0,o.default)(s)).toString("base64")}}}}).call(this,t("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(t,e,n){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(t("babel-runtime/regenerator")),r=t("copy-to"),o=t("./callback"),a=n;a.listUploads=i.default.mark((function t(e,n){var o,a,s,l;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={},r(n=n||{}).to(o),o.subres="uploads",(a=this._objectRequestParams("GET","",o)).query=e,a.xmlResponse=!0,a.successStatuses=[200],t.next=10,this.request(a);case 10:return s=t.sent,l=s.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map((function(t){return{name:t.Key,uploadId:t.UploadId,initiated:t.Initiated}})),t.abrupt("return",{res:s.res,uploads:l,bucket:s.data.Bucket,nextKeyMarker:s.data.NextKeyMarker,nextUploadIdMarker:s.data.NextUploadIdMarker,isTruncated:"true"===s.data.IsTruncated});case 15:case"end":return t.stop()}}),t,this)})),a.listParts=i.default.mark((function t(e,n,o,a){var s,l,u;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={},r(a=a||{}).to(s),s.subres={uploadId:n},(l=this._objectRequestParams("GET",e,s)).query=o,l.xmlResponse=!0,l.successStatuses=[200],t.next=10,this.request(l);case 10:return u=t.sent,t.abrupt("return",{res:u.res,uploadId:u.data.UploadId,bucket:u.data.Bucket,name:u.data.Key,partNumberMarker:u.data.PartNumberMarker,nextPartNumberMarker:u.data.NextPartNumberMarker,maxParts:u.data.MaxParts,isTruncated:u.data.IsTruncated,parts:u.data.Part||[]});case 12:case"end":return t.stop()}}),t,this)})),a.abortMultipartUpload=i.default.mark((function t(e,n,o){var a,s,l;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.cancel(),a={},r(o=o||{}).to(a),a.subres={uploadId:n},(s=this._objectRequestParams("DELETE",e,a)).successStatuses=[204],t.next=9,this.request(s);case 9:return l=t.sent,t.abrupt("return",{res:l.res});case 11:case"end":return t.stop()}}),t,this)})),a.initMultipartUpload=i.default.mark((function t(e,n){var o,a,s;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={},r(n=n||{}).to(o),o.headers=o.headers||{},this._convertMetaToHeaders(n.meta,o.headers),o.subres="uploads",(a=this._objectRequestParams("POST",e,o)).mime=n.mime,a.xmlResponse=!0,a.successStatuses=[200],t.next=12,this.request(a);case 12:return s=t.sent,t.abrupt("return",{res:s.res,bucket:s.data.Bucket,name:s.data.Key,uploadId:s.data.UploadId});case 14:case"end":return t.stop()}}),t,this)})),a.uploadPart=i.default.mark((function t(e,n,r,o,a,s,l){var u;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u={stream:this._createStream(o,a,s),size:s-a},t.next=3,this._uploadPart(e,n,r,u,l);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})),a.completeMultipartUpload=i.default.mark((function t(e,n,a,s){var l,u,c,h,d,f,p,g;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(l=a.concat().sort((function(t,e){return t.number-e.number})).filter((function(t,e,n){return!e||t.number!==n[e-1].number})),u='\n\n',c=0;c\n",u+=""+h.number+"\n",u+=""+h.etag+"\n",u+="\n";return u+="",d={},r(s=s||{}).to(d),d.subres={uploadId:n},f=this._objectRequestParams("POST",e,d),o.encodeCallback(f,d),f.mime="xml",f.content=u,f.headers&&f.headers["x-oss-callback"]||(f.xmlResponse=!0),f.successStatuses=[200],t.next=16,this.request(f);case 16:return p=t.sent,g={res:p.res,bucket:f.bucket,name:e,etag:p.res.headers.etag},f.headers&&f.headers["x-oss-callback"]&&(g.data=JSON.parse(p.data.toString())),t.abrupt("return",g);case 20:case"end":return t.stop()}}),t,this)})),a._uploadPart=i.default.mark((function t(e,n,o,a,s){var l,u,c;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l={},r(s=s||{}).to(l),l.headers={"Content-Length":a.size},l.subres={partNumber:o,uploadId:n},(u=this._objectRequestParams("PUT",e,l)).mime=l.mime,u.stream=a.stream,u.successStatuses=[200],t.next=11,this.request(u);case 11:return c=t.sent,a.stream=null,u.stream=null,t.abrupt("return",{name:e,etag:c.res.headers.etag,res:c.res});case 15:case"end":return t.stop()}}),t,this)}))},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(t,e,n){(function(e){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=i(t("babel-runtime/core-js/json/stringify")),o=i(t("babel-runtime/core-js/object/keys")),a=t("./../../shims/crypto/crypto.js"),s=t("is-type-of");n.buildCanonicalizedResource=function(t,e){var n=""+t,i="?";return s.string(e)&&""!==e.trim()?n+=i+e:s.array(e)?(e.sort(),n+=i+e.join("&")):e&&(0,o.default)(e).sort((function(t,e){return t[0]>e[0]?1:t[0]0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function r(t){return a[t>>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}function o(t,e,n){for(var i,o=[],a=e;a0?r-4:r,h=0;h>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===o&&(e=s[t.charCodeAt(h)]<<2|s[t.charCodeAt(h+1)]>>4,a[u++]=255&e),1===o&&(e=s[t.charCodeAt(h)]<<10|s[t.charCodeAt(h+1)]<<4|s[t.charCodeAt(h+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a},n.fromByteArray=function(t){for(var e,n=t.length,i=n%3,r=[],s=0,l=n-i;sl?l:s+16383));return 1===i?(e=t[n-1],r.push(a[e>>2]+a[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],r.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"=")),r.join("")};for(var a=[],s=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,h=u.length;c1&&n[1]||""}function n(e){var n=t.match(e);return n&&n.length>1&&n[2]||""}var i,r=e(/(ipod|iphone|ipad)/i).toLowerCase(),a=!/like android/i.test(t)&&/android/i.test(t),s=/nexus\s*[0-6]\s*/i.test(t),l=!s&&/nexus\s*[0-9]+/i.test(t),u=/CrOS/.test(t),c=/silk/i.test(t),h=/sailfish/i.test(t),d=/tizen/i.test(t),f=/(web|hpw)os/i.test(t),p=/windows phone/i.test(t),g=(/SamsungBrowser/i.test(t),!p&&/windows/i.test(t)),m=!r&&!c&&/macintosh/i.test(t),v=!a&&!h&&!d&&!f&&/linux/i.test(t),y=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=e(/version\/(\d+(\.\d+)?)/i),b=/tablet/i.test(t)&&!/tablet pc/i.test(t),x=!b&&/[^-]mobi/i.test(t),S=/xbox/i.test(t);/opera/i.test(t)?i={name:"Opera",opera:o,version:w||e(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?i={name:"Opera",opera:o,version:e(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(t)?i={name:"Samsung Internet for Android",samsungBrowser:o,version:w||e(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(t)?i={name:"Opera Coast",coast:o,version:w||e(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(t)?i={name:"Yandex Browser",yandexbrowser:o,version:w||e(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?i={name:"UC Browser",ucbrowser:o,version:e(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?i={name:"Maxthon",maxthon:o,version:e(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?i={name:"Epiphany",epiphany:o,version:e(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?i={name:"Puffin",puffin:o,version:e(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?i={name:"Sleipnir",sleipnir:o,version:e(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?i={name:"K-Meleon",kMeleon:o,version:e(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:p?(i={name:"Windows Phone",osname:"Windows Phone",windowsphone:o},y?(i.msedge=o,i.version=y):(i.msie=o,i.version=e(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?i={name:"Internet Explorer",msie:o,version:e(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:u?i={name:"Chrome",osname:"Chrome OS",chromeos:o,chromeBook:o,chrome:o,version:e(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?i={name:"Microsoft Edge",msedge:o,version:y}:/vivaldi/i.test(t)?i={name:"Vivaldi",vivaldi:o,version:e(/vivaldi\/(\d+(\.\d+)?)/i)||w}:h?i={name:"Sailfish",osname:"Sailfish OS",sailfish:o,version:e(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?i={name:"SeaMonkey",seamonkey:o,version:e(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(i={name:"Firefox",firefox:o,version:e(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(i.firefoxos=o,i.osname="Firefox OS")):c?i={name:"Amazon Silk",silk:o,version:e(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?i={name:"PhantomJS",phantom:o,version:e(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?i={name:"SlimerJS",slimer:o,version:e(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?i={name:"BlackBerry",osname:"BlackBerry OS",blackberry:o,version:w||e(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:f?(i={name:"WebOS",osname:"WebOS",webos:o,version:w||e(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(i.touchpad=o)):/bada/i.test(t)?i={name:"Bada",osname:"Bada",bada:o,version:e(/dolfin\/(\d+(\.\d+)?)/i)}:d?i={name:"Tizen",osname:"Tizen",tizen:o,version:e(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(t)?i={name:"QupZilla",qupzilla:o,version:e(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(t)?i={name:"Chromium",chromium:o,version:e(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(t)?i={name:"Chrome",chrome:o,version:e(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:a?i={name:"Android",version:w}:/safari|applewebkit/i.test(t)?(i={name:"Safari",safari:o},w&&(i.version=w)):r?(i={name:"iphone"==r?"iPhone":"ipad"==r?"iPad":"iPod"},w&&(i.version=w)):i=/googlebot/i.test(t)?{name:"Googlebot",googlebot:o,version:e(/googlebot\/(\d+(\.\d+))/i)||w}:{name:e(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!i.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(i.name=i.name||"Blink",i.blink=o):(i.name=i.name||"Webkit",i.webkit=o),!i.version&&w&&(i.version=w)):!i.opera&&/gecko\//i.test(t)&&(i.name=i.name||"Gecko",i.gecko=o,i.version=i.version||e(/gecko\/(\d+(\.\d+)?)/i)),i.windowsphone||!a&&!i.silk?!i.windowsphone&&r?(i[r]=o,i.ios=o,i.osname="iOS"):m?(i.mac=o,i.osname="macOS"):S?(i.xbox=o,i.osname="Xbox"):g?(i.windows=o,i.osname="Windows"):v&&(i.linux=o,i.osname="Linux"):(i.android=o,i.osname="Android");var P="";i.windows?P=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(e(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?P=e(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?P=(P=e(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):r?P=(P=e(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):a?P=e(/android[ \/-](\d+(\.\d+)*)/i):i.webos?P=e(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?P=e(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?P=e(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(P=e(/tizen[\/\s](\d+(\.\d+)*)/i)),P&&(i.osversion=P);var k=!i.windows&&P.split(".")[0];return b||l||"ipad"==r||a&&(3==k||k>=4&&!x)||i.silk?i.tablet=o:(x||"iphone"==r||"ipod"==r||a||s||i.blackberry||i.webos||i.bada)&&(i.mobile=o),i.msedge||i.msie&&i.version>=10||i.yandexbrowser&&i.version>=15||i.vivaldi&&i.version>=1||i.chrome&&i.version>=20||i.samsungBrowser&&i.version>=4||i.firefox&&i.version>=20||i.safari&&i.version>=6||i.opera&&i.version>=10||i.ios&&i.osversion&&i.osversion.split(".")[0]>=6||i.blackberry&&i.version>=10.1||i.chromium&&i.version>=20?i.a=o:i.msie&&i.version<10||i.chrome&&i.version<20||i.firefox&&i.version<20||i.safari&&i.version<6||i.opera&&i.version<10||i.ios&&i.osversion&&i.osversion.split(".")[0]<6||i.chromium&&i.version<20?i.c=o:i.x=o,i}function e(t){return t.split(".").length}function n(t,e){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(n=0;n=0;){if(r[0][i]>r[1][i])return 1;if(r[0][i]!==r[1][i])return-1;if(0===i)return 0}}function r(e,n,r){var o=a;"string"==typeof n&&(r=n,n=void 0),void 0===n&&(n=!1),r&&(o=t(r));var s=""+o.version;for(var l in e)if(e.hasOwnProperty(l)&&o[l]){if("string"!=typeof e[l])throw new Error("Browser version in the minVersion map should be a string: "+l+": "+String(e));return i([s,e[l]])<0}return n}var o=!0,a=t("undefined"!=typeof navigator&&navigator.userAgent||"");return a.test=function(t){for(var e=0;e=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i,r=t.length;if(this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived),r=(e+=t.toString(this.encoding,0,r)).length-1,(i=e.charCodeAt(r))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,r)}return e},l.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},l.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,i=this.charBuffer,r=this.encoding;e+=i.slice(0,n).toString(r)}return e}},{buffer:38}],38:[function(t,e,i){(function(e){"use strict";function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(t,e){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function h(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return R(t).length;default:if(i)return D(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return k(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function f(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function p(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=o.from(e,i)),o.isBuffer(e))return 0===e.length?-1:g(t,e,n,i,r);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,i,r){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var a,s=1,l=t.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,l/=2,u/=2,n/=2}if(r){var c=-1;for(a=n;al&&(n=l-u),a=n;a>=0;a--){for(var h=!0,d=0;dr&&(i=r):i=r;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var a=0;a>8,r=n%256,o.push(r),o.push(i);return o}(e,t.length-n),t,n,i)}function S(t,e,n){return 0===e&&n===t.length?z.fromByteArray(t):z.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;r239?4:u>223?3:u>191?2:1;if(r+h<=n)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(o=t[r+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=t[r+1],a=t[r+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=t[r+1],a=t[r+2],s=t[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,i.push(c>>>10&1023|55296),c=56320|1023&c),i.push(c),r+=h}return function(t){var e=t.length;if(e<=H)return String.fromCharCode.apply(String,t);for(var n="",i=0;ii)&&(n=i);for(var r="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,i,r,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||et.length)throw new RangeError("Index out of range")}function T(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,o=Math.min(t.length-n,2);r>>8*(i?r:1-r)}function N(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,o=Math.min(t.length-n,4);r>>8*(i?r:3-r)&255}function j(t,e,n,i,r,o){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function I(t,e,n,i,r){return r||j(t,0,n,4),G.write(t,e,n,i,23,4),n+4}function B(t,e,n,i,r){return r||j(t,0,n,8),G.write(t,e,n,i,52,8),n+8}function O(t){return t<16?"0"+t.toString(16):t.toString(16)}function D(t,e){e=e||1/0;for(var n,i=t.length,r=null,o=[],a=0;a55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===i){(e-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&o.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function R(t){return z.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(_,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,n,i){for(var r=0;r=e.length||r>=t.length);++r)e[r+n]=t[r];return r}var z=t("base64-js"),G=t("ieee754"),U=t("isarray");i.Buffer=o,i.SlowBuffer=function(t){return+t!=t&&(t=0),o.alloc(+t)},i.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),i.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,n){return a(null,t,e,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,n){return function(t,e,n,i){return s(e),e<=0?r(t,e):void 0!==n?"string"==typeof i?r(t,e).fill(n,i):r(t,e).fill(n):r(t,e)}(null,t,e,n)},o.allocUnsafe=function(t){return l(null,t)},o.allocUnsafeSlow=function(t){return l(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,r=0,a=Math.min(n,i);r0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},o.prototype.compare=function(t,e,n,i,r){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;for(var a=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(e>>>=0),l=Math.min(a,s),u=this.slice(i,r),c=t.slice(e,n),h=0;hr)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return m(this,t,e,n);case"utf8":case"utf-8":return v(this,t,e,n);case"ascii":return y(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return b(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var H=4096;o.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(r*=256);)i+=this[t+--e]*r;return i},o.prototype.readUInt8=function(t,e){return e||E(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||E(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||E(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||E(t,e,this.length);for(var i=this[t],r=1,o=0;++o=(r*=128)&&(i-=Math.pow(2,8*e)),i},o.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||E(t,e,this.length);for(var i=e,r=1,o=this[t+--i];i>0&&(r*=256);)o+=this[t+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||E(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||E(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||E(t,4,this.length),G.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||E(t,4,this.length),G.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||E(t,8,this.length),G.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||E(t,8,this.length),G.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,i){t=+t,e|=0,n|=0,i||L(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+r]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);L(this,t,e,n,r-1,-r)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},o.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);L(this,t,e,n,r-1,-r)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):T(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):T(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return I(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return I(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--r)t[r+e]=this[r+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a>>1;n(t[o])2&&(e=c.call(arguments,1)),n(e)}))}))}function a(t){return Promise.all(t.map(r,this))}function s(t){for(var e=new t.constructor,n=Object.keys(t),i=[],o=0;oc;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(t,e,n){var i=t("./_cof"),r=t("./_wks")("toStringTag"),o="Arguments"==i(function(){return arguments}());e.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:o?i(e):"Object"==(a=i(e))&&"function"==typeof e.callee?"Arguments":a}},{"./_cof":64,"./_wks":131}],64:[function(t,e,n){var i={}.toString;e.exports=function(t){return i.call(t).slice(8,-1)}},{}],65:[function(t,e,n){var i=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=i)},{}],66:[function(t,e,n){"use strict";var i=t("./_object-dp"),r=t("./_property-desc");e.exports=function(t,e,n){e in t?i.f(t,e,r(0,n)):t[e]=n}},{"./_object-dp":98,"./_property-desc":111}],67:[function(t,e,n){var i=t("./_a-function");e.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},{"./_a-function":58}],68:[function(t,e,n){e.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},{}],69:[function(t,e,n){e.exports=!t("./_fails")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},{"./_fails":74}],70:[function(t,e,n){var i=t("./_is-object"),r=t("./_global").document,o=i(r)&&i(r.createElement);e.exports=function(t){return o?r.createElement(t):{}}},{"./_global":76,"./_is-object":85}],71:[function(t,e,n){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(t,e,n){var i=t("./_object-keys"),r=t("./_object-gops"),o=t("./_object-pie");e.exports=function(t){var e=i(t),n=r.f;if(n)for(var a,s=n(t),l=o.f,u=0;s.length>u;)l.call(t,a=s[u++])&&e.push(a);return e}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(t,e,n){var i=t("./_global"),r=t("./_core"),o=t("./_ctx"),a=t("./_hide"),s=t("./_has"),l=function(t,e,n){var u,c,h,d=t&l.F,f=t&l.G,p=t&l.S,g=t&l.P,m=t&l.B,v=t&l.W,y=f?r:r[e]||(r[e]={}),w=y.prototype,b=f?i:p?i[e]:(i[e]||{}).prototype;for(u in f&&(n=e),n)(c=!d&&b&&void 0!==b[u])&&s(y,u)||(h=c?b[u]:n[u],y[u]=f&&"function"!=typeof b[u]?n[u]:m&&c?o(h,i):v&&b[u]==h?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):g&&"function"==typeof h?o(Function.call,h):h,g&&((y.virtual||(y.virtual={}))[u]=h,t&l.R&&w&&!w[u]&&a(w,u,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(t){return!0}}},{}],75:[function(t,e,n){var i=t("./_ctx"),r=t("./_iter-call"),o=t("./_is-array-iter"),a=t("./_an-object"),s=t("./_to-length"),l=t("./core.get-iterator-method"),u={},c={};n=e.exports=function(t,e,n,h,d){var f,p,g,m,v=d?function(){return t}:l(t),y=i(n,h,e?2:1),w=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(f=s(t.length);f>w;w++)if((m=e?y(a(p=t[w])[0],p[1]):y(t[w]))===u||m===c)return m}else for(g=v.call(t);!(p=g.next()).done;)if((m=r(g,y,p.value,e))===u||m===c)return m},n.BREAK=u,n.RETURN=c},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(t,e,n){var i=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},{}],77:[function(t,e,n){var i={}.hasOwnProperty;e.exports=function(t,e){return i.call(t,e)}},{}],78:[function(t,e,n){var i=t("./_object-dp"),r=t("./_property-desc");e.exports=t("./_descriptors")?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(t,e,n){var i=t("./_global").document;e.exports=i&&i.documentElement},{"./_global":76}],80:[function(t,e,n){e.exports=!t("./_descriptors")&&!t("./_fails")((function(){return 7!=Object.defineProperty(t("./_dom-create")("div"),"a",{get:function(){return 7}}).a}))},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(t,e,n){e.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},{}],82:[function(t,e,n){var i=t("./_cof");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},{"./_cof":64}],83:[function(t,e,n){var i=t("./_iterators"),r=t("./_wks")("iterator"),o=Array.prototype;e.exports=function(t){return void 0!==t&&(i.Array===t||o[r]===t)}},{"./_iterators":91,"./_wks":131}],84:[function(t,e,n){var i=t("./_cof");e.exports=Array.isArray||function(t){return"Array"==i(t)}},{"./_cof":64}],85:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],86:[function(t,e,n){var i=t("./_an-object");e.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},{"./_an-object":61}],87:[function(t,e,n){"use strict";var i=t("./_object-create"),r=t("./_property-desc"),o=t("./_set-to-string-tag"),a={};t("./_hide")(a,t("./_wks")("iterator"),(function(){return this})),e.exports=function(t,e,n){t.prototype=i(a,{next:r(1,n)}),o(t,e+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(t,e,n){"use strict";var i=t("./_library"),r=t("./_export"),o=t("./_redefine"),a=t("./_hide"),s=t("./_iterators"),l=t("./_iter-create"),u=t("./_set-to-string-tag"),c=t("./_object-gpo"),h=t("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(t,e,n,p,g,m,v){l(n,e,p);var y,w,b,x=function(t){if(!d&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",P="values"==g,k=!1,C=t.prototype,A=C[h]||C["@@iterator"]||g&&C[g],M=A||x(g),E=g?P?x("entries"):M:void 0,L="Array"==e&&C.entries||A;if(L&&(b=c(L.call(new t)))!==Object.prototype&&b.next&&(u(b,S,!0),i||"function"==typeof b[h]||a(b,h,f)),P&&A&&"values"!==A.name&&(k=!0,M=function(){return A.call(this)}),i&&!v||!d&&!k&&C[h]||a(C,h,M),s[e]=M,s[S]=f,g)if(y={values:P?M:x("values"),keys:m?M:x("keys"),entries:E},v)for(w in y)w in C||o(C,w,y[w]);else r(r.P+r.F*(d||k),e,y);return y}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(t,e,n){var i=t("./_wks")("iterator"),r=!1;try{var o=[7][i]();o.return=function(){r=!0},Array.from(o,(function(){throw 2}))}catch(t){}e.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var o=[7],a=o[i]();a.next=function(){return{done:n=!0}},o[i]=function(){return a},t(o)}catch(t){}return n}},{"./_wks":131}],90:[function(t,e,n){e.exports=function(t,e){return{value:e,done:!!t}}},{}],91:[function(t,e,n){e.exports={}},{}],92:[function(t,e,n){e.exports=!0},{}],93:[function(t,e,n){var i=t("./_uid")("meta"),r=t("./_is-object"),o=t("./_has"),a=t("./_object-dp").f,s=0,l=Object.isExtensible||function(){return!0},u=!t("./_fails")((function(){return l(Object.preventExtensions({}))})),c=function(t){a(t,i,{value:{i:"O"+ ++s,w:{}}})},h=e.exports={KEY:i,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!l(t))return"F";if(!e)return"E";c(t)}return t[i].i},getWeak:function(t,e){if(!o(t,i)){if(!l(t))return!0;if(!e)return!1;c(t)}return t[i].w},onFreeze:function(t){return u&&h.NEED&&l(t)&&!o(t,i)&&c(t),t}}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(t,e,n){var i=t("./_global"),r=t("./_task").set,o=i.MutationObserver||i.WebKitMutationObserver,a=i.process,s=i.Promise,l="process"==t("./_cof")(a);e.exports=function(){var t,e,n,u=function(){var i,r;for(l&&(i=a.domain)&&i.exit();t;){r=t.fn,t=t.next;try{r()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(l)n=function(){a.nextTick(u)};else if(!o||i.navigator&&i.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(u)}}else n=function(){r.call(i,u)};else{var h=!0,d=document.createTextNode("");new o(u).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(i){var r={fn:i,next:void 0};e&&(e.next=r),t||(t=r,n()),e=r}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(t,e,n){"use strict";function i(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i})),this.resolve=r(e),this.reject=r(n)}var r=t("./_a-function");e.exports.f=function(t){return new i(t)}},{"./_a-function":58}],96:[function(t,e,n){"use strict";var i=t("./_object-keys"),r=t("./_object-gops"),o=t("./_object-pie"),a=t("./_to-object"),s=t("./_iobject"),l=Object.assign;e.exports=!l||t("./_fails")((function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=i}))?function(t,e){for(var n=a(t),l=arguments.length,u=1,c=r.f,h=o.f;l>u;)for(var d,f=s(arguments[u++]),p=c?i(f).concat(c(f)):i(f),g=p.length,m=0;g>m;)h.call(f,d=p[m++])&&(n[d]=f[d]);return n}:l},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(t,e,n){var i=t("./_an-object"),r=t("./_object-dps"),o=t("./_enum-bug-keys"),a=t("./_shared-key")("IE_PROTO"),s=function(){},l=function(){var e,n=t("./_dom-create")("iframe"),i=o.length;for(n.style.display="none",t("./_html").appendChild(n),n.src="javascript:",(e=n.contentWindow.document).open(),e.write("