|
|
(self.webpackChunk=self.webpackChunk||[]).push([[3951,38541],{66720:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var a=n(5891),o=n(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},g=n(88853),r=function(e,t){return o.createElement(g.Z,(0,a.Z)({},e,{ref:t,icon:i}))};var d=o.forwardRef(r)},15378:function(){"use strict";function e(e,t,n,a){void 0===n&&(n=0),void 0===a&&(a=1/0),this._name=e,this._defaultValue=t,this._minimum=n,this._maximum=a}Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){if("string"!=typeof e||""===e)throw new Error("Shape name must be a valid string.");this._name=e}}),Object.defineProperty(e.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(e){if("number"!=typeof e||isNaN(e))throw new Error("The default value must be a real number, not: "+e);this._defaultValue=e}}),Object.defineProperty(e.prototype,"minimum",{get:function(){return this._minimum},set:function(e){if("number"!=typeof e||isNaN(e))throw new Error("Minimum must be a real number, not: "+e);this._minimum=e}}),Object.defineProperty(e.prototype,"maximum",{get:function(){return this._maximum},set:function(e){if("number"!=typeof e||isNaN(e))throw new Error("Maximum must be a real number, not: "+e);this._maximum=e}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(e,t){var n=go.Shape._FigureParameters[e];return n?n[t]:null},go.Shape.setFigureParameter=function(t,n,a){if(!(a instanceof e))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+a);if(a.defaultValue<a.minimum||a.defaultValue>a.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+a.defaultValue);var o=go.Shape._FigureParameters[t];o||(o=[],go.Shape._FigureParameters[t]=o),o[n]=a};var t=[];function n(e,n){var a=t.pop();return void 0===a?new go.Point(e,n):(a.x=e,a.y=n,a)}function a(){var e=t.pop();return void 0===e?new go.Point:e}function o(e){t.push(e)}function i(e,t,n,a,o,i,g,r,d){d||(d=new go.Point);var s,l,h,m=e-n,c=o-g,u=NaN,S=NaN;0===m?0===c?e===n&&(u=e,S=t):S=(l=(i-r)/c)*(u=e)+(i-l*o):S=0===c?(s=(t-a)/m)*(u=o)+(h=t-s*e):(s=(t-a)/m)*(u=(i-(l=(i-r)/c)*o-(h=t-s*e))/(s-l))+h;return d.x=u,d.y=S,d}function g(e,t,n,a,o,i,g,r,d,s,l,h,m,c){var u=1-d,S=e*u+n*d,P=t*u+a*d,w=n*u+o*d,p=a*u+i*d,f=o*u+g*d,v=i*u+r*d,y=S*u+w*d,L=P*u+p*d,x=w*u+f*d,_=p*u+v*d,b=y*u+x*d,j=L*u+_*d;s.x=S,s.y=P,l.x=y,l.y=L,h.x=b,h.y=j,m.x=x,m.y=_,c.x=f,c.y=v}var r=new go.Spot(.156,.156),d=new go.Spot(.844,.844),s=(Math.sqrt(2)-1)/3*4;go.Shape.setFigureParameter("RoundedRectangle",0,new e("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=5),a=Math.min(a,t/3);var o=(a=Math.min(a,n/3))*s,i=(new go.Geometry).add(new go.PathFigure(a,0,!0).add(new go.PathSegment(go.PathSegment.Line,t-a,0)).add(new go.PathSegment(go.PathSegment.Bezier,t,a,t-o,0,t,o)).add(new go.PathSegment(go.PathSegment.Line,t,n-a)).add(new go.PathSegment(go.PathSegment.Bezier,t-a,n,t,n-o,t-o,n)).add(new go.PathSegment(go.PathSegment.Line,a,n)).add(new go.PathSegment(go.PathSegment.Bezier,0,n-a,o,n,0,n-o)).add(new go.PathSegment(go.PathSegment.Line,0,a)).add(new go.PathSegment(go.PathSegment.Bezier,a,0,0,o,o,0).close()));return o>1&&(i.spot1=new go.Spot(0,0,o,o),i.spot2=new go.Spot(1,1,-o,-o)),i})),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,.25,.5,.75)})),go.Shape.defineFigureGenerator("TriangleDown",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,.5*t,n).close())).setSpots(.25,0,.75,.5)})),go.Shape.defineFigureGenerator("TriangleLeft",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,n).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,0).close())).setSpots(.5,.25,1,.75)})),go.Shape.defineFigureGenerator("TriangleUp",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,n).add(new go.PathSegment(go.PathSegment.Line,0,n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,0).close())).setSpots(.25,.5,.75,1)})),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.5*t,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n).close())).setSpots(.25,.25,.75,.75)})),go.Shape.defineFigureGenerator("LineH",(function(e,t,n){var a=new go.Geometry(go.Geometry.Line);return a.startX=0,a.startY=n/2,a.endX=t,a.endY=n/2,a})),go.Shape.defineFigureGenerator("LineV",(function(e,t,n){var a=new go.Geometry(go.Geometry.Line);return a.startX=t/2,a.startY=0,a.endX=t/2,a.endY=n,a})),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,n/2,!1).add(new go.PathSegment(go.PathSegment.Line,t,n/2)).add(new go.PathSegment(go.PathSegment.Move,t/2,0)).add(new go.PathSegment(go.PathSegment.Line,t/2,n)))})),go.Shape.defineFigureGenerator("XLine",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)))})),go.Shape.defineFigureGenerator("LineRight",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.25*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.25*t,n)))})),go.Shape.defineFigureGenerator("LineDown",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,.25*n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,.75*n)).add(new go.PathSegment(go.PathSegment.Line,t,.25*n)))})),go.Shape.defineFigureGenerator("LineLeft",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.75*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.75*t,n)))})),go.Shape.defineFigureGenerator("LineUp",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,.75*n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,.25*n)).add(new go.PathSegment(go.PathSegment.Line,t,.75*n)))})),go.Shape.defineFigureGenerator("AsteriskLine",(function(e,t,n){var a=.2/Math.SQRT2;return(new go.Geometry).add(new go.PathFigure(a*t,(1-a)*n,!1).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,a*n)).add(new go.PathSegment(go.PathSegment.Move,a*t,a*n)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,(1-a)*n)).add(new go.PathSegment(go.PathSegment.Move,0,n/2)).add(new go.PathSegment(go.PathSegment.Line,t,n/2)).add(new go.PathSegment(go.PathSegment.Move,t/2,0)).add(new go.PathSegment(go.PathSegment.Line,t/2,n)))})),go.Shape.defineFigureGenerator("CircleLine",(function(e,t,n){var a=t/2,o=(new go.Geometry).add(new go.PathFigure(t,t/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,a,a,a,a).close()));return o.spot1=r,o.spot2=d,o.defaultStretch=go.GraphObject.Uniform,o})),go.Shape.defineFigureGenerator("Line1",(function(e,t,n){var a=new go.Geometry(go.Geometry.Line);return a.startX=0,a.startY=0,a.endX=t,a.endY=n,a})),go.Shape.defineFigureGenerator("Line2",(function(e,t,n){var a=new go.Geometry(go.Geometry.Line);return a.startX=t,a.startY=0,a.endX=0,a.endY=n,a})),go.Shape.defineFigureGenerator("Curve1",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,t,n,s*t,0,t,(1-s)*n)))})),go.Shape.defineFigureGenerator("Curve2",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,t,n,0,s*n,(1-s)*t,n)))})),go.Shape.defineFigureGenerator("Curve3",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,n,t,s*n,s*t,n)))})),go.Shape.defineFigureGenerator("Curve4",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,n,(1-s)*t,0,0,(1-s)*n)))})),go.Shape.defineFigureGenerator("TriangleDownLeft",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,.5,.5,1)})),go.Shape.defineFigureGenerator("TriangleDownRight",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(t,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(.5,.5,1,1)})),go.Shape.defineFigureGenerator("TriangleUpLeft",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())).setSpots(0,0,.5,.5)})),go.Shape.defineFigureGenerator("TriangleUpRight",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t,n).close())).setSpots(.5,0,1,.5)})),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new e("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=.1:a<-1?a=-1:a>1&&(a=1);var o=Math.abs(a)*t;if(0===a)return(i=new go.Geometry(go.Geometry.Rectangle)).startX=0,i.startY=0,i.endX=t,i.endY=n,i;var i=new go.Geometry;return a>0?i.add(new go.PathFigure(o,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-o,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):i.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t-o,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,o,n).close())),o<t/2&&i.setSpots(o/t,0,(t-o)/t,1),i})),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new e("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=10:a<-t?a=-t:a>t&&(a=t);var o=Math.abs(a);if(0===a)return(i=new go.Geometry(go.Geometry.Rectangle)).startX=0,i.startY=0,i.endX=t,i.endY=n,i;var i=new go.Geometry;return a>0?i.add(new go.PathFigure(o,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-o,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):i.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t-o,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,o,n).close())),o<t/2&&i.setSpots(o/t,0,(t-o)/t,1),i})),go.Shape.setFigureParameter("Trapezoid1",0,new e("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=.2:a<.5?a=-.5:a>.5&&(a=.5);var o=Math.abs(a)*t;if(0===a)return(i=new go.Geometry(go.Geometry.Rectangle)).startX=0,i.startY=0,i.endX=t,i.endY=n,i;var i=new go.Geometry;return a>0?i.add(new go.PathFigure(o,0).add(new go.PathSegment(go.PathSegment.Line,t-o,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):i.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-o,n)).add(new go.PathSegment(go.PathSegment.Line,o,n).close())),o<t/2&&i.setSpots(o/t,0,(t-o)/t,1),i})),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new e("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=20:a<-t?a=-t/2:a>t&&(a=t/2);var o=Math.abs(a);if(0===a)return(i=new go.Geometry(go.Geometry.Rectangle)).startX=0,i.startY=0,i.endX=t,i.endY=n,i;var i=new go.Geometry;return a>0?i.add(new go.PathFigure(o,0).add(new go.PathSegment(go.PathSegment.Line,t-o,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())):i.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-o,n)).add(new go.PathSegment(go.PathSegment.Line,o,n).close())),o<t/2&&i.setSpots(o/t,0,(t-o)/t,1),i})),go.Shape.setFigureParameter("ManualOperation",0,new e("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)?a=10:a<-t?a=-t/2:a>t&&(a=t/2);var o=Math.abs(a);if(0===a)return(i=new go.Geometry(go.Geometry.Rectangle)).startX=0,i.startY=0,i.endX=t,i.endY=n,i;var i=new go.Geometry;return a>0?i.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t-o,n)).add(new go.PathSegment(go.PathSegment.Line,o,n).close())):i.add(new go.PathFigure(o,0).add(new go.PathSegment(go.PathSegment.Line,t-o,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close())),o<t/2&&i.setSpots(o/t,0,(t-o)/t,1),i}));var l=[];function h(){var e=l.pop();return void 0===e?[]:e}function m(e){e.length=0,l.push(e)}function c(e){for(var t=h(),n=1.5*Math.PI,a=0,o=0;o<e;o++)a=2*Math.PI/e*o+n,t[o]=new go.Point(.5+.5*Math.cos(a),.5+.5*Math.sin(a));return t.push(t[0]),t}function u(e){var t=S(e),n=h();n[0]=t[0];for(var a=1,o=1;a<t.length;a+=2,o+=3)n[o]=t[a],n[o+1]=t[a],n[o+2]=t[a+1];return m(t),n}function S(e){for(var t=c(e),n=h(),a=Math.floor(t.length/2),o=t.length-1,g=e%2==0?2:1,r=0;r<o;r++){var d=t[r],s=t[r+1],l=t[(a+r-1)%o],u=t[(a+r+g)%o];n[2*r]=d,n[2*r+1]=i(d.x,d.y,l.x,l.y,s.x,s.y,u.x,u.y,new go.Point)}return n[n.length]=n[0],m(t),n}go.Shape.defineFigureGenerator("Pentagon",(function(e,t,n){var a=c(5),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<5;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.2,.22),o.spot2=new go.Spot(.8,.9),o})),go.Shape.defineFigureGenerator("Hexagon",(function(e,t,n){var a=c(6),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<6;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.07,.25),o.spot2=new go.Spot(.93,.75),o})),go.Shape.defineFigureGenerator("Heptagon",(function(e,t,n){var a=c(7),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<7;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.2,.15),o.spot2=new go.Spot(.8,.85),o})),go.Shape.defineFigureGenerator("Octagon",(function(e,t,n){var a=c(8),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<8;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.15,.15),o.spot2=new go.Spot(.85,.85),o})),go.Shape.defineFigureGenerator("Nonagon",(function(e,t,n){var a=c(9),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<9;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.17,.13),o.spot2=new go.Spot(.82,.82),o})),go.Shape.defineFigureGenerator("Decagon",(function(e,t,n){var a=c(10),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<10;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.16,.16),o.spot2=new go.Spot(.84,.84),o})),go.Shape.defineFigureGenerator("Dodecagon",(function(e,t,n){var a=c(12),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<12;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.16,.16),o.spot2=new go.Spot(.84,.84),o})),go.Shape.defineFigureGenerator("FivePointedStar",(function(e,t,n){var a=S(5),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<10;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.266,.333),o.spot2=new go.Spot(.733,.733),o})),go.Shape.defineFigureGenerator("SixPointedStar",(function(e,t,n){var a=S(6),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<12;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.17,.25),o.spot2=new go.Spot(.83,.75),o})),go.Shape.defineFigureGenerator("SevenPointedStar",(function(e,t,n){var a=S(7),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<14;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.222,.277),o.spot2=new go.Spot(.777,.666),o})),go.Shape.defineFigureGenerator("EightPointedStar",(function(e,t,n){var a=S(8),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<16;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.25,.25),o.spot2=new go.Spot(.75,.75),o})),go.Shape.defineFigureGenerator("NinePointedStar",(function(e,t,n){var a=S(9),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<18;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.222,.277),o.spot2=new go.Spot(.777,.666),o})),go.Shape.defineFigureGenerator("TenPointedStar",(function(e,t,n){var a=S(10),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<20;g++)i.add(new go.PathSegment(go.PathSegment.Line,a[g].x*t,a[g].y*n));return i.add(new go.PathSegment(go.PathSegment.Line,a[0].x*t,a[0].y*n).close()),m(a),o.spot1=new go.Spot(.281,.261),o.spot2=new go.Spot(.723,.748),o})),go.Shape.defineFigureGenerator("FivePointedBurst",(function(e,t,n){var a=u(5),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<a.length;g+=3)i.add(new go.PathSegment(go.PathSegment.Bezier,a[g+2].x*t,a[g+2].y*n,a[g].x*t,a[g].y*n,a[g+1].x*t,a[g+1].y*n));return i.segments.last().close(),m(a),o.spot1=new go.Spot(.222,.277),o.spot2=new go.Spot(.777,.777),o})),go.Shape.defineFigureGenerator("SixPointedBurst",(function(e,t,n){var a=u(6),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<a.length;g+=3)i.add(new go.PathSegment(go.PathSegment.Bezier,a[g+2].x*t,a[g+2].y*n,a[g].x*t,a[g].y*n,a[g+1].x*t,a[g+1].y*n));return i.segments.last().close(),m(a),o.spot1=new go.Spot(.17,.222),o.spot2=new go.Spot(.833,.777),o})),go.Shape.defineFigureGenerator("SevenPointedBurst",(function(e,t,n){var a=u(7),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<a.length;g+=3)i.add(new go.PathSegment(go.PathSegment.Bezier,a[g+2].x*t,a[g+2].y*n,a[g].x*t,a[g].y*n,a[g+1].x*t,a[g+1].y*n));return i.segments.last().close(),m(a),o.spot1=new go.Spot(.222,.222),o.spot2=new go.Spot(.777,.777),o})),go.Shape.defineFigureGenerator("EightPointedBurst",(function(e,t,n){var a=u(8),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<a.length;g+=3)i.add(new go.PathSegment(go.PathSegment.Bezier,a[g+2].x*t,a[g+2].y*n,a[g].x*t,a[g].y*n,a[g+1].x*t,a[g+1].y*n));return i.segments.last().close(),m(a),o.spot1=new go.Spot(.222,.222),o.spot2=new go.Spot(.777,.777),o})),go.Shape.defineFigureGenerator("NinePointedBurst",(function(e,t,n){var a=u(9),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<a.length;g+=3)i.add(new go.PathSegment(go.PathSegment.Bezier,a[g+2].x*t,a[g+2].y*n,a[g].x*t,a[g].y*n,a[g+1].x*t,a[g+1].y*n));return i.segments.last().close(),m(a),o.spot1=new go.Spot(.222,.222),o.spot2=new go.Spot(.777,.777),o})),go.Shape.defineFigureGenerator("TenPointedBurst",(function(e,t,n){var a=u(10),o=new go.Geometry,i=new go.PathFigure(a[0].x*t,a[0].y*n,!0);o.add(i);for(var g=1;g<a.length;g+=3)i.add(new go.PathSegment(go.PathSegment.Bezier,a[g+2].x*t,a[g+2].y*n,a[g].x*t,a[g].y*n,a[g+1].x*t,a[g+1].y*n));return i.segments.last().close(),m(a),o.spot1=new go.Spot(.222,.222),o.spot2=new go.Spot(.777,.777),o})),go.Shape.setFigureParameter("FramedRectangle",0,new e("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new e("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",(function(e,t,n){var a=e?e.parameter1:NaN,o=e?e.parameter2:NaN;isNaN(a)&&(a=8),isNaN(o)&&(o=8);var i=new go.Geometry,g=new go.PathFigure(0,0,!0);return i.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a<t/2&&o<n/2&&(g.add(new go.PathSegment(go.PathSegment.Move,a,o)),g.add(new go.PathSegment(go.PathSegment.Line,a,n-o)),g.add(new go.PathSegment(go.PathSegment.Line,t-a,n-o)),g.add(new go.PathSegment(go.PathSegment.Line,t-a,o).close())),i.setSpots(0,0,1,1,a,o,-a,-o),i})),go.Shape.setFigureParameter("Ring",0,new e("Thickness",8)),go.Shape.defineFigureGenerator("Ring",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=8);var o=t/2,i=new go.Geometry,g=new go.PathFigure(t,t/2,!0);i.add(g),g.add(new go.PathSegment(go.PathSegment.Arc,0,360,o,o,o,o).close());var s=Math.max(o-a,0);return s>0&&(g.add(new go.PathSegment(go.PathSegment.Move,t/2+s,t/2)),g.add(new go.PathSegment(go.PathSegment.Arc,0,-360,o,o,s,s).close())),i.spot1=r,i.spot2=d,i.defaultStretch=go.GraphObject.Uniform,i})),go.Shape.defineFigureGenerator("Cloud",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.08034461*t,.1944299*n,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*t,.05349299*n,-.09239631*t,.07836421*n,.1406031*t,-.0542823*n)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*t,.074219*n,.2450511*t,-.00697547*n,.3776197*t,-.01112067*n)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*t,.07004196*n,.4539471*t,0,.6066018*t,-.02526587*n)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*t,.08370865*n,.6914277*t,-.01904177*n,.8921095*t,-.01220843*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*t,.3194596*n,1.036446*t,.04105738*n,1.020377*t,.3022052*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*t,.562044*n,1.04448*t,.360238*n,.992256*t,.5219009*n)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*t,.8217117*n,1.032337*t,.5771781*n,1.018411*t,.8120651*n)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*t,.9156953*n,1.028411*t,.9571472*n,.8556702*t,1.052487*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*t,.9310455*n,.7431877*t,1.009325*n,.5624123*t,1.021761*n)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*t,.9344623*n,.4820677*t,1.031761*n,.3030112*t,1.002796*n)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*t,.870098*n,.2329994*t,1.01518*n,.03213784*t,1.01518*n)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*t,.6545475*n,-.02812061*t,.9032597*n,-.01205169*t,.6835638*n)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*t,.4265613*n,-.01812061*t,.6089503*n,-.00606892*t,.4555777*n)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*t,.1944299*n,-.01606892*t,.3892545*n,-.01205169*t,.1944299*n))).setSpots(.1,.1,.9,.9)})),go.Shape.defineFigureGenerator("StopSign",(function(e,t,n){var a=1/(Math.SQRT2+2);return(new go.Geometry).add(new go.PathFigure(a*t,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,0)).add(new go.PathSegment(go.PathSegment.Line,t,a*n)).add(new go.PathSegment(go.PathSegment.Line,t,(1-a)*n)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,n)).add(new go.PathSegment(go.PathSegment.Line,a*t,n)).add(new go.PathSegment(go.PathSegment.Line,0,(1-a)*n)).add(new go.PathSegment(go.PathSegment.Line,0,a*n).close())).setSpots(a/2,a/2,1-a/2,1-a/2)})),go.Shape.setFigureParameter("Pie",0,new e("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new e("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",(function(e,t,n){var a=e?e.parameter1:NaN,o=e?e.parameter2:NaN;isNaN(a)&&(a=0),isNaN(o)&&(o=315);var i=a%360;i<0&&(i+=360);var g=o%360,r=Math.min(t,n)/2;return(new go.Geometry).add(new go.PathFigure(r,r).add(new go.PathSegment(go.PathSegment.Arc,i,g,r,r,r,r).close()))})),go.Shape.defineFigureGenerator("PiePiece",(function(e,t,n){var a=s/Math.SQRT2*.5,o=Math.SQRT2/2,i=1-Math.SQRT2/2;return(new go.Geometry).add(new go.PathFigure(t,n,!0).add(new go.PathSegment(go.PathSegment.Bezier,o*t,i*n,t,(1-a)*n,(o+a)*t,(i+a)*n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close()))})),go.Shape.setFigureParameter("ThickCross",0,new e("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=30);var o=Math.min(a,t)/2,i=t/2,g=n/2;return(new go.Geometry).add(new go.PathFigure(i-o,0,!0).add(new go.PathSegment(go.PathSegment.Line,i+o,0)).add(new go.PathSegment(go.PathSegment.Line,i+o,g-o)).add(new go.PathSegment(go.PathSegment.Line,t,g-o)).add(new go.PathSegment(go.PathSegment.Line,t,g+o)).add(new go.PathSegment(go.PathSegment.Line,i+o,g+o)).add(new go.PathSegment(go.PathSegment.Line,i+o,n)).add(new go.PathSegment(go.PathSegment.Line,i-o,n)).add(new go.PathSegment(go.PathSegment.Line,i-o,g+o)).add(new go.PathSegment(go.PathSegment.Line,0,g+o)).add(new go.PathSegment(go.PathSegment.Line,0,g-o)).add(new go.PathSegment(go.PathSegment.Line,i-o,g-o).close()))})),go.Shape.setFigureParameter("ThinCross",0,new e("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=10);var o=Math.min(a,t)/2,i=t/2,g=n/2;return(new go.Geometry).add(new go.PathFigure(i-o,0,!0).add(new go.PathSegment(go.PathSegment.Line,i+o,0)).add(new go.PathSegment(go.PathSegment.Line,i+o,g-o)).add(new go.PathSegment(go.PathSegment.Line,t,g-o)).add(new go.PathSegment(go.PathSegment.Line,t,g+o)).add(new go.PathSegment(go.PathSegment.Line,i+o,g+o)).add(new go.PathSegment(go.PathSegment.Line,i+o,n)).add(new go.PathSegment(go.PathSegment.Line,i-o,n)).add(new go.PathSegment(go.PathSegment.Line,i-o,g+o)).add(new go.PathSegment(go.PathSegment.Line,0,g+o)).add(new go.PathSegment(go.PathSegment.Line,0,g-o)).add(new go.PathSegment(go.PathSegment.Line,i-o,g-o).close()))})),go.Shape.setFigureParameter("ThickX",0,new e("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",(function(e,t,n){var a=e?e.parameter1:NaN;if((isNaN(a)||a<0)&&(a=30),0===t||0===n)return(s=new go.Geometry(go.Geometry.Rectangle)).startX=0,s.startY=0,s.endX=t,s.endY=n,s;var o=t/2,i=n/2,g=Math.atan2(n,t),r=a-Math.min(Math.cos(g)*a/2,o),d=a-Math.min(Math.sin(g)*a/2,i),s=new go.Geometry,l=new go.PathFigure(r,0,!0);return s.add(l),l.add(new go.PathSegment(go.PathSegment.Line,o,.2*n)),l.add(new go.PathSegment(go.PathSegment.Line,t-r,0)),l.add(new go.PathSegment(go.PathSegment.Line,t,d)),l.add(new go.PathSegment(go.PathSegment.Line,.8*t,i)),l.add(new go.PathSegment(go.PathSegment.Line,t,n-d)),l.add(new go.PathSegment(go.PathSegment.Line,t-r,n)),l.add(new go.PathSegment(go.PathSegment.Line,o,.8*n)),l.add(new go.PathSegment(go.PathSegment.Line,r,n)),l.add(new go.PathSegment(go.PathSegment.Line,0,n-d)),l.add(new go.PathSegment(go.PathSegment.Line,.2*t,i)),l.add(new go.PathSegment(go.PathSegment.Line,0,d).close()),s})),go.Shape.setFigureParameter("ThinX",0,new e("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=10);var o=new go.Geometry,i=new go.PathFigure(.1*t,0,!0);return o.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,.9*t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.6*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),i.add(new go.PathSegment(go.PathSegment.Line,.9*t,n)),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Line,.1*t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,.9*n)),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,.1*n).close()),o})),go.Shape.setFigureParameter("SquareIBeam",0,new e("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=.2);var o=new go.Geometry,i=new go.PathFigure(0,0,!0);return o.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,a*n)),i.add(new go.PathSegment(go.PathSegment.Line,(.5+a/2)*t,a*n)),i.add(new go.PathSegment(go.PathSegment.Line,(.5+a/2)*t,(1-a)*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,(1-a)*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,(1-a)*n)),i.add(new go.PathSegment(go.PathSegment.Line,(.5-a/2)*t,(1-a)*n)),i.add(new go.PathSegment(go.PathSegment.Line,(.5-a/2)*t,a*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,a*n).close()),o})),go.Shape.setFigureParameter("RoundedIBeam",0,new e("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=.5);var o=new go.Geometry,i=new go.PathFigure(0,0,!0);return o.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Bezier,t,n,Math.abs(1-a)*t,.25*n,Math.abs(1-a)*t,.75*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n)),i.add(new go.PathSegment(go.PathSegment.Bezier,0,0,a*t,.75*n,a*t,.25*n).close()),o})),go.Shape.defineFigureGenerator("HalfEllipse",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,s*t,0,t,(.5-s/2)*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,n,t,(.5+s/2)*n,s*t,n).close())).setSpots(0,.156,.844,.844)})),go.Shape.defineFigureGenerator("Crescent",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,n,t,0,t,n)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*t,.75*n,.5*t,.25*n).close())).setSpots(.311,.266,.744,.744)})),go.Shape.defineFigureGenerator("Heart",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.5*t,n,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*n,.1*t,.8*n,0,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.3*n,0,0,.45*t,0)).add(new go.PathSegment(go.PathSegment.Bezier,t,.3*n,.55*t,0,t,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,.5*n,.9*t,.8*n).close())).setSpots(.14,.29,.86,.78)})),go.Shape.defineFigureGenerator("Spade",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.5*t,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*t,.01*n)).add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,.6*t,.2*n,t,.25*n)).add(new go.PathSegment(go.PathSegment.Bezier,.55*t,.7*n,t,.8*n,.6*t,.8*n)).add(new go.PathSegment(go.PathSegment.Bezier,.75*t,n,.5*t,.75*n,.55*t,.95*n)).add(new go.PathSegment(go.PathSegment.Line,.25*t,n)).add(new go.PathSegment(go.PathSegment.Bezier,.45*t,.7*n,.45*t,.95*n,.5*t,.75*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.4*t,.8*n,0,.8*n)).add(new go.PathSegment(go.PathSegment.Bezier,.49*t,.01*n,0,.25*n,.4*t,.2*n).close())).setSpots(.14,.26,.86,.78)})),go.Shape.defineFigureGenerator("Club",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.4*t,.6*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,.15*t,n,.5*t,.75*n,.45*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.6*t,.6*n,.55*t,.95*n,.5*t,.75*n));var i=.2,g=.3,r=0,d=i*s;return o.add(new go.PathSegment(go.PathSegment.Bezier,(.5+g)*t,(.5+i+r)*n,(.5-i+g)*t,(.5+d+r)*n,(.5-d+g)*t,(.5+i+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(.5+i+g)*t,(.5+r)*n,(.5+d+g)*t,(.5+i+r)*n,(.5+i+g)*t,(.5+d+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(.5+g)*t,(.5-i+r)*n,(.5+i+g)*t,(.5-d+r)*n,(.5+d+g)*t,(.5-i+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.65*t,.36771243*n,(.5-d+g)*t,(.5-i+r)*n,(.5-i+g+.05)*t,(.5-d+r-.02)*n)),g=0,r=-.3,d=(i=.2)*s,o.add(new go.PathSegment(go.PathSegment.Bezier,(.5+i+g)*t,(.5+r)*n,(.5+d+g)*t,(.5+i+r)*n,(.5+i+g)*t,(.5+d+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(.5+g)*t,(.5-i+r)*n,(.5+i+g)*t,(.5-d+r)*n,(.5+d+g)*t,(.5-i+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(.5-i+g)*t,(.5+r)*n,(.5-d+g)*t,(.5-i+r)*n,(.5-i+g)*t,(.5-d+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(.5-d+g)*t,(.5+i+r)*n,(.5-i+g)*t,(.5+d+r)*n,(.5-d+g)*t,(.5+i+r)*n)),g=-.3,r=0,d=(i=.2)*s,o.add(new go.PathSegment(go.PathSegment.Bezier,(.5+g)*t,(.5-i+r)*n,(.5+i+g-.05)*t,(.5-d+r-.02)*n,(.5+d+g)*t,(.5-i+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(.5-i+g)*t,(.5+r)*n,(.5-d+g)*t,(.5-i+r)*n,(.5-i+g)*t,(.5-d+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,(.5+g)*t,(.5+i+r)*n,(.5-i+g)*t,(.5+d+r)*n,(.5-d+g)*t,(.5+i+r)*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.4*t,.6*n,(.5+d+g)*t,(.5+i+r)*n,(.5+i+g)*t,(.5+d+r)*n).close()),a.setSpots(.06,.33,.93,.68),a})),go.Shape.defineFigureGenerator("YinYang",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Arc,270,180,.5*t,.5*t,.5*t,.5*t)),o.add(new go.PathSegment(go.PathSegment.Arc,90,-180,.5*t,.75*t,.25*t,.25*t)),o.add(new go.PathSegment(go.PathSegment.Arc,90,180,.5*t,.25*t,.25*t,.25*t));var i=.1,g=.5,r=.25;return o.add(new go.PathSegment(go.PathSegment.Move,.6*t,r*n)),o.add(new go.PathSegment(go.PathSegment.Arc,0,-360,t*g,n*r,i*t,i*t).close()),o=new go.PathFigure(.5*t,0,!1),a.add(o),o.add(new go.PathSegment(go.PathSegment.Arc,270,-180,.5*t,.5*t,.5*t,.5*t)),r=.75,o=new go.PathFigure(.6*t,r*n,!0),a.add(o),o.add(new go.PathSegment(go.PathSegment.Arc,0,360,t*g,n*r,i*t,i*t).close()),a.defaultStretch=go.GraphObject.Uniform,a})),go.Shape.defineFigureGenerator("Peace",(function(e,t,n){var a=.8535533905932737,o=.5*t,i=.5*n;return(new go.Geometry).add(new go.PathFigure(o,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,o,i,o,i)).add(new go.PathSegment(go.PathSegment.Line,o,n)).add(new go.PathSegment(go.PathSegment.Move,o,i)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,a*n)).add(new go.PathSegment(go.PathSegment.Move,o,i)).add(new go.PathSegment(go.PathSegment.Line,a*t,a*n)))})),go.Shape.defineFigureGenerator("NotAllowed",(function(e,t,n){var i=new go.Geometry,r=.5*s,d=.5,l=.5,h=.5,m=new go.PathFigure(l*t,(h-d)*n);i.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,(l-d)*t,h*n,(l-r)*t,(h-d)*n,(l-d)*t,(h-r)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h+d)*n,(l-d)*t,(h+r)*n,(l-r)*t,(h+d)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(l+d)*t,h*n,(l+r)*t,(h+d)*n,(l+d)*t,(h+r)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h-d)*n,(l+d)*t,(h-r)*n,(l+r)*t,(h-d)*n)),d=.4,r=.4*s;var c=a(),u=a(),S=a(),P=a();g(l,h-d,l+r,h-d,l+d,h-r,l+d,h,.42,c,u,S,P,P);var w=a(),p=a(),f=a();g(l,h-d,l+r,h-d,l+d,h-r,l+d,h,.58,P,P,f,w,p);var v=a(),y=a(),L=a();g(l,h+d,l-r,h+d,l-d,h+r,l-d,h,.42,v,y,L,P,P);var x=a(),_=a(),b=a();return g(l,h+d,l-r,h+d,l-d,h+r,l-d,h,.58,P,P,b,x,_),m.add(new go.PathSegment(go.PathSegment.Move,b.x*t,b.y*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(l-d)*t,h*n,x.x*t,x.y*n,_.x*t,_.y*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h-d)*n,(l-d)*t,(h-r)*n,(l-r)*t,(h-d)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,S.x*t,S.y*n,c.x*t,c.y*n,u.x*t,u.y*n)),m.add(new go.PathSegment(go.PathSegment.Line,b.x*t,b.y*n).close()),m.add(new go.PathSegment(go.PathSegment.Move,L.x*t,L.y*n)),m.add(new go.PathSegment(go.PathSegment.Line,f.x*t,f.y*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(l+d)*t,h*n,w.x*t,w.y*n,p.x*t,p.y*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h+d)*n,(l+d)*t,(h+r)*n,(l+r)*t,(h+d)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,L.x*t,L.y*n,v.x*t,v.y*n,y.x*t,y.y*n).close()),o(c),o(u),o(S),o(P),o(w),o(p),o(f),o(v),o(y),o(L),o(x),o(_),o(b),i.defaultStretch=go.GraphObject.Uniform,i})),go.Shape.defineFigureGenerator("Fragile",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*t,0)).add(new go.PathSegment(go.PathSegment.Line,.2*t,.15*n)).add(new go.PathSegment(go.PathSegment.Line,.3*t,.25*n)).add(new go.PathSegment(go.PathSegment.Line,.29*t,.33*n)).add(new go.PathSegment(go.PathSegment.Line,.35*t,.25*n)).add(new go.PathSegment(go.PathSegment.Line,.3*t,.15*n)).add(new go.PathSegment(go.PathSegment.Line,.4*t,0)).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*t,.5*n,t,.25*n,.75*t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.55*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,n)).add(new go.PathSegment(go.PathSegment.Line,.3*t,n)).add(new go.PathSegment(go.PathSegment.Line,.3*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.45*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.45*t,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*t,.5*n,0,.25*n).close()))})),go.Shape.setFigureParameter("HourGlass",0,new e("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=30),a>t&&(a=t);var o=(t-a)/2,i=o+a;return(new go.Geometry).add(new go.PathFigure(i,.5*n).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n)).add(new go.PathSegment(go.PathSegment.Line,o,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,t,0).close()))})),go.Shape.defineFigureGenerator("Lightning",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,.55*n).add(new go.PathSegment(go.PathSegment.Line,.6*t,0)).add(new go.PathSegment(go.PathSegment.Line,.3*t,.45*n)).add(new go.PathSegment(go.PathSegment.Line,t,.45*n)).add(new go.PathSegment(go.PathSegment.Line,.4*t,n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,.55*n).close()))})),go.Shape.defineFigureGenerator("GenderMale",(function(e,t,i){var r=new go.Geometry,d=.4*s,l=.4,h=.5,m=.5,c=a(),u=a(),S=a(),P=a(),w=new go.PathFigure((h-l)*t,m*i,!1);r.add(w),w.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m-l)*i,(h-l)*t,(m-d)*i,(h-d)*t,(m-l)*i)),g(h,m-l,h+d,m-l,h+l,m-d,h+l,m,.44,S,P,u,c,c),w.add(new go.PathSegment(go.PathSegment.Bezier,u.x*t,u.y*i,S.x*t,S.y*i,P.x*t,P.y*i));var p=n(u.x,u.y);g(h,m-l,h+d,m-l,h+l,m-d,h+l,m,.56,c,c,u,S,P);var f=n(u.x,u.y);w.add(new go.PathSegment(go.PathSegment.Line,(.1*p.x+.855)*t,.1*p.y*i)),w.add(new go.PathSegment(go.PathSegment.Line,.85*t,.1*p.y*i)),w.add(new go.PathSegment(go.PathSegment.Line,.85*t,0)),w.add(new go.PathSegment(go.PathSegment.Line,t,0)),w.add(new go.PathSegment(go.PathSegment.Line,t,.15*i)),w.add(new go.PathSegment(go.PathSegment.Line,(.1*f.x+.9)*t,.15*i)),w.add(new go.PathSegment(go.PathSegment.Line,(.1*f.x+.9)*t,(.1*f.y+.05*.9)*i)),w.add(new go.PathSegment(go.PathSegment.Line,f.x*t,f.y*i)),w.add(new go.PathSegment(go.PathSegment.Bezier,(h+l)*t,m*i,S.x*t,S.y*i,P.x*t,P.y*i)),w.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m+l)*i,(h+l)*t,(m+d)*i,(h+d)*t,(m+l)*i)),w.add(new go.PathSegment(go.PathSegment.Bezier,(h-l)*t,m*i,(h-d)*t,(m+l)*i,(h-l)*t,(m+d)*i)),l=.35,d=.35*s;var v=new go.PathFigure(h*t,(m-l)*i,!1);r.add(v),v.add(new go.PathSegment(go.PathSegment.Bezier,(h-l)*t,m*i,(h-d)*t,(m-l)*i,(h-l)*t,(m-d)*i)),v.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m+l)*i,(h-l)*t,(m+d)*i,(h-d)*t,(m+l)*i)),v.add(new go.PathSegment(go.PathSegment.Bezier,(h+l)*t,m*i,(h+d)*t,(m+l)*i,(h+l)*t,(m+d)*i)),v.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m-l)*i,(h+l)*t,(m-d)*i,(h+d)*t,(m-l)*i));var y=new go.PathFigure((h-l)*t,m*i,!1);return r.add(y),o(c),o(u),o(S),o(P),o(p),o(f),r.spot1=new go.Spot(.202,.257),r.spot2=new go.Spot(.792,.739),r.defaultStretch=go.GraphObject.Uniform,r})),go.Shape.defineFigureGenerator("GenderFemale",(function(e,t,n){var a=new go.Geometry,o=.375,i=0,g=-.125,r=o*s,d=new go.PathFigure((.525+i)*t,(.5+o+g)*n,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o+i)*t,(.5+g)*n,(.5+r+i)*t,(.5+o+g)*n,(.5+o+i)*t,(.5+r+g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(.5+i)*t,(.5-o+g)*n,(.5+o+i)*t,(.5-r+g)*n,(.5+r+i)*t,(.5-o+g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(.5-o+i)*t,(.5+g)*n,(.5-r+i)*t,(.5-o+g)*n,(.5-o+i)*t,(.5-r+g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(.475+i)*t,(.5+o+g)*n,(.5-o+i)*t,(.5+r+g)*n,(.5-r+i)*t,(.5+o+g)*n)),d.add(new go.PathSegment(go.PathSegment.Line,.475*t,.85*n)),d.add(new go.PathSegment(go.PathSegment.Line,.425*t,.85*n)),d.add(new go.PathSegment(go.PathSegment.Line,.425*t,.9*n)),d.add(new go.PathSegment(go.PathSegment.Line,.475*t,.9*n)),d.add(new go.PathSegment(go.PathSegment.Line,.475*t,n)),d.add(new go.PathSegment(go.PathSegment.Line,.525*t,n)),d.add(new go.PathSegment(go.PathSegment.Line,.525*t,.9*n)),d.add(new go.PathSegment(go.PathSegment.Line,.575*t,.9*n)),d.add(new go.PathSegment(go.PathSegment.Line,.575*t,.85*n)),d.add(new go.PathSegment(go.PathSegment.Line,.525*t,.85*n).close()),i=0,g=-.125,r=(o=.325)*s;d=new go.PathFigure((.5+o+i)*t,(.5+g)*n,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,(.5+i)*t,(.5+o+g)*n,(.5+o+i)*t,(.5+r+g)*n,(.5+r+i)*t,(.5+o+g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(.5-o+i)*t,(.5+g)*n,(.5-r+i)*t,(.5+o+g)*n,(.5-o+i)*t,(.5+r+g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(.5+i)*t,(.5-o+g)*n,(.5-o+i)*t,(.5-r+g)*n,(.5-r+i)*t,(.5-o+g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(.5+o+i)*t,(.5+g)*n,(.5+r+i)*t,(.5-o+g)*n,(.5+o+i)*t,(.5-r+g)*n));d=new go.PathFigure((.525+i)*t,(.5+o+g)*n,!1);return a.add(d),a.spot1=new go.Spot(.232,.136),a.spot2=new go.Spot(.682,.611),a.defaultStretch=go.GraphObject.Uniform,a})),go.Shape.defineFigureGenerator("LogicImplies",(function(e,t,n){var a=e?e.parameter1:NaN;return isNaN(a)&&(a=.2),(new go.Geometry).add(new go.PathFigure((1-a)*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n))).setSpots(0,0,.8,.5)})),go.Shape.defineFigureGenerator("LogicIff",(function(e,t,n){var a=e?e.parameter1:NaN;return isNaN(a)&&(a=.2),(new go.Geometry).add(new go.PathFigure((1-a)*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,(1-a)*t,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Move,a*t,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,a*t,n))).setSpots(.2,0,.8,.5)})),go.Shape.defineFigureGenerator("LogicNot",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)))})),go.Shape.defineFigureGenerator("LogicAnd",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,0)).add(new go.PathSegment(go.PathSegment.Line,t,n))).setSpots(.25,.5,.75,1)})),go.Shape.defineFigureGenerator("LogicOr",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)).add(new go.PathSegment(go.PathSegment.Line,t,0))).setSpots(.219,0,.78,.409)})),go.Shape.defineFigureGenerator("LogicXor",(function(e,t,n){var a=(new go.Geometry).add(new go.PathFigure(.5*t,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*t,.5*n,.5*t,.5*n)));return a.defaultStretch=go.GraphObject.Uniform,a})),go.Shape.defineFigureGenerator("LogicTruth",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Move,.5*t,0)).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)))})),go.Shape.defineFigureGenerator("LogicFalsity",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Move,.5*t,n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,0)))})),go.Shape.defineFigureGenerator("LogicThereExists",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,0,.5*n)).add(new go.PathSegment(go.PathSegment.Move,t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n)))})),go.Shape.defineFigureGenerator("LogicForAll",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*t,n)).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Move,.25*t,.5*n)).add(new go.PathSegment(go.PathSegment.Line,.75*t,.5*n))).setSpots(.25,0,.75,.5)})),go.Shape.defineFigureGenerator("LogicIsDefinedAs",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*n)).add(new go.PathSegment(go.PathSegment.Line,t,.5*n)).add(new go.PathSegment(go.PathSegment.Move,0,n)).add(new go.PathSegment(go.PathSegment.Line,t,n))).setSpots(.01,.01,.99,.49)})),go.Shape.defineFigureGenerator("LogicIntersect",(function(e,t,n){var a=.5;return(new go.Geometry).add(new go.PathFigure(0,n,!1).add(new go.PathSegment(go.PathSegment.Line,0,a*n)).add(new go.PathSegment(go.PathSegment.Arc,180,180,a*t,a*n,a*t,a*n)).add(new go.PathSegment(go.PathSegment.Line,t,n))).setSpots(0,.5,1,1)})),go.Shape.defineFigureGenerator("LogicUnion",(function(e,t,n){var a=.5;return(new go.Geometry).add(new go.PathFigure(t,0,!1).add(new go.PathSegment(go.PathSegment.Line,t,a*n)).add(new go.PathSegment(go.PathSegment.Arc,0,180,a*t,a*n,a*t,a*n)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)})),go.Shape.setFigureParameter("Arrow",0,new e("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new e("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=.3);var r=e?e.parameter2:NaN;isNaN(r)&&(r=.3);var d=(1-g)*t,s=(.5-r/2)*n,l=(.5+r/2)*n,h=new go.Geometry,m=new go.PathFigure(0,s,!0);h.add(m),m.add(new go.PathSegment(go.PathSegment.Line,d,s)),m.add(new go.PathSegment(go.PathSegment.Line,d,0)),m.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),m.add(new go.PathSegment(go.PathSegment.Line,d,n)),m.add(new go.PathSegment(go.PathSegment.Line,d,l)),m.add(new go.PathSegment(go.PathSegment.Line,0,l).close()),h.spot1=new go.Spot(0,s/n);var c=i(0,l/n,1,l/n,d/t,1,1,.5,a());return h.spot2=new go.Spot(c.x,c.y),o(c),h})),go.Shape.setFigureParameter("Arrow2",0,new e("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new e("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=30),g>t&&(g=t);var r=e?e.parameter2:NaN;isNaN(r)&&(r=30);var d=t-g,s=(n-(r=Math.min(r,n/2)))/2,l=s+r,h=new go.Geometry,m=new go.PathFigure(0,s,!0);h.add(m),m.add(new go.PathSegment(go.PathSegment.Line,d,s)),m.add(new go.PathSegment(go.PathSegment.Line,d,0)),m.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),m.add(new go.PathSegment(go.PathSegment.Line,d,n)),m.add(new go.PathSegment(go.PathSegment.Line,d,l)),m.add(new go.PathSegment(go.PathSegment.Line,0,l).close()),h.spot1=new go.Spot(0,s/n);var c=i(0,l/n,1,l/n,d/t,1,1,.5,a());return h.spot2=new go.Spot(c.x,c.y),o(c),h})),go.Shape.defineFigureGenerator("Chevron",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n).close()),a})),go.Shape.defineFigureGenerator("DoubleArrow",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,.214*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,.786*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,1*n).close()),a})),go.Shape.setFigureParameter("DoubleEndArrow",0,new e("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=.3);var r=(.5-g/2)*n,d=(.5+g/2)*n,s=new go.Geometry,l=new go.PathFigure(t,.5*n,!0);s.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),l.add(new go.PathSegment(go.PathSegment.Line,.3*t,d)),l.add(new go.PathSegment(go.PathSegment.Line,.3*t,n)),l.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),l.add(new go.PathSegment(go.PathSegment.Line,.3*t,0)),l.add(new go.PathSegment(go.PathSegment.Line,.3*t,r)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,r)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,0).close());var h=i(0,.5,.3,0,0,r/n,.1,r/n,a());return s.spot1=new go.Spot(h.x,h.y),h=i(.7,1,1,.5,0,d/n,1,d/n,h),s.spot2=new go.Spot(h.x,h.y),o(h),s})),go.Shape.setFigureParameter("DoubleEndArrow2",0,new e("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new e("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=40);var r=e?e.parameter2:NaN;isNaN(r)&&(r=100);var d=(n-g)/2,s=d+g,l=(n-r)/2,h=l+r;(g>n||r>n)&&(r>g?(s=(d=(n-(g=g*n/r))/2)+g,l=0,h=n):(d=0,s=n,l=0,h=n));var m=new go.Geometry,c=new go.PathFigure(t,.5*n,!0);m.add(c),c.add(new go.PathSegment(go.PathSegment.Line,.7*t,h)),c.add(new go.PathSegment(go.PathSegment.Line,.7*t,s)),c.add(new go.PathSegment(go.PathSegment.Line,.3*t,s)),c.add(new go.PathSegment(go.PathSegment.Line,.3*t,h)),c.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),c.add(new go.PathSegment(go.PathSegment.Line,.3*t,l)),c.add(new go.PathSegment(go.PathSegment.Line,.3*t,d)),c.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),c.add(new go.PathSegment(go.PathSegment.Line,.7*t,l).close());var u=i(0,.5,.3,l/n,0,d/n,1,d/n,a());return m.spot1=new go.Spot(u.x,u.y),u=i(.7,h/n,1,.5,0,s/n,1,s/n,u),m.spot2=new go.Spot(u.x,u.y),o(u),m})),go.Shape.setFigureParameter("IBeamArrow",0,new e("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=.3);var r=(.5-g/2)*n,d=(.5+g/2)*n,s=new go.Geometry,l=new go.PathFigure(t,.5*n,!0);s.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),l.add(new go.PathSegment(go.PathSegment.Line,.2*t,d)),l.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),l.add(new go.PathSegment(go.PathSegment.Line,0,n)),l.add(new go.PathSegment(go.PathSegment.Line,0,0)),l.add(new go.PathSegment(go.PathSegment.Line,.2*t,0)),l.add(new go.PathSegment(go.PathSegment.Line,.2*t,r)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,r)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,0).close()),s.spot1=new go.Spot(0,r/n);var h=i(.7,1,1,.5,0,d/n,1,d/n,a());return s.spot2=new go.Spot(h.x,h.y),o(h),s})),go.Shape.setFigureParameter("IBeamArrow2",0,new e("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new e("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=40);var r=e?e.parameter2:NaN;isNaN(r)&&(r=100);var d=(n-g)/2,s=d+g,l=(n-r)/2,h=l+r;(g>n||r>n)&&(r>g?(s=(d=(n-(g=g*n/r))/2)+g,l=0,h=n):(d=0,s=n,l=0,h=n));var m=new go.Geometry,c=new go.PathFigure(t,.5*n,!0);m.add(c),c.add(new go.PathSegment(go.PathSegment.Line,.7*t,h)),c.add(new go.PathSegment(go.PathSegment.Line,.7*t,s)),c.add(new go.PathSegment(go.PathSegment.Line,.2*t,s)),c.add(new go.PathSegment(go.PathSegment.Line,.2*t,h)),c.add(new go.PathSegment(go.PathSegment.Line,0,h)),c.add(new go.PathSegment(go.PathSegment.Line,0,l)),c.add(new go.PathSegment(go.PathSegment.Line,.2*t,l)),c.add(new go.PathSegment(go.PathSegment.Line,.2*t,d)),c.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),c.add(new go.PathSegment(go.PathSegment.Line,.7*t,l).close()),m.spot1=new go.Spot(0,d/n);var u=i(.7,h/n,1,.5,0,s/n,1,s/n,a());return m.spot2=new go.Spot(u.x,u.y),o(u),m})),go.Shape.setFigureParameter("Pointer",0,new e("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=.1);var r=new go.Geometry,d=new go.PathFigure(t,.5*n,!0);r.add(d),d.add(new go.PathSegment(go.PathSegment.Line,0,n)),d.add(new go.PathSegment(go.PathSegment.Line,g*t,.5*n)),d.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),r.spot1=new go.Spot(g,.35);var s=i(.2,.65,1,.65,0,1,1,.5,a());return r.spot2=new go.Spot(s.x,s.y),o(s),r})),go.Shape.setFigureParameter("RoundedPointer",0,new e("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=.3);var r=new go.Geometry,d=new go.PathFigure(t,.5*n,!0);r.add(d),d.add(new go.PathSegment(go.PathSegment.Line,0,n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,0,g*t,.75*n,g*t,.25*n).close()),r.spot1=new go.Spot(g,.35);var s=i(0,.65,1,.65,0,1,1,.5,a());return r.spot2=new go.Spot(s.x,s.y),o(s),r})),go.Shape.setFigureParameter("SplitEndArrow",0,new e("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=.4);var r=(.5-g/2)*n,d=(.5+g/2)*n,s=new go.Geometry,l=new go.PathFigure(t,.5*n,!0);s.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),l.add(new go.PathSegment(go.PathSegment.Line,0,d)),l.add(new go.PathSegment(go.PathSegment.Line,.2*t,.5*n)),l.add(new go.PathSegment(go.PathSegment.Line,0,r)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,r)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,0).close()),s.spot1=new go.Spot(.2,.3);var h=i(.7,1,1,.5,0,d/n,1,d/n,a());return s.spot2=new go.Spot(h.x,h.y),o(h),s})),go.Shape.setFigureParameter("SplitEndArrow2",0,new e("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",(function(e,t,n){var g=e?e.parameter1:NaN;isNaN(g)&&(g=50);var r=(n-g)/2,d=r+g;g>n&&(r=0,d=n);var s=new go.Geometry,l=new go.PathFigure(t,.5*n,!0);s.add(l),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,d)),l.add(new go.PathSegment(go.PathSegment.Line,0,d)),l.add(new go.PathSegment(go.PathSegment.Line,.2*t,.5*n)),l.add(new go.PathSegment(go.PathSegment.Line,0,r)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,r)),l.add(new go.PathSegment(go.PathSegment.Line,.7*t,0).close()),s.spot1=new go.Spot(.2,r/n);var h=i(.7,1,1,.5,0,d/n,1,d/n,a());return s.spot2=new go.Spot(h.x,h.y),o(h),s})),go.Shape.setFigureParameter("SquareArrow",0,new e("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=.7);var o=new go.Geometry,i=new go.PathFigure(t,.5*n,!0);return o.add(i),i.add(new go.PathSegment(go.PathSegment.Line,a*t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,0)),i.add(new go.PathSegment(go.PathSegment.Line,a*t,0).close()),o.spot1=go.Spot.TopLeft,o.spot2=new go.Spot(a,1),o})),go.Shape.defineFigureGenerator("Cone1",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.1*s,g=new go.PathFigure(0,.9*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,(.9+i)*n,(.5+o)*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-o)*t,n,0,(.9+i)*n).close()),a.spot1=new go.Spot(.25,.5),a.spot2=new go.Spot(.75,.97),a})),go.Shape.defineFigureGenerator("Cone2",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.9*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.9*n,(1-.85/.9)*t,n,.85/.9*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,0,.9*n).close());var i=new go.PathFigure(0,.9*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Bezier,t,.9*n,(1-.85/.9)*t,.8*n,.85/.9*t,.8*n)),a.spot1=new go.Spot(.25,.5),a.spot2=new go.Spot(.75,.82),a})),go.Shape.defineFigureGenerator("Cube1",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.15*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,0,.15*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.85*n).close());var i=new go.PathFigure(.5*t,n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.3*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,.15*n)),i.add(new go.PathSegment(go.PathSegment.Move,.5*t,.3*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,.15*n)),a.spot1=new go.Spot(0,.3),a.spot2=new go.Spot(.5,.85),a})),go.Shape.defineFigureGenerator("Cube2",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.3*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,0).close());var i=new go.PathFigure(0,.3*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.7*t,.3*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Move,.7*t,.3*n)),i.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),a.spot1=new go.Spot(0,.3),a.spot2=new go.Spot(.7,1),a})),go.Shape.defineFigureGenerator("Cylinder1",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=5),a=Math.min(a,n/3);var o=new go.Geometry,i=.5*s,g=new go.PathFigure(0,a,!0);o.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,s*a,(.5-i)*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,1*t,a,(.5+i)*t,0,1*t,s*a)),g.add(new go.PathSegment(go.PathSegment.Line,t,n-a)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,1*n,1*t,n-s*a,(.5+i)*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,n-a,(.5-i)*t,1*n,0,n-s*a)),g.add(new go.PathSegment(go.PathSegment.Line,0,a));var r=new go.PathFigure(t,a,!1);return o.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,2*a,1*t,2*a-s*a,(.5+i)*t,2*a)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,a,(.5-i)*t,2*a,0,2*a-s*a)),o.spot1=new go.Spot(0,0,0,2*a),o.spot2=new go.Spot(1,1),o})),go.Shape.defineFigureGenerator("Cylinder2",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=5),a=Math.min(a,n/3);var o=new go.Geometry,i=.5*s,g=new go.PathFigure(0,n-a,!0);o.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,a)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,s*a,(.5-i)*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,a,(.5+i)*t,0,t,s*a)),g.add(new go.PathSegment(go.PathSegment.Line,t,n-a)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,n-s*a,(.5+i)*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,n-a,(.5-i)*t,n,0,n-s*a));var r=new go.PathFigure(0,n-a,!1);return o.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n-2*a,0,n-a-s*a,(.5-i)*t,n-2*a)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,n-a,(.5+i)*t,n-2*a,t,n-a-s*a)),o.spot1=new go.Spot(0,0),o.spot2=new go.Spot(1,1,0,-2*a),o})),go.Shape.defineFigureGenerator("Cylinder3",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=5),a=Math.min(a,t/3);var o=new go.Geometry,i=.5*s,g=new go.PathFigure(a,0,!0);o.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t-a,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,t-s*a,0,t,(.5-i)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,t-a,n,t,(.5+i)*n,t-s*a,n)),g.add(new go.PathSegment(go.PathSegment.Line,a,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,s*a,n,0,(.5+i)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,a,0,0,(.5-i)*n,s*a,0));var r=new go.PathFigure(a,0,!1);return o.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,2*a,.5*n,a+s*a,0,2*a,(.5-i)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,a,n,2*a,(.5+i)*n,a+s*a,n)),o.spot1=new go.Spot(0,0,2*a,0),o.spot2=new go.Spot(1,1),o})),go.Shape.defineFigureGenerator("Cylinder4",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=5),a=Math.min(a,t/3);var o=new go.Geometry,i=.5*s,g=new go.PathFigure(t-a,0,!0);o.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,t-s*a,0,t,(.5-i)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,t-a,n,t,(.5+i)*n,t-s*a,n)),g.add(new go.PathSegment(go.PathSegment.Line,a,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,s*a,n,0,(.5+i)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,a,0,0,(.5-i)*n,s*a,0)),g.add(new go.PathSegment(go.PathSegment.Line,t-a,0));var r=new go.PathFigure(t-a,0,!1);return o.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,t-2*a,.5*n,t-a-s*a,0,t-2*a,(.5-i)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,t-a,n,t-2*a,(.5+i)*n,t-a-s*a,n)),o.spot1=new go.Spot(0,0),o.spot2=new go.Spot(1,1,-2*a,0),o})),go.Shape.defineFigureGenerator("Prism1",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.25*t,.25*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var i=new go.PathFigure(.25*t,.25*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),a.spot1=new go.Spot(.408,.172),a.spot2=new go.Spot(.833,.662),a})),go.Shape.defineFigureGenerator("Prism2",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.25*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var i=new go.PathFigure(0,n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.25*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Move,0,.25*n)),i.add(new go.PathSegment(go.PathSegment.Line,.25*t,.5*n)),a.spot1=new go.Spot(.25,.5),a.spot2=new go.Spot(.75,.75),a})),go.Shape.defineFigureGenerator("Pyramid1",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.75*n).close());var i=new go.PathFigure(.5*t,0,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),a.spot1=new go.Spot(.25,.367),a.spot2=new go.Spot(.75,.875),a})),go.Shape.defineFigureGenerator("Pyramid2",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.85*n).close());var i=new go.PathFigure(.5*t,0,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.7*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,.85*n)),i.add(new go.PathSegment(go.PathSegment.Move,.5*t,.7*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,.85*n)),a.spot1=new go.Spot(.25,.367),a.spot2=new go.Spot(.75,.875),a})),go.Shape.defineFigureGenerator("Actor",(function(e,t,n){var a=new go.Geometry,o=.2,i=.1,g=s*o,r=s*i,d=.5,l=.1,h=new go.PathFigure(d*t,(l+i)*n,!0);a.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,(d-o)*t,l*n,(d-g)*t,(l+i)*n,(d-o)*t,(l+r)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l-i)*n,(d-o)*t,(l-r)*n,(d-g)*t,(l-i)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(d+o)*t,l*n,(d+g)*t,(l-i)*n,(d+o)*t,(l-r)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l+i)*n,(d+o)*t,(l+r)*n,(d+g)*t,(l+i)*n));var m=.05,c=s*m;d=.05,l=.25;var u=new go.PathFigure(.5*t,.2*n,!0);return a.add(u),u.add(new go.PathSegment(go.PathSegment.Line,.95*t,.2*n)),d=.95,l=.25,u.add(new go.PathSegment(go.PathSegment.Bezier,(d+m)*t,l*n,(d+c)*t,(l-m)*n,(d+m)*t,(l-c)*n)),u.add(new go.PathSegment(go.PathSegment.Line,t,.6*n)),u.add(new go.PathSegment(go.PathSegment.Line,.85*t,.6*n)),u.add(new go.PathSegment(go.PathSegment.Line,.85*t,.35*n)),c=s*(m=.025),d=.825,l=.35,u.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l-m)*n,(d+m)*t,(l-c)*n,(d+c)*t,(l-m)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(d-m)*t,l*n,(d-c)*t,(l-m)*n,(d-m)*t,(l-c)*n)),u.add(new go.PathSegment(go.PathSegment.Line,.8*t,n)),u.add(new go.PathSegment(go.PathSegment.Line,.55*t,n)),u.add(new go.PathSegment(go.PathSegment.Line,.55*t,.7*n)),c=s*(m=.05),d=.5,l=.7,u.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l-m)*n,(d+m)*t,(l-c)*n,(d+c)*t,(l-m)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(d-m)*t,l*n,(d-c)*t,(l-m)*n,(d-m)*t,(l-c)*n)),u.add(new go.PathSegment(go.PathSegment.Line,.45*t,n)),u.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),u.add(new go.PathSegment(go.PathSegment.Line,.2*t,.35*n)),c=s*(m=.025),d=.175,l=.35,u.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l-m)*n,(d+m)*t,(l-c)*n,(d+c)*t,(l-m)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(d-m)*t,l*n,(d-c)*t,(l-m)*n,(d-m)*t,(l-c)*n)),u.add(new go.PathSegment(go.PathSegment.Line,.15*t,.6*n)),u.add(new go.PathSegment(go.PathSegment.Line,0,.6*n)),u.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),c=s*(m=.05),d=.05,l=.25,u.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l-m)*n,(d-m)*t,(l-c)*n,(d-c)*t,(l-m)*n)),u.add(new go.PathSegment(go.PathSegment.Line,.5*t,.2*n)),a.spot1=new go.Spot(.2,.2),a.spot2=new go.Spot(.8,.65),a})),go.Shape.setFigureParameter("Card",0,new e("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",(function(e,t,n){var a=e?e.parameter1:NaN;isNaN(a)&&(a=.2);var o=new go.Geometry,i=new go.PathFigure(t,0,!0);return o.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,a*n)),i.add(new go.PathSegment(go.PathSegment.Line,a*t,0).close()),o.spot1=new go.Spot(0,a),o.spot2=go.Spot.BottomRight,o})),go.Shape.defineFigureGenerator("Collate",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,.5*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n));var i=new go.PathFigure(.5*t,.5*n,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n)),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),a.spot1=new go.Spot(.25,0),a.spot2=new go.Spot(.75,.25),a})),go.Shape.defineFigureGenerator("CreateRequest",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)&&(o=.1);var i=new go.PathFigure(0,0,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var g=new go.PathFigure(0,o*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,o*n)),g.add(new go.PathSegment(go.PathSegment.Move,0,(1-o)*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,(1-o)*n)),a})),go.Shape.defineFigureGenerator("Database",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.1*s,g=new go.PathFigure(t,.1*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,(.9+i)*n,(.5+o)*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-o)*t,n,0,(.9+i)*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,(.1-i)*n,(.5-o)*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.1*n,(.5+o)*t,0,t,(.1-i)*n));var r=new go.PathFigure(t,.1*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.2*n,t,(.1+i)*n,(.5+o)*t,.2*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*n,(.5-o)*t,.2*n,0,(.1+i)*n)),r.add(new go.PathSegment(go.PathSegment.Move,t,.2*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.3*n,t,(.2+i)*n,(.5+o)*t,.3*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*n,(.5-o)*t,.3*n,0,(.2+i)*n)),r.add(new go.PathSegment(go.PathSegment.Move,t,.3*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.4*n,t,(.3+i)*n,(.5+o)*t,.4*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*n,(.5-o)*t,.4*n,0,(.3+i)*n)),a.spot1=new go.Spot(0,.4),a.spot2=new go.Spot(1,.9),a})),go.Shape.defineFigureGenerator("DataStorage",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,.75*t,n,t,0,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*t,.9*n,.25*t,.1*n).close()),a.spot1=new go.Spot(.226,0),a.spot2=new go.Spot(.81,1),a})),go.Shape.defineFigureGenerator("DiskStorage",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.1*s,g=new go.PathFigure(t,.1*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,(.9+i)*n,(.5+o)*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,(.5-o)*t,n,0,(.9+i)*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,(.1-i)*n,(.5-o)*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.1*n,(.5+o)*t,0,t,(.1-i)*n));var r=new go.PathFigure(t,.1*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.2*n,t,(.1+i)*n,(.5+o)*t,.2*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*n,(.5-o)*t,.2*n,0,(.1+i)*n)),r.add(new go.PathSegment(go.PathSegment.Move,t,.2*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.3*n,t,(.2+i)*n,(.5+o)*t,.3*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*n,(.5-o)*t,.3*n,0,(.2+i)*n)),a.spot1=new go.Spot(0,.3),a.spot2=new go.Spot(1,.9),a})),go.Shape.defineFigureGenerator("Display",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.25*t,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,.75*t,n,t,0,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close()),a.spot1=new go.Spot(.25,0),a.spot2=new go.Spot(.75,1),a})),go.Shape.defineFigureGenerator("DividedEvent",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)?o=.2:o<.15&&(o=.15);var i=.2*s,g=new go.PathFigure(0,.2*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,0,0,(.2-i)*n,(.2-i)*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.8*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.2*n,(.8+i)*t,0,t,(.2-i)*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,n,t,(.8+i)*n,(.8+i)*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*n,(.2-i)*t,n,0,(.8+i)*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.2*n));var r=new go.PathFigure(0,o*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,o*n)),a})),go.Shape.defineFigureGenerator("DividedProcess",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;(isNaN(o)||o<.1)&&(o=.1);var i=new go.PathFigure(0,0,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var g=new go.PathFigure(0,o*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,o*n)),a})),go.Shape.defineFigureGenerator("Document",(function(e,t,n){var a=new go.Geometry;n/=.8;var o=new go.PathFigure(0,.7*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*t,.4*n,.5*t,n).close()),a.spot1=go.Spot.TopLeft,a.spot2=new go.Spot(1,.6),a})),go.Shape.defineFigureGenerator("ExternalOrganization",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;(isNaN(o)||o<.2)&&(o=.2);var i=new go.PathFigure(0,0,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var g=new go.PathFigure(o*t,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,0,o*n)),g.add(new go.PathSegment(go.PathSegment.Move,t,o*n)),g.add(new go.PathSegment(go.PathSegment.Line,(1-o)*t,0)),g.add(new go.PathSegment(go.PathSegment.Move,0,(1-o)*n)),g.add(new go.PathSegment(go.PathSegment.Line,o*t,n)),g.add(new go.PathSegment(go.PathSegment.Move,(1-o)*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,t,(1-o)*n)),a})),go.Shape.defineFigureGenerator("ExternalProcess",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close());var i=new go.PathFigure(.1*t,.4*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.1*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Move,.9*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Move,.6*t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Move,.4*t,.9*n)),i.add(new go.PathSegment(go.PathSegment.Line,.6*t,.9*n)),a.spot1=new go.Spot(.25,.25),a.spot2=new go.Spot(.75,.75),a})),go.Shape.defineFigureGenerator("File",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var i=new go.PathFigure(.75*t,0,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.75*t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),a.spot1=new go.Spot(0,.25),a.spot2=go.Spot.BottomRight,a})),go.Shape.defineFigureGenerator("Interrupt",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(t,.5*n,!0);a.add(o),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,t,.5*n));var i=new go.PathFigure(t,.5*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,n));var g=new go.PathFigure(t,.5*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.5,.75),a})),go.Shape.defineFigureGenerator("InternalStorage",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN,i=e?e.parameter2:NaN;isNaN(o)&&(o=.1),isNaN(i)&&(i=.1);var g=new go.PathFigure(0,0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var r=new go.PathFigure(o*t,0,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,o*t,n)),r.add(new go.PathSegment(go.PathSegment.Move,0,i*n)),r.add(new go.PathSegment(go.PathSegment.Line,t,i*n)),a})),go.Shape.defineFigureGenerator("Junction",(function(e,t,n){var a=new go.Geometry,o=1/Math.SQRT2,i=(1-1/Math.SQRT2)/2,g=.5*s,r=.5,d=new go.PathFigure(t,r*n,!0);a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,r*t,n,t,(r+g)*n,(r+g)*t,n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,r*n,(r-g)*t,n,0,(r+g)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,r*t,0,0,(r-g)*n,(r-g)*t,0)),d.add(new go.PathSegment(go.PathSegment.Bezier,t,r*n,(r+g)*t,0,t,(r-g)*n));var l=new go.PathFigure((i+o)*t,(i+o)*n,!1);return a.add(l),l.add(new go.PathSegment(go.PathSegment.Line,i*t,i*n)),l.add(new go.PathSegment(go.PathSegment.Move,i*t,(i+o)*n)),l.add(new go.PathSegment(go.PathSegment.Line,(i+o)*t,i*n)),a})),go.Shape.defineFigureGenerator("LinedDocument",(function(e,t,n){var a=new go.Geometry;n/=.8;var o=new go.PathFigure(0,.7*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*t,.4*n,.5*t,n).close());var i=new go.PathFigure(.1*t,0,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.1*t,.75*n)),a.spot1=new go.Spot(.1,0),a.spot2=new go.Spot(1,.6),a})),go.Shape.defineFigureGenerator("LoopLimit",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n).close()),a.spot1=new go.Spot(0,.25),a.spot2=go.Spot.BottomRight,a})),go.Shape.defineFigureGenerator("MagneticTape",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.5,g=new go.PathFigure(.5*t,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,0,i*n,(i-o)*t,n,0,(i+o)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,i*t,0,0,(i-o)*n,(i-o)*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,i*n,(i+o)*t,0,t,(i-o)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.6*t,.9*n,t,(i+o)*n,(i+o)*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),a.spot1=new go.Spot(.15,.15),a.spot2=new go.Spot(.85,.8),a})),go.Shape.defineFigureGenerator("ManualInput",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(t,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.25*n).close()),a.spot1=new go.Spot(0,.25),a.spot2=go.Spot.BottomRight,a})),go.Shape.defineFigureGenerator("MessageFromUser",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)&&(o=.7);var i=new go.PathFigure(0,0,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,o*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=go.Spot.TopLeft,a})),go.Shape.defineFigureGenerator("MicroformProcessing",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)&&(o=.25);var i=new go.PathFigure(0,0,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,o*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,(1-o)*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a})),go.Shape.defineFigureGenerator("MicroformRecording",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.15*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(1,.75),a})),go.Shape.defineFigureGenerator("MultiDocument",(function(e,t,n){var a=new go.Geometry;n/=.8;var o=new go.PathFigure(t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,.44*n,.96*t,.47*n,.93*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.54*n,.86*t,.57*n,.83*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.4*t,.4*n,.4*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,0).close());var i=new go.PathFigure(.1*t,.2*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.54*n)),i.add(new go.PathSegment(go.PathSegment.Move,.2*t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.9*t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.9*t,.44*n)),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.8,.77),a})),go.Shape.defineFigureGenerator("MultiProcess",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.1*t,.1*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.2*n).close());var i=new go.PathFigure(.2*t,.1*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.9*t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n)),i.add(new go.PathSegment(go.PathSegment.Move,.1*t,.2*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.9*n)),a.spot1=new go.Spot(0,.2),a.spot2=new go.Spot(.8,1),a})),go.Shape.defineFigureGenerator("OfflineStorage",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)&&(o=.1);var i=new go.PathFigure(0,0,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,n).close());var g=new go.PathFigure(.5*o*t,o*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,(1-.5*o)*t,o*n)),a})),go.Shape.defineFigureGenerator("OffPageConnector",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=go.Spot.TopLeft,a.spot2=new go.Spot(.75,1),a})),go.Shape.defineFigureGenerator("Or",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.5,g=new go.PathFigure(t,i*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,i*t,n,t,(i+o)*n,(i+o)*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,i*n,(i-o)*t,n,0,(i+o)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,i*t,0,0,(i-o)*n,(i-o)*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,i*n,(i+o)*t,0,t,(i-o)*n));var r=new go.PathFigure(t,.5*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),a})),go.Shape.defineFigureGenerator("PaperTape",(function(e,t,n){var a=new go.Geometry;n/=.8;var o=new go.PathFigure(0,.7*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.3*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.3*n,.5*t,.6*n,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*n,.5*t,.4*n,.5*t,n).close()),a.spot1=new go.Spot(0,.49),a.spot2=new go.Spot(1,.75),a})),go.Shape.defineFigureGenerator("PrimitiveFromCall",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN,i=e?e.parameter2:NaN;isNaN(o)&&(o=.1),isNaN(i)&&(i=.3);var g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,0)),g.add(new go.PathSegment(go.PathSegment.Line,(1-i)*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a})),go.Shape.defineFigureGenerator("PrimitiveToCall",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN,i=e?e.parameter2:NaN;isNaN(o)&&(o=.1),isNaN(i)&&(i=.3);var g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,(1-i)*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,(1-i)*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a})),go.Shape.defineFigureGenerator("Procedure",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)&&(o=.1);var i=new go.PathFigure(0,0,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var g=new go.PathFigure((1-o)*t,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,(1-o)*t,n)),g.add(new go.PathSegment(go.PathSegment.Move,o*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,o*t,n)),a})),go.Shape.defineFigureGenerator("Process",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)&&(o=.1);var i=new go.PathFigure(0,0,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var g=new go.PathFigure(o*t,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,o*t,n)),a.spot2=go.Spot.BottomRight,a})),go.Shape.defineFigureGenerator("Sort",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.5*n).close());var i=new go.PathFigure(0,.5*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),a.spot1=new go.Spot(.25,.25),a.spot2=new go.Spot(.75,.5),a})),go.Shape.defineFigureGenerator("Start",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)&&(o=.25);var i=new go.PathFigure(o*t,0,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*t,.5*n,.25*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*t,.5*n,.25*t,.5*n));var g=new go.PathFigure(o*t,0,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,o*t,n)),g.add(new go.PathSegment(go.PathSegment.Move,(1-o)*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,(1-o)*t,n)),a.spot1=new go.Spot(o,0),a.spot2=new go.Spot(1-o,1),a})),go.Shape.defineFigureGenerator("Terminator",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.25*t,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*t,.5*n,.25*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*t,.5*n,.25*t,.5*n)),a.spot1=new go.Spot(.23,0),a.spot2=new go.Spot(.77,1),a})),go.Shape.defineFigureGenerator("TransmittalTape",(function(e,t,n){var a=new go.Geometry,o=e?e.parameter1:NaN;isNaN(o)&&(o=.1);var i=new go.PathFigure(0,0,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,.75*t,(1-o)*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,(1-o)*n).close()),a.spot1=go.Spot.TopLeft,a})),go.Shape.defineFigureGenerator("AndGate",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=new go.PathFigure(0,0,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),i.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,(.5+o)*t,0,t,(.5-o)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,(.5+o)*n,(.5+o)*t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=go.Spot.TopLeft,a.spot2=new go.Spot(.55,1),a})),go.Shape.defineFigureGenerator("Buffer",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.5,.75),a})),go.Shape.defineFigureGenerator("Clock",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.5,g=new go.PathFigure(t,i*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,i*t,n,t,(i+o)*n,(i+o)*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,i*n,(i-o)*t,n,0,(i+o)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,i*t,0,0,(i-o)*n,(i-o)*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,i*n,(i+o)*t,0,t,(i-o)*n));var r=new go.PathFigure(t,i*n,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,i*n));var d=new go.PathFigure(.8*t,.75*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.8*t,.25*n)),d.add(new go.PathSegment(go.PathSegment.Line,.6*t,.25*n)),d.add(new go.PathSegment(go.PathSegment.Line,.6*t,.75*n)),d.add(new go.PathSegment(go.PathSegment.Line,.4*t,.75*n)),d.add(new go.PathSegment(go.PathSegment.Line,.4*t,.25*n)),d.add(new go.PathSegment(go.PathSegment.Line,.2*t,.25*n)),d.add(new go.PathSegment(go.PathSegment.Line,.2*t,.75*n)),a})),go.Shape.defineFigureGenerator("Ground",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Move,.3*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Move,.4*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,n)),a})),go.Shape.defineFigureGenerator("Inverter",(function(e,t,n){var a=new go.Geometry,o=.1*s,i=.9,g=.5,r=new go.PathFigure(.8*t,.5*n,!0);a.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,.8*t,.5*n));var d=new go.PathFigure(1*t,g*n,!0);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,i*t,.6*n,1*t,(g+o)*n,(i+o)*t,.6*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,g*n,(i-o)*t,.6*n,.8*t,(g+o)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,i*t,.4*n,.8*t,(g-o)*n,(i-o)*t,.4*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,1*t,g*n,(i+o)*t,.4*n,1*t,(g-o)*n)),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.4,.75),a})),go.Shape.defineFigureGenerator("NandGate",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.4*s,g=.1*s,r=.9,d=.5,l=new go.PathFigure(.8*t,.5*n,!0);a.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,.4*t,n,.8*t,(.5+i)*n,(.4+o)*t,n)),l.add(new go.PathSegment(go.PathSegment.Line,0,n)),l.add(new go.PathSegment(go.PathSegment.Line,0,0)),l.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),l.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.5*n,(.4+o)*t,0,.8*t,(.5-i)*n));var h=new go.PathFigure(1*t,d*n,!0);return a.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,r*t,.6*n,1*t,(d+g)*n,(r+g)*t,.6*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,d*n,(r-g)*t,.6*n,.8*t,(d+g)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,r*t,.4*n,.8*t,(d-g)*n,(r-g)*t,.4*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,1*t,d*n,(r+g)*t,.4*n,1*t,(d-g)*n)),a.spot1=new go.Spot(0,.05),a.spot2=new go.Spot(.55,.95),a})),go.Shape.defineFigureGenerator("NorGate",(function(e,t,n){var a=new go.Geometry,o=.5,i=s*o,g=0,r=.5,d=new go.PathFigure(.8*t,.5*n,!0);a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.7*t,(r+i)*n,(g+i)*t,(r+o)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*t,.75*n,.25*t,.25*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.5*n,(g+i)*t,(r-o)*n,.7*t,(r-i)*n)),o=.1,i=.1*s,g=.9,r=.5;var l=new go.PathFigure((g-o)*t,r*n,!0);return a.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r-o)*n,(g-o)*t,(r-i)*n,(g-i)*t,(r-o)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(g+o)*t,r*n,(g+i)*t,(r-o)*n,(g+o)*t,(r-i)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r+o)*n,(g+o)*t,(r+i)*n,(g+i)*t,(r+o)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(g-o)*t,r*n,(g-i)*t,(r+o)*n,(g-o)*t,(r+i)*n)),a.spot1=new go.Spot(.2,.25),a.spot2=new go.Spot(.6,.75),a})),go.Shape.defineFigureGenerator("OrGate",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.5,g=new go.PathFigure(0,0,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,(0+o+o)*t,0*n,.8*t,(i-o)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.8*t,(i+o)*n,(0+o+o)*t,1*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*t,.75*n,.25*t,.25*n).close()),a.spot1=new go.Spot(.2,.25),a.spot2=new go.Spot(.75,.75),a})),go.Shape.defineFigureGenerator("XnorGate",(function(e,t,n){var a=new go.Geometry,o=.5,i=s*o,g=.2,r=.5,d=new go.PathFigure(.1*t,0,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,.1*t,n,.35*t,.25*n,.35*t,.75*n));var l=new go.PathFigure(.8*t,.5*n,!0);a.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,n,.7*t,(r+i)*n,(g+i)*t,(r+o)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,0,.45*t,.75*n,.45*t,.25*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.5*n,(g+i)*t,(r-o)*n,.7*t,(r-i)*n)),o=.1,i=.1*s,g=.9,r=.5;var h=new go.PathFigure((g-o)*t,r*n,!0);return a.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r-o)*n,(g-o)*t,(r-i)*n,(g-i)*t,(r-o)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(g+o)*t,r*n,(g+i)*t,(r-o)*n,(g+o)*t,(r-i)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r+o)*n,(g+o)*t,(r+i)*n,(g+i)*t,(r+o)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(g-o)*t,r*n,(g-i)*t,(r+o)*n,(g-o)*t,(r+i)*n)),a.spot1=new go.Spot(.4,.25),a.spot2=new go.Spot(.65,.75),a})),go.Shape.defineFigureGenerator("XorGate",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.5,g=new go.PathFigure(.1*t,0,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.1*t,n,.35*t,.25*n,.35*t,.75*n));var r=new go.PathFigure(.2*t,0,!0);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,(.2+o)*t,0*n,.9*t,(i-o)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,n,.9*t,(i+o)*n,(.2+o)*t,1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,0,.45*t,.75*n,.45*t,.25*n).close()),a.spot1=new go.Spot(.4,.25),a.spot2=new go.Spot(.8,.75),a})),go.Shape.defineFigureGenerator("Capacitor",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Move,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),a})),go.Shape.defineFigureGenerator("Resistor",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.5*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.5*n)),a})),go.Shape.defineFigureGenerator("Inductor",(function(e,t,n){var a=new go.Geometry,o=.1*s,i=.1,g=.1,r=new go.PathFigure((g-.5*o)*t,n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,(g+i)*t,0,(g-o)*t,n,(g-i)*t,0)),g=.3,r.add(new go.PathSegment(go.PathSegment.Bezier,g*t,n,(g+i)*t,0,(g+o)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(g+i)*t,0,(g-o)*t,n,(g-i)*t,0)),g=.5,r.add(new go.PathSegment(go.PathSegment.Bezier,g*t,n,(g+i)*t,0,(g+o)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(g+i)*t,0,(g-o)*t,n,(g-i)*t,0)),g=.7,r.add(new go.PathSegment(go.PathSegment.Bezier,g*t,n,(g+i)*t,0,(g+o)*t,n)),r.add(new go.PathSegment(go.PathSegment.Bezier,(g+i)*t,0,(g-o)*t,n,(g-i)*t,0)),g=.9,r.add(new go.PathSegment(go.PathSegment.Bezier,(g+.5*o)*t,n,(g+i)*t,0,(g+o)*t,n)),a})),go.Shape.defineFigureGenerator("ACvoltageSource",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.5,g=.5,r=new go.PathFigure(0*t,g*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,i*t,0*n,0*t,(g-o)*n,(i-o)*t,0*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,1*t,g*n,(i+o)*t,0*n,1*t,(g-o)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,i*t,1*n,1*t,(g+o)*n,(i+o)*t,1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0*t,g*n,(i-o)*t,1*n,0*t,(g+o)*n)),r.add(new go.PathSegment(go.PathSegment.Move,.1*t,g*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,g*n,i*t,0*n,i*t,1*n)),a})),go.Shape.defineFigureGenerator("DCvoltageSource",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.75*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),o.add(new go.PathSegment(go.PathSegment.Move,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),a})),go.Shape.defineFigureGenerator("Diode",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(t,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*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,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),a.spot1=new go.Spot(0,.25),a.spot2=new go.Spot(.5,.75),a})),go.Shape.defineFigureGenerator("Wifi",(function(e,t,n){var a=new go.Geometry,o=.8*s,i=.8,g=0,r=.5,d=(t-(t*=.38))/2,l=(n-(n*=.6))/2,h=new go.PathFigure(g*t+d,(r+i)*n+l,!0);a.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,(g-i)*t+d,r*n+l,(g-o)*t+d,(r+i)*n+l,(g-i)*t+d,(r+o)*n+l)),h.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r-i)*n+l,(g-i)*t+d,(r-o)*n+l,(g-o)*t+d,(r-i)*n+l)),h.add(new go.PathSegment(go.PathSegment.Bezier,(g-i+.5*o)*t+d,r*n+l,g*t+d,(r-i)*n+l,(g-i+.5*o)*t+d,(r-o)*n+l)),h.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r+i)*n+l,(g-i+.5*o)*t+d,(r+o)*n+l,g*t+d,(r+i)*n+l).close()),o=.4*s,i=.4,g=.2,r=.5;var m=new go.PathFigure(g*t+d,(r+i)*n+l,!0);a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,(g-i)*t+d,r*n+l,(g-o)*t+d,(r+i)*n+l,(g-i)*t+d,(r+o)*n+l)),m.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r-i)*n+l,(g-i)*t+d,(r-o)*n+l,(g-o)*t+d,(r-i)*n+l)),m.add(new go.PathSegment(go.PathSegment.Bezier,(g-i+.5*o)*t+d,r*n+l,g*t+d,(r-i)*n+l,(g-i+.5*o)*t+d,(r-o)*n+l)),m.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r+i)*n+l,(g-i+.5*o)*t+d,(r+o)*n+l,g*t+d,(r+i)*n+l).close()),o=.2*s,i=.2,g=.5,r=.5;var c=new go.PathFigure((g-i)*t+d,r*n+l,!0);a.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r-i)*n+l,(g-i)*t+d,(r-o)*n+l,(g-o)*t+d,(r-i)*n+l)),c.add(new go.PathSegment(go.PathSegment.Bezier,(g+i)*t+d,r*n+l,(g+o)*t+d,(r-i)*n+l,(g+i)*t+d,(r-o)*n+l)),c.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r+i)*n+l,(g+i)*t+d,(r+o)*n+l,(g+o)*t+d,(r+i)*n+l)),c.add(new go.PathSegment(go.PathSegment.Bezier,(g-i)*t+d,r*n+l,(g-o)*t+d,(r+i)*n+l,(g-i)*t+d,(r+o)*n+l)),o=.4*s,i=.4,g=.8,r=.5;var u=new go.PathFigure(g*t+d,(r-i)*n+l,!0);a.add(u),u.add(new go.PathSegment(go.PathSegment.Bezier,(g+i)*t+d,r*n+l,(g+o)*t+d,(r-i)*n+l,(g+i)*t+d,(r-o)*n+l)),u.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r+i)*n+l,(g+i)*t+d,(r+o)*n+l,(g+o)*t+d,(r+i)*n+l)),u.add(new go.PathSegment(go.PathSegment.Bezier,(g+i-.5*o)*t+d,r*n+l,g*t+d,(r+i)*n+l,(g+i-.5*o)*t+d,(r+o)*n+l)),u.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r-i)*n+l,(g+i-.5*o)*t+d,(r-o)*n+l,g*t+d,(r-i)*n+l).close()),o=.8*s,i=.8,g=1,r=.5;var S=new go.PathFigure(g*t+d,(r-i)*n+l,!0);return a.add(S),S.add(new go.PathSegment(go.PathSegment.Bezier,(g+i)*t+d,r*n+l,(g+o)*t+d,(r-i)*n+l,(g+i)*t+d,(r-o)*n+l)),S.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r+i)*n+l,(g+i)*t+d,(r+o)*n+l,(g+o)*t+d,(r+i)*n+l)),S.add(new go.PathSegment(go.PathSegment.Bezier,(g+i-.5*o)*t+d,r*n+l,g*t+d,(r+i)*n+l,(g+i-.5*o)*t+d,(r+o)*n+l)),S.add(new go.PathSegment(go.PathSegment.Bezier,g*t+d,(r-i)*n+l,(g+i-.5*o)*t+d,(r-o)*n+l,g*t+d,(r-i)*n+l).close()),a})),go.Shape.defineFigureGenerator("Email",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var i=new go.PathFigure(0,0,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,0)),i.add(new go.PathSegment(go.PathSegment.Move,0,n)),i.add(new go.PathSegment(go.PathSegment.Line,.45*t,.54*n)),i.add(new go.PathSegment(go.PathSegment.Move,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,.55*t,.54*n)),a})),go.Shape.defineFigureGenerator("Ethernet",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.35*t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,0).close());var i=new go.PathFigure(.1*t,n,!0,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,n)),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Line,.1*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Line,.1*t,n).close());var g=new go.PathFigure(.6*t,n,!0,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,n).close());var r=new go.PathFigure(0,.5*n,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Move,.5*t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.5*t,.4*n)),r.add(new go.PathSegment(go.PathSegment.Move,.75*t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.75*t,.6*n)),r.add(new go.PathSegment(go.PathSegment.Move,.25*t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.25*t,.6*n)),a})),go.Shape.defineFigureGenerator("Power",(function(e,t,i){var r=new go.Geometry,d=.4*s,l=.4,h=.5,m=.5,c=a(),u=a(),S=a(),P=a();g(h,m-l,h+d,m-l,h+l,m-d,h+l,m,.5,c,c,u,S,P);var w=n(u.x,u.y),p=new go.PathFigure(u.x*t,u.y*i,!0);r.add(p),p.add(new go.PathSegment(go.PathSegment.Bezier,(h+l)*t,m*i,S.x*t,S.y*i,P.x*t,P.y*i)),p.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m+l)*i,(h+l)*t,(m+d)*i,(h+d)*t,(m+l)*i)),p.add(new go.PathSegment(go.PathSegment.Bezier,(h-l)*t,m*i,(h-d)*t,(m+l)*i,(h-l)*t,(m+d)*i)),g(h-l,m,h-l,m-d,h-d,m-l,h,m-l,.5,S,P,u,c,c),p.add(new go.PathSegment(go.PathSegment.Bezier,u.x*t,u.y*i,S.x*t,S.y*i,P.x*t,P.y*i)),g(h-(l=.3),m,h-l,m-(d=.3*s),h-d,m-l,h,m-l,.5,S,P,u,c,c),p.add(new go.PathSegment(go.PathSegment.Line,u.x*t,u.y*i)),p.add(new go.PathSegment(go.PathSegment.Bezier,(h-l)*t,m*i,P.x*t,P.y*i,S.x*t,S.y*i)),p.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m+l)*i,(h-l)*t,(m+d)*i,(h-d)*t,(m+l)*i)),p.add(new go.PathSegment(go.PathSegment.Bezier,(h+l)*t,m*i,(h+d)*t,(m+l)*i,(h+l)*t,(m+d)*i)),g(h,m-l,h+d,m-l,h+l,m-d,h+l,m,.5,c,c,u,S,P),p.add(new go.PathSegment(go.PathSegment.Bezier,u.x*t,u.y*i,P.x*t,P.y*i,S.x*t,S.y*i).close());p=new go.PathFigure(.45*t,0,!0);return r.add(p),p.add(new go.PathSegment(go.PathSegment.Line,.45*t,.5*i)),p.add(new go.PathSegment(go.PathSegment.Line,.55*t,.5*i)),p.add(new go.PathSegment(go.PathSegment.Line,.55*t,0).close()),o(c),o(u),o(S),o(P),o(w),r.spot1=new go.Spot(.25,.45),r.spot2=new go.Spot(.75,.8),r})),go.Shape.defineFigureGenerator("Fallout",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,n/2,!0);function i(e,a,o){e.add(new go.PathSegment(go.PathSegment.Move,(.3+a)*t,(.8+o)*n)),e.add(new go.PathSegment(go.PathSegment.Line,(.5+a)*t,(.5+o)*n)),e.add(new go.PathSegment(go.PathSegment.Line,(.1+a)*t,(.5+o)*n)),e.add(new go.PathSegment(go.PathSegment.Line,(.3+a)*t,(.8+o)*n).close())}return a.add(o),o.add(new go.PathSegment(go.PathSegment.Arc,180,360,t/2,n/2,t/2,n/2)),i(o,0,0),i(o,.4,0),i(o,.2,-.3),a})),go.Shape.defineFigureGenerator("IrritationHazard",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.2*t,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.2*n).close()),a.spot1=new go.Spot(.3,.3),a.spot2=new go.Spot(.7,.7),a})),go.Shape.defineFigureGenerator("ElectricalHazard",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.37*t,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.11*n)),o.add(new go.PathSegment(go.PathSegment.Line,.77*t,.04*n)),o.add(new go.PathSegment(go.PathSegment.Line,.33*t,.49*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.37*n)),o.add(new go.PathSegment(go.PathSegment.Line,.63*t,.86*n)),o.add(new go.PathSegment(go.PathSegment.Line,.77*t,.91*n)),o.add(new go.PathSegment(go.PathSegment.Line,.34*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.34*t,.78*n)),o.add(new go.PathSegment(go.PathSegment.Line,.44*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,.56*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.68*n).close()),a})),go.Shape.defineFigureGenerator("FireHazard",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.1*t,n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,.29*t,0,-.25*t,.63*n,.45*t,.44*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.51*t,.42*n,.48*t,.17*n,.54*t,.35*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.59*t,.18*n,.59*t,.29*n,.58*t,.28*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.75*t,.6*n,.8*t,.34*n,.88*t,.43*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.88*t,.31*n,.87*t,.48*n,.88*t,.43*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,n,1.17*t,.76*n,.82*t,.8*n).close()),a.spot1=new go.Spot(.07,.445),a.spot2=new go.Spot(.884,.958),a})),go.Shape.defineFigureGenerator("BpmnActivityLoop",(function(e,t,n){var a=new go.Geometry,o=.5,i=o*s,g=.4*Math.SQRT2/2+.5,r=.5-.5*Math.SQRT2/2,d=new go.PathFigure(g*t,(1-r)*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,1*t,.5*n,1*t,.7*n,1*t,.5*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0*n,1*t,(.5-i+0)*n,(.5+i+0)*t,0*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,0*t,.5*n,(.5-i+0)*t,0*n,0*t,(.5-i+0)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.35*t,.9*n,0*t,(.5+i+0)*n,(.5-i+0)*t,.9*n)),d.add(new go.PathSegment(go.PathSegment.Move,.25*t,.8*n)),d.add(new go.PathSegment(go.PathSegment.Line,.35*t,.9*n)),d.add(new go.PathSegment(go.PathSegment.Line,.2*t,.95*n)),a})),go.Shape.defineFigureGenerator("BpmnActivityParallel",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Move,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),a})),go.Shape.defineFigureGenerator("BpmnActivitySequential",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Move,0,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Move,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),a})),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!1);a.add(o);var i=new go.PathFigure(t,n,!1);a.add(i);var g=new go.PathFigure(0,.5*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.5*n,.2*t,.35*n,.3*t,.35*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,.7*t,.65*n,.8*t,.65*n)),a})),go.Shape.defineFigureGenerator("BpmnActivityCompensation",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.5*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n).close()),a})),go.Shape.defineFigureGenerator("BpmnTaskMessage",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.2*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.8*n).close());o=new go.PathFigure(0,.2*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.2*n)),a})),go.Shape.defineFigureGenerator("BpmnTaskScript",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.7*t,n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,0,.6*t,.5*n,0,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,.7*t,n,.4*t,.5*n,t,.5*n).close());var i=new go.PathFigure(.45*t,.73*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.7*t,.73*n)),i.add(new go.PathSegment(go.PathSegment.Move,.38*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,.63*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Move,.31*t,.27*n)),i.add(new go.PathSegment(go.PathSegment.Line,.56*t,.27*n)),a})),go.Shape.defineFigureGenerator("BpmnTaskUser",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!1);a.add(o);var i=new go.PathFigure(.335*t,(1-.555)*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.335*t,.595*n)),i.add(new go.PathSegment(go.PathSegment.Line,.665*t,.595*n)),i.add(new go.PathSegment(go.PathSegment.Line,.665*t,(1-.555)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,t,.68*n,.88*t,.46*n,.98*t,.54*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,n)),i.add(new go.PathSegment(go.PathSegment.Line,0,.68*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.335*t,(1-.555)*n,.02*t,.54*n,.12*t,.46*n)),i.add(new go.PathSegment(go.PathSegment.Line,.365*t,.405*n));var g=.5-.285,r=.5,d=g,s=Math.PI/4,l=4*(1-Math.cos(s))/(3*Math.sin(s)),h=g,m=g,c=l*h,u=l*m;i.add(new go.PathSegment(go.PathSegment.Bezier,.285*t,d*n,(r-(c+h)/2)*t,(d+(m+u)/2)*n,.285*t,(d+u)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,r*t,0*n,.285*t,(d-u)*n,(r-c)*t,0*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,(r+h)*t,d*n,(r+c)*t,0*n,(r+h)*t,(d-u)*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.635*t,.405*n,(r+h)*t,(d+u)*n,(r+(c+h)/2)*t,(d+(m+u)/2)*n)),i.add(new go.PathSegment(go.PathSegment.Line,.635*t,.405*n)),i.add(new go.PathSegment(go.PathSegment.Line,.665*t,(1-.555)*n)),i.add(new go.PathSegment(go.PathSegment.Line,.665*t,.595*n)),i.add(new go.PathSegment(go.PathSegment.Line,.335*t,.595*n));var S=new go.PathFigure(.2*t,n,!1);a.add(S),S.add(new go.PathSegment(go.PathSegment.Line,.2*t,.8*n));var P=new go.PathFigure(.8*t,n,!1);return a.add(P),P.add(new go.PathSegment(go.PathSegment.Line,.8*t,.8*n)),a})),go.Shape.defineFigureGenerator("BpmnEventConditional",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.1*t,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,n).close());var i=new go.PathFigure(.2*t,.2*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),i.add(new go.PathSegment(go.PathSegment.Move,.2*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Move,.2*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Move,.2*t,.8*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.8*n)),a})),go.Shape.defineFigureGenerator("BpmnEventError",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.33*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.33*t,.5*n).close()),a})),go.Shape.defineFigureGenerator("BpmnEventEscalation",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!1);a.add(o);var i=new go.PathFigure(t,n,!1);a.add(i);var g=new go.PathFigure(.1*t,n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n).close()),a})),go.Shape.defineFigureGenerator("Caution",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.05*t,n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,.1*t,.8*n,0,n,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.55*t,.1*n,.5*t,0,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.95*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,n,t,n,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.05*t,n));var i=.05;return o.add(new go.PathSegment(go.PathSegment.Move,.45*t,.875*n)),o.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*t,.875*n,i*t,i*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.325*n,.575*t,.725*n,.625*t,.375*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.75*n,.375*t,.375*n,.425*t,.725*n)),a})),go.Shape.defineFigureGenerator("Recycle",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.45*t,.95*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.185*t,.85*n,.17*t,.95*n,.15*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.235*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,.625*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,.65*n)),o.add(new go.PathSegment(go.PathSegment.Line,.275*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.05*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.05*t,.575*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.1875*t,.95*n,0,.675*n,0,.7*n)),o.add(new go.PathSegment(go.PathSegment.Move,.45*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.775*n)),o.add(new go.PathSegment(go.PathSegment.Line,.22*t,.775*n));var i=new go.PathFigure(.475*t,.2*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,.225*t,.3*n)),i.add(new go.PathSegment(go.PathSegment.Line,.275*t,.175*n)),i.add(new go.PathSegment(go.PathSegment.Line,.325*t,.05*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.4*t,.05*n,.35*t,0,.375*t,0)),i.add(new go.PathSegment(go.PathSegment.Line,.575*t,.375*n)),i.add(new go.PathSegment(go.PathSegment.Line,.525*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,.75*t,.475*n)),i.add(new go.PathSegment(go.PathSegment.Line,.85*t,.315*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.32*n)),i.add(new go.PathSegment(go.PathSegment.Line,.65*t,.05*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.575*t,0,.65*t,.05*n,.625*t,0)),i.add(new go.PathSegment(go.PathSegment.Line,.38*t,.0105*n));var g=new go.PathFigure(.675*t,.575*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.875*t,.525*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.775*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,.85*t,.95*n,t,.8*n,t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.95*n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.85*n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.725*n)),g.add(new go.PathSegment(go.PathSegment.Line,.65*t,.775*n)),g.add(new go.PathSegment(go.PathSegment.Line,.7*t,.775*n)),g.add(new go.PathSegment(go.PathSegment.Line,t,.775*n)),g.add(new go.PathSegment(go.PathSegment.Move,.675*t,.575*n)),g.add(new go.PathSegment(go.PathSegment.Line,.775*t,.775*n)),a})),go.Shape.defineFigureGenerator("BpmnEventTimer",(function(e,t,n){var a=new go.Geometry,o=.5,i=.5*s,g=new go.PathFigure(t,o*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Bezier,o*t,n,t,(o+i)*n,(o+i)*t,n)),g.add(new go.PathSegment(go.PathSegment.Bezier,0,o*n,(o-i)*t,n,0,(o+i)*n)),g.add(new go.PathSegment(go.PathSegment.Bezier,o*t,0,0,(o-i)*n,(o-i)*t,0)),g.add(new go.PathSegment(go.PathSegment.Bezier,t,o*n,(o+i)*t,0,t,(o-i)*n));var r=new go.PathFigure(o*t,0,!1);return a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,o*t,.15*n)),r.add(new go.PathSegment(go.PathSegment.Move,o*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,o*t,.85*n)),r.add(new go.PathSegment(go.PathSegment.Move,0,o*n)),r.add(new go.PathSegment(go.PathSegment.Line,.15*t,o*n)),r.add(new go.PathSegment(go.PathSegment.Move,t,o*n)),r.add(new go.PathSegment(go.PathSegment.Line,.85*t,o*n)),r.add(new go.PathSegment(go.PathSegment.Move,o*t,o*n)),r.add(new go.PathSegment(go.PathSegment.Line,.58*t,.1*n)),r.add(new go.PathSegment(go.PathSegment.Move,o*t,o*n)),r.add(new go.PathSegment(go.PathSegment.Line,.78*t,.54*n)),a})),go.Shape.defineFigureGenerator("Package",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.15*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,.15*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close());var i=new go.PathFigure(0,.15*n,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,0,0)),i.add(new go.PathSegment(go.PathSegment.Line,.6*t,0)),i.add(new go.PathSegment(go.PathSegment.Line,.65*t,.15*n).close()),a.spot1=new go.Spot(0,.1),a.spot2=new go.Spot(1,1),a})),go.Shape.defineFigureGenerator("Class",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var i=new go.PathFigure(0,.2*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,.2*n).close());var g=new go.PathFigure(0,.5*n,!1);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,t,.5*n).close()),a})),go.Shape.defineFigureGenerator("Component",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(t,n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n).close());var i=new go.PathFigure(0,.2*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.45*t,.2*n)),i.add(new go.PathSegment(go.PathSegment.Line,.45*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,.2*n).close());var g=new go.PathFigure(0,.6*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.6*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,0,.6*n).close()),a})),go.Shape.defineFigureGenerator("Boat Shipment",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.15*t,.6*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,.6*n));var i=new go.PathFigure(.15*t,.6*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.85*t,.6*n)),a})),go.Shape.defineFigureGenerator("Customer/Supplier",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(t,n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,.33*n)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.33*t,.33*n)),o.add(new go.PathSegment(go.PathSegment.Line,.33*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,0,.33*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n).close()),a})),go.Shape.defineFigureGenerator("Workcell",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),a})),go.Shape.defineFigureGenerator("Supermarket",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.33*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.33*n)),o.add(new go.PathSegment(go.PathSegment.Move,t,.33*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.66*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.66*n)),o.add(new go.PathSegment(go.PathSegment.Move,t,.66*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),a})),go.Shape.defineFigureGenerator("TruckShipment",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var i=new go.PathFigure(t,.8*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,.6*t,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,.6*t,.8*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,.8*n).close());var g=.1,r=.1*s,d=.2,l=.9,h=new go.PathFigure((d-g)*t,l*n,!0);a.add(h),h.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l-g)*n,(d-g)*t,(l-r)*n,(d-r)*t,(l-g)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(d+g)*t,l*n,(d+r)*t,(l-g)*n,(d+g)*t,(l-r)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l+g)*n,(d+g)*t,(l+r)*n,(d+r)*t,(l+g)*n)),h.add(new go.PathSegment(go.PathSegment.Bezier,(d-g)*t,l*n,(d-r)*t,(l+g)*n,(d-g)*t,(l+r)*n).close()),g=.1,r=.1*s,d=.8,l=.9;var m=new go.PathFigure((d-g)*t,l*n,!0);return a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l-g)*n,(d-g)*t,(l-r)*n,(d-r)*t,(l-g)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(d+g)*t,l*n,(d+r)*t,(l-g)*n,(d+g)*t,(l-r)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,d*t,(l+g)*n,(d+g)*t,(l+r)*n,(d+r)*t,(l+g)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(d-g)*t,l*n,(d-r)*t,(l+g)*n,(d-g)*t,(l+r)*n).close()),a})),go.Shape.defineFigureGenerator("KanbanPost",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.2*t,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,0)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,n)),a})),go.Shape.defineFigureGenerator("Forklift",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,0,0));var i=new go.PathFigure(0,.5*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.8*n)),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var g=new go.PathFigure(.5*t,.8*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.8*n));var r=new go.PathFigure(.5*t,.7*n,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t,.7*n));var d=.1,l=.1*s,h=.1,m=.9,c=new go.PathFigure((h-d)*t,m*n,!0);a.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m-d)*n,(h-d)*t,(m-l)*n,(h-l)*t,(m-d)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,(h+d)*t,m*n,(h+l)*t,(m-d)*n,(h+d)*t,(m-l)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m+d)*n,(h+d)*t,(m+l)*n,(h+l)*t,(m+d)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,(h-d)*t,m*n,(h-l)*t,(m+d)*n,(h-d)*t,(m+l)*n)),d=.1,l=.1*s,h=.4,m=.9;var u=new go.PathFigure((h-d)*t,m*n,!0);return a.add(u),u.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m-d)*n,(h-d)*t,(m-l)*n,(h-l)*t,(m-d)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(h+d)*t,m*n,(h+l)*t,(m-d)*n,(h+d)*t,(m-l)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,h*t,(m+d)*n,(h+d)*t,(m+l)*n,(h+l)*t,(m+d)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(h-d)*t,m*n,(h-l)*t,(m+d)*n,(h-d)*t,(m+l)*n)),a})),go.Shape.defineFigureGenerator("RailShipment",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.1*t,.4*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.4*n).close());var i=new go.PathFigure(.45*t,.7*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.55*t,.7*n));var g=new go.PathFigure(.55*t,.4*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n)),g.add(new go.PathSegment(go.PathSegment.Line,.9*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.9*n)),g.add(new go.PathSegment(go.PathSegment.Line,.55*t,.4*n).close());var r=.05,d=.05*s,l=.175,h=.95,m=new go.PathFigure((l-r)*t,h*n,!0);a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h-r)*n,(l-r)*t,(h-d)*n,(l-d)*t,(h-r)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(l+r)*t,h*n,(l+d)*t,(h-r)*n,(l+r)*t,(h-d)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h+r)*n,(l+r)*t,(h+d)*n,(l+d)*t,(h+r)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(l-r)*t,h*n,(l-d)*t,(h+r)*n,(l-r)*t,(h+d)*n));r=.05,d=.05*s,l=.375,h=.95;var c=new go.PathFigure((l-r)*t,h*n,!0);a.add(c),c.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h-r)*n,(l-r)*t,(h-d)*n,(l-d)*t,(h-r)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,(l+r)*t,h*n,(l+d)*t,(h-r)*n,(l+r)*t,(h-d)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h+r)*n,(l+r)*t,(h+d)*n,(l+d)*t,(h+r)*n)),c.add(new go.PathSegment(go.PathSegment.Bezier,(l-r)*t,h*n,(l-d)*t,(h+r)*n,(l-r)*t,(h+d)*n));r=.05,d=.05*s,l=.625,h=.95;var u=new go.PathFigure((l-r)*t,h*n,!0);a.add(u),u.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h-r)*n,(l-r)*t,(h-d)*n,(l-d)*t,(h-r)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(l+r)*t,h*n,(l+d)*t,(h-r)*n,(l+r)*t,(h-d)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h+r)*n,(l+r)*t,(h+d)*n,(l+d)*t,(h+r)*n)),u.add(new go.PathSegment(go.PathSegment.Bezier,(l-r)*t,h*n,(l-d)*t,(h+r)*n,(l-r)*t,(h+d)*n));r=.05,d=.05*s,l=.825,h=.95;var S=new go.PathFigure((l-r)*t,h*n,!0);a.add(S),S.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h-r)*n,(l-r)*t,(h-d)*n,(l-d)*t,(h-r)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,(l+r)*t,h*n,(l+d)*t,(h-r)*n,(l+r)*t,(h-d)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h+r)*n,(l+r)*t,(h+d)*n,(l+d)*t,(h+r)*n)),S.add(new go.PathSegment(go.PathSegment.Bezier,(l-r)*t,h*n,(l-d)*t,(h+r)*n,(l-r)*t,(h+d)*n).close());var P=new go.PathFigure(0,n,!1);return a.add(P),P.add(new go.PathSegment(go.PathSegment.Line,t,n).close()),a})),go.Shape.defineFigureGenerator("Warehouse",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var i=new go.PathFigure(0,.2*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,.2*n).close());var g=new go.PathFigure(.15*t,n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.5*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,n)),g.add(new go.PathSegment(go.PathSegment.Line,.15*t,n).close());var r=.05,d=.05*s,l=.35,h=.775,m=new go.PathFigure(.3*t,h*n,!0);return a.add(m),m.add(new go.PathSegment(go.PathSegment.Bezier,l*t,.725*n,.3*t,(h-d)*n,(l-d)*t,.725*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,(l+r)*t,h*n,(l+d)*t,.725*n,(l+r)*t,(h-d)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,l*t,(h+r)*n,(l+r)*t,(h+d)*n,(l+d)*t,(h+r)*n)),m.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,h*n,(l-d)*t,(h+r)*n,.3*t,(h+d)*n).close()),a})),go.Shape.defineFigureGenerator("ControlCenter",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Move,.1*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n).close()),a})),go.Shape.defineFigureGenerator("Bluetooth",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.75*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.25*n)),a})),go.Shape.defineFigureGenerator("Bookmark",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.4*n)),a})),go.Shape.defineFigureGenerator("Bookmark",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),o.add(new go.PathSegment(go.PathSegment.Line,0,0)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Move,.2*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.4*n)),a})),go.Shape.defineFigureGenerator("Globe",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Move,0,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.5*n,.75*t,0,t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,t,.75*n,.75*t,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.25*t,n,0,.75*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,0,.25*n,.25*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,n,.15*t,.25*n,.15*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,.85*t,.75*n,.85*t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Move,.1675*t,.15*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.8325*t,.15*n,.35*t,.3*n,.65*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Move,.1675*t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.8325*t,.85*n,.35*t,.7*n,.65*t,.7*n)),a})),go.Shape.defineFigureGenerator("Wave",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.25*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,.25*n,.1*t,0,.2*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,.7*t,.25*n,.425*t,.5*n,.575*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.25*n,.8*t,0,.9*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Move,0,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.75*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,.75*n,.1*t,.5*n,.2*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.7*t,.75*n,.425*t,n,.575*t,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.75*n,.8*t,.5*n,.9*t,.5*n)),a})),go.Shape.defineFigureGenerator("Operator",(function(e,t,n){var a=new go.Geometry,o=.3,i=.3*s,g=.5,r=.7,d=new go.PathFigure(.2*t,r*n,!0);a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r-o)*n,.2*t,(r-i)*n,(g-i)*t,(r-o)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,r*n,(g+i)*t,(r-o)*n,.8*t,(r-i)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,g*t,1*n,.8*t,(r+i)*n,(g+i)*t,1*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,.2*t,r*n,(g-i)*t,1*n,.2*t,(r+i)*n));var l=new go.PathFigure(0,.7*n,!1);return a.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,t,.7*n,0,0,t,0)),a})),go.Shape.defineFigureGenerator("TripleFanBlades",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.65*n,.65*t,.3*n,.65*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,.35*t,.5*n,.35*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,.65*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,n,.3*t,.6*n,.1*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.65*n,.2*t,n,.35*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,.65*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,n,.7*t,.6*n,.9*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.65*n,.8*t,n,.65*t,.95*n)),a})),go.Shape.defineFigureGenerator("CentrifugalPump",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(t,0,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,0,.075*n,0,.5*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.4*t,n,0,n,.4*t,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.4*n,.8*t,n,.85*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,0)),a})),go.Shape.defineFigureGenerator("Battery",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Move,.4*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.1*n));var i=new go.PathFigure(0,.6*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Move,0,.4*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,.4*n)),a})),go.Shape.defineFigureGenerator("Delete",(function(e,t,n){var a=new go.Geometry,o=.5*s,i=.5,g=.5,r=new go.PathFigure(0*t,g*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Bezier,i*t,0*n,0*t,(g-o)*n,(i-o)*t,0*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,1*t,g*n,(i+o)*t,0*n,1*t,(g-o)*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,i*t,1*n,1*t,(g+o)*n,(i+o)*t,1*n)),r.add(new go.PathSegment(go.PathSegment.Bezier,0*t,g*n,(i-o)*t,1*n,0*t,(g+o)*n));var d=new go.PathFigure(.15*t,.5*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.85*t,.5*n)),a})),go.Shape.defineFigureGenerator("Flag",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.1*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Move,0,.1*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.1*n,.15*t,0,.35*t,0)),o.add(new go.PathSegment(go.PathSegment.Bezier,t,.1*n,.65*t,.2*n,.85*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.5*n,.85*t,.6*n,.65*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*n,.35*t,.4*n,.15*t,.4*n).close()),a})),go.Shape.defineFigureGenerator("Help",(function(e,t,n){var a=new go.Geometry,o=.5,i=.5*s,g=.5,r=.5,d=new go.PathFigure((g-o)*t,r*n,!1);a.add(d),d.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r-o)*n,(g-o)*t,(r-i)*n,(g-i)*t,(r-o)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(g+o)*t,r*n,(g+i)*t,(r-o)*n,(g+o)*t,(r-i)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r+o)*n,(g+o)*t,(r+i)*n,(g+i)*t,(r+o)*n)),d.add(new go.PathSegment(go.PathSegment.Bezier,(g-o)*t,r*n,(g-i)*t,(r+o)*n,(g-o)*t,(r+i)*n).close()),o=.05,i=.05*s,g=.5,r=.8;var l=new go.PathFigure((g-o)*t,r*n,!1);return a.add(l),l.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r-o)*n,(g-o)*t,(r-i)*n,(g-i)*t,(r-o)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(g+o)*t,r*n,(g+i)*t,(r-o)*n,(g+o)*t,(r-i)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,g*t,(r+o)*n,(g+o)*t,(r+i)*n,(g+i)*t,(r+o)*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,(g-o)*t,r*n,(g-i)*t,(r+o)*n,(g-o)*t,(r+i)*n).close()),l.add(new go.PathSegment(go.PathSegment.Move,.5*t,.7*n)),l.add(new go.PathSegment(go.PathSegment.Line,.5*t,.5*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.5*t,.2*n,.75*t,.475*n,.75*t,.225*n)),l.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,.35*n,.4*t,.2*n,.3*t,.25*n)),a})),go.Shape.defineFigureGenerator("Location",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.5*t,n,!0).add(new go.PathSegment(go.PathSegment.Line,.75*t,.5*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5*t,0,.975*t,.025*n,.5*t,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*t,.5*n,.5*t,0,.025*t,.025*n).close()).add(new go.PathSegment(go.PathSegment.Move,.5*t,.2*n)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*t,.3*n,.1*t,.1*n).close()))})),go.Shape.defineFigureGenerator("Lock",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.5*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var i=new go.PathFigure(.2*t,.5*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Move,.2*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,.2*t,.3*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.3*n,.25*t,0,.75*t,0)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.3*n)),a})),go.Shape.defineFigureGenerator("Unlocked",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.5*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.5*n));var i=new go.PathFigure(.2*t,.5*n,!1);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Move,.2*t,.5*n)),i.add(new go.PathSegment(go.PathSegment.Line,.2*t,.3*n)),i.add(new go.PathSegment(go.PathSegment.Bezier,.8*t,.3*n,.25*t,0,.75*t,0)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.35*n)),a})),go.Shape.defineFigureGenerator("Gear",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(.9375*t,.56246875*n,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*t,.4375*n)).add(new go.PathSegment(go.PathSegment.Line,.80621875*t,.4375*n)).add(new go.PathSegment(go.PathSegment.Bezier,.763*t,.3316875*n,.79840625*t,.39915625*n,.7834375*t,.3635*n)).add(new go.PathSegment(go.PathSegment.Line,.8566875*t,.23796875*n)).add(new go.PathSegment(go.PathSegment.Line,.76825*t,.14959375*n)).add(new go.PathSegment(go.PathSegment.Line,.67596875*t,.24184375*n)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*t,.19378125*n,.64228125*t,.2188125*n,.603875*t,.2021875*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*t,.0625*n)).add(new go.PathSegment(go.PathSegment.Line,.4375*t,.0625*n)).add(new go.PathSegment(go.PathSegment.Line,.4375*t,.19378125*n)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*t,.239375*n,.39759375*t,.20190625*n,.36053125*t,.2176875*n)).add(new go.PathSegment(go.PathSegment.Line,.2379375*t,.14959375*n)).add(new go.PathSegment(go.PathSegment.Line,.14953125*t,.2379375*n)).add(new go.PathSegment(go.PathSegment.Line,.23934375*t,.3278125*n)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*t,.4375*n,.21765625*t,.36059375*n,.201875*t,.397625*n)).add(new go.PathSegment(go.PathSegment.Line,.0625*t,.4375*n)).add(new go.PathSegment(go.PathSegment.Line,.0625*t,.5625*n)).add(new go.PathSegment(go.PathSegment.Line,.1938125*t,.5625*n)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*t,.67596875*n,.20221875*t,.603875*n,.21884375*t,.64228125*n)).add(new go.PathSegment(go.PathSegment.Line,.1495625*t,.76825*n)).add(new go.PathSegment(go.PathSegment.Line,.238*t,.8566875*n)).add(new go.PathSegment(go.PathSegment.Line,.3316875*t,.76296875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*t,.80621875*n,.36353125*t,.78340625*n,.3991875*t,.79840625*n)).add(new go.PathSegment(go.PathSegment.Line,.43753125*t,.9375*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*t,.9375*n)).add(new go.PathSegment(go.PathSegment.Line,.5625*t,.80621875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*t,.760625*n,.602375*t,.79809375*n,.63946875*t,.78234375*n)).add(new go.PathSegment(go.PathSegment.Line,.76828125*t,.8566875*n)).add(new go.PathSegment(go.PathSegment.Line,.85671875*t,.76825*n)).add(new go.PathSegment(go.PathSegment.Line,.76065625*t,.67221875*n)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*t,.56246875*n,.78234375*t,.63940625*n,.798125*t,.602375*n)).add(new go.PathSegment(go.PathSegment.Line,.9375*t,.56246875*n).close()).add(new go.PathSegment(go.PathSegment.Move,.5*t,.6*n)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*t,.5*n,.1*t,.1*n).close()))})),go.Shape.defineFigureGenerator("Hand",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.5*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Bezier,.1*t,.3*n,0,.375*n,.05*t,.325*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.45*t,.075*n,.3*t,.225*n,.4*t,.175*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.525*t,.075*n,.46*t,.05*n,.525*t,.05*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.3*t,.4*n,.525*t,.275*n,.475*t,.325*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,.55*n,t,.4*n,t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.425*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.6*t,.7*n,.675*t,.55*n,.675*t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,.575*t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.575*t,.85*n,.65*t,.7*n,.65*t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Line,.525*t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.535*t,n,.61*t,.85*n,.61*t,n)),o.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*n,.435*t,n,0,n).close()),a})),go.Shape.defineFigureGenerator("Map",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,.2*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,n).close()),o.add(new go.PathSegment(go.PathSegment.Move,.25*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Move,.5*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,n)),o.add(new go.PathSegment(go.PathSegment.Move,.75*t,0)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.8*n)),a})),go.Shape.defineFigureGenerator("Eject",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,t,n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.7*n).close());var i=new go.PathFigure(0,.6*n,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,.6*n)),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,0).close()),a})),go.Shape.defineFigureGenerator("Pencil",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*t,.1*n)).add(new go.PathSegment(go.PathSegment.Line,t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.9*t,n)).add(new go.PathSegment(go.PathSegment.Line,.1*t,.2*n).close()))})),go.Shape.defineFigureGenerator("Building",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(1*t,1*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.85*n)),o.add(new go.PathSegment(go.PathSegment.Line,.046*t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Line,.046*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,.046*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.954*t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.3*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.954*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.954*t,.85*n)),o.add(new go.PathSegment(go.PathSegment.Line,t,.85*n).close());var i=new go.PathFigure(.126*t,.85*n,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.126*t,.45*n)),i.add(new go.PathSegment(go.PathSegment.Line,.322*t,.45*n)),i.add(new go.PathSegment(go.PathSegment.Line,.322*t,.85*n).close());var g=new go.PathFigure(.402*t,.85*n,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.402*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.598*t,.45*n)),g.add(new go.PathSegment(go.PathSegment.Line,.598*t,.85*n).close());var r=new go.PathFigure(.678*t,.85*n,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.678*t,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.874*t,.45*n)),r.add(new go.PathSegment(go.PathSegment.Line,.874*t,.85*n).close());var d=new go.PathFigure(.5*t,.1*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.196*t,.3*n)),d.add(new go.PathSegment(go.PathSegment.Line,.804*t,.3*n).close()),a})),go.Shape.defineFigureGenerator("Staircase",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,1*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,.15*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.15*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.35*n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,.35*n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.95*n).close()),a})),go.Shape.defineFigureGenerator("5Bars",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,1*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.184*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.184*t,n*(1-.184)).close());var i=new go.PathFigure(.204*t,n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.204*t,n*(1-.184))),i.add(new go.PathSegment(go.PathSegment.Line,.388*t,.632*n)),i.add(new go.PathSegment(go.PathSegment.Line,.388*t,1*n).close());var g=new go.PathFigure(.408*t,n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.408*t,.632*n)),g.add(new go.PathSegment(go.PathSegment.Line,.592*t,n*(1-.552))),g.add(new go.PathSegment(go.PathSegment.Line,.592*t,1*n).close());var r=new go.PathFigure(.612*t,n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.612*t,n*(1-.552))),r.add(new go.PathSegment(go.PathSegment.Line,.796*t,.264*n)),r.add(new go.PathSegment(go.PathSegment.Line,.796*t,1*n).close());var d=new go.PathFigure(.816*t,n,!0);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.816*t,.264*n)),d.add(new go.PathSegment(go.PathSegment.Line,1*t,n*(1-.184*5))),d.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n).close()),a})),go.Shape.defineFigureGenerator("PC",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,0).close());var i=new go.PathFigure(.055*t,.07*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.245*t,.07*n)),i.add(new go.PathSegment(go.PathSegment.Line,.245*t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.055*t,.1*n).close());var g=new go.PathFigure(.055*t,.13*n,!0);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.245*t,.13*n)),g.add(new go.PathSegment(go.PathSegment.Line,.245*t,.16*n)),g.add(new go.PathSegment(go.PathSegment.Line,.055*t,.16*n).close());var r=new go.PathFigure(.055*t,.18*n,!0);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.245*t,.18*n)),r.add(new go.PathSegment(go.PathSegment.Line,.245*t,.21*n)),r.add(new go.PathSegment(go.PathSegment.Line,.055*t,.21*n).close());var d=new go.PathFigure(1*t,0,!0);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.4*t,0)),d.add(new go.PathSegment(go.PathSegment.Line,.4*t,.65*n)),d.add(new go.PathSegment(go.PathSegment.Line,1*t,.65*n).close()),a})),go.Shape.defineFigureGenerator("Plane",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.55*t,n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.7*n)),o.add(new go.PathSegment(go.PathSegment.Line,.1*t,.475*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.35*t,.525*n,0,.4*n,.225*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.4*t,.475*n)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,.35*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.325*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.325*n)),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Bezier,.9*t,.2*n,.975*t,0,t,.08*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,n).close()),a})),go.Shape.defineFigureGenerator("Key",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(1*t,.5*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.4*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.35*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.35*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,.2*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.35*n)),o.add(new go.PathSegment(go.PathSegment.Line,0,.65*n)),o.add(new go.PathSegment(go.PathSegment.Line,.15*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,.8*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.65*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.65*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,.6*n)),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,.575*n)),o.add(new go.PathSegment(go.PathSegment.Line,.9*t,.6*n).close()),o.add(new go.PathSegment(go.PathSegment.Move,.17*t,.425*n)),o.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*t,.5*n,.075*t,.075*n).close()),a})),go.Shape.defineFigureGenerator("FilmTape",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0,0,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Arc,270,180,0*t,.3*t,.055*t)),o.add(new go.PathSegment(go.PathSegment.Line,0,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.08*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.08*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.136*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.136*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.192*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.192*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.248*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.248*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.304*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.304*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.28),.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.28),1*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.336),1*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.336),.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.392),.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.392),1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.528*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.528*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.584*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.584*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.64*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.64*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.696*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,.696*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.752*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.752*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.728),.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.728),1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.864*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.864*t,.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.84),.95*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(.08+.84),1*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n));var i=new go.PathFigure(0,0,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,1*t,0*n)),i.add(new go.PathSegment(go.PathSegment.Arc,270,-180,1*t,.3*t,.055*t)),i.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n));var g=new go.PathFigure(.11*t,.1*n,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.35133333*t,.1*n)),g.add(new go.PathSegment(go.PathSegment.Line,.35133333*t,.8*n)),g.add(new go.PathSegment(go.PathSegment.Line,.11*t,.8*n).close());var r=new go.PathFigure(.37933333*t,.1*n,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.62066666*t,.1*n)),r.add(new go.PathSegment(go.PathSegment.Line,.62066666*t,.8*n)),r.add(new go.PathSegment(go.PathSegment.Line,.37933333*t,.8*n).close());var d=new go.PathFigure(t*(.59266666+.056),.1*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,t*(.83399999+.056),.1*n)),d.add(new go.PathSegment(go.PathSegment.Line,t*(.83399999+.056),.8*n)),d.add(new go.PathSegment(go.PathSegment.Line,t*(.59266666+.056),.8*n).close()),a})),go.Shape.defineFigureGenerator("FloppyDisk",(function(e,t,n){var a=new go.Geometry,o=8*s,i=new go.PathFigure(8,0,!1);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.86*t,0)),i.add(new go.PathSegment(go.PathSegment.Line,1*t,.14*n)),i.add(new go.PathSegment(go.PathSegment.Line,t,n-8)),i.add(new go.PathSegment(go.PathSegment.Bezier,t-8,n,t,n-o,t-o,n)),i.add(new go.PathSegment(go.PathSegment.Line,8,n)),i.add(new go.PathSegment(go.PathSegment.Bezier,0,n-8,o,n,0,n-o)),i.add(new go.PathSegment(go.PathSegment.Line,0,8)),i.add(new go.PathSegment(go.PathSegment.Bezier,8,0,0,o,o,0).close());var g=new go.PathFigure(.83*t,0,!1);a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.83*t,.3*n)),g.add(new go.PathSegment(go.PathSegment.Line,.17*t,.3*n)),g.add(new go.PathSegment(go.PathSegment.Line,.17*t,0*n).close());var r=new go.PathFigure(.83*t,1*n,!1);a.add(r),r.add(new go.PathSegment(go.PathSegment.Line,.83*t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.17*t,.5*n)),r.add(new go.PathSegment(go.PathSegment.Line,.17*t,1*n).close());var d=new go.PathFigure(.78*t,.05*n,!1);return a.add(d),d.add(new go.PathSegment(go.PathSegment.Line,.66*t,.05*n)),d.add(new go.PathSegment(go.PathSegment.Line,.66*t,.25*n)),d.add(new go.PathSegment(go.PathSegment.Line,.78*t,.25*n).close()),a})),go.Shape.defineFigureGenerator("SpeechBubble",(function(e,t,n){var a=e?e.parameter1:NaN;(isNaN(a)||a<0)&&(a=15),a=Math.min(a,t/3);var o=(a=Math.min(a,n/3))*s,i=.8*n,g=new go.Geometry,r=new go.PathFigure(a,0,!0);return g.add(r),r.add(new go.PathSegment(go.PathSegment.Line,t-a,0)),r.add(new go.PathSegment(go.PathSegment.Bezier,t,a,t-o,0,t,o)),r.add(new go.PathSegment(go.PathSegment.Line,t,i-a)),r.add(new go.PathSegment(go.PathSegment.Bezier,t-a,i,t,i-o,t-o,i)),r.add(new go.PathSegment(go.PathSegment.Line,.7*t,i)),r.add(new go.PathSegment(go.PathSegment.Line,.7*t,n)),r.add(new go.PathSegment(go.PathSegment.Line,.55*t,i)),r.add(new go.PathSegment(go.PathSegment.Line,a,i)),r.add(new go.PathSegment(go.PathSegment.Bezier,0,i-a,o,i,0,i-o)),r.add(new go.PathSegment(go.PathSegment.Line,0,a)),r.add(new go.PathSegment(go.PathSegment.Bezier,a,0,0,o,o,0).close()),o>1?(g.spot1=new go.Spot(0,0,o,o),g.spot2=new go.Spot(1,.8,-o,-o)):(g.spot1=go.Spot.TopLeft,g.spot2=new go.Spot(1,.8)),g})),go.Shape.defineFigureGenerator("Repeat",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0*t,.45*n,!0);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.6*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.2*t,.45*n).close());var i=new go.PathFigure(1*t,.55*n,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.75*t,1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.5*t,.55*n)),i.add(new go.PathSegment(go.PathSegment.Line,.7*t,.55*n)),i.add(new go.PathSegment(go.PathSegment.Line,.7*t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.4*t,.1*n)),i.add(new go.PathSegment(go.PathSegment.Line,.35*t,0*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,0*n)),i.add(new go.PathSegment(go.PathSegment.Line,.8*t,.55*n).close()),a})),go.Shape.defineFigureGenerator("Windows",(function(e,t,n){return(new go.Geometry).add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,t,0)).add(new go.PathSegment(go.PathSegment.Line,t,n)).add(new go.PathSegment(go.PathSegment.Line,0,n).close()).add(new go.PathSegment(go.PathSegment.Move,.4*t,.4*n)).add(new go.PathSegment(go.PathSegment.Line,.4*t,.8*n)).add(new go.PathSegment(go.PathSegment.Line,.9*t,.8*n)).add(new go.PathSegment(go.PathSegment.Line,.9*t,.4*n).close()).add(new go.PathSegment(go.PathSegment.Move,.2*t,.1*n)).add(new go.PathSegment(go.PathSegment.Line,.2*t,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.7*t,.1*n).close()).add(new go.PathSegment(go.PathSegment.Move,.1*t,.6*n)).add(new go.PathSegment(go.PathSegment.Line,.1*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,.9*n)).add(new go.PathSegment(go.PathSegment.Line,.5*t,.6*n).close()))})),go.Shape.defineFigureGenerator("Terminal",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0*t,.1*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,1*t,.1*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,.9*n)),o.add(new go.PathSegment(go.PathSegment.Line,0*t,.9*n).close());var i=new go.PathFigure(.1*t,.2*n,!0);a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.1*t,.25*n)),i.add(new go.PathSegment(go.PathSegment.Line,.22*t,.285*n)),i.add(new go.PathSegment(go.PathSegment.Line,.1*t,.32*n)),i.add(new go.PathSegment(go.PathSegment.Line,.1*t,.37*n)),i.add(new go.PathSegment(go.PathSegment.Line,.275*t,.32*n)),i.add(new go.PathSegment(go.PathSegment.Line,.275*t,.25*n).close());var g=new go.PathFigure(.28*t,.37*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.37*n)),g.add(new go.PathSegment(go.PathSegment.Line,.45*t,.41*n)),g.add(new go.PathSegment(go.PathSegment.Line,.28*t,.41*n).close()),a})),go.Shape.defineFigureGenerator("Beaker",(function(e,t,n){var a=new go.Geometry,o=15*s,i=new go.PathFigure(.62*t,.475*n,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,t,n-15)),i.add(new go.PathSegment(go.PathSegment.Bezier,t-15,n,t,n-o,t-o,n)),i.add(new go.PathSegment(go.PathSegment.Line,15,n)),i.add(new go.PathSegment(go.PathSegment.Bezier,0,n-15,o,n,0,n-o)),i.add(new go.PathSegment(go.PathSegment.Line,.38*t,.475*n)),i.add(new go.PathSegment(go.PathSegment.Line,.38*t,.03*n)),i.add(new go.PathSegment(go.PathSegment.Line,.36*t,0*n)),i.add(new go.PathSegment(go.PathSegment.Line,.64*t,0*n)),i.add(new go.PathSegment(go.PathSegment.Line,.62*t,.03*n).close()),o>1?(a.spot1=new go.Spot(0,0,o,o),a.spot2=new go.Spot(1,1,-o,-o)):(a.spot1=go.Spot.TopLeft,a.spot2=go.Spot.BottomRight),a})),go.Shape.defineFigureGenerator("Download",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0*t,1*n,!0);a.add(o);var i=.1/.3;o.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,.755*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,.93*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.64*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.61*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.39*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.36*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.07*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.245*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),0*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.8),0*n)),o.add(new go.PathSegment(go.PathSegment.Line,0*t,n*(1-i)).close());var g=new go.PathFigure(.4*t,0*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.44*n)),g.add(new go.PathSegment(go.PathSegment.Line,.26*t,.44*n)),g.add(new go.PathSegment(go.PathSegment.Line,.5*t,.66*n)),g.add(new go.PathSegment(go.PathSegment.Line,.74*t,.44*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.44*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,0*n).close()),a})),go.Shape.defineFigureGenerator("Bin",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0*t,1*n,!0);a.add(o);var i=.1/.3;return o.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,.755*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,.93*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.64*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.61*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.39*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.36*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.07*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.245*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),0*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.8),0*n)),o.add(new go.PathSegment(go.PathSegment.Line,0*t,n*(1-i)).close()),a})),go.Shape.defineFigureGenerator("Upload",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(0*t,1*n,!0);a.add(o);var i=.1/.3;o.add(new go.PathSegment(go.PathSegment.Line,1*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.8*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.66*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,.755*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,.93*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.64*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.61*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.39*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.36*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.07*t,n*(1-i))),o.add(new go.PathSegment(go.PathSegment.Line,.245*t,.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),.055*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.66),0*n)),o.add(new go.PathSegment(go.PathSegment.Line,t*(1-.8),0*n)),o.add(new go.PathSegment(go.PathSegment.Line,0*t,n*(1-i)).close());var g=new go.PathFigure(.5*t,0*n,!0);return a.add(g),g.add(new go.PathSegment(go.PathSegment.Line,.26*t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.4*t,.63*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.63*n)),g.add(new go.PathSegment(go.PathSegment.Line,.6*t,.25*n)),g.add(new go.PathSegment(go.PathSegment.Line,.74*t,.25*n).close()),a})),go.Shape.defineFigureGenerator("EmptyDrink",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.15*t,0*n,!1);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,1*n).close()),a})),go.Shape.defineFigureGenerator("Drink",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.15*t,0*n,!1);a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.85*t,0*n)),o.add(new go.PathSegment(go.PathSegment.Line,.7*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.3*t,1*n).close());var i=new go.PathFigure(.235*t,.28*n,!0);return a.add(i),i.add(new go.PathSegment(go.PathSegment.Line,.765*t,.28*n)),i.add(new go.PathSegment(go.PathSegment.Line,.655*t,.97*n)),i.add(new go.PathSegment(go.PathSegment.Line,.345*t,.97*n).close()),a})),go.Shape.defineFigureGenerator("4Arrows",(function(e,t,n){var a=new go.Geometry,o=new go.PathFigure(.5*t,0*n,!0);return a.add(o),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.35*n)),o.add(new go.PathSegment(go.PathSegment.Line,1*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.65*n)),o.add(new go.PathSegment(go.PathSegment.Line,.75*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.55*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.65*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.5*t,1*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.75*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,.55*n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,.65*n)),o.add(new go.PathSegment(go.PathSegment.Line,0*t,.5*n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,.35*n)),o.add(new go.PathSegment(go.PathSegment.Line,.25*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.45*n)),o.add(new go.PathSegment(go.PathSegment.Line,.45*t,.25*n)),o.add(new go.PathSegment(go.PathSegment.Line,.35*t,.25*n).close()),a})),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")},47503: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 e={},t="5.0",n={},a=null,o=!1,i=!1,g=null,r=!1,d=null,s=null,l=0;l<arguments.length;l++){var h=arguments[l];if(null!==h)switch(_typeof(h)){case"number":t=h.toFixed(1);break;case"string":h.match(new RegExp("^[0-9]\\.[0-9]+$"))?t=h:g=h;break;case"object":void 0!==h.is3D?a=h:n=h;break;case"boolean":o=h,i=!0}}null===a&&(a={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},void 0===n.material_id||i||(o=!0)),null!==g&&void 0===n.id&&(n.id=g);var m="",c=!1,u=null,S=null,P=null,w=!1,p=null,f=null,v=null;void 0!==n.height&&(n.height=Math.round(n.height)),void 0!==n.width&&(n.width=Math.round(n.width));var y=function(e){return parseFloat(e)>4?parseFloat(e):5};function L(){try{return window.self!==window.top}catch(e){return!0}}function x(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,t){s=e,Z(e,t)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,t){var n=parseFloat(e);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(d=e,A(e,t))},e.getHTML5CodebaseVersion=function(){return S},e.getParameters=function(){return n},e.setFontsCSSURL=function(e){v=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var a,o="auto",i=n.id,g=!1,d=0;d<arguments.length;d++){var s=arguments[d];"string"==typeof s?(s=s.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?o=s:i=arguments[d]:"boolean"==typeof s?g=s:s instanceof HTMLElement&&(a=s)}function l(){if(r){o=T(o);var d=a||document.getElementById(i);if(d)if(e.removeExistingApplet(d,!1),void 0===n.width&&d.clientWidth&&(n.width=d.clientWidth),void 0===n.height&&d.clientHeight&&(n.height=d.clientHeight),n.width&&n.height||"html5"!==o||(delete n.width,delete n.height),u=o,"screenshot"===o)F(d,n);else{var s=!1;n.hasOwnProperty("playButton")&&n.playButton||n.hasOwnProperty("clickToLoad")&&n.clickToLoad?s=!0:n.hasOwnProperty("playButtonAutoDecide")&&n.playButtonAutoDecide&&(s=(!L()||t())&&x()),s?(u="screenshot",M(d,n,g,o)):N(d,n,g)}else console.log("possibly bug on ajax loading? ")}else setTimeout(l,200)}l()},e.getViews=function(){return a},e.isJavaInstalled=function(){return!1};var _=function(t){var o=function(){n.onError&&n.onError(),E("Error: Fetching material (id "+n.material_id+") failed.",n)},i=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",g="/materials/"+n.material_id+"?scope=basic";j("https://"+i+"/api/proxy.php?path="+encodeURIComponent(g),(function(i){var g=JSON.parse(i),r=g.elements?g.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:g;if(r&&r.url){n.fileName=r.url,b(r.settings||{}),a.is3D=!0;var d="https://www.geogebra.org/images/";e.setPreviewImage(p||r.previewUrl,d+"GeoGebra_loading.png",d+"applet_play.png"),t()}else o()}),o)};function b(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(t){e[t]=!!e[t]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(t){void 0===n[t]&&void 0!==e[t]&&(n[t]=e[t])})),void 0===n.showToolBarHelp&&(n.showToolBarHelp=n.showToolBar)}function j(e,t,n){var a=new XMLHttpRequest;a.open("GET",e),a.onload=function(){t(a.responseText)},a.onerror=n,a.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return u},e.setPreviewImage=function(e,t,n){p=e,f=t,n},e.removeExistingApplet=function(e,t){var a;"string"==typeof e&&(e=document.getElementById(e)),u=null;var o=null;for(a=0;a<e.childNodes.length;a++){var i=e.childNodes[a],g=i.className;"applet_screenshot"===g?t?(i.style.display="block",u="screenshot"):i.style.display="none":"applet_scaler prerender"!==g&&(e.removeChild(i),o=g&&-1!=g.indexOf("appletParameters")?i.id:null,a--)}var r=void 0!==n.id?n.id:o,d=window[r];d&&"function"==typeof d.getBase64&&(d.remove(),window[r]=null)},e.refreshHitPoints=function(){if(y(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var t=e.getAppletObject();return!(!t||"function"!=typeof t.recalculateEnvironments)&&(t.recalculateEnvironments(),!0)},e.startAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.startAnimation)&&(t.startAnimation(),!0)},e.stopAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.stopAnimation)&&(t.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==n.id?n.id:"ggbApplet";return window[e]},e.resize=function(){};var k=function(e){return e&&"false"!==e},N=function(t,n,a){y(S)<=4.2&&(a=!0);var o=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==S||ggbHTML5LoadedCodebaseIsWebSimple&&!w)&&(o=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var i=document.createElement("div");i.classList.add("appletParameters","notranslate");var g=n.width,r=n.height;if(n.disableAutoScale=void 0===n.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():n.disableAutoScale,void 0!==n.width)if(y(S)<=4.4)k(n.showToolBar)&&(n.height-=7),k(n.showAlgebraInput)&&(n.height-=37),n.width<605&&k(n.showToolBar)&&(n.width=605,g=605);else{var l=100;(k(n.showToolBar)||k(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),l=k(n.showMenuBar)?245:155),g<l&&(n.width=l,g=l)}for(var h in i.style.border="none",i.style.display="inline-block",n)n.hasOwnProperty(h)&&"appletOnLoad"!==h&&i.setAttribute("data-param-"+h,n[h]);v&&i.setAttribute("data-param-fontscssurl",v),e.resize=function(){GGBAppletUtils.responsiveResize(t,n)},window.addEventListener("resize",(function(t){e.resize()}));var c="function"==typeof n.appletOnLoad?n.appletOnLoad:function(){};if(a||void 0===n.width){var u=document.createElement("div");u.className="applet_scaler",u.style.position="relative",u.style.display="block",u.appendChild(i),t.appendChild(u),n.appletOnLoad=function(t){e.resize(),c(t)}}else{n.hasOwnProperty("showSplash")||i.setAttribute("data-param-showSplash","false");var p=t.querySelector(".applet_scaler.prerender"),f=null!==p;if(f)L=p.querySelector(".ggb_preview");else{var L=B(g,r,n.borderColor,!1);(p=document.createElement("div")).className="applet_scaler",p.style.position="relative",p.style.display="block",p.style.width=g+"px",p.style.height=r+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(p,"66%"),y(S)>=5?(n.appletOnLoad=function(e){var n=t.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(p),window.GGBT_wsf_view&&$(window).trigger("resize"),c(e)},f||p.appendChild(L)):i.appendChild(L),p.appendChild(i),f||t.appendChild(p),setTimeout((function(){e.resize()}),1)}function x(e,t){t&&"function"==typeof t.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,t.appletOnLoad):renderGGBElement(e),E("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",t)}function _(e,t){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){x(e.article,e.params)})),html5AppletsToProcess=null)},y(S)<5&&(e.className+=" geogebraweb")):x(e,t)}if(o){scriptLoadStarted=!0;for(var b=0;b<i.childNodes.length;b++){"TABLE"===i.childNodes[b].tagName&&(i.removeChild(i.childNodes[b]),b--)}if(null!==ggbHTML5LoadedScript){var j=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=j&&j.parentNode.removeChild(j)}var N=document.createElement("script"),F=function(){_(i,n)};N.src=m+P,ggbHTML5LoadedCodebaseIsWebSimple=w,ggbHTML5LoadedCodebaseVersion=S,ggbHTML5LoadedScript=N.src,E("GeoGebra HTML5 codebase loaded: '"+m+"'.",n),s||d&&"5.0"!=d?m.requirejs?__webpack_require__.e(32721).then(function(){var e=[__webpack_require__(32721)];F.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(N.onload=F,t.appendChild(N)):(w?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),F())}else _(i,n);n.height=r,n.width=g},F=function(t,n,a){var o=B(n.width,n.height,n.borderColor,a),i=document.createElement("div");i.style.position="relative",i.style.display="block",i.style.width=n.width+"px",i.style.height=n.height+"px",i.className="applet_screenshot applet_scaler"+(a?" applet_screenshot_play":""),i.appendChild(o);var g=GGBAppletUtils.getScale(n,t,a);a?(t.appendChild(z()),window.GGBT_wsf_view||(t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(i,"66%"),t.appendChild(i),1===g||isNaN(g)||(GGBAppletUtils.scaleElement(i,g),i.style.width=n.width+"px",i.style.height=n.height+"px",i.parentNode.style.width=n.width*g+"px",i.parentNode.style.height=n.height*g+"px"),e.resize=function(){G(t,o,i,a)},window.addEventListener("resize",(function(t){e.resize()})),e.resize()};function G(e,t,a,o){if(e.contains(t)){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if("fullscreencontent"!==e.id)return;window.GGBT_wsf_view.setCloseBtnPosition(e)}var i=GGBAppletUtils.getScale(n,e,o);null!==a.parentNode&&(isNaN(i)||1===i?(GGBAppletUtils.scaleElement(a,1),a.parentNode.style.width=n.width+"px",a.parentNode.style.height=n.height+"px"):(GGBAppletUtils.scaleElement(a,i),a.parentNode.style.width=n.width*i+"px",a.parentNode.style.height=n.height*i+"px")),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(e),"object"===_typeof(window.GGBT_ws_header_footer)&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}e.onExitFullscreen=function(e,t){t.appendChild(e)};var M=function(e,t,n,a){F(e,t,!0);for(var o=function(){var n=[];for(g=0;g<e.childNodes.length;g++)n.push(e.childNodes[g]);if(window.GGBT_wsf_view){var o=window.GGBT_wsf_view.renderFullScreen(e,t.id),i=document.getElementById("fullscreencontainer"),r=jQuery(e).find(".fullscreencontent");r.length>0?(o.remove(),r.attr("id","fullscreencontent").show(),jQuery(i).append(r),window.dispatchEvent(new Event("resize"))):N(o,t,!1),window.GGBT_wsf_view.launchFullScreen(i)}else u=a,N(e,t,!1);if(!window.GGBT_wsf_view)for(g=0;g<n.length;g++)e.removeChild(n[g])},i=e.getElementsByClassName("ggb_preview_play"),g=0;g<i.length;g++)i[g].addEventListener("click",o,!1),i[g].addEventListener("ontouchstart",o,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),x()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},z=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var t='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',n=document.createElement("style");n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(n)}return e},B=function(e,t,n,a){var o=document.createElement("div");o.className="ggb_preview",o.style.position="absolute",o.style.zIndex="90",o.style.width=e-2+"px",o.style.height=t-2+"px",o.style.top="0px",o.style.left="0px",o.style.overflow="hidden",o.style.backgroundColor="white";var i="lightgrey";void 0!==n&&(i="none"===n?"transparent":n),o.style.border="1px solid "+i;var g,r,d,s=document.createElement("img");if((s.style.position="relative",s.style.zIndex="1000",s.style.top="-1px",s.style.left="-1px",null!==p&&s.setAttribute("src",p),s.style.opacity=.7,null!==f)&&!a){(g=document.createElement("img")).style.position="absolute",g.style.zIndex="1001",g.style.opacity=1,s.style.opacity=.3,(r=360)>e/4*3&&(r=e/4*3),d=r/5.8,g.setAttribute("src",f),g.setAttribute("width",r),g.setAttribute("height",d);var l=(e-r)/2,h=(t-d)/2;g.style.left=l+"px",g.style.top=h+"px",o.appendChild(g)}return o.appendChild(s),o},T=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},C=["web","webSimple","web3d","tablet","tablet3d","phone"],A=function(e,t){if(S=e,t)Z(S,!0);else{var i,g,r=!o;if(r){var d=y(S);!isNaN(d)&&d<4.4&&(r=!1)}i="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var s=S.indexOf("//");for(var l in g=s>0?S:0===s?i+S:"https://www.geogebra.org/apps/5.2.814.0/",C)if(S.slice(-1*C[l].length)===C[l]||S.slice(-1*(C[l].length+1))===C[l]+"/")return void Z(g,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!r||a.is3D||a.AV||a.SV||a.CV||a.EV2||a.CP||a.PC||a.DA||a.FI||a.PV||k(n.showToolBar)||k(n.showMenuBar)||k(n.showAlgebraInput)||k(n.enableRightClick)||n.appName&&"classic"!=n.appName?g+="web3d/":g+="webSimple/",Z(g,!1)}},Z=function(e,t){if(e.requirejs)m=e;else{"/"!==e.slice(-1)&&(e+="/"),m=e,null===t&&(t=-1===e.indexOf("http")),c=t,P="web.nocache.js",w=!1;var n=m.split("/");n.length>1&&(t||"webSimple"!==n[n.length-2]?C.indexOf(n[n.length-2])>=0&&(P=n[n.length-2]+".nocache.js"):(P="webSimple.nocache.js",w=!0)),n=e.split("/"),"test"===(S=n[n.length-3]).substr(0,4)?S=S.substr(4,1)+"."+S.substr(5,1):"war"!==S.substr(0,3)&&"beta"!==S.substr(0,4)||(S="5.0");var a=parseFloat(S);NaN!==a&&a<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+a+" is deprecated. Using version latest instead."),A("5.0",t))}},E=function(e,t){window.console&&window.console.log&&(!t||void 0===t.showLogging||t.showLogging&&"false"!==t.showLogging)&&console.log(e)};function I(){var e=t;null!==d?e=d:parseFloat(e)<5&&(e="5.0"),A(e,!1),null!==s&&Z(s,c),r=!0}return void 0!==n.material_id?_(I):I(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function t(e,t){1!=t?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+t+","+t+")",e.style.webkitTransform="scale("+t+","+t+")",e.style.maxWidth="initial",null!==e.querySelector(".ggb_preview")&&(e.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[0]&&(e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[1]&&(e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(e.style.transform="none",e.style.webkitTransform="none")}function n(e,t,n,a,o){if(e.isScreenshoGenerator)return 1;var i,g=void 0!==a&&a,r=null!=e.noScaleMargin&&e.noScaleMargin,d=(i=e.autoHeight)&&"false"!==i,s=function(e,t,n,a,o,i){var g=null;if(null!=i&&""!=i)for(var r=e.parentNode;null!=r;){if((" "+r.className+" ").indexOf(" "+i+" ")>-1){g=r;break}r=r.parentNode}var d=0,s=0,l=0,h=0,m=0,c=0,u=0;if(g)d=g.offsetWidth,s=Math.max(a?g.offsetWidth:0,g.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(d=Math.min(window.innerWidth,document.documentElement.clientWidth),s=Math.min(window.innerHeight,document.documentElement.clientHeight),l=d):(d=window.innerWidth,s=window.innerHeight,l=window.innerWidth),e){var S=e.getBoundingClientRect();S.left>0&&S.left<=d&&(void 0===o||!o)&&("rtl"===document.dir?(m=d-S.width-S.left,c=l<=480?10:30):(c=S.left,m=l<=480?10:30),h=c+m)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(h=40,u=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(h=0,u=40))}return e&&((void 0===n||!n)&&t>0&&t+h<d?d=t:d-=h,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==n&&n||(s-=u)),{width:d,height:s}}(t,e.width,n,d,g&&window.GGBT_wsf_view||r,o),l=parseInt(s.width),h=e.width,m=e.height;if(void 0===h){var c=t.querySelector(".appletParameters");c&&(h=c.offsetWidth,m=c.offsetHeight)}var u=l/h,S=g?1:s.height/m;return void 0===n||n||(u=Math.min(1,u),S=Math.min(1,S)),Math.min(u,S)}function a(e,t,a){var o,i=1,g=!1;return e.hasOwnProperty("allowUpscale")&&(g=e.allowUpscale),e.hasOwnProperty("scale")&&(i=parseFloat(e.scale),(isNaN(i)||null===i||0===i)&&(i=1),i>1&&(g=!0)),t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(g=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?i:(o=n(e,t,g,a,e.scaleContainerClass),!g||e.hasOwnProperty("scale")&&1!==i?Math.min(i,o):o)}function o(e){var t=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),a=e.getBoundingClientRect(),o=(t-a.width)/2,i=(n-a.height)/2;i<0&&(i=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=o<40?"40px":o+"px",e.style.top=i+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=i<40?"40px":i+"px",e.style.left=o+"px")}return{responsiveResize:function(n,i){var g=n.querySelector(".appletParameters");if(g){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(i.id!==g.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(n)}if(g.parentElement&&/fullscreen/.test(g.parentElement.className))return;var r=a(i,n);e()&&g.setAttribute("data-param-scale",r);for(var d=null,s=0;s<n.childNodes.length;s++)if(void 0!==n.childNodes[s].className&&n.childNodes[s].className.match(/^applet_scaler/)){d=n.childNodes[s];break}if(null!==d&&null!==d.querySelector(".noscale"))return;var l=void 0!==i.id?i.id:"ggbApplet",h=window[l];null!=h&&h.recalculateEnvironments||null===d||d.className.match(/fullscreen/)||(d.parentNode.style.transform="",isNaN(r)||1===r?(t(d,1),d.parentNode.style.width=i.width+"px",d.parentNode.style.height=i.height+"px"):(d.parentNode.style.width=i.width*r+"px",d.parentNode.style.height=i.height*r+"px",t(d,r))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&o(n),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(g).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:o,getScale:a,scaleElement:t}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var e=n.location.search;return-1!=e.indexOf(J)||-1!=e.indexOf(K)}function q(e,t){}q(H,I),webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{},t;function u(){return v(),t}function v(){if(!t){var e=o.createElement(Q);if(e.id=L,e.style.cssText=R+S,e.tabIndex=-1,o.body.appendChild(e),t=e.contentWindow.document,-1==navigator.userAgent.indexOf(T)){t.open();var n=document.compatMode==U?V:W;t.write(n+X),t.close()}}}function w(e){q(cb,eb),function(e){function t(){return _typeof(o.readyState)==Y?_typeof(o.body)!=Y&&null!=o.body:/loaded|complete/.test(o.readyState)}var n=t();if(n)e();else{o.addEventListener&&o.addEventListener(Z,i,!1);var a=setInterval((function(){i()}),$)}function i(){if(!n){if(!t())return;n=!0,e(),o.removeEventListener&&o.removeEventListener(Z,i,!1),a&&clearInterval(a)}}}((function(){var t,n,a,o;t=e,n=u(),a=n.body,(o=n.createElement(_)).language=ab,o.crossOrigin=W,o.src=t,webModule.__errFn&&(o.onerror=function(){webModule.__errFn(L,new Error(bb+t))}),a.appendChild(o),q(cb,db)}))}function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=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(e){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(e){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(e){var t=c[e];return null==t?null:t},r=d,webModule.__errFn=e}function B(){function e(e){var t=e.lastIndexOf(rb);-1==t&&(t=e.length);var n=e.indexOf(sb);-1==n&&(n=e.length);var a=e.lastIndexOf(tb,Math.min(n,t));return a>=O?e.substring(O,a+P):W}var t,n=null!=(t=__gwt_getMetaProperty(wb))?t:W;return n==W&&(n=function(){for(var t=o.getElementsByTagName(_),n=O;n<t.length;++n)if(-1!=t[n].src.indexOf(xb))return e(t[n].src);return W}()),n==W&&(n=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),n==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(n=e(o.location.href)),n=function(t){if(t.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=t+vb,t=e(n.src)}return t}(n),n}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,a=[],o=[];function i(e){var t=o[e](),n=a[e];if(t in n)return t;var i=[];for(var g in n)i[n[g]]=g;throw r&&r(e,i,t),null}if(__gwt_isKnownPropertyValue=function(e,t){return t in a[e]},webModule.__getPropMap=function(){var e={};for(var t in a)a.hasOwnProperty(t)&&(e[t]=i(t));return e},webModule.__computePropValue=i,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var g=(e=Cb).indexOf(Db);-1!=g&&(t=parseInt(e.substring(g+P),$),e=e.substring(O,g))}catch(e){}return webModule.__softPermutationId=t,C(e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(e){var t=s[L].bindings;s[L].bindings=function(){for(var n=t?t():{},a=e[webModule.__softPermutationId],o=O;o<a.length;o++){var i=a[o];n[i[O]]=i[P]}return n}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var t=u(),n=t.body,a=t.createElement(_);a.language=ab,a.text=e,n.appendChild(a),n.removeChild(a)},A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},"function"!=typeof window.web3d&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),"function"!=typeof window.webSimple&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet}else console.warn("deployggb.js was loaded twice")})()},37318:function(e,t,n){"use strict";function a(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function o(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],a=0;a<e.length;a++){var o=e[a],i=t?"".concat(t,"/").concat(o.name):"".concat(o.name);n.push({title:o.name,type:o.type,isLeaf:"tree"!==o.type,key:i})}return n}function i(e,t,n){for(var a=0;a<e.length;a++){var o=e[a];if(o.key===t){o.children=n;break}o.children&&i(o.children,t,n)}return e}function g(e,t,n){var a;return function(){var o=this,i=arguments,g=function(){a=null,n||e.apply(o,i)},r=n&&!a;clearTimeout(a),a=setTimeout(g,t),r&&e.apply(o,i)}}n.d(t,{Ax:function(){return i},Ds:function(){return g},KI:function(){return r},SI:function(){return o},f1:function(){return a}});var r=n(69423).Z.API_SERVER},64916:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var a=n(7557),o=n.n(a),i=n(41498),g=n.n(i),r=n(79800),d=n.n(r),s=n(59301),l=n(78241),h=n(8591),m=n(43418),c=n(78550),u=n(92832),S=n(2595),P=n(95237),w=n(43604),p=n(61186),f=n.n(p),v=n(95972),y=n(79265),L={tips:"tips___e8J4O",homeworkType:"homeworkType___ZjN2X",antdTable:"antdTable___amDdp",modalWrapper:"modalWrapper___XPojI"},x=n(73516),_=n(28019),b=n(37712),j=(0,y.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var t=e.dispatch,n=e.courseEndTime,a=(e.classroomList,e.successCallback),i=void 0===a?function(){}:a,r=e.visible,p=e.homeworkIds,y=e.courseId,j=e.isBatch,k=(e.shixunHomeworks,l.Z.useForm()),N=d()(k,1)[0],F=(0,s.useState)(!1),G=d()(F,2),M=G[0],z=G[1],B=(0,s.useState)(!1),T=d()(B,2),C=T[0],A=T[1],Z=(0,s.useState)(!1),E=d()(Z,2),I=E[0],O=E[1],D=(0,s.useState)([]),H=d()(D,2),R=H[0],W=H[1],Y=(0,s.useState)([]),U=d()(Y,2),q=U[0],K=U[1],X=(0,s.useState)([]),V=d()(X,2),Q=V[0],J=V[1],$=(0,s.useState)([]),ee=d()($,2),te=ee[0],ne=ee[1],ae=(0,s.useState)([]),oe=d()(ae,2),ie=oe[0],ge=oe[1],re=(0,s.useState)([]),de=d()(re,2),se=de[0],le=de[1],he=(0,s.useState)([]),me=d()(he,2),ce=me[0],ue=me[1],Se=(0,s.useState)([]),Pe=d()(Se,2),we=Pe[0],pe=Pe[1],fe=(0,s.useState)([]),ve=d()(fe,2),ye=ve[0],Le=ve[1];(0,s.useEffect)((function(){r?xe():be()}),[r]);var xe=function(){var e=g()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(!0),e.next=3,(0,x.oR)(p[0],{course_id:y});case 3:t=e.sent,O(t.no_group),j?(ue(t.all_course_groups),pe(t.all_course_groups)):(ne(t.late_course_groups),ge(t.late_course_groups),W(t.submit_course_groups),K(t.submit_course_groups)),z(!1),N.setFieldsValue({end_time:f()()});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_e=function(){var e=g()(o()().mark((function e(){var n,a,g;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=N.getFieldsValue(),a=f()(n.end_time).format("YYYY-MM-DD HH:mm"),!(j?0===ye.length:0===Q.length&&0===se.length)||I){e.next=6;break}return h.ZP.warning("请选择需要操作的班级"),e.abrupt("return");case 6:return A(!0),e.next=9,(0,x.Mc)(y,{no_group:I,homework_ids:p,group_ids:j?ye:Q,end_time:a,late_group_ids:j?ye:se});case 9:g=e.sent,A(!1),0===g.status&&(be(),h.ZP.success("操作成功"),i(),t({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=function(){J([]),le([]),K([]),ge([])};return(0,b.jsxs)(m.Z,{centered:!0,title:"立即截止",className:L.modalWrapper,width:j||I?520:760,open:r,confirmLoading:C,destroyOnClose:!0,okText:"截止",cancelText:"取消",onOk:function(){return _e()},onCancel:function(){be(),t({type:"classroomList/setActionTabs",payload:{}})},children:[(0,b.jsxs)("div",{className:L.tips,children:[(0,b.jsx)("div",{children:"1、截止后学生不能再提交作业。"}),(0,b.jsx)("div",{children:"2、本操作只对“提交中”、“补交中”的作业有效。"})]}),(0,b.jsx)(l.Z,{form:N,layout:"vertical",children:(0,b.jsx)(l.Z.Item,{name:"end_time",label:"截止时间",children:(0,b.jsx)(c.default,{style:{width:"100%"},disabledDate:function(e){return(0,_.Q8)(e,n)},disabledTime:function(e){return(0,_.d0)(e)},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:f()((0,v.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})})}),!I&&(0,b.jsx)(b.Fragment,{children:j?(0,b.jsxs)("div",{children:[(0,b.jsx)(u.Z,{placeholder:"搜索班级",onChange:function(e){pe(ce.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}}),(0,b.jsx)(S.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},className:L.antdTable,rowSelection:{type:"checkbox",onChange:function(e){Le(e)}},rowKey:"id",pagination:!1,dataSource:we,loading:M,columns:[{title:"班级",dataIndex:"name"}]})]}):(0,b.jsxs)(P.Z,{gutter:24,children:[(0,b.jsxs)(w.Z,{span:14,children:[(0,b.jsx)("div",{className:L.homeworkType,children:"作业截止"}),(0,b.jsx)(u.Z,{placeholder:"搜索班级",onChange:function(e){K(R.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}}),(0,b.jsx)("div",{className:L.tableWrapper,children:(0,b.jsx)(S.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto"},className:L.antdTable,rowSelection:{type:"checkbox",onChange:function(e){J(e)}},rowKey:"id",pagination:!1,dataSource:q,loading:M,columns:[{title:"班级",dataIndex:"name",ellipsis:!0},{title:"发布时间",dataIndex:"publish_time"},{title:"截止时间",dataIndex:"end_time"}]})})]}),(0,b.jsxs)(w.Z,{flex:10,style:{maxWidth:"280px"},children:[(0,b.jsx)("div",{className:L.homeworkType,children:"补交截止"}),(0,b.jsx)(u.Z,{placeholder:"搜索班级",onChange:function(e){ge(te.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}}),(0,b.jsx)("div",{className:L.tableWrapper,children:(0,b.jsx)(S.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto",maxWidth:"280px"},className:L.antdTable,rowSelection:{type:"checkbox",onChange:function(e){le(e)}},rowKey:"id",pagination:!1,loading:M,dataSource:ie,columns:[{title:"班级",dataIndex:"name",ellipsis:!0,width:120},{title:"截止时间",dataIndex:"late_time"}]})})]})]})})]})}))},12840:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var a=n(7557),o=n.n(a),i=n(41498),g=n.n(i),r=n(79800),d=n.n(r),s=n(59301),l="imageDimensions___a7crR",h="img___Kroat",m="fullWidth___c492T",c=n(92310),u=n.n(c),S=n(71418),P=n(2859),w=n(82710),p=n(95972),f=n(37712),v=function(e){var t=e.data,n=e.className,a=e.fullWidth,i=e.style,r=void 0===i?{}:i,c=e.onClose,v=e.onOk,y=e.showFullTools,L=e.noAssociationId,x=(0,s.useRef)(null),_=(0,s.useRef)(null),b=(0,s.useRef)(null),j=(0,s.useRef)(null),k=(0,s.useState)(!1),N=d()(k,2),F=N[0],G=N[1],M=(0,s.useState)("正在加载中"),z=d()(M,2),B=z[0],T=z[1];(0,s.useEffect)((function(){b.current||(b.current=document.createElement("style"),document.head.appendChild(b.current)),null!=t&&t.visible?(document.body.setAttribute("data-custom","y-hidden"),b.current.innerHTML=" html { overflow-y: hidden; }",null!=t&&t.src&&C()):(document.body.removeAttribute("data-custom"),b.current&&(document.head.removeChild(b.current),b.current=null))}),[null==t?void 0:t.visible]);var C=function(){var e=g()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G(!0),T("正在加载中"),e.next=4,(0,p.ZJ)(null==t?void 0:t.src);case 4:n=e.sent,x.current.src="",x.current.src=n,x.current.onload=function(){Z()},G(!1),T("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=g()(o()().mark((function e(n){var a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G(!0),T("正在保存中"),e.next=4,(0,w.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:t.title,file:n.dataUrl}});case 4:if(null==(a=e.sent)||!a.id||L){e.next=12;break}return e.next=8,(0,w.ZP)("/api/attachments/".concat(t.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==a?void 0:a.id,settings:JSON.stringify(n.state)}});case 8:0===e.sent.status&&v(),e.next=13;break;case 12:null!=a&&a.id&&v(a);case 13:G(!1),T("");case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Z=function(){_.current=new P.hP(x.current),_.current.targetRoot=j.current,_.current.addEventListener("render",A),_.current.addEventListener("beforeclose",c),y&&(_.current.availableMarkerTypes=_.current.ALL_MARKER_TYPES,_.current.uiStyleSettings.redoButtonVisible=!0,_.current.uiStyleSettings.notesButtonVisible=!0,_.current.uiStyleSettings.zoomButtonVisible=!0,_.current.uiStyleSettings.zoomOutButtonVisible=!0,_.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=_.current.uiStyleSettings,_.current.show(),null!=t&&t.snapshotData&&_.current.restoreState(t.snapshotData),setTimeout((function(){var e;window.scrollTo(0,0),(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.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(e){var t=document.querySelector(e.name);t&&t.setAttribute("title",e.title)}))}),300)};return(0,f.jsx)(s.Fragment,{children:(null==t?void 0:t.visible)&&(0,f.jsx)(S.Z,{spinning:F,tip:B,style:{position:"absolute"},children:(0,f.jsx)("div",{ref:j,className:u()(l,n,a?m:""),style:r,children:(0,f.jsx)("img",{className:h,ref:x})})})})}},18890:function(e,t,n){"use strict";n.d(t,{h:function(){return w}});var a=n(82242),o=n.n(a),i=n(79800),g=n.n(i),r=n(59301),d=n(57809),s=n(78241),l=n(3113),h=n(89780),m=n.n(h),c=(n(79906),n(44383),n(37712)),u=d.default.Option,S={labelCol:{span:4},wrapperCol:{span:20}},P={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"]};function w(e){var t=e.value,n=e.onChange,a=e.mode,i=e.options,d=void 0===i?{}:i,s=(0,r.useRef)(),l=(0,r.useState)(),h=g()(l,2),u=h[0],S=h[1];return(0,r.useEffect)((function(){if(u){var e=function(e){var t=e.getValue();n&&n(t)};return u.on("change",e),function(){u.off("change",e)}}}),[u,n]),(0,r.useEffect)((function(){u&&u.setOption("mode",a)}),[u,a]),(0,r.useEffect)((function(){u&&(t===u.getValue()&&""!==t||setTimeout((function(){u.setValue(t||"")}),300))}),[u,t]),(0,r.useEffect)((function(){if(s.current&&!u){var e=m().fromTextArea(s.current,o()({mode:a,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},d));S(e)}}),[s.current,u]),(0,c.jsx)("div",{className:"my-codemirror-container",children:(0,c.jsx)("textarea",{ref:s})})}t.Z=function(e){var t=e.callback,n=e.onCancel,a=(0,r.useState)("python"),i=g()(a,2),h=i[0],m=i[1];return(0,c.jsxs)(s.Z,o()(o()({},S),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)},style:{width:500},children:[(0,c.jsx)(s.Z.Item,{label:"代码语言",name:"language",children:(0,c.jsx)(d.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){m(P[e][1])},children:Object.keys(P).map((function(e){return(0,c.jsx)(u,{value:e,children:P[e][0]},e)}))})}),(0,c.jsx)(s.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,c.jsx)(w,{mode:h})}),(0,c.jsxs)("div",{className:"flex-container flex-end",children:[(0,c.jsx)(l.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,c.jsx)(l.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))}},85654:function(e,t,n){"use strict";n.d(t,{Z:function(){return ve}});var a=n(91232),o=n.n(a),i=n(79800),g=n.n(i),r=n(85573),d=n.n(r),s=n(59301),l=n(89780),h=n.n(l),m=n(76374),c=(n(79906),n(6313),n(25717),n(99498),n(25419),n(67549),n(54065)),u=n(37712),S=function(e){var t=e.value,n=void 0===t?"":t,a=(e.className,e.showTextOnly,e.showLines,e.style,(0,s.useMemo)((function(){return""}),[n]));return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{dangerouslySetInnerHTML:{__html:a}})})},P=n(82242),w=n.n(P),p=[{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 f(e){var t=e.onActionCallback,n=e.title,a=e.icon,o=e.actionName,i=e.className,g=void 0===i?"":i,r=e.children;return(0,u.jsxs)("a",{title:n,className:g,onClick:function(){t(o)},children:[(0,u.jsx)("i",{className:"".concat(a)}),r]})}var v=function(e){var t=e.watch,n=e.showNullButton,a=e.showNullProgramButton,o=e.onActionCallback,i=e.fullScreen,g=e.insertTemp,r=e.hidetoolBar,d=e.extraUse,s=[].concat(p,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,u.jsxs)("ul",{className:"markdown-toolbar-container",children:[!r&&s.map((function(e,t){return(0,u.jsx)("li",{children:e.actionName?(0,u.jsx)(f,w()(w()({},e),{},{onActionCallback:o})):(0,u.jsx)("span",{className:"v-line"})},t)})),n?(0,u.jsx)("li",{children:(0,u.jsx)(f,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:o,children:(0,u.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,a?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("li",{children:(0,u.jsx)(f,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:o,children:(0,u.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,u.jsx)("li",{children:(0,u.jsx)(f,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:o,children:(0,u.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,g&&(0,u.jsx)("li",{children:(0,u.jsx)(f,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(g),onActionCallback:o,children:(0,u.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),d&&(0,u.jsx)("li",{children:d}),(0,u.jsx)("li",{className:"btn-full-screen",children:(0,u.jsx)(f,{icon:"".concat(i?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:o})})]})},y=n(32552),L=n(78241),x=n(92832),_=n(3113),b={labelCol:{span:4},wrapperCol:{span:20}},j=function(e){var t=e.callback,n=e.onCancel;return(0,u.jsxs)(L.Z,w()(w()({},b),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)},style:{width:500},children:[(0,u.jsx)(L.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,u.jsx)(x.Z,{})}),(0,u.jsx)(L.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,u.jsx)(x.Z,{})}),(0,u.jsxs)("div",{className:"flex-container flex-end",children:[(0,u.jsx)(_.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,u.jsx)(_.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))},k=n(18890),N=n(48347),F=n(43418),G=n(95237),M=n(12840),z=function(e){var t=e.callback,n=e.onCancel,a=document.createElement("canvas"),o=a.getContext("2d");a.width=1e3,a.height=800,o.fillStyle="#ffffff",o.fillRect(0,0,a.width,a.height);var i=a.toDataURL("image/png");return(0,u.jsx)(F.Z,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1,children:(0,u.jsx)(G.Z,{style:{height:"100vh"},children:(0,u.jsx)(M.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:i,visible:!0,title:String(Date.now())},onOk:function(e){t({src:e.url})},onClose:n})})})},B=n(7557),T=n.n(B),C=n(41498),A=n.n(C),Z=n(37205),E=n.n(Z),I=n(12378);function O(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(O,go.CommandHandler),O.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},O.prototype.alignLeft=function(){var e=this.diagram;e.startTransaction("aligning left");var t=1/0;e.selection.each((function(e){e instanceof go.Link||(t=Math.min(e.position.x,t))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t,e.position.y))})),e.commitTransaction("aligning left")},O.prototype.alignRight=function(){var e=this.diagram;e.startTransaction("aligning right");var t=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var n=e.actualBounds.x+e.actualBounds.width;t=Math.max(n,t)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t-e.actualBounds.width,e.position.y))})),e.commitTransaction("aligning right")},O.prototype.alignTop=function(){var e=this.diagram;e.startTransaction("alignTop");var t=1/0;e.selection.each((function(e){e instanceof go.Link||(t=Math.min(e.position.y,t))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.position.x,t))})),e.commitTransaction("alignTop")},O.prototype.alignBottom=function(){var e=this.diagram;e.startTransaction("aligning bottom");var t=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var n=e.actualBounds.y+e.actualBounds.height;t=Math.max(n,t)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,t-e.actualBounds.height))})),e.commitTransaction("aligning bottom")},O.prototype.alignCenterX=function(){var e=this.diagram,t=e.selection.first();if(t){e.startTransaction("aligning Center X");var n=t.actualBounds.x+t.actualBounds.width/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n-e.actualBounds.width/2,e.actualBounds.y))})),e.commitTransaction("aligning Center X")}},O.prototype.alignCenterY=function(){var e=this.diagram,t=e.selection.first();if(t){e.startTransaction("aligning Center Y");var n=t.actualBounds.y+t.actualBounds.height/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,n-e.actualBounds.height/2))})),e.commitTransaction("aligning Center Y")}},O.prototype.alignColumn=function(e){var t=this.diagram;t.startTransaction("align Column"),void 0===e&&(e=0),e=parseFloat(e);var n=new Array;t.selection.each((function(e){e instanceof go.Link||n.push(e)}));for(var a=0;a<n.length-1;a++){var o=n[a],i=o.actualBounds.y+o.actualBounds.height+e;n[a+1].move(new go.Point(o.actualBounds.x,i))}t.commitTransaction("align Column")},O.prototype.alignRow=function(e){void 0===e&&(e=0),e=parseFloat(e);var t=this.diagram;t.startTransaction("align Row");var n=new Array;t.selection.each((function(e){e instanceof go.Link||n.push(e)}));for(var a=0;a<n.length-1;a++){var o=n[a],i=o.actualBounds.x+o.actualBounds.width+e;n[a+1].move(new go.Point(i,o.actualBounds.y))}t.commitTransaction("align Row")},O.prototype.canRotate=function(e){var t=this.diagram;return null!==t&&!t.isReadOnly&&!t.isModelReadOnly&&!(t.selection.count<1)},O.prototype.rotate=function(e){var t;void 0===e&&(e=90),(t=this.diagram).startTransaction("rotate "+e.toString()),(t=this.diagram).selection.each((function(t){t instanceof go.Link||t instanceof go.Group||(t.angle+=e)})),t.commitTransaction("rotate "+e.toString())},O.prototype.pullToFront=function(){var e=this.diagram;e.startTransaction("pullToFront");var t=new go.Map;e.selection.each((function(e){t.set(e.layer,0)})),t.iteratorKeys.each((function(e){var n=0;e.parts.each((function(e){if(!e.isSelected){var t=e.zOrder;isNaN(t)?e.zOrder=0:n=Math.max(n,t)}})),t.set(e,n)})),e.selection.each((function(e){O._assignZOrder(e,t.get(e.layer)+1)})),e.commitTransaction("pullToFront")},O.prototype.pushToBack=function(){var e=this.diagram;e.startTransaction("pushToBack");var t=new go.Map;e.selection.each((function(e){t.set(e.layer,0)})),t.iteratorKeys.each((function(e){var n=0;e.parts.each((function(e){if(!e.isSelected){var t=e.zOrder;isNaN(t)?e.zOrder=0:n=Math.min(n,t)}})),t.set(e,n)})),e.selection.each((function(e){O._assignZOrder(e,t.get(e.layer)-1-O._findGroupDepth(e))})),e.commitTransaction("pushToBack")},O._assignZOrder=function(e,t,n){void 0===n&&(n=e),e.layer===n.layer&&(e.zOrder=t),e instanceof go.Group&&e.memberParts.each((function(e){O._assignZOrder(e,t+1,n)}))},O._findGroupDepth=function(e){if(e instanceof go.Group){var t=0;return e.memberParts.each((function(e){t=Math.max(t,O._findGroupDepth(e))})),t+1}return 0},O.prototype.doKeyDown=function(){var e=this.diagram;if(null!==e){var t=e.lastInput;if("Up"===t.key||"Down"===t.key||"Left"===t.key||"Right"===t.key){var n=this.arrowKeyBehavior;if("none"===n)return;if("select"===n)return void this._arrowKeySelect();if("move"===n)return void this._arrowKeyMove();if("tree"===n)return void this._arrowKeyTree()}go.CommandHandler.prototype.doKeyDown.call(this)}},O.prototype._getAllParts=function(){var e=new Array;return this.diagram.nodes.each((function(t){e.push(t)})),this.diagram.parts.each((function(t){e.push(t)})),e},O.prototype._arrowKeyMove=function(){var e=this.diagram,t=e.lastInput,n=0,a=0;if(t.control||t.meta)n=1,a=1;else if(null!==e.grid){var o=e.grid.gridCellSize;a=o.width,n=o.height}e.startTransaction("arrowKeyMove"),e.selection.each((function(e){"Up"===t.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y-n)):"Down"===t.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y+n)):"Left"===t.key?e.move(new go.Point(e.actualBounds.x-a,e.actualBounds.y)):"Right"===t.key&&e.move(new go.Point(e.actualBounds.x+a,e.actualBounds.y))})),e.commitTransaction("arrowKeyMove")},O.prototype._arrowKeySelect=function(){var e=this.diagram,t=e.lastInput,n=null;"Up"===t.key?n=this._findNearestPartTowards(270):"Down"===t.key?n=this._findNearestPartTowards(90):"Left"===t.key?n=this._findNearestPartTowards(180):"Right"===t.key&&(n=this._findNearestPartTowards(0)),null!==n&&(t.shift?n.isSelected=!0:t.control||t.meta?n.isSelected=!n.isSelected:e.select(n))},O.prototype._findNearestPartTowards=function(e){var t=this.diagram.selection.first();if(null===t)return null;for(var n=t.actualBounds.center,a=this._getAllParts(),o=1/0,i=t,g=0;g<a.length;g++){var r=a[g];if(r!==t&&r.canSelect()){var d=r.actualBounds.center,s=n.directionPoint(d),l=this._angleCloseness(s,e);if(l<=45){var h=n.distanceSquaredPoint(d);(h*=1+Math.sin(l*Math.PI/180))<o&&(o=h,i=r)}}}return i},O.prototype._angleCloseness=function(e,t){return Math.min(Math.abs(t-e),Math.min(Math.abs(t+360-e),Math.abs(t-360-e)))},O.prototype._arrowKeyTree=function(){var e=this.diagram,t=e.selection.first();if(t instanceof go.Node){var n=e.lastInput;if("Right"===n.key)if(t.isTreeLeaf);else if(t.isTreeExpanded){null!==(o=this._sortTreeChildrenByY(t).first())&&e.select(o)}else e.commandHandler.canExpandTree(t)&&e.commandHandler.expandTree(t);else if("Left"===n.key){if(!t.isTreeLeaf&&t.isTreeExpanded)e.commandHandler.canCollapseTree(t)&&e.commandHandler.collapseTree(t);else null!==(i=t.findTreeParentNode())&&e.select(i)}else if("Up"===n.key){if(null!==(i=t.findTreeParentNode()))if((r=(g=this._sortTreeChildrenByY(i)).indexOf(t))>0){for(var a=g.elt(r-1);null!==a&&a.isTreeExpanded&&!a.isTreeLeaf;){a=this._sortTreeChildrenByY(a).last()}null!==a&&e.select(a)}else e.select(i)}else if("Down"===n.key){var o;if(t.isTreeExpanded&&!t.isTreeLeaf)null!==(o=this._sortTreeChildrenByY(t).first())&&e.select(o);else for(;null!==t;){var i,g,r;if(null===(i=t.findTreeParentNode()))break;if((r=(g=this._sortTreeChildrenByY(i)).indexOf(t))<g.length-1){e.select(g.elt(r+1));break}t=i}}var d=e.selection.first();null!==d&&e.scrollToRect(d.actualBounds)}},O.prototype._sortTreeChildrenByY=function(e){var t=(new go.List).addAll(e.findTreeChildrenNodes());return t.sort((function(e,t){var n=e.location,a=t.location;return n.y<a.y?-1:n.y>a.y?1:n.x<a.x?-1:n.x>a.x?1:0})),t},O.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},O.prototype.pasteFromClipboard=function(){var e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),e},Object.defineProperty(O.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(e){if("move"!==e&&"select"!==e&&"scroll"!==e&&"tree"!==e&&"none"!==e)throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+e);this._arrowKeyBehavior=e}}),Object.defineProperty(O.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(e){if(!(e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+e);this._pasteOffset.set(e)}});var D=O,H=(n(15378),n(43604)),R=n(82710),W="myPaletteDiv___Xjz2I",Y="flowChartWrp____f45r",U="maxH60___Pd4Re";var q=function(e){var t=e.onCancel,n=e.callback,a=(0,s.useRef)(),o=(0,s.useRef)(),i=(0,s.useRef)(),r=(0,s.useRef)(!1),d=(0,s.useRef)(!1),l=(0,s.useState)(0),h=g()(l,2),m=h[0],c=h[1],S=function(){var e=A()(T()().mark((function e(){var t,o;return T()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.current.makeImage(),e.next=3,(0,R.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:t.src}});case 3:o=e.sent,n({src:o.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,s.useEffect)((function(){return setTimeout((function(){!function(){var e=I.bx.make,t="#ff3333",n="#3358ff",g="#25ad23",r="#d533ff",d="#7d33ff",s="#ff6233",l="#ffffff",h="#000000",m="#fffcd5",c="#d5ebff",u="#f2dfe0",S="#a5d2fa",P="#cccccc",w="#b3e6b3",p="#fcbbbd";function f(t,n){var a=function(e,n){e.handled=!0,e.diagram.model.commit((function(a){var o=n.part.adornedPart,i=(new I.E9).setRectSpot(o.actualBounds,t);i.subtract(o.location),i.scale(2,2),i.x+=130*Math.sign(i.x),i.y+=130*Math.sign(i.y),i.add(o.location),i.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var g=a.copyNodeData(o.data);a.setGroupKeyForNodeData(g,a.getGroupKeyForNodeData(o.data)),a.addNodeData(g);var r={from:o.key,to:a.getKeyForNodeData(g)};a.addLinkData(r);var d=e.diagram.findNodeForData(g);d.location=i,e.diagram.select(d),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(I.bn,{figure:n,alignment:t,alignmentFocus:t.opposite(),width:t.equals(I.z6.Top)||t.equals(I.z6.Bottom)?25:18,height:t.equals(I.z6.Top)||t.equals(I.z6.Bottom)?18:25,fill:"orange",stroke:l,strokeWidth:4,mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="orange"},isActionable:!0,click:a,contextClick:a})}function v(t){return e(I.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(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="orange"},click:function(e,t){e.diagram.commandHandler.showContextMenu(t.part.adornedPart)}},t||{})}function y(e,t){return function(n,a){n.handled=!0,n.diagram.model.commit((function(n){n.set(a.part.adornedPart.data,e,t)}))}}function L(t,n){return n||(n="color"),e(I.bn,{width:16,height:16,stroke:"lightgray",fill:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.stroke="dodgerblue"},mouseLeave:function(e,t){return t.stroke="lightgray"},click:y(n,t),contextClick:y(n,t)})}function x(){return[e("ContextMenuButton",e(I.s_,"Horizontal",L(l,"fill"),L(m,"fill"),L(c,"fill"),L(u,"fill"))),e("ContextMenuButton",e(I.s_,"Horizontal",L(P,"fill"),L(w,"fill"),L(S,"fill"),L(p,"fill")))]}function _(){return[e("ContextMenuButton",e(I.s_,"Horizontal",L(h),L(g),L(n),L(t))),e("ContextMenuButton",e(I.s_,"Horizontal",L(l),L(r),L(d),L(s)))]}function b(t,n){return n||(n="thickness"),e(I.bn,"LineH",{width:16,height:16,strokeWidth:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:y(n,t),contextClick:y(n,t)})}function j(t,n){return n||(n="dash"),e(I.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:y(n,t),contextClick:y(n,t)})}function k(){return[e("ContextMenuButton",e(I.s_,"Horizontal",b(1),b(2),b(3),b(4))),e("ContextMenuButton",e(I.s_,"Horizontal",j(null),j([2,4]),j([4,4])))]}function N(t,n){return n||(n="figure"),e(I.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="lightgray"},click:y(n,t),contextClick:y(n,t)})}function F(t){return e(I.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(t+4).toString()+" H3"})}function G(t){var n="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return 0===t?n="M0 0 M16 16 M0 8 L16 8":2===t&&(n="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),e(I.bn,{geometryString:n,margin:2,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:y("dir",t),contextClick:y("dir",t)})}function M(t){var n=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var a=n.part.adornedPart;e.set(a.data,t?"toSpot":"fromSpot",I.z6.stringify(I.z6.AllSides)),(t?a.toNode:a.fromNode).invalidateConnectedLinks()}))};return e(I.bn,{width:12,height:12,fill:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:n,contextClick:n})}function z(t,n){var a=0,o=I.z6.RightSide;t.equals(I.z6.Top)?(a=270,o=I.z6.TopSide):t.equals(I.z6.Left)?(a=180,o=I.z6.LeftSide):t.equals(I.z6.Bottom)&&(a=90,o=I.z6.BottomSide),n||(a-=180);var i=function(e,t){e.handled=!0,e.diagram.model.commit((function(e){var a=t.part.adornedPart;e.set(a.data,n?"toSpot":"fromSpot",I.z6.stringify(o)),(n?a.toNode:a.fromNode).invalidateConnectedLinks()}))};return e(I.bn,{alignment:t,alignmentFocus:t.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:a,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:i,contextClick:i})}a.current=new I.S0(o.current,{padding:20,grid:e(I.s_,"Grid",e(I.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(I.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:function(e){e.diagram.commandHandler.addTopLevelParts(e.diagram.selection,!0)||e.diagram.currentTool.doCancel()},commandHandler:e(D),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(e){var t=e.subject;t.location=t.location.copy().snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:function(e){e.subject,setTimeout((function(){e.diagram.commandHandler.editTextBlock()}))},LinkRelinked:function(e){e.parameter.part.invalidateConnectedLinks();var t=e.subject;e.diagram.toolManager.linkingTool.isForwards?t.toNode.invalidateConnectedLinks():t.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),a.current.nodeTemplate=e(I.NB,"Auto",{locationSpot:I.z6.Center,locationObjectName:"SHAPE",desiredSize:new I.$u(120,60),minSize:new I.$u(40,40),resizable:!0,resizeCellSize:new I.$u(10,10),rotatable:!0},new I.KX("location","loc",I.E9.parse).makeTwoWay(I.E9.stringify),new I.KX("desiredSize","size",I.$u.parse).makeTwoWay(I.$u.stringify),e(I.bn,{name:"SHAPE",fill:l,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:I.z6.AllSides,toSpot:I.z6.AllSides},new I.KX("figure"),new I.KX("fill"),new I.KX("stroke","borderColor"),new I.KX("strokeWidth","thickness"),new I.KX("strokeDashArray","dash")),e(I.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(I.al,{margin:1,textAlign:"center",overflow:I.al.OverflowEllipsis,editable:!0},new I.KX("text").makeTwoWay(),new I.KX("stroke","color"))),a.current.nodeTemplate.toolTip=e("ToolTip",e(I.s_,"Vertical",{maxSize:new I.$u(200,NaN)},e(I.al,{font:"bold 10pt sans-serif",textAlign:"center"},new I.KX("text")),e(I.al,{font:"10pt sans-serif",textAlign:"center"},new I.KX("text","details")))),a.current.nodeTemplate.selectionAdornmentTemplate=e(I.uz,"Spot",e(I.Vm,{padding:10}),f(I.z6.Top,"TriangleUp"),f(I.z6.Left,"TriangleLeft"),f(I.z6.Right,"TriangleRight"),f(I.z6.Bottom,"TriangleDown"),v({alignment:new I.z6(.75,0)})),a.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(I.s_,"Horizontal",N("Rectangle"),N("RoundedRectangle"),N("Ellipse"),N("Diamond"))),e("ContextMenuButton",e(I.s_,"Horizontal",N("Parallelogram2"),N("ManualOperation"),N("Procedure"),N("Cylinder1"))),e("ContextMenuButton",e(I.s_,"Horizontal",N("Terminator"),N("CreateRequest"),N("Document"),N("TriangleDown"))),x(),_(),k()),a.current.groupTemplate=e(I.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:I.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:function(e,t){t.addMembers(t.diagram.selection,!0)||t.diagram.currentTool.doCancel()},avoidable:!1},new I.KX("location","loc",I.E9.parse).makeTwoWay(I.E9.stringify),e(I.s_,"Auto",{name:"BODY"},e(I.bn,{parameter1:10,fill:l,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:I.z6.AllSides,toSpot:I.z6.AllSides},new I.KX("fill"),new I.KX("stroke","color"),new I.KX("strokeWidth","thickness"),new I.KX("strokeDashArray","dash")),e(I.Vm,{background:"transparent",margin:20})),e(I.al,{alignment:I.z6.Top,alignmentFocus:I.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new I.KX("text"),new I.KX("stroke","color"))),a.current.groupTemplate.selectionAdornmentTemplate=e(I.uz,"Spot",e(I.s_,"Auto",e(I.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(I.Vm,{margin:1.5})),v({alignment:I.z6.TopRight,alignmentFocus:I.z6.BottomRight})),a.current.groupTemplate.contextMenu=e("ContextMenu",x(),_(),k()),a.current.linkTemplate=e(I.rU,{layerName:"Foreground",routing:I.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new I.KX("fromSpot","fromSpot",I.z6.parse),new I.KX("toSpot","toSpot",I.z6.parse),new I.KX("fromShortLength","dir",(function(e){return e>=1?10:0})),new I.KX("toShortLength","dir",(function(e){return e>=1?10:0})),new I.KX("points").makeTwoWay(),e(I.bn,{strokeWidth:2},new I.KX("stroke","color"),new I.KX("strokeWidth","thickness"),new I.KX("strokeDashArray","dash")),e(I.bn,{segmentIndex:0,segmentOffset:new I.E9(15,0),segmentOrientation:I.rU.OrientAlong,alignmentFocus:I.z6.Right,figure:"circle",width:10,strokeWidth:0},new I.KX("fill","color"),new I.KX("visible","dir",(function(e){return 1===e}))),e(I.bn,{segmentIndex:-1,segmentOffset:new I.E9(-10,6),segmentOrientation:I.rU.OrientPlus90,alignmentFocus:I.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new I.KX("fill","color"),new I.KX("visible","dir",(function(e){return e>=1})),new I.KX("width","thickness",(function(e){return 7+3*e})),new I.KX("height","thickness",(function(e){return 7+3*e})),new I.KX("segmentOffset","thickness",(function(e){return new I.E9(-15,4+1.5*e)}))),e(I.bn,{segmentIndex:0,segmentOffset:new I.E9(15,-6),segmentOrientation:I.rU.OrientMinus90,alignmentFocus:I.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new I.KX("fill","color"),new I.KX("visible","dir",(function(e){return 2===e})),new I.KX("width","thickness",(function(e){return 7+3*e})),new I.KX("height","thickness",(function(e){return 7+3*e})),new I.KX("segmentOffset","thickness",(function(e){return new I.E9(-15,4+1.5*e)}))),e(I.al,{alignmentFocus:new I.z6(0,1,-4,0),editable:!0},new I.KX("text").makeTwoWay(),new I.KX("stroke","color"))),a.current.linkTemplate.selectionAdornmentTemplate=e(I.uz,e(I.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:F(2)},new I.KX("pathPattern","thickness",F)),v({alignmentFocus:new I.z6(0,0,-6,-4)})),a.current.linkTemplate.contextMenu=e("ContextMenu",_(),k(),e("ContextMenuButton",e(I.s_,"Horizontal",G(0),G(1),G(2))),e("ContextMenuButton",e(I.s_,"Horizontal",e(I.s_,"Spot",M(!1),z(I.z6.Top,!1),z(I.z6.Left,!1),z(I.z6.Right,!1),z(I.z6.Bottom,!1)),e(I.s_,"Spot",{margin:new I.Zt(0,0,0,2)},M(!0),z(I.z6.Top,!0),z(I.z6.Left,!0),z(I.z6.Right,!0),z(I.z6.Bottom,!0)))));var B=new I.YI(i.current,{maxSelectionCount:1,linkTemplate:e(I.rU,{locationSpot:I.z6.Center,selectionAdornmentTemplate:e(I.uz,"Link",{locationSpot:I.z6.Center},e(I.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(I.bn,{toArrow:"Standard",stroke:null}))},{routing:I.rU.AvoidsNodes,curve:I.rU.JumpOver,corner:5,toShortLength:4},new I.KX("points"),e(I.bn,{isPanelMain:!0,strokeWidth:2}),e(I.bn,{toArrow:"Standard",stroke:null})),model:new I.FJ([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(E()(I.bn.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))});a.current.addDiagramListener("TextEdited",(function(e){var t,n=e.subject.part,o=null===(t=document.activeElement)||void 0===t?void 0:t.value;"string"==typeof o&&""===o.trim()&&a.current.model.commit((function(e){e.set(n.data,"text","未命名"),a.current.commandHandler.stopCommand()}),"increment")})),B.nodeTemplate=e(I.NB,"Auto",{locationSpot:I.z6.Center},new I.KX("location","location",I.E9.parse).makeTwoWay(I.E9.stringify),e(I.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 I.KX("stroke").makeTwoWay(),new I.KX("fill").makeTwoWay(),new I.KX("figure")),e(I.al,{margin:new I.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new I.$u(16,16),maxSize:new I.$u(10,NaN),textAlign:"center",editable:!0},new I.KX("key").makeTwoWay())),setTimeout((function(){a.current.grid=e(I.s_,"Grid",e(I.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(I.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),a.current.grid.visible=!0,a.current.grid.gridCellStroke="darkgray",a.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=a.current,a.current}()}),500),c(m+1),function(){a.current=null}}),[]),(0,u.jsx)("div",{ref:d,className:r.current?"".concat(U," body-overflow-initial"):"body-overflow-initial",children:(0,u.jsx)(F.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!m,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:(0,u.jsxs)(G.Z,{children:[(0,u.jsx)(H.Z,{flex:1,children:"插入流程图"}),(0,u.jsx)(H.Z,{onClick:function(){var e=a.current.selection.first();if(r.current=!r.current,document.activeElement&&e){var t,n=null===(t=document.activeElement)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.trim();"string"==typeof n&&a.current.model.commit((function(t){t.set(e.data,"text",n||"未命名"),a.current.commandHandler.stopCommand()}),"increment")}c(m+1)},children:(0,u.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:t,children:(0,u.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Y,children:[(0,u.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,u.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,u.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,u.jsx)("div",{style:{height:"calc(100% - 50px)"},className:W,ref:i})]}),(0,u.jsx)("div",{style:{flex:1,position:"relative"},children:(0,u.jsx)("div",{ref:o,style:{height:"80vh"}})})]}),(0,u.jsx)("div",{className:"tr",children:(0,u.jsx)(_.ZP,{size:"large",onClick:S,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},K=n(5112),X=n(88897),V=K.ZP.Group,Q={margin:"0 8px"},J=function(e){var t=e.callback,n=e.onCancel;return(0,u.jsxs)(L.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)},children:[(0,u.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,u.jsx)("span",{style:Q,children:"单元格数:"}),(0,u.jsx)("span",{style:Q,children:"行数"}),(0,u.jsx)(L.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,u.jsx)(X.Z,{})}),(0,u.jsx)("span",{style:Q,children:"列数"}),(0,u.jsx)(L.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,u.jsx)(X.Z,{})})]}),(0,u.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,u.jsx)("span",{style:Q,children:"对齐方式:"}),(0,u.jsx)(L.Z.Item,{name:"align",children:(0,u.jsxs)(V,{children:[(0,u.jsx)(K.ZP,{value:"default",children:(0,u.jsx)("i",{className:"fa fa-align-justify"})}),(0,u.jsx)(K.ZP,{value:"left",children:(0,u.jsx)("i",{className:"fa fa-align-left"})}),(0,u.jsx)(K.ZP,{value:"center",children:(0,u.jsx)("i",{className:"fa fa-align-center"})}),(0,u.jsx)(K.ZP,{value:"right",children:(0,u.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,u.jsxs)("div",{className:"flex-container flex-end",children:[(0,u.jsx)(_.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,u.jsx)(_.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},$=n(78673),ee=n(47503),te=n.n(ee),ne=(0,s.forwardRef)((function(e,t){var n=e.use3d,a=e.width,o=e.height,i=e.callback,r=(e.showSaveButton,(0,s.useRef)()),d=(0,s.useRef)(),l=(0,s.useState)(!1),h=g()(l,2),m=h[0],c=h[1],S=(0,s.useRef)({id:r,appName:"graphing",width:a||1e3,height:o||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,s.useEffect)((function(){d.current=new(te())(S.current,!0),window.onload=function(){d.current.inject("applet_container")}}),[]);var P=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return i&&i(e),e};return(0,s.useEffect)((function(){S.current.appName=m?"3D":"graphing",d.current.inject("applet_container")}),[m]),(0,s.useEffect)((function(){c(n)}),[n]),(0,s.useImperativeHandle)(t,(function(){return{getImgData:P}})),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:r}),(0,u.jsxs)(G.Z,{align:"middle",children:[(0,u.jsx)(H.Z,{flex:1,children:(0,u.jsx)($.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:m,onChange:function(e){return c(e)}})}),(0,u.jsx)(H.Z,{children:(0,u.jsx)(_.ZP,{size:"large",onClick:P,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),ae=n(46246),oe=n(8591),ie="link",ge="upload-image",re="add-flowchart",de="draw-image",se="code-block",le="add-table",he="------------",me={default:he,left:":".concat(he),center:":".concat(he,":"),right:"".concat(he,":")},ce=n(4027);var ue="@▁▁@",Se=["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 Pe(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var we=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",pe=d()(d()({},we+"-B","bold"),we+"-I","italic"),fe=d()(d()(d()(d()(d()(d()(d()(d()({},ie,"添加链接"),se,"添加代码块"),ge,"添加图片"),de,"添加画图"),re,"插入流程图"),le,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),ve=function(e){var t=e.defaultValue,n=void 0===t?"":t,a=e.onChange,i=e.width,r=void 0===i?"100%":i,l=e.height,P=void 0===l?400:l,w=e.miniToolbar,p=void 0!==w&&w,f=e.isFocus,L=void 0!==f&&f,x=e.watch,_=e.insertTemp,b=e.mode,G=void 0===b?"markdown":b,M=e.id,B=void 0===M?"markdown-editor-id":M,T=e.showResizeBar,C=void 0!==T&&T,A=e.noStorage,Z=void 0!==A&&A,E=e.showNullButton,I=void 0!==E&&E,O=e.showNullProgramButton,D=void 0!==O&&O,H=e.hidetoolBar,R=void 0!==H&&H,W=e.fullScreen,Y=void 0!==W&&W,U=e.onBlur,K=e.onCMBeforeChange,X=e.onFullScreen,V=e.className,Q=void 0===V?"":V,$=e.disablePaste,ee=void 0!==$&&$,te=e.disabled,he=void 0!==te&&te,we=e.disabledFill,ve=void 0!==we&&we,ye=e.placeholder,Le=void 0===ye?"":ye,xe=e.values,_e=void 0===xe?"":xe,be=e.extraUse,je=(0,s.useState)(null),ke=g()(je,2),Ne=ke[0],Fe=ke[1],Ge=(0,s.useState)(n),Me=g()(Ge,2),ze=Me[0],Be=Me[1],Te=(0,s.useState)(x),Ce=g()(Te,2),Ae=Ce[0],Ze=Ce[1],Ee=(0,s.useState)(Y),Ie=g()(Ee,2),Oe=Ie[0],De=Ie[1],He=(0,s.useState)(""),Re=g()(He,2),We=Re[0],Ye=Re[1],Ue=(0,s.useState)(0),qe=g()(Ue,2),Ke=qe[0],Xe=qe[1],Ve=(0,s.useState)(P),Qe=g()(Ve,2),Je=Qe[0],$e=Qe[1],et=(0,s.useState)(!1),tt=g()(et,2),nt=(tt[0],tt[1]),at=(0,s.useState)(0),ot=g()(at,2),it=ot[0],gt=ot[1],rt=(0,s.useState)(0),dt=g()(rt,2),st=dt[0],lt=dt[1],ht=(0,s.useRef)(),mt=(0,s.useRef)(),ct=(0,s.useRef)(),ut=(0,s.useRef)();(0,s.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Be(_e),null==Ne||Ne.setValue(_e),window.scrollTo(0,e)}),[_e]),(0,s.useEffect)((function(){null==X||X(Oe)}),[Oe]),(0,s.useEffect)((function(){if(ht.current){var e=function(e,n){if(!ee){var a=n.clipboardData;if(a){var o=a.types.toString(),i=a.items;if("Files"===o||a.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==G)return;try{var g,r=i[1];"file"===(null===(g=i[0])||void 0===g?void 0:g.kind)&&(r=i[0]);var d=r.getAsFile(),s=d.name.split(".").pop();(0,N.I)(d,(function(e){var n,a,o;e.id?(null==d||null===(n=d.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection(".concat(e.content_type,")")):(null==d||null===(a=d.type)||void 0===a?void 0:a.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="/api/attachments/'.concat(e.id,'"></video>')):(null==d||null===(o=d.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,"?type=").concat(d.type,'&disposition=inline" target="_blank">').concat(d.name,"</a>")):Se.includes(s)?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(d.name,"</a>")):t.replaceSelection("[".concat(d.name,"](/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){oe.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},t=h().fromTextArea(ht.current,{mode:G,lineNumbers:!p,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("keyup",(function(e,n){8===n.keyCode&&(""==e.getValue()?t.setOption("placeholder",Le):t.setOption("placeholder",null))})),t.on("keydown",(function(e,t){if(8===t.keyCode){var n=function(e,t){var n=e.getDoc(),a=n.getCursor(),o=n.getLine(a.line),i=o.charAt(a.ch-1),g=o.lastIndexOf("@▁@",a.ch),r=o.lastIndexOf("@▁▁@",a.ch),d=g>r?g:r,s=g>r?3:4;if(-1===ue.indexOf(i))return null;if(console.log("change1:",t,e,o,a,d,g,r,i),d>=0&&a.ch-d<5){var l=d+s;return n.replaceRange("",{line:a.line,ch:d},{line:a.line,ch:l}),{line:a.line,ch:l}}return null}(e);n&&t.preventDefault()}})),L&&t.focus(),t.on("paste",e),he&&t.on("beforeChange",(function(e,t){"paste"!==t.origin&&"+input"!==t.origin||t.cancel()})),Fe(t),function(){t.off("paste",e)}}}),[]);var St=(0,s.useCallback)((function(){mt.current}),[Je,mt,Oe]);(0,s.useEffect)((function(){if(Ne){var e=function(){var e=new m.Z((function(e){var t,n=o()(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;(a.target.offsetHeight>0||a.target.offsetWidth>0)&&(St(),Ne.setSize("100%","100%"),Ne.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(ht.current.parentElement),e}();return function(){var t,n;null!==(t=ht.current)&&void 0!==t&&t.parentElement&&e.unobserve(null===(n=ht.current)||void 0===n?void 0:n.parentElement)}}}),[Ne,St]),(0,s.useEffect)((function(){if(Ne){for(var e=[],t=function(){var t=g()(a[n],2),o=t[0],i=t[1],r=d()({},o,(function(){Pt(i)}));e.push(r),Ne.addKeyMap(r)},n=0,a=Object.entries(pe);n<a.length;n++)t();return function(){for(var t=0,n=e;t<n.length;t++){var a=n[t];Ne.removeKeyMap(a)}}}}),[Ne]),(0,s.useEffect)((function(){Y!==Oe&&De(Y)}),[Y]),(0,ce.Z)((function(){if(!Z&&Ke>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(B);e>=Ke+1e4&&(!t||t!==ze)&&(window.sessionStorage.setItem(B,ze),nt(!0))}}),1e4),(0,s.useEffect)((function(){Ze(x)}),[Ne,x]),(0,s.useEffect)((function(){Ne&&L&&Ne.focus()}),[Ne,L]),(0,s.useEffect)((function(){if(Ae&&Ne){var e=function(e){var t=e.target;if(ut.current){var n=t.scrollTop/t.scrollHeight;ut.current.scrollTop=ut.current.scrollHeight*n}},t=Ne.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[Ne,Ae]),(0,s.useEffect)((function(){if(Ne&&K){var e=function(e,t){K(e,t)};return Ne.on("beforeChange",e),function(){Ne.off("beforeChange",e)}}}),[Ne,K]),(0,s.useEffect)((function(){if(Ne&&U){var e=function(){U(Ne.getValue())};return Ne.on("blur",e),function(){Ne.off("blur",e)}}}),[Ne,U]),(0,s.useEffect)((function(){if(Ne){var e=function(e,t){var n=e.getValue();Be(n),Xe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),a&&(D?a(n,yt(n)):a(n))};return Ne.on("change",e),function(){Ne.off("change",e)}}}),[Ne,a]),(0,s.useEffect)((function(){if(Ne)if(null==n)Ne.setValue(""),Be("");else{var e=window.scrollY||window.pageYOffset;n!==Ne.getValue()&&(Ne.setValue(n),Be(n),Ne.setCursor(he?1:Ne.lineCount(),0),window.scrollTo(0,e))}}),[Ne,n]);var Pt=(0,s.useCallback)((function(e){var t=Ne.getCursor(),n=Ne.getSelection(),a=n.split("\n");switch(e){case"bold":return Ne.replaceSelection("**"+n+"**"),""===n&&Ne.setCursor(t.line,t.ch+2),Ne.focus();case"italic":return Ne.replaceSelection("*"+n+"*"),""===n&&Ne.setCursor(t.line,t.ch+1),Ne.focus();case"code":return Ne.replaceSelection("`"+n+"`"),""===n&&Ne.setCursor(t.line,t.ch+1),Ne.focus();case"inline-latex":return Ye("inline-latex"),Ne.focus();case"latex":return Ne.replaceSelection("```latex\n"+n+"\n```"),Ne.setCursor(t.line+1,n.length+1),Ne.focus();case"line-break":return Ne.replaceSelection("<br/>\n"),Ne.focus();case"list-ul":return""===n?Ne.replaceSelection("- "+n):Ne.replaceSelection(a.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Ne.focus();case"list-ol":return""===n?Ne.replaceSelection("1. "+n):Ne.replaceSelection(a.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),Ne.focus();case"add-null-ch":return""===n&&Ne.setCursor(t.line,t.ch),Ne.replaceSelection("▁"),Ne.focus();case"add-signal":return""===n&&Ne.setCursor(t.line,t.ch),Ne.replaceSelection("@▁@"),Ne.focus();case"add-multiple":return""===n&&Ne.setCursor(t.line,t.ch),Ne.replaceSelection(ue),Ne.focus();case"inster-template-1":return""===n&&Ne.setCursor(t.line,t.ch),Ne.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),Ne.focus();case"eraser":return Ne.setValue(""),Ne.focus();case"trigger-watch":return Ze(!Ae),Ne.focus();case"trigger-full-screen":return De(!Oe),Ne.focus();case ie:return void Ye(ie);case se:return void Ye(se);case ge:return void Ye(ge);case de:return void Ye(de);case"maths-latex":return void Ye("maths-latex");case re:return void Ye(re);case le:return void Ye(le);default:throw new Error}}),[Ne,Ae,Oe]),wt=(0,s.useCallback)((function(e,t){var n,a,o,i,g;switch(Ye(""),We){case ie:var r=e.title,d=e.link;return Ne.replaceSelection("[".concat(r,"](").concat(d,")")),Ne.focus();case se:var s=e.language,l=e.content;return Ne.replaceSelection(["```"+s,l,"```"].join("\n")),Ne.focus();case"maths-latex":for(var h=atob(e),m=new Uint8Array(h.length),c=0;c<h.length;c++)m[c]=h.charCodeAt(c);var u=new Blob([m],{type:"image/png"});(0,N.I)(u,(function(e){e.id?Ne.replaceSelection(".concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":Ne.replaceSelection("`$$"+e+"$$`");break;case ge:case de:case"add-flowchart":var S=e.src,P=e.alt,w=t,p=null==w||null===(n=w.name)||void 0===n||null===(n=n.split("."))||void 0===n||null===(a=n.pop)||void 0===a?void 0:a.call(n);return(null==w||null===(o=w.type)||void 0===o?void 0:o.indexOf("image"))>-1||null==w||!w.type?P?Ne.replaceSelection(".concat(S,' "').concat(P,'" )')):Ne.replaceSelection("")):(null==w||null===(i=w.type)||void 0===i?void 0:i.indexOf("video"))>-1?Ne.replaceSelection('<video width="100%" controls src="'.concat(S,'"></video>')):(null==w||null===(g=w.type)||void 0===g?void 0:g.indexOf("pdf"))>-1?Ne.replaceSelection('<a href="'.concat(S,"?type=").concat(w.type,'&disposition=inline" target="_blank">').concat(w.name,"</a>")):Se.includes(p)?Ne.replaceSelection('<a href="'.concat(S,'?type=office&disposition=inline" target="_blank">').concat(w.name,"</a>")):Ne.replaceSelection("[".concat(w.name,"](").concat(S,")")),Ne.focus();case le:for(var f=e.row,v=e.col,y=e.align,L="\n",x=0;x<f;x++){for(var _=[],b=[],j=0;j<v;j++)1===x&&b.push(me[y]),_.push(" ");1===x&&(L+="| ".concat(b.join(" | ")," |\n")),L+="| ".concat(_.join(1===v?"":" | ")," |\n")}return Ne.replaceSelection(L+"\n"),Ne.focus();default:throw new Error}}),[Ne,We]),pt=(0,s.useMemo)((function(){switch(We){case ie:return(0,u.jsx)(j,{callback:wt,onCancel:ft});case se:return(0,u.jsx)(k.Z,{callback:wt,onCancel:ft});case ge:return(0,u.jsx)(N.Z,{callback:wt,onCancel:ft});case re:return(0,u.jsx)(q,{callback:wt,onCancel:ft});case le:return(0,u.jsx)(J,{callback:wt,onCancel:ft});case"maths-latex":return(0,u.jsx)(ne,{showSaveButton:!0,callback:wt});case"inline-latex":return(0,u.jsx)(ae.Z,{showSaveButton:!0,callback:wt});default:return null}}),[We]);function ft(){Ye("")}(0,s.useEffect)((function(){if(ct.current){var e=function(e){o=!0,i=e.pageY},t=function(){o=!1},n=function(e){if(o){var t=e.pageY-i;t<0&&(t=0),t>300&&(t=300),$e(P+t+"px")}},a=ct.current,o=!1,i=0;return a.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){a.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[Ne,ct]),(0,s.useEffect)((function(){$e(P)}),[P]);var vt={width:Pe(r),height:Pe(Je)},yt=((0,s.useMemo)((function(){if(Ke){var e=new Date(Ke),t=e.getHours(),n=e.getMinutes(),a=e.getSeconds();return n=n<10?"0"+n:n,a=a<10?"0"+a:a,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(a)}return 0}),[Ke]),function(e){var t=[];if(D){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,n,a){t.push({multiLine:!("@▁@"===e)})}))}return t});(0,s.useEffect)((function(){fe[We]&&We!==de&&We!==re&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],t=window.innerWidth/2-e.offsetWidth/2,n=window.innerHeight/2-e.offsetHeight/2;gt(t),lt(n)}),0)}),[We]);var Lt=function(e,t,n,a){var o=document.body.clientHeight,i=document.body.clientWidth;return!(e<20&&n>e||e>i-20&&n<e||t<20&&a>t||t>o-20&&a<t)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,u.jsxs)(s.Fragment,{children:[(0,u.jsx)("div",{className:"markdown-editor-wrapper",ref:mt,children:(0,u.jsxs)("div",{className:"markdown-editor-container ".concat(Q," ").concat(Ae?"on-preview":""," ").concat(p?"mini":""," ").concat(Oe?"full-screen":""),style:vt,children:[(0,u.jsx)(v,{insertTemp:_,watch:Ae,fullScreen:Oe,showNullButton:I,showNullProgramButton:D,onActionCallback:Pt,hidetoolBar:R,extraUse:be}),(0,u.jsxs)("div",{className:"markdown-editor-body",children:[(0,u.jsx)("div",{className:"codemirror-container",children:(0,u.jsx)("textarea",{ref:ht,placeholder:Le})}),Ae?(0,u.jsxs)("div",{ref:ut,className:"preview-container",children:["stex"===G&&(0,u.jsx)(S,{value:ze}),"stex"!==G&&(0,u.jsx)(c.Z,{disabledFill:ve,showProgramFill:D,value:ze})]}):null]})]})}),C?(0,u.jsx)("a",{ref:ct,className:"editor-resize"}):null,We===de&&(0,u.jsx)(z,{callback:wt,onCancel:ft}),We===re&&(0,u.jsx)(q,{callback:wt,onCancel:ft}),(0,u.jsx)(y.Z,{children:fe[We]&&We!==de&&We!==re?(0,u.jsx)(F.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:it,top:st},title:(0,u.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var t=e.clientX-it,n=e.clientY-st;document.body.onmousemove=function(e){var a=e.clientX-t,o=e.clientY-n,i=document.getElementsByClassName("markdown-popup-form")[0],g=window.innerWidth-i.offsetWidth,r=window.innerHeight-i.offsetHeight;a=Math.max(0,Math.min(a,g)),o=Math.max(0,Math.min(o,r)),Lt(e.clientX,e.clientY,t,n)&&(gt(a),lt(o))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:fe[We]}),open:!0,onCancel:ft,footer:null,destroyOnClose:!0,width:We===re?"1200px":null,height:We===re?"80vh":null,className:"markdown-popup-form",children:pt}):null})]})}},48347:function(e,t,n){"use strict";n.d(t,{Z:function(){return w},I:function(){return f}});var a=n(82242),o=n.n(a),i=n(79800),g=n.n(i),r=n(78241),d=n(8591),s=n(92832),l=n(3113),h=n(37318),m=n(59301),c=n(37712),u=r.Z.useForm,S={width:280,marginRight:10},P={labelCol:{span:5},wrapperCol:{span:19}},w=function(e){var t=e.callback,n=e.onCancel,a=u(),i=g()(a,1)[0],h=(0,m.useRef)();function w(e,t){-1!==e.status?i.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type}):d.ZP.error(e.message)}return(0,c.jsxs)(r.Z,o()(o()({form:i},P),{},{className:"upload-image-panel",onFinish:function(e){t(e,h.current)},style:{width:470,overflow:"hidden"},children:[(0,c.jsx)(r.Z.Item,{label:"图片地址",required:!0,children:(0,c.jsxs)("div",{className:"flex-container",children:[(0,c.jsx)(r.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,c.jsx)(s.Z,{style:S})}),(0,c.jsx)(p,{onFileChange:function(e){var t=e.target.files[0];h.current=t,f(t,w)}})]})}),(0,c.jsx)(r.Z.Item,{label:"图片描述",name:"alt",children:(0,c.jsx)(s.Z,{style:{width:264}})}),(0,c.jsxs)(r.Z.Item,{style:{textAlign:"right"},children:[(0,c.jsx)(l.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,c.jsx)(l.ZP,{type:"default",onClick:n,children:"取消"})]})]}))};function p(e){var t=e.onFileChange;return(0,c.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,c.jsx)("input",{type:"file",onChange:t})]})}function f(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var a=new window.XMLHttpRequest;a.withCredentials=!0,a.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),a.addEventListener("error",(function(e){console.error(e)}),!1),a.open("POST","".concat(h.KI,"/api/attachments.json")),a.send(n)}},32552:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(82100),o=n.n(a),i=n(29186),g=n.n(i),r=n(80619),d=n.n(r),s=n(47074),l=n.n(s),h=n(59301),m=n(4676),c=function(e){d()(n,e);var t=l()(n);function n(e){var a;o()(this,n),a=t.call(this,e);var i=window.document;return a.node=i.createElement("div"),i.body.appendChild(a.node),a}return g()(n,[{key:"render",value:function(){var e=this.props.children;return(0,m.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(h.Component)},4027:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var a=n(59301);function o(e,t){var n=(0,a.useRef)();(0,a.useEffect)((function(){n.current=e})),(0,a.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},2755:function(e,t,n){"use strict";n.d(t,{Z:function(){return z}});var a=n(7557),o=n.n(a),i=n(41498),g=n.n(i),r=n(79800),d=n.n(r),s=n(82242),l=n.n(s),h=n(59301),m=n(5112),c=n(3113),u=n(8591),S=n(43418),P=n(88897),w=n(95237),p=n(43604),f=n(28103),v=n(31775),y="title___dVHM9",L=n(64118),x=n(24334),_=n(82710),b=n(79265),j=n(54065),k=n(4900),N=n(80205),F=n(72295),G=n(37712),M={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var z=function(e){var t=e.language,n=e.dispatch,a=e.shixunWorkReport,i=e.v,r=e.languages,s=e.classroomList,z=e.autoHeight,B=(e.diff_code_count,e.data,(0,h.useState)(null==r?void 0:r[0])),T=d()(B,2),C=T[0],A=T[1],Z=(0,b.useParams)();return(0,h.useEffect)((function(){A(null==r?void 0:r[0])}),[]),(0,h.useEffect)((function(){var e;A(null==r||null===(e=r.filter((function(e){return e.language===(null==C?void 0:C.language)})))||void 0===e?void 0:e[0])}),[r]),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("h2",{children:[" ",(0,G.jsxs)("span",{children:[i.is_finish?(0,G.jsxs)("span",{children:["最后通关代码",(0,G.jsx)("span",{className:"ml5 font12 c-grey-999",children:"通过了本题,在作业时间内最后一次提交的通关代码"})]}):(0,G.jsxs)("span",{children:["最新代码",(0,G.jsx)("span",{className:"ml5 font12 c-grey-999",children:"未通过本题,展示最新编写的代码详情"})]}),(null==r?void 0:r.length)>1&&(0,G.jsx)(m.ZP.Group,{defaultValue:t,style:{marginLeft:10},onChange:function(e){var t;i.language=e.target.value,A(null==r||null===(t=r.filter((function(t){return t.language===e.target.value})))||void 0===t?void 0:t[0])},children:null==r?void 0:r.map((function(e){return(0,G.jsx)(m.ZP,{value:null==e?void 0:e.language,children:null==e?void 0:e.language})}))})]}),(0,L.GJ)()&&"shixunWorkReport"!=a&&(0,G.jsxs)("span",{children:[(0,G.jsxs)("span",{children:["得分 ",null==C?void 0:C.score,"/",null==C?void 0:C.total_score]}),(0,G.jsx)(c.ZP,{style:{margin:"0px 10px"},onClick:function(){var e;if(null!==(e=s.AssistantObject)&&void 0!==e&&null!==(e=e.hack)&&void 0!==e&&e.can_appraise||!(0,L.Rm)()){var t,a=null==C?void 0:C.score;S.Z.confirm({title:"调分",content:(0,G.jsxs)("div",{children:[(0,G.jsxs)("p",{children:["得分:",null==C?void 0:C.score,"/",null==C?void 0:C.total_score]}),(0,G.jsxs)("p",{children:["调分:",(0,G.jsx)(P.Z,{min:0,max:null==C?void 0:C.total_score,defaultValue:null==C?void 0:C.score,onChange:function(e){a=e}})]})]}),okText:"确认",onOk:(t=g()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.ZP)("/api/courses/".concat(null==Z?void 0:Z.coursesId,"/homework_commons/update_hack_score"),{method:"put",body:{course_id:null==Z?void 0:Z.coursesId,hack_user_code_id:null==C?void 0:C.hack_user_id,score:a}});case 2:0===e.sent.status&&(u.ZP.success("调分成功"),n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getShixunWorkReports",payload:l()({},Z)}));case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)}),cancelText:"取消"})}else u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},type:"primary",children:"调分"}),(0,L.GJ)()&&"shixunWorkReport"!=a&&(0,G.jsx)(c.ZP,{onClick:function(){var e;null!==(e=s.AssistantObject.hack)&&void 0!==e&&e.can_appraise||!(0,L.Rm)()?n({type:"shixunHomeworks/setActionTabs",payload:{key:"更改点评",selectArrs:{myshixun_identifier:a.user_id,type:"1",language:null==C?void 0:C.language,v:i,data:l()({},a)}}}):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"点评代码"})]})]}),(0,G.jsx)(v.ZP,{height:300,language:null==C?void 0:C.language,value:null!=C&&C.code?x.Base64.decode(null==C?void 0:C.code):"",autoHeight:z,theme:"default",options:M}),((null==C?void 0:C.comment)||(null==C?void 0:C.hidden_comment))&&(0,G.jsxs)("div",{children:[(0,G.jsxs)(w.Z,{align:"middle",style:{borderTop:"1px solid #eee"},children:[(0,G.jsx)(p.Z,{flex:1,children:(0,G.jsx)("h1",{className:y,children:"点评内容"})}),(0,G.jsx)(p.Z,{className:"pr30",children:(0,L.GJ)()&&(0,G.jsxs)(c.ZP,{onClick:g()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:S.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:(0,G.jsx)(N.Z,{}),content:"是否确认删除?",onOk:function(){return g()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.gZ)({comment_id:null==C?void 0:C.comment_id,homeworkId:Z.homeworkId,type:"hack"});case 2:0===e.sent.status&&(u.ZP.success("删除成功"),n({type:"shixunHomeworks/getShixunWorkReports",payload:l()({},Z)}));case 4:case"end":return e.stop()}}),e)})))()}});case 1:case"end":return e.stop()}}),e)}))),children:[(0,G.jsx)(F.Z,{}),"删除"]})})]}),(0,G.jsx)(f.Z,{style:{margin:0}}),(null==C?void 0:C.comment)&&(0,G.jsxs)("aside",{className:"pl30 pr30 mt20",children:[(0,G.jsx)("span",{className:"c-light-black font12",children:"# 学生和课堂老师可见"}),(0,G.jsx)("br",{}),(0,G.jsx)(j.Z,{value:null==C?void 0:C.comment})]}),(null==C?void 0:C.hidden_comment)&&(0,G.jsxs)("aside",{className:"pl30 pr30 mt20",children:[(0,G.jsx)("span",{className:"c-light-black font12",children:"# 仅课堂老师可见"}),(0,G.jsx)("br",{}),(0,G.jsx)(j.Z,{value:null==C?void 0:C.hidden_comment})]})]})]})}},837:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return k}});var a=n(7557),o=n.n(a),i=n(41498),g=n.n(i),r=n(82242),d=n.n(r),s=n(79800),l=n.n(s),h=n(59301),m=n(79265),c=n(99313),u=n(3113),S=n(25700),P=n(64118),w=n(82710),p=n(63017),f=n(53502),v=n(91232),y=n.n(v),L=n(28103),x=n(54065),_=n(69423),b=n(37712),j=(0,m.connect)((function(e){return{user:e.user}}))((function(e){e.user;var t,n=e.item,a=e.getdata,i=e.params,r=(0,h.useRef)(),d=(0,h.useState)(),s=l()(d,2),c=s[0],u=s[1],S=(0,h.useState)(!0),p=l()(S,2),v=p[0],j=p[1];return(0,h.useEffect)((function(){if(r.current){var e=function(){var e,t=new ResizeObserver((function(e){var t,n=y()(e);try{for(n.s();!(t=n.n()).done;){var a=t.value;console.log("----",a,e),u(a.target.offsetHeight>=52)}}catch(e){n.e(e)}finally{n.f()}}));return t.observe(null===(e=r.current)||void 0===e?void 0:e.firstElementChild),t}();return function(){var t,n;(null===(t=r.current)||void 0===t?void 0:t.firstElementChild)&&e.unobserve(null===(n=r.current)||void 0===n?void 0:n.firstElementChild)}}}),[r.current]),(0,b.jsxs)("div",{onClick:function(){m.history.push("/classrooms/".concat(i.coursesId,"/program_homework/").concat(i.categoryId,"/answer/").concat(n.id,"/detail"))},style:{padding:"0px 20px",cursor:"pointer"},children:[(0,b.jsx)("div",{className:f.Z.titles,style:{fontWeight:600,fontSize:18,color:"#000000"},children:n.name}),(0,b.jsxs)("div",{style:{display:"flex",marginTop:10},children:[(0,b.jsxs)("div",{style:{flex:1,display:"flex",alignItems:"center",color:"#5F6368"},children:[(0,b.jsx)("img",{style:{width:24,borderRadius:50},src:"".concat(_.Z.IMG_SERVER,"/images/").concat(n.author.image_url)}),(0,b.jsx)("span",{style:{margin:"0px 12px 0px 8px"},children:null==n||null===(t=n.author)||void 0===t?void 0:t.name}),(0,b.jsxs)("span",{children:["发表于",n.created_at]})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("span",{style:{color:"#5F6368",cursor:"pointer"},onClick:function(){},children:["回复(",(null==n?void 0:n.descendants_count)||0,")"]}),(0,P.eB)()&&(0,b.jsx)("span",{onClick:function(){var e=g()(o()().mark((function e(t){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),e.next=3,(0,w.ZP)("/api/hack_messages/".concat(n.id,"/update_public"),{method:"post"});case 3:0===e.sent.status&&a();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),style:{color:"#44D7B6",cursor:"pointer",marginLeft:20},children:n.is_public?"取消公开":"公开"})]})]}),(0,b.jsx)("div",{ref:r,style:{margin:"15px 0px",maxHeight:v?52:"",overflow:"hidden"},children:(0,b.jsx)(x.Z,{style:{color:"#434D6C",fontSize:14},value:n.content})}),(null==n?void 0:n.hack_identifier)&&(0,b.jsx)("span",{onClick:function(){var e=g()(o()().mark((function e(t){var a,g;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),!(0,P.dE)()){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,(0,w.ZP)("/api/problems/".concat(null==n?void 0:n.hack_identifier,"/start.json"),{method:"get",params:{hack_user_id:null==n||null===(a=n.author)||void 0===a?void 0:a.id}});case 5:(g=e.sent)&&(window.open("/myproblems/".concat(null==g?void 0:g.identifier,"?type=1")),localStorage.setItem("program_homework",[i.coursesId,i.categoryId]));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),className:f.Z.tips,children:null==n?void 0:n.hack_name}),c&&(0,b.jsx)("div",{onClick:function(e){e.stopPropagation(),j(!v)},children:(0,b.jsx)(L.Z,{dashed:!1,className:"",style:{cursor:"pointer"},children:(0,b.jsxs)("a",{className:"font14 ".concat(f.Z.color999),children:[v?"阅读全文 ":"收起全文 ",(0,b.jsx)("i",{className:"iconfont font14 ".concat(v?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})]})})})]})})),k=(0,m.connect)((function(e){return{user:e.user}}))((function(e){var t,n,a,i,r=e.user,s=(0,h.useState)(d()(d()({},(0,m.useParams)()),{},{page:1,per_page:10,type:1,sort_by:"",course_group:(0,P.dE)()?[r.userInfo.course.course_group_id]:[]})),v=l()(s,2),y=v[0],L=v[1],x=(0,h.useState)([]),_=l()(x,2),k=_[0],N=_[1];function F(){return G.apply(this,arguments)}function G(){return(G=g()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.ZP)("/api/homework_commons/".concat(y.categoryId,"/hack_messages"),{method:"get",params:d()(d()({},y),{},{type:1})});case 2:t=e.sent,N(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,h.useEffect)((function(){F()}),[]),(0,b.jsx)("div",{style:{width:1200,margin:"0px auto"},children:(0,b.jsxs)("div",{style:{marginTop:10,display:"flex"},children:[(0,b.jsxs)("div",{style:{flex:1,marginRight:30,background:"#fff"},children:[(0,b.jsxs)(c.Z,{tabBarStyle:{padding:"0px 10px"},style:{width:"850px"},tabBarExtraContent:(0,P.dE)()&&(0,b.jsx)(u.ZP,{type:"primary",style:{width:88},onClick:function(){m.history.push("/classrooms/".concat(y.coursesId,"/program_homework/").concat(y.categoryId,"/answer/add"))},children:"发表答疑 "}),onChange:function(e){y.sort_by="1"===e?"":"created_at",L(d()({},y)),F()},children:[(0,b.jsx)(c.Z.TabPane,{tab:"最新回复"},"1"),(0,b.jsx)(c.Z.TabPane,{tab:"最新发表"},"2")]}),(null==k||null===(t=k.data)||void 0===t?void 0:t.length)<=0&&(0,b.jsx)(p.Z,{customText:"暂无讨论"}),null==k||null===(n=k.data)||void 0===n?void 0:n.map((function(e){return(0,b.jsx)(j,{item:e,params:y,getdata:F})})),(0,b.jsx)("div",{style:{width:"100%",textAlign:"center",marginTop:10},children:(0,b.jsx)(S.Z,{current:y.page,pageSize:y.per_page,total:null==k?void 0:k.count,hideOnSinglePage:!0,onChange:function(e,t){y.page=e,y.per_page=t,L(d()({},y)),F()}})})]}),(0,b.jsxs)("div",{className:f.Z.right,style:{width:300,height:"100%"},children:[(0,b.jsxs)("div",{style:{display:"flex"},children:[(0,b.jsxs)("div",{style:{flex:1,display:"flex",alignItems:"center"},children:[(0,b.jsx)("span",{style:{marginRight:3,fontSize:20,fontWeight:600,color:"#000"},children:"广播"}),(0,b.jsx)("img",{width:21,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAWCAYAAAAvg9c4AAAAAXNSR0IArs4c6QAABPdJREFUSEullWloHGUYx//vzO7sHDuzm93sZpM2l/SgRyK7xSYxrfYgbdUq6JcixXqAUrxItGAVMT1A+kH7Re1WWppa6afiAYJIi7ZB07vkIARzVJqYbJMmu90zszOzM6/MVEXQotR3mPky8/7e//N7ZuYl+J+jt7fX7/f7i/X19cU/UORemZRSZnBwsKNQKLztdrtHOI57sqGhYcbm3ROUUsoOD4++Mz9f2CtJItE0DaVSqTMWi+27Jyil1DM0NLTfsmgHpZbLhthQSmlfTU3NmkgkUvjPSSmlZGRkZI2maZ2mWdpAGBehpgnd0KBpOkzTLPn9/gei0Wjfv0JHR0cXGpq2xTDNHZTSJsu0OJNaIIRFUc07KXXdgGVZCAQCL7e0tMT/Br3ja3iRaZptlmU9YVHayhBGoAApGTpKhgHCsFCLRaRvp+yEtk9QaiEYDHy0cWPb639CbdjAwADP8/zRkmk9BYADIU4nLUqdycX5Agxdh4cXkLh5E8m5WTD2A4SAZVmEwxVnNm3a9AiJx+MrdSI8nslm25YtqlMaVi6LWab1+2IUFIB9NXQDuUwapmFAUnwYHBhAOp0Ex3nAcRx4QUA4FL62ecuWVnL01Om8V1YkXdewpMoLn6zYC4NhGLhcLng4t4OdnEognUqCIQSSJOPipYvI5gsQBBGyV4KiyAgFgz83NDauImevDtFUJo+ZqXGsW7UcvjK/zQDDEBBCHF+pZBKTU1NOl1mWgYfnMTNzy1FTWbUA6UzWuVce9N2QRKmRfP3d9zSRLOBS9xlsbVsLv893p2TLcjzqhgGtqEEvGWAI47izyx27ft2ppq6uHpIoIFcowqfIkz7Fu4LEjxyhVUtX4cuTn2FxdQiiKILYKe3DbpTtwu4Fw4Bzu8F5PGAZFqnbKWdhRVEQDkegm5YNnVhYFVlJ9uzbb2x++iXXxwf2o0Jxg+N5J4ENs/0RlgVLCFwuNyRJhCAITgX+sgCyubzjXZK88Hq9ttuRMr8SI2d+OHdCqFz8zMkjh1SeqqXy8qBsGIbj0rQs56UGpXCxLCRZhiLLmFdVyF4FmmFAUXzw+RRIogSvV+xdUFX5ILl07drBIh/quHD2bNeK+vLLum7ENXUe+Xweqqo6p6brMEsleDweJ1Eul0MgWA7Too6uYCAAryxDEvlzzU1NbeTClSsHDTHScaG7+/D6pmU9k2nt8/TU+NUl91UP53K5dblcrjKfzzOFQsFpmu01k8mgrCwAC4yjygZXVkYgy9LR1paWF0n3jz0fMMGaN8+f6z68oXnp+V/T1omRgd7ju9t3Pp9IJMTZ2dmHMpnMtnQ6/Wg2mw2pqkqy2SzcbjdcnAiOczuJIxUhVIRCu5qbV39Ivj19+oBSvfytyz/1HG5trLs4NU+O3xge6npj53Mv/PUHPj09HR4bG9s+NzfXnkymatSiCoEX4C8rA+fh4eE4GioPrI1Goz3k1Fdf7KlcEuvsu3z1mN9jjY3fSr/vgX5oV/trr/zTrtDf379wYmIinkqlHrMsi8iyDFnxQRCFsdrq6tW1tbW3yXt79z77y42J44KL5FPJOeJiXUb0/oYdu9/t/OZuW42tpa+v75iqqtvy+RwqwiEIvPjJw+vXv+q8011dXXx/f/9WWZaVQCBwE0Bfe3v7NCHE/rDuOmzw+Pj4p4lEYruLZWeqa2o2xmKxIXvCb487Tm3fsdeDAAAAAElFTkSuQmCC"})," "]}),(0,P.GJ)()&&(0,b.jsx)(u.ZP,{type:"primary",onClick:function(){m.history.push("/classrooms/".concat(y.coursesId,"/program_homework/").concat(y.categoryId,"/answer/add"))},children:"发布广播"})]}),(null==k||null===(a=k.radio_messages)||void 0===a?void 0:a.length)<=0&&(0,b.jsx)(p.Z,{}),null==k||null===(i=k.radio_messages)||void 0===i?void 0:i.map((function(e){return(0,b.jsxs)("div",{onClick:function(){m.history.push("/classrooms/".concat(y.coursesId,"/program_homework/").concat(y.categoryId,"/answer/").concat(e.id,"/detail"))},style:{marginTop:30,cursor:"pointer"},children:[(0,b.jsxs)("div",{className:f.Z.title,style:{fontSize:"16px",fontWeight:600},children:[(0,b.jsx)("span",{style:{color:2===(null==e?void 0:e.message_type)?"#4C7BE6":"#E17E7E"},children:2===(null==e?void 0:e.message_type)?"【题解】":"【通知】"}),(0,b.jsx)("span",{title:e.name,children:e.name})]}),(0,b.jsxs)("div",{style:{marginTop:15,color:"#5F6368"},children:["发表于",e.created_at]})]})}))]})]})})}))},24463:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ct}});var a=n(7557),o=n.n(a),i=n(41498),g=n.n(i),r=n(82242),d=n.n(r),s=n(79800),l=n.n(s),h=n(59301),m=n(82710),c=n(79265),u=n(8591),S=n(43418),P=n(3113),w=n(66104),p=n(6848),f=n(99313),v=n(2595),y=n(66720),L=n(95972),x=n(54065),_=n(37712),b=(0,c.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var t=e.shixunHomeworks,n=e.dispatch;(0,c.useParams)();return(0,_.jsx)(S.Z,{centered:!0,title:"提示",open:"删除"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:g()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"shixunHomeworks/deleteReply",payload:{object_id:t.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:0===e.sent.status&&(u.ZP.success("删除成功"),n({type:"shixunHomeworks/setActionTabs",payload:{}}),n({type:"shixunHomeworks/getReplyList",payload:d()({},t.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"shixunHomeworks/setActionTabs",payload:{}})},children:(0,_.jsx)("p",{children:"确定要删除该条回复吗?"})})})),j=n(61186),k=n.n(j),N=n(69423),F=n(71418),G=n(25700),M="bg___F3FV1",z="deseIconSty___gIJAj",B="buttonEdit____8SMk",T="md___cq_mx",C="maskWrap___bHoew",A="desHead___Njyrc",Z="mask___o8p8v",E="info___V66Uf",I="upDownSty___Q_kpi",O=n(64118),D=n(85654),H=n(44757),R=n(87954),W=n(18257),Y=n(21534),U=n(19719),q=n(35241),K=n(44589),X=n(88551),V=n(18290);k().locale("ZH-cn");var Q=["","简单","中等","困难"],J=h.createContext({}),$=function(){var e=(0,h.useContext)(J),t=e.setActivatorNodeRef,n=e.listeners;return(0,_.jsx)(P.ZP,d()({type:"text",size:"small",className:I,icon:(0,_.jsx)(p.Z,{title:"可鼠标拖拽进行试题排序,学生端将按照此排序展示",children:(0,_.jsx)(H.Z,{})}),style:{cursor:"move"},ref:t},n))},ee=function(e){var t=(0,U.nB)({id:e["data-row-key"]}),n=t.attributes,a=t.listeners,o=t.setNodeRef,i=t.setActivatorNodeRef,g=t.transform,r=t.transition,s=t.isDragging,l=d()(d()({},e.style),{},{transform:q.ux.Translate.toString(g),transition:r},s?{position:"relative",zIndex:100}:{}),m=(0,h.useMemo)((function(){return{setActivatorNodeRef:i,listeners:a}}),[i,a]);return(0,_.jsx)(J.Provider,{value:m,children:(0,_.jsx)("tr",d()(d()({},e),{},{ref:o,style:l},n))})},te=(0,c.connect)((function(e){var t=e.shixunHomeworks,n=e.classroomList,a=e.loading,o=e.user;return{shixunHomeworks:t,globalSetting:e.globalSetting,classroomList:n,user:o,loading:a.effects}}))((function(e){var t,n,a,i,r=e.shixunHomeworks,s=e.classroomList,w=(e.globalSetting,e.user,e.loading,e.dispatch,(0,h.useState)(d()(d()({},(0,c.useParams)()),{},{page:1,per_page:10}))),f=l()(w,2),y=f[0],L=f[1],j=(0,h.useState)([]),k=l()(j,2),q=k[0],J=k[1],te=(0,h.useState)(-1),ne=l()(te,2),ae=(ne[0],ne[1],(0,h.useState)("")),oe=l()(ae,2),ie=(oe[0],oe[1],(0,h.useState)("")),ge=l()(ie,2),re=(ge[0],ge[1],s.detailLeftMenus,(0,c.useLocation)(),(0,h.useState)({})),de=l()(re,2),se=(de[0],de[1],r.workDetail,r.workList),le=r.workSetting,he=(0,h.useState)("1"),me=l()(he,2),ce=me[0],ue=me[1],Se=(0,h.useState)(!1),Pe=l()(Se,2),we=Pe[0],pe=Pe[1],fe=(0,h.useState)(!1),ve=l()(fe,2),ye=ve[0],Le=ve[1],xe=(0,h.useState)(""),_e=l()(xe,2),be=_e[0],je=_e[1],ke=(0,h.useState)(1),Ne=l()(ke,2),Fe=Ne[0],Ge=Ne[1],Me=(0,h.useRef)(null),ze=(0,h.useState)(!1),Be=l()(ze,2),Te=Be[0],Ce=Be[1];function Ae(){return Ze.apply(this,arguments)}function Ze(){return(Ze=g()(o()().mark((function e(){var t,n,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return pe(!0),e.next=3,(0,m.ZP)("/api/courses/".concat(y.coursesId,"/homework_commons/edit_hack_homework.json"),{method:"get",params:d()(d()({},y),{},{id:y.categoryId})});case 3:if(n=e.sent,J(n),pe(!1),y.defaultExpandedRowKeys=["".concat(null==n||null===(t=n.data)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.identifier)],null!=n&&n.hide_description){e.next=14;break}if("2"==ce){e.next=12;break}if(null===(a=se.homework_status)||void 0===a||!a.includes("导入")){e.next=11;break}return e.abrupt("return");case 11:ue(null!=n&&n.description?"1":"2");case 12:e.next=15;break;case 14:ue("2");case 15:L(d()({},y));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,h.useEffect)((function(){se.homework_status&&Ae()}),[se]),(0,h.useEffect)((function(){Me.current&&(Me.current.clientHeight>200?Ge(2):Ge(4))}),[null==q?void 0:q.description]);var Ee=function(){var e=g()(o()().mark((function e(t){var n,a,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.active,a=t.over,n.id===(null==a?void 0:a.id)||null==a||!a.id){e.next=7;break}return J((function(e){var t,o=null==e||null===(t=e.data)||void 0===t?void 0:t.findIndex((function(e){return e.identifier===n.id})),i=null==e?void 0:e.data.findIndex((function(e){return e.identifier===(null==a?void 0:a.id)}));return d()(d()({},e),{},{data:(0,K.Rp)(null==e?void 0:e.data,o,i)})})),e.next=5,(0,m.ZP)("/api/courses/".concat(null==y?void 0:y.coursesId,"/homework_commons/change_hack_position.json"),{method:"post",body:{id:null==y?void 0:y.categoryId,origin_identifier:null==n?void 0:n.id,target_identifier:null==a?void 0:a.id}});case 5:0==(null==(i=e.sent)?void 0:i.status)&&(u.ZP.success("排序成功"),Ae());case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ie=function(){var e=g()(o()().mark((function e(t){var n,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=function(){var e=g()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/item_banks/".concat(t,"/copy_hack_item.json"),{method:"post"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&u.ZP.success("加入试题库成功!");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ce(!0),e.next=4,(0,m.ZP)("/api/item_banks/".concat(t,"/check_hack_item.json"),{method:"get"});case 4:-20===(null==(a=e.sent)?void 0:a.status)?S.Z.confirm({icon:null,centered:!0,closable:!0,okText:"确定",cancelText:"取消",title:"加入试题库提示",content:"该试题在试题库中已存在,请确认是否加入试题库?",onOk:n}):n(),Ce(!1);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,_.jsxs)("section",{className:M,children:[(0,_.jsxs)(F.Z,{spinning:we,children:[(!(null!=q&&q.hide_description)||(0,O.GJ)())&&(0,_.jsxs)("section",{className:" edu-container",style:{padding:"20px 20px 0 20px",background:"#fff",position:"relative"},children:[!ye&&(0,O.GJ)()&&(0,_.jsxs)("div",{style:{position:"absolute",zIndex:10,right:34,top:30},children:[(null==le?void 0:le.hack_edit_permission)&&(0,_.jsx)("span",{className:z,style:{marginLeft:"auto",cursor:"pointer"},onClick:function(){Le(!0)},children:(0,_.jsxs)(p.Z,{title:"编辑说明",children:[(0,_.jsx)("i",{className:"iconfont icon-bianji-moren font14"}),(0,_.jsx)("span",{children:"编辑说明"})]})}),(0,_.jsx)("span",{className:z,style:{marginLeft:"20px",cursor:"pointer"},onClick:g()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=q&&q.hide_description){e.next=4;break}S.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"隐藏后,学生端将隐藏作业说明模块",onOk:function(){var e=g()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/homework_commons/".concat(null==y?void 0:y.categoryId,"/hide_description.json"),{method:"post",body:{status:!0}});case 2:0==(null==(t=e.sent)?void 0:t.status)&&(u.ZP.success("隐藏成功"),Ae());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.next=8;break;case 4:return e.next=6,(0,m.ZP)("/api/homework_commons/".concat(null==y?void 0:y.categoryId,"/hide_description.json"),{method:"post",body:{status:!1}});case 6:0==(null==(t=e.sent)?void 0:t.status)&&(u.ZP.success("公开成功"),Ae());case 8:case"end":return e.stop()}}),e)}))),children:(0,_.jsxs)(p.Z,{title:null!=q&&q.hide_description?"公开说明":"隐藏说明",children:[(0,_.jsx)("i",{className:"iconfont icon-xianshiyincang font14"}),(0,_.jsx)("span",{children:null!=q&&q.hide_description?"公开说明":"隐藏说明"})]})})]}),ye?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(D.Z,{defaultValue:null==q?void 0:q.description,watch:!0,height:155,onChange:function(e){je(e)}}),(0,_.jsxs)("div",{style:{display:"flex"},children:[(0,_.jsx)(P.ZP,{size:"middle",type:"primary",className:"".concat(B," mr20"),style:{marginLeft:"auto"},htmlType:"submit",onClick:g()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ge(1),e.next=3,(0,m.ZP)("/api/homework_commons/".concat(null==y?void 0:y.categoryId,"/update_description.json"),{method:"post",body:{description:be}});case 3:0==(null==(t=e.sent)?void 0:t.status)&&(u.ZP.success("编辑成功"),Le(!1),Ae());case 5:case"end":return e.stop()}}),e)}))),children:"提交"}),(0,_.jsx)(P.ZP,{size:"middle",type:"primary",ghost:!0,className:B,onClick:function(){Le(!1)},children:"取消"})]})]}):!(null==q||!q.description)&&(0,_.jsxs)("div",{ref:Me,className:C,style:1===Fe?{visibility:"hidden"}:2===Fe?{overflow:"hidden",height:"200px"}:3===Fe||4===Fe?{overflow:"initial"}:void 0,children:[(0,_.jsx)("div",{className:A,children:(0,_.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALwAAAAgCAYAAACo7RKTAAAAAXNSR0IArs4c6QAAFaNJREFUeF7tXHl8XHW1/557Z5JM0yTtA9qy6dwktMVaKMncAVo2F0Rk0aeg+FCK+tzg8WRR5qYFCdA2dwou+AR9LCpSZVE+ICIi+ACfpOjcSaAthdImudMFCm0hbfZl7u/Ib5KZznJnSdqnrx97/4HOPb/zO7/zO7/fPcv3hACg+xH/NBoaXMnARwjwMeGvxNSqgFZXzSq36AOxIUk3kYcfulDdI1qPJ4iFDF7EwEJiVABoBZV9a9pFWzsnwu8g7UEN7A8NED9RX72np6cNTNOJcB8Thpl5ITHpDK4gohEA7QRaLUCtXqV89dRPx97Mnpwfqq3p4cGTBHgRMUsjPxGMqSAwAS8yaDUResD8aQCHqh7llKoL3ly/PxZxkMdBDZSqAdr9wIyVzHSZonoXVJ92j4P46E0A10OMxkZ2rt46vP1ZEn1ba8G0iMEzJWMCdTFxKxF6IcjDhJOJeR4DCgiDBPwvMVoZVMng0LTGb5+EqdoCCLEITt+cnvYb5sIZWldzwZZTShW0GN2a5roZ8SE0CBYNU3xTbh0YGZoNh/8j52AS7wia9reL8ftnfB9tqr2aBWbnrJ24Rzfta5O/R0O15zBwnpuOFKK/NJqdP/v/qj9p8BsAeq7mQ/fdhOFheeNOy10wegH6S3zPpldGtz01NNL98mHA8CIWmEMKdrCgp0jhVha4SiHv6upT7l4FchaNbHv6UwNd9x83beHtgCq9mbFnZPtzGOxcxTUNxjyafdWrE1XOS0tnHzkqRhvB1ABwA4MbwDgycRgJ3boZ+xf5/xHDvy35e3IOIrpPN+1LJjrnZOnbm+oPi7PzNBiHu/Egwl910z4/2uRfLAStzDcPgb+ih2O/magca43504e49xWAlPSxqoorGlfYD6X/Fr2uvk6Mxl8DoGbP46koP7LhxtfekL9HQ7U1DN7JYG+OPArOCLbE/lRITrv5jIqdo1sbJrKWSm/F2nnN6/uiodp/E+AfT2Rsau8VXCUNPk6ga6pPu2cOBH+9JEYEJ77ntc6+NStne2qOfXTqgmt/BRYLe63rvuiZNrvcV39JQrmjb72A/o13I9vgnT0b0bs2jKrjQ7/xvO+aT5Q05zhRxPD/DxgfzD+GosGwrUeW1h2NuLMlm04l5XONZtcvJjLnvtJaTdr5LNjdWInuDZr2pXIOK6Q9xeAz3ebzeBS9YXlXdDKyWCF/GwOZBkb0i6Bpfy6bn2VoUWZuzP6dVPWz+orOBxJyNvm/ygI5Rkeg5/WwfWoxGZmZLENbDeCkYrTJ916q0E4wN8QihnYrmK8pdVw6Han0Eeq+fwYrpFxRfepdXwBnKaUAV6enC71rlqPi6HNR4f/XBGVvezM8VRp8xyxO/Duvwfd0oHdNC6pOWGp75n6jdiLCRwz/LjAOyTeGgAf0cOyzVpP2JRZ8dy4dbSPw8ETmlLTk9ZwVWNYxqUDbWlJ3ETvO/W5zKqDrA2F7WcKQDO15Zl7kRuf1TZt+QvNLuycqt6SPGv4VgtGUsfmgXQHf4pnU3CzSf7dC/u8xcGWOwRN+rJuxr8tkRLTd2siMnH1TST270ex8shQZLUP7NTN/qhRaGUcGKhb7pKyFLoVivMq95bV7Df6Uu68CuGTj2y8G33D9Ts+cK2YUEzT5/sXmBdNGB3d3F6RXaFmwxb4+EtIeBBIB8j4/BPCsmYdXHn31C4OTYRYNadcJ8M1uY9NvzoihvQkei5MyHsLbQTN26GTmlmMiTf7TIfBcDlsPnagvtyPrm+fNGhwa+LJ8zyxdRLh8dWmbQriTwX5mfDFXRPQzsFKBMhIId5nFZI0Y2ktgPr4YnXxPhA26GTs2sRYXHRFolECpuExAHiQOZB3w0UBjwHdAGXz70tpAPC4sAnazW6wxFlAvDvgWr7KGfraj0JegFEUnaQh4Qw/HEjFCvqfNqL1YQGR8ahUFTY0rYn+IGNrPwDz22ct6kq7KhvCcqp53hntcDwWR9PNPaluiHScEZwWEdL9u2rcUki36341ett9eC5Avi+5W3bR/2NZUe64jxG8nopP8tLQpGLZzA9+sAZah9TLz1JSOif4aaAgkvm7Rtuh6Bs9JDSF6PGja561bos0cdDgnQwiiNUHTXpCkjxj+34Px0cwpx+T6vzH4uosBOBjd2e7uwyddmgne8DJYUhSljCne4Dhw/3R61EVweBQsIjm3EFGbm386dovQz8H8jutGkrJFN7u+V8ggrJC25N0gbnnmrYJPyECzFFfFMupPYI635zH4Vbppf15mUYQQ38mgIVwUNGMP7ouxWk21V7IQBddXKn8Cfq+HYx8rRC+/KP2D/dszdEWUWCM3NyvRoXsHmbls72HA93QzdrW1RDuTHX4qh3daHCTfWYa2iZnrs/YiIdd+N3jVdxicwZ3g+ADKZi7C0JbHcoPWSRp8cgFWSLucwT90U2q5T505MiS+zMwJvzhNaQPE1JLPtZhe4ak55sYO1xu2lM2ONGk3Q/B16bQK0VkB036qFFclamgXCuaMrEma7M26GbvRMrTfMPP5GXOoviMCK17NMJ7k+0TWJe78JJ/8iqI0B1Z0Pms1aT9kwZdn6Uswo1jMkMiGZYxT6L/0Fvs/C+ksGqo9RUD8OWu+xBpfNOb6R3nIzmJ6edDsuiNqaNcI5ltz5iR6isDPJH8XoGVg9rjJtd8N3unfCsUzBeSZAjEk40vsd4OPGrXfFyy+4XLSe4KmXWMZ2nPMfHqm0vAkgbYw81dcFLZTN+2SYwm3zXTLHqgKnVZRPuXF/sH+XrcxNO6qyHcRo7YJLFa40cnMUkNL5y8tQ9sFYK+REW0MmvbeT3/W4EhIO+/dtO1j+YyPxn14NxegWMZl63dP9r351nbpt1MW/yuD4dhthQy+zai71GHnp+k0yeyZZdR+mFk87XZxWIb2c2b+fCkXUDaNouAbgZbYD/arwfe1N8MZ3oWp878JxVuNvnW3wBncgWmL7gCU8pQMzr7f8I8z+JwcwwXap/gqTx8YHHgnO0dMpFzNEOe6pTQJWK2HY67ZkVKVGzW02wXzZen00j93HMXJ56ogLTVoGf573IJByU9RcJIiaCgOfinrPr0rGLZzDnCSppirUqVUHHpsy4a387gAP9XDsZzgNMV7Sd372XHW5RgWlHMD4a7fFdKbZWjLmHlpxg08fviiRu3XBIsfZd7+ZXW6ubFrIoFujm0oyjl6S9cT+9Xg493roZTVQKk8KjEfj/QgvvtleGcszJh/Xw0+YmivgdklMKKHysrUm0ZHnRuyF+zx0NL4KP+Rwe/J3QzaRoTW3APEXQEztqQUo7dC/p8w8IUMg1c88wQ78/K7KsqNutnVPHbDa38C82luc0nD7MfQxUIg4+YsVlOwQtolIHwx52uXCO6xWw/HpnPzGR5raPNgtgsAUpYEza6WfGuPNtV9QgjnkRydeWmuvsyWxau8j2VoDzDzZ9IJKn2Vh8xrXv+OFdK+w+Crk+9kBkZmV9q6uxS23+lL9+0lDREEQANpvMqyaeS7MkWZs6Cla+N+NfhSDEPS7IvBJ/LAbdFBtyofES3XTTvDj07KtOkH9eW734gPMCOj4lhQZsIjQTP2yVLW5baJMu87HB+9KJ+rAtDng2F7leRvGf432KUamzRMK+R/mIEMWcorPEcff2PHtsLGVftZZvFLl0OeKNBZxuxa5pGc+oJC9OmAaf8qH2/L0L7FzBmVYWl8UyoqffOa10v8VSGDzyhujRktxgNvWsjM700NHnfboqHa+QJibQ7TrD3KU5hyKn2VU6RcB5zBr7lujjY8Otzlpk2V1C/kw3FEm2bPFWJkQjAGBXRrIGx/q0SDzwkoK32Vhw8M9S/P56qoHs/Jjcs7/rLmluMqh3f19LnPQ1Hd7ApGjdod7wbqqVw8Ebp0M1ZXTLaooV0vmG/KuYmJHtRN+6KooX1EMP/Bhc+VKql5b2oH4nIwn5s+jog266btLyaTFdJ2M7imGN34Df6EbsbOkWlfh0Xicsh6bgiGY6n1WYb2KDN/PIOGEAuaMS3BL1Vp3Q+Fp1IWsK83fIENggLl1EC463k3OQrlmolIujP9LrfH7XqLnTfoS6d3qwAqUKYJ4sfyuSqKr+ywQPPGXTK/7ji8xk1uWTn2lnmWjYzEX84wLqCgj52ktQztXmbOwQ4lv4bRUO3XBcQdpe5dQTrCM0Ez9qFCNNHm2YeKwZGdpc6nkHJbwOy60jK0lcycc/kQxlK/aetdx8zvzzqIf9RNOwHZOOAMPmLUXgYWt7spzKfSrPkr7Lfc3hUK4JL+Y6mb4Mo/pP2ZwRnoz0pfZfnAUH/M3VWhPXrYTgD1Ik21n4QQD7vOr8gUG23PXrOi4NJAS+zeYjJbIX+r7EXIpkt+DbN95mL8Cr0nojt10/5qIZq2pfUnOfH4C1kG2QEgxuBKME7OeneFLI5FQtqTAJ/lwnuQiJzU78yV2ZkjGodFHJAGnx/rQX26aVflU7ZbrjmhgDR05b5stgvoyik/tLqmkKsifWg5p9Xkv5YFwm7zS8MWgj6WDZNIgqmKyRwJaW8BnJNylSnTxhb7z265/WI8870nomuLVX0jIe1zAN+XziN5eN0gEEl8Tr4YpxRZFaJvBkw7UbA7AG947bfZvuP4ol8KhmMn5FNAvhuCQBE9bJ9YiuIK0UQM/3ow3pekIaI+RcGiQq6KBLklbnhDuwvM/+7GnxT1FGbxcDrGRtYT9LC9N7DLI1ghuIIyXrBqv2HOEc6wbPSJLxZC5PQJyHw8yLsYPBpm8AW5U9FdRN4EdqZqOu2cG3rNteaQHGcZtc3MIiOLJteot3S2ugH+FK+nXnHQExfxHZPdo3S354AzeCukbcjAWYxrgYh+pZt2XrCYFfJ3MJAT5BHwKiiZIchUqUL0jLwFS1F0xPDbYKQCNiLayURfK+SqSJBb4oY3/M8y4wy3eTyg0+PgDHx5qZj+fHAFAvr1cCyFYxmTQYswc+KLk/6QQpfoLfZ9Vsj/DAMfyJGRlEQVtBQdjR/uVWCW2JPUk3RFLaPWZBah1AuiuF7xXt+LI1tOjzvij7lz4xkFSEENmOlUt/pMWZnn/Qtu7kh01x1QBu+Gs0gqQSG05MuZ5801F9klIuVLutmVtzSfPry9qf59RLQX/6Hy6Gg8fk4hVyXpg0dC2laAx4oXmebWO71CPapvlDJQrB7Et+eLVdKHW03aBSw4J7VIRGt1004hFfOl/Ai0Z9bMWYdLlKhlaLJKfXS2hBOBBCcMPuSX/nsaDp56g2G7evzQZUCGiahDN+1jXDFE40BBPWz/PCmTW0oyG+l6QBl8oZRkIeMc7+SRgdHEnhK6dwoxjIS0OwFOwG5zTHn8M16gRC+HFHTTii0mGqo1BERu8Sg3d33bu8A5N/zLj4Lh2GWFahherzL7hGVdm4rJknz/Lg5KdkqlQ51Ta8yupCaBaPnQph7QgoawncpuWSH/I7nQZtoWDNupg3pAGXxetJzsSRsPwtwU37bEf1Y+dGUCakzYG+WnMShTy45fsHzj66VuZjZdIVcl+Rl/6fr6edkpxyQfAv1aD9sXTnr+kHY3g7+Uc9iIbpE9qrKI1/Hmi57u1+OydS8HCKaSGmg0O9vy1TBKLTQl55doVwGRAUhLX6MV8vcxUJla/zgQzTL87czIiM9kBfbd3uWp6UUuK6StZfD89PUS0Z900065iweUwRfKGSeDMDfjKISulMWhec3rczHWk7WytHH5XBUZ0CYzSlbI/3EGHs0znRkMxzI6lSYiliuIbgxW0M5AuUL0U1aU1/N0Y6VuXtm0LSAedzk4qUKThBqAsEeiL/PJ2GbUNTrsZLQpEuhpIjwkmKWhfz99rAR8NZb774gObu5j8F4w1hicO8Mtk+Msw9/PjCkZBg+6Rw/bqYQAdT8ws58Yt9Wces9n9rXjqdTNGN0VRf+rP0J1YNkO9Ziv5Hb45GFkGf7vMuOqHMW7BGHpNJNNZZayHlnYQeYneu8wxtkuaEKZCpXYj/EOJHpPdqEkxYDwCgExNzk8HuXKYq6EWxN7Oi+V1E8KiMuY+cMuxpzIf8vfIyG/RKZmGKP8Xfr4IG5lJpWIz/SScqzEq+TTW8TwfwaMRF9sKQ+p6se8Km1x+wJmB+5uGHs5hwKlKb0Di7rvn/k4iBfUBFcOU9kh+9TiV8oiIIbRt+47EMO7UR0Mb6WjzncBc7lzsgztMWbO+fMQbqc9nUPEyJPKzOqUKUn+NCLZSSS63pZtfzld/hPlNVH6QkU2yatIbJCYTqbrAEi/NxPiSxiqQNURx5nrEu2UVpP2AxZ8RREZU3iVfHSWoS3N7lMoxFPGB/E4Am5YoPTc+piMdYtYODlVdlLoQr3F/nVyHhq4/4ijh8lpJW/l9Cn1i6d6Dyntrye49bQW2zSn18Zgxyo4A9sxdf7VUGvqH6Qjz7uo2Ljke8vwv8qMuS630cO6abvkiMcoJzuumFxtRl29w07JAVsxfqW+T3eJ8hpXHviujFlAWA2mVgKmC/A3XXj8MhiOpVKHluH/HTMKdjEBsIPhWMEL02rSJK4o7z6ly0FgQdohx7HdfXNGqnKciEg5Uze7UqlK1x4JorhPwVHpGa3Eyd790EyN4F0lnJGFqm8GPDVz4ak5BmpVPRSfe19EKQbPI7sR7+mE07MJ8T0bEe/bDHXK4Zgy+1Ko1fU74PUuohkfLSl7UiglSaSEdbPLcNv8xLjBeweyfcDEDVdgXCnG1x7SjnfAeSG0pfCYHI2yRQ93fa3Q2CR8VwK6GHhekQUkRmuj2fkyEbHUizV472a3dKiiqh9M98Xz1T4yDJQohVeZ3JrcR1kh/xMMnJ391qN4ZjS0dCQwOW7ZqPG/mCfdsjszD1Lav/p+e9rFVF6+whnY/h7ZuCEfxVsFT/UxUKvrxv479b2A4kGuwTNE3+uI925CvKcjAQF2hmSDDhIYeU91PeTXw3uYDpDnCajq5XT42a7+qdvS1zfPK+sfHsxA5yXpVKa1jWan68GZ7Lj9uWn/CF5rbqg/iuMK58syJaqwu0dz/gaOysQNLR2PykORlDvROaVQ7h9dSluYR8GWyf7dnEL6aWvSThWkZBTJFDhCNsfLcXJ/B0aGMgBrJIQDpWKdW+tjdntWYm7e/uQ8MbD5gvjujo+K/tfnx3vtSqdvM1jEQYonYfRK+SEY2RmBp6oepJYj3tsJdoZkIJNoAPEkD0h1HRTfYTsAegGgVqh4kmadk9Mp848wioNz/vNpwNXgs9XAbz1Rh+He0+PdG86P92890enfOtPZ00FitBdQvfBWyS9AfeIW99TUM9TyV6SPCGA1yjytpbot/3zqP7jiv7cGSjL4nAPQ/ew0DA2e7HSvP1etniv/QI7sI1oNUlejwvcCTf9AsW73v/c6D853UAMJDfwN/F3Fz8TPqaAAAAAASUVORK5CYII=",width:94})}),(0,_.jsx)(x.Z,{className:T,value:(null==q?void 0:q.description)||""}),2===Fe&&(0,_.jsx)("div",{className:Z,children:(0,_.jsxs)("div",{onClick:function(){return Ge(3)},children:["展开",(0,_.jsx)("i",{className:"iconfont icon-zhankai4"})]})}),3===Fe&&(0,_.jsx)("div",{className:Z,style:{position:"relative",height:30,background:"transparent",paddingTop:5},children:(0,_.jsxs)("div",{onClick:function(){return Ge(2)},children:["收起",(0,_.jsx)("i",{className:"iconfont icon-shouqi5"})]})})]})]}),(0,O.dE)()&&!(null==q||!q.group_name)&&(0,_.jsxs)("div",{className:E,children:[(0,_.jsx)("img",{src:"".concat(N.Z.IMG_SERVER,"/images/").concat(null==q||null===(t=q.user)||void 0===t?void 0:t.image_url)}),(0,_.jsxs)("div",{className:"ml20",style:{alignItems:"start"},children:[(0,_.jsx)("b",{children:(null==q?void 0:q.name)||""}),(0,_.jsx)("span",{title:(null==q?void 0:q.group_name)||"",style:{maxWidth:"130px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordBreak:"break-all"},children:(null==q?void 0:q.group_name)||""})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)("b",{children:(0,_.jsx)(Y.n,{value:null==q?void 0:q.total_score})}),(0,_.jsx)("span",{children:"总成绩"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)("b",{children:(null==q?void 0:q.total_time)||"-"}),(0,_.jsx)("span",{children:"总耗时"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)("b",{style:{color:"#009C0F"},children:null==q?void 0:q.pass_count}),(0,_.jsx)("span",{children:"已通过数"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)("b",{style:{color:"#FA6400"},children:null==q?void 0:q.doing_count}),(0,_.jsx)("span",{children:"进行中"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)("b",{style:{color:"#E30000"},children:null==q?void 0:q.not_pass_count}),(0,_.jsx)("span",{children:"未答题数"})]})]}),!(null!==(n=se.homework_status)&&void 0!==n&&n.includes("导入"))&&(0,_.jsxs)("div",{children:[(0,_.jsxs)("section",{className:" edu-container",style:{padding:"20px",background:"#fff"},children:[(0,O.GJ)()&&(0,_.jsxs)("div",{style:{marginBottom:"10px",fontSize:"12px"},children:["可鼠标拖拽“ ",(0,_.jsx)(H.Z,{})," ”进行试题排序,学生端将按照此排序展示"]}),y.defaultExpandedRowKeys&&(0,_.jsx)(R.LB,{modifiers:[W.DL],onDragEnd:Ee,children:(0,_.jsx)(U.Fo,{items:null==q||null===(a=q.data)||void 0===a?void 0:a.map((function(e){return null==e?void 0:e.identifier})),strategy:U.qw,children:(0,_.jsx)(v.Z,{components:{body:{row:ee}},dataSource:null==q?void 0:q.data,rowKey:function(e){return null==e?void 0:e.identifier},pagination:!1,expandable:{expandIcon:function(e){var t=e.expanded,n=e.onExpand,a=e.record;return t?(0,_.jsx)(p.Z,{title:"收起",children:(0,_.jsx)(X.Z,{className:I,onClick:function(e){return n(a,e)}})}):(0,_.jsx)(p.Z,{title:"展开",children:(0,_.jsx)(V.Z,{className:I,onClick:function(e){return n(a,e)}})})},expandedRowRender:function(e){var t;return(0,_.jsxs)("div",{style:{padding:"10px 0px 10px 48px",borderRadius:2},children:[(0,_.jsxs)("div",{style:{overflow:"auto",maxHeight:300},children:[(0,_.jsxs)("p",{children:["题目:",null==e?void 0:e.name]}),(0,_.jsxs)("p",{children:["描述:",(0,_.jsx)(x.Z,{value:(null==e?void 0:e.description)||""})]}),!(0,O.dE)()&&(0,_.jsxs)("p",{children:["题目解析:",(0,_.jsx)(x.Z,{style:{fontSize:"14px"},value:(null==e?void 0:e.analysis)||"暂无解析"})]})]}),(0,_.jsxs)("div",{style:{width:"100%",textAlign:"end"},children:[(null==le?void 0:le.hack_edit_permission)&&(0,_.jsx)(P.ZP,{className:"mt20",type:"primary",ghost:!0,onClick:function(){window.open("/problems/newedit/".concat(null==e?void 0:e.identifier,"?type=1")),localStorage.setItem("program_homework",[y.coursesId,y.categoryId])},children:"编辑"}),(null==le?void 0:le.hack_edit_permission)&&(null==q||null===(t=q.homework_status)||void 0===t?void 0:t.includes("未发布"))&&(0,_.jsx)(P.ZP,{className:"mt20",type:"primary",style:{marginLeft:20},ghost:!0,onClick:function(){var t;S.Z.confirm({title:"提示",content:"是否确认删除",okText:"确认",cancelText:"取消",onOk:(t=g()(o()().mark((function t(){var n;return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,m.ZP)("/api/problems/".concat(null==e?void 0:e.identifier,".json"),{method:"delete"});case 2:0===(null==(n=t.sent)?void 0:n.status)&&(u.ZP.info("删除成功"),y.page=1,Ae());case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})},children:"删除"})]})]})},defaultExpandedRowKeys:y.defaultExpandedRowKeys},columns:null===(i=[(0,O.GJ)()&&{key:"sort",align:"center",width:40,render:function(){return(0,_.jsx)($,{})}},{title:"序号",dataIndex:"index",ellipsis:!0,key:"index",width:55,render:function(e,t,n){return"".concat((y.page-1)*y.per_page+n+1)}},{title:"标题",dataIndex:"name",ellipsis:!0,key:"name"},{title:"难度",dataIndex:"difficult",key:"difficult",width:100,ellipsis:!0,render:function(e,t,n){return(0,_.jsx)("div",{children:Q[e]})}},{title:"通过率",dataIndex:"pass_rate",key:"pass_rate",width:100,ellipsis:!0},(0,O.dE)()&&{title:"得分",dataIndex:"score",key:"score",render:function(e){var t="",n=Number(e);return t=n>=0&&n<=60?"c-red":n>=90?"c-green":n>60?"c-orange":"",(0,_.jsx)("span",{className:t,children:e})}},(0,O.dE)()&&{title:"耗时",dataIndex:"time",key:"time",ellipsis:!0,width:100},{title:"知识点",dataIndex:"tag_discipline",ellipsis:!0,key:"tag_discipline",width:200,render:function(e,t){return(0,_.jsx)("span",{style:{backgroundColor:"#ECFAF5",color:"#1B8565",overflow:"hidden",textOverflow:"ellipsis",padding:"2px 6px"},children:e||"--"})}},(0,O.dE)()&&{title:"通过状态",dataIndex:"finish_status",key:"finish_status",render:function(e){return(0,_.jsxs)(_.Fragment,{children:[0===e&&(0,_.jsx)("span",{style:{color:"#E30000"},children:"未答题"}),1===e&&(0,_.jsx)("span",{style:{color:"#FA6400"},children:"进行中"}),2===e&&(0,_.jsx)("span",{style:{color:"#009C0F"},children:"已通过"})]})}},{title:"操作",dataIndex:"identifier",key:"identifier",width:(0,O.GJ)()?280:146,align:"right",render:function(e,t,n){return(0,_.jsxs)("div",{children:[(0,O.GJ)()&&(0,_.jsx)(P.ZP,{type:"link",style:{marginRight:"5px"},loading:Te,onClick:g()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ie(null==t?void 0:t.id);case 1:case"end":return e.stop()}}),e)}))),children:"加入试题库"}),(0,_.jsx)("a",{onClick:function(){var t;!(0,O.Rm)()||null!==(t=s.AssistantObject.hack)&&void 0!==t&&t.can_question_eaderboard?window.open("/classrooms/".concat(y.coursesId,"/program_homework/").concat(y.categoryId,"/").concat(e,"/ranking")):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"排行"}),(0,_.jsx)("a",{onClick:g()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/problems/".concat(null==t?void 0:t.identifier,"/start.json"),{method:"get"});case 2:(n=e.sent)&&(window.open("/myproblems/".concat(null==n?void 0:n.identifier,"?type=1&backUrl=/classrooms/").concat(y.coursesId,"/program_homework/").concat(y.categoryId,"/detail?tabs=1")),localStorage.setItem("program_homework",[y.coursesId,y.categoryId]));case 4:case"end":return e.stop()}}),e)}))),className:"ml20",children:(0,O.GJ)()?"体验":"进入答题"}),(null==le?void 0:le.hack_edit_permission)&&(0,_.jsx)("a",{className:"ml20",onClick:g()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:window.open("/problems/newedit/".concat(null==t?void 0:t.identifier,"?type=1")),localStorage.setItem("program_homework",[y.coursesId,y.categoryId]);case 2:case"end":return e.stop()}}),e)}))),children:"编辑"})]})}}])||void 0===i?void 0:i.filter((function(e){return!!e}))})})})]}),(0,_.jsx)("aside",{style:{padding:"0 20px 20px 20px"},children:(0,_.jsx)(G.Z,{defaultCurrent:1,total:null==q?void 0:q.count,hideOnSinglePage:!0,showTotal:function(e){return(0,_.jsxs)("span",{children:["共",e,"条"]})},current:y.page||1,pageSize:y.per_page||10,onChange:function(e,t){y.page=e,y.per_page=t,L(d()({},y)),Ae()}})})]})]}),(0,_.jsx)(b,{})]})})),ne=n(78241),ae=n(95237),oe=n(43604),ie=n(92832),ge=n(24905),re=n(63017),de=(0,c.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList,loading:e.loading.effects}}))((function(e){var t,n=e.shixunHomeworks,a=e.loading,i=e.dispatch,r=e.classroomList,s=(0,c.useParams)(),m=(0,h.useState)(d()(d()({},{page:1,limit:20,group_ids:[]}),s)),S=l()(m,2),w=S[0],p=S[1],f=((0,c.useLocation)(),n.codeReview),y=(0,h.useState)({}),L=l()(y,2),x=(L[0],L[1],ne.Z.useForm());l()(x,1)[0];w.order="code_rate",w.sort="desc",w.category=w.categoryId,(0,h.useEffect)((function(){b(),console.log("params",w)}),[w]),(0,h.useEffect)((function(){"执行代码查重"===n.actionTabs.key&&b()}),[n.actionTabs.key]);var b=function(){var e=g()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"shixunHomeworks/getCodeReview",payload:d()({},w)});case 2:-2===e.sent.status&&setTimeout((function(){return b()}),1500);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=[{title:"序号",dataIndex:"number",render:function(e,t,n){return w.limit*(w.page-1)+n+1}},{title:"姓名",dataIndex:"username"},{title:"学号",dataIndex:"student_id"},{title:"相似度",dataIndex:"code_rate",render:function(e){return(0,_.jsx)("span",{className:"c-orange",children:e})}},{title:"操作",dataInex:"action",render:function(e,t){return(0,_.jsxs)("div",{children:[(0,_.jsx)("a",{onClick:function(){var e;!(0,O.Rm)()||null!==(e=r.AssistantObject.hack)&&void 0!==e&&e.can_view?window.open("/classrooms/".concat(w.coursesId,"/program_homework/").concat(w.categoryId,"/review_detail/").concat(t.user_id)):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"查看"}),(0,_.jsx)("br",{})]})}}];return(0,_.jsxs)("section",{className:"minH500 bg-white pl30 pr30 pt10",children:[-2===(null==f?void 0:f.status)&&(0,_.jsx)(re.Z,{customText:"正在进行代码查重,请稍候。查重结束后,页面将自动更新显示结果"}),-2!==(null==f?void 0:f.status)&&(0,_.jsxs)("div",{children:[(0,_.jsxs)(ae.Z,{children:[(0,_.jsx)(oe.Z,{flex:"1",children:(0,_.jsxs)("p",{className:"mt10",children:["查重时间:",f.last_review_time,(0,_.jsx)(P.ZP,{ghost:!0,danger:!0,style:{color:"#29BD8B",borderColor:"#29BD8B",marginLeft:10},onClick:function(){i({type:"shixunHomeworks/setActionTabs",payload:{key:"代码查重",params:w}})},children:"代码查重"})]})}),(0,_.jsxs)(oe.Z,{children:[(0,_.jsx)(ie.Z.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){w.search=e,i({type:"shixunHomeworks/getCodeReview",payload:w})},style:{width:200}}),(0,_.jsx)("span",{className:"ml5 c-red"})]})]}),(null===(t=f.group_info)||void 0===t?void 0:t.length)>0&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(ae.Z,{children:[(0,_.jsx)(oe.Z,{flex:"80px",className:"font14",children:"分班情况:"}),(0,_.jsx)(oe.Z,{flex:"80px",children:(0,_.jsx)(ge.Z,{checked:""==w.group_ids,value:"all",onChange:function(e){delete w.group_ids,w.group_ids=[],w.page=1,p(d()({},w))},children:"全部"})}),(0,_.jsx)(oe.Z,{flex:"1",children:f.group_info&&f.group_info.map((function(e,t){return(0,_.jsxs)(ge.Z,{style:{marginLeft:0},value:e.id,checked:w.group_ids.includes(e.id),onChange:function(t){t.target.checked?w.group_ids.push(e.id):w.group_ids.splice(w.group_ids.indexOf(e.id),1),w.page=1,p(d()({},w))},children:[e.name,"(",e.members_count,")"]})}))})]}),(0,_.jsx)(ae.Z,{className:"font14 c-red mt5",children:(0,_.jsx)(oe.Z,{children:"本页仅显示全部已查重分班"})})]}),(0,_.jsxs)("p",{className:"mt10",children:[(0,_.jsx)("span",{className:"c-red",children:f.copy_reviews_count}),"个疑似抄袭作品(",f.all_reviews_count,"作品)"]}),(0,_.jsx)(v.Z,{className:"mt30",loading:a["shixunHomeworks/getCodeReview"],pagination:!1,dataSource:f.users_reviews,columns:j,onChange:function(e,t,n){"ascend"===n.order&&(w.b_order="asc"),"descend"===n.order&&(w.b_order="desc"),n.order||delete w.b_order,i({type:"shixunHomeworks/getCodeReview",payload:d()({},w)})}}),(0,_.jsx)("aside",{className:"tc mb50 mt30",children:(0,_.jsx)(G.Z,{showSizeChanger:!1,onChange:function(e,t){w.page=e,w.limit=20,i({type:"shixunHomeworks/getCodeReview",payload:d()({},w)})},defaultCurrent:w.page||1,current:w.page||1,defaultPageSize:20,hideOnSinglePage:!0,total:f.copy_reviews_count})})]})]})})),se=n(34776),le=n(37205),he=n.n(le),me=n(78550),ce=n(57809),ue=n(5112),Se=n(88897),Pe=n(89378),we=n(37520),pe=n(89392),fe="form___dWO2F",ve="title___tyrHF",ye="content____AOnH",Le="pubColSty___jjxFz",xe="selectSty___RPIyk",_e="borderSty___NbRdH",be="delSty___Yap2B",je="delBorder___iWzM8",ke="copHover___DYJF8",Ne=n(92222),Fe=n(28019),Ge=n(15333),Me=me.default.RangePicker,ze=ce.default.Option,Be=(0,c.connect)((function(e){var t=e.shixunHomeworks,n=e.classroomList,a=e.user;return{shixunHomeworks:t,loading:e.loading.effects,user:a,classroomList:n}}))((function(e){var t,n,a,i,r,s,w,p,f,v,y,x,b,j=e.shixunHomeworks,N=e.user,F=(e.loading,e.classroomList),G=e.dispatch,M=(0,c.useParams)(),z=j.workSetting,B=j.workList,T=j.changeData,C=(0,h.useState)(!0),A=l()(C,2),Z=A[0],E=A[1],I=(0,h.useState)(!1),D=l()(I,2),H=D[0],R=D[1],W=(0,h.useState)([]),Y=l()(W,2),U=Y[0],q=Y[1],K=(0,h.useState)([]),X=l()(K,2),V=X[0],Q=X[1],J=(0,h.useRef)(!0),$=(0,h.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_minus_score:0,penalty_type:Ne.Q.Percent,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,send_type:void 0,difficult_count:[],difficult_settings:[],late_penalty:0}),ee=l()($,2),te=ee[0],ne=ee[1];(0,h.useEffect)((function(){return ie(),function(){q([].concat())}}),[]);var ie=function(){G({type:"shixunHomeworks/getWorkSetting",payload:d()({},M)})};(0,h.useEffect)((function(){var e,t;((0,O.G5)()||(0,O.Rm)()&&(null!==(e=F.AssistantObject.hack)&&void 0!==e&&e.can_late||null!==(t=F.AssistantObject.hack)&&void 0!==t&&t.can_publish))&&E(!1)}),[N,F]),(0,h.useEffect)((function(){var e;null!=z&&z.course_id&&J.current&&(J.current=!1,Object.keys(te).map((function(e){te[e]=z[e]})),te.allow_late&&te.unified_late||(te.late_minus_score=20,te.penalty_type=Ne.Q.Percent),te.unified_setting||(te.unified_late=!1,te.unified_anonymous_comment=!1,te.unified_anonymous_appeal=!1),U=JSON.parse(JSON.stringify(z.group_settings.map((function(e){return d()(d()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),V=JSON.parse(JSON.stringify(z.allow_late_settings.map((function(e){return d()(d()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),0===te.difficult_settings.length&&(te.difficult_settings=[0,0,0]),ne(d()({},te)),q(U.length?he()(U):[{}]),(null===(e=V)||void 0===e?void 0:e.length)<=0?Q([{late_minus_score:20}]):Q(he()(V)))}),[z]);var re=function(e){var t;if(null!==e.total_score)if(null!=e&&e.work_efficiency&&null===e.eff_score)u.ZP.warning("效率分不能为空");else{var n={shixun_evaluation:e.shixun_evaluation,challenge_settings:e.challenge_settings},a=function(){var t=g()(o()().mark((function t(){return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return R(!0),t.next=3,(0,m.ZP)("/api/homework_commons/".concat(M.categoryId,"/publish_setting.json"),{method:"post",body:d()({},e)});case 3:0===t.sent.status&&(u.ZP.success("更新成功"),ie(),G({type:"shixunHomeworks/getWorkList",payload:d()({},M)})),R(!1);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,pe.isEqual)(T,n)||null!=B&&null!==(t=B.homework_status)&&void 0!==t&&t.includes("未发布")?a():S.Z.confirm({title:"更新成绩",content:"您改动了本次作业的关卡得分设置,这可能导致已完成作业的学生的成绩产生错误。点击“确定”按钮将保存最新设置并按最新设置更新全班成绩。",okText:"确认",cancelText:"取消",onOk:a})}else u.ZP.warning("总分值不能为空")},de=function(e,t){var n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"group_id";return t?t.find((function(t){return t[a]===e})):null==z||null===(n=z.group_settings)||void 0===n?void 0:n.find((function(t){return t.group_id[0]===e}))},se=((null==z?void 0:z.allow_late)||(null==z||z.anonymous_comment),null==z?void 0:z.anonymous_comment),le=function(e){if(!e)return!1;var t=de(e,null==z?void 0:z.anonymous_comment_settings);return(null==z?void 0:z.anonymous_comment)&&t&&null!==(null==t?void 0:t.evaluation_start)};return(0,_.jsxs)("section",{className:fe,children:[(0,_.jsxs)("div",{className:ve,children:["试题发布",(0,_.jsx)("span",{className:"c-grey-666 font14",style:{fontWeight:400},children:"(作业一旦发布后不可变更试题发布模式)"})]}),(0,_.jsx)("div",{className:ye,children:(0,_.jsxs)(ue.ZP.Group,{disabled:Z||!(null!=B&&null!==(t=B.homework_status)&&void 0!==t&&t.includes("未发布"))||!(null!==(n=F.AssistantObject.hack)&&void 0!==n&&n.can_publish)&&(0,O.Rm)(),value:te.send_type,onChange:function(e){te.send_type=e.target.value,ne(Object.assign({},te))},children:[(0,_.jsx)(ue.ZP,{value:0,style:{color:"#333333"},children:"固定试题模式"}),(0,_.jsx)(ue.ZP,{style:{marginLeft:40,color:"#333333"},value:1,children:"随机抽题模式"})]})}),1===te.send_type&&(0,_.jsx)("div",{className:ye,style:{borderTop:"1px solid #fff"},children:(0,_.jsxs)(ae.Z,{style:{marginLeft:"165px"},children:[(0,_.jsxs)(oe.Z,{style:{color:"#333333"},children:["简单题数",(0,_.jsx)(Se.Z,{size:"large",precision:0,disabled:Z||!(null!=B&&null!==(a=B.homework_status)&&void 0!==a&&a.includes("未发布")),placeholder:"最大".concat(te.difficult_count[0]||0),min:0,max:te.difficult_count[0]||0,value:te.difficult_settings[0],onChange:function(e){te.difficult_settings[0]=e,ne(Object.assign({},te))},className:"ml10 mr20",style:{width:120}})]}),(0,_.jsxs)(oe.Z,{style:{color:"#333333"},children:["适中题数",(0,_.jsx)(Se.Z,{size:"large",precision:0,disabled:Z||!(null!=B&&null!==(i=B.homework_status)&&void 0!==i&&i.includes("未发布")),placeholder:"最大".concat(te.difficult_count[1]||0),min:0,max:te.difficult_count[1]||0,value:te.difficult_settings[1],onChange:function(e){te.difficult_settings[1]=e,ne(Object.assign({},te))},className:"ml10 mr20",style:{width:120}})]}),(0,_.jsxs)(oe.Z,{style:{color:"#333333"},children:["困难题数",(0,_.jsx)(Se.Z,{size:"large",precision:0,disabled:Z||!(null!=B&&null!==(r=B.homework_status)&&void 0!==r&&r.includes("未发布")),placeholder:"最大".concat(te.difficult_count[2]||0),min:0,max:te.difficult_count[2]||0,value:te.difficult_settings[2],onChange:function(e){te.difficult_settings[2]=e,ne(Object.assign({},te))},className:"ml10 mr20",style:{width:120}})]})]})}),(0,_.jsxs)("div",{className:"".concat(ve," mt30"),children:["作业发布",(0,_.jsx)("span",{className:"c-grey-666 font14",style:{fontWeight:400},children:"(作业一旦发布后不可变更作业发布方式)"})]}),(0,_.jsxs)("div",{className:ye,children:[(0,_.jsxs)(ue.ZP.Group,{disabled:Z||!(null!=B&&null!==(s=B.homework_status)&&void 0!==s&&s.includes("未发布"))||!(null!==(w=F.AssistantObject.hack)&&void 0!==w&&w.can_publish)&&(0,O.Rm)(),value:te.unified_setting,onChange:function(e){var t;null!=B&&null!==(t=B.homework_status)&&void 0!==t&&t.includes("未发布")?(te.unified_setting=!te.unified_setting,te.unified_setting||(te.unified_late=!1),ne(Object.assign({},te)),!1!==te.unified_setting||""!=U?te.unified_setting&&(q([]),Q([{late_minus_score:5}])):q(U.concat({}))):u.ZP.error("已发布,不能再修改统一设置")},children:[(0,_.jsx)(ue.ZP,{value:!0,disabled:!(null!=z&&z.manage_all_group),style:{color:"#333333"},children:"统一发布"}),(0,_.jsx)(ue.ZP,{style:{marginLeft:70,color:"#333333"},disabled:0===(null==z||null===(p=z.group_settings)||void 0===p?void 0:p.length),value:!1,children:"分班发布"})]}),0===(null==z||null===(f=z.group_settings)||void 0===f?void 0:f.length)&&(0,_.jsx)("p",{style:{marginLeft:"14px",color:"rgba(0, 0, 0, 0.25)"},children:"(本课堂无分班,仅支持选择“统一发布“)"})]}),(0,_.jsxs)("div",{className:ye,style:{borderTop:"1px solid #fff"},children:[te.unified_setting&&(0,_.jsxs)(ae.Z,{align:"middle",className:"ml25",children:[(0,_.jsxs)(ae.Z,{align:"middle",children:[(0,_.jsx)(oe.Z,{className:"c-grey-333",children:"发布时间"}),(0,_.jsx)(oe.Z,{className:"ml10",children:(0,_.jsx)(me.default,{style:{width:170},placeholder:"请选择发布时间",showTime:{format:"HH:mm"},allowClear:!1,size:"large",format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,Fe.Q8)(e,null==z?void 0:z.course_end_date)},disabledTime:function(e){return(0,Fe.d0)(e)},disabled:Z||k()()>=k()(null==z?void 0:z.publish_time)||!(null!==(v=F.AssistantObject.hack)&&void 0!==v&&v.can_publish)&&(0,O.Rm)(),value:te.publish_time?k()(te.publish_time):"",onChange:function(e,t){te.publish_time=t,""!=te.end_time&&te.end_time||!te.unified_setting||(te.end_time=k()(e).add(7,"days").format("YYYY-MM-DD HH:mm:ss")),ne(Object.assign({},te))}})})]}),(0,_.jsxs)(ae.Z,{align:"middle",style:{marginLeft:40},children:[(0,_.jsx)(oe.Z,{className:"c-grey-333",children:"截止时间"}),(0,_.jsx)(oe.Z,{className:"ml10",children:(0,_.jsx)(me.default,{style:{width:170},allowClear:!1,size:"large",placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:k()((0,L.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:(null==z?void 0:z.allow_late)&&(null==z?void 0:z.homework_status.includes("已截止"))||Z||(null==z?void 0:z.allow_late)&&k()()>=k()(null==z?void 0:z.end_time)||!(null!==(y=F.AssistantObject.hack)&&void 0!==y&&y.can_publish)&&(0,O.Rm)(),disabledDate:function(e){return(0,Fe.Q8)(e,null==z?void 0:z.course_end_date,te.publish_time)},disabledTime:function(e){return(0,Fe.d0)(e,te.publish_time)},value:te.end_time?k()(te.end_time):"",onChange:function(e,t){te.end_time=t,ne(Object.assign({},te))}})})]})]}),!te.unified_setting&&(null===(x=U)||void 0===x?void 0:x.length)>0&&(0,_.jsx)(ae.Z,{className:"ml25",children:U&&U.map((function(e,t){var n,a,o,i,g,r,s,l,h;return(0,_.jsx)(oe.Z,{className:0!==t&&"mt20",span:24,children:(0,_.jsxs)(ae.Z,{gutter:[0,16],children:[(0,_.jsx)(oe.Z,{span:8,children:(0,_.jsxs)(ae.Z,{gutter:[8,16],align:"middle",children:[(0,_.jsxs)(oe.Z,{style:{minWidth:80},className:"c-grey-333",children:["发布规则 ",t+1]}),(0,_.jsx)(oe.Z,{flex:"1",style:{maxWidth:300},children:(0,_.jsx)(ce.default,{size:"large",disabled:Z||!(null!=z&&null!==(n=z.homework_status)&&void 0!==n&&n.includes("未发布")&&e.id||k()()<k()(null==e?void 0:e.publish_time))&&!(null==e||!e.publish_time),mode:"multiple",className:"".concat(xe),style:{width:250},value:e.group_name,placeholder:"请选择分班名称",onChange:function(n){var a;if(null!==(a=F.AssistantObject.hack)&&void 0!==a&&a.can_publish||!(0,O.Rm)()){U[t].group_name=n,U[t].group_id=e.group_id;var o=(0,pe.flattenDeep)(U.map((function(e){return e.group_name}))),i=V.map((function(e){var t=(null==e?void 0:e.group_name)||[];return d()(d()({},e),{},{group_name:(0,pe.remove)(t,(function(e){return o.includes(e)}))})}));Q(i),q(U.slice())}else u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:z.group_settings&&z.group_settings.map((function(e){if(!U.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name)))return(0,_.jsx)(ze,{value:e.group_name,children:e.group_name},e.id)}))})})]})}),(0,_.jsx)(oe.Z,{span:15,children:(0,_.jsx)("div",{className:"ml10",children:(0,_.jsx)(Me,{size:"large",allowClear:!1,ranges:{"此刻":[e.publish_time?k()(e.publish_time):k()(),k()()]},disabled:Z||!(k()()<=k()(null===(a=de(e.id))||void 0===a?void 0:a.publish_time))&&[!0,(i=e.id,s=de(i,null==z?void 0:z.allow_late_settings,"id"),l=de(i,null==z?void 0:z.anonymous_comment_settings),h=de(i),(null==z?void 0:z.allow_late)&&s&&k()(null==s?void 0:s.late_time)<=k()()||(null==z?void 0:z.anonymous_comment)&&l&&null!==(null==l?void 0:l.evaluation_start)||null!=(null===(g=(k()(null==h?void 0:h.end_time)<=k()()&&(null==z||null===(r=z.allow_late_settings)||void 0===r?void 0:r.filter((function(e){return e.group_id.includes(i)}))))[0])||void 0===g?void 0:g.late_time))],style:{width:600},placeholder:["发布时间(学生收到作业时间)","截止时间(学生“按时”提交作品时间截点)"],disabledDate:function(e){return(0,Fe.Q8)(e,null==z?void 0:z.course_end_date)},disabledTime:function(e){return(0,Fe.d0)(e)},showTime:{format:"HH:mm",defaultValue:[k()((0,L.U6)(),"HH:mm"),k()((0,L.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:e.publish_time&&[k()(e.publish_time),e.end_time?k()(e.end_time):void 0],onChange:function(n,a){var o;null!==(o=F.AssistantObject.hack)&&void 0!==o&&o.can_publish||!(0,O.Rm)()?(U[t].publish_time=a[0],!e.end_time&&a[0]?U[t].end_time=k()(a[0]).add(7,"days"):U[t].end_time=a[1],q(he()(U))):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},onCalendarChange:function(e,n,a){if(null!=n&&n[0]&&!n[1]){var o=k()(n[0]).add(7,"days");U[t].publish_time=n[0],U[t].end_time=o,q(he()(U))}}})})}),!Z&&(0,_.jsxs)(oe.Z,{span:1,style:{display:"flex",alignItems:"center"},children:[((null==e?void 0:e.publish_time)&&k()()<k()(null==e?void 0:e.publish_time)||!(null!=e&&e.publish_time))&&0!=t&&(0,_.jsx)(Pe.Z,{className:"mr10",style:{color:"#E30000"},onClick:function(){var e;if(null!==(e=F.AssistantObject.hack)&&void 0!==e&&e.can_publish||!(0,O.Rm)()){var n=(0,pe.cloneDeep)(V);n.forEach((function(e,n){e.group_name&&(e.group_name=e.group_name.filter((function(e){var n;return!(null!==(n=U[t].group_name)&&void 0!==n&&n.includes(e))})))})),Q(n),U=U.filter((function(e,n){return t!==n})),q(U.slice()),setTimeout((function(){return q(U.slice())}),10)}else u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}}),U.length<(null==z||null===(o=z.group_settings)||void 0===o?void 0:o.length)&&(0,_.jsx)(we.Z,{className:"c-green",onClick:function(){q(U.concat({}))}})]})]})},t)}))})]}),(0,_.jsxs)("div",{className:"".concat(ve," mt30"),children:["补交设置",(0,_.jsx)("span",{className:"c-grey-666 font14",style:{fontWeight:400},children:"(可对在作业发布时间范围内未完成作业的学生,延长时间进行补交)"})]}),(0,_.jsx)("div",{className:ye,children:(0,_.jsx)(ae.Z,{children:(0,_.jsx)(ge.Z,{checked:te.allow_late,disabled:Z||(null==z?void 0:z.allow_late),onChange:function(e){var t;null!==(t=F.AssistantObject.hack)&&void 0!==t&&t.can_late||!(0,O.Rm)()?(e.target.checked&&S.Z.warning({title:"开启补交提示",width:480,centered:!0,content:(0,_.jsxs)("div",{style:{padding:10,background:"#f5f6f9"},children:[(0,_.jsx)("div",{children:"1.开启补交后不可关闭,补交方式提交保存后不可修改;"}),(0,_.jsx)("div",{children:"2.补交截止时间必须晚于作业截止时间;"}),(0,_.jsx)("div",{children:"3.班级阶段进入“补交中”则不可变更作业截止时间。"})]})}),te.allow_late=!te.allow_late,""==V&&Q([{late_minus_score:5}]),ne(Object.assign({},te))):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:(0,_.jsx)("span",{style:{fontSize:"14px"},children:"开启补交"})})})}),(null==te?void 0:te.allow_late)&&(0,_.jsxs)("div",{className:ye,style:{borderTop:"1px solid #fff",paddingLeft:54},children:[(0,_.jsxs)("div",{children:[(0,_.jsx)("span",{style:{color:"#333333"},children:"补交方式:"}),(0,_.jsxs)(ue.ZP.Group,{disabled:Z||(null==z?void 0:z.anonymous_comment)||(null==z?void 0:z.allow_late),value:te.unified_late,onChange:function(e){var t;!(0,O.Rm)()||null!==(t=F.AssistantObject.hack)&&void 0!==t&&t.can_late?(te.unified_late=e.target.value,""!=V||e.target.value||Q([{late_minus_score:5}]),ne(d()({},te))):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:[(null==te?void 0:te.unified_setting)&&(0,_.jsx)(ue.ZP,{value:!0,style:{color:"#333333"},disabled:!(null!=z&&z.manage_all_group),children:" 统一补交 "}),(null==z||null===(b=z.group_settings)||void 0===b?void 0:b.length)&&(0,_.jsx)(ue.ZP,{value:!1,style:{color:"#333333"},children:" 分班补交 "})]})]}),null!=te&&te.unified_late?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(ae.Z,{align:"middle",className:"mt25",children:[(0,_.jsx)(oe.Z,{style:{color:"#333333"},children:"补交扣分:"}),(0,_.jsx)(oe.Z,{className:"ml5",children:(0,_.jsx)(Ne.Z,{disabled:Z||se,value:{type:te.penalty_type,inputValue:te.late_minus_score},onChange:function(e){var t;!(0,O.Rm)()||null!==(t=F.AssistantObject.hack)&&void 0!==t&&t.can_late?ne(d()(d()({},te),{},{late_minus_score:e.inputValue,penalty_type:e.type})):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}})}),(0,_.jsx)(oe.Z,{flex:"1",className:"ml5",children:(0,_.jsx)("span",{className:"c-grey-c ml10",children:te.penalty_type===Ne.Q.Number?"(补交时按照学生总成绩扣分)":"(学生最终得分=补交前得分+补交阶段增加的分值*(100%-百分比%))"})})]}),(0,_.jsxs)(ae.Z,{align:"middle",className:"mt25",children:[(0,_.jsx)(oe.Z,{style:{color:"#333333"},children:"补交截止时间:"}),(0,_.jsx)(oe.Z,{className:"ml5",children:(0,_.jsx)(me.default,{size:"large",allowClear:!1,style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:k()((0,L.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:Z||se,value:te.late_time?k()(te.late_time):"",disabledDate:function(e){return(0,Fe.Q8)(e,null==z?void 0:z.course_end_date)},disabledTime:function(e){return(0,Fe.d0)(e)},onChange:function(e,t){var n;!(0,O.Rm)()||null!==(n=F.AssistantObject.hack)&&void 0!==n&&n.can_late?(te.late_time=t,ne(Object.assign({},te))):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}})}),(0,_.jsx)(oe.Z,{children:(0,_.jsx)("span",{className:"c-grey-c ml10",children:"(学生“延时”提交作品的时间截点)"})})]})]}):V.map((function(e,t){var n;return(0,_.jsx)(oe.Z,{span:24,children:(0,_.jsxs)(ae.Z,{className:"mt25",align:"middle",children:[(0,_.jsxs)(oe.Z,{children:[(0,_.jsxs)("span",{style:{minWidth:80,display:"inline-block",color:"#333333"},children:["补交规则",t+1,":"]}),(0,_.jsx)(ce.default,{size:"large",disabled:Z||!(null!=B&&null!==(n=B.homework_status)&&void 0!==n&&n.includes("未发布"))&&e.id||(null==z?void 0:z.anonymous_comment),mode:"multiple",className:"".concat(xe),style:{width:200},value:"string"==typeof e.group_name?[e.group_name]:e.group_name,placeholder:"请选择分班名称",onChange:function(n){var a;!(0,O.Rm)()||null!==(a=F.AssistantObject.hack)&&void 0!==a&&a.can_late?(V[t].group_name=n,V[t].group_id=e.group_id,Q(V.slice())):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:z.group_settings&&z.group_settings.map((function(e){return null!=te&&te.unified_setting&&!V.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||U.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))&&!V.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))?(0,_.jsx)(ze,{value:e.group_name,children:e.group_name},e.id):void 0}))})]}),(0,_.jsxs)(oe.Z,{className:"ml20",style:{display:"flex",alignItems:"center"},children:[(0,_.jsx)("div",{style:{color:"#333333"},children:"补交扣分:"}),(0,_.jsx)(Ne.Z,{disabled:Z||le(e.id),value:{type:e.penalty_type,inputValue:e.late_minus_score},onChange:function(e){var n;!(0,O.Rm)()||null!==(n=F.AssistantObject.hack)&&void 0!==n&&n.can_late?(V[t].late_minus_score=e.inputValue,V[t].penalty_type=e.type,Q(he()(V))):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}})]}),(0,_.jsxs)(oe.Z,{className:"ml20",children:[(0,_.jsx)("span",{style:{color:"#333333"},children:"补交截止时间:"}),(0,_.jsx)(me.default,{size:"large",disabled:Z||le(e.id),style:{width:200},showTime:{format:"HH:mm",defaultValue:k()((0,L.U6)(),"HH:mm")},placeholder:"请选择截止时间",disabledDate:function(e){return(0,Fe.Q8)(e,null==z?void 0:z.course_end_date)},disabledTime:function(e){return(0,Fe.d0)(e)},format:"YYYY-MM-DD HH:mm",value:null!=e&&e.late_time?k()(e.late_time):void 0,onChange:function(e,n){var a;!(0,O.Rm)()||null!==(a=F.AssistantObject.hack)&&void 0!==a&&a.can_late?(V[t].late_time=n,Q(he()(V))):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}})]}),!Z&&(0,_.jsxs)(oe.Z,{className:"ml20",children:[t>0&&!e.id&&(0,_.jsx)(Pe.Z,{className:"mr10",style:{color:"#E30000"},onClick:function(){V=V.filter((function(e,n){return t!==n})),Q(V.slice()),setTimeout((function(){return Q(V.slice())}),10)}}),(0,_.jsx)(we.Z,{className:"c-green",onClick:function(){var e;!(0,O.Rm)()||null!==(e=F.AssistantObject.hack)&&void 0!==e&&e.can_late?Q(V.concat({penalty_type:Ne.Q.Percent,late_minus_score:20})):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}})]})]})},t)}))]}),!Z&&(0,_.jsx)(P.ZP,{type:"primary",size:"large",style:{width:138},className:"mt30",loading:H,onClick:function(){return function(){var e,t;if(2!==(null==N||null===(e=N.userInfo)||void 0===e?void 0:e.user_status)){var n=JSON.parse(JSON.stringify(te));if(n.categoryId=M.categoryId,te.unified_setting||(U=null===(t=U)||void 0===t?void 0:t.map((function(e){var t;if(!e.publish_time||!e.end_time)throw u.ZP.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw u.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null===(t=z.group_settings)||void 0===t?void 0:t.filter((function(t){var n;return null==e||null===(n=e.group_name)||void 0===n?void 0:n.includes(t.group_name)})).map((function(e){return e.group_id||e.id})).toString().split(","),e}))),n.group_settings=U,te.allow_late)if(te.unified_late){if(null===te.late_minus_score||void 0===te.late_minus_score||te.late_minus_score<0||te.late_minus_score>100)throw u.ZP.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!te.late_time)throw u.ZP.error("请把截止时间填写完整"),new String("请把截止时间填写完整")}else{var a;V=null===(a=V)||void 0===a?void 0:a.map((function(e){var t;if(null===e.late_minus_score||void 0===e.late_minus_score||e.late_minus_score<0||e.late_minus_score>100)throw u.ZP.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw u.ZP.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw u.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(t=t.map((function(e){var t,n=null===(t=z.group_settings)||void 0===t||null===(t=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===t?void 0:t[0];return null==n?void 0:n.group_id})))||void 0===t?void 0:t.toString().split(","),e})),n.allow_late_settings=V}1===n.send_type&&(n.difficult_settings=n.difficult_settings.map((function(e){return e||0}))),re(n)}else(0,Ge.Rd)()}()},children:"保存"})]})}));function Te(e,t){for(var n=[],a=e;a<t;a++)n.push(a);return n}var Ce=function(e){var t=new Date,n=k()(e).format("HH");if(k()(e).isSame(k()(t),"day")){var a=k()(t).format("HH"),o=k()(t).format("mm");return{disabledHours:function(){return Te(0,24).splice(1,1*a-1)},disabledMinutes:function(){return console.log("禁止时间:",n,a),k()(e).isSame(k()(t),"hour")&&n<=a?Te(0,60).splice(0,o):Te(60,60)}}}if(k()(e).isSame(k()(),"day")){var i=k()().format("HH"),g=k()().format("mm");return{disabledHours:function(){return Te(0,24).splice(0,i)},disabledMinutes:function(){return n<=i?Te(0,g):Te(60,60)}}}},Ae=me.default.RangePicker,Ze=ce.default.Option,Ee=(0,c.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n,a=e.shixunHomeworks,i=(e.loading,e.dispatch),r=(0,c.useParams)(),s=((0,c.useLocation)(),a.workSetting),S=a.workList,w=(a.changeData,(0,h.useState)(!0)),p=l()(w,2),f=p[0],v=p[1],y=(0,h.useState)({}),x=l()(y,2),b=(x[0],x[1],(0,h.useState)(!1)),j=l()(b,2),N=j[0],F=j[1],G=ne.Z.useForm(),M=(l()(G,1)[0],(0,h.useState)([])),z=l()(M,2),B=z[0],T=z[1],C=(0,h.useState)([]),A=l()(C,2),Z=A[0],E=A[1],I=(0,h.useState)([]),O=l()(I,2),D=(O[0],O[1],(0,h.useRef)(!0)),H=(0,h.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,open_code:!1,rank_forbidden:!1,hack_analysis:!1,hack_answer:!1,open_code_type:void 0,hack_analysis_type:2,hack_answer_type:1,comment_public:!0,total_score:"",eff_score:0,rank_forbidden_start:"",rank_forbidden_end:"",show_late_code:!0}),R=l()(H,2),W=R[0],Y=R[1];(0,h.useEffect)((function(){return function(){T([].concat())}}),[]),(0,h.useEffect)((function(){null!=s&&s.can_edit&&v(!1)}),[s]);var U=function(e){return e&&e<k()().startOf("day")};(0,h.useEffect)((function(){var e;null!=s&&s.course_id&&D.current&&(D.current=!1,Object.keys(W).map((function(e){void 0!==s[e]&&(W[e]=s[e])})),W.allow_late&&W.unified_late||(W.late_penalty=5),B=JSON.parse(JSON.stringify(s.group_settings.map((function(e){return d()(d()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),Z=JSON.parse(JSON.stringify(s.allow_late_settings.map((function(e){return d()(d()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.rank_forbidden_start})))),Y(d()({},W)),console.log(W,s,"data"),T(he()(B)),(null===(e=Z)||void 0===e?void 0:e.length)<=0?E([{}]):E(he()(Z)))}),[s]);var q=function(e){if(console.log(e.total_score,e.eff_score),null!==e.total_score)if(null!=e&&e.work_efficiency&&null===e.eff_score)u.ZP.warning("效率分不能为空");else{e.shixun_evaluation;var t=function(){var t=g()(o()().mark((function t(){return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return F(!0),t.next=3,(0,m.ZP)("/api/homework_commons/".concat(r.categoryId,"/public_setting.json"),{method:"post",body:d()({},e)});case 3:0===t.sent.status&&(u.ZP.success("更新成功"),i({type:"shixunHomeworks/getWorkSetting",payload:d()({},r)}),i({type:"shixunHomeworks/getWorkList",payload:d()({},r)})),F(!1);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}else u.ZP.warning("总分值不能为空")};return(0,_.jsxs)("section",{className:fe,children:[(0,_.jsx)("div",{className:ve,children:"公开设置"}),(0,_.jsx)("div",{className:ye,style:{padding:0},children:(0,_.jsxs)(ae.Z,{children:[(0,_.jsxs)(oe.Z,{span:24,className:Le,children:[(0,_.jsx)(ge.Z,{checked:W.score_open,disabled:f,onChange:function(e){W.score_open=e.target.checked,Y(Object.assign({},W))},children:(0,_.jsx)("span",{className:"font14 c-grey-333",children:"公开成绩"})}),(0,_.jsx)("span",{className:"c-grey-666 font14",children:"(勾选后学生在作业截止/补交结束后,可查看其他学生的成绩)"})]}),(0,_.jsxs)(oe.Z,{span:24,className:Le,style:{borderBottom:W.open_code?"none":"1px solid #fff"},children:[(0,_.jsx)(ge.Z,{checked:W.open_code,disabled:f,onChange:function(e){W.open_code=e.target.checked,e.target.checked&&(W.open_code_type=1),Y(Object.assign({},W))},children:(0,_.jsx)("span",{className:"font14 c-grey-333",children:"公开代码"})}),(0,_.jsx)("span",{className:"c-grey-666 font14",children:"(设置学生可在排行榜中查看他人试题通过代码详情)"})]}),!!W.open_code&&(0,_.jsx)(oe.Z,{span:24,className:Le,children:(0,_.jsxs)(ue.ZP.Group,{style:{marginLeft:"24px"},disabled:f,value:W.open_code_type,onChange:function(e){W.open_code_type=e.target.value,Y(Object.assign({},W))},children:[(0,_.jsx)(ue.ZP,{value:1,style:{color:"#333333"},children:"作业结束后"}),(0,_.jsx)(ue.ZP,{value:0,style:{marginLeft:60,color:"#333333"},children:"任意时间"})]})}),(0,_.jsxs)(oe.Z,{span:24,className:Le,style:{borderBottom:W.rank_forbidden&&W.unified_setting||!W.unified_setting&&(null===(t=B)||void 0===t?void 0:t.length)>0&&W.rank_forbidden?"none":"1px solid #fff"},children:[(0,_.jsx)(ge.Z,{checked:W.rank_forbidden,disabled:f,onChange:function(e){W.rank_forbidden=e.target.checked,Y(Object.assign({},W))},children:(0,_.jsx)("span",{className:"font14",children:"开启封榜"})}),(0,_.jsx)("span",{className:"c-grey-666 font14",children:"(设置学生不可查看排行榜信息的时间段)"})]}),!!W.rank_forbidden&&W.unified_setting&&(0,_.jsx)(oe.Z,{span:24,className:Le,style:{height:"50px",lineHeight:"50px"},children:(0,_.jsx)("div",{style:{marginLeft:"24px"},children:(0,_.jsxs)(ae.Z,{align:"middle",children:[(0,_.jsx)(oe.Z,{children:"开始时间"}),(0,_.jsx)(oe.Z,{className:"ml10",children:(0,_.jsx)(me.default,{size:"large",style:{width:370},placeholder:"请选择开始时间(学生看不到排行榜的开始时间)",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:U,disabledTime:Ce,disabled:f||k()()>k()(s.rank_forbidden_start),value:W.rank_forbidden_start?k()(W.rank_forbidden_start):"",onChange:function(e,t){W.rank_forbidden_start=t,""!=W.end_time&&W.end_time||!W.unified_setting||(W.end_time=k()(e).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),Y(Object.assign({},W))}})}),(0,_.jsx)(oe.Z,{className:"ml20",children:"截止时间"}),(0,_.jsx)(oe.Z,{className:"ml10",children:(0,_.jsx)(me.default,{size:"large",style:{width:370},allowClear:!1,placeholder:"请选择截止时间(学生看不到排行榜的结束时间)",showTime:{format:"HH:mm",defaultValue:k()((0,L.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:f,disabledDate:U,value:W.rank_forbidden_end?k()(W.rank_forbidden_end):"",onChange:function(e,t){W.rank_forbidden_end=t,Y(Object.assign({},W))}})})]})})}),!W.unified_setting&&(null===(n=B)||void 0===n?void 0:n.length)>0&&!!W.rank_forbidden&&(0,_.jsx)(ae.Z,{align:"middle",style:{borderBottom:"1px solid #fff",paddingBottom:"5px",width:"100%"},children:Z.map((function(e,t){var n,a,o;return(0,_.jsx)(oe.Z,{span:24,style:{marginLeft:"24px"},children:(0,_.jsxs)(ae.Z,{className:"mt10 ml30",align:"middle",children:[(0,_.jsxs)(oe.Z,{children:[(0,_.jsxs)("span",{style:{color:"#666"},children:["封榜规则",t+1,":"]}),(0,_.jsx)(ce.default,{size:"large",disabled:f||!(null!=S&&null!==(n=S.homework_status)&&void 0!==n&&n.includes("未发布"))&&e.id,mode:"multiple",className:xe,style:{width:250},value:"string"==typeof e.group_name?[e.group_name]:e.group_name,placeholder:"请选择分班名称",onChange:function(n){Z[t].group_name=n,Z[t].group_id=e.group_id,E(Z.slice())},children:s.group_settings&&s.group_settings.map((function(e){return null!=W&&W.unified_setting&&!Z.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||B.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))&&!Z.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))?(0,_.jsx)(Ze,{value:e.group_name,children:e.group_name},e.id):void 0}))})]}),(0,_.jsx)(oe.Z,{span:15,children:(0,_.jsx)("div",{className:"ml20",children:(0,_.jsx)(Ae,{size:"large",allowClear:!1,disabled:f||!(null==s||null===(a=s.group_settings)||void 0===a||null===(a=a.filter((function(t){return t.id===e.id})))||void 0===a||null===(a=a[0])||void 0===a||!a.rank_forbidden_start)&&(!(k()()<k()(null==s||null===(o=s.group_settings)||void 0===o||null===(o=o.filter((function(t){return t.id===e.id})))||void 0===o||null===(o=o[0])||void 0===o?void 0:o.rank_forbidden_start))&&[!0,!1]),style:{width:635},placeholder:["开始时间(学生看不到排行榜的开始时间)","结束时间(学生看不到排行榜的结束时间)"],disabledDate:U,disabledTime:Ce,showTime:{format:"HH:mm",defaultValue:[k()((0,L.U6)(),"HH:mm"),k()((0,L.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:e.rank_forbidden_start&&[k()(e.rank_forbidden_start),e.rank_forbidden_end?k()(e.rank_forbidden_end):void 0],onChange:function(e,n){Z[t].rank_forbidden_start=n[0],Z[t].rank_forbidden_end=n[1],E(he()(Z))}})})}),!f&&(0,_.jsxs)(oe.Z,{children:[(0,_.jsx)(we.Z,{className:"c-green",onClick:function(){E(Z.concat({}))}}),t>0&&!e.id&&(0,_.jsx)(Pe.Z,{className:"c-red ml10",onClick:function(){Z=Z.filter((function(e,n){return t!==n})),E(Z.slice()),setTimeout((function(){return E(Z.slice())}),10)}})]})]})},t)}))}),(0,_.jsxs)(oe.Z,{span:24,className:Le,style:{borderBottom:W.hack_analysis?"none":"1px solid #fff"},children:[(0,_.jsx)(ge.Z,{checked:W.hack_analysis,disabled:f,onChange:function(e){W.hack_analysis=e.target.checked,e.target.checked&&(W.hack_analysis_type=2),Y(Object.assign({},W))},children:(0,_.jsx)("span",{className:"font14 c-grey-333",children:"公开解析"})}),(0,_.jsx)("span",{className:"c-grey-666 font14",children:"(设置学生在实验页面查看试题解析)"})]}),!!W.hack_analysis&&(0,_.jsx)(oe.Z,{span:24,className:Le,children:(0,_.jsxs)(ue.ZP.Group,{style:{marginLeft:"24px"},disabled:f,value:W.hack_analysis_type,onChange:function(e){W.hack_analysis_type=e.target.value,Y(Object.assign({},W))},children:[(0,_.jsx)(ue.ZP,{value:2,style:{color:"#333333"},children:"作业结束后"}),(0,_.jsx)(ue.ZP,{style:{marginLeft:60,color:"#333333"},value:0,children:"任意时间"}),(0,_.jsx)(ue.ZP,{style:{marginLeft:60,color:"#333333"},value:1,children:"学生通过答题后/未通过的学生作业截止后"})]})}),(0,_.jsxs)(oe.Z,{span:24,className:Le,style:{borderBottom:W.hack_answer?"none":"1px solid #fff"},children:[(0,_.jsx)(ge.Z,{checked:W.hack_answer,disabled:f,onChange:function(e){W.hack_answer=e.target.checked,e.target.checked&&(W.hack_answer_type=1),Y(Object.assign({},W))},children:(0,_.jsx)("span",{className:"font14 c-grey-333",children:"公开答案"})}),(0,_.jsx)("span",{className:"c-grey-666 font14",children:"(设置学生在实验页面查看试题答案)"})]}),!!W.hack_answer&&(0,_.jsx)(oe.Z,{span:24,className:Le,children:(0,_.jsxs)(ue.ZP.Group,{style:{marginLeft:"24px"},disabled:f,value:W.hack_answer_type,onChange:function(e){W.hack_answer_type=e.target.value,Y(Object.assign({},W))},children:[(0,_.jsx)(ue.ZP,{value:1,style:{color:"#333333"},children:"作业结束后"}),(0,_.jsx)(ue.ZP,{value:0,style:{marginLeft:60,color:"#333333"},children:"任意时间"})]})})]})}),(0,_.jsx)("div",{className:"".concat(ve," mt30"),children:"学生实验报告代码展示设置"}),(0,_.jsx)("div",{className:ye,children:(0,_.jsxs)(ge.Z,{disabled:f,checked:W.show_late_code,onChange:function(){W.show_late_code=!W.show_late_code,Y(Object.assign({},W))},children:[(0,_.jsx)("span",{className:"c-black",children:"展示所有评测代码"}),(0,_.jsx)("span",{className:"c-grey-666 ml10",children:"(勾选后,展示所有评测代码,否则只展示在作业时间范围内提交的代码)"})]})}),!f&&(0,_.jsx)(P.ZP,{type:"primary",size:"large",style:{width:138},className:"mt30",loading:N,onClick:function(){return function(){var e,t=JSON.parse(JSON.stringify(W));if(t.categoryId=r.categoryId,W.unified_setting||(B=null===(e=B)||void 0===e?void 0:e.map((function(e){var t;if(!e.publish_time||!e.end_time)throw u.ZP.error("请把开始时间填写完整"),new String("请把开始时间填写完整");if(!e.group_name)throw u.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null===(t=s.group_settings)||void 0===t?void 0:t.filter((function(t){var n;return null==e||null===(n=e.group_name)||void 0===n?void 0:n.includes(t.group_name)})).map((function(e){return e.group_id||e.id})).toString().split(","),e}))),t.group_settings=B,W.rank_forbidden)if(W.unified_setting){if(!W.rank_forbidden_start)throw u.ZP.error("请把开始时间填写完整"),new String("请把开始时间填写完整");if(!W.rank_forbidden_end)throw u.ZP.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(k()(W.rank_forbidden_end)<k()(W.rank_forbidden_start))throw u.ZP.error("截止时间不能早于开始时间"),new String("截止时间不能早于开始时间")}else{var n;Z=null===(n=Z)||void 0===n?void 0:n.map((function(e){var t;if(!e.rank_forbidden_start)throw u.ZP.error("请把开始时间填写完整"),new String("请把开始时间填写完整");if(!e.rank_forbidden_end)throw u.ZP.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw u.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(t=e.group_name)||void 0===t||null===(t=t.map((function(e){var t,n=null===(t=s.group_settings)||void 0===t||null===(t=t.filter((function(t){return(null==t?void 0:t.group_name)===e})))||void 0===t?void 0:t[0];return null==n?void 0:n.group_id})))||void 0===t?void 0:t.toString().split(","),e})),t.group_settingss=Z}q(t)}()},children:"保存"})]})})),Ie=(0,c.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var t,n=e.shixunHomeworks,a=(e.loading,e.dispatch),i=(0,c.useParams)(),r=n.workSetting,s=n.workList,w=(n.changeData,(0,h.useState)(!0)),p=l()(w,2),f=p[0],v=p[1],y=(0,h.useState)(!1),L=l()(y,2),x=L[0],b=L[1],j=(0,h.useState)(!1),k=l()(j,2),N=(k[0],k[1],ne.Z.useForm()),F=(l()(N,1)[0],(0,h.useState)([])),G=l()(F,2),M=G[0],z=G[1],B=(0,h.useState)([]),T=l()(B,2),C=T[0],A=T[1],Z=!(null!=s&&null!==(t=s.homework_status)&&void 0!==t&&t.includes("未发布")),E=(0,h.useRef)(!0),I=(0,h.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,is_onpage_time:!0,training_time_rules:1,hack_settings:[],punish_time:void 0,hack_score_settings:void 0,hack_rank_rule:0}),O=l()(I,2),D=O[0],H=O[1];(0,h.useEffect)((function(){return function(){z([].concat())}}),[]),(0,h.useEffect)((function(){null!=r&&r.can_edit&&v(!1)}),[r]);(0,h.useEffect)((function(){null!=r&&r.course_id&&E.current&&(E.current=!1,Object.keys(D).map((function(e){D[e]=r[e]})),D.allow_late&&D.unified_late||(D.late_penalty=5),M=JSON.parse(JSON.stringify(r.group_settings.map((function(e){return d()(d()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),C=JSON.parse(JSON.stringify(r.allow_late_settings.map((function(e){return d()(d()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),W(),H(d()({},D)),z(he()(M)),A(he()(C)))}),[r]);var R=function(e){if(console.log(e.total_score,e.eff_score),null!==e.total_score){var t=function(){var t=g()(o()().mark((function t(){return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return b(!0),t.next=3,(0,m.ZP)("/api/homework_commons/".concat(i.categoryId,"/hack_score_setting.json"),{method:"post",body:d()({},e)});case 3:0===t.sent.status&&(u.ZP.success("更新成功"),a({type:"shixunHomeworks/getWorkSetting",payload:d()({},i)}),a({type:"shixunHomeworks/getWorkList",payload:d()({},i)})),b(!1);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(null==D?void 0:D.hack_score_settings)!==(null==r?void 0:r.hack_score_settings)&&Z?S.Z.confirm({title:"更新成绩",content:"您改动了本次作业的得分设置,这可能导致已完成作业的学生的成绩产生错误。点击“确定”按钮将保存最新设置并按最新设置更新全班成绩。",okText:"确认",cancelText:"取消",onOk:t}):t()}else u.ZP.warning("总分值不能为空")},W=function(){var e,t=D.total_score,n=null===(e=D.hack_settings)||void 0===e?void 0:e.length;if(n){var a,o=0;switch(D.hack_score_settings){case 0:var i=(t/n).toFixed(2);D.hack_settings.map((function(e,t){o=t,e.hack_score=i>0?i:0})),a=(t-i*(n-1)).toFixed(2),D.hack_settings[o].hack_score=a>0?a:0;break;case 1:var g=[0,1,3,6],r=0,d=t/(D.hack_settings.filter((function(e){return 1===e.difficult})).length*g[1]+D.hack_settings.filter((function(e){return 2===e.difficult})).length*g[2]+D.hack_settings.filter((function(e){return 3===e.difficult})).length*g[3]);console.log(d,2222),D.hack_settings.map((function(e,t){o=t,e.hack_score=(g[e.difficult]*d).toFixed(2),r+=Number(e.hack_score)}));var s=D.hack_settings[o].hack_score;a=(t-r+Number(s)).toFixed(2),D.hack_settings[o].hack_score=a>0?a:0}}},Y=0===(null==r?void 0:r.send_type)||1===(null==r?void 0:r.send_type)&&2===(null==D?void 0:D.hack_score_settings);return(0,_.jsxs)("section",{className:fe,children:[(0,_.jsx)("div",{className:ve,children:"分值设置"}),(0,_.jsx)("div",{className:"".concat(ye," mb30"),children:(0,_.jsxs)(ae.Z,{align:"middle",children:[(0,_.jsxs)(ae.Z,{align:"middle",children:[(0,_.jsx)("span",{className:"c-grey-333",children:"总分值"}),(0,_.jsx)(Se.Z,{min:0,className:"ml20",style:{width:220},size:"large",value:D.total_score,disabled:f||Z,onChange:function(e){D.total_score=e,H(Object.assign({},D)),W()},addonAfter:"分"})]}),(0,_.jsxs)(ae.Z,{align:"middle",style:{marginLeft:60},children:[(0,_.jsx)("span",{className:"c-grey-333",children:"测评单次报错增加时长"}),(0,_.jsx)(Se.Z,{className:"ml20",style:{width:220},size:"large",min:0,value:D.punish_time,precision:0,disabled:f,onChange:function(e){D.punish_time=e,H(Object.assign({},D)),W()},addonAfter:"分钟"})]})]})}),(0,_.jsx)("div",{className:ve,children:"排行榜时间名次规则"}),(0,_.jsx)("div",{className:"".concat(ye," mb30"),children:(0,_.jsxs)(ue.ZP.Group,{disabled:f,value:D.hack_rank_rule,onChange:function(e){D.hack_rank_rule=e.target.value,H(Object.assign({},D))},children:[(0,_.jsxs)(ue.ZP,{value:0,children:[(0,_.jsx)("span",{className:"c-black",children:"耗时时长优先"}),(0,_.jsx)("span",{className:"c-grey-666 font14",children:"(同成绩,耗时越短名次越前)"})]}),(0,_.jsxs)(ue.ZP,{style:{marginLeft:40},value:1,children:[(0,_.jsx)("span",{className:"c-black",children:"完成时间点优先"}),(0,_.jsx)("span",{className:"c-grey-666 font14",children:"(同成绩,完成时间越早名次越前)"})]})]})}),(0,_.jsx)("div",{className:ve,children:"试题分值"}),(0,_.jsx)("div",{className:ye,children:(0,_.jsxs)(ue.ZP.Group,{value:D.hack_score_settings,onChange:function(e){D.hack_score_settings=e.target.value,H(Object.assign({},D)),W()},children:[(0,_.jsx)(ue.ZP,{value:0,children:"均分比例"}),(0,_.jsx)(ue.ZP,{style:{margin:"0 40px"},value:1,children:"难易度"}),(0,_.jsx)(ue.ZP,{value:2,children:"自定义分值"})]})}),(0,_.jsx)("div",{className:ye,style:{borderTop:"1px solid #fff"},children:(0,_.jsx)("div",{style:{padding:"0px 20px 20px 20px"},children:D.hack_settings&&D.hack_settings.map((function(e,t){return(0,_.jsxs)(ae.Z,{align:"middle",style:{marginTop:20},children:[(0,_.jsx)(oe.Z,{flex:"1",className:"pr10",children:(0,_.jsx)("span",{style:{color:"#333333"},children:e.hack_name})}),(0,_.jsx)(oe.Z,{flex:"150px",children:(0,_.jsx)(Se.Z,{min:0,step:.1,style:{visibility:Y?"visible":"hidden"},value:e.hack_score,disabled:2!==D.hack_score_settings,onChange:function(e){D.hack_settings[t].hack_score=e;var n=D.hack_settings.reduce((function(e,t){return e+Number(t.hack_score)}),0);D.total_score=n.toFixed(2),H(d()({},D))},size:"large",addonAfter:"分"})}),(0,_.jsxs)(oe.Z,{className:"ml20",style:{lineHeight:"20px"},children:[1===e.difficult&&(0,_.jsx)("span",{className:"tag-style-border-small bg-green c-white mr10",children:"简单"}),2===e.difficult&&(0,_.jsx)("span",{className:"tag-style-border-small bg-blue c-white mr10",children:"适中"}),3===e.difficult&&(0,_.jsx)("span",{className:"tag-style-border-small bg-orange c-white mr10",children:"困难"})]})]},t)}))})}),!f&&(0,_.jsx)(P.ZP,{type:"primary",size:"large",style:{width:138},className:"mt30",loading:x,onClick:function(){return e=JSON.parse(JSON.stringify(D)),void R(e);var e},children:"保存"})]})})),Oe=(0,c.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){e.shixunHomeworks,e.loading,e.dispatch;var t,n,a=(0,h.useState)(!0),i=l()(a,2),r=(i[0],i[1],(0,h.useState)(!1)),d=l()(r,2),s=d[0],w=d[1],p=(0,h.useState)([]),f=l()(p,2),y=f[0],L=f[1],x=(0,h.useState)([]),b=l()(x,2),j=b[0],k=b[1],N=(0,h.useState)([]),F=l()(N,2),G=F[0],M=F[1],z=(0,h.useState)([]),B=l()(z,2),T=B[0],C=B[1],A=(0,h.useState)(!1),Z=l()(A,2),E=Z[0],I=Z[1],O=(0,h.useState)(""),D=l()(O,2),H=D[0],R=D[1],W=(0,c.useParams)();function Y(){return U.apply(this,arguments)}function U(){return(U=g()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/homework_commons/".concat(W.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:t=e.sent,k(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return K.apply(this,arguments)}function K(){return(K=g()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/courses/".concat(null==W?void 0:W.coursesId,"/teachers"),{method:"get",params:{homework_id:W.categoryId,limit:1e3}});case 2:null==(n=e.sent)||null===(t=n.teacher_list)||void 0===t||t.map((function(e){e.key=e.user_id})),M(null==n?void 0:n.teacher_list),C(null==n?void 0:n.teacher_list);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,h.useEffect)((function(){Y(),q()}),[W]);return(0,_.jsxs)("section",{className:fe,children:[(0,_.jsxs)(ae.Z,{className:ye,style:{padding:"20px 30px",gap:20},children:[null==j||null===(t=j.data)||void 0===t?void 0:t.map((function(e){return(0,_.jsxs)(ae.Z,{align:"middle",className:"".concat(_e," ").concat(H===(null==e?void 0:e.id)?je:""),style:{height:"38px",borderRadius:"2px",padding:"0 12px",color:"#333333",background:"#fff"},children:[(0,_.jsx)("span",{className:"c-grey-333",children:null==e?void 0:e.real_name}),(null==j?void 0:j.can_edit)&&(0,_.jsx)("span",{style:{cursor:"pointer",marginLeft:"20px"},className:"iconfont icon-guanbi11 ".concat(be),onMouseEnter:function(){R(e.id)},onMouseLeave:function(){R("")},onClick:g()(o()().mark((function t(){return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,m.ZP)("/api/homework_commons/".concat(W.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:e.id}});case 2:0===t.sent.status&&(u.ZP.info("删除成功"),Y(),q());case 4:case"end":return t.stop()}}),t)})))})]})})),!(null!=j&&j.can_edit)&&!(null!=j&&null!==(n=j.data)&&void 0!==n&&n.length)&&(0,_.jsx)("span",{className:"c-grey-666",children:"暂未添加协作者"}),(null==j?void 0:j.can_edit)&&(0,_.jsx)(P.ZP,{className:ke,style:{height:38,padding:"6px 15px",backgroundColor:"#fff"},type:"primary",ghost:!0,onClick:function(){return w(!0)},children:"添加协作者"})]}),(0,_.jsx)(S.Z,{title:"添加协作者",open:s,confirmLoading:E,onCancel:function(){return w(!1)},onOk:g()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==y.length){e.next=3;break}return u.ZP.info("请选择协作老师"),e.abrupt("return");case 3:return I(!0),e.next=6,(0,m.ZP)("/api/homework_commons/".concat(W.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:y}});case 6:0===e.sent.status&&(u.ZP.info("添加成功"),L([]),Y(),q(),w(!1)),I(!1);case 9:case"end":return e.stop()}}),e)}))),children:(0,_.jsxs)("div",{children:[(0,_.jsxs)("div",{style:{display:"flex"},children:[(0,_.jsx)("label",{style:{width:"50px"},children:"姓名:"})," ",(0,_.jsx)(ie.Z.Search,{onChange:function(e){M(T.filter((function(t){return t.name.indexOf(e.target.value)>-1})))}})]}),(0,_.jsx)(v.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,t){L(e)},selectedRowKeys:y,getCheckboxProps:function(e){return{disabled:e.is_collaborator}}},pagination:!1,dataSource:G,columns:[{title:"姓名",dataIndex:"name",key:"name"},{title:"角色",dataIndex:"role",key:"role"}]})]})})]})})),De=[{key:"1",label:"发布设置",element:(0,_.jsx)(Be,{})},{key:"2",label:"评分设置",element:(0,_.jsx)(Ie,{})},{key:"3",label:"展示设置",element:(0,_.jsx)(Ee,{})},{key:"4",label:"协作设置",element:(0,_.jsx)(Oe,{})}],He=function(){return(0,_.jsx)(se.Z,{dataSource:De,style:{marginBottom:52}})},Re=n(85573),We=n.n(Re),Ye=n(26724),Ue=n.n(Ye),qe=n(4900),Ke=(0,c.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading}}))((function(e){var t=e.shixunHomeworks,n=e.loading,a=e.dispatch,i=(0,c.useParams)(),r=((0,c.useLocation)(),(0,h.useState)([])),s=l()(r,2),u=s[0],P=s[1],w=(0,h.useState)([]),p=l()(w,2),f=(p[0],p[1],(0,h.useState)(!0)),y=l()(f,2),L=y[0],x=y[1],b=(0,h.useState)(!1),j=l()(b,2),N=j[0],F=j[1],G=(0,h.useState)(1),M=l()(G,2),z=M[0],B=M[1],T=(0,h.useState)([]),C=l()(T,2),A=(C[0],C[1]),Z=(0,h.useState)(!1),E=l()(Z,2),I=E[0],O=E[1],D=(0,h.useState)(!1),H=l()(D,2),R=H[0],W=H[1],Y=(0,h.useState)(!1),U=l()(Y,2),q=U[0],K=U[1];(0,h.useEffect)((function(){"代码查重"===t.actionTabs.key?(V.resetFields(),P([]),O(!0),Q()):O(!1)}),[t.actionTabs.key]);var X=ne.Z.useForm(),V=l()(X,1)[0],Q=function(){var e=g()(o()().mark((function e(){var t,n,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!L||N){e.next=11;break}return F(!0),B(z+1),e.next=5,(0,qe.JG)(d()(d()({},i),{},{page:z}));case 5:n=e.sent,a=he()(n.group_list),null!=n&&n.ungroup_list&&a.push({id:null==n?void 0:n.ungroup_list.id,name:null==n?void 0:n.ungroup_list.name,works_count:null==n?void 0:n.ungroup_list.work_count,last_review_time:null==n?void 0:n.ungroup_list.last_review_time}),P([].concat(he()(u),he()(a))),F(!1),(null===(t=n.group_list)||void 0===t?void 0:t.length)<10&&x(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),J=function(){a({type:"shixunHomeworks/setActionTabs",payload:{}}),W(!1),x(!0),F(!1),B(1),P([]),V.resetFields()},$=[{title:"",dataIndex:"id",width:280,render:function(e,t){return(0,_.jsx)(ge.Z,{disabled:!(t.works_count>1),value:String(t.id),children:t.name})}},{title:"有效作品数",dataIndex:"works_count"},{title:"上次查重时间",dataIndex:"last_review_time",width:130}];return(0,_.jsxs)(S.Z,{centered:!0,title:"代码查重",keyboard:!1,maskClosable:!1,open:I,okText:"确认",cancelText:"取消",width:820,bodyStyle:{minHeight:200},onOk:g()(o()().mark((function e(){var n,g;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=V.getFieldValue(),K(!0),e.next=4,(0,m.ZP)("/api/homework_commons/".concat(i.categoryId,"/hack_homework_code_repeat.json"),{method:"post",body:{group_ids:he()(n.group_ids)}});case 4:if(g=e.sent,K(!1),0!==g.status){e.next=12;break}return J(),e.next=10,a({type:"shixunHomeworks/getWorkList",payload:t.actionTabs.params});case 10:c.history.push("/classrooms/".concat(i.coursesId,"/program_homework/").concat(i.categoryId,"/detail?tabs=2")),a({type:"shixunHomeworks/setActionTabs",payload:{key:"执行代码查重"}});case 12:case"end":return e.stop()}}),e)}))),okButtonProps:{loading:q},onCancel:J,children:[(0,_.jsx)("div",{children:"请注意:在执行代码查重操作后,若学生提交新的作品代码,新作品代码不计入本次查重结果。"}),t.codeReviewCourse&&(0,_.jsxs)(ne.Z,{form:V,onChange:function(e){A(d()({},V.getFieldValue()))},initialValues:We()(We()({},"group_ids",[]),"end_time",k()(k()().add(7,"days").format("YYYY-MM-DD HH:mm"))),children:[(0,_.jsx)("div",{className:"flexd-table-header mt20",children:(0,_.jsx)(v.Z,{pagination:!1,dataSource:[],columns:$})}),(0,_.jsx)(ne.Z.Item,{name:"group_ids",children:(0,_.jsx)(ge.Z.Group,{className:"w100",children:(0,_.jsx)("div",{style:{width:"100%",maxHeight:260,overflow:"auto"},children:(0,_.jsx)(Ue(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){Q()},hasMore:L,useWindow:!1,children:(0,_.jsx)(v.Z,{loading:n.effects["shixunHomeworks/getCodeReviewCourse"],showHeader:!1,columns:$,dataSource:u,pagination:!1})})})})})]}),(0,_.jsx)(ae.Z,{children:(0,_.jsx)(oe.Z,{className:"ml10",children:(0,_.jsx)(ge.Z,{checked:R,onChange:function(e){W(e.target.checked);var t=[];e.target.checked&&(t=u.filter((function(e){return e.works_count>1})).map((function(e){return e.id+""}))),V.setFieldsValue(We()({},"group_ids",t))},children:"全选"})})})]})})),Xe=n(64916),Ve=n(82498),Qe=n(95873),Je=n(47839),$e=n(15959),et=n(98929),tt=n(94296),nt=n(57357),at=n(2755),ot=n(52230),it=[et.Z,tt.Z,nt.Z],gt=(0,c.connect)((function(e){var t=e.shixunHomeworks;return{user:e.user,shixunHomeworks:t,classroomList:e.classroomList}}))((function(e){var t,n,a,i=e.user,r=e.classroomList,s=e.shixunHomeworks,w=(0,h.useState)(d()(d()({},(0,c.useParams)()),{},{page:1,per_page:20,rank_type:2,search:"",course_group:(0,O.dE)()?[i.userInfo.course.course_group_id]:[]},(0,c.useParams)())),f=l()(w,2),y=f[0],L=f[1],x=(0,h.useState)([]),b=l()(x,2),j=b[0],k=b[1],N=(0,h.useState)([]),M=l()(N,2),z=M[0],B=M[1],T=(0,h.useState)([]),C=l()(T,2),A=C[0],Z=C[1],E=(0,h.useState)(!1),I=l()(E,2),D=I[0],H=I[1],R=(0,h.useState)(!1),W=l()(R,2),Y=W[0],U=W[1],q=(0,h.useState)([{title:"排行",dataIndex:"rank",width:70,fixed:"left",ellipsis:!0,sorter:function(e,t){return e.rank-t.rank},render:function(e,t,n){return e<4?(0,_.jsx)("img",{src:it[e-1]}):e}},{title:"姓名",dataIndex:"user_name",width:80,fixed:"left",ellipsis:!0,key:"user_name",render:function(e,t,n){return(0,_.jsxs)("span",{children:[t.is_me&&(0,_.jsx)("span",{style:{display:"inline-block",fontSize:12,color:"#CA7720",background:"rgba(255, 181, 56, 0.36)",borderRadius:2,width:16,height:16,textAlign:"center",lineHeight:"16px",transform:"translateY(-1px)"},children:"我"}),e]})}},{title:"学号",dataIndex:"student_id",key:"student_id",width:80,ellipsis:!0,fixed:"left",render:function(e){return e||"- -"}},{title:"班级",dataIndex:"course_group",key:"course_group",ellipsis:!0,width:70,fixed:"left"},{title:"通过",dataIndex:"passed_count",width:60,fixed:"left",ellipsis:!0,key:"passed_count",render:function(e){return(0,_.jsxs)("span",{children:[e," ","-"!=e&&"题"]})}},{title:"得分",dataIndex:"score",width:50,ellipsis:!0,fixed:"left",key:"score"}]),K=l()(q,2),X=K[0],V=K[1],Q=(0,h.useState)(null),J=l()(Q,2),$=J[0],ee=J[1];function te(e){return ne.apply(this,arguments)}function ne(){return(ne=g()(o()().mark((function e(t){var n,a,s,l,h,c;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return H(!0),e.next=3,(0,m.ZP)("/api/courses/rank_list.json",{method:"get",params:d()(d()({},y),{},{id:y.coursesId,rank_type:2,homework_common_id:y.categoryId})});case 3:if(n=e.sent,k(n),H(!1),-1==n.status){e.next=19;break}if((0,O.dE)()?(1===t&&B([null==n||null===(a=n.course_group)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.id]),null!=n&&n.my_rank?Z([d()({is_me:!0},null==n?void 0:n.my_rank)].concat(he()(null==n?void 0:n.rank_list))):Z(he()(null==n?void 0:n.rank_list))):Z(he()(null==n?void 0:n.rank_list)),1!==t){e.next=19;break}s={title:0===(null==n?void 0:n.hack_rank_rule)?(0,_.jsxs)(p.Z,{title:"总耗时时为做题通过时长和罚时时长的总和,\n 罚时时长=评测出错次数X设置的罚时(当前为".concat(null==n?void 0:n.punish_time,"分)"),children:[(0,_.jsx)("span",{style:{marginRight:3},children:"总耗时"})," ",(0,_.jsx)("span",{style:{fontSize:"14px"},className:"iconfont icon-tishixiaowenhao c-blue"})]}):"完成时间",dataIndex:0===(null==n?void 0:n.hack_rank_rule)?"finish_time":"finish_at",width:0===(null==n?void 0:n.hack_rank_rule)?80:150,ellipsis:!0,fixed:"left",key:"finish_time"},X.push(s),l=o()().mark((function e(t){var a,s,l;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(l={}).title=null!=n&&n.sent_type?(0,_.jsx)("span",{children:"题目"+(t+1)+"(".concat(null==n||null===(a=n.question_data)||void 0===a||null===(a=a[t])||void 0===a?void 0:a.question_score,")")}):(0,_.jsx)("a",{onClick:g()(o()().mark((function e(){var a,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/problems/".concat(null==n||null===(a=n.question_data)||void 0===a||null===(a=a[t])||void 0===a?void 0:a.identifier,"/start.json"),{method:"get"});case 2:(i=e.sent)&&(window.open("/myproblems/".concat(null==i?void 0:i.identifier,"?type=1")),localStorage.setItem("program_homework",[y.coursesId,y.categoryId]));case 4:case"end":return e.stop()}}),e)}))),children:"题目"+(t+1)+"(".concat(null==n||null===(s=n.question_data)||void 0===s||null===(s=s[t])||void 0===s?void 0:s.question_score,")")}),l.dataIndex="question_data",l.width=140,l.render=function(e,n){var a,s,l,h,c;return(0,_.jsx)("div",{children:(null==e||null===(a=e[t])||void 0===a?void 0:a.answer_question_time)&&(0,_.jsxs)("div",{children:[(0,_.jsx)("span",{style:{cursor:"pointer"},className:"iconfont icon-shixun4 c-blue",onClick:g()(o()().mark((function n(){var a,g,s,l,h,c,P,w,p;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(0,O.Rm)()||null!==(a=r.AssistantObject.hack)&&void 0!==a&&a.can_view){n.next=3;break}return u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能"),n.abrupt("return");case 3:if(null!=e&&null!==(g=e[t])&&void 0!==g&&g.open_code){n.next=6;break}return u.ZP.info("暂不允许查看代码"),n.abrupt("return");case 6:return n.next=8,(0,m.ZP)("/api/courses/view_code.json",{method:"get",params:d()(d()({},y),{},{id:y.coursesId,homework_common_id:y.categoryId,hack_user_code_id:null==e||null===(s=e[t])||void 0===s?void 0:s.hack_user_code_id})});case 8:p=n.sent,S.Z.warning({icon:null,width:800,title:(0,_.jsxs)("div",{children:[(0,_.jsx)("span",{children:"代码"}),(0,_.jsxs)("span",{children:["使用语言:",null==e||null===(l=e[t])||void 0===l?void 0:l.current_language]}),(0,_.jsxs)("span",{children:["运行内存:",null==e||null===(h=e[t])||void 0===h?void 0:h.memory,"(KB)"]}),(0,_.jsxs)("span",{children:["运行时长:",null==e||null===(c=e[t])||void 0===c?void 0:c.run_time,"(ms)"]}),(0,_.jsxs)("span",{children:["得分:",null==e||null===(P=e[t])||void 0===P?void 0:P.score]})]}),content:(0,_.jsx)(at.Z,{classroomList:r,user:i,languages:[{language:null==e||null===(w=e[t])||void 0===w?void 0:w.language,code:null==p?void 0:p.code}],v:e,shixunWorkReport:"shixunWorkReport",dispatch:"dispatch",autoHeight:!1,language:e.language,game_id:e.id,diff_code_count:e.diff_code_count})});case 10:case"end":return n.stop()}}),n)})))}),(0,_.jsx)("span",{style:{margin:"0px 10px"},children:(null==e||null===(s=e[t])||void 0===s?void 0:s.answer_question_time)||"- -"}),null!=e&&null!==(l=e[t])&&void 0!==l&&l.submit_count?(0,_.jsxs)(p.Z,{title:"".concat((null==e||null===(h=e[t])||void 0===h?void 0:h.submit_count)||0,"次尝试出错"),children:[(0,_.jsx)("span",{style:{color:"red",marginRight:5},className:"iconfont icon-Bug"}),(null==e||null===(c=e[t])||void 0===c?void 0:c.submit_count)||0]}):null]})})},X.push(l);case 6:case"end":return e.stop()}}),e)})),h=0;case 13:if(!(h<(null==n||null===(c=n.question_data)||void 0===c?void 0:c.length))){e.next=18;break}return e.delegateYield(l(h),"t0",15);case 15:h++,e.next=13;break;case 18:V(he()(X));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,h.useEffect)((function(){var e=function(){ee(function(){var e,t,n=(null===(e=document.getElementById("filterWarp"))||void 0===e?void 0:e.clientHeight)||0,a=(null===(t=document.getElementById("pagination"))||void 0===t?void 0:t.clientHeight)||0;return window.innerHeight-n-a-110}())};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),(0,h.useEffect)((function(){X.splice(7);for(var e=function(e){var t,n,a={};a.title=null!=j&&j.sent_type?(0,_.jsx)("span",{children:"题目"+(e+1)+"(".concat(null==j||null===(t=j.question_data)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.question_score,")")}):(0,_.jsx)("a",{onClick:g()(o()().mark((function t(){var n,a;return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,m.ZP)("/api/problems/".concat(null==j||null===(n=j.question_data)||void 0===n||null===(n=n[e])||void 0===n?void 0:n.identifier,"/start.json"),{method:"get"});case 2:(a=t.sent)&&(window.open("/myproblems/".concat(null==a?void 0:a.identifier,"?type=1")),localStorage.setItem("program_homework",[y.coursesId,y.categoryId]));case 4:case"end":return t.stop()}}),t)}))),children:"题目"+(e+1)+"(".concat(null==j||null===(n=j.question_data)||void 0===n||null===(n=n[e])||void 0===n?void 0:n.question_score,")")}),a.dataIndex="question_data",a.width=140,a.render=function(t,n){var a,s,l,h,c;return(0,_.jsx)("div",{children:(null==t||null===(a=t[e])||void 0===a?void 0:a.answer_question_time)&&(0,_.jsxs)("div",{children:[(0,_.jsx)("span",{style:{cursor:"pointer"},className:"iconfont icon-shixun4 c-blue",onClick:g()(o()().mark((function n(){var a,g,s,l,h,c,P,w,p;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(0,O.Rm)()||null!==(a=r.AssistantObject.hack)&&void 0!==a&&a.can_appraise){n.next=3;break}return u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能"),n.abrupt("return");case 3:if(null!=t&&null!==(g=t[e])&&void 0!==g&&g.open_code){n.next=6;break}return u.ZP.info("暂不允许查看代码"),n.abrupt("return");case 6:return n.next=8,(0,m.ZP)("/api/courses/view_code.json",{method:"get",params:d()(d()({},y),{},{id:y.coursesId,homework_common_id:y.categoryId,hack_user_code_id:null==t||null===(s=t[e])||void 0===s?void 0:s.hack_user_code_id})});case 8:p=n.sent,S.Z.warning({icon:null,width:800,title:(0,_.jsxs)("div",{children:[(0,_.jsx)("span",{children:"代码"}),(0,_.jsxs)("span",{children:["使用语言:",null==t||null===(l=t[e])||void 0===l?void 0:l.current_language]}),(0,_.jsxs)("span",{children:["运行内存:",null==t||null===(h=t[e])||void 0===h?void 0:h.memory,"(KB)"]}),(0,_.jsxs)("span",{children:["运行时长:",null==t||null===(c=t[e])||void 0===c?void 0:c.run_time,"(ms)"]}),(0,_.jsxs)("span",{children:["得分:",null==t||null===(P=t[e])||void 0===P?void 0:P.score]})]}),content:(0,_.jsx)(at.Z,{classroomList:r,user:i,languages:[{language:null==t||null===(w=t[e])||void 0===w?void 0:w.language,code:null==p?void 0:p.code}],v:t,shixunWorkReport:"shixunWorkReport",dispatch:"dispatch",autoHeight:!1,language:t.language,game_id:t.id,diff_code_count:t.diff_code_count})});case 10:case"end":return n.stop()}}),n)})))}),(0,_.jsx)("span",{style:{margin:"0px 10px"},children:(null==t||null===(s=t[e])||void 0===s?void 0:s.answer_question_time)||"- -"}),null!=t&&null!==(l=t[e])&&void 0!==l&&l.submit_count?(0,_.jsxs)(p.Z,{title:"".concat((null==t||null===(h=t[e])||void 0===h?void 0:h.submit_count)||0,"次尝试出错"),children:[(0,_.jsx)("span",{style:{color:"red",marginRight:5},className:"iconfont icon-Bug"}),(null==t||null===(c=t[e])||void 0===c?void 0:c.submit_count)||0]}):null]})})},X.push(a)},t=0;t<(null==j||null===(n=j.question_data)||void 0===n?void 0:n.length);t++){var n;e(t)}V(he()(X))}),[null==j?void 0:j.question_data]),(0,h.useEffect)((function(){var e;null!=i&&null!==(e=i.userInfo)&&void 0!==e&&e.course&&((0,O.dE)()&&(y.course_group=(0,O.dE)()?[i.userInfo.course.course_group_id]:[],L(d()({},y))),te(1))}),[null==i?void 0:i.userInfo]),console.log("----",s,X);var ae=null==s||null===(t=s.workSetting)||void 0===t?void 0:t.hack_rank_rule;return(0,_.jsx)("div",{style:{width:1200,margin:"0px auto",minHeight:Y?"100vh":""},id:"rankingInfo",children:"封榜中"===(null==j?void 0:j.message)?(0,_.jsx)(re.Z,{customText:"答题时间进入倒计时,暂时封榜,请加速竞技通关答题"}):(0,_.jsxs)("div",{style:{background:"#fff",padding:20,height:"100%",overflow:"auto"},children:[(0,_.jsxs)("div",{id:"filterWarp",children:[(0,_.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,_.jsxs)("div",{style:{display:"flex",width:"90%"},children:[(0,_.jsx)("label",{children:"分班情况:"}),(0,O.GJ)()&&(0,_.jsx)("div",{style:{flex:1},children:(0,_.jsxs)(ge.Z.Group,{className:Qe.Z.checkboxgroup,value:z,onChange:function(e){if(1===y.type)B([]),y.course_group=[],y.page=1,L(d()({},y)),te();else if(2===y.type){var t;B(["全部"].concat()),y.course_group=null==j||null===(t=j.course_group)||void 0===t?void 0:t.map((function(e){return e.id})),y.page=1,L(d()({},y)),te()}else B(he()(e.filter((function(e){return"全部"!=e})))),y.course_group=e.filter((function(e){return"全部"!=e})),y.page=1,L(d()({},y)),te()},children:[(0,_.jsx)(ge.Z,{value:"全部",style:{marginBottom:10},onChange:function(e){e.target.checked?y.type=2:y.type=1},children:"全部分班"}),null==j||null===(n=j.course_group)||void 0===n?void 0:n.map((function(e,t){return(0,_.jsx)(ge.Z,{style:{marginBottom:10},onChange:function(e){y.type=3},value:e.id,children:null==e?void 0:e.name})}))]})}),(0,O.dE)()&&(0,_.jsxs)(ue.ZP.Group,{style:{marginBottom:10},onChange:function(e){"全部"===e.target.value?(y.course_group=[],y.page=1,L(d()({},y)),te()):(y.course_group=[e.target.value],y.page=1,L(d()({},y)),te())},defaultValue:i.userInfo.course.course_group_id,children:[(0,_.jsx)(ue.ZP,{value:"全部",style:{marginBottom:10},children:"全部分班"}),null==j||null===(a=j.course_group)||void 0===a?void 0:a.map((function(e,t){return(0,_.jsx)(ue.ZP,{style:{marginBottom:10},value:e.id,children:e.name})}))]})]}),(0,_.jsxs)("div",{style:{color:"#3061D0",cursor:"pointer"},onClick:function(){Y?(0,ot.BU)():(0,ot.Dj)(document.getElementById("rankingInfo")),U(!Y)},children:[(0,_.jsx)("i",{style:{fontSize:12},className:"mr10 iconfont ".concat(Y?"icon-tuichuquanping2":"icon-quanping2")}),(0,_.jsx)("span",{children:Y?"退出全屏":"全屏展示"})]})]}),(0,_.jsxs)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",marginTop:10},children:[(0,_.jsxs)("span",{style:{fontSize:14,color:"#B1BACD"},children:["排行规则:",0===ae?"作业时间段之外的提交不计入排行。当前按实际实验时长优先,同通过题数下时长短名次靠前。":"作业时间段之外的提交不计入排行。当前按完成时间先后优先,同通过题数下完成时间越早名次靠前。"," ",(0,_.jsx)("a",{onClick:function(){S.Z.warning({title:"计分规则",width:500,content:(0,_.jsxs)("div",{children:[0===ae&&(0,_.jsx)("p",{children:"排名规则:经典ACM规则"}),(0,_.jsx)("p",{children:"AC(通过题目)越多,排名越靠前。"}),(0,_.jsx)("p",{children:"AC相同,总用时越少,排名越靠前。"}),0==ae&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("p",{children:"总用时=∑(每一个题目的用时)"}),(0,_.jsx)("p",{children:"每一个题目的用时=比赛开始到提交被通过的时间+罚时"}),(0,_.jsx)("p",{children:"罚时=(通过前)错误代码提交次数*每次罚时"}),(0,_.jsx)("p",{children:"不算罚时的情况:没有通过的题目、(系统)内部错误、编译错误"})]})]})})},children:"点击查看计分规则"})]}),(0,O.GJ)()&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ie.Z.Search,{className:"mr20",onSearch:function(e){y.page=1,y.search=e,L(d()({},y)),te()},placeholder:"请输入用户名/学号进行搜索",style:{width:250,marginLeft:"auto"}}),(0,_.jsx)(P.ZP,{onClick:function(){(0,$e.VY)(d()(d()({},y),{},{id:y.coursesId,rank_type:2,homework_common_id:y.categoryId}))},children:"导出"})]})]})]}),(0,_.jsx)(F.Z,{spinning:D,children:(0,_.jsx)(v.Z,{style:{marginTop:10},pagination:!1,scroll:{x:1200,y:Y?$:null},rowClassName:function(e,t){return 0===t&&(0,O.dE)()&&Qe.Z.tables},dataSource:A,columns:X})}),(0,_.jsx)("div",{id:"pagination",style:{width:"100%",textAlign:"center",marginTop:10},children:(0,_.jsx)(G.Z,{current:y.page,pageSize:y.per_page,total:null==j?void 0:j.count,showSizeChanger:!0,onChange:function(e,t){y.page=e,y.per_page=t,L(d()({},y)),te()}})})]})})})),rt=n(82565),dt=n(29189),st=n(67731),lt=n(15189),ht=n(837),mt=[{live:"A",gz:"0个错误",ld:"0个漏洞",gf:"0 - 5%"},{live:"B",gz:"至少1个次要错误",ld:"至少1个次要漏洞",gf:"6% - 10%"},{live:"C",gz:"至少1个主要错误",ld:"至少1个主要漏洞",gf:"11% - 20%"},{live:"D",gz:"至少1个严重错误",ld:"至少1个严重漏洞",gf:"21% - 50%"},{live:"E",gz:"至少1个崩溃错误",ld:"至少1个崩溃漏洞",gf:"超过50%"}],ct=(0,c.connect)((function(e){var t=e.shixunHomeworks,n=e.classroomList,a=e.loading,o=e.user;return{classroomList:n,shixunHomeworks:t,globalSetting:e.globalSetting,user:o,loading:a.effects}}))((function(e){var t,n,a=e.shixunHomeworks,i=e.classroomList,r=(e.globalSetting,e.user),s=(e.loading,e.dispatch),x=(0,c.useParams)(),b=(0,c.useSearchParams)(),j=l()(b,1)[0],k=(0,h.useState)(j.get("tabs")||"0"),N=l()(k,2),F=N[0],G=N[1],M=(0,h.useState)({}),z=l()(M,2),B=z[0],T=z[1],C=a.workList,A=a.workSetting,Z=(0,h.useState)(!1),E=l()(Z,2),I=E[0],D=E[1];x.category=j.get("category_id"),x.order="work_score",x.b_order="desc",(0,h.useEffect)((function(){s({type:"classroomList/getAssistantPermissions",payload:{course_id:x.coursesId}})}),[(0,O.bg)()]);var H,R,W,U,q,K,X,V,Q,J,$=function(){var e;S.Z.confirm({centered:!0,width:530,title:"提示",okText:"确定",cancelText:"取消",content:(0,_.jsxs)("div",{className:"tc font16",children:["你在该实训的学习记录将被清空,无法恢复",(0,_.jsx)("br",{}),"是否确认重做?"]}),onOk:(e=g()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null===(t=a.workList)||void 0===t?void 0:t.myshixun_identifier,e.next=3,(0,qe.Fr)({id:n});case 3:e.sent&&(u.ZP.info("已清空本实训的学习记录\n\n请点击“开启挑战”重做课程实验"),s({type:"shixunHomeworks/getWorkList",payload:B}));case 5:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},ee=function e(t){var n,a;t=null!==(n=t)&&void 0!==n&&n.includes(".json")?t:"".concat(t,".json"),S.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,_.jsx)("div",{className:"tc font16",children:"实训已经更新了,正在为您重置!"}),onOk:(a=g()(o()().mark((function n(){var a,i;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Je.$Q)({url:t});case 2:if(a=n.sent){n.next=5;break}return n.abrupt("return");case 5:return u.ZP.success("重置成功,正在进入实践项目!"),n.next=8,(0,Je.Ir)({id:a.shixun_identifier});case 8:if(null==(i=n.sent)||!i.game_identifier){n.next=12;break}return(0,L.xg)("/tasks/".concat(i.game_identifier,"?coursesId=").concat(x.coursesId)),n.abrupt("return");case 12:2===(null==i?void 0:i.status)?e(null==i?void 0:i.message):3===(null==i?void 0:i.status)&&ne(null==i?void 0:i.message);case 13:case"end":return n.stop()}}),n)}))),function(){return a.apply(this,arguments)})})},ne=function(e){S.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,_.jsxs)("div",{className:"tc font16",children:["目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!"]})})},ae=function(){var e=g()(o()().mark((function e(t){var n,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=null!==(n=t)&&void 0!==n&&n.includes(".json")?t:"".concat(t,".json"),e.next=3,(0,Je.$Q)({url:t});case 3:if(a=e.sent,console.log(a,"execRes"),null==a||!a.game_identifier){e.next=8;break}return(0,L.xg)("/tasks/".concat(a.game_identifier,"?coursesId=").concat(x.coursesId)),e.abrupt("return");case 8:-3===(null==a?void 0:a.status)?(0,L.eF)():2===(null==a?void 0:a.status)?ee(null==a?void 0:a.message):3===(null==a?void 0:a.status)&&ne(null==a?void 0:a.message);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=[(0,O.dE)()&&{name:"题目",id:"1",compontent:(0,_.jsx)(te,{})},{name:(0,O.GJ)()?"学生列表":"作业情况",id:"0",compontent:(0,_.jsx)(Y.Z,{setExportParams:T}),forceRender:!0},!(0,O.dE)()&&{name:"题目",id:"1",compontent:(0,_.jsx)(te,{})},{name:"排名",id:"5",compontent:(0,_.jsx)(gt,{})},{name:"代码查重",id:"2",compontent:(0,_.jsx)(de,{})},{name:"重做记录",id:"9",compontent:(0,_.jsx)(lt.Z,{})},{name:"设置",id:"3",compontent:null!==(t=C.homework_status)&&void 0!==t&&t.includes("导入")?(0,_.jsx)(st.Z,{}):(0,_.jsx)(He,{}),forceRender:!0},{name:"解答&讨论",id:"6",compontent:(0,_.jsx)(ht.default,{})}].filter((function(e){return!!e})).filter((function(e){var t,n;return(0,O.dE)()?"代码查重"!==e.name&&"设置"!==e.name:(0,O.dE)()||"已截止"!==(null==C||null===(t=C.homework_status)||void 0===t?void 0:t[0])?"质量检测"!==e.name:!C.code_review&&"未发布"!==(null==C||null===(n=C.homework_status)||void 0===n?void 0:n[0])||"代码查重"!==e.name})).filter((function(e){return!!C.open_code_quality_analysis||"质量检测"!==e.name})).filter((function(e){var t;return null===(t=C.homework_status)||void 0===t||!t.includes("导入")||((0,O.dE)()?["0","1"].includes(e.id):["0","1","3"].includes(e.id))}));return(0,_.jsxs)("section",{children:[(0,_.jsxs)("div",{className:"edu-container",children:[C.homework_name&&(0,_.jsxs)("section",{className:"animated fadeIn",children:[(0,_.jsx)("aside",{className:"mt10",children:C.category&&(0,_.jsxs)(w.Z,{separator:">",children:[(0,_.jsx)(w.Z.Item,{children:(0,_.jsx)(c.Link,{to:"/classrooms/".concat(null==x?void 0:x.coursesId,"/program_homework"),children:C.course_name})}),(0,_.jsx)(w.Z.Item,{children:(0,_.jsx)(c.Link,{to:"/classrooms/".concat(null==x?void 0:x.coursesId,"/program_homework/").concat(C.category.main?"":C.category.category_id),children:C.category.category_name})}),(0,_.jsx)(w.Z.Item,{children:"作业详情"})]})}),(0,_.jsxs)("aside",{className:[Qe.Z.title,"mt20"].join(" "),children:[(0,_.jsx)(c.Link,{to:"/classrooms/".concat(C.course_id,"/program_homework/").concat(C.category.main?"":C.category.category_id),children:(0,_.jsx)(y.Z,{className:"font16 c-black"})}),(0,_.jsx)(p.Z,{title:C.homework_name,placement:"bottom",children:(0,_.jsx)("strong",{className:"font20 ml5",children:C.homework_name})}),(0,_.jsx)(L.VV,{temporary:!0,status:C.homework_status})]})]}),(0,_.jsx)("aside",{className:"mt30 relative ".concat(Qe.Z.workListTabWrap),children:(0,_.jsx)(f.Z,{type:"card",defaultActiveKey:F,activeKey:F,tabBarExtraContent:null!==(n=C.homework_status)&&void 0!==n&&n.includes("导入")&&(0,O.GJ)()?(0,_.jsx)(P.ZP,{icon:(0,_.jsx)("span",{className:"iconfont icon-shixun3 translateY1"}),onClick:function(){s({type:"classroomList/setActionTabs",payload:{key:"补充成绩",name:null==C?void 0:C.homework_name,id:null==C?void 0:C.homework_id,type:"hack"}})},type:"primary",children:"补充成绩"}):(0,_.jsxs)("aside",{className:Qe.Z.workListTabButton,children:[(0,O.dE)()&&!(null!==(H=C.homework_status)&&void 0!==H&&H.includes("导入"))&&(0,_.jsx)("span",{style:{fontWeight:800,color:"#0152d9",textAlign:"end",flex:1,cursor:"pointer"},children:(0,_.jsxs)(P.ZP,{onClick:g()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/problems/".concat(null===(t=a.workList)||void 0===t?void 0:t.start_identifier,"/start.json"),{method:"get"});case 2:(n=e.sent)&&(window.open("/myproblems/".concat(null==n?void 0:n.identifier,"?type=1&backUrl=/classrooms/").concat(x.coursesId,"/program_homework/").concat(x.categoryId,"/detail?tabs=1")),localStorage.setItem("program_homework",[null==x?void 0:x.coursesId,null==x?void 0:x.categoryId]));case 4:case"end":return e.stop()}}),e)}))),type:"primary",children:[null!==(R=C.homework_status)&&void 0!==R&&R.includes("已截止")?"查看作业":"进入练习"," "]})}),(0,O.dE)()&&(null===(W=a.workList)||void 0===W?void 0:W.redo_work)&&(0,_.jsx)(P.ZP,{onClick:$,type:"primary",icon:(0,_.jsx)("i",{className:"iconfont icon-dahuizhongzuo3x"}),children:"重做"}),(null===(U=a.workList)||void 0===U?void 0:U.shixun_status)>1&&(null===(q=a.workList)||void 0===q?void 0:q.time_status)<5&&(0,O.dE)()&&(0,_.jsx)(P.ZP,{type:"primary",icon:(0,_.jsx)("i",{className:"iconfont icon-kaiqizhong"}),onClick:function(){var e,t,n;(0,Ge.tJ)(s,!0)&&(null!==(e=a.workList)&&void 0!==e&&null!==(e=e.task_operation)&&void 0!==e&&null!==(e=e[1])&&void 0!==e&&e.includes("/")?ae(null===(t=a.workList)||void 0===t||null===(t=t.task_operation)||void 0===t?void 0:t[1]):(0,L.xg)("/tasks/".concat(null===(n=a.workList)||void 0===n||null===(n=n.task_operation)||void 0===n?void 0:n[1])))},children:null===(K=a.workList)||void 0===K||null===(K=K.task_operation)||void 0===K?void 0:K[0]}),(null===(X=a.workList)||void 0===X?void 0:X.commit_des)&&(null===(V=a.workList)||void 0===V?void 0:V.commit_des)&&(0,_.jsx)(P.ZP,{type:"primary",icon:(0,_.jsx)("i",{className:"iconfont icon-tijiaozongjie"}),onClick:function(){var e;(0,L.xg)("/classrooms/".concat(x.coursesId,"/shixun_homework/").concat(x.categoryId,"/").concat(null===(e=a.workList)||void 0===e?void 0:e.id,"/commitsummary"))},children:null===(Q=a.workList)||void 0===Q?void 0:Q.commit_des}),(null==A?void 0:A.hack_edit_permission)&&"未发布"===(null==C||null===(J=C.homework_status)||void 0===J?void 0:J[0])&&(0,_.jsx)(P.ZP,{type:"primary",icon:(0,_.jsx)("i",{className:"iconfont icon-bianji2"}),onClick:function(){var e;null!==(e=i.AssistantObject.hack)&&void 0!==e&&e.can_create||!(0,O.Rm)()?c.history.push("/classrooms/".concat(x.coursesId,"/program_homework/").concat(x.categoryId,"/edit")):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"编辑作业"}),(0,O.GJ)()&&C.publish_immediately&&(0,_.jsx)(P.ZP,{type:"primary",icon:(0,_.jsx)("i",{className:"iconfont icon-yishezhifabushijian1"}),onClick:function(){var e,t;null!==(e=i.AssistantObject.hack)&&void 0!==e&&e.can_publish||!(0,O.Rm)()?2!==(null==r||null===(t=r.userInfo)||void 0===t?void 0:t.user_status)?s({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[x.categoryId],selectArrsAll:[C],params:x,detail:!0,type:2,manage_all_group:null==A?void 0:A.manage_all_group}}):(0,Ge.Rd)():u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"立即发布"}),(0,O.GJ)()&&C.end_immediately&&(0,_.jsx)(P.ZP,{style:{background:"#0152d9",color:"#fff"},type:"primary",icon:(0,_.jsx)("i",{className:"iconfont icon-jiezhishiyan"}),onClick:function(){var e;null!==(e=i.AssistantObject.hack)&&void 0!==e&&e.can_stop||!(0,O.Rm)()?s({type:"classroomList/setActionTabs",payload:{key:"立即截止",params:x,type:2,detail:!0,selectArrs:[x.categoryId]}}):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"立即截止"})]}),onChange:function(e){var t;"3"===e&&s({type:"shixunHomeworks/getWorkSetting",payload:d()({},x)}),"5"!==e||null!==(t=i.AssistantObject.hack)&&void 0!==t&&t.can_exam_leaderboard||!(0,O.Rm)()?(G(e),"0"===e&&s({type:"shixunHomeworks/getWorkList",payload:x})):u.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:oe.map((function(e,t){return(0,_.jsx)(f.Z.TabPane,{tab:e.name,forceRender:e.forceRender,children:e.compontent},e.id)}))})})]}),(0,_.jsx)(Ke,{}),(0,_.jsx)(Xe.Z,{courseEndTime:null==C?void 0:C.course_end_date,successCallback:function(){s({type:"shixunHomeworks/getWorkList",payload:d()({},x)})},visible:"立即截止"===i.actionTabs.key,homeworkIds:[x.categoryId],courseId:x.coursesId,isBatch:!1}),(0,_.jsx)(Ve.Z,{courseEndTime:null==C?void 0:C.course_end_date}),(0,_.jsx)(rt.Z,{onOk:function(){s({type:"shixunHomeworks/getWorkList",payload:d()({},x)})}}),(0,_.jsx)(dt.Z,{onOk:function(){s({type:"shixunHomeworks/getWorkList",payload:d()({},x)})}}),(0,_.jsxs)(S.Z,{open:I,title:"规则说明",width:800,footer:null,onCancel:function(){D(!1)},children:[(0,_.jsx)("p",{children:"一、等级规则"}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:"1. 缺陷等级"}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:(0,_.jsx)(v.Z,{dataSource:mt,columns:[{title:"等级",dataIndex:"live"},{title:"缺陷评估规则",dataIndex:"gz"},{title:"漏洞评估规则",dataIndex:"ld"},{title:"代码规范评估规则",dataIndex:"gf"}],pagination:!1})}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:"注:代码规范评估规则中数值来源为计算技术债务时间占开发所有代码所需要的时间的比例(Technical Debt Ratio)"}),(0,_.jsx)("p",{style:{marginLeft:"20px"},children:"Technical Debt Ratio = 技术债务时间 / 开发时间"}),(0,_.jsx)("p",{style:{marginLeft:"20px"},children:"技术债务时间为修复所有问题所需要的时间。"}),(0,_.jsx)("p",{children:"二、复杂度规则"}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:"根据代码路径数计算的数值,每当一个函数的控制流分叉时,复杂度计数器就会自增一。"}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:"每个程序语言的关键字对应的复杂度数据不同,但每个函数的最小复杂度为1。(特定语言的详细数据略)"}),(0,_.jsx)("p",{children:"三、代码质量分规则"}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:"代码质量分 = 0.5*缺陷分数 + 0.3*漏洞分数 + 0.2*代码规范性分数"}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:"其中:"}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:"缺陷/漏洞/代码规范性分数计算规则为:100 - 100 *((100*崩溃数 + 5*严重数 + 3*主要数 + 1*次数)/ 代码行数)"}),(0,_.jsx)("p",{style:{marginLeft:"10px"},children:"注:分数为空的代表不支持的文件格式。"})]})]})}))},82498:function(e,t,n){"use strict";var a=n(7557),o=n.n(a),i=n(85573),g=n.n(i),r=n(41498),d=n.n(r),s=n(82242),l=n.n(s),h=n(37205),m=n.n(h),c=n(79800),u=n.n(c),S=n(39647),P=n.n(S),w=n(59301),p=n(78241),f=n(8591),v=n(43418),y=n(95237),L=n(5112),x=n(88897),_=n(43604),b=n(78550),j=n(24905),k=n(61186),N=n.n(k),F=n(82710),G=n(64118),M=n(95972),z=n(79265),B=n(71554),T=n(73516),C=n(28019),A=n(37712),Z=["classroomList","dispatch","courseEndTime","onWindowBack"];t.Z=(0,z.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var t,n,a,i,r,s,h,c,S,k,E,I=e.classroomList,O=e.dispatch,D=e.courseEndTime,H=e.onWindowBack,R=P()(e,Z),W=(0,z.useParams)(),Y=p.Z.useForm(),U=u()(Y,1)[0],q=(0,w.useState)(1),K=u()(q,2),X=K[0],V=K[1],Q=(0,w.useState)([]),J=u()(Q,2),$=J[0],ee=J[1],te=(0,w.useState)(0),ne=u()(te,2),ae=(ne[0],ne[1]),oe=(0,w.useState)(2e3),ie=u()(oe,2),ge=(ie[0],ie[1],(0,w.useState)(!0)),re=u()(ge,2),de=(re[0],re[1]),se=(0,w.useState)(!1),le=u()(se,2),he=le[0],me=(le[1],(0,w.useState)(!1)),ce=u()(me,2),ue=ce[0],Se=(ce[1],(0,w.useState)([])),Pe=u()(Se,2),we=Pe[0],pe=Pe[1],fe=(0,w.useState)(!0),ve=u()(fe,2),ye=ve[0],Le=ve[1],xe=(0,w.useState)(!(null!==(t=I.actionTabs)&&void 0!==t&&null!==(t=t.selectArrsAll)&&void 0!==t&&null!==(t=t[0])&&void 0!==t&&t.send_type)),_e=u()(xe,2),be=_e[0],je=_e[1],ke=(0,w.useState)([0,0,0]),Ne=u()(ke,2),Fe=Ne[0],Ge=Ne[1];(0,w.useEffect)((function(){if("立即发布"===I.actionTabs.key){var e,t,n,a;if(Te(),null!==(e=I.actionTabs)&&void 0!==e&&null!==(e=e.selectArrsAll)&&void 0!==e&&null!==(e=e[0])&&void 0!==e&&e.can_publish)Ge(m()(null===(n=I.actionTabs)||void 0===n||null===(n=n.selectArrsAll)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.difficult_count));else Ge(m()(null===(a=I.actionTabs)||void 0===a||null===(a=a.selectArrsAll)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.difficult_settings));if(je(!(null!==(t=I.actionTabs)&&void 0!==t&&null!==(t=t.selectArrsAll)&&void 0!==t&&null!==(t=t[0])&&void 0!==t&&t.send_type)),Me(),2===I.actionTabs.type){var o,i=null===(o=I.actionTabs.selectArrsAll)||void 0===o?void 0:o[0];Le(i.unified_setting)}else Le(!1)}}),[I.actionTabs]),(0,w.useEffect)((function(){if(he){if(ue)return;O({type:"classroomList/setActionTabs",payload:{}}),(0,G.GJ)()?(O({type:"classroomList/getClassroomTeacherCommonList",payload:l()(l()({},I.actionTabs.params),{},{type:1})}),O({type:"shixunHomeworks/getWorkList",payload:l()({},W)})):O({type:"classroomList/getClassroomCommonList",payload:l()({},I.actionTabs.params)})}}),[he]);var Me=function(){var e=d()(o()().mark((function e(t){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return de(!0),e.next=3,(0,T.c_)(l()(l()({},W),{},{page:t||X,limit:2e4,homework_id:1===I.actionTabs.type?"":I.actionTabs.selectArrs[0]}));case 3:null==(n=e.sent)||n.course_groups.map((function(e,t){e.key=e.id,e.title=e.name,e.disabled=e.is_published})),n&&(ee(m()(null==n?void 0:n.course_groups)),ae(null==n?void 0:n.course_groups_count),de(!1),t||U.setFieldsValue(g()(g()({},"publish_time",N()(N()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),"end_time",N()(N()(new Date).add(7,"days").format("YYYY-MM-DD HH:mm")))));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ze=function(){(0,G.GJ)()?I.actionTabs.detail?(O({type:"shixunHomeworks/setActionTabs",payload:{}}),O({type:"shixunHomeworks/getWorkList",payload:l()({},W)}),O({type:"shixunHomeworks/getWorkSetting",payload:l()({},W)})):O({type:"classroomList/getClassroomTeacherCommonList",payload:l()(l()({},I.actionTabs.params),{},{type:5,category:I.actionTabs.params.categoryId})}):O({type:"classroomList/getClassroomCommonList",payload:l()({},I.actionTabs.params)})},Be=function(){var e=d()(o()().mark((function e(){var t,n,a,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,G.Rm)()||null!==(t=I.AssistantObject.hack)&&void 0!==t&&t.can_publish){e.next=4;break}return f.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能"),Ee(!1),e.abrupt("return");case 4:if(!((a=l()({},U.getFieldsValue())).end_time<=a.publish_time)){e.next=9;break}return f.ZP.info("截止时间不能大于或等于发布时间"),Ee(!1),e.abrupt("return");case 9:if(!((null==we?void 0:we.length)<=0&&!ye&&$.length>0)){e.next=13;break}return f.ZP.info("发布班级不能为空"),Ee(!1),e.abrupt("return");case 13:if(0!==Fe.reduce((function(e,t){return e+t}))||be){e.next=17;break}return f.ZP.info("简单适中困难题数相加不能为0"),Ee(!1),e.abrupt("return");case 17:return i={homework_ids:m()(I.actionTabs.selectArrs),group_ids:we.length>0?we.map((function(e){return e.id})):null===(n=I.detailCommonHomeworksList)||void 0===n?void 0:n.course_groups,end_time:N()(a.end_time).format("YYYY-MM-DD HH:mm"),publish_time:N()(a.publish_time).format("YYYY-MM-DD HH:mm"),difficult_settings:null==Fe?void 0:Fe.map((function(e){return e})),send_type:be?"0":"1",unified_setting:!we.length},Ee(!0),e.next=21,(0,F.ZP)("/api/courses/".concat(W.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:l()({},i)});case 21:if(0!==e.sent.status){e.next=35;break}if(Ee(!1),(0,M.L9)(["教学课堂","图文作业","立即发布"]),f.ZP.success("发布成功"),O({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),!H){e.next=30;break}return H(),e.abrupt("return");case 30:R.onCallback&&R.onCallback(),ze(),"0"===localStorage.getItem("Noviceguide")||O({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:13,text:(0,A.jsx)("div",{children:"最后,咱们给教学课堂添加一名学生~点击“添加学生”,在弹窗页面中输入并搜索学生姓名,点击“确定”就可以为您的课堂添加第一位学生啦~"})}}),e.next=36;break;case 35:Ee(!1);case 36:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(){V(1),ee([]),pe([])},Ce=(0,w.useState)(!1),Ae=u()(Ce,2),Ze=Ae[0],Ee=Ae[1];return(0,A.jsxs)(v.Z,{width:600,confirmLoading:Ze,centered:!0,title:"发布作业",open:"立即发布"===I.actionTabs.key,okText:"发布作业",cancelText:"暂不发布",onOk:Be,onCancel:function(){Te(),O({type:"classroomList/setActionTabs",payload:{}}),H?H():ze()},children:[(0,A.jsxs)("p",{className:"tc",children:["学生将立即收到作业",(0,A.jsx)("br",{}),'本操作只对"未发布"的作业有效']}),$&&(0,A.jsxs)(p.Z,{form:U,children:[(0,A.jsxs)("div",{style:{paddingLeft:0},children:[2===I.actionTabs.type&&(0,A.jsxs)(y.Z,{style:{marginBottom:"10px"},children:[(0,A.jsx)("span",{className:"mr5",children:"试题发送:"}),(0,A.jsxs)(L.ZP.Group,{value:be,disabled:!(null!==(n=I.actionTabs)&&void 0!==n&&null!==(n=n.selectArrsAll)&&void 0!==n&&null!==(n=n[0])&&void 0!==n&&n.can_publish),onChange:function(e){je(e.target.value)},children:[(0,A.jsx)(L.ZP,{value:!0,children:"全部固定试题"}),(0,A.jsx)(L.ZP,{className:"ml20",value:!1,children:"随机抽取"})]})]}),!be&&(0,A.jsxs)(y.Z,{style:{marginBottom:"10px"},children:[(0,A.jsx)("span",{style:{marginRight:65}}),(0,A.jsxs)("span",{children:["简单题数 ",(0,A.jsx)(x.Z,{value:Fe[0],onChange:function(e){Fe[0]=e,Ge(m()(Fe))},min:0,disabled:!(null!==(a=I.actionTabs)&&void 0!==a&&null!==(a=a.selectArrsAll)&&void 0!==a&&null!==(a=a[0])&&void 0!==a&&a.can_publish),placeholder:"最大".concat(null===(i=I.actionTabs)||void 0===i||null===(i=i.selectArrsAll)||void 0===i||null===(i=i[0])||void 0===i||null===(i=i.difficult_count)||void 0===i?void 0:i[0]),max:null===(r=I.actionTabs)||void 0===r||null===(r=r.selectArrsAll)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.difficult_count)||void 0===r?void 0:r[0],style:{width:60}})]}),(0,A.jsxs)("span",{style:{margin:"0px 40px"},children:["适中题数 ",(0,A.jsx)(x.Z,{value:Fe[1],onChange:function(e){Fe[1]=e,Ge(m()(Fe))},min:0,disabled:!(null!==(s=I.actionTabs)&&void 0!==s&&null!==(s=s.selectArrsAll)&&void 0!==s&&null!==(s=s[0])&&void 0!==s&&s.can_publish),max:null===(h=I.actionTabs)||void 0===h||null===(h=h.selectArrsAll)||void 0===h||null===(h=h[0])||void 0===h||null===(h=h.difficult_count)||void 0===h?void 0:h[1],placeholder:"最大".concat(null===(c=I.actionTabs)||void 0===c||null===(c=c.selectArrsAll)||void 0===c||null===(c=c[0])||void 0===c||null===(c=c.difficult_count)||void 0===c?void 0:c[1]),style:{width:60}})]}),(0,A.jsxs)("span",{children:["困难题数 ",(0,A.jsx)(x.Z,{value:Fe[2],onChange:function(e){Fe[2]=e,Ge(m()(Fe))},min:0,disabled:!(null!==(S=I.actionTabs)&&void 0!==S&&null!==(S=S.selectArrsAll)&&void 0!==S&&null!==(S=S[0])&&void 0!==S&&S.can_publish),placeholder:"最大".concat(null===(k=I.actionTabs)||void 0===k||null===(k=k.selectArrsAll)||void 0===k||null===(k=k[0])||void 0===k||null===(k=k.difficult_count)||void 0===k?void 0:k[2]),max:null===(E=I.actionTabs)||void 0===E||null===(E=E.selectArrsAll)||void 0===E||null===(E=E[0])||void 0===E||null===(E=E.difficult_count)||void 0===E?void 0:E[2],style:{width:60}})]})]}),(0,A.jsxs)(y.Z,{className:"mt30",align:"middle",children:[(0,A.jsx)(_.Z,{children:(0,A.jsx)(p.Z.Item,{name:"publish_time",label:"发布时间",children:(0,A.jsx)(b.default,{style:{width:170,marginRight:"25px"},disabledDate:function(e){return(0,C.Q8)(e,D)},disabledTime:function(e){return(0,C.d0)(e)},placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:N()((0,M.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})})}),(0,A.jsx)(_.Z,{className:"ml20",children:(0,A.jsx)(p.Z.Item,{name:"end_time",label:"截止时间",children:(0,A.jsx)(b.default,{style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:N()((0,M.U6)(),"HH:mm")},disabledDate:function(e){return(0,C.Q8)(e,D,U.getFieldValue("publish_time"))},disabledTime:function(e){return(0,C.d0)(e,U.getFieldValue("publish_time"))},format:"YYYY-MM-DD HH:mm",allowClear:!1})})})]}),2===I.actionTabs.type&&(0,A.jsxs)(y.Z,{style:{marginBottom:"10px"},children:[(0,A.jsx)("span",{className:"mr5",children:"发布设置:"}),(0,A.jsxs)(L.ZP.Group,{value:ye,onChange:function(e){Le(e.target.value),pe([])},children:[(0,A.jsx)(L.ZP,{value:!0,disabled:!I.actionTabs.manage_all_group,children:"统一发布"}),(0,A.jsx)(L.ZP,{className:"ml20",disabled:$.length<=0,value:!1,children:"分班发布"})]})]}),$.length<=0&&2===I.actionTabs.type&&(0,A.jsx)("span",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"},children:'课堂无分班,仅支持选择“统一发布"'})]}),(1===I.actionTabs.type||!ye)&&$.length>0&&(0,A.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"},children:[(0,A.jsxs)("span",{style:{flex:1},children:[(0,A.jsx)(j.Z,{checked:we.length===$.length,onChange:function(e){we.length===$.length?pe([]):pe($.filter((function(e){return!e.is_published})))},children:"全选"})," "]}),(0,A.jsx)("span",{style:{width:16}}),(0,A.jsxs)("span",{style:{flex:1},children:["已选择",we.length||0,"个分班"]})]}),(1===I.actionTabs.type||!ye)&&$.length>0&&(0,A.jsx)(B.Z,{data:$,selectedRowKeys:we,setSelectedRowKeys:pe})]})]})}))},15189:function(e,t,n){"use strict";var a=n(7557),o=n.n(a),i=n(41498),g=n.n(i),r=n(79800),d=n.n(r),s=n(70236),l=n.n(s),h=n(59301),m=n(24645),c=n(78241),u=n(99313),S=n(2595),P=n(25700),w=n(79265),p=n(82710),f=n(61186),v=n.n(f),y=n(37712);m.Z.Dragger;t.Z=(0,w.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){l()(e);var t=(0,w.useParams)(),n=c.Z.useForm(),a=(d()(n,1)[0],(0,h.useState)(!0)),i=d()(a,2),r=i[0],s=i[1],m=(0,h.useState)(!1),f=d()(m,2),L=f[0],x=f[1],_=(0,h.useState)({type:window.location.href.indexOf("program_homework")>-1?2:1,limit:10,page:1}),b=d()(_,2),j=b[0],k=b[1],N=[{name:"全部",value:"",question_type:0},{name:"单选题",value:"SINGLE",question_type:0},{name:"多选题",value:"MULTIPLE",question_type:1},{name:"判断题",value:"JUDGMENT",question_type:2},{name:"填空题",value:"COMPLETION",question_type:3},{name:"简答题",value:"SUBJECTIVE",question_type:4},{name:"实训题",value:"SHIXUN",question_type:5},{name:"编程题",value:"PROGRAM",question_type:6},{name:"组合题",value:"COMBINATION",question_type:7},{name:"程序填空题",value:"BPROGRAM",question_type:8}];function F(){return G.apply(this,arguments)}function G(){return(G=g()(o()().mark((function e(){var n,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),n=window.location.href.indexOf("exercise")>-1?"/api/exercises/".concat(null==t?void 0:t.categoryId,"/redo_logs.json"):"/api/homework_commons/".concat(null==t?void 0:t.categoryId,"/redo_logs.json"),e.next=4,(0,p.ZP)(n,{method:"get",params:j});case 4:a=e.sent,x(!1),0===(null==a?void 0:a.status)&&s(null==a?void 0:a.data);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,h.useEffect)((function(){F()}),[]);var M=[{title:"姓名",dataIndex:"user_name"},{title:"学号",dataIndex:"student_id"},{title:"班级",dataIndex:"course_group_name"},window.location.href.indexOf("exercise")>-1&&{title:"题型",dataIndex:"question_type",render:function(e,t,n){var a;return null===(a=N.find((function(t){return t.question_type===e})))||void 0===a?void 0:a.name}},window.location.href.indexOf("exercise")>-1&&{title:"试题名称",dataIndex:"question_name"},window.location.href.indexOf("exercise")>-1&&{title:"关卡名称",dataIndex:"challenge_name"},window.location.href.indexOf("exercise")<=-1&&{title:"任务名称",dataIndex:"task_name",width:"40%"},{title:"操作",dataIndex:"redo_type",render:function(e,t,n){var a;return null===(a=[{id:1,name:"打回重做"},{id:2,name:"恢复初始代码"},{id:3,name:"重置代码仓库"}].find((function(t){return t.id===e})))||void 0===a?void 0:a.name}},{title:"恢复初始代码时间",dataIndex:"created_at",render:function(e,t,n){return v()(e).format("YYYY-MM-DD HH:mm:ss")}}].filter((function(e){return!!e}));return(0,y.jsxs)("div",{style:{padding:"0px 30px",background:"#fff",paddingBottom:30},children:[(0,y.jsx)(u.Z,{destroyInactiveTabPane:!0,onChange:function(e){j.type=e,j.page=1,j.limit=10,k(j),F()},items:[window.location.href.indexOf("program_homework")<=-1&&{key:"1",label:"打回重做",children:(0,y.jsx)(S.Z,{className:"mt20",loading:L,columns:[{title:"姓名",dataIndex:"user_name"},{title:"学号",dataIndex:"student_id"},{title:"班级",dataIndex:"course_group_name"},{title:"打回重做时间",dataIndex:"created_at",render:function(e,t,n){return v()(e).format("YYYY-MM-DD HH:mm:ss")}},{title:"操作人",dataIndex:"operator"}],dataSource:null==r?void 0:r.list,pagination:!1})},{key:"2",label:"重置代码",children:(0,y.jsx)(S.Z,{className:"mt20",loading:L,columns:M,dataSource:null==r?void 0:r.list,pagination:!1})}].filter((function(e){return!!e}))}),(0,y.jsx)(P.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,t){j.page=e,j.limit=t,k(j),F()},current:j.page,total:r.count,pageSize:j.limit,style:{marginTop:20}})]})}))},71554:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var a=n(7557),o=n.n(a),i=n(41498),g=n.n(i),r=n(79800),d=n.n(r),s=n(59301),l=n(92832),h=n(24905),m=n(95237),c="leftdiv___aBzsX",u="listClass___bxIEW",S="spantitle___v_Vc4",P="rightdiv___xWu4M",w=n(63017),p=n(37712),f=function(e){var t=e.data,n=(e.value,e.handleChangePage,e.setSelectedRowKeys),a=e.selectedRowKeys,i=(e.onChange,(0,s.useState)([])),r=d()(i,2),f=r[0],v=r[1],y=(0,s.useState)([]),L=d()(y,2),x=L[0],_=L[1],b=(0,s.useState)([]),j=d()(b,2),k=j[0],N=j[1],F=(0,s.useState)(1),G=d()(F,2),M=(G[0],G[1],(0,s.useState)()),z=d()(M,2);z[0],z[1];return(0,s.useEffect)((function(){v(t),_([]),N([])}),[t]),(0,s.useEffect)((function(){n&&(_(a),N(a))}),[a]),(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,p.jsxs)("div",{className:c,children:[(0,p.jsx)(l.Z.Search,{size:"middle",onChange:function(){var e=g()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(t.filter((function(e){var t;return null==e||null===(t=e.name)||void 0===t?void 0:t.includes(n.target.value)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),placeholder:"可输入班级名称查询"}),0===f.length&&(0,p.jsx)(w.Z,{styles:{margin:"70px auto"},customText:"暂无分班"}),(0,p.jsx)("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"},children:(0,p.jsx)(h.Z.Group,{value:x.map((function(e){return"".concat(e.id)})),onChange:function(e){n(f.filter((function(t){return e.includes("".concat(t.id))})))},style:{marginTop:"10px",flexDirection:"column"},children:f.map((function(e,t){return(0,p.jsx)(m.Z,{style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200},children:(0,p.jsx)(h.Z,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.id),children:(0,p.jsxs)("div",{className:u,children:[(0,p.jsx)("span",{className:S,style:{width:e.is_published?"108px":"170px"},children:e.name}),e.is_published&&(0,p.jsx)("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"},children:"已发布"})]})})},e.id)}))})})]}),(0,p.jsxs)("div",{className:P,children:[(0,p.jsx)(l.Z.Search,{onChange:function(e){N(x.filter((function(t){return t.name.includes(e.target.value)})))},size:"middle",placeholder:"可输入班级名称查询"}),0===k.length&&(0,p.jsx)(w.Z,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),k.length>0&&(0,p.jsx)("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"},children:(0,p.jsx)("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0},children:k.map((function(e,t){return(0,p.jsxs)(m.Z,{justify:"space-between",style:{marginTop:"10px"},children:[(0,p.jsx)("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"},children:e.name}),(0,p.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC",style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){n(x.filter((function(t){return"".concat(t.id)!="".concat(e.id)})))}})]},e.id)}))})})]})]})}},52230:function(e,t,n){"use strict";function a(e){try{e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()}catch(e){console.log(e,":e")}}function o(){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()}n.d(t,{BU:function(){return o},Dj:function(){return a},gH:function(){return i},vp:function(){return g}});var i=function(){return document.webkitExitFullscreen?"webkitfullscreenchange":document.exitFullscreen?"fullscreenchange":document.msExitFullscreen?"msfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":void 0};function g(){var e=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement;document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",e),window.isFullScreen?window.isFullScreen:null!=e}},98929:function(e,t,n){"use strict";n(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;t.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxOCI+PHBhdGggZmlsbD0iI0Y3QjUwMCIgZD0iTTcgNGMzLjg5OSAwIDcgMy4xNDEgNyA3cy0zLjEwMSA3LTcgNy03LTMuMTQxLTctNyAzLjEwMS03IDctN1ptMSAzSDYuMzk1YTMuNTAxIDMuNTAxIDAgMCAxLS44NTcgMS4yNDVjLS4zMi4yOTQtLjc1Mi41NTEtMS4yOTcuNzcyTDQgOS4xMDlWMTAuOWMuNDQ4LS4xNTQuODItLjMxNSAxLjExNy0uNDgzLjIyMi0uMTI2LjQ1LS4yODIuNjg1LS40NjZsLjIzNi0uMTk0VjE1SDhWN1pNNC44MTIgMGMuMTc1IDAgLjM1LjE2LjQzOC4zMThsMS4zMTMgMi4zMDlzLTIuOC4xNi00LjQ2MyAxLjY3MkwuMDg4LjcxNkMwIC42MzYgMCAuNTU3IDAgLjQ3OCAwIC4xNTkuMjYzIDAgLjUyNSAwWm04LjY2MyAwYy4yNjMgMCAuNTI1LjIzOS41MjUuNDc4IDAgLjA4IDAgLjE1OS0uMDg4LjIzOEwxMS45IDQuMjJjLTEuNjYyLTEuNDMzLTQuNDYzLTEuNTkyLTQuNDYzLTEuNTkyTDguNzUuMzE4QzguNzUuMTYgOC45MjUgMCA5LjE4OCAwWiIvPjwvc3ZnPg=="},94296:function(e,t,n){"use strict";n(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;t.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxOCI+PHBhdGggZmlsbD0iI0I5QzRDRiIgZD0iTTcgNGMzLjg5OSAwIDcgMy4xNDEgNyA3cy0zLjEwMSA3LTcgNy03LTMuMTQxLTctNyAzLjEwMS03IDctN1ptLjA1IDNjLS42NzUgMC0xLjIwMy4wOTItMS41ODQuMjc2YTIuMDU2IDIuMDU2IDAgMCAwLS44ODcuNzk0Yy0uMTguMjk2LS4zMS42OTEtLjM5NCAxLjE4NmwtLjAzOC4yNTUgMi4wMDQuMTc3Yy4wNTUtLjQ0My4xNjQtLjc1My4zMjYtLjkyOGEuODE0LjgxNCAwIDAgMSAuNjI2LS4yNjMuODEuODEgMCAwIDEgLjYxMS4yNTVjLjE2Mi4xNy4yNDMuMzc1LjI0My42MTQgMCAuMjIyLS4wODEuNDU2LS4yNDUuNzAzLS4xNjQuMjQ3LS41MzkuNjA4LTEuMTI0IDEuMDg0LS45Ni43NzYtMS42MTMgMS40NS0xLjk2MiAyLjAyYTQuMzYzIDQuMzYzIDAgMCAwLS41ODggMS41NTJMNCAxNWg2di0xLjc4MUg2Ljg3N2MuMTg0LS4xOTcuMzQzLS4zNTYuNDc5LS40NzguMTM2LS4xMjIuNDA1LS4zMzQuODA4LS42MzguNjc3LS41MjMgMS4xNDUtMS4wMDIgMS40MDEtMS40MzguMjU3LS40MzcuMzg2LS44OTUuMzg2LTEuMzc0IDAtLjQ1LS4xMTItLjg1OC0uMzM2LTEuMjJhMi4wNDMgMi4wNDMgMCAwIDAtLjkyNC0uODA4QzguMzAxIDcuMDg4IDcuNzUzIDcgNy4wNSA3Wk00LjgxMiAwYy4xNzUgMCAuMzUuMTYuNDM3LjMxOGwxLjMxMyAyLjMwOXMtMi44LjE2LTQuNDYzIDEuNjcyTC4wODguNzE2QzAgLjYzNiAwIC41NTcgMCAuNDc4IDAgLjE1OS4yNjMgMCAuNTI1IDBabTguNjYyIDBjLjI2MyAwIC41MjUuMjM5LjUyNS40NzggMCAuMDggMCAuMTU5LS4wODguMjM4TDExLjkgNC4yMmMtMS42NjItMS40MzMtNC40NjMtMS41OTItNC40NjMtMS41OTJMOC43NS4zMThDOC43NS4xNiA4LjkyNSAwIDkuMTg4IDBaIi8+PC9zdmc+"},57357:function(e,t,n){"use strict";n(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;t.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxOCI+PHBhdGggZmlsbD0iI0QwOUYxOCIgZD0iTTcgNGMzLjg5OSAwIDcgMy4xNDEgNyA3cy0zLjEwMSA3LTcgNy03LTMuMTQxLTctNyAzLjEwMS03IDctN1ptLS4wNjIgM2MtLjgyNiAwLTEuNDY0LjE3Mi0xLjkxNS41MTctLjQuMzA3LS42ODYuNzMzLS44NTYgMS4yNzhsLS4wNTguMjEgMS45MDguMzY0Yy4wNTItLjM4My4xNTMtLjY1MS4zMDItLjgwNGEuNzcyLjc3MiAwIDAgMSAuNTgtLjIzYy4yMyAwIC40MTIuMDcuNTQ0LjIxMS4xMzMuMTQuMTk5LjMzLjE5OS41NjVhLjg4Ljg4IDAgMCAxLS4yNjUuNjM4Ljg5Ljg5IDAgMCAxLS42NjIuMjcgMS4zNSAxLjM1IDAgMCAxLS4xNTgtLjAxMmwtLjEwNC0uMDE1LS4xMDUgMS41MzZjLjI3OC0uMDg1LjQ5Ni0uMTI3LjY1NC0uMTI3LjI5OCAwIC41MzMuMDk5LjcwNy4yOTYuMTczLjE5Ny4yNi40NzUuMjYuODMzIDAgLjM1Mi0uMDkuNjM0LS4yNy44NDVhLjg1Mi44NTIgMCAwIDEtLjY3Ny4zMTYuODYyLjg2MiAwIDAgMS0uNjM2LS4yNWMtLjE0My0uMTQ0LS4yNTQtLjM4NC0uMzMzLS43MjNsLS4wMzYtLjE3N0w0IDEyLjgyNmMuMTMyLjQ4Mi4zMjEuODgyLjU2NyAxLjIuMjQ2LjMxOS41Ni41Ni45NDIuNzI2LjM4MS4xNjUuOTAyLjI0OCAxLjU2My4yNDguNjc3IDAgMS4yMjQtLjExMiAxLjY0LS4zMzUuNDE2LS4yMjMuNzM1LS41NDIuOTU2LS45NTUuMjIxLS40MTQuMzMyLS44NDUuMzMyLTEuMjk2IDAtLjM1OS0uMDY3LS42NjctLjItLjkyNmExLjYzMyAxLjYzMyAwIDAgMC0uNTYzLS42MjVjLS4xNDktLjA5OS0uMzYzLS4xODUtLjY0NC0uMjU5LjM0Ny0uMjA0LjYwNi0uNDQxLjc3OC0uNzEyYTEuNjYgMS42NiAwIDAgMCAuMjU3LS45MDggMS44MiAxLjgyIDAgMCAwLS42MzQtMS40MkM4LjU3MSA3LjE4OSA3Ljg4NiA3IDYuOTM4IDdaTTQuODEzIDBjLjE3NSAwIC4zNS4xNy40MzcuMzM4bDEuMzEzIDIuNDUzcy0yLjguMTctNC40NjMgMS43NzZMLjA4OC43NjFDMCAuNjc3IDAgLjU5MiAwIC41MDcgMCAuMTcuMjYzIDAgLjUyNSAwWm04LjY2MiAwYy4yNjMgMCAuNTI1LjI1NC41MjUuNTA3IDAgLjA4NSAwIC4xNy0uMDg4LjI1NEwxMS45IDQuNDgzQzEwLjIzOCAyLjk2IDcuNDM3IDIuNzkgNy40MzcgMi43OUw4Ljc1LjMzOEM4Ljc1LjE3IDguOTI1IDAgOS4xODggMFoiLz48L3N2Zz4="},53502:function(e,t){"use strict";t.Z={flex_box_center:"flex_box_center___oaxfO",flex_space_between:"flex_space_between___NQ5Gm",flex_box_vertical_center:"flex_box_vertical_center___UGzY9",flex_box_center_end:"flex_box_center_end___SnN1r",flex_box_column:"flex_box_column___c0981",right:"right___sOpmg",title:"title___Nmi5q",titles:"titles___PaouY",tips:"tips___h2FE4"}},95873:function(e,t){"use strict";t.Z={flex_box_center:"flex_box_center___eQ57b",flex_space_between:"flex_space_between___PVjBV",flex_box_vertical_center:"flex_box_vertical_center___ghTL_",flex_box_center_end:"flex_box_center_end___z8oKm",flex_box_column:"flex_box_column___JQV5n",title:"title___w80Ja",workListTabWrap:"workListTabWrap___YRwm7",workListTabButton:"workListTabButton___ebGCB",tables:"tables___AYvHM",checkboxgroup:"checkboxgroup___fZHgL"}},66104:function(e,t,n){"use strict";n.d(t,{Z:function(){return G}});var a=n(92310),o=n.n(a),i=n(38298),g=n(36994),r=n(59301),d=n(92343),s=n(36355),l=n(18290),h=n(91857);const m=e=>{let{children:t}=e;const{getPrefixCls:n}=r.useContext(s.E_),a=n("breadcrumb");return r.createElement("li",{className:`${a}-separator`,"aria-hidden":"true"},""===t?t:t||"/")};m.__ANT_BREADCRUMB_SEPARATOR=!0;var c=m,u=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};function S(e,t,n,a){if(null==n)return null;const{className:i,onClick:d}=t,s=u(t,["className","onClick"]),l=Object.assign(Object.assign({},(0,g.Z)(s,{data:!0,aria:!0})),{onClick:d});return void 0!==a?r.createElement("a",Object.assign({},l,{className:o()(`${e}-link`,i),href:a}),n):r.createElement("span",Object.assign({},l,{className:o()(`${e}-link`,i)}),n)}function P(e,t){return(n,a,o,i,g)=>{if(t)return t(n,a,o,i);const r=function(e,t){if(void 0===e.title||null===e.title)return null;const n=Object.keys(t).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${n})`,"g"),((e,n)=>t[n]||e))}(n,a);return S(e,n,r,g)}}var w=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};const p=e=>{const{prefixCls:t,separator:n="/",children:a,menu:o,overlay:i,dropdownProps:g,href:d}=e;const s=(e=>{if(o||i){const n=Object.assign({},g);if(o){const e=o||{},{items:t}=e,a=w(e,["items"]);n.menu=Object.assign(Object.assign({},a),{items:null==t?void 0:t.map(((e,t)=>{var{key:n,title:a,label:o,path:i}=e,g=w(e,["key","title","label","path"]);let s=null!=o?o:a;return i&&(s=r.createElement("a",{href:`${d}${i}`},s)),Object.assign(Object.assign({},g),{key:null!=n?n:t,label:s})}))})}else i&&(n.overlay=i);return r.createElement(h.Z,Object.assign({placement:"bottom"},n),r.createElement("span",{className:`${t}-overlay-link`},e,r.createElement(l.Z,null)))}return e})(a);return null!=s?r.createElement(r.Fragment,null,r.createElement("li",null,s),n&&r.createElement(c,null,n)):null},f=e=>{const{prefixCls:t,children:n,href:a}=e,o=w(e,["prefixCls","children","href"]),{getPrefixCls:i}=r.useContext(s.E_),g=i("breadcrumb",t);return r.createElement(p,Object.assign({},o,{prefixCls:g}),S(g,o,n,a))};f.__ANT_BREADCRUMB_ITEM=!0;var v=f,y=n(17313),L=n(83116),x=n(37613);const _=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},(0,y.Wf)(e)),{color:e.itemColor,fontSize:e.fontSize,[n]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},(0,y.Qy)(e)),"li:last-child":{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{[`\n > ${n} + span,\n > ${n} + a\n `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}};var b=(0,L.Z)("Breadcrumb",(e=>{const t=(0,x.TS)(e,{});return[_(t)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}))),j=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};function k(e){const{breadcrumbName:t,children:n}=e,a=j(e,["breadcrumbName","children"]),o=Object.assign({title:t},a);return n&&(o.menu={items:n.map((e=>{var{breadcrumbName:t}=e,n=j(e,["breadcrumbName"]);return Object.assign(Object.assign({},n),{title:t})}))}),o}var N=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};const F=e=>{const{prefixCls:t,separator:n="/",style:a,className:l,rootClassName:h,routes:m,items:u,children:S,itemRender:w,params:f={}}=e,v=N(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:y,direction:L,breadcrumb:x}=r.useContext(s.E_);let _;const j=y("breadcrumb",t),[F,G]=b(j),M=function(e,t){return(0,r.useMemo)((()=>e||(t?t.map(k):null)),[e,t])}(u,m);const z=P(j,w);if(M&&M.length>0){const e=[],t=u||m;_=M.map(((a,o)=>{const{path:i,key:d,type:s,menu:l,overlay:h,onClick:m,className:u,separator:S,dropdownProps:P}=a,w=((e,t)=>{if(void 0===t)return t;let n=(t||"").replace(/^\//,"");return Object.keys(e).forEach((t=>{n=n.replace(`:${t}`,e[t])})),n})(f,i);void 0!==w&&e.push(w);const v=null!=d?d:o;if("separator"===s)return r.createElement(c,{key:v},S);const y={},L=o===M.length-1;l?y.menu=l:h&&(y.overlay=h);let{href:x}=a;return e.length&&void 0!==w&&(x=`#/${e.join("/")}`),r.createElement(p,Object.assign({key:v},y,(0,g.Z)(a,{data:!0,aria:!0}),{className:u,dropdownProps:P,href:x,separator:L?"":n,onClick:m,prefixCls:j}),z(a,f,t,e,x))}))}else if(S){const e=(0,i.Z)(S).length;_=(0,i.Z)(S).map(((t,a)=>{if(!t)return t;const o=a===e-1;return(0,d.Tm)(t,{separator:o?"":n,key:a})}))}const B=o()(j,null==x?void 0:x.className,{[`${j}-rtl`]:"rtl"===L},l,h,G),T=Object.assign(Object.assign({},null==x?void 0:x.style),a);return F(r.createElement("nav",Object.assign({className:B,style:T},v),r.createElement("ol",null,_)))};F.Item=v,F.Separator=c;var G=F},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),o=n(59301),i=r(o),g=r(n(12708));function r(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),a=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,i=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;a=this.props.isReverse?i:this.calculateOffset(e,i)}else a=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;a<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,a=t.element,o=t.hasMore,g=(t.initialLoad,t.isReverse),r=t.loader,d=(t.loadMore,t.pageStart,t.ref),s=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));s.ref=function(t){e.scrollComponent=t,d&&d(t)};var l=[n];return o&&(r?g?l.unshift(r):l.push(r):this.defaultLoader&&(g?l.unshift(this.defaultLoader):l.push(this.defaultLoader))),i.default.createElement(a,s,l)}}]),t}(o.Component);d.propTypes={children:g.default.node.isRequired,element:g.default.node,hasMore:g.default.bool,initialLoad:g.default.bool,isReverse:g.default.bool,loader:g.default.node,loadMore:g.default.func.isRequired,pageStart:g.default.number,ref:g.default.func,getScrollParent:g.default.func,threshold:g.default.number,useCapture:g.default.bool,useWindow:g.default.bool},d.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=d,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)}}]); |