!(function(){var lw=Object.defineProperty,uw=Object.defineProperties;var cw=Object.getOwnPropertyDescriptors;var r0=Object.getOwnPropertySymbols;var wx=Object.prototype.hasOwnProperty,Px=Object.prototype.propertyIsEnumerable;var Qy=Math.pow,xx=(Dn,ei,be)=>ei in Dn?lw(Dn,ei,{enumerable:!0,configurable:!0,writable:!0,value:be}):Dn[ei]=be,ys=(Dn,ei)=>{for(var be in ei||(ei={}))wx.call(ei,be)&&xx(Dn,be,ei[be]);if(r0)for(var be of r0(ei))Px.call(ei,be)&&xx(Dn,be,ei[be]);return Dn},ql=(Dn,ei)=>uw(Dn,cw(ei));var o0=(Dn,ei)=>{var be={};for(var ve in Dn)wx.call(Dn,ve)&&ei.indexOf(ve)<0&&(be[ve]=Dn[ve]);if(Dn!=null&&r0)for(var ve of r0(Dn))ei.indexOf(ve)<0&&Px.call(Dn,ve)&&(be[ve]=Dn[ve]);return be};var Cx=(Dn,ei,be)=>new Promise((ve,ot)=>{var wt=Re=>{try{Nt(be.next(Re))}catch(Je){ot(Je)}},Qt=Re=>{try{Nt(be.throw(Re))}catch(Je){ot(Je)}},Nt=Re=>Re.done?ve(Re.value):Promise.resolve(Re.value).then(wt,Qt);Nt((be=be.apply(Dn,ei)).next())});(self.webpackChunk=self.webpackChunk||[]).push([[4030],{50881:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return Je}});var ve=be(87462),ot=be(67294),wt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},Qt=wt,Nt=be(17207),Re=function(mt,yt){return ot.createElement(Nt.Z,(0,ve.Z)({},mt,{ref:yt,icon:Qt}))},Je=ot.forwardRef(Re)},60887:function(Dn,ei,be){"use strict";be.d(ei,{LB:function(){return Yo},g4:function(){return Di},VK:function(){return Ne},Cj:function(){return $a},O1:function(){return Ba},Zj:function(){return So}});var ve=be(67294),ot=be(73935),wt=be(24285);const Qt={display:"none"};function Nt(St){let{id:Rt,value:gn}=St;return ve.createElement("div",{id:Rt,style:Qt},gn)}function Re(St){let{id:Rt,announcement:gn,ariaLiveType:Hn="assertive"}=St;const Oi={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ve.createElement("div",{id:Rt,style:Oi,role:"status","aria-live":Hn,"aria-atomic":!0},gn)}function Je(){const[St,Rt]=(0,ve.useState)("");return{announce:(0,ve.useCallback)(Hn=>{Hn!=null&&Rt(Hn)},[]),announcement:St}}const pt=(0,ve.createContext)(null);function mt(St){const Rt=(0,ve.useContext)(pt);(0,ve.useEffect)(()=>{if(!Rt)throw new Error("useDndMonitor must be used within a children of ");return Rt(St)},[St,Rt])}function yt(){const[St]=(0,ve.useState)(()=>new Set),Rt=(0,ve.useCallback)(Hn=>(St.add(Hn),()=>St.delete(Hn)),[St]);return[(0,ve.useCallback)(Hn=>{let{type:Oi,event:Yt}=Hn;St.forEach(Zn=>{var Ji;return(Ji=Zn[Oi])==null?void 0:Ji.call(Zn,Yt)})},[St]),Rt]}const Vt={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. `},ct={onDragStart(St){let{active:Rt}=St;return"Picked up draggable item "+Rt.id+"."},onDragOver(St){let{active:Rt,over:gn}=St;return gn?"Draggable item "+Rt.id+" was moved over droppable area "+gn.id+".":"Draggable item "+Rt.id+" is no longer over a droppable area."},onDragEnd(St){let{active:Rt,over:gn}=St;return gn?"Draggable item "+Rt.id+" was dropped over droppable area "+gn.id:"Draggable item "+Rt.id+" was dropped."},onDragCancel(St){let{active:Rt}=St;return"Dragging was cancelled. Draggable item "+Rt.id+" was dropped."}};function We(St){let{announcements:Rt=ct,container:gn,hiddenTextDescribedById:Hn,screenReaderInstructions:Oi=Vt}=St;const{announce:Yt,announcement:Zn}=Je(),Ji=(0,wt.Ld)("DndLiveRegion"),[xi,nr]=(0,ve.useState)(!1);if((0,ve.useEffect)(()=>{nr(!0)},[]),mt((0,ve.useMemo)(()=>({onDragStart(vi){let{active:pr}=vi;Yt(Rt.onDragStart({active:pr}))},onDragMove(vi){let{active:pr,over:fn}=vi;Rt.onDragMove&&Yt(Rt.onDragMove({active:pr,over:fn}))},onDragOver(vi){let{active:pr,over:fn}=vi;Yt(Rt.onDragOver({active:pr,over:fn}))},onDragEnd(vi){let{active:pr,over:fn}=vi;Yt(Rt.onDragEnd({active:pr,over:fn}))},onDragCancel(vi){let{active:pr,over:fn}=vi;Yt(Rt.onDragCancel({active:pr,over:fn}))}}),[Yt,Rt])),!xi)return null;const Zi=ve.createElement(ve.Fragment,null,ve.createElement(Nt,{id:Hn,value:Oi.draggable}),ve.createElement(Re,{id:Ji,announcement:Zn}));return gn?(0,ot.createPortal)(Zi,gn):Zi}var Te;(function(St){St.DragStart="dragStart",St.DragMove="dragMove",St.DragEnd="dragEnd",St.DragCancel="dragCancel",St.DragOver="dragOver",St.RegisterDroppable="registerDroppable",St.SetDroppableDisabled="setDroppableDisabled",St.UnregisterDroppable="unregisterDroppable"})(Te||(Te={}));function ne(){}function te(St,Rt){return useMemo(()=>({sensor:St,options:Rt!=null?Rt:{}}),[St,Rt])}function ue(){for(var St=arguments.length,Rt=new Array(St),gn=0;gn[...Rt].filter(Hn=>Hn!=null),[...Rt])}const se=Object.freeze({x:0,y:0});function ge(St,Rt){return Math.sqrt(Math.pow(St.x-Rt.x,2)+Math.pow(St.y-Rt.y,2))}function me(St,Rt){const gn=getEventCoordinates(St);if(!gn)return"0 0";const Hn={x:(gn.x-Rt.left)/Rt.width*100,y:(gn.y-Rt.top)/Rt.height*100};return Hn.x+"% "+Hn.y+"%"}function xe(St,Rt){let{data:{value:gn}}=St,{data:{value:Hn}}=Rt;return gn-Hn}function Pe(St,Rt){let{data:{value:gn}}=St,{data:{value:Hn}}=Rt;return Hn-gn}function Ke(St){let{left:Rt,top:gn,height:Hn,width:Oi}=St;return[{x:Rt,y:gn},{x:Rt+Oi,y:gn},{x:Rt,y:gn+Hn},{x:Rt+Oi,y:gn+Hn}]}function nt(St,Rt){if(!St||St.length===0)return null;const[gn]=St;return Rt?gn[Rt]:gn}function ft(St,Rt,gn){return Rt===void 0&&(Rt=St.left),gn===void 0&&(gn=St.top),{x:Rt+St.width*.5,y:gn+St.height*.5}}const qe=St=>{let{collisionRect:Rt,droppableRects:gn,droppableContainers:Hn}=St;const Oi=ft(Rt,Rt.left,Rt.top),Yt=[];for(const Zn of Hn){const{id:Ji}=Zn,xi=gn.get(Ji);if(xi){const nr=ge(ft(xi),Oi);Yt.push({id:Ji,data:{droppableContainer:Zn,value:nr}})}}return Yt.sort(xe)},at=St=>{let{collisionRect:Rt,droppableRects:gn,droppableContainers:Hn}=St;const Oi=Ke(Rt),Yt=[];for(const Zn of Hn){const{id:Ji}=Zn,xi=gn.get(Ji);if(xi){const nr=Ke(xi),Zi=Oi.reduce((pr,fn,eo)=>pr+ge(nr[eo],fn),0),vi=Number((Zi/4).toFixed(4));Yt.push({id:Ji,data:{droppableContainer:Zn,value:vi}})}}return Yt.sort(xe)};function jt(St,Rt){const gn=Math.max(Rt.top,St.top),Hn=Math.max(Rt.left,St.left),Oi=Math.min(Rt.left+Rt.width,St.left+St.width),Yt=Math.min(Rt.top+Rt.height,St.top+St.height),Zn=Oi-Hn,Ji=Yt-gn;if(Hn{let{collisionRect:Rt,droppableRects:gn,droppableContainers:Hn}=St;const Oi=[];for(const Yt of Hn){const{id:Zn}=Yt,Ji=gn.get(Zn);if(Ji){const xi=jt(Ji,Rt);xi>0&&Oi.push({id:Zn,data:{droppableContainer:Yt,value:xi}})}}return Oi.sort(Pe)};function bt(St,Rt){const{top:gn,left:Hn,bottom:Oi,right:Yt}=Rt;return gn<=St.y&&St.y<=Oi&&Hn<=St.x&&St.x<=Yt}const Bt=St=>{let{droppableContainers:Rt,droppableRects:gn,pointerCoordinates:Hn}=St;if(!Hn)return[];const Oi=[];for(const Yt of Rt){const{id:Zn}=Yt,Ji=gn.get(Zn);if(Ji&&bt(Hn,Ji)){const nr=Ke(Ji).reduce((vi,pr)=>vi+ge(Hn,pr),0),Zi=Number((nr/4).toFixed(4));Oi.push({id:Zn,data:{droppableContainer:Yt,value:Zi}})}}return Oi.sort(xe)};function Ht(St,Rt,gn){return ql(ys({},St),{scaleX:Rt&&gn?Rt.width/gn.width:1,scaleY:Rt&&gn?Rt.height/gn.height:1})}function Jn(St,Rt){return St&&Rt?{x:St.left-Rt.left,y:St.top-Rt.top}:se}function qn(St){return function(gn){for(var Hn=arguments.length,Oi=new Array(Hn>1?Hn-1:0),Yt=1;Ytql(ys({},Zn),{top:Zn.top+St*Ji.y,bottom:Zn.bottom+St*Ji.y,left:Zn.left+St*Ji.x,right:Zn.right+St*Ji.x}),ys({},gn))}}const sn=qn(1);function Nn(St){if(St.startsWith("matrix3d(")){const Rt=St.slice(9,-1).split(/, /);return{x:+Rt[12],y:+Rt[13],scaleX:+Rt[0],scaleY:+Rt[5]}}else if(St.startsWith("matrix(")){const Rt=St.slice(7,-1).split(/, /);return{x:+Rt[4],y:+Rt[5],scaleX:+Rt[0],scaleY:+Rt[3]}}return null}function lt(St,Rt,gn){const Hn=Nn(Rt);if(!Hn)return St;const{scaleX:Oi,scaleY:Yt,x:Zn,y:Ji}=Hn,xi=St.left-Zn-(1-Oi)*parseFloat(gn),nr=St.top-Ji-(1-Yt)*parseFloat(gn.slice(gn.indexOf(" ")+1)),Zi=Oi?St.width/Oi:St.width,vi=Yt?St.height/Yt:St.height;return{width:Zi,height:vi,top:nr,right:xi+Zi,bottom:nr+vi,left:xi}}const Ge={ignoreTransform:!1};function Ne(St,Rt){Rt===void 0&&(Rt=Ge);let gn=St.getBoundingClientRect();if(Rt.ignoreTransform){const{transform:nr,transformOrigin:Zi}=(0,wt.Jj)(St).getComputedStyle(St);nr&&(gn=lt(gn,nr,Zi))}const{top:Hn,left:Oi,width:Yt,height:Zn,bottom:Ji,right:xi}=gn;return{top:Hn,left:Oi,width:Yt,height:Zn,bottom:Ji,right:xi}}function Rn(St){return Ne(St,{ignoreTransform:!0})}function ai(St){const Rt=St.innerWidth,gn=St.innerHeight;return{top:0,left:0,right:Rt,bottom:gn,width:Rt,height:gn}}function Zt(St,Rt){return Rt===void 0&&(Rt=(0,wt.Jj)(St).getComputedStyle(St)),Rt.position==="fixed"}function ci(St,Rt){Rt===void 0&&(Rt=(0,wt.Jj)(St).getComputedStyle(St));const gn=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(Oi=>{const Yt=Rt[Oi];return typeof Yt=="string"?gn.test(Yt):!1})}function On(St,Rt){const gn=[];function Hn(Oi){if(Rt!=null&&gn.length>=Rt||!Oi)return gn;if((0,wt.qk)(Oi)&&Oi.scrollingElement!=null&&!gn.includes(Oi.scrollingElement))return gn.push(Oi.scrollingElement),gn;if(!(0,wt.Re)(Oi)||(0,wt.vZ)(Oi)||gn.includes(Oi))return gn;const Yt=(0,wt.Jj)(St).getComputedStyle(Oi);return Oi!==St&&ci(Oi,Yt)&&gn.push(Oi),Zt(Oi,Yt)?gn:Hn(Oi.parentNode)}return St?Hn(St):gn}function Mi(St){const[Rt]=On(St,1);return Rt!=null?Rt:null}function Xt(St){return!wt.Nq||!St?null:(0,wt.FJ)(St)?St:(0,wt.UG)(St)?(0,wt.qk)(St)||St===(0,wt.r3)(St).scrollingElement?window:(0,wt.Re)(St)?St:null:null}function At(St){return(0,wt.FJ)(St)?St.scrollX:St.scrollLeft}function on(St){return(0,wt.FJ)(St)?St.scrollY:St.scrollTop}function Si(St){return{x:At(St),y:on(St)}}var Gt;(function(St){St[St.Forward=1]="Forward",St[St.Backward=-1]="Backward"})(Gt||(Gt={}));function Xe(St){return!wt.Nq||!St?!1:St===document.scrollingElement}function ke(St){const Rt={x:0,y:0},gn=Xe(St)?{height:window.innerHeight,width:window.innerWidth}:{height:St.clientHeight,width:St.clientWidth},Hn={x:St.scrollWidth-gn.width,y:St.scrollHeight-gn.height},Oi=St.scrollTop<=Rt.y,Yt=St.scrollLeft<=Rt.x,Zn=St.scrollTop>=Hn.y,Ji=St.scrollLeft>=Hn.x;return{isTop:Oi,isLeft:Yt,isBottom:Zn,isRight:Ji,maxScroll:Hn,minScroll:Rt}}const Me={x:.2,y:.2};function He(St,Rt,gn,Hn,Oi){let{top:Yt,left:Zn,right:Ji,bottom:xi}=gn;Hn===void 0&&(Hn=10),Oi===void 0&&(Oi=Me);const{isTop:nr,isBottom:Zi,isLeft:vi,isRight:pr}=ke(St),fn={x:0,y:0},eo={x:0,y:0},so={height:Rt.height*Oi.y,width:Rt.width*Oi.x};return!nr&&Yt<=Rt.top+so.height?(fn.y=Gt.Backward,eo.y=Hn*Math.abs((Rt.top+so.height-Yt)/so.height)):!Zi&&xi>=Rt.bottom-so.height&&(fn.y=Gt.Forward,eo.y=Hn*Math.abs((Rt.bottom-so.height-xi)/so.height)),!pr&&Ji>=Rt.right-so.width?(fn.x=Gt.Forward,eo.x=Hn*Math.abs((Rt.right-so.width-Ji)/so.width)):!vi&&Zn<=Rt.left+so.width&&(fn.x=Gt.Backward,eo.x=Hn*Math.abs((Rt.left+so.width-Zn)/so.width)),{direction:fn,speed:eo}}function et(St){if(St===document.scrollingElement){const{innerWidth:Yt,innerHeight:Zn}=window;return{top:0,left:0,right:Yt,bottom:Zn,width:Yt,height:Zn}}const{top:Rt,left:gn,right:Hn,bottom:Oi}=St.getBoundingClientRect();return{top:Rt,left:gn,right:Hn,bottom:Oi,width:St.clientWidth,height:St.clientHeight}}function Oe(St){return St.reduce((Rt,gn)=>(0,wt.IH)(Rt,Si(gn)),se)}function ut(St){return St.reduce((Rt,gn)=>Rt+At(gn),0)}function Vn(St){return St.reduce((Rt,gn)=>Rt+on(gn),0)}function jn(St,Rt){if(Rt===void 0&&(Rt=Ne),!St)return;const{top:gn,left:Hn,bottom:Oi,right:Yt}=Rt(St);Mi(St)&&(Oi<=0||Yt<=0||gn>=window.innerHeight||Hn>=window.innerWidth)&&St.scrollIntoView({block:"center",inline:"center"})}const An=[["x",["left","right"],ut],["y",["top","bottom"],Vn]];class Pn{constructor(Rt,gn){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const Hn=On(gn),Oi=Oe(Hn);this.rect=ys({},Rt),this.width=Rt.width,this.height=Rt.height;for(const[Yt,Zn,Ji]of An)for(const xi of Zn)Object.defineProperty(this,xi,{get:()=>{const nr=Ji(Hn),Zi=Oi[Yt]-nr;return this.rect[xi]+Zi},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class si{constructor(Rt){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(gn=>{var Hn;return(Hn=this.target)==null?void 0:Hn.removeEventListener(...gn)})},this.target=Rt}add(Rt,gn,Hn){var Oi;(Oi=this.target)==null||Oi.addEventListener(Rt,gn,Hn),this.listeners.push([Rt,gn,Hn])}}function mn(St){const{EventTarget:Rt}=(0,wt.Jj)(St);return St instanceof Rt?St:(0,wt.r3)(St)}function Fi(St,Rt){const gn=Math.abs(St.x),Hn=Math.abs(St.y);return typeof Rt=="number"?Math.sqrt(Qy(gn,2)+Qy(Hn,2))>Rt:"x"in Rt&&"y"in Rt?gn>Rt.x&&Hn>Rt.y:"x"in Rt?gn>Rt.x:"y"in Rt?Hn>Rt.y:!1}var Vi;(function(St){St.Click="click",St.DragStart="dragstart",St.Keydown="keydown",St.ContextMenu="contextmenu",St.Resize="resize",St.SelectionChange="selectionchange",St.VisibilityChange="visibilitychange"})(Vi||(Vi={}));function Ir(St){St.preventDefault()}function Qi(St){St.stopPropagation()}var Di;(function(St){St.Space="Space",St.Down="ArrowDown",St.Right="ArrowRight",St.Left="ArrowLeft",St.Up="ArrowUp",St.Esc="Escape",St.Enter="Enter"})(Di||(Di={}));const $r={start:[Di.Space,Di.Enter],cancel:[Di.Esc],end:[Di.Space,Di.Enter]},Yi=(St,Rt)=>{let{currentCoordinates:gn}=Rt;switch(St.code){case Di.Right:return ql(ys({},gn),{x:gn.x+25});case Di.Left:return ql(ys({},gn),{x:gn.x-25});case Di.Down:return ql(ys({},gn),{y:gn.y+25});case Di.Up:return ql(ys({},gn),{y:gn.y-25})}};class hr{constructor(Rt){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=Rt;const{event:{target:gn}}=Rt;this.props=Rt,this.listeners=new si((0,wt.r3)(gn)),this.windowListeners=new si((0,wt.Jj)(gn)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Vi.Resize,this.handleCancel),this.windowListeners.add(Vi.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Vi.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:Rt,onStart:gn}=this.props,Hn=Rt.node.current;Hn&&jn(Hn),gn(se)}handleKeyDown(Rt){if((0,wt.vd)(Rt)){const{active:gn,context:Hn,options:Oi}=this.props,{keyboardCodes:Yt=$r,coordinateGetter:Zn=Yi,scrollBehavior:Ji="smooth"}=Oi,{code:xi}=Rt;if(Yt.end.includes(xi)){this.handleEnd(Rt);return}if(Yt.cancel.includes(xi)){this.handleCancel(Rt);return}const{collisionRect:nr}=Hn.current,Zi=nr?{x:nr.left,y:nr.top}:se;this.referenceCoordinates||(this.referenceCoordinates=Zi);const vi=Zn(Rt,{active:gn,context:Hn.current,currentCoordinates:Zi});if(vi){const pr=(0,wt.$X)(vi,Zi),fn={x:0,y:0},{scrollableAncestors:eo}=Hn.current;for(const so of eo){const ya=Rt.code,{isTop:fa,isRight:Ia,isLeft:ns,isBottom:Us,maxScroll:Ds,minScroll:fl}=ke(so),Hs=et(so),cn={x:Math.min(ya===Di.Right?Hs.right-Hs.width/2:Hs.right,Math.max(ya===Di.Right?Hs.left:Hs.left+Hs.width/2,vi.x)),y:Math.min(ya===Di.Down?Hs.bottom-Hs.height/2:Hs.bottom,Math.max(ya===Di.Down?Hs.top:Hs.top+Hs.height/2,vi.y))},nl=ya===Di.Right&&!Ia||ya===Di.Left&&!ns,dl=ya===Di.Down&&!Us||ya===Di.Up&&!fa;if(nl&&cn.x!==vi.x){const gl=so.scrollLeft+pr.x,Ys=ya===Di.Right&&gl<=Ds.x||ya===Di.Left&&gl>=fl.x;if(Ys&&!pr.y){so.scrollTo({left:gl,behavior:Ji});return}Ys?fn.x=so.scrollLeft-gl:fn.x=ya===Di.Right?so.scrollLeft-Ds.x:so.scrollLeft-fl.x,fn.x&&so.scrollBy({left:-fn.x,behavior:Ji});break}else if(dl&&cn.y!==vi.y){const gl=so.scrollTop+pr.y,Ys=ya===Di.Down&&gl<=Ds.y||ya===Di.Up&&gl>=fl.y;if(Ys&&!pr.x){so.scrollTo({top:gl,behavior:Ji});return}Ys?fn.y=so.scrollTop-gl:fn.y=ya===Di.Down?so.scrollTop-Ds.y:so.scrollTop-fl.y,fn.y&&so.scrollBy({top:-fn.y,behavior:Ji});break}}this.handleMove(Rt,(0,wt.IH)((0,wt.$X)(vi,this.referenceCoordinates),fn))}}}handleMove(Rt,gn){const{onMove:Hn}=this.props;Rt.preventDefault(),Hn(gn)}handleEnd(Rt){const{onEnd:gn}=this.props;Rt.preventDefault(),this.detach(),gn()}handleCancel(Rt){const{onCancel:gn}=this.props;Rt.preventDefault(),this.detach(),gn()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}hr.activators=[{eventName:"onKeyDown",handler:(St,Rt,gn)=>{let{keyboardCodes:Hn=$r,onActivation:Oi}=Rt,{active:Yt}=gn;const{code:Zn}=St.nativeEvent;if(Hn.start.includes(Zn)){const Ji=Yt.activatorNode.current;return Ji&&St.target!==Ji?!1:(St.preventDefault(),Oi==null||Oi({event:St.nativeEvent}),!0)}return!1}}];function dr(St){return!!(St&&"distance"in St)}function kn(St){return!!(St&&"delay"in St)}class Ii{constructor(Rt,gn,Hn){var Oi;Hn===void 0&&(Hn=mn(Rt.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=Rt,this.events=gn;const{event:Yt}=Rt,{target:Zn}=Yt;this.props=Rt,this.events=gn,this.document=(0,wt.r3)(Zn),this.documentListeners=new si(this.document),this.listeners=new si(Hn),this.windowListeners=new si((0,wt.Jj)(Zn)),this.initialCoordinates=(Oi=(0,wt.DC)(Yt))!=null?Oi:se,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:Rt,props:{options:{activationConstraint:gn,bypassActivationConstraint:Hn}}}=this;if(this.listeners.add(Rt.move.name,this.handleMove,{passive:!1}),this.listeners.add(Rt.end.name,this.handleEnd),this.windowListeners.add(Vi.Resize,this.handleCancel),this.windowListeners.add(Vi.DragStart,Ir),this.windowListeners.add(Vi.VisibilityChange,this.handleCancel),this.windowListeners.add(Vi.ContextMenu,Ir),this.documentListeners.add(Vi.Keydown,this.handleKeydown),gn){if(Hn!=null&&Hn({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(kn(gn)){this.timeoutId=setTimeout(this.handleStart,gn.delay);return}if(dr(gn))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:Rt}=this,{onStart:gn}=this.props;Rt&&(this.activated=!0,this.documentListeners.add(Vi.Click,Qi,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Vi.SelectionChange,this.removeTextSelection),gn(Rt))}handleMove(Rt){var gn;const{activated:Hn,initialCoordinates:Oi,props:Yt}=this,{onMove:Zn,options:{activationConstraint:Ji}}=Yt;if(!Oi)return;const xi=(gn=(0,wt.DC)(Rt))!=null?gn:se,nr=(0,wt.$X)(Oi,xi);if(!Hn&&Ji){if(dr(Ji)){if(Ji.tolerance!=null&&Fi(nr,Ji.tolerance))return this.handleCancel();if(Fi(nr,Ji.distance))return this.handleStart()}return kn(Ji)&&Fi(nr,Ji.tolerance)?this.handleCancel():void 0}Rt.cancelable&&Rt.preventDefault(),Zn(xi)}handleEnd(){const{onEnd:Rt}=this.props;this.detach(),Rt()}handleCancel(){const{onCancel:Rt}=this.props;this.detach(),Rt()}handleKeydown(Rt){Rt.code===Di.Esc&&this.handleCancel()}removeTextSelection(){var Rt;(Rt=this.document.getSelection())==null||Rt.removeAllRanges()}}const ra={move:{name:"pointermove"},end:{name:"pointerup"}};class Un extends Ii{constructor(Rt){const{event:gn}=Rt,Hn=(0,wt.r3)(gn.target);super(Rt,ra,Hn)}}Un.activators=[{eventName:"onPointerDown",handler:(St,Rt)=>{let{nativeEvent:gn}=St,{onActivation:Hn}=Rt;return!gn.isPrimary||gn.button!==0?!1:(Hn==null||Hn({event:gn}),!0)}}];const Kr={move:{name:"mousemove"},end:{name:"mouseup"}};var ia;(function(St){St[St.RightClick=2]="RightClick"})(ia||(ia={}));class sa extends Ii{constructor(Rt){super(Rt,Kr,(0,wt.r3)(Rt.event.target))}}sa.activators=[{eventName:"onMouseDown",handler:(St,Rt)=>{let{nativeEvent:gn}=St,{onActivation:Hn}=Rt;return gn.button===ia.RightClick?!1:(Hn==null||Hn({event:gn}),!0)}}];const Wa={move:{name:"touchmove"},end:{name:"touchend"}};class ma extends Ii{constructor(Rt){super(Rt,Wa)}static setup(){return window.addEventListener(Wa.move.name,Rt,{capture:!1,passive:!1}),function(){window.removeEventListener(Wa.move.name,Rt)};function Rt(){}}}ma.activators=[{eventName:"onTouchStart",handler:(St,Rt)=>{let{nativeEvent:gn}=St,{onActivation:Hn}=Rt;const{touches:Oi}=gn;return Oi.length>1?!1:(Hn==null||Hn({event:gn}),!0)}}];var Ha;(function(St){St[St.Pointer=0]="Pointer",St[St.DraggableRect=1]="DraggableRect"})(Ha||(Ha={}));var da;(function(St){St[St.TreeOrder=0]="TreeOrder",St[St.ReversedTreeOrder=1]="ReversedTreeOrder"})(da||(da={}));function la(St){let{acceleration:Rt,activator:gn=Ha.Pointer,canScroll:Hn,draggingRect:Oi,enabled:Yt,interval:Zn=5,order:Ji=da.TreeOrder,pointerCoordinates:xi,scrollableAncestors:nr,scrollableAncestorRects:Zi,delta:vi,threshold:pr}=St;const fn=ti({delta:vi,disabled:!Yt}),[eo,so]=(0,wt.Yz)(),ya=(0,ve.useRef)({x:0,y:0}),fa=(0,ve.useRef)({x:0,y:0}),Ia=(0,ve.useMemo)(()=>{switch(gn){case Ha.Pointer:return xi?{top:xi.y,bottom:xi.y,left:xi.x,right:xi.x}:null;case Ha.DraggableRect:return Oi}},[gn,Oi,xi]),ns=(0,ve.useRef)(null),Us=(0,ve.useCallback)(()=>{const fl=ns.current;if(!fl)return;const Hs=ya.current.x*fa.current.x,cn=ya.current.y*fa.current.y;fl.scrollBy(Hs,cn)},[]),Ds=(0,ve.useMemo)(()=>Ji===da.TreeOrder?[...nr].reverse():nr,[Ji,nr]);(0,ve.useEffect)(()=>{if(!Yt||!nr.length||!Ia){so();return}for(const fl of Ds){if((Hn==null?void 0:Hn(fl))===!1)continue;const Hs=nr.indexOf(fl),cn=Zi[Hs];if(!cn)continue;const{direction:nl,speed:dl}=He(fl,cn,Ia,Rt,pr);for(const gl of["x","y"])fn[gl][nl[gl]]||(dl[gl]=0,nl[gl]=0);if(dl.x>0||dl.y>0){so(),ns.current=fl,eo(Us,Zn),ya.current=dl,fa.current=nl;return}}ya.current={x:0,y:0},fa.current={x:0,y:0},so()},[Rt,Us,Hn,so,Yt,Zn,JSON.stringify(Ia),JSON.stringify(fn),eo,nr,Ds,Zi,JSON.stringify(pr)])}const No={x:{[Gt.Backward]:!1,[Gt.Forward]:!1},y:{[Gt.Backward]:!1,[Gt.Forward]:!1}};function ti(St){let{delta:Rt,disabled:gn}=St;const Hn=(0,wt.D9)(Rt);return(0,wt.Gj)(Oi=>{if(gn||!Hn||!Oi)return No;const Yt={x:Math.sign(Rt.x-Hn.x),y:Math.sign(Rt.y-Hn.y)};return{x:{[Gt.Backward]:Oi.x[Gt.Backward]||Yt.x===-1,[Gt.Forward]:Oi.x[Gt.Forward]||Yt.x===1},y:{[Gt.Backward]:Oi.y[Gt.Backward]||Yt.y===-1,[Gt.Forward]:Oi.y[Gt.Forward]||Yt.y===1}}},[gn,Rt,Hn])}function Ee(St,Rt){const gn=Rt!==null?St.get(Rt):void 0,Hn=gn?gn.node.current:null;return(0,wt.Gj)(Oi=>{var Yt;return Rt===null?null:(Yt=Hn!=null?Hn:Oi)!=null?Yt:null},[Hn,Rt])}function pn(St,Rt){return(0,ve.useMemo)(()=>St.reduce((gn,Hn)=>{const{sensor:Oi}=Hn,Yt=Oi.activators.map(Zn=>({eventName:Zn.eventName,handler:Rt(Zn.handler,Hn)}));return[...gn,...Yt]},[]),[St,Rt])}var hn;(function(St){St[St.Always=0]="Always",St[St.BeforeDragging=1]="BeforeDragging",St[St.WhileDragging=2]="WhileDragging"})(hn||(hn={}));var ii;(function(St){St.Optimized="optimized"})(ii||(ii={}));const Yn=new Map;function In(St,Rt){let{dragging:gn,dependencies:Hn,config:Oi}=Rt;const[Yt,Zn]=(0,ve.useState)(null),{frequency:Ji,measure:xi,strategy:nr}=Oi,Zi=(0,ve.useRef)(St),vi=ya(),pr=(0,wt.Ey)(vi),fn=(0,ve.useCallback)(function(fa){fa===void 0&&(fa=[]),!pr.current&&Zn(Ia=>Ia===null?fa:Ia.concat(fa.filter(ns=>!Ia.includes(ns))))},[pr]),eo=(0,ve.useRef)(null),so=(0,wt.Gj)(fa=>{if(vi&&!gn)return Yn;if(!fa||fa===Yn||Zi.current!==St||Yt!=null){const Ia=new Map;for(let ns of St){if(!ns)continue;if(Yt&&Yt.length>0&&!Yt.includes(ns.id)&&ns.rect.current){Ia.set(ns.id,ns.rect.current);continue}const Us=ns.node.current,Ds=Us?new Pn(xi(Us),Us):null;ns.rect.current=Ds,Ds&&Ia.set(ns.id,Ds)}return Ia}return fa},[St,Yt,gn,vi,xi]);return(0,ve.useEffect)(()=>{Zi.current=St},[St]),(0,ve.useEffect)(()=>{vi||fn()},[gn,vi]),(0,ve.useEffect)(()=>{Yt&&Yt.length>0&&Zn(null)},[JSON.stringify(Yt)]),(0,ve.useEffect)(()=>{vi||typeof Ji!="number"||eo.current!==null||(eo.current=setTimeout(()=>{fn(),eo.current=null},Ji))},[Ji,vi,fn,...Hn]),{droppableRects:so,measureDroppableContainers:fn,measuringScheduled:Yt!=null};function ya(){switch(nr){case hn.Always:return!1;case hn.BeforeDragging:return gn;default:return!gn}}}function en(St,Rt){return(0,wt.Gj)(gn=>St?gn||(typeof Rt=="function"?Rt(St):St):null,[Rt,St])}function ni(St,Rt){return en(St,Rt)}function zt(St){let{callback:Rt,disabled:gn}=St;const Hn=(0,wt.zX)(Rt),Oi=(0,ve.useMemo)(()=>{if(gn||typeof window=="undefined"||typeof window.MutationObserver=="undefined")return;const{MutationObserver:Yt}=window;return new Yt(Hn)},[Hn,gn]);return(0,ve.useEffect)(()=>()=>Oi==null?void 0:Oi.disconnect(),[Oi]),Oi}function Kt(St){let{callback:Rt,disabled:gn}=St;const Hn=(0,wt.zX)(Rt),Oi=(0,ve.useMemo)(()=>{if(gn||typeof window=="undefined"||typeof window.ResizeObserver=="undefined")return;const{ResizeObserver:Yt}=window;return new Yt(Hn)},[gn]);return(0,ve.useEffect)(()=>()=>Oi==null?void 0:Oi.disconnect(),[Oi]),Oi}function Ft(St){return new Pn(Ne(St),St)}function un(St,Rt,gn){Rt===void 0&&(Rt=Ft);const[Hn,Oi]=(0,ve.useReducer)(Ji,null),Yt=zt({callback(xi){if(St)for(const nr of xi){const{type:Zi,target:vi}=nr;if(Zi==="childList"&&vi instanceof HTMLElement&&vi.contains(St)){Oi();break}}}}),Zn=Kt({callback:Oi});return(0,wt.LI)(()=>{Oi(),St?(Zn==null||Zn.observe(St),Yt==null||Yt.observe(document.body,{childList:!0,subtree:!0})):(Zn==null||Zn.disconnect(),Yt==null||Yt.disconnect())},[St]),Hn;function Ji(xi){if(!St)return null;if(St.isConnected===!1){var nr;return(nr=xi!=null?xi:gn)!=null?nr:null}const Zi=Rt(St);return JSON.stringify(xi)===JSON.stringify(Zi)?xi:Zi}}function Ti(St){const Rt=en(St);return Jn(St,Rt)}const Ri=[];function hi(St){const Rt=(0,ve.useRef)(St),gn=(0,wt.Gj)(Hn=>St?Hn&&Hn!==Ri&&St&&Rt.current&&St.parentNode===Rt.current.parentNode?Hn:On(St):Ri,[St]);return(0,ve.useEffect)(()=>{Rt.current=St},[St]),gn}function Ut(St){const[Rt,gn]=(0,ve.useState)(null),Hn=(0,ve.useRef)(St),Oi=(0,ve.useCallback)(Yt=>{const Zn=Xt(Yt.target);Zn&&gn(Ji=>Ji?(Ji.set(Zn,Si(Zn)),new Map(Ji)):null)},[]);return(0,ve.useEffect)(()=>{const Yt=Hn.current;if(St!==Yt){Zn(Yt);const Ji=St.map(xi=>{const nr=Xt(xi);return nr?(nr.addEventListener("scroll",Oi,{passive:!0}),[nr,Si(nr)]):null}).filter(xi=>xi!=null);gn(Ji.length?new Map(Ji):null),Hn.current=St}return()=>{Zn(St),Zn(Yt)};function Zn(Ji){Ji.forEach(xi=>{const nr=Xt(xi);nr==null||nr.removeEventListener("scroll",Oi)})}},[Oi,St]),(0,ve.useMemo)(()=>St.length?Rt?Array.from(Rt.values()).reduce((Yt,Zn)=>(0,wt.IH)(Yt,Zn),se):Oe(St):se,[St,Rt])}function zn(St,Rt){Rt===void 0&&(Rt=[]);const gn=(0,ve.useRef)(null);return(0,ve.useEffect)(()=>{gn.current=null},Rt),(0,ve.useEffect)(()=>{const Hn=St!==se;Hn&&!gn.current&&(gn.current=St),!Hn&&gn.current&&(gn.current=null)},[St]),gn.current?(0,wt.$X)(St,gn.current):se}function xn(St){(0,ve.useEffect)(()=>{if(!wt.Nq)return;const Rt=St.map(gn=>{let{sensor:Hn}=gn;return Hn.setup==null?void 0:Hn.setup()});return()=>{for(const gn of Rt)gn==null||gn()}},St.map(Rt=>{let{sensor:gn}=Rt;return gn}))}function Fr(St,Rt){return(0,ve.useMemo)(()=>St.reduce((gn,Hn)=>{let{eventName:Oi,handler:Yt}=Hn;return gn[Oi]=Zn=>{Yt(Zn,Rt)},gn},{}),[St,Rt])}function ri(St){return(0,ve.useMemo)(()=>St?ai(St):null,[St])}const $t=[];function _i(St,Rt){Rt===void 0&&(Rt=Ne);const[gn]=St,Hn=ri(gn?(0,wt.Jj)(gn):null),[Oi,Yt]=(0,ve.useReducer)(Ji,$t),Zn=Kt({callback:Yt});return St.length>0&&Oi===$t&&Yt(),(0,wt.LI)(()=>{St.length?St.forEach(xi=>Zn==null?void 0:Zn.observe(xi)):(Zn==null||Zn.disconnect(),Yt())},[St]),Oi;function Ji(){return St.length?St.map(xi=>Xe(xi)?Hn:new Pn(Rt(xi),xi)):$t}}function Wr(St){if(!St)return null;if(St.children.length>1)return St;const Rt=St.children[0];return(0,wt.Re)(Rt)?Rt:St}function Br(St){let{measure:Rt}=St;const[gn,Hn]=(0,ve.useState)(null),Oi=(0,ve.useCallback)(nr=>{for(const{target:Zi}of nr)if((0,wt.Re)(Zi)){Hn(vi=>{const pr=Rt(Zi);return vi?ql(ys({},vi),{width:pr.width,height:pr.height}):pr});break}},[Rt]),Yt=Kt({callback:Oi}),Zn=(0,ve.useCallback)(nr=>{const Zi=Wr(nr);Yt==null||Yt.disconnect(),Zi&&(Yt==null||Yt.observe(Zi)),Hn(Zi?Rt(Zi):null)},[Rt,Yt]),[Ji,xi]=(0,wt.wm)(Zn);return(0,ve.useMemo)(()=>({nodeRef:Ji,rect:gn,setRef:xi}),[gn,Ji,xi])}const Sn=[{sensor:Un,options:{}},{sensor:hr,options:{}}],or={current:{}},Xo={draggable:{measure:Rn},droppable:{measure:Rn,strategy:hn.WhileDragging,frequency:ii.Optimized},dragOverlay:{measure:Ne}};class Na extends Map{get(Rt){var gn;return Rt!=null&&(gn=super.get(Rt))!=null?gn:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(Rt=>{let{disabled:gn}=Rt;return!gn})}getNodeFor(Rt){var gn,Hn;return(gn=(Hn=this.get(Rt))==null?void 0:Hn.node.current)!=null?gn:void 0}}const aa={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Na,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ne},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Xo,measureDroppableContainers:ne,windowRect:null,measuringScheduled:!1},ur={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ne,draggableNodes:new Map,over:null,measureDroppableContainers:ne},Nr=(0,ve.createContext)(ur),io=(0,ve.createContext)(aa);function va(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Na}}}function Ho(St,Rt){switch(Rt.type){case Te.DragStart:return ql(ys({},St),{draggable:ql(ys({},St.draggable),{initialCoordinates:Rt.initialCoordinates,active:Rt.active})});case Te.DragMove:return St.draggable.active?ql(ys({},St),{draggable:ql(ys({},St.draggable),{translate:{x:Rt.coordinates.x-St.draggable.initialCoordinates.x,y:Rt.coordinates.y-St.draggable.initialCoordinates.y}})}):St;case Te.DragEnd:case Te.DragCancel:return ql(ys({},St),{draggable:ql(ys({},St.draggable),{active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}})});case Te.RegisterDroppable:{const{element:gn}=Rt,{id:Hn}=gn,Oi=new Na(St.droppable.containers);return Oi.set(Hn,gn),ql(ys({},St),{droppable:ql(ys({},St.droppable),{containers:Oi})})}case Te.SetDroppableDisabled:{const{id:gn,key:Hn,disabled:Oi}=Rt,Yt=St.droppable.containers.get(gn);if(!Yt||Hn!==Yt.key)return St;const Zn=new Na(St.droppable.containers);return Zn.set(gn,ql(ys({},Yt),{disabled:Oi})),ql(ys({},St),{droppable:ql(ys({},St.droppable),{containers:Zn})})}case Te.UnregisterDroppable:{const{id:gn,key:Hn}=Rt,Oi=St.droppable.containers.get(gn);if(!Oi||Hn!==Oi.key)return St;const Yt=new Na(St.droppable.containers);return Yt.delete(gn),ql(ys({},St),{droppable:ql(ys({},St.droppable),{containers:Yt})})}default:return St}}function pi(St){let{disabled:Rt}=St;const{active:gn,activatorEvent:Hn,draggableNodes:Oi}=(0,ve.useContext)(Nr),Yt=(0,wt.D9)(Hn),Zn=(0,wt.D9)(gn==null?void 0:gn.id);return(0,ve.useEffect)(()=>{if(!Rt&&!Hn&&Yt&&Zn!=null){if(!(0,wt.vd)(Yt)||document.activeElement===Yt.target)return;const Ji=Oi.get(Zn);if(!Ji)return;const{activatorNode:xi,node:nr}=Ji;if(!xi.current&&!nr.current)return;requestAnimationFrame(()=>{for(const Zi of[xi.current,nr.current]){if(!Zi)continue;const vi=(0,wt.so)(Zi);if(vi){vi.focus();break}}})}},[Hn,Rt,Oi,Zn,Yt]),null}function lo(St,Rt){let Oi=Rt,{transform:gn}=Oi,Hn=o0(Oi,["transform"]);return St!=null&&St.length?St.reduce((Yt,Zn)=>Zn(ys({transform:Yt},Hn)),gn):gn}function al(St){return(0,ve.useMemo)(()=>({draggable:ys(ys({},Xo.draggable),St==null?void 0:St.draggable),droppable:ys(ys({},Xo.droppable),St==null?void 0:St.droppable),dragOverlay:ys(ys({},Xo.dragOverlay),St==null?void 0:St.dragOverlay)}),[St==null?void 0:St.draggable,St==null?void 0:St.droppable,St==null?void 0:St.dragOverlay])}function el(St){let{activeNode:Rt,measure:gn,initialRect:Hn,config:Oi=!0}=St;const Yt=(0,ve.useRef)(!1),{x:Zn,y:Ji}=typeof Oi=="boolean"?{x:Oi,y:Oi}:Oi;(0,wt.LI)(()=>{if(!Zn&&!Ji||!Rt){Yt.current=!1;return}if(Yt.current||!Hn)return;const nr=Rt==null?void 0:Rt.node.current;if(!nr||nr.isConnected===!1)return;const Zi=gn(nr),vi=Jn(Zi,Hn);if(Zn||(vi.x=0),Ji||(vi.y=0),Yt.current=!0,Math.abs(vi.x)>0||Math.abs(vi.y)>0){const pr=Mi(nr);pr&&pr.scrollBy({top:vi.y,left:vi.x})}},[Rt,Zn,Ji,Hn,gn])}const Ns=(0,ve.createContext)(ql(ys({},se),{scaleX:1,scaleY:1}));var ln;(function(St){St[St.Uninitialized=0]="Uninitialized",St[St.Initializing=1]="Initializing",St[St.Initialized=2]="Initialized"})(ln||(ln={}));const Yo=(0,ve.memo)(function(Rt){var gn,Hn,Oi,Yt;let xl=Rt,{id:Zn,accessibility:Ji,autoScroll:xi=!0,children:nr,sensors:Zi=Sn,collisionDetection:vi=Mt,measuring:pr,modifiers:fn}=xl,eo=o0(xl,["id","accessibility","autoScroll","children","sensors","collisionDetection","measuring","modifiers"]);const so=(0,ve.useReducer)(Ho,void 0,va),[ya,fa]=so,[Ia,ns]=yt(),[Us,Ds]=(0,ve.useState)(ln.Uninitialized),fl=Us===ln.Initialized,{draggable:{active:Hs,nodes:cn,translate:nl},droppable:{containers:dl}}=ya,gl=Hs?cn.get(Hs):null,Ys=(0,ve.useRef)({initial:null,translated:null}),Ul=(0,ve.useMemo)(()=>{var Ts;return Hs!=null?{id:Hs,data:(Ts=gl==null?void 0:gl.data)!=null?Ts:or,rect:Ys}:null},[Hs,gl]),hu=(0,ve.useRef)(null),[fc,_s]=(0,ve.useState)(null),[il,Ra]=(0,ve.useState)(null),Xa=(0,wt.Ey)(eo,Object.values(eo)),Is=(0,wt.Ld)("DndDescribedBy",Zn),pl=(0,ve.useMemo)(()=>dl.getEnabled(),[dl]),Mo=al(pr),{droppableRects:$u,measureDroppableContainers:Pu,measuringScheduled:$l}=In(pl,{dragging:fl,dependencies:[nl.x,nl.y],config:Mo.droppable}),ou=Ee(cn,Hs),gc=(0,ve.useMemo)(()=>il?(0,wt.DC)(il):null,[il]),kr=Vl(),hl=ni(ou,Mo.draggable.measure);el({activeNode:Hs?cn.get(Hs):null,config:kr.layoutShiftCompensation,initialRect:hl,measure:Mo.draggable.measure});const Rs=un(ou,Mo.draggable.measure,hl),Bu=un(ou?ou.parentElement:null),zu=(0,ve.useRef)({activatorEvent:null,active:null,activeNode:ou,collisionRect:null,collisions:null,droppableRects:$u,draggableNodes:cn,draggingNode:null,draggingNodeRect:null,droppableContainers:dl,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ou=dl.getNodeFor((gn=zu.current.over)==null?void 0:gn.id),Sa=Br({measure:Mo.dragOverlay.measure}),Lu=(Hn=Sa.nodeRef.current)!=null?Hn:ou,Fl=fl?(Oi=Sa.rect)!=null?Oi:Rs:null,Il=!!(Sa.nodeRef.current&&Sa.rect),eu=Ti(Il?null:Rs),Cc=ri(Lu?(0,wt.Jj)(Lu):null),du=hi(fl?Ou!=null?Ou:ou:null),Ol=_i(du),Cu=lo(fn,{transform:{x:nl.x-eu.x,y:nl.y-eu.y,scaleX:1,scaleY:1},activatorEvent:il,active:Ul,activeNodeRect:Rs,containerNodeRect:Bu,draggingNodeRect:Fl,over:zu.current.over,overlayNodeRect:Sa.rect,scrollableAncestors:du,scrollableAncestorRects:Ol,windowRect:Cc}),Wc=gc?(0,wt.IH)(gc,nl):null,ah=Ut(du),Hc=zn(ah),Yh=zn(ah,[Rs]),Wu=(0,wt.IH)(Cu,Hc),El=Fl?sn(Fl,Cu):null,Hu=Ul&&El?vi({active:Ul,collisionRect:El,droppableRects:$u,droppableContainers:pl,pointerCoordinates:Wc}):null,Iu=nt(Hu,"id"),[ku,Jc]=(0,ve.useState)(null),Sh=Il?Cu:(0,wt.IH)(Cu,Yh),ml=Ht(Sh,(Yt=ku==null?void 0:ku.rect)!=null?Yt:null,Rs),sh=(0,ve.useCallback)((Ts,nu)=>{let{sensor:ol,options:Vs}=nu;if(hu.current==null)return;const Wl=cn.get(hu.current);if(!Wl)return;const fu=Ts.nativeEvent,Ru=new ol({active:hu.current,activeNode:Wl,event:fu,options:Vs,context:zu,onStart(gu){const Ot=hu.current;if(Ot==null)return;const di=cn.get(Ot);if(!di)return;const{onDragStart:Kl}=Xa.current,Yu={active:{id:Ot,data:di.data,rect:Ys}};(0,ot.unstable_batchedUpdates)(()=>{Kl==null||Kl(Yu),Ds(ln.Initializing),fa({type:Te.DragStart,initialCoordinates:gu,active:Ot}),Ia({type:"onDragStart",event:Yu})})},onMove(gu){fa({type:Te.DragMove,coordinates:gu})},onEnd:Fo(Te.DragEnd),onCancel:Fo(Te.DragCancel)});(0,ot.unstable_batchedUpdates)(()=>{_s(Ru),Ra(Ts.nativeEvent)});function Fo(gu){return function(){return Cx(this,null,function*(){const{active:di,collisions:Kl,over:Yu,scrollAdjustedTranslate:ec}=zu.current;let pu=null;if(di&&ec){const{cancelDrop:Eu}=Xa.current;pu={activatorEvent:fu,active:di,collisions:Kl,delta:ec,over:Yu},gu===Te.DragEnd&&typeof Eu=="function"&&(yield Promise.resolve(Eu(pu)))&&(gu=Te.DragCancel)}hu.current=null,(0,ot.unstable_batchedUpdates)(()=>{fa({type:gu}),Ds(ln.Uninitialized),Jc(null),_s(null),Ra(null);const Eu=gu===Te.DragEnd?"onDragEnd":"onDragCancel";if(pu){const pc=Xa.current[Eu];pc==null||pc(pu),Ia({type:Eu,event:pu})}})})}}},[cn]),lh=(0,ve.useCallback)((Ts,nu)=>(ol,Vs)=>{const Wl=ol.nativeEvent,fu=cn.get(Vs);if(hu.current!==null||!fu||Wl.dndKit||Wl.defaultPrevented)return;const Ru={active:fu};Ts(ol,nu.options,Ru)===!0&&(Wl.dndKit={capturedBy:nu.sensor},hu.current=Vs,sh(ol,nu))},[cn,sh]),Nc=pn(Zi,lh);xn(Zi),(0,wt.LI)(()=>{Rs&&Us===ln.Initializing&&Ds(ln.Initialized)},[Rs,Us]),(0,ve.useEffect)(()=>{const{onDragMove:Ts}=Xa.current,{active:nu,activatorEvent:ol,collisions:Vs,over:Wl}=zu.current;if(!nu||!ol)return;const fu={active:nu,activatorEvent:ol,collisions:Vs,delta:{x:Wu.x,y:Wu.y},over:Wl};(0,ot.unstable_batchedUpdates)(()=>{Ts==null||Ts(fu),Ia({type:"onDragMove",event:fu})})},[Wu.x,Wu.y]),(0,ve.useEffect)(()=>{const{active:Ts,activatorEvent:nu,collisions:ol,droppableContainers:Vs,scrollAdjustedTranslate:Wl}=zu.current;if(!Ts||hu.current==null||!nu||!Wl)return;const{onDragOver:fu}=Xa.current,Ru=Vs.get(Iu),Fo=Ru&&Ru.rect.current?{id:Ru.id,rect:Ru.rect.current,data:Ru.data,disabled:Ru.disabled}:null,gu={active:Ts,activatorEvent:nu,collisions:ol,delta:{x:Wl.x,y:Wl.y},over:Fo};(0,ot.unstable_batchedUpdates)(()=>{Jc(Fo),fu==null||fu(gu),Ia({type:"onDragOver",event:gu})})},[Iu]),(0,wt.LI)(()=>{zu.current={activatorEvent:il,active:Ul,activeNode:ou,collisionRect:El,collisions:Hu,droppableRects:$u,draggableNodes:cn,draggingNode:Lu,draggingNodeRect:Fl,droppableContainers:dl,over:ku,scrollableAncestors:du,scrollAdjustedTranslate:Wu},Ys.current={initial:Fl,translated:El}},[Ul,ou,Hu,El,cn,Lu,Fl,$u,dl,ku,du,Wu]),la(ql(ys({},kr),{delta:nl,draggingRect:El,pointerCoordinates:Wc,scrollableAncestors:du,scrollableAncestorRects:Ol}));const Ec=(0,ve.useMemo)(()=>({active:Ul,activeNode:ou,activeNodeRect:Rs,activatorEvent:il,collisions:Hu,containerNodeRect:Bu,dragOverlay:Sa,draggableNodes:cn,droppableContainers:dl,droppableRects:$u,over:ku,measureDroppableContainers:Pu,scrollableAncestors:du,scrollableAncestorRects:Ol,measuringConfiguration:Mo,measuringScheduled:$l,windowRect:Cc}),[Ul,ou,Rs,il,Hu,Bu,Sa,cn,dl,$u,ku,Pu,du,Ol,Mo,$l,Cc]),tu=(0,ve.useMemo)(()=>({activatorEvent:il,activators:Nc,active:Ul,activeNodeRect:Rs,ariaDescribedById:{draggable:Is},dispatch:fa,draggableNodes:cn,over:ku,measureDroppableContainers:Pu}),[il,Nc,Ul,Rs,fa,Is,cn,ku,Pu]);return ve.createElement(pt.Provider,{value:ns},ve.createElement(Nr.Provider,{value:tu},ve.createElement(io.Provider,{value:Ec},ve.createElement(Ns.Provider,{value:ml},nr)),ve.createElement(pi,{disabled:(Ji==null?void 0:Ji.restoreFocus)===!1})),ve.createElement(We,ql(ys({},Ji),{hiddenTextDescribedById:Is})));function Vl(){const Ts=(fc==null?void 0:fc.autoScrollEnabled)===!1,nu=typeof xi=="object"?xi.enabled===!1:xi===!1,ol=fl&&!Ts&&!nu;return typeof xi=="object"?ql(ys({},xi),{enabled:ol}):{enabled:ol}}}),Va=(0,ve.createContext)(null),Ao="button",ms="Droppable";function Ba(St){let{id:Rt,data:gn,disabled:Hn=!1,attributes:Oi}=St;const Yt=(0,wt.Ld)(ms),{activators:Zn,activatorEvent:Ji,active:xi,activeNodeRect:nr,ariaDescribedById:Zi,draggableNodes:vi,over:pr}=(0,ve.useContext)(Nr),{role:fn=Ao,roleDescription:eo="draggable",tabIndex:so=0}=Oi!=null?Oi:{},ya=(xi==null?void 0:xi.id)===Rt,fa=(0,ve.useContext)(ya?Ns:Va),[Ia,ns]=(0,wt.wm)(),[Us,Ds]=(0,wt.wm)(),fl=Fr(Zn,Rt),Hs=(0,wt.Ey)(gn);(0,wt.LI)(()=>(vi.set(Rt,{id:Rt,key:Yt,node:Ia,activatorNode:Us,data:Hs}),()=>{const nl=vi.get(Rt);nl&&nl.key===Yt&&vi.delete(Rt)}),[vi,Rt]);const cn=(0,ve.useMemo)(()=>({role:fn,tabIndex:so,"aria-disabled":Hn,"aria-pressed":ya&&fn===Ao?!0:void 0,"aria-roledescription":eo,"aria-describedby":Zi.draggable}),[Hn,fn,so,ya,eo,Zi.draggable]);return{active:xi,activatorEvent:Ji,activeNodeRect:nr,attributes:cn,isDragging:ya,listeners:Hn?void 0:fl,node:Ia,over:pr,setNodeRef:ns,setActivatorNodeRef:Ds,transform:fa}}function $a(){return(0,ve.useContext)(io)}const Er="Droppable",uo={timeout:25};function So(St){let{data:Rt,disabled:gn=!1,id:Hn,resizeObserverConfig:Oi}=St;const Yt=(0,wt.Ld)(Er),{active:Zn,dispatch:Ji,over:xi,measureDroppableContainers:nr}=(0,ve.useContext)(Nr),Zi=(0,ve.useRef)({disabled:gn}),vi=(0,ve.useRef)(!1),pr=(0,ve.useRef)(null),fn=(0,ve.useRef)(null),{disabled:eo,updateMeasurementsFor:so,timeout:ya}=ys(ys({},uo),Oi),fa=(0,wt.Ey)(so!=null?so:Hn),Ia=(0,ve.useCallback)(()=>{if(!vi.current){vi.current=!0;return}fn.current!=null&&clearTimeout(fn.current),fn.current=setTimeout(()=>{nr(Array.isArray(fa.current)?fa.current:[fa.current]),fn.current=null},ya)},[ya]),ns=Kt({callback:Ia,disabled:eo||!Zn}),Us=(0,ve.useCallback)((cn,nl)=>{ns&&(nl&&(ns.unobserve(nl),vi.current=!1),cn&&ns.observe(cn))},[ns]),[Ds,fl]=(0,wt.wm)(Us),Hs=(0,wt.Ey)(Rt);return(0,ve.useEffect)(()=>{!ns||!Ds.current||(ns.disconnect(),vi.current=!1,ns.observe(Ds.current))},[Ds,ns]),(0,wt.LI)(()=>(Ji({type:Te.RegisterDroppable,element:{id:Hn,key:Yt,disabled:gn,node:Ds,rect:pr,data:Hs}}),()=>Ji({type:Te.UnregisterDroppable,key:Yt,id:Hn})),[Hn]),(0,ve.useEffect)(()=>{gn!==Zi.current.disabled&&(Ji({type:Te.SetDroppableDisabled,id:Hn,key:Yt,disabled:gn}),Zi.current.disabled=gn)},[Hn,Yt,gn,Ji]),{active:Zn,rect:pr,isOver:(xi==null?void 0:xi.id)===Hn,node:Ds,over:xi,setNodeRef:fl}}function Wn(St){let{animation:Rt,children:gn}=St;const[Hn,Oi]=useState(null),[Yt,Zn]=useState(null),Ji=usePrevious(gn);return!gn&&!Hn&&Ji&&Oi(Ji),useIsomorphicLayoutEffect(()=>{if(!Yt)return;const xi=Hn==null?void 0:Hn.key,nr=Hn==null?void 0:Hn.props.id;if(xi==null||nr==null){Oi(null);return}Promise.resolve(Rt(nr,Yt)).then(()=>{Oi(null)})},[Rt,Hn,Yt]),React.createElement(React.Fragment,null,gn,Hn?cloneElement(Hn,{ref:Zn}):null)}const ka={x:0,y:0,scaleX:1,scaleY:1};function Cn(St){let{children:Rt}=St;return React.createElement(Nr.Provider,{value:ur},React.createElement(Ns.Provider,{value:ka},Rt))}const Po={position:"fixed",touchAction:"none"},Ws=St=>isKeyboardEvent(St)?"transform 250ms ease":void 0,ds=null,Ua={duration:250,easing:"ease",keyframes:St=>{let{transform:{initial:Rt,final:gn}}=St;return[{transform:wt.ux.Transform.toString(Rt)},{transform:wt.ux.Transform.toString(gn)}]},sideEffects:(St=>Rt=>{let{active:gn,dragOverlay:Hn}=Rt;const Oi={},{styles:Yt,className:Zn}=St;if(Yt!=null&&Yt.active)for(const[Ji,xi]of Object.entries(Yt.active))xi!==void 0&&(Oi[Ji]=gn.node.style.getPropertyValue(Ji),gn.node.style.setProperty(Ji,xi));if(Yt!=null&&Yt.dragOverlay)for(const[Ji,xi]of Object.entries(Yt.dragOverlay))xi!==void 0&&Hn.node.style.setProperty(Ji,xi);return Zn!=null&&Zn.active&&gn.node.classList.add(Zn.active),Zn!=null&&Zn.dragOverlay&&Hn.node.classList.add(Zn.dragOverlay),function(){for(const[xi,nr]of Object.entries(Oi))gn.node.style.setProperty(xi,nr);Zn!=null&&Zn.active&&gn.node.classList.remove(Zn.active)}})({styles:{active:{opacity:"0"}}})};function us(St){let{config:Rt,draggableNodes:gn,droppableContainers:Hn,measuringConfiguration:Oi}=St;return useEvent((Yt,Zn)=>{if(Rt===null)return;const Ji=gn.get(Yt);if(!Ji)return;const xi=Ji.node.current;if(!xi)return;const nr=Wr(Zn);if(!nr)return;const{transform:Zi}=getWindow(Zn).getComputedStyle(Zn),vi=Nn(Zi);if(!vi)return;const pr=typeof Rt=="function"?Rt:tl(Rt);return jn(xi,Oi.draggable.measure),pr({active:{id:Yt,data:Ji.data,node:xi,rect:Oi.draggable.measure(xi)},draggableNodes:gn,dragOverlay:{node:Zn,rect:Oi.dragOverlay.measure(nr)},droppableContainers:Hn,measuringConfiguration:Oi,transform:vi})})}function tl(St){const{duration:Rt,easing:gn,sideEffects:Hn,keyframes:Oi}=ys(ys({},Ua),St);return Yt=>{let Ia=Yt,{active:Zn,dragOverlay:Ji,transform:xi}=Ia,nr=o0(Ia,["active","dragOverlay","transform"]);if(!Rt)return;const Zi={x:Ji.rect.left-Zn.rect.left,y:Ji.rect.top-Zn.rect.top},vi={scaleX:xi.scaleX!==1?Zn.rect.width*xi.scaleX/Ji.rect.width:1,scaleY:xi.scaleY!==1?Zn.rect.height*xi.scaleY/Ji.rect.height:1},pr=ys({x:xi.x-Zi.x,y:xi.y-Zi.y},vi),fn=Oi(ql(ys({},nr),{active:Zn,dragOverlay:Ji,transform:{initial:xi,final:pr}})),[eo]=fn,so=fn[fn.length-1];if(JSON.stringify(eo)===JSON.stringify(so))return;const ya=Hn==null?void 0:Hn(ys({active:Zn,dragOverlay:Ji},nr)),fa=Ji.node.animate(fn,{duration:Rt,easing:gn,fill:"forwards"});return new Promise(ns=>{fa.onfinish=()=>{ya==null||ya(),ns()}})}}let ts=0;function wr(St){return useMemo(()=>{if(St!=null)return ts++,ts},[St])}const st=null},32339:function(Dn,ei,be){"use strict";be.d(ei,{DL:function(){return Je}});var ve=be(24285);function ot(yt){return Vt=>{let{transform:ct}=Vt;return ql(ys({},ct),{x:Math.ceil(ct.x/yt)*yt,y:Math.ceil(ct.y/yt)*yt})}}const wt=yt=>{let{transform:Vt}=yt;return ql(ys({},Vt),{y:0})};function Qt(yt,Vt,ct){const We=ys({},yt);return Vt.top+yt.y<=ct.top?We.y=ct.top-Vt.top:Vt.bottom+yt.y>=ct.top+ct.height&&(We.y=ct.top+ct.height-Vt.bottom),Vt.left+yt.x<=ct.left?We.x=ct.left-Vt.left:Vt.right+yt.x>=ct.left+ct.width&&(We.x=ct.left+ct.width-Vt.right),We}const Nt=yt=>{let{containerNodeRect:Vt,draggingNodeRect:ct,transform:We}=yt;return!ct||!Vt?We:Qt(We,ct,Vt)},Re=yt=>{let{draggingNodeRect:Vt,transform:ct,scrollableAncestorRects:We}=yt;const Te=We[0];return!Vt||!Te?ct:Qt(ct,Vt,Te)},Je=yt=>{let{transform:Vt}=yt;return ql(ys({},Vt),{x:0})},pt=yt=>{let{transform:Vt,draggingNodeRect:ct,windowRect:We}=yt;return!ct||!We?Vt:Qt(Vt,ct,We)},mt=yt=>{let{activatorEvent:Vt,draggingNodeRect:ct,transform:We}=yt;if(ct&&Vt){const Te=getEventCoordinates(Vt);if(!Te)return We;const ne=Te.x-ct.left,te=Te.y-ct.top;return ql(ys({},We),{x:We.x+ne-ct.width/2,y:We.y+te-ct.height/2})}return We}},45587:function(Dn,ei,be){"use strict";be.d(ei,{Fo:function(){return me},Rp:function(){return Qt},nB:function(){return jt},qw:function(){return te}});var ve=be(67294),ot=be(60887),wt=be(24285);function Qt(sn,Nn,lt){const Ge=sn.slice();return Ge.splice(lt<0?Ge.length+lt:lt,0,Ge.splice(Nn,1)[0]),Ge}function Nt(sn,Nn,lt){const Ge=sn.slice();return Ge[Nn]=sn[lt],Ge[lt]=sn[Nn],Ge}function Re(sn,Nn){return sn.reduce((lt,Ge,Ne)=>{const Rn=Nn.get(Ge);return Rn&&(lt[Ne]=Rn),lt},Array(sn.length))}function Je(sn){return sn!==null&&sn>=0}function pt(sn,Nn){if(sn===Nn)return!0;if(sn.length!==Nn.length)return!1;for(let lt=0;lt{var Nn;let{rects:lt,activeNodeRect:Ge,activeIndex:Ne,overIndex:Rn,index:ai}=sn;const Zt=(Nn=lt[Ne])!=null?Nn:Ge;if(!Zt)return null;const ci=ct(lt,ai,Ne);if(ai===Ne){const On=lt[Rn];return On?ys({x:NeNe&&ai<=Rn?ys({x:-Zt.width-ci,y:0},yt):ai=Rn?ys({x:Zt.width+ci,y:0},yt):ys({x:0,y:0},yt)};function ct(sn,Nn,lt){const Ge=sn[Nn],Ne=sn[Nn-1],Rn=sn[Nn+1];return!Ge||!Ne&&!Rn?0:lt{let{rects:Nn,activeIndex:lt,overIndex:Ge,index:Ne}=sn;const Rn=Qt(Nn,Ge,lt),ai=Nn[Ne],Zt=Rn[Ne];return!Zt||!ai?null:{x:Zt.left-ai.left,y:Zt.top-ai.top,scaleX:Zt.width/ai.width,scaleY:Zt.height/ai.height}},Te=sn=>{let{activeIndex:Nn,index:lt,rects:Ge,overIndex:Ne}=sn,Rn,ai;return lt===Nn&&(Rn=Ge[lt],ai=Ge[Ne]),lt===Ne&&(Rn=Ge[lt],ai=Ge[Nn]),!ai||!Rn?null:{x:ai.left-Rn.left,y:ai.top-Rn.top,scaleX:ai.width/Rn.width,scaleY:ai.height/Rn.height}},ne={scaleX:1,scaleY:1},te=sn=>{var Nn;let{activeIndex:lt,activeNodeRect:Ge,index:Ne,rects:Rn,overIndex:ai}=sn;const Zt=(Nn=Rn[lt])!=null?Nn:Ge;if(!Zt)return null;if(Ne===lt){const On=Rn[ai];return On?ys({x:0,y:ltlt&&Ne<=ai?ys({x:0,y:-Zt.height-ci},ne):Ne=ai?ys({x:0,y:Zt.height+ci},ne):ys({x:0,y:0},ne)};function ue(sn,Nn,lt){const Ge=sn[Nn],Ne=sn[Nn-1],Rn=sn[Nn+1];return Ge?ltGe.map(ut=>typeof ut=="object"&&"id"in ut?ut.id:ut),[Ge]),Si=ai!=null,Gt=ai?on.indexOf(ai.id):-1,Xe=On?on.indexOf(On.id):-1,ke=(0,ve.useRef)(on),Me=!pt(on,ke.current),He=Xe!==-1&&Gt===-1||Me,et=mt(Rn);(0,wt.LI)(()=>{Me&&Si&&Mi(on)},[Me,on,Si,Mi]),(0,ve.useEffect)(()=>{ke.current=on},[on]);const Oe=(0,ve.useMemo)(()=>({activeIndex:Gt,containerId:Xt,disabled:et,disableTransforms:He,items:on,overIndex:Xe,useDragOverlay:At,sortedRects:Re(on,ci),strategy:Ne}),[Gt,Xt,et.draggable,et.droppable,He,on,Xe,ci,At,Ne]);return ve.createElement(ge.Provider,{value:Oe},Nn)}const xe=sn=>{let{id:Nn,items:lt,activeIndex:Ge,overIndex:Ne}=sn;return Qt(lt,Ge,Ne).indexOf(Nn)},Pe=sn=>{let{containerId:Nn,isSorting:lt,wasDragging:Ge,index:Ne,items:Rn,newIndex:ai,previousItems:Zt,previousContainerId:ci,transition:On}=sn;return!On||!Ge||Zt!==Rn&&Ne===ai?!1:lt?!0:ai!==Ne&&Nn===ci},Ke={duration:200,easing:"ease"},nt="transform",ft=wt.ux.Transition.toString({property:nt,duration:0,easing:"linear"}),qe={roleDescription:"sortable"};function at(sn){let{disabled:Nn,index:lt,node:Ge,rect:Ne}=sn;const[Rn,ai]=(0,ve.useState)(null),Zt=(0,ve.useRef)(lt);return(0,wt.LI)(()=>{if(!Nn&<!==Zt.current&&Ge.current){const ci=Ne.current;if(ci){const On=(0,ot.VK)(Ge.current,{ignoreTransform:!0}),Mi={x:ci.left-On.left,y:ci.top-On.top,scaleX:ci.width/On.width,scaleY:ci.height/On.height};(Mi.x||Mi.y)&&ai(Mi)}}lt!==Zt.current&&(Zt.current=lt)},[Nn,lt,Ge,Ne]),(0,ve.useEffect)(()=>{Rn&&ai(null)},[Rn]),Rn}function jt(sn){let{animateLayoutChanges:Nn=Pe,attributes:lt,disabled:Ge,data:Ne,getNewIndex:Rn=xe,id:ai,strategy:Zt,resizeObserverConfig:ci,transition:On=Ke}=sn;const{items:Mi,containerId:Xt,activeIndex:At,disabled:on,disableTransforms:Si,sortedRects:Gt,overIndex:Xe,useDragOverlay:ke,strategy:Me}=(0,ve.useContext)(ge),He=Mt(Ge,on),et=Mi.indexOf(ai),Oe=(0,ve.useMemo)(()=>ys({sortable:{containerId:Xt,index:et,items:Mi}},Ne),[Xt,Ne,et,Mi]),ut=(0,ve.useMemo)(()=>Mi.slice(Mi.indexOf(ai)),[Mi,ai]),{rect:Vn,node:jn,isOver:An,setNodeRef:Pn}=(0,ot.Zj)({id:ai,data:Oe,disabled:He.droppable,resizeObserverConfig:ys({updateMeasurementsFor:ut},ci)}),{active:si,activatorEvent:mn,activeNodeRect:Fi,attributes:Vi,setNodeRef:Ir,listeners:Qi,isDragging:Di,over:$r,setActivatorNodeRef:Yi,transform:hr}=(0,ot.O1)({id:ai,data:Oe,attributes:ys(ys({},qe),lt),disabled:He.draggable}),dr=(0,wt.HB)(Pn,Ir),kn=!!si,Ii=kn&&!Si&&Je(At)&&Je(Xe),ra=!ke&&Di,Un=ra&&Ii?hr:null,Kr=Zt!=null?Zt:Me,ia=Ii?Un!=null?Un:Kr({rects:Gt,activeNodeRect:Fi,activeIndex:At,overIndex:Xe,index:et}):null,sa=Je(At)&&Je(Xe)?Rn({id:ai,items:Mi,activeIndex:At,overIndex:Xe}):et,Wa=si==null?void 0:si.id,ma=(0,ve.useRef)({activeId:Wa,items:Mi,newIndex:sa,containerId:Xt}),Ha=Mi!==ma.current.items,da=Nn({active:si,containerId:Xt,isDragging:Di,isSorting:kn,id:ai,index:et,items:Mi,newIndex:ma.current.newIndex,previousItems:ma.current.items,previousContainerId:ma.current.containerId,transition:On,wasDragging:ma.current.activeId!=null}),la=at({disabled:!da,index:et,node:jn,rect:Vn});return(0,ve.useEffect)(()=>{kn&&ma.current.newIndex!==sa&&(ma.current.newIndex=sa),Xt!==ma.current.containerId&&(ma.current.containerId=Xt),Mi!==ma.current.items&&(ma.current.items=Mi)},[kn,sa,Xt,Mi]),(0,ve.useEffect)(()=>{if(Wa===ma.current.activeId)return;if(Wa&&!ma.current.activeId){ma.current.activeId=Wa;return}const ti=setTimeout(()=>{ma.current.activeId=Wa},50);return()=>clearTimeout(ti)},[Wa]),{active:si,activeIndex:At,attributes:Vi,data:Oe,rect:Vn,index:et,newIndex:sa,items:Mi,isOver:An,isSorting:kn,isDragging:Di,listeners:Qi,node:jn,overIndex:Xe,over:$r,setNodeRef:dr,setActivatorNodeRef:Yi,setDroppableNodeRef:Pn,setDraggableNodeRef:Ir,transform:la!=null?la:ia,transition:No()};function No(){if(la||Ha&&ma.current.newIndex===et)return ft;if(!(ra&&!(0,wt.vd)(mn)||!On)&&(kn||da))return wt.ux.Transition.toString(ql(ys({},On),{property:nt}))}}function Mt(sn,Nn){var lt,Ge;return typeof sn=="boolean"?{draggable:sn,droppable:!1}:{draggable:(lt=sn==null?void 0:sn.draggable)!=null?lt:Nn.draggable,droppable:(Ge=sn==null?void 0:sn.droppable)!=null?Ge:Nn.droppable}}function bt(sn){if(!sn)return!1;const Nn=sn.data.current;return!!(Nn&&"sortable"in Nn&&typeof Nn.sortable=="object"&&"containerId"in Nn.sortable&&"items"in Nn.sortable&&"index"in Nn.sortable)}const Bt=[ot.g4.Down,ot.g4.Right,ot.g4.Up,ot.g4.Left],Ht=(sn,Nn)=>{let{context:{active:lt,collisionRect:Ge,droppableRects:Ne,droppableContainers:Rn,over:ai,scrollableAncestors:Zt}}=Nn;if(Bt.includes(sn.code)){if(sn.preventDefault(),!lt||!Ge)return;const ci=[];Rn.getEnabled().forEach(Xt=>{if(!Xt||Xt!=null&&Xt.disabled)return;const At=Ne.get(Xt.id);if(At)switch(sn.code){case KeyboardCode.Down:Ge.topAt.top&&ci.push(Xt);break;case KeyboardCode.Left:Ge.left>At.left&&ci.push(Xt);break;case KeyboardCode.Right:Ge.left1&&(Mi=On[1].id),Mi!=null){const Xt=Rn.get(lt.id),At=Rn.get(Mi),on=At?Ne.get(At.id):null,Si=At==null?void 0:At.node.current;if(Si&&on&&Xt&&At){const Xe=getScrollableAncestors(Si).some((ut,Vn)=>Zt[Vn]!==ut),ke=Jn(Xt,At),Me=qn(Xt,At),He=Xe||!ke?{x:0,y:0}:{x:Me?Ge.width-on.width:0,y:Me?Ge.height-on.height:0},et={x:on.left,y:on.top};return He.x&&He.y?et:subtract(et,He)}}}};function Jn(sn,Nn){return!bt(sn)||!bt(Nn)?!1:sn.data.current.sortable.containerId===Nn.data.current.sortable.containerId}function qn(sn,Nn){return!bt(sn)||!bt(Nn)||!Jn(sn,Nn)?!1:sn.data.current.sortable.indexJn=>{Bt.forEach(qn=>qn(Jn))},Bt)}const wt=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined";function Qt(bt){const Bt=Object.prototype.toString.call(bt);return Bt==="[object Window]"||Bt==="[object global]"}function Nt(bt){return"nodeType"in bt}function Re(bt){var Bt,Ht;return bt?Qt(bt)?bt:Nt(bt)&&(Bt=(Ht=bt.ownerDocument)==null?void 0:Ht.defaultView)!=null?Bt:window:window}function Je(bt){const{Document:Bt}=Re(bt);return bt instanceof Bt}function pt(bt){return Qt(bt)?!1:bt instanceof Re(bt).HTMLElement}function mt(bt){return bt instanceof Re(bt).SVGElement}function yt(bt){return bt?Qt(bt)?bt.document:Nt(bt)?Je(bt)?bt:pt(bt)||mt(bt)?bt.ownerDocument:document:document:document}const Vt=wt?ve.useLayoutEffect:ve.useEffect;function ct(bt){const Bt=(0,ve.useRef)(bt);return Vt(()=>{Bt.current=bt}),(0,ve.useCallback)(function(){for(var Ht=arguments.length,Jn=new Array(Ht),qn=0;qn{bt.current=setInterval(Jn,qn)},[]),Ht=(0,ve.useCallback)(()=>{bt.current!==null&&(clearInterval(bt.current),bt.current=null)},[]);return[Bt,Ht]}function Te(bt,Bt){Bt===void 0&&(Bt=[bt]);const Ht=(0,ve.useRef)(bt);return Vt(()=>{Ht.current!==bt&&(Ht.current=bt)},Bt),Ht}function ne(bt,Bt){const Ht=(0,ve.useRef)();return(0,ve.useMemo)(()=>{const Jn=bt(Ht.current);return Ht.current=Jn,Jn},[...Bt])}function te(bt){const Bt=ct(bt),Ht=(0,ve.useRef)(null),Jn=(0,ve.useCallback)(qn=>{qn!==Ht.current&&(Bt==null||Bt(qn,Ht.current)),Ht.current=qn},[]);return[Ht,Jn]}function ue(bt){const Bt=(0,ve.useRef)();return(0,ve.useEffect)(()=>{Bt.current=bt},[bt]),Bt.current}let se={};function ge(bt,Bt){return(0,ve.useMemo)(()=>{if(Bt)return Bt;const Ht=se[bt]==null?0:se[bt]+1;return se[bt]=Ht,bt+"-"+Ht},[bt,Bt])}function me(bt){return function(Bt){for(var Ht=arguments.length,Jn=new Array(Ht>1?Ht-1:0),qn=1;qn{const lt=Object.entries(Nn);for(const[Ge,Ne]of lt){const Rn=sn[Ge];Rn!=null&&(sn[Ge]=Rn+bt*Ne)}return sn},ys({},Bt))}}const xe=me(1),Pe=me(-1);function Ke(bt){return"clientX"in bt&&"clientY"in bt}function nt(bt){if(!bt)return!1;const{KeyboardEvent:Bt}=Re(bt.target);return Bt&&bt instanceof Bt}function ft(bt){if(!bt)return!1;const{TouchEvent:Bt}=Re(bt.target);return Bt&&bt instanceof Bt}function qe(bt){if(ft(bt)){if(bt.touches&&bt.touches.length){const{clientX:Bt,clientY:Ht}=bt.touches[0];return{x:Bt,y:Ht}}else if(bt.changedTouches&&bt.changedTouches.length){const{clientX:Bt,clientY:Ht}=bt.changedTouches[0];return{x:Bt,y:Ht}}}return Ke(bt)?{x:bt.clientX,y:bt.clientY}:null}const at=Object.freeze({Translate:{toString(bt){if(!bt)return;const{x:Bt,y:Ht}=bt;return"translate3d("+(Bt?Math.round(Bt):0)+"px, "+(Ht?Math.round(Ht):0)+"px, 0)"}},Scale:{toString(bt){if(!bt)return;const{scaleX:Bt,scaleY:Ht}=bt;return"scaleX("+Bt+") scaleY("+Ht+")"}},Transform:{toString(bt){if(bt)return[at.Translate.toString(bt),at.Scale.toString(bt)].join(" ")}},Transition:{toString(bt){let{property:Bt,duration:Ht,easing:Jn}=bt;return Bt+" "+Ht+"ms "+Jn}}}),jt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Mt(bt){return bt.matches(jt)?bt:bt.querySelector(jt)}},71749:function(){"use strict"},30483:function(){"use strict"},71736:function(Dn,ei){"use strict";ei.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},39886:function(Dn,ei){"use strict";ei.Z={flex_box_center:"flex_box_center___IBr6x",flex_space_between:"flex_space_between___n2Iz0",flex_box_vertical_center:"flex_box_vertical_center___1umwO",flex_box_center_end:"flex_box_center_end___SRZYb",flex_box_column:"flex_box_column___b90Da",form:"form___V3fAH",title_icon:"title_icon____uDZy",title:"title___RxKwK",content:"content___vFT5m",pubColSty:"pubColSty___dfLkL",selectSty:"selectSty____Wuek",borderSty:"borderSty___EuFYV",delSty:"delSty___AdEeI",delBorder:"delBorder___vcTJc",copHover:"copHover___JVVXI",multiple_select:"multiple_select___ZMPhl",work_checkbox_group:"work_checkbox_group___sGLxY"}},57971:function(Dn,ei,be){"use strict";var ve=be(67294),ot=Object.defineProperty,wt=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,Re=(mt,yt,Vt)=>yt in mt?ot(mt,yt,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):mt[yt]=Vt,Je=(mt,yt)=>{for(var Vt in yt||(yt={}))Qt.call(yt,Vt)&&Re(mt,Vt,yt[Vt]);if(wt)for(var Vt of wt(yt))Nt.call(yt,Vt)&&Re(mt,Vt,yt[Vt]);return mt};const pt=mt=>React.createElement("svg",Je({className:"jiangxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},mt),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143z",fill:"#98BDF7"}),React.createElement("path",{d:"m248.686 803.182-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#145DFF"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#98BDF7"}));ei.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},36913:function(Dn,ei,be){"use strict";var ve=be(67294),ot=Object.defineProperty,wt=Object.getOwnPropertySymbols,Qt=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,Re=(mt,yt,Vt)=>yt in mt?ot(mt,yt,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):mt[yt]=Vt,Je=(mt,yt)=>{for(var Vt in yt||(yt={}))Qt.call(yt,Vt)&&Re(mt,Vt,yt[Vt]);if(wt)for(var Vt of wt(yt))Nt.call(yt,Vt)&&Re(mt,Vt,yt[Vt]);return mt};const pt=mt=>React.createElement("svg",Je({className:"shengxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},mt),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143zM248.686 803.182l-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#98BDF7"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#145DFF"}));ei.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},18023:function(){"use strict";function Dn(Te,ne,te,ue){te===void 0&&(te=0),ue===void 0&&(ue=1/0),this._name=Te,this._defaultValue=ne,this._minimum=te,this._maximum=ue}Object.defineProperty(Dn.prototype,"name",{get:function(){return this._name},set:function(Te){if(typeof Te!="string"||Te==="")throw new Error("Shape name must be a valid string.");this._name=Te}}),Object.defineProperty(Dn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Te){if(typeof Te!="number"||isNaN(Te))throw new Error("The default value must be a real number, not: "+Te);this._defaultValue=Te}}),Object.defineProperty(Dn.prototype,"minimum",{get:function(){return this._minimum},set:function(Te){if(typeof Te!="number"||isNaN(Te))throw new Error("Minimum must be a real number, not: "+Te);this._minimum=Te}}),Object.defineProperty(Dn.prototype,"maximum",{get:function(){return this._maximum},set:function(Te){if(typeof Te!="number"||isNaN(Te))throw new Error("Maximum must be a real number, not: "+Te);this._maximum=Te}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Te,ne){var te=go.Shape._FigureParameters[Te];return te?te[ne]:null},go.Shape.setFigureParameter=function(Te,ne,te){if(!(te instanceof Dn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+te);if(te.defaultValuete.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+te.defaultValue);var ue=go.Shape._FigureParameters[Te];ue||(ue=[],go.Shape._FigureParameters[Te]=ue),ue[ne]=te};var ei=[];function be(Te,ne){var te=ei.pop();return te===void 0?new go.Point(Te,ne):(te.x=Te,te.y=ne,te)}function ve(){var Te=ei.pop();return Te===void 0?new go.Point:Te}function ot(Te){ei.push(Te)}function wt(Te,ne,te,ue,se,ge,me,xe,Pe){Pe||(Pe=new go.Point);var Ke=Te-te,nt=se-me,ft=NaN,qe=NaN;if(Ke===0)if(nt===0)Te===te&&(ft=Te,qe=ne);else{var at=(ge-xe)/nt,jt=ge-at*se;ft=Te,qe=at*ft+jt}else if(nt===0){var Mt=(ne-ue)/Ke,bt=ne-Mt*Te;ft=se,qe=Mt*ft+bt}else{var Mt=(ne-ue)/Ke,at=(ge-xe)/nt,bt=ne-Mt*Te,jt=ge-at*se;ft=(jt-bt)/(Mt-at),qe=Mt*ft+bt}return Pe.x=ft,Pe.y=qe,Pe}function Qt(Te,ne,te,ue,se,ge,me,xe,Pe,Ke,nt,ft,qe,at){var jt=1-Pe,Mt=Pe,bt=Te*jt+te*Mt,Bt=ne*jt+ue*Mt,Ht=te*jt+se*Mt,Jn=ue*jt+ge*Mt,qn=se*jt+me*Mt,sn=ge*jt+xe*Mt,Nn=bt*jt+Ht*Mt,lt=Bt*jt+Jn*Mt,Ge=Ht*jt+qn*Mt,Ne=Jn*jt+sn*Mt,Rn=Nn*jt+Ge*Mt,ai=lt*jt+Ne*Mt;Ke.x=bt,Ke.y=Bt,nt.x=Nn,nt.y=lt,ft.x=Rn,ft.y=ai,qe.x=Ge,qe.y=Ne,at.x=qn,at.y=sn}var Nt=new go.Spot(.156,.156),Re=new go.Spot(.844,.844),Je=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Dn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=5),ue=Math.min(ue,ne/3),ue=Math.min(ue,te/3);var se=ue*Je,ge=new go.Geometry().add(new go.PathFigure(ue,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne-ue,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,ue,ne-se,0,ne,se)).add(new go.PathSegment(go.PathSegment.Line,ne,te-ue)).add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,te,ne,te-se,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,ue,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te-ue,se,te,0,te-se)).add(new go.PathSegment(go.PathSegment.Line,0,ue)).add(new go.PathSegment(go.PathSegment.Bezier,ue,0,0,se,se,0).close()));return se>1&&(ge.spot1=new go.Spot(0,0,se,se),ge.spot2=new go.Spot(1,1,-se,-se)),ge}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(ne,te).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(ne,te).add(new go.PathSegment(go.PathSegment.Line,0,te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(.5*ne,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Te,ne,te){var ue=new go.Geometry(go.Geometry.Line);return ue.startX=0,ue.startY=te/2,ue.endX=ne,ue.endY=te/2,ue}),go.Shape.defineFigureGenerator("LineV",function(Te,ne,te){var ue=new go.Geometry(go.Geometry.Line);return ue.startX=ne/2,ue.startY=0,ue.endX=ne/2,ue.endY=te,ue}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,te/2,!1).add(new go.PathSegment(go.PathSegment.Line,ne,te/2)).add(new go.PathSegment(go.PathSegment.Move,ne/2,0)).add(new go.PathSegment(go.PathSegment.Line,ne/2,te)))}),go.Shape.defineFigureGenerator("XLine",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)))}),go.Shape.defineFigureGenerator("LineRight",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(.25*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.25*ne,te)))}),go.Shape.defineFigureGenerator("LineDown",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,.25*te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.75*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)))}),go.Shape.defineFigureGenerator("LineLeft",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(.75*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.75*ne,te)))}),go.Shape.defineFigureGenerator("LineUp",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,.75*te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.25*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.75*te)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Te,ne,te){var ue=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ue*ne,(1-ue)*te,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Move,ue*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,(1-ue)*te)).add(new go.PathSegment(go.PathSegment.Move,0,te/2)).add(new go.PathSegment(go.PathSegment.Line,ne,te/2)).add(new go.PathSegment(go.PathSegment.Move,ne/2,0)).add(new go.PathSegment(go.PathSegment.Line,ne/2,te)))}),go.Shape.defineFigureGenerator("CircleLine",function(Te,ne,te){var ue=ne/2,se=new go.Geometry().add(new go.PathFigure(ne,ne/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ue,ue,ue,ue).close()));return se.spot1=Nt,se.spot2=Re,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Te,ne,te){var ue=new go.Geometry(go.Geometry.Line);return ue.startX=0,ue.startY=0,ue.endX=ne,ue.endY=te,ue}),go.Shape.defineFigureGenerator("Line2",function(Te,ne,te){var ue=new go.Geometry(go.Geometry.Line);return ue.startX=ne,ue.startY=0,ue.endX=0,ue.endY=te,ue}),go.Shape.defineFigureGenerator("Curve1",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,te,Je*ne,0,ne,(1-Je)*te)))}),go.Shape.defineFigureGenerator("Curve2",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,te,0,Je*te,(1-Je)*ne,te)))}),go.Shape.defineFigureGenerator("Curve3",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,ne,Je*te,Je*ne,te)))}),go.Shape.defineFigureGenerator("Curve4",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,(1-Je)*ne,0,0,(1-Je)*te)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Dn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)?ue=.1:ue<-1?ue=-1:ue>1&&(ue=1);var se=Math.abs(ue)*ne;if(ue===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ue>0?ge.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):ge.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())),sene&&(ue=ne);var se=Math.abs(ue);if(ue===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ue>0?ge.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):ge.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())),se.5&&(ue=.5);var se=Math.abs(ue)*ne;if(ue===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ue>0?ge.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):ge.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())),sene&&(ue=ne/2);var se=Math.abs(ue);if(ue===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ue>0?ge.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):ge.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())),sene&&(ue=ne/2);var se=Math.abs(ue);if(ue===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ue>0?ge.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())):ge.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())),se0&&(me.add(new go.PathSegment(go.PathSegment.Move,ne/2+xe,ne/2)),me.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,xe,xe).close())),ge.spot1=Nt,ge.spot2=Re,ge.defaultStretch=go.GraphObject.Uniform,ge}),go.Shape.defineFigureGenerator("Cloud",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(.08034461*ne,.1944299*te,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*ne,.05349299*te,-.09239631*ne,.07836421*te,.1406031*ne,-.0542823*te)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*ne,.074219*te,.2450511*ne,-.00697547*te,.3776197*ne,-.01112067*te)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*ne,.07004196*te,.4539471*ne,0,.6066018*ne,-.02526587*te)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*ne,.08370865*te,.6914277*ne,-.01904177*te,.8921095*ne,-.01220843*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*ne,.3194596*te,1.036446*ne,.04105738*te,1.020377*ne,.3022052*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*ne,.562044*te,1.04448*ne,.360238*te,.992256*ne,.5219009*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*ne,.8217117*te,1.032337*ne,.5771781*te,1.018411*ne,.8120651*te)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*ne,.9156953*te,1.028411*ne,.9571472*te,.8556702*ne,1.052487*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*ne,.9310455*te,.7431877*ne,1.009325*te,.5624123*ne,1.021761*te)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*ne,.9344623*te,.4820677*ne,1.031761*te,.3030112*ne,1.002796*te)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ne,.870098*te,.2329994*ne,1.01518*te,.03213784*ne,1.01518*te)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*ne,.6545475*te,-.02812061*ne,.9032597*te,-.01205169*ne,.6835638*te)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*ne,.4265613*te,-.01812061*ne,.6089503*te,-.00606892*ne,.4555777*te)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ne,.1944299*te,-.01606892*ne,.3892545*te,-.01205169*ne,.1944299*te))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Te,ne,te){var ue=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ue*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ue*te)).add(new go.PathSegment(go.PathSegment.Line,ne,(1-ue)*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ue*ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ue)*te)).add(new go.PathSegment(go.PathSegment.Line,0,ue*te).close())).setSpots(ue/2,ue/2,1-ue/2,1-ue/2)}),go.Shape.setFigureParameter("Pie",0,new Dn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Dn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Te,ne,te){var ue=Te?Te.parameter1:NaN,se=Te?Te.parameter2:NaN;isNaN(ue)&&(ue=0),isNaN(se)&&(se=315);var ge=ue%360;ge<0&&(ge+=360);var me=se%360,xe=Math.min(ne,te)/2;return new go.Geometry().add(new go.PathFigure(xe,xe).add(new go.PathSegment(go.PathSegment.Arc,ge,me,xe,xe,xe,xe).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Te,ne,te){var ue=Je/Math.SQRT2*.5,se=Math.SQRT2/2,ge=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ne,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*ne,ge*te,ne,(1-ue)*te,(se+ue)*ne,(ge+ue)*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=30);var se=Math.min(ue,ne)/2,ge=ne/2,me=te/2;return new go.Geometry().add(new go.PathFigure(ge-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,ge+se,0)).add(new go.PathSegment(go.PathSegment.Line,ge+se,me-se)).add(new go.PathSegment(go.PathSegment.Line,ne,me-se)).add(new go.PathSegment(go.PathSegment.Line,ne,me+se)).add(new go.PathSegment(go.PathSegment.Line,ge+se,me+se)).add(new go.PathSegment(go.PathSegment.Line,ge+se,te)).add(new go.PathSegment(go.PathSegment.Line,ge-se,te)).add(new go.PathSegment(go.PathSegment.Line,ge-se,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me-se)).add(new go.PathSegment(go.PathSegment.Line,ge-se,me-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=10);var se=Math.min(ue,ne)/2,ge=ne/2,me=te/2;return new go.Geometry().add(new go.PathFigure(ge-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,ge+se,0)).add(new go.PathSegment(go.PathSegment.Line,ge+se,me-se)).add(new go.PathSegment(go.PathSegment.Line,ne,me-se)).add(new go.PathSegment(go.PathSegment.Line,ne,me+se)).add(new go.PathSegment(go.PathSegment.Line,ge+se,me+se)).add(new go.PathSegment(go.PathSegment.Line,ge+se,te)).add(new go.PathSegment(go.PathSegment.Line,ge-se,te)).add(new go.PathSegment(go.PathSegment.Line,ge-se,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me+se)).add(new go.PathSegment(go.PathSegment.Line,0,me-se)).add(new go.PathSegment(go.PathSegment.Line,ge-se,me-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Dn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;if((isNaN(ue)||ue<0)&&(ue=30),ne===0||te===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ne,se.endY=te,se}else{var ge=ne/2,me=te/2,xe=Math.atan2(te,ne),Pe=ue-Math.min(Math.cos(xe)*ue/2,ge),Ke=ue-Math.min(Math.sin(xe)*ue/2,me),se=new go.Geometry,nt=new go.PathFigure(Pe,0,!0);return se.add(nt),nt.add(new go.PathSegment(go.PathSegment.Line,ge,.2*te)),nt.add(new go.PathSegment(go.PathSegment.Line,ne-Pe,0)),nt.add(new go.PathSegment(go.PathSegment.Line,ne,Ke)),nt.add(new go.PathSegment(go.PathSegment.Line,.8*ne,me)),nt.add(new go.PathSegment(go.PathSegment.Line,ne,te-Ke)),nt.add(new go.PathSegment(go.PathSegment.Line,ne-Pe,te)),nt.add(new go.PathSegment(go.PathSegment.Line,ge,.8*te)),nt.add(new go.PathSegment(go.PathSegment.Line,Pe,te)),nt.add(new go.PathSegment(go.PathSegment.Line,0,te-Ke)),nt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,me)),nt.add(new go.PathSegment(go.PathSegment.Line,0,Ke).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Dn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=10);var se=new go.Geometry,ge=new go.PathFigure(.1*ne,0,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.9*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.1*te).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Dn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.2);var se=new go.Geometry,ge=new go.PathFigure(0,0,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,ue*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(.5+ue/2)*ne,ue*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(.5+ue/2)*ne,(1-ue)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,(1-ue)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,(1-ue)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(.5-ue/2)*ne,(1-ue)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(.5-ue/2)*ne,ue*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ue*te).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Dn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.5);var se=new go.Geometry,ge=new go.PathFigure(0,0,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ne,te,Math.abs(1-ue)*ne,.25*te,Math.abs(1-ue)*ne,.75*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ue*ne,.75*te,ue*ne,.25*te).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,Je*ne,0,ne,(.5-Je/2)*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te,ne,(.5+Je/2)*te,Je*ne,te).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,te,ne,0,ne,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*ne,.75*te,.5*ne,.25*te).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(.5*ne,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,.1*ne,.8*te,0,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*te,0,0,.45*ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,.3*te,.55*ne,0,ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,.5*te,.9*ne,.8*te).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(.5*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*ne,.01*te)).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,.6*ne,.2*te,ne,.25*te)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.7*te,ne,.8*te,.6*ne,.8*te)).add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,te,.5*ne,.75*te,.55*ne,.95*te)).add(new go.PathSegment(go.PathSegment.Line,.25*ne,te)).add(new go.PathSegment(go.PathSegment.Bezier,.45*ne,.7*te,.45*ne,.95*te,.5*ne,.75*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.4*ne,.8*te,0,.8*te)).add(new go.PathSegment(go.PathSegment.Bezier,.49*ne,.01*te,0,.25*te,.4*ne,.2*te).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.4*ne,.6*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*ne,te,.5*ne,.75*te,.45*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*ne,.6*te,.55*ne,.95*te,.5*ne,.75*te));var ge=.2,me=.3,xe=0,Pe=ge*Je;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*ne,(.5+ge+xe)*te,(.5-ge+me)*ne,(.5+Pe+xe)*te,(.5-Pe+me)*ne,(.5+ge+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ge+me)*ne,(.5+xe)*te,(.5+Pe+me)*ne,(.5+ge+xe)*te,(.5+ge+me)*ne,(.5+Pe+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*ne,(.5-ge+xe)*te,(1-.5+ge+me)*ne,(.5-Pe+xe)*te,(.5+Pe+me)*ne,(.5-ge+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*ne,.36771243*te,(.5-Pe+me)*ne,(.5-ge+xe)*te,(.5-ge+me+.05)*ne,(.5-Pe+xe-.02)*te)),ge=.2,me=0,xe=-.3,Pe=ge*Je,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ge+me)*ne,(.5+xe)*te,(.5+Pe+me)*ne,(.5+ge+xe)*te,(.5+ge+me)*ne,(.5+Pe+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*ne,(.5-ge+xe)*te,(1-.5+ge+me)*ne,(.5-Pe+xe)*te,(.5+Pe+me)*ne,(.5-ge+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ge+me)*ne,(.5+xe)*te,(.5-Pe+me)*ne,(.5-ge+xe)*te,(.5-ge+me)*ne,(.5-Pe+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Pe+me)*ne,(.5+ge+xe)*te,(.5-ge+me)*ne,(.5+Pe+xe)*te,(.5-Pe+me)*ne,(.5+ge+xe)*te)),ge=.2,me=-.3,xe=0,Pe=ge*Je,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*ne,(.5-ge+xe)*te,(1-.5+ge+me-.05)*ne,(.5-Pe+xe-.02)*te,(.5+Pe+me)*ne,(.5-ge+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ge+me)*ne,(.5+xe)*te,(.5-Pe+me)*ne,(.5-ge+xe)*te,(.5-ge+me)*ne,(.5-Pe+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+me)*ne,(.5+ge+xe)*te,(.5-ge+me)*ne,(.5+Pe+xe)*te,(.5-Pe+me)*ne,(.5+ge+xe)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.6*te,(.5+Pe+me)*ne,(.5+ge+xe)*te,(.5+ge+me)*ne,(.5+Pe+xe)*te).close()),ue.setSpots(.06,.33,.93,.68),ue}),go.Shape.defineFigureGenerator("YinYang",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*.5,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,ne*.5,ne*.5,ne*.5,ne*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,ne*.5,ne*.75,ne*.25,ne*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,ne*.5,ne*.25,ne*.25,ne*.25));var ge=.1,me=.5,xe=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(me+ge)*ne,xe*te)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ne*me,te*xe,ge*ne,ge*ne).close()),se=new go.PathFigure(ne*.5,0,!1),ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*.5,ne*.5,ne*.5,ne*.5)),xe=.75,se=new go.PathFigure((me+ge)*ne,xe*te,!0),ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,ne*me,te*xe,ge*ne,ge*ne).close()),ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("Peace",function(Te,ne,te){var ue=.8535533905932737,se=.5*ne,ge=.5*te;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,ge,se,ge)).add(new go.PathSegment(go.PathSegment.Line,se,te)).add(new go.PathSegment(go.PathSegment.Move,se,ge)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Move,se,ge)).add(new go.PathSegment(go.PathSegment.Line,ue*ne,ue*te)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=.5,me=.5,xe=.5,Pe=new go.PathFigure(me*ne,(xe-ge)*te);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me-ge)*ne,xe*te,(me-se)*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+ge)*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,xe*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-ge)*te,(me+ge)*ne,(xe-se)*te,(me+se)*ne,(xe-ge)*te)),ge=.4,se=Je*.4;var Ke=ve(),nt=ve(),ft=ve(),qe=ve();Qt(me,xe-ge,me+se,xe-ge,me+ge,xe-se,me+ge,xe,.42,Ke,nt,ft,qe,qe);var at=ve(),jt=ve(),Mt=ve();Qt(me,xe-ge,me+se,xe-ge,me+ge,xe-se,me+ge,xe,.58,qe,qe,Mt,at,jt);var bt=ve(),Bt=ve(),Ht=ve();Qt(me,xe+ge,me-se,xe+ge,me-ge,xe+se,me-ge,xe,.42,bt,Bt,Ht,qe,qe);var Jn=ve(),qn=ve(),sn=ve();return Qt(me,xe+ge,me-se,xe+ge,me-ge,xe+se,me-ge,xe,.58,qe,qe,sn,Jn,qn),Pe.add(new go.PathSegment(go.PathSegment.Move,sn.x*ne,sn.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me-ge)*ne,xe*te,Jn.x*ne,Jn.y*te,qn.x*ne,qn.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ft.x*ne,ft.y*te,Ke.x*ne,Ke.y*te,nt.x*ne,nt.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,sn.x*ne,sn.y*te).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,Ht.x*ne,Ht.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,Mt.x*ne,Mt.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,xe*te,at.x*ne,at.y*te,jt.x*ne,jt.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Ht.x*ne,Ht.y*te,bt.x*ne,bt.y*te,Bt.x*ne,Bt.y*te).close()),ot(Ke),ot(nt),ot(ft),ot(qe),ot(at),ot(jt),ot(Mt),ot(bt),ot(Bt),ot(Ht),ot(Jn),ot(qn),ot(sn),ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("Fragile",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.15*te)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.25*te)).add(new go.PathSegment(go.PathSegment.Line,.29*ne,.33*te)).add(new go.PathSegment(go.PathSegment.Line,.35*ne,.25*te)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.15*te)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.5*te,ne,.25*te,.75*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.45*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.5*te,0,.25*te).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Dn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=30),ue>ne&&(ue=ne);var se=(ne-ue)/2,ge=se+ue;return new go.Geometry().add(new go.PathFigure(ge,.5*te).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te)).add(new go.PathSegment(go.PathSegment.Line,se,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,ne,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,.55*te).add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.45*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.45*te)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.55*te).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Te,ne,te){var ue=new go.Geometry,se=Je*.4,ge=.4,me=.5,xe=.5,Pe=ve(),Ke=ve(),nt=ve(),ft=ve(),qe=new go.PathFigure((me-ge)*ne,xe*te,!1);ue.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te)),Qt(me,xe-ge,me+se,xe-ge,me+ge,xe-se,me+ge,xe,.44,nt,ft,Ke,Pe,Pe),qe.add(new go.PathSegment(go.PathSegment.Bezier,Ke.x*ne,Ke.y*te,nt.x*ne,nt.y*te,ft.x*ne,ft.y*te));var at=be(Ke.x,Ke.y);Qt(me,xe-ge,me+se,xe-ge,me+ge,xe-se,me+ge,xe,.56,Pe,Pe,Ke,nt,ft);var jt=be(Ke.x,Ke.y);qe.add(new go.PathSegment(go.PathSegment.Line,(at.x*.1+.95*.9)*ne,at.y*.1*te)),qe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,at.y*.1*te)),qe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,0)),qe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),qe.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),qe.add(new go.PathSegment(go.PathSegment.Line,(jt.x*.1+.9)*ne,.15*te)),qe.add(new go.PathSegment(go.PathSegment.Line,(jt.x*.1+.9)*ne,(jt.y*.1+.05*.9)*te)),qe.add(new go.PathSegment(go.PathSegment.Line,jt.x*ne,jt.y*te)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,xe*te,nt.x*ne,nt.y*te,ft.x*ne,ft.y*te)),qe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(me-ge)*ne,xe*te,(me-se)*ne,(xe+ge)*te,(me-ge)*ne,(xe+se)*te)),ge=.35,se=Je*.35;var Mt=new go.PathFigure(me*ne,(xe-ge)*te,!1);ue.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(me-ge)*ne,xe*te,(me-se)*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+ge)*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,xe*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-ge)*te,(me+ge)*ne,(xe-se)*te,(me+se)*ne,(xe-ge)*te));var bt=new go.PathFigure((me-ge)*ne,xe*te,!1);return ue.add(bt),ot(Pe),ot(Ke),ot(nt),ot(ft),ot(at),ot(jt),ue.spot1=new go.Spot(.202,.257),ue.spot2=new go.Spot(.792,.739),ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("GenderFemale",function(Te,ne,te){var ue=new go.Geometry,se=.375,ge=0,me=-.125,xe=se*Je,Pe=new go.PathFigure((.525+ge)*ne,(.5+se+me)*te,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ge)*ne,(.5+me)*te,(.5+xe+ge)*ne,(.5+se+me)*te,(.5+se+ge)*ne,(.5+xe+me)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ge)*ne,(.5-se+me)*te,(1-.5+se+ge)*ne,(.5-xe+me)*te,(.5+xe+ge)*ne,(.5-se+me)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ge)*ne,(.5+me)*te,(.5-xe+ge)*ne,(.5-se+me)*te,(.5-se+ge)*ne,(.5-xe+me)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ge)*ne,(.5+se+me)*te,(.5-se+ge)*ne,(.5+xe+me)*te,(.5-xe+ge)*ne,(.5+se+me)*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.85*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.85*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.9*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.9*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.9*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.9*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.85*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*te).close()),se=.325,ge=0,me=-.125,xe=se*Je;var Pe=new go.PathFigure((1-.5+se+ge)*ne,(.5+me)*te,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ge)*ne,(.5+se+me)*te,(.5+se+ge)*ne,(.5+xe+me)*te,(.5+xe+ge)*ne,(.5+se+me)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ge)*ne,(.5+me)*te,(.5-xe+ge)*ne,(.5+se+me)*te,(.5-se+ge)*ne,(.5+xe+me)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ge)*ne,(.5-se+me)*te,(.5-se+ge)*ne,(.5-xe+me)*te,(.5-xe+ge)*ne,(.5-se+me)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ge)*ne,(.5+me)*te,(.5+xe+ge)*ne,(.5-se+me)*te,(1-.5+se+ge)*ne,(.5-xe+me)*te));var Pe=new go.PathFigure((.525+ge)*ne,(.5+se+me)*te,!1);return ue.add(Pe),ue.spot1=new go.Spot(.232,.136),ue.spot2=new go.Spot(.682,.611),ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("LogicImplies",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;return isNaN(ue)&&(ue=.2),new go.Geometry().add(new go.PathFigure((1-ue)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;return isNaN(ue)&&(ue=.2),new go.Geometry().add(new go.PathFigure((1-ue)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Move,ue*ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ue*ne,te))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ne,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Te,ne,te){var ue=new go.Geometry().add(new go.PathFigure(.5*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*ne,.5*te,.5*ne,.5*te)));return ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("LogicTruth",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Move,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Move,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*te))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Move,0,te)).add(new go.PathSegment(go.PathSegment.Line,ne,te))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Te,ne,te){var ue=.5;return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,0,ue*te)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ue*ne,ue*te,ue*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Line,ne,te))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Te,ne,te){var ue=.5;return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ue*te)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ue*ne,ue*te,ue*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Dn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Dn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.3);var se=Te?Te.parameter2:NaN;isNaN(se)&&(se=.3);var ge=(1-ue)*ne,me=(.5-se/2)*te,xe=(.5+se/2)*te,Pe=new go.Geometry,Ke=new go.PathFigure(0,me,!0);Pe.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,ge,me)),Ke.add(new go.PathSegment(go.PathSegment.Line,ge,0)),Ke.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),Ke.add(new go.PathSegment(go.PathSegment.Line,ge,te)),Ke.add(new go.PathSegment(go.PathSegment.Line,ge,xe)),Ke.add(new go.PathSegment(go.PathSegment.Line,0,xe).close()),Pe.spot1=new go.Spot(0,me/te);var nt=wt(0,xe/te,1,xe/te,ge/ne,1,1,.5,ve());return Pe.spot2=new go.Spot(nt.x,nt.y),ot(nt),Pe}),go.Shape.setFigureParameter("Arrow2",0,new Dn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Dn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=30),ue>ne&&(ue=ne);var se=Te?Te.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,te/2);var ge=ne-ue,me=(te-se)/2,xe=me+se,Pe=new go.Geometry,Ke=new go.PathFigure(0,me,!0);Pe.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,ge,me)),Ke.add(new go.PathSegment(go.PathSegment.Line,ge,0)),Ke.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),Ke.add(new go.PathSegment(go.PathSegment.Line,ge,te)),Ke.add(new go.PathSegment(go.PathSegment.Line,ge,xe)),Ke.add(new go.PathSegment(go.PathSegment.Line,0,xe).close()),Pe.spot1=new go.Spot(0,me/te);var nt=wt(0,xe/te,1,xe/te,ge/ne,1,1,.5,ve());return Pe.spot2=new go.Spot(nt.x,nt.y),ot(nt),Pe}),go.Shape.defineFigureGenerator("Chevron",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te).close()),ue}),go.Shape.defineFigureGenerator("DoubleArrow",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.214*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.786*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*te).close()),ue}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Dn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.3);var se=(.5-ue/2)*te,ge=(.5+ue/2)*te,me=new go.Geometry,xe=new go.PathFigure(ne,.5*te,!0);me.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,.3*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),xe.add(new go.PathSegment(go.PathSegment.Line,.3*ne,se)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close());var Pe=wt(0,.5,.3,0,0,se/te,.1,se/te,ve());return me.spot1=new go.Spot(Pe.x,Pe.y),Pe=wt(.7,1,1,.5,0,ge/te,1,ge/te,Pe),me.spot2=new go.Spot(Pe.x,Pe.y),ot(Pe),me}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Dn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Dn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=40);var se=Te?Te.parameter2:NaN;isNaN(se)&&(se=100);var ge=(te-ue)/2,me=ge+ue,xe=(te-se)/2,Pe=xe+se;(ue>te||se>te)&&(se>ue?(ue=ue*te/se,ge=(te-ue)/2,me=ge+ue,xe=0,Pe=te):(ge=0,me=te,xe=0,Pe=te));var Ke=new go.Geometry,nt=new go.PathFigure(ne,.5*te,!0);Ke.add(nt),nt.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Pe)),nt.add(new go.PathSegment(go.PathSegment.Line,.7*ne,me)),nt.add(new go.PathSegment(go.PathSegment.Line,.3*ne,me)),nt.add(new go.PathSegment(go.PathSegment.Line,.3*ne,Pe)),nt.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.3*ne,xe)),nt.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ge)),nt.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),nt.add(new go.PathSegment(go.PathSegment.Line,.7*ne,xe).close());var ft=wt(0,.5,.3,xe/te,0,ge/te,1,ge/te,ve());return Ke.spot1=new go.Spot(ft.x,ft.y),ft=wt(.7,Pe/te,1,.5,0,me/te,1,me/te,ft),Ke.spot2=new go.Spot(ft.x,ft.y),ot(ft),Ke}),go.Shape.setFigureParameter("IBeamArrow",0,new Dn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.3);var se=(.5-ue/2)*te,ge=(.5+ue/2)*te,me=new go.Geometry,xe=new go.PathFigure(ne,.5*te,!0);me.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Line,0,te)),xe.add(new go.PathSegment(go.PathSegment.Line,0,0)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,se)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),me.spot1=new go.Spot(0,se/te);var Pe=wt(.7,1,1,.5,0,ge/te,1,ge/te,ve());return me.spot2=new go.Spot(Pe.x,Pe.y),ot(Pe),me}),go.Shape.setFigureParameter("IBeamArrow2",0,new Dn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Dn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=40);var se=Te?Te.parameter2:NaN;isNaN(se)&&(se=100);var ge=(te-ue)/2,me=ge+ue,xe=(te-se)/2,Pe=xe+se;(ue>te||se>te)&&(se>ue?(ue=ue*te/se,ge=(te-ue)/2,me=ge+ue,xe=0,Pe=te):(ge=0,me=te,xe=0,Pe=te));var Ke=new go.Geometry,nt=new go.PathFigure(ne,.5*te,!0);Ke.add(nt),nt.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Pe)),nt.add(new go.PathSegment(go.PathSegment.Line,.7*ne,me)),nt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,me)),nt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,Pe)),nt.add(new go.PathSegment(go.PathSegment.Line,0,Pe)),nt.add(new go.PathSegment(go.PathSegment.Line,0,xe)),nt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,xe)),nt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ge)),nt.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),nt.add(new go.PathSegment(go.PathSegment.Line,.7*ne,xe).close()),Ke.spot1=new go.Spot(0,ge/te);var ft=wt(.7,Pe/te,1,.5,0,me/te,1,me/te,ve());return Ke.spot2=new go.Spot(ft.x,ft.y),ot(ft),Ke}),go.Shape.setFigureParameter("Pointer",0,new Dn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.1);var se=new go.Geometry,ge=new go.PathFigure(ne,.5*te,!0);se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,ue*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(ue,.35);var me=wt(.2,.65,1,.65,0,1,1,.5,ve());return se.spot2=new go.Spot(me.x,me.y),ot(me),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Dn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.3);var se=new go.Geometry,ge=new go.PathFigure(ne,.5*te,!0);se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ue*ne,.75*te,ue*ne,.25*te).close()),se.spot1=new go.Spot(ue,.35);var me=wt(0,.65,1,.65,0,1,1,.5,ve());return se.spot2=new go.Spot(me.x,me.y),ot(me),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Dn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.4);var se=(.5-ue/2)*te,ge=(.5+ue/2)*te,me=new go.Geometry,xe=new go.PathFigure(ne,.5*te,!0);me.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,0,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*te)),xe.add(new go.PathSegment(go.PathSegment.Line,0,se)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),me.spot1=new go.Spot(.2,.3);var Pe=wt(.7,1,1,.5,0,ge/te,1,ge/te,ve());return me.spot2=new go.Spot(Pe.x,Pe.y),ot(Pe),me}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Dn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=50);var se=(te-ue)/2,ge=se+ue;ue>te&&(se=0,ge=te);var me=new go.Geometry,xe=new go.PathFigure(ne,.5*te,!0);me.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,0,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*te)),xe.add(new go.PathSegment(go.PathSegment.Line,0,se)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),xe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),me.spot1=new go.Spot(.2,se/te);var Pe=wt(.7,1,1,.5,0,ge/te,1,ge/te,ve());return me.spot2=new go.Spot(Pe.x,Pe.y),ot(Pe),me}),go.Shape.setFigureParameter("SquareArrow",0,new Dn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.7);var se=new go.Geometry,ge=new go.PathFigure(ne,.5*te,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ue*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ue*ne,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(ue,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=Je*.1,me=new go.PathFigure(0,.9*te,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+ge)*te,(.5+se)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+ge)*te).close()),ue.spot1=new go.Spot(.25,.5),ue.spot2=new go.Spot(.75,.97),ue}),go.Shape.defineFigureGenerator("Cone2",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.9*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*te,(1-.85/.9)*ne,te,.85/.9*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*te).close());var ge=new go.PathFigure(0,.9*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*te,(1-.85/.9)*ne,.8*te,.85/.9*ne,.8*te)),ue.spot1=new go.Spot(.25,.5),ue.spot2=new go.Spot(.75,.82),ue}),go.Shape.defineFigureGenerator("Cube1",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*te).close());var ge=new go.PathFigure(.5*ne,te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),ue.spot1=new go.Spot(0,.3),ue.spot2=new go.Spot(.5,.85),ue}),go.Shape.defineFigureGenerator("Cube2",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.3*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0).close());var ge=new go.PathFigure(0,.3*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Move,.7*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),ue.spot1=new go.Spot(0,.3),ue.spot2=new go.Spot(.7,1),ue}),go.Shape.defineFigureGenerator("Cylinder1",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=5),ue=Math.min(ue,te/3);var se=new go.Geometry,ge=Je*.5,me=new go.PathFigure(0,ue,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Je*ue,(.5-ge)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,1*ne,ue,(.5+ge)*ne,0,1*ne,Je*ue)),me.add(new go.PathSegment(go.PathSegment.Line,ne,te-ue)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,1*te,1*ne,te-Je*ue,(.5+ge)*ne,1*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ue,(.5-ge)*ne,1*te,0,te-Je*ue)),me.add(new go.PathSegment(go.PathSegment.Line,0,ue));var xe=new go.PathFigure(ne,ue,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,2*ue,1*ne,2*ue-Je*ue,(.5+ge)*ne,2*ue)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,ue,(.5-ge)*ne,2*ue,0,2*ue-Je*ue)),se.spot1=new go.Spot(0,0,0,2*ue),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=5),ue=Math.min(ue,te/3);var se=new go.Geometry,ge=Je*.5,me=new go.PathFigure(0,te-ue,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,ue)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Je*ue,(.5-ge)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,ue,(.5+ge)*ne,0,ne,Je*ue)),me.add(new go.PathSegment(go.PathSegment.Line,ne,te-ue)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,te-Je*ue,(.5+ge)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ue,(.5-ge)*ne,te,0,te-Je*ue));var xe=new go.PathFigure(0,te-ue,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te-2*ue,0,te-ue-Je*ue,(.5-ge)*ne,te-2*ue)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ne,te-ue,(.5+ge)*ne,te-2*ue,ne,te-ue-Je*ue)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*ue),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=5),ue=Math.min(ue,ne/3);var se=new go.Geometry,ge=Je*.5,me=new go.PathFigure(ue,0,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne-ue,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,ne-Je*ue,0,ne,(.5-ge)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,te,ne,(.5+ge)*te,ne-Je*ue,te)),me.add(new go.PathSegment(go.PathSegment.Line,ue,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,Je*ue,te,0,(.5+ge)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,ue,0,0,(.5-ge)*te,Je*ue,0));var xe=new go.PathFigure(ue,0,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,2*ue,.5*te,ue+Je*ue,0,2*ue,(.5-ge)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue,te,2*ue,(.5+ge)*te,ue+Je*ue,te)),se.spot1=new go.Spot(0,0,2*ue,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=5),ue=Math.min(ue,ne/3);var se=new go.Geometry,ge=Je*.5,me=new go.PathFigure(ne-ue,0,!0);se.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,ne-Je*ue,0,ne,(.5-ge)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,te,ne,(.5+ge)*te,ne-Je*ue,te)),me.add(new go.PathSegment(go.PathSegment.Line,ue,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,Je*ue,te,0,(.5+ge)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,ue,0,0,(.5-ge)*te,Je*ue,0)),me.add(new go.PathSegment(go.PathSegment.Line,ne-ue,0));var xe=new go.PathFigure(ne-ue,0,!1);return se.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,ne-2*ue,.5*te,ne-ue-Je*ue,0,ne-2*ue,(.5-ge)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,te,ne-2*ue,(.5+ge)*te,ne-ue-Je*ue,te)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*ue,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.25*ne,.25*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ge=new go.PathFigure(.25*ne,.25*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ue.spot1=new go.Spot(.408,.172),ue.spot2=new go.Spot(.833,.662),ue}),go.Shape.defineFigureGenerator("Prism2",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.25*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ge=new go.PathFigure(0,te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),ge.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*te)),ue.spot1=new go.Spot(.25,.5),ue.spot2=new go.Spot(.75,.75),ue}),go.Shape.defineFigureGenerator("Pyramid1",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*te).close());var ge=new go.PathFigure(.5*ne,0,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ue.spot1=new go.Spot(.25,.367),ue.spot2=new go.Spot(.75,.875),ue}),go.Shape.defineFigureGenerator("Pyramid2",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*te).close());var ge=new go.PathFigure(.5*ne,0,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.85*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),ue.spot1=new go.Spot(.25,.367),ue.spot2=new go.Spot(.75,.875),ue}),go.Shape.defineFigureGenerator("Actor",function(Te,ne,te){var ue=new go.Geometry,se=.2,ge=.1,me=Je*se,xe=Je*ge,Pe=.5,Ke=.1,nt=new go.PathFigure(Pe*ne,(Ke+ge)*te,!0);ue.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-se)*ne,Ke*te,(Pe-me)*ne,(Ke+ge)*te,(Pe-se)*ne,(Ke+xe)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke-ge)*te,(Pe-se)*ne,(Ke-xe)*te,(Pe-me)*ne,(Ke-ge)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+se)*ne,Ke*te,(Pe+me)*ne,(Ke-ge)*te,(Pe+se)*ne,(Ke-xe)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke+ge)*te,(Pe+se)*ne,(Ke+xe)*te,(Pe+me)*ne,(Ke+ge)*te));var ft=.05,qe=Je*ft;Pe=.05,Ke=.25;var at=new go.PathFigure(.5*ne,.2*te,!0);return ue.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.2*te)),Pe=.95,Ke=.25,at.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ft)*ne,Ke*te,(Pe+qe)*ne,(Ke-ft)*te,(Pe+ft)*ne,(Ke-qe)*te)),at.add(new go.PathSegment(go.PathSegment.Line,ne,.6*te)),at.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*te)),at.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.35*te)),ft=.025,qe=Je*ft,Pe=.825,Ke=.35,at.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke-ft)*te,(Pe+ft)*ne,(Ke-qe)*te,(Pe+qe)*ne,(Ke-ft)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ft)*ne,Ke*te,(Pe-qe)*ne,(Ke-ft)*te,(Pe-ft)*ne,(Ke-qe)*te)),at.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),at.add(new go.PathSegment(go.PathSegment.Line,.55*ne,te)),at.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*te)),ft=.05,qe=Je*ft,Pe=.5,Ke=.7,at.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke-ft)*te,(Pe+ft)*ne,(Ke-qe)*te,(Pe+qe)*ne,(Ke-ft)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ft)*ne,Ke*te,(Pe-qe)*ne,(Ke-ft)*te,(Pe-ft)*ne,(Ke-qe)*te)),at.add(new go.PathSegment(go.PathSegment.Line,.45*ne,te)),at.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),at.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.35*te)),ft=.025,qe=Je*ft,Pe=.175,Ke=.35,at.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke-ft)*te,(Pe+ft)*ne,(Ke-qe)*te,(Pe+qe)*ne,(Ke-ft)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ft)*ne,Ke*te,(Pe-qe)*ne,(Ke-ft)*te,(Pe-ft)*ne,(Ke-qe)*te)),at.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*te)),at.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),ft=.05,qe=Je*ft,Pe=.05,Ke=.25,at.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke-ft)*te,(Pe-ft)*ne,(Ke-qe)*te,(Pe-qe)*ne,(Ke-ft)*te)),at.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*te)),ue.spot1=new go.Spot(.2,.2),ue.spot2=new go.Spot(.8,.65),ue}),go.Shape.setFigureParameter("Card",0,new Dn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;isNaN(ue)&&(ue=.2);var se=new go.Geometry,ge=new go.PathFigure(ne,0,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ue*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ue*ne,0).close()),se.spot1=new go.Spot(0,ue),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,.5*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te));var ge=new go.PathFigure(.5*ne,.5*te,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),ue.spot1=new go.Spot(.25,0),ue.spot2=new go.Spot(.75,.25),ue}),go.Shape.defineFigureGenerator("CreateRequest",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=new go.PathFigure(0,0,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var me=new go.PathFigure(0,se*te,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),me.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*te)),me.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*te)),ue}),go.Shape.defineFigureGenerator("Database",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=Je*.1,me=new go.PathFigure(ne,.1*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+ge)*te,(.5+se)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+ge)*te)),me.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-ge)*te,(.5-se)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*te,(.5+se)*ne,0,ne,(.1-ge)*te));var xe=new go.PathFigure(ne,.1*te,!1);return ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,ne,(.1+ge)*te,(.5+se)*ne,.2*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-se)*ne,.2*te,0,(.1+ge)*te)),xe.add(new go.PathSegment(go.PathSegment.Move,ne,.2*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*te,ne,(.2+ge)*te,(.5+se)*ne,.3*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-se)*ne,.3*te,0,(.2+ge)*te)),xe.add(new go.PathSegment(go.PathSegment.Move,ne,.3*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.4*te,ne,(.3+ge)*te,(.5+se)*ne,.4*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,(.5-se)*ne,.4*te,0,(.3+ge)*te)),ue.spot1=new go.Spot(0,.4),ue.spot2=new go.Spot(1,.9),ue}),go.Shape.defineFigureGenerator("DataStorage",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,te,ne,0,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.9*te,.25*ne,.1*te).close()),ue.spot1=new go.Spot(.226,0),ue.spot2=new go.Spot(.81,1),ue}),go.Shape.defineFigureGenerator("DiskStorage",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=Je*.1,me=new go.PathFigure(ne,.1*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+ge)*te,(.5+se)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+ge)*te)),me.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-ge)*te,(.5-se)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*te,(.5+se)*ne,0,ne,(.1-ge)*te));var xe=new go.PathFigure(ne,.1*te,!1);return ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,ne,(.1+ge)*te,(.5+se)*ne,.2*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-se)*ne,.2*te,0,(.1+ge)*te)),xe.add(new go.PathSegment(go.PathSegment.Move,ne,.2*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*te,ne,(.2+ge)*te,(.5+se)*ne,.3*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-se)*ne,.3*te,0,(.2+ge)*te)),ue.spot1=new go.Spot(0,.3),ue.spot2=new go.Spot(1,.9),ue}),go.Shape.defineFigureGenerator("Display",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,te,ne,0,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close()),ue.spot1=new go.Spot(.25,0),ue.spot2=new go.Spot(.75,1),ue}),go.Shape.defineFigureGenerator("DividedEvent",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var ge=Je*.2,me=new go.PathFigure(0,.2*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,0,(.2-ge)*te,(.2-ge)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,.2*te,(.8+ge)*ne,0,ne,(.2-ge)*te)),me.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,te,ne,(.8+ge)*te,(.8+ge)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*te,(.2-ge)*ne,te,0,(.8+ge)*te)),me.add(new go.PathSegment(go.PathSegment.Line,0,.2*te));var xe=new go.PathFigure(0,se*te,!1);return ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),ue}),go.Shape.defineFigureGenerator("DividedProcess",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var ge=new go.PathFigure(0,0,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var me=new go.PathFigure(0,se*te,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),ue}),go.Shape.defineFigureGenerator("Document",function(Te,ne,te){var ue=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*ne,.4*te,.5*ne,te).close()),ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.6),ue}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var ge=new go.PathFigure(0,0,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var me=new go.PathFigure(se*ne,0,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,0,se*te)),me.add(new go.PathSegment(go.PathSegment.Move,ne,se*te)),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*te)),me.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),me.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*te)),ue}),go.Shape.defineFigureGenerator("ExternalProcess",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close());var ge=new go.PathFigure(.1*ne,.4*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.9*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.6*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.9*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.9*te)),ue.spot1=new go.Spot(.25,.25),ue.spot2=new go.Spot(.75,.75),ue}),go.Shape.defineFigureGenerator("File",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ge=new go.PathFigure(.75*ne,0,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),ue.spot1=new go.Spot(0,.25),ue.spot2=go.Spot.BottomRight,ue}),go.Shape.defineFigureGenerator("Interrupt",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,.5*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te));var ge=new go.PathFigure(ne,.5*te,!1);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te));var me=new go.PathFigure(ne,.5*te,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.5,.75),ue}),go.Shape.defineFigureGenerator("InternalStorage",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN,ge=Te?Te.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(ge)&&(ge=.1);var me=new go.PathFigure(0,0,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var xe=new go.PathFigure(se*ne,0,!1);return ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Move,0,ge*te)),xe.add(new go.PathSegment(go.PathSegment.Line,ne,ge*te)),ue}),go.Shape.defineFigureGenerator("Junction",function(Te,ne,te){var ue=new go.Geometry,se=1/Math.SQRT2,ge=(1-1/Math.SQRT2)/2,me=Je*.5,xe=.5,Pe=new go.PathFigure(ne,xe*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,xe*ne,te,ne,(xe+me)*te,(xe+me)*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,xe*te,(xe-me)*ne,te,0,(xe+me)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,xe*ne,0,0,(xe-me)*te,(xe-me)*ne,0)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ne,xe*te,(xe+me)*ne,0,ne,(xe-me)*te));var Ke=new go.PathFigure((ge+se)*ne,(ge+se)*te,!1);return ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,ge*ne,ge*te)),Ke.add(new go.PathSegment(go.PathSegment.Move,ge*ne,(ge+se)*te)),Ke.add(new go.PathSegment(go.PathSegment.Line,(ge+se)*ne,ge*te)),ue}),go.Shape.defineFigureGenerator("LinedDocument",function(Te,ne,te){var ue=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*ne,.4*te,.5*ne,te).close());var ge=new go.PathFigure(.1*ne,0,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.75*te)),ue.spot1=new go.Spot(.1,0),ue.spot2=new go.Spot(1,.6),ue}),go.Shape.defineFigureGenerator("LoopLimit",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te).close()),ue.spot1=new go.Spot(0,.25),ue.spot2=go.Spot.BottomRight,ue}),go.Shape.defineFigureGenerator("MagneticTape",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=.5,me=new go.PathFigure(.5*ne,te,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*te,(ge-se)*ne,te,0,(ge+se)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,0,0,(ge-se)*te,(ge-se)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,ge*te,(ge+se)*ne,0,ne,(ge-se)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,(ge+.1)*ne,.9*te,ne,(ge+se)*te,(ge+se)*ne,.9*te)),me.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),me.add(new go.PathSegment(go.PathSegment.Line,ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ue.spot1=new go.Spot(.15,.15),ue.spot2=new go.Spot(.85,.8),ue}),go.Shape.defineFigureGenerator("ManualInput",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*te).close()),ue.spot1=new go.Spot(0,.25),ue.spot2=go.Spot.BottomRight,ue}),go.Shape.defineFigureGenerator("MessageFromUser",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.7);var ge=new go.PathFigure(0,0,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,se*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=go.Spot.TopLeft,ue}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.25);var ge=new go.PathFigure(0,0,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,se*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,(1-se)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue}),go.Shape.defineFigureGenerator("MicroformRecording",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(1,.75),ue}),go.Shape.defineFigureGenerator("MultiDocument",function(Te,ne,te){var ue=new go.Geometry;te=te/.8;var se=new go.PathFigure(ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.44*te,.96*ne,.47*te,.93*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.54*te,.86*ne,.57*te,.83*ne,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.4*ne,.4*te,.4*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0).close());var ge=new go.PathFigure(.1*ne,.2*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.54*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.44*te)),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.8,.77),ue}),go.Shape.defineFigureGenerator("MultiProcess",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.1*ne,.1*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*te).close());var ge=new go.PathFigure(.2*ne,.1*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*te)),ue.spot1=new go.Spot(0,.2),ue.spot2=new go.Spot(.8,1),ue}),go.Shape.defineFigureGenerator("OfflineStorage",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=1-se,me=new go.PathFigure(0,0,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te).close());var xe=new go.PathFigure(.5*se*ne,se*te,!1);return ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*ne,se*te)),ue}),go.Shape.defineFigureGenerator("OffPageConnector",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(.75,1),ue}),go.Shape.defineFigureGenerator("Or",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=.5,me=new go.PathFigure(ne,ge*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,te,ne,(ge+se)*te,(ge+se)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*te,(ge-se)*ne,te,0,(ge+se)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,0,0,(ge-se)*te,(ge-se)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,ge*te,(ge+se)*ne,0,ne,(ge-se)*te));var xe=new go.PathFigure(ne,.5*te,!1);return ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),xe.add(new go.PathSegment(go.PathSegment.Move,.5*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ue}),go.Shape.defineFigureGenerator("PaperTape",function(Te,ne,te){var ue=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.3*te,.5*ne,.6*te,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*ne,.4*te,.5*ne,te).close()),ue.spot1=new go.Spot(0,.49),ue.spot2=new go.Spot(1,.75),ue}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN,ge=Te?Te.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(ge)&&(ge=.3);var me=new go.PathFigure(0,0,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,(1-ge)*ne,.5*te)),me.add(new go.PathSegment(go.PathSegment.Line,ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN,ge=Te?Te.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(ge)&&(ge=.3);var me=new go.PathFigure(0,0,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-ge)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),me.add(new go.PathSegment(go.PathSegment.Line,(1-ge)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue}),go.Shape.defineFigureGenerator("Procedure",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=new go.PathFigure(0,0,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var me=new go.PathFigure((1-se)*ne,0,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Move,se*ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ue}),go.Shape.defineFigureGenerator("Process",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=new go.PathFigure(0,0,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var me=new go.PathFigure(se*ne,0,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ue.spot2=go.Spot.BottomRight,ue}),go.Shape.defineFigureGenerator("Sort",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close());var ge=new go.PathFigure(0,.5*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),ue.spot1=new go.Spot(.25,.25),ue.spot2=new go.Spot(.75,.5),ue}),go.Shape.defineFigureGenerator("Start",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.25);var ge=new go.PathFigure(se*ne,0,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*te,.25*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*te,.25*ne,.5*te));var me=new go.PathFigure(se*ne,0,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),me.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,te)),ue.spot1=new go.Spot(se,0),ue.spot2=new go.Spot(1-se,1),ue}),go.Shape.defineFigureGenerator("Terminator",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*te,.25*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*te,.25*ne,.5*te)),ue.spot1=new go.Spot(.23,0),ue.spot2=new go.Spot(.77,1),ue}),go.Shape.defineFigureGenerator("TransmittalTape",function(Te,ne,te){var ue=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=new go.PathFigure(0,0,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.75*ne,(1-se)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*te).close()),ue.spot1=go.Spot.TopLeft,ue}),go.Shape.defineFigureGenerator("AndGate",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=new go.PathFigure(0,0,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(.5+se)*ne,0,ne,(.5-se)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.5+se)*te,(.5+se)*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(.55,1),ue}),go.Shape.defineFigureGenerator("Buffer",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.5,.75),ue}),go.Shape.defineFigureGenerator("Clock",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=.5,me=new go.PathFigure(ne,ge*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,te,ne,(ge+se)*te,(ge+se)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*te,(ge-se)*ne,te,0,(ge+se)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,0,0,(ge-se)*te,(ge-se)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,ge*te,(ge+se)*ne,0,ne,(ge-se)*te));var xe=new go.PathFigure(ne,ge*te,!1);ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne,ge*te));var Pe=new go.PathFigure(.8*ne,.75*te,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.75*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.75*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.75*te)),ue}),go.Shape.defineFigureGenerator("Ground",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Move,.3*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,te)),ue}),go.Shape.defineFigureGenerator("Inverter",function(Te,ne,te){var ue=new go.Geometry,se=Je*.1,ge=.1,me=.9,xe=.5,Pe=new go.PathFigure(.8*ne,.5*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*te));var Ke=new go.PathFigure((me+ge)*ne,xe*te,!0);return ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me-ge)*ne,xe*te,(me-se)*ne,(xe+ge)*te,(me-ge)*ne,(xe+se)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,xe*te,(me+se)*ne,(xe-ge)*te,(me+ge)*ne,(xe-se)*te)),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.4,.75),ue}),go.Shape.defineFigureGenerator("NandGate",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=Je*.4,me=Je*.1,xe=.1,Pe=.9,Ke=.5,nt=new go.PathFigure(.8*ne,.5*te,!0);ue.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,te,.8*ne,(.5+ge)*te,(.4+se)*ne,te)),nt.add(new go.PathSegment(go.PathSegment.Line,0,te)),nt.add(new go.PathSegment(go.PathSegment.Line,0,0)),nt.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),nt.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(.4+se)*ne,0,.8*ne,(.5-ge)*te));var ft=new go.PathFigure((Pe+xe)*ne,Ke*te,!0);return ue.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke+xe)*te,(Pe+xe)*ne,(Ke+me)*te,(Pe+me)*ne,(Ke+xe)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-xe)*ne,Ke*te,(Pe-me)*ne,(Ke+xe)*te,(Pe-xe)*ne,(Ke+me)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke-xe)*te,(Pe-xe)*ne,(Ke-me)*te,(Pe-me)*ne,(Ke-xe)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+xe)*ne,Ke*te,(Pe+me)*ne,(Ke-xe)*te,(Pe+xe)*ne,(Ke-me)*te)),ue.spot1=new go.Spot(0,.05),ue.spot2=new go.Spot(.55,.95),ue}),go.Shape.defineFigureGenerator("NorGate",function(Te,ne,te){var ue=new go.Geometry,se=.5,ge=Je*se,me=0,xe=.5,Pe=new go.PathFigure(.8*ne,.5*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.7*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*te,.25*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(me+ge)*ne,(xe-se)*te,.7*ne,(xe-ge)*te)),se=.1,ge=Je*.1,me=.9,xe=.5;var Ke=new go.PathFigure((me-se)*ne,xe*te,!0);return ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*ne,xe*te,(me+ge)*ne,(xe-se)*te,(me+se)*ne,(xe-ge)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*ne,xe*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te)),ue.spot1=new go.Spot(.2,.25),ue.spot2=new go.Spot(.6,.75),ue}),go.Shape.defineFigureGenerator("OrGate",function(Te,ne,te){var ue=new go.Geometry,se=.5,ge=Je*se,me=0,xe=.5,Pe=new go.PathFigure(0,0,!0);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(me+ge+ge)*ne,(xe-se)*te,.8*ne,(xe-ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.8*ne,(xe+ge)*te,(me+ge+ge)*ne,(xe+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*te,.25*ne,.25*te).close()),ue.spot1=new go.Spot(.2,.25),ue.spot2=new go.Spot(.75,.75),ue}),go.Shape.defineFigureGenerator("XnorGate",function(Te,ne,te){var ue=new go.Geometry,se=.5,ge=Je*se,me=.2,xe=.5,Pe=new go.PathFigure(.1*ne,0,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,te,.35*ne,.25*te,.35*ne,.75*te));var Ke=new go.PathFigure(.8*ne,.5*te,!0);ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,te,.7*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*te,.45*ne,.25*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(me+ge)*ne,(xe-se)*te,.7*ne,(xe-ge)*te)),se=.1,ge=Je*.1,me=.9,xe=.5;var nt=new go.PathFigure((me-se)*ne,xe*te,!0);return ue.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*ne,xe*te,(me+ge)*ne,(xe-se)*te,(me+se)*ne,(xe-ge)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*ne,xe*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te)),ue.spot1=new go.Spot(.4,.25),ue.spot2=new go.Spot(.65,.75),ue}),go.Shape.defineFigureGenerator("XorGate",function(Te,ne,te){var ue=new go.Geometry,se=.5,ge=Je*se,me=.2,xe=.5,Pe=new go.PathFigure(.1*ne,0,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,te,.35*ne,.25*te,.35*ne,.75*te));var Ke=new go.PathFigure(.2*ne,0,!0);return ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(me+ge)*ne,(xe-se)*te,.9*ne,(xe-ge)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,te,.9*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*te,.45*ne,.25*te).close()),ue.spot1=new go.Spot(.4,.25),ue.spot2=new go.Spot(.8,.75),ue}),go.Shape.defineFigureGenerator("Capacitor",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue}),go.Shape.defineFigureGenerator("Resistor",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.5*te)),ue}),go.Shape.defineFigureGenerator("Inductor",function(Te,ne,te){var ue=new go.Geometry,se=Je*.1,ge=.1,me=.1,xe=.5,Pe=new go.PathFigure((me-se*.5)*ne,te,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,0,(me-se)*ne,te,(me-ge)*ne,0)),me=.3,Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,te,(me+ge)*ne,0,(me+se)*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,0,(me-se)*ne,te,(me-ge)*ne,0)),me=.5,Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,te,(me+ge)*ne,0,(me+se)*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,0,(me-se)*ne,te,(me-ge)*ne,0)),me=.7,Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,te,(me+ge)*ne,0,(me+se)*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,0,(me-se)*ne,te,(me-ge)*ne,0)),me=.9,Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+se*.5)*ne,te,(me+ge)*ne,0,(me+se)*ne,te)),ue}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Te,ne,te){var ue=new go.Geometry,se=Je*.5,ge=.5,me=.5,xe=.5,Pe=new go.PathFigure((me-ge)*ne,xe*te,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,xe*te,(me+se)*ne,(xe-ge)*te,(me+ge)*ne,(xe-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me-ge)*ne,xe*te,(me-se)*ne,(xe+ge)*te,(me-ge)*ne,(xe+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Move,(me-ge+.1)*ne,xe*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge-.1)*ne,xe*te,me*ne,(xe-ge)*te,me*ne,(xe+ge)*te)),ue}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.75*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue}),go.Shape.defineFigureGenerator("Diode",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.5,.75),ue}),go.Shape.defineFigureGenerator("Wifi",function(Te,ne,te){var ue=new go.Geometry,se=ne,ge=te;ne=ne*.38,te=te*.6;var me=Je*.8,xe=.8,Pe=0,Ke=.5,nt=(se-ne)/2,ft=(ge-te)/2,qe=new go.PathFigure(Pe*ne+nt,(Ke+xe)*te+ft,!0);ue.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-xe)*ne+nt,Ke*te+ft,(Pe-me)*ne+nt,(Ke+xe)*te+ft,(Pe-xe)*ne+nt,(Ke+me)*te+ft)),qe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke-xe)*te+ft,(Pe-xe)*ne+nt,(Ke-me)*te+ft,(Pe-me)*ne+nt,(Ke-xe)*te+ft)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-xe+me*.5)*ne+nt,Ke*te+ft,Pe*ne+nt,(Ke-xe)*te+ft,(Pe-xe+me*.5)*ne+nt,(Ke-me)*te+ft)),qe.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke+xe)*te+ft,(Pe-xe+me*.5)*ne+nt,(Ke+me)*te+ft,Pe*ne+nt,(Ke+xe)*te+ft).close()),me=Je*.4,xe=.4,Pe=.2,Ke=.5;var at=new go.PathFigure(Pe*ne+nt,(Ke+xe)*te+ft,!0);ue.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-xe)*ne+nt,Ke*te+ft,(Pe-me)*ne+nt,(Ke+xe)*te+ft,(Pe-xe)*ne+nt,(Ke+me)*te+ft)),at.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke-xe)*te+ft,(Pe-xe)*ne+nt,(Ke-me)*te+ft,(Pe-me)*ne+nt,(Ke-xe)*te+ft)),at.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-xe+me*.5)*ne+nt,Ke*te+ft,Pe*ne+nt,(Ke-xe)*te+ft,(Pe-xe+me*.5)*ne+nt,(Ke-me)*te+ft)),at.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke+xe)*te+ft,(Pe-xe+me*.5)*ne+nt,(Ke+me)*te+ft,Pe*ne+nt,(Ke+xe)*te+ft).close()),me=Je*.2,xe=.2,Pe=.5,Ke=.5;var jt=new go.PathFigure((Pe-xe)*ne+nt,Ke*te+ft,!0);ue.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke-xe)*te+ft,(Pe-xe)*ne+nt,(Ke-me)*te+ft,(Pe-me)*ne+nt,(Ke-xe)*te+ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+xe)*ne+nt,Ke*te+ft,(Pe+me)*ne+nt,(Ke-xe)*te+ft,(Pe+xe)*ne+nt,(Ke-me)*te+ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke+xe)*te+ft,(Pe+xe)*ne+nt,(Ke+me)*te+ft,(Pe+me)*ne+nt,(Ke+xe)*te+ft)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-xe)*ne+nt,Ke*te+ft,(Pe-me)*ne+nt,(Ke+xe)*te+ft,(Pe-xe)*ne+nt,(Ke+me)*te+ft)),me=Je*.4,xe=.4,Pe=.8,Ke=.5;var Mt=new go.PathFigure(Pe*ne+nt,(Ke-xe)*te+ft,!0);ue.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+xe)*ne+nt,Ke*te+ft,(Pe+me)*ne+nt,(Ke-xe)*te+ft,(Pe+xe)*ne+nt,(Ke-me)*te+ft)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke+xe)*te+ft,(Pe+xe)*ne+nt,(Ke+me)*te+ft,(Pe+me)*ne+nt,(Ke+xe)*te+ft)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+xe-me*.5)*ne+nt,Ke*te+ft,Pe*ne+nt,(Ke+xe)*te+ft,(Pe+xe-me*.5)*ne+nt,(Ke+me)*te+ft)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke-xe)*te+ft,(Pe+xe-me*.5)*ne+nt,(Ke-me)*te+ft,Pe*ne+nt,(Ke-xe)*te+ft).close()),me=Je*.8,xe=.8,Pe=1,Ke=.5;var bt=new go.PathFigure(Pe*ne+nt,(Ke-xe)*te+ft,!0);return ue.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+xe)*ne+nt,Ke*te+ft,(Pe+me)*ne+nt,(Ke-xe)*te+ft,(Pe+xe)*ne+nt,(Ke-me)*te+ft)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke+xe)*te+ft,(Pe+xe)*ne+nt,(Ke+me)*te+ft,(Pe+me)*ne+nt,(Ke+xe)*te+ft)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+xe-me*.5)*ne+nt,Ke*te+ft,Pe*ne+nt,(Ke+xe)*te+ft,(Pe+xe-me*.5)*ne+nt,(Ke+me)*te+ft)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+nt,(Ke-xe)*te+ft,(Pe+xe-me*.5)*ne+nt,(Ke-me)*te+ft,Pe*ne+nt,(Ke-xe)*te+ft).close()),ue}),go.Shape.defineFigureGenerator("Email",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ge=new go.PathFigure(0,0,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Move,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.54*te)),ge.add(new go.PathSegment(go.PathSegment.Move,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.54*te)),ue}),go.Shape.defineFigureGenerator("Ethernet",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.35*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,0).close());var ge=new go.PathFigure(.1*ne,te,!0,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,te).close());var me=new go.PathFigure(.6*ne,te,!0,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*te)),me.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.6*te)),me.add(new go.PathSegment(go.PathSegment.Line,.6*ne,te).close());var xe=new go.PathFigure(0,.5*te,!1);return ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),xe.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*te)),xe.add(new go.PathSegment(go.PathSegment.Move,.75*ne,.5*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.6*te)),xe.add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.6*te)),ue}),go.Shape.defineFigureGenerator("Power",function(Te,ne,te){var ue=new go.Geometry,se=Je*.4,ge=.4,me=.5,xe=.5,Pe=ve(),Ke=ve(),nt=ve(),ft=ve();Qt(me,xe-ge,me+se,xe-ge,me+ge,xe-se,me+ge,xe,.5,Pe,Pe,Ke,nt,ft);var qe=be(Ke.x,Ke.y),at=new go.PathFigure(Ke.x*ne,Ke.y*te,!0);ue.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,xe*te,nt.x*ne,nt.y*te,ft.x*ne,ft.y*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(me-ge)*ne,xe*te,(me-se)*ne,(xe+ge)*te,(me-ge)*ne,(xe+se)*te)),Qt(me-ge,xe,me-ge,xe-se,me-se,xe-ge,me,xe-ge,.5,nt,ft,Ke,Pe,Pe),at.add(new go.PathSegment(go.PathSegment.Bezier,Ke.x*ne,Ke.y*te,nt.x*ne,nt.y*te,ft.x*ne,ft.y*te)),se=Je*.3,ge=.3,Qt(me-ge,xe,me-ge,xe-se,me-se,xe-ge,me,xe-ge,.5,nt,ft,Ke,Pe,Pe),at.add(new go.PathSegment(go.PathSegment.Line,Ke.x*ne,Ke.y*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(me-ge)*ne,xe*te,ft.x*ne,ft.y*te,nt.x*ne,nt.y*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+ge)*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(me+ge)*ne,xe*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Qt(me,xe-ge,me+se,xe-ge,me+ge,xe-se,me+ge,xe,.5,Pe,Pe,Ke,nt,ft),at.add(new go.PathSegment(go.PathSegment.Bezier,Ke.x*ne,Ke.y*te,ft.x*ne,ft.y*te,nt.x*ne,nt.y*te).close());var at=new go.PathFigure(.45*ne,0,!0);return ue.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*te)),at.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.5*te)),at.add(new go.PathSegment(go.PathSegment.Line,.55*ne,0).close()),ot(Pe),ot(Ke),ot(nt),ot(ft),ot(qe),ue.spot1=new go.Spot(.25,.45),ue.spot2=new go.Spot(.75,.8),ue}),go.Shape.defineFigureGenerator("Fallout",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te/2,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,ne/2,te/2,ne/2,te/2));function ge(me,xe,Pe){me.add(new go.PathSegment(go.PathSegment.Move,(.3+xe)*ne,(.8+Pe)*te)),me.add(new go.PathSegment(go.PathSegment.Line,(.5+xe)*ne,(.5+Pe)*te)),me.add(new go.PathSegment(go.PathSegment.Line,(.1+xe)*ne,(.5+Pe)*te)),me.add(new go.PathSegment(go.PathSegment.Line,(.3+xe)*ne,(.8+Pe)*te).close())}return ge(se,0,0),ge(se,.4,0),ge(se,.2,-.3),ue}),go.Shape.defineFigureGenerator("IrritationHazard",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.2*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close()),ue.spot1=new go.Spot(.3,.3),ue.spot2=new go.Spot(.7,.7),ue}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.37*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.11*te)),se.add(new go.PathSegment(go.PathSegment.Line,.77*ne,.04*te)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.49*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.37*te)),se.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.86*te)),se.add(new go.PathSegment(go.PathSegment.Line,.77*ne,.91*te)),se.add(new go.PathSegment(go.PathSegment.Line,.34*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.34*ne,.78*te)),se.add(new go.PathSegment(go.PathSegment.Line,.44*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.56*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*te).close()),ue}),go.Shape.defineFigureGenerator("FireHazard",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.1*ne,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*ne,0,-.25*ne,.63*te,.45*ne,.44*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*ne,.42*te,.48*ne,.17*te,.54*ne,.35*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*ne,.18*te,.59*ne,.29*te,.58*ne,.28*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,.6*te,.8*ne,.34*te,.88*ne,.43*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*ne,.31*te,.87*ne,.48*te,.88*ne,.43*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,te,1.17*ne,.76*te,.82*ne,.8*te).close()),ue.spot1=new go.Spot(.07,.445),ue.spot2=new go.Spot(.884,.958),ue}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Te,ne,te){var ue=new go.Geometry,se=.5,ge=0,me=0,xe=se*Je,Pe=.4*Math.SQRT2/2+.5,Ke=.5-.5*Math.SQRT2/2,nt=1,ft=.5,qe=.5,at=0,jt=new go.PathFigure(Pe*ne,(1-Ke)*te,!1);return ue.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,ft*te,nt*ne,.7*te,nt*ne,ft*te)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(qe+ge)*ne,(at+ge)*te,(.5+se+ge)*ne,(.5-xe+ge)*te,(.5+xe+ge)*ne,(.5-se+ge)*te)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ge)*ne,(.5+me)*te,(.5-xe+ge)*ne,(.5-se+me)*te,(.5-se+ge)*ne,(.5-xe+me)*te)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ge)*ne,.9*te,(.5-se+ge)*ne,(.5+xe+me)*te,(.5-xe+ge)*ne,.9*te)),jt.add(new go.PathSegment(go.PathSegment.Move,(.25+ge)*ne,.8*te)),jt.add(new go.PathSegment(go.PathSegment.Line,(.35+ge)*ne,.9*te)),jt.add(new go.PathSegment(go.PathSegment.Line,(.2+ge)*ne,.95*te)),ue}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Move,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);ue.add(se);var ge=new go.PathFigure(ne,te,!1);ue.add(ge);var me=new go.PathFigure(0,.5*te,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*te,.2*ne,.35*te,.3*ne,.35*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,.7*ne,.65*te,.8*ne,.65*te)),ue}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te).close()),ue}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.2*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te).close());var se=new go.PathFigure(0,.2*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te)),ue}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.7*ne,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,0,.6*ne,.5*te,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,te,.4*ne,.5*te,ne,.5*te).close());var ge=new go.PathFigure(.45*ne,.73*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.73*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.38*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.31*ne,.27*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.56*ne,.27*te)),ue}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);ue.add(se);var ge=new go.PathFigure(.335*ne,(1-.555)*te,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ne,.68*te,(1-.12)*ne,.46*te,(1-.02)*ne,.54*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.68*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.335*ne,(1-.555)*te,.02*ne,.54*te,.12*ne,.46*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.365*ne,(1-.595)*te));var me=.5-.285,xe=.5,Pe=me,Ke=Math.PI/4,nt=4*(1-Math.cos(Ke))/(3*Math.sin(Ke)),ft=nt*.5,qe=me,at=me,jt=nt*qe,Mt=nt*at;ge.add(new go.PathSegment(go.PathSegment.Bezier,(xe-qe)*ne,Pe*te,(xe-(jt+qe)/2)*ne,(Pe+(at+Mt)/2)*te,(xe-qe)*ne,(Pe+Mt)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,xe*ne,(Pe-at)*te,(xe-qe)*ne,(Pe-Mt)*te,(xe-jt)*ne,(Pe-at)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(xe+qe)*ne,Pe*te,(xe+jt)*ne,(Pe-at)*te,(xe+qe)*ne,(Pe-Mt)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ne,(1-.595)*te,(xe+qe)*ne,(Pe+Mt)*te,(xe+(jt+qe)/2)*ne,(Pe+(at+Mt)/2)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ne,(1-.595)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*te));var bt=new go.PathFigure(.2*ne,te,!1);ue.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.8*te));var Bt=new go.PathFigure(.8*ne,te,!1);return ue.add(Bt),Bt.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*te)),ue}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.1*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,te).close());var ge=new go.PathFigure(.2*ne,.2*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*te)),ue}),go.Shape.defineFigureGenerator("BpmnEventError",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.5*te).close()),ue}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);ue.add(se);var ge=new go.PathFigure(ne,te,!1);ue.add(ge);var me=new go.PathFigure(.1*ne,te,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),me.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te).close()),ue}),go.Shape.defineFigureGenerator("Caution",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.05*ne,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,.8*te,0,te,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.1*te,.5*ne,0,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,te,ne,te,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,te));var ge=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-ge)*ne,.875*te)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ne,.875*te,ge*ne,ge*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.325*te,.575*ne,.725*te,.625*ne,.375*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.75*te,.375*ne,.375*te,.425*ne,.725*te)),ue}),go.Shape.defineFigureGenerator("Recycle",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.45*ne,.95*te,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*ne,.85*te,.17*ne,.95*te,.15*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.235*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.625*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.65*te)),se.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,.575*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*ne,.95*te,0,.675*te,0,.7*te)),se.add(new go.PathSegment(go.PathSegment.Move,.45*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.775*te)),se.add(new go.PathSegment(go.PathSegment.Line,.22*ne,.775*te));var ge=new go.PathFigure(.475*ne,.2*te,!1);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.225*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.175*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.325*ne,.05*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.05*te,.35*ne,0,.375*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.375*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.475*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.315*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.32*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.05*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,0,.65*ne,.05*te,.625*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.38*ne,.0105*te));var me=new go.PathFigure(.675*ne,.575*te,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.875*ne,.525*te)),me.add(new go.PathSegment(go.PathSegment.Line,ne,.775*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,.85*ne,.95*te,ne,.8*te,ne,.85*te)),me.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.95*te)),me.add(new go.PathSegment(go.PathSegment.Line,.65*ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.85*te)),me.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.725*te)),me.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.775*te)),me.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.775*te)),me.add(new go.PathSegment(go.PathSegment.Line,ne,.775*te)),me.add(new go.PathSegment(go.PathSegment.Move,.675*ne,.575*te)),me.add(new go.PathSegment(go.PathSegment.Line,.775*ne,.775*te)),ue}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Te,ne,te){var ue=new go.Geometry,se=.5,ge=Je*.5,me=new go.PathFigure(ne,se*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,te,ne,(se+ge)*te,(se+ge)*ne,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,se*te,(se-ge)*ne,te,0,(se+ge)*te)),me.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,0,0,(se-ge)*te,(se-ge)*ne,0)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne,se*te,(se+ge)*ne,0,ne,(se-ge)*te));var xe=new go.PathFigure(se*ne,0,!1);return ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,se*ne,.15*te)),xe.add(new go.PathSegment(go.PathSegment.Move,se*ne,te)),xe.add(new go.PathSegment(go.PathSegment.Line,se*ne,.85*te)),xe.add(new go.PathSegment(go.PathSegment.Move,0,se*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.15*ne,se*te)),xe.add(new go.PathSegment(go.PathSegment.Move,ne,se*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,se*te)),xe.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.58*ne,.1*te)),xe.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.78*ne,.54*te)),ue}),go.Shape.defineFigureGenerator("Package",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.15*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ge=new go.PathFigure(0,.15*te,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.15*te).close()),ue.spot1=new go.Spot(0,.1),ue.spot2=new go.Spot(1,1),ue}),go.Shape.defineFigureGenerator("Class",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ge=new go.PathFigure(0,.2*te,!1);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te).close());var me=new go.PathFigure(0,.5*te,!1);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te).close()),ue}),go.Shape.defineFigureGenerator("Component",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te).close());var ge=new go.PathFigure(0,.2*te,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close());var me=new go.PathFigure(0,.6*te,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.6*te)),me.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.8*te)),me.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),me.add(new go.PathSegment(go.PathSegment.Line,0,.6*te).close()),ue}),go.Shape.defineFigureGenerator("Boat Shipment",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.15*ne,.6*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*te));var ge=new go.PathFigure(.15*ne,.6*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*te)),ue}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te).close()),ue}),go.Shape.defineFigureGenerator("Workcell",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue}),go.Shape.defineFigureGenerator("Supermarket",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.66*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,.66*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),ue}),go.Shape.defineFigureGenerator("TruckShipment",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ge=new go.PathFigure(ne,.8*te,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te).close());var me=.1,xe=Je*.1,Pe=.2,Ke=.9,nt=new go.PathFigure((Pe-me)*ne,Ke*te,!0);ue.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke-me)*te,(Pe-me)*ne,(Ke-xe)*te,(Pe-xe)*ne,(Ke-me)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+me)*ne,Ke*te,(Pe+xe)*ne,(Ke-me)*te,(Pe+me)*ne,(Ke-xe)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke+me)*te,(Pe+me)*ne,(Ke+xe)*te,(Pe+xe)*ne,(Ke+me)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-me)*ne,Ke*te,(Pe-xe)*ne,(Ke+me)*te,(Pe-me)*ne,(Ke+xe)*te).close()),me=.1,xe=Je*.1,Pe=.8,Ke=.9;var ft=new go.PathFigure((Pe-me)*ne,Ke*te,!0);return ue.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke-me)*te,(Pe-me)*ne,(Ke-xe)*te,(Pe-xe)*ne,(Ke-me)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+me)*ne,Ke*te,(Pe+xe)*ne,(Ke-me)*te,(Pe+me)*ne,(Ke-xe)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Ke+me)*te,(Pe+me)*ne,(Ke+xe)*te,(Pe+xe)*ne,(Ke+me)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-me)*ne,Ke*te,(Pe-xe)*ne,(Ke+me)*te,(Pe-me)*ne,(Ke+xe)*te).close()),ue}),go.Shape.defineFigureGenerator("KanbanPost",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.2*ne,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),ue}),go.Shape.defineFigureGenerator("Forklift",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var ge=new go.PathFigure(0,.5*te,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var me=new go.PathFigure(.5*ne,.8*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.1*te)),me.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.1*te)),me.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.8*te)),me.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*te));var xe=new go.PathFigure(.5*ne,.7*te,!1);ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te));var Pe=.1,Ke=Je*.1,nt=.1,ft=.9,qe=new go.PathFigure((nt-Pe)*ne,ft*te,!0);ue.add(qe),qe.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(ft-Pe)*te,(nt-Pe)*ne,(ft-Ke)*te,(nt-Ke)*ne,(ft-Pe)*te)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(nt+Pe)*ne,ft*te,(nt+Ke)*ne,(ft-Pe)*te,(nt+Pe)*ne,(ft-Ke)*te)),qe.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(ft+Pe)*te,(nt+Pe)*ne,(ft+Ke)*te,(nt+Ke)*ne,(ft+Pe)*te)),qe.add(new go.PathSegment(go.PathSegment.Bezier,(nt-Pe)*ne,ft*te,(nt-Ke)*ne,(ft+Pe)*te,(nt-Pe)*ne,(ft+Ke)*te)),Pe=.1,Ke=Je*.1,nt=.4,ft=.9;var at=new go.PathFigure((nt-Pe)*ne,ft*te,!0);return ue.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(ft-Pe)*te,(nt-Pe)*ne,(ft-Ke)*te,(nt-Ke)*ne,(ft-Pe)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(nt+Pe)*ne,ft*te,(nt+Ke)*ne,(ft-Pe)*te,(nt+Pe)*ne,(ft-Ke)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt*ne,(ft+Pe)*te,(nt+Pe)*ne,(ft+Ke)*te,(nt+Ke)*ne,(ft+Pe)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(nt-Pe)*ne,ft*te,(nt-Ke)*ne,(ft+Pe)*te,(nt-Pe)*ne,(ft+Ke)*te)),ue}),go.Shape.defineFigureGenerator("RailShipment",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.1*ne,.4*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.4*te).close());var ge=new go.PathFigure(.45*ne,.7*te,!1);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*te));var me=new go.PathFigure(.55*ne,.4*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te)),me.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*te)),me.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*te)),me.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.4*te).close());var nt=.05,ft=Je*.05,qe=.175,at=.95,xe=new go.PathFigure((qe-nt)*ne,at*te,!0);ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Bezier,qe*ne,(at-nt)*te,(qe-nt)*ne,(at-ft)*te,(qe-ft)*ne,(at-nt)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(qe+nt)*ne,at*te,(qe+ft)*ne,(at-nt)*te,(qe+nt)*ne,(at-ft)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,qe*ne,(at+nt)*te,(qe+nt)*ne,(at+ft)*te,(qe+ft)*ne,(at+nt)*te)),xe.add(new go.PathSegment(go.PathSegment.Bezier,(qe-nt)*ne,at*te,(qe-ft)*ne,(at+nt)*te,(qe-nt)*ne,(at+ft)*te));var nt=.05,ft=Je*.05,qe=.375,at=.95,Pe=new go.PathFigure((qe-nt)*ne,at*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,qe*ne,(at-nt)*te,(qe-nt)*ne,(at-ft)*te,(qe-ft)*ne,(at-nt)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(qe+nt)*ne,at*te,(qe+ft)*ne,(at-nt)*te,(qe+nt)*ne,(at-ft)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,qe*ne,(at+nt)*te,(qe+nt)*ne,(at+ft)*te,(qe+ft)*ne,(at+nt)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(qe-nt)*ne,at*te,(qe-ft)*ne,(at+nt)*te,(qe-nt)*ne,(at+ft)*te));var nt=.05,ft=Je*.05,qe=.625,at=.95,Ke=new go.PathFigure((qe-nt)*ne,at*te,!0);ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,qe*ne,(at-nt)*te,(qe-nt)*ne,(at-ft)*te,(qe-ft)*ne,(at-nt)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(qe+nt)*ne,at*te,(qe+ft)*ne,(at-nt)*te,(qe+nt)*ne,(at-ft)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,qe*ne,(at+nt)*te,(qe+nt)*ne,(at+ft)*te,(qe+ft)*ne,(at+nt)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(qe-nt)*ne,at*te,(qe-ft)*ne,(at+nt)*te,(qe-nt)*ne,(at+ft)*te));var nt=.05,ft=Je*.05,qe=.825,at=.95,jt=new go.PathFigure((qe-nt)*ne,at*te,!0);ue.add(jt),jt.add(new go.PathSegment(go.PathSegment.Bezier,qe*ne,(at-nt)*te,(qe-nt)*ne,(at-ft)*te,(qe-ft)*ne,(at-nt)*te)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(qe+nt)*ne,at*te,(qe+ft)*ne,(at-nt)*te,(qe+nt)*ne,(at-ft)*te)),jt.add(new go.PathSegment(go.PathSegment.Bezier,qe*ne,(at+nt)*te,(qe+nt)*ne,(at+ft)*te,(qe+ft)*ne,(at+nt)*te)),jt.add(new go.PathSegment(go.PathSegment.Bezier,(qe-nt)*ne,at*te,(qe-ft)*ne,(at+nt)*te,(qe-nt)*ne,(at+ft)*te).close());var Mt=new go.PathFigure(0,te,!1);return ue.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,ne,te).close()),ue}),go.Shape.defineFigureGenerator("Warehouse",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var ge=new go.PathFigure(0,.2*te,!1);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te).close());var me=new go.PathFigure(.15*ne,te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.5*te)),me.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*te)),me.add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)),me.add(new go.PathSegment(go.PathSegment.Line,.15*ne,te).close());var xe=.05,Pe=Je*.05,Ke=.35,nt=.775,ft=new go.PathFigure((Ke-xe)*ne,nt*te,!0);return ue.add(ft),ft.add(new go.PathSegment(go.PathSegment.Bezier,Ke*ne,(nt-xe)*te,(Ke-xe)*ne,(nt-Pe)*te,(Ke-Pe)*ne,(nt-xe)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Ke+xe)*ne,nt*te,(Ke+Pe)*ne,(nt-xe)*te,(Ke+xe)*ne,(nt-Pe)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,Ke*ne,(nt+xe)*te,(Ke+xe)*ne,(nt+Pe)*te,(Ke+Pe)*ne,(nt+xe)*te)),ft.add(new go.PathSegment(go.PathSegment.Bezier,(Ke-xe)*ne,nt*te,(Ke-Pe)*ne,(nt+xe)*te,(Ke-xe)*ne,(nt+Pe)*te).close()),ue}),go.Shape.defineFigureGenerator("ControlCenter",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te).close()),ue}),go.Shape.defineFigureGenerator("Bluetooth",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.75*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),ue}),go.Shape.defineFigureGenerator("Bookmark",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*te)),ue}),go.Shape.defineFigureGenerator("Bookmark",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*te)),ue}),go.Shape.defineFigureGenerator("Globe",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,.75*ne,0,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,.75*te,.75*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.25*ne,te,0,.75*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,.25*te,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,.15*ne,.25*te,.15*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.85*ne,.75*te,.85*ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*ne,.15*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ne,.15*te,.35*ne,.3*te,.65*ne,.3*te)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ne,.85*te,.35*ne,.7*te,.65*ne,.7*te)),ue}),go.Shape.defineFigureGenerator("Wave",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.25*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.25*te,.1*ne,0,.2*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,.25*te,.425*ne,.5*te,.575*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.25*te,.8*ne,0,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.75*te,.1*ne,.5*te,.2*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,.75*te,.425*ne,te,.575*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.75*te,.8*ne,.5*te,.9*ne,.5*te)),ue}),go.Shape.defineFigureGenerator("Operator",function(Te,ne,te){var ue=new go.Geometry,se=.3,ge=Je*.3,me=.5,xe=.7,Pe=new go.PathFigure((me-se)*ne,xe*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*ne,xe*te,(me+ge)*ne,(xe-se)*te,(me+se)*ne,(xe-ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*ne,xe*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te));var Ke=new go.PathFigure(0,.7*te,!1);return ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,ne,.7*te,0,0,ne,0)),ue}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*te,.65*ne,.3*te,.65*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.35*ne,.5*te,.35*ne,.3*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.65*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.3*ne,.6*te,.1*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*te,.2*ne,te,.35*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.65*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,te,.7*ne,.6*te,.9*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*te,.8*ne,te,.65*ne,.95*te)),ue}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,0,.075*te,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,te,0,te,.4*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.4*te,.8*ne,te,.85*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ue}),go.Shape.defineFigureGenerator("Battery",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.1*te));var ge=new go.PathFigure(0,.6*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Move,0,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.4*te)),ue}),go.Shape.defineFigureGenerator("Delete",function(Te,ne,te){var ue=new go.Geometry,se=.5,ge=Je*.5,me=.5,xe=.5,Pe=new go.PathFigure((me-se)*ne,xe*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*ne,xe*te,(me+ge)*ne,(xe-se)*te,(me+se)*ne,(xe-ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*ne,xe*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te));var Ke=new go.PathFigure(.15*ne,.5*te,!1);return ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.5*te)),ue}),go.Shape.defineFigureGenerator("Flag",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.1*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.1*te,.15*ne,0,.35*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*te,.65*ne,.2*te,.85*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*te,.85*ne,.6*te,.65*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.35*ne,.4*te,.15*ne,.4*te).close()),ue}),go.Shape.defineFigureGenerator("Help",function(Te,ne,te){var ue=new go.Geometry,se=.5,ge=Je*.5,me=.5,xe=.5,Pe=new go.PathFigure((me-se)*ne,xe*te,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*ne,xe*te,(me+ge)*ne,(xe-se)*te,(me+se)*ne,(xe-ge)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*ne,xe*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te).close()),se=.05,ge=Je*.05,me=.5,xe=.8;var Ke=new go.PathFigure((me-se)*ne,xe*te,!1);return ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe-se)*te,(me-se)*ne,(xe-ge)*te,(me-ge)*ne,(xe-se)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me+se)*ne,xe*te,(me+ge)*ne,(xe-se)*te,(me+se)*ne,(xe-ge)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,me*ne,(xe+se)*te,(me+se)*ne,(xe+ge)*te,(me+ge)*ne,(xe+se)*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(me-se)*ne,xe*te,(me-ge)*ne,(xe+se)*te,(me-se)*ne,(xe+ge)*te).close()),Ke.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*te)),Ke.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,.75*ne,.475*te,.75*ne,.225*te)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.35*te,.4*ne,.2*te,.3*ne,.25*te)),ue}),go.Shape.defineFigureGenerator("Location",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(.5*ne,te,!0).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.975*ne,.025*te,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*ne,.5*te,.5*ne,0,.025*ne,.025*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ne,.2*te)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*ne,.3*te,.1*ne,.1*te).close()))}),go.Shape.defineFigureGenerator("Lock",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var ge=new go.PathFigure(.2*ne,.5*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*te,.25*ne,0,.75*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.3*te)),ue}),go.Shape.defineFigureGenerator("Unlocked",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var ge=new go.PathFigure(.2*ne,.5*te,!1);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*te,.25*ne,0,.75*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.35*te)),ue}),go.Shape.defineFigureGenerator("Gear",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(.9375*ne,.56246875*te,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*ne,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.80621875*ne,.4375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.763*ne,.3316875*te,.79840625*ne,.39915625*te,.7834375*ne,.3635*te)).add(new go.PathSegment(go.PathSegment.Line,.8566875*ne,.23796875*te)).add(new go.PathSegment(go.PathSegment.Line,.76825*ne,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.67596875*ne,.24184375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*ne,.19378125*te,.64228125*ne,.2188125*te,.603875*ne,.2021875*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*ne,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*ne,.19378125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*ne,.239375*te,.39759375*ne,.20190625*te,.36053125*ne,.2176875*te)).add(new go.PathSegment(go.PathSegment.Line,.2379375*ne,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.14953125*ne,.2379375*te)).add(new go.PathSegment(go.PathSegment.Line,.23934375*ne,.3278125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*ne,.4375*te,.21765625*ne,.36059375*te,.201875*ne,.397625*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*ne,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*ne,.5625*te)).add(new go.PathSegment(go.PathSegment.Line,.1938125*ne,.5625*te)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*ne,.67596875*te,.20221875*ne,.603875*te,.21884375*ne,.64228125*te)).add(new go.PathSegment(go.PathSegment.Line,.1495625*ne,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.238*ne,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.3316875*ne,.76296875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*ne,.80621875*te,.36353125*ne,.78340625*te,.3991875*ne,.79840625*te)).add(new go.PathSegment(go.PathSegment.Line,.43753125*ne,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.80621875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*ne,.760625*te,.602375*ne,.79809375*te,.63946875*ne,.78234375*te)).add(new go.PathSegment(go.PathSegment.Line,.76828125*ne,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.85671875*ne,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.76065625*ne,.67221875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*ne,.56246875*te,.78234375*ne,.63940625*te,.798125*ne,.602375*te)).add(new go.PathSegment(go.PathSegment.Line,.9375*ne,.56246875*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ne,.6*te)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*ne,.5*te,.1*ne,.1*te).close()))}),go.Shape.defineFigureGenerator("Hand",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,.3*te,0,.375*te,.05*ne,.325*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*ne,.075*te,.3*ne,.225*te,.4*ne,.175*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*ne,.075*te,.46*ne,.05*te,.525*ne,.05*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.4*te,.525*ne,.275*te,.475*ne,.325*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.55*te,ne,.4*te,ne,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.55*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*ne,.7*te,.675*ne,.55*te,.675*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,.85*te,.65*ne,.7*te,.65*ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*ne,te,.61*ne,.85*te,.61*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,.435*ne,te,0,te).close()),ue}),go.Shape.defineFigureGenerator("Map",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.2*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Move,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.8*te)),ue}),go.Shape.defineFigureGenerator("Eject",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.7).close());var ge=new go.PathFigure(0,te*.6,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close()),ue}),go.Shape.defineFigureGenerator("Pencil",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*te).close()))}),go.Shape.defineFigureGenerator("Building",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*1,te*1,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,te*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,te*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,te*.3)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te*.3)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,te*.85)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te*.85).close());var ge=new go.PathFigure(.126*ne,.85*te,!1);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.126*ne,.45*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.45*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.85*te).close());var me=new go.PathFigure(.402*ne,.85*te,!1);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,.402*ne,.45*te)),me.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.45*te)),me.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.85*te).close());var xe=new go.PathFigure(.678*ne,.85*te,!1);ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,.678*ne,.45*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.45*te)),xe.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.85*te).close());var Pe=new go.PathFigure(.5*ne,.1*te,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ne,.3*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ne,.3*te).close()),ue}),go.Shape.defineFigureGenerator("Staircase",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te*1,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,te*.8)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.8)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.6)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.6)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.4)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*.4)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*.2)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.2)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.15)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.15)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.95).close()),ue}),go.Shape.defineFigureGenerator("5Bars",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te*1,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.184,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.184,te*(1-.184)).close());var ge=new go.PathFigure(ne*.204,te,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.204,te*(1-.184))),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.388,te*(1-.184*2))),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.388,te*1).close());var me=new go.PathFigure(ne*.408,te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne*.408,te*(1-.184*2))),me.add(new go.PathSegment(go.PathSegment.Line,ne*.592,te*(1-.184*3))),me.add(new go.PathSegment(go.PathSegment.Line,ne*.592,te*1).close());var xe=new go.PathFigure(ne*.612,te,!0);ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.612,te*(1-.184*3))),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.796,te*(1-.184*4))),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.796,te*1).close());var Pe=new go.PathFigure(ne*.816,te,!0);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.816,te*(1-.184*4))),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-.184*5))),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1).close()),ue}),go.Shape.defineFigureGenerator("PC",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,0).close());var ge=new go.PathFigure(ne*.055,.07*te,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.07)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.1).close());var me=new go.PathFigure(ne*.055,.13*te,!0);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.13)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.16)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.16).close());var xe=new go.PathFigure(ne*.055,.18*te,!0);ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.18)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.21)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.21).close());var Pe=new go.PathFigure(ne*1,0,!0);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.4,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.65)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.65).close()),ue}),go.Shape.defineFigureGenerator("Plane",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.55*ne,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.475*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*ne,.525*te,0,.4*te,.225*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.475*te)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.35*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.325*te)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.325*te)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.2*te,.975*ne,0,ne,.08*te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Line,.55*ne,te).close()),ue}),go.Shape.defineFigureGenerator("Key",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*1,te*.5,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.9,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.35*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,.35*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,.65*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.65*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,.575*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.9,.6*te).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*ne,.425*te)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*ne,.5*te,.075*ne,.075*te).close()),ue}),go.Shape.defineFigureGenerator("FilmTape",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,ne*0,ne*.3,ne*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.08,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.08,te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*1),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*1),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*2),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*2),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*3),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*3),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*4),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*4),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*5),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*5),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*6),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*6),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*7),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*7),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*8),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*8),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*9),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*9),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*10),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*10),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*11),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*11),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*12),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*12),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*13),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*13),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*14),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*14),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*15),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*15),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1));var ge=new go.PathFigure(0,0,!1);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*0)),ge.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*1,ne*.3,ne*.055)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1));var me=new go.PathFigure(ne*.11,te*.1,!1);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),te*.1)),me.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),te*.8)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.11,te*.8).close());var xe=new go.PathFigure(ne*(.11+.24133333*1+.028*1),te*.1,!1);ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),te*.1)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),te*.8)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*1),te*.8).close());var Pe=new go.PathFigure(ne*(.11+.24133333*2+.028*2),te*.1,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),te*.1)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),te*.8)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*2),te*.8).close()),ue}),go.Shape.defineFigureGenerator("FloppyDisk",function(Te,ne,te){var ue=new go.Geometry,se=8,ge=se*Je,me=new go.PathFigure(se,0,!1);ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne*.86,0)),me.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.14)),me.add(new go.PathSegment(go.PathSegment.Line,ne,te-se)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,te,ne,te-ge,ne-ge,te)),me.add(new go.PathSegment(go.PathSegment.Line,se,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,ge,te,0,te-ge)),me.add(new go.PathSegment(go.PathSegment.Line,0,se)),me.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,ge,ge,0).close());var xe=new go.PathFigure(ne*.83,0,!1);ue.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.83,te*.3)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*.3)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*0).close());var Pe=new go.PathFigure(ne*.83,te*1,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.83,te*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*1).close());var Ke=new go.PathFigure(ne*.78,te*.05,!1);return ue.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.05)),Ke.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.25)),Ke.add(new go.PathSegment(go.PathSegment.Line,ne*.78,te*.25).close()),ue}),go.Shape.defineFigureGenerator("SpeechBubble",function(Te,ne,te){var ue=Te?Te.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=15),ue=Math.min(ue,ne/3),ue=Math.min(ue,te/3);var se=ue*Je,ge=te*.8,me=new go.Geometry,xe=new go.PathFigure(ue,0,!0);return me.add(xe),xe.add(new go.PathSegment(go.PathSegment.Line,ne-ue,0)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ne,ue,ne-se,0,ne,se)),xe.add(new go.PathSegment(go.PathSegment.Line,ne,ge-ue)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,ge,ne,ge-se,ne-se,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te)),xe.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ge)),xe.add(new go.PathSegment(go.PathSegment.Line,ue,ge)),xe.add(new go.PathSegment(go.PathSegment.Bezier,0,ge-ue,se,ge,0,ge-se)),xe.add(new go.PathSegment(go.PathSegment.Line,0,ue)),xe.add(new go.PathSegment(go.PathSegment.Bezier,ue,0,0,se,se,0).close()),se>1?(me.spot1=new go.Spot(0,0,se,se),me.spot2=new go.Spot(1,.8,-se,-se)):(me.spot1=go.Spot.TopLeft,me.spot2=new go.Spot(1,.8)),me}),go.Shape.defineFigureGenerator("Repeat",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*.45,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,te*.45).close());var ge=new go.PathFigure(ne*1,te*.55,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*1)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.55)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*.55)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*.55).close()),ue}),go.Shape.defineFigureGenerator("Windows",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()).add(new go.PathSegment(go.PathSegment.Move,.4*ne,.4*te)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,.8*te)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te).close()).add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*te)).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.1*te).close()).add(new go.PathSegment(go.PathSegment.Move,.1*ne,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.1*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*.1,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*.9).close());var ge=new go.PathFigure(ne*.1,te*.2,!0);ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.25)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.22,te*.285)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.32)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.37)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.275,te*.32)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.275,te*.25).close());var me=new go.PathFigure(ne*.28,te*.37,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.37)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.41)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.28,te*.41).close()),ue}),go.Shape.defineFigureGenerator("Beaker",function(Te,ne,te){var ue=new go.Geometry,se=15,ge=se*Je,me=new go.PathFigure(ne*.62,te*.475,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne,te-se)),me.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,te,ne,te-ge,ne-ge,te)),me.add(new go.PathSegment(go.PathSegment.Line,se,te)),me.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,ge,te,0,te-ge)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.38,te*.475)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.38,te*.03)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*0)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*0)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.62,te*.03).close()),ge>1?(ue.spot1=new go.Spot(0,0,ge,ge),ue.spot2=new go.Spot(1,1,-ge,-ge)):(ue.spot1=go.Spot.TopLeft,ue.spot2=go.Spot.BottomRight),ue}),go.Shape.defineFigureGenerator("Download",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ue.add(se);var ge=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*(1-ge)).close());var me=new go.PathFigure(ne*.4,te*0,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.44)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.26,te*.44)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.66)),me.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.26),te*.44)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.44)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*0).close()),ue}),go.Shape.defineFigureGenerator("Bin",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ue.add(se);var ge=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*(1-ge)).close()),ue}),go.Shape.defineFigureGenerator("Upload",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ue.add(se);var ge=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*(1-ge)).close());var me=new go.PathFigure(ne*.5,te*0,!0);return ue.add(me),me.add(new go.PathSegment(go.PathSegment.Line,ne*.26,te*.25)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.25)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.63)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.63)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.25)),me.add(new go.PathSegment(go.PathSegment.Line,ne*.74,te*.25).close()),ue}),go.Shape.defineFigureGenerator("EmptyDrink",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*.15,te*0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*1).close()),ue}),go.Shape.defineFigureGenerator("Drink",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*.15,te*0,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*1).close());var ge=new go.PathFigure(ne*.235,te*.28,!0);return ue.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.765,te*.28)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.655,te*.97)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.345,te*.97).close()),ue}),go.Shape.defineFigureGenerator("4Arrows",function(Te,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*.5,te*0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,te*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.5)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.65)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*.65)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*.5)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*.25).close()),ue}),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")},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Dn={},ei="5.0",be={},ve=null,ot=!1,wt=!1,Qt=null,Nt=!1,Re=null,Je=null,pt=0;pt4?parseFloat(Zt):5};Dn.setHTML5Codebase=function(Zt,ci){Je=Zt,Ne(Zt,ci)},Dn.setJavaCodebase=Dn.setJavaCodebaseVersion=Dn.isCompiledInstalled=Dn.setPreCompiledScriptPath=Dn.setPreCompiledResourcePath=function(){},Dn.setHTML5CodebaseVersion=function(Zt,ci){var On=parseFloat(Zt);if(On!==NaN&&On<5){console.log("The GeoGebra HTML5 codebase version "+On+" is deprecated. Using version latest instead.");return}Re=Zt,Ge(Zt,ci)},Dn.getHTML5CodebaseVersion=function(){return Te},Dn.getParameters=function(){return be},Dn.setFontsCSSURL=function(Zt){me=Zt},Dn.setGiacJSURL=function(Zt){},Dn.setJNLPFile=function(Zt){yt=Zt},Dn.setJNLPBaseDir=function(Zt){},Dn.inject=function(){function Zt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var ci="auto",On=be.id,Mi,Xt=!1,At=0;At=5)return!0;var Zt=Dn.getAppletObject();return Zt&&typeof Zt.recalculateEnvironments=="function"?(Zt.recalculateEnvironments(),!0):!1},Dn.startAnimation=function(){var Zt=Dn.getAppletObject();return Zt&&typeof Zt.startAnimation=="function"?(Zt.startAnimation(),!0):!1},Dn.stopAnimation=function(){var Zt=Dn.getAppletObject();return Zt&&typeof Zt.stopAnimation=="function"?(Zt.stopAnimation(),!0):!1},Dn.getAppletObject=function(){var Zt=be.id!==void 0?be.id:"ggbApplet";return window[Zt]},Dn.resize=function(){};var jt=function(Zt,ci,On){var Mi=document.createElement("param");Mi.setAttribute("name",ci),Mi.setAttribute("value",On),Zt.appendChild(Mi)},Mt=function(Zt){return Zt&&Zt!=="false"},bt=function(Zt,ci,On){Pe(Te)<=4.2&&(On=!0);var Mi=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Te||ggbHTML5LoadedCodebaseIsWebSimple&&!te)&&(Mi=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Xt=document.createElement("div");Xt.classList.add("appletParameters","notranslate");var At=ci.width,on=ci.height;if(ci.disableAutoScale=ci.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():ci.disableAutoScale,ci.width!==void 0)if(Pe(Te)<=4.4)Mt(ci.showToolBar)&&(ci.height-=7),Mt(ci.showAlgebraInput)&&(ci.height-=37),ci.width<605&&Mt(ci.showToolBar)&&(ci.width=605,At=605);else{var Si=100;(Mt(ci.showToolBar)||Mt(ci.showMenuBar))&&(ci.hasOwnProperty("customToolBar")&&(ci.customToolbar=ci.customToolBar),Si=Mt(ci.showMenuBar)?245:155),At=5?(ci.appletOnLoad=function(mn){var Fi=Zt.querySelector(".ggb_preview");Fi&&Fi.parentNode.removeChild(Fi),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ke),window.GGBT_wsf_view&&$(window).trigger("resize"),Xe(mn)},Me||ke.appendChild(He)):Xt.appendChild(He),ke.appendChild(Xt),Me||Zt.appendChild(ke),setTimeout(function(){Dn.resize()},1)}else{var et=document.createElement("div");et.className="applet_scaler",et.style.position="relative",et.style.display="block",et.appendChild(Xt),Zt.appendChild(et),ci.appletOnLoad=function(mn){Dn.resize(),Xe(mn)}}function Oe(mn,Fi){Fi&&typeof Fi.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(mn,Fi.appletOnLoad):renderGGBElement(mn),Rn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Fi)}function ut(mn,Fi){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:mn,params:Fi}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Vi){Oe(Vi.article,Vi.params)}),html5AppletsToProcess=null)},Pe(Te)<5&&(mn.className+=" geogebraweb")):Oe(mn,Fi)}if(Mi){scriptLoadStarted=!0;for(var Vn=0;Vn0?(Gt.remove(),ke.attr("id","fullscreencontent").show(),jQuery(Xe).append(ke),window.dispatchEvent(new Event("resize"))):bt(Gt,ci,!1),window.GGBT_wsf_view.launchFullScreen(Xe)}else We=Mi,bt(Zt,ci,!1);if(!window.GGBT_wsf_view)for(on=0;onZt/4*3&&(Gt=Zt/4*3),Xe=Gt/5.8,Si.setAttribute("src",se),Si.setAttribute("width",Gt),Si.setAttribute("height",Xe);var ke=(Zt-Gt)/2,Me=(ci-Xe)/2;Si.style.left=ke+"px",Si.style.top=Me+"px",Xt.appendChild(Si)}}return Xt.appendChild(on),Xt},Nn=function(Zt){return Zt=Zt.toLowerCase(),Zt==="html5"||Zt==="screenshot"?Zt:"html5"},lt=["web","webSimple","web3d","tablet","tablet3d","phone"],Ge=function(Zt,ci){if(Te=Zt,ci){Ne(Te,!0);return}var On=!ot;if(On){var Mi=Pe(Te);!isNaN(Mi)&&Mi<4.4&&(On=!1)}var Xt,At;window.location.protocol.substr(0,4)==="http"?Xt=window.location.protocol:Xt="http:";var on=Te.indexOf("//");on>0?At=Te:on===0?At=Xt+Te:At="https://www.geogebra.org/apps/5.2.814.0/";for(var Si in lt)if(Te.slice(lt[Si].length*-1)===lt[Si]||Te.slice((lt[Si].length+1)*-1)===lt[Si]+"/"){Ne(At,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&On&&!ve.is3D&&!ve.AV&&!ve.SV&&!ve.CV&&!ve.EV2&&!ve.CP&&!ve.PC&&!ve.DA&&!ve.FI&&!ve.PV&&!Mt(be.showToolBar)&&!Mt(be.showMenuBar)&&!Mt(be.showAlgebraInput)&&!Mt(be.enableRightClick)&&(!be.appName||be.appName=="classic")?At+="webSimple/":At+="web3d/",Ne(At,!1)},Ne=function(Zt,ci){if(Zt.requirejs){Vt=Zt;return}Zt.slice(-1)!=="/"&&(Zt+="/"),Vt=Zt,ci===null&&(ci=Zt.indexOf("http")===-1),ct=ci,ne="web.nocache.js",te=!1;var On=Vt.split("/");On.length>1&&(!ci&&On[On.length-2]==="webSimple"?(ne="webSimple.nocache.js",te=!0):lt.indexOf(On[On.length-2])>=0&&(ne=On[On.length-2]+".nocache.js")),On=Zt.split("/"),Te=On[On.length-3],Te.substr(0,4)==="test"?Te=Te.substr(4,1)+"."+Te.substr(5,1):(Te.substr(0,3)==="war"||Te.substr(0,4)==="beta")&&(Te="5.0");var Mi=parseFloat(Te);Mi!==NaN&&Mi<5&&Zt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Mi+" is deprecated. Using version latest instead."),Ge("5.0",ci))},Rn=function(Zt,ci){window.console&&window.console.log&&(!ci||typeof ci.showLogging=="undefined"||ci.showLogging&&ci.showLogging!=="false")&&console.log(Zt)};be.material_id!==void 0?ft(ai):ai();function ai(){var Zt=ei;Re!==null?Zt=Re:parseFloat(Zt)<5&&(Zt="5.0"),Ge(Zt,!1),Je!==null&&Ne(Je,ct),Nt=!0}return Dn},GGBAppletUtils=function(){"use strict";function Dn(){return window.GGBT_wsf_edit!==void 0}function ei(Nt,Re){Re!=1?(Nt.style.transformOrigin="0% 0% 0px",Nt.style.webkitTransformOrigin="0% 0% 0px",Nt.style.transform="scale("+Re+","+Re+")",Nt.style.webkitTransform="scale("+Re+","+Re+")",Nt.style.maxWidth="initial",Nt.querySelector(".ggb_preview")!==null&&(Nt.querySelector(".ggb_preview").style.maxWidth="initial"),Nt.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Nt.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Nt.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Nt.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Nt.style.transform="none",Nt.style.webkitTransform="none")}function be(Nt,Re,Je,pt,mt,yt){var Vt=null;if(yt!=null&&yt!="")for(var ct=Nt.parentNode;ct!=null;)if((" "+ct.className+" ").indexOf(" "+yt+" ")>-1){Vt=ct;break}else ct=ct.parentNode;var We=0,Te=0,ne=0,te=0,ue=0,se=0,ge=0;if(Vt)We=Vt.offsetWidth,Te=Math.max(pt?Vt.offsetWidth:0,Vt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(We=Math.min(window.innerWidth,document.documentElement.clientWidth),Te=Math.min(window.innerHeight,document.documentElement.clientHeight),ne=We):(We=window.innerWidth,Te=window.innerHeight,ne=window.innerWidth),Nt){var me=Nt.getBoundingClientRect();me.left>0&&me.left<=We&&(mt===void 0||!mt)&&(document.dir==="rtl"?(ue=We-me.width-me.left,se=ne<=480?10:30):(se=me.left,ue=ne<=480?10:30),te=se+ue)}if(Nt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xe=Nt.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(te=40,ge=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(te=0,ge=40)}}return Nt&&((Je===void 0||!Je)&&Re>0&&Re+te1&&(yt=!0)),Re&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(yt=!0),!(Nt.hasOwnProperty("disableAutoScale")&&Nt.disableAutoScale))mt=ve(Nt,Re,yt,Je,Nt.scaleContainerClass);else return pt;return yt&&(!Nt.hasOwnProperty("scale")||pt===1)?mt:Math.min(pt,mt)}function wt(Nt){var Re=Math.min(window.innerWidth,document.documentElement.clientWidth),Je=Math.min(window.innerHeight,document.documentElement.clientHeight),pt=Nt.getBoundingClientRect(),mt=(Re-pt.width)/2,yt=(Je-pt.height)/2;yt<0&&(yt=0),Nt.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(mt<40?Nt.style.left="40px":Nt.style.left=mt+"px",Nt.style.top=yt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(yt<40?Nt.style.top="40px":Nt.style.top=yt+"px",Nt.style.left=mt+"px")}function Qt(Nt,Re){var Je=Nt.querySelector(".appletParameters");if(Je){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Re.id!==Je.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Nt)}if(Je.parentElement&&/fullscreen/.test(Je.parentElement.className))return;var pt=ot(Re,Nt);Dn()&&Je.setAttribute("data-param-scale",pt);for(var mt=null,yt=0;yt=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(Dn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Dn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Dn){var ei=c[Dn];return ei==null?null:ei},r=d,webModule.__errFn=e}function B(){function Dn(Nt){var Re=Nt.lastIndexOf(rb);Re==-1&&(Re=Nt.length);var Je=Nt.indexOf(sb);Je==-1&&(Je=Nt.length);var pt=Nt.lastIndexOf(tb,Math.min(Je,Re));return pt>=O?Nt.substring(O,pt+P):W}function ei(Nt){if(!Nt.match(/^\w+:\/\//)){var Re=o.createElement(ub);Re.src=Nt+vb,Nt=Dn(Re.src)}return Nt}function be(){var Nt=__gwt_getMetaProperty(wb);return Nt!=null?Nt:W}function ve(){for(var Nt=o.getElementsByTagName(_),Re=O;ReO?Nt[Nt.length-P].href:W}function wt(){var Nt=o.location;return Nt.href==Nt.protocol+zb+Nt.host+Nt.pathname+Nt.search+Nt.hash}var Qt=be();return Qt==W&&(Qt=ve()),Qt==W&&(Qt=ot()),Qt==W&&wt()&&(Qt=Dn(o.location.href)),Qt=ei(Qt),Qt}function C(Dn){return Dn.match(/^\//)||Dn.match(/^[a-zA-Z]+:\/\//)?Dn:webModule.__moduleBase+Dn}function D(){var Dn=[],ei=O,be=[],ve=[];function ot(Nt){var Re=ve[Nt](),Je=be[Nt];if(Re in Je)return Re;var pt=[];for(var mt in Je)pt[Je[mt]]=mt;throw r&&r(Nt,pt,Re),null}if(__gwt_isKnownPropertyValue=function(Nt,Re){return Re in be[Nt]},webModule.__getPropMap=function(){var Nt={};for(var Re in be)be.hasOwnProperty(Re)&&(Nt[Re]=ot(Re));return Nt},webModule.__computePropValue=ot,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var wt;try{wt=Cb;var Qt=wt.indexOf(Db);Qt!=-1&&(ei=parseInt(wt.substring(Qt+P),$),wt=wt.substring(O,Qt))}catch(Nt){}return webModule.__softPermutationId=ei,C(wt+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(Dn,ei,be){"use strict";be.d(ei,{Ax:function(){return Qt},Ds:function(){return Nt},KI:function(){return Je},SI:function(){return wt},f1:function(){return ot}});var ve=be(11320);function ot(pt){let mt=!0;if(pt.length>0){for(let yt=0;ytnew Promise((ne,te)=>{var ue=me=>{try{ge(Te.next(me))}catch(xe){te(xe)}},se=me=>{try{ge(Te.throw(me))}catch(xe){te(xe)}},ge=me=>me.done?ne(me.value):Promise.resolve(me.value).then(ue,se);ge((Te=Te.apply(ct,We)).next())}),Vt=({data:ct,className:We,fullWidth:Te,style:ne={},onClose:te,onOk:ue,showFullTools:se,noAssociationId:ge})=>{const me=(0,ve.useRef)(null),xe=(0,ve.useRef)(null),Pe=(0,ve.useRef)(null),Ke=(0,ve.useRef)(null),[nt,ft]=(0,ve.useState)(!1),[qe,at]=(0,ve.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ve.useEffect)(()=>(Pe.current||(Pe.current=document.createElement("style"),document.head.appendChild(Pe.current)),ct!=null&&ct.visible?(document.body.setAttribute("data-custom","y-hidden"),Pe.current.innerHTML=" html { overflow-y: hidden; }",ct!=null&&ct.src&&jt()):(document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)),()=>{document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)}),[ct==null?void 0:ct.visible]);const jt=()=>mt(void 0,null,function*(){ft(!0),at("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ht=yield(0,pt.ZJ)(ct==null?void 0:ct.src);me.current.src="",me.current.src=Ht,me.current.onload=function(){Bt()},ft(!1),at("")}),Mt=Ht=>mt(void 0,null,function*(){ft(!0),at("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Jn=yield(0,Je.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ct.title,file:Ht.dataUrl}});Jn!=null&&Jn.id&&!ge?(yield(0,Je.ZP)(`/api/attachments/${ct.id}/add_subitem.json`,{method:"post",body:{subitem_id:Jn==null?void 0:Jn.id,settings:JSON.stringify(Ht.state)}})).status===0&&ue():Jn!=null&&Jn.id&&ue(Jn),ft(!1),at("")}),bt=()=>{const Ht=document.querySelector('a[href="https://markerjs.com/"]');Ht&&Ht.parentNode&&(Ht.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(qn=>{const sn=document.querySelector(qn.name);sn&&sn.setAttribute("title",qn.title)})},Bt=()=>{xe.current=new Re.hP(me.current),xe.current.targetRoot=Ke.current,xe.current.addEventListener("render",Mt),xe.current.addEventListener("beforeclose",te),se&&(xe.current.availableMarkerTypes=xe.current.ALL_MARKER_TYPES,xe.current.uiStyleSettings.redoButtonVisible=!0,xe.current.uiStyleSettings.notesButtonVisible=!0,xe.current.uiStyleSettings.zoomButtonVisible=!0,xe.current.uiStyleSettings.zoomOutButtonVisible=!0,xe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=xe.current.uiStyleSettings,xe.current.show(),ct!=null&&ct.snapshotData&&xe.current.restoreState(ct.snapshotData),setTimeout(()=>{window.scrollTo(0,0),bt()},300)};return ve.createElement(ve.Fragment,null,(ct==null?void 0:ct.visible)&&ve.createElement(Nt.Z,{spinning:nt,tip:qe,style:{position:"absolute",width:"100vw"}},ve.createElement("div",{ref:Ke,className:Qt()(ot.imageDimensions,We,Te?ot.fullWidth:""),style:ne},ve.createElement("img",{className:ot.img,ref:me}))))}},36527:function(Dn,ei,be){"use strict";var ve=be(67294),ot=be(71230),wt=be(15746),Qt=be(55238),Nt=be(85804),Re=be(65226),Je=be(71736),pt=be(84279),mt=be(67294);const yt=(0,ve.forwardRef)(({callback:Vt,showSaveButton:ct,value:We=""},Te)=>{const ne=(0,ve.useRef)(),te=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],ue=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r x=a + r\\text{cos}\\theta \\ \r y=b + r\\text{sin}\\theta \r \\end{matrix}\\right. `},{value:`\\begin{array}{l} \r \\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r \\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\left\\{\\begin{matrix} \r \\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r \\end{matrix}\\right. \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r \\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r a \\perp \\alpha \\ \r b \\perp \\alpha \r \\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r \\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r a \\parallel \\partial ,b \\parallel \\partial \r \\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r a \\perp m,a \\perp n \r \\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r \\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r a^{2}+b^{2}=c^{2} \r \\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r \\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r \\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r a,b \\in R^{+} \\ \r \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r a,b \\in R \\ \r \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r \\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r \\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r \\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r \\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r P \\left( \\emptyset \\right) =0 \\\\ \r P \\left( S \\right) =1 \r \\end{array}`},{value:`\\begin{array}{c} \r \\forall A \\in S \\\\ \r P \\left( A \\right) \\ge 0 \r \\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r \\end{array}`},{value:`\\begin{array}{c} \r P_{n}=n! \\\\ \r A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r \\end{array}`}]}]}],se=xe=>{ne.current.setValue(ne.current.getValue()+" "+xe.value+" ")},ge=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:mt.createElement(ot.Z,{className:Je.Z.lists,gutter:[10,10]},te.map((xe,Pe)=>mt.createElement(wt.Z,{flex:"110px",className:Je.Z.item},mt.createElement("div",null,mt.createElement(Re.Z,{value:`$$${xe.value}$$`}),xe.name),mt.createElement("div",{className:Je.Z.children},xe.children.map((Ke,nt)=>mt.createElement("div",{key:nt},mt.createElement("h1",null,Ke.name),mt.createElement(ot.Z,{gutter:[10,10]},Ke.data.map((ft,qe)=>mt.createElement(wt.Z,{key:qe,onClick:()=>se(ft),className:Je.Z.diamond},mt.createElement(Re.Z,{value:"`$$"+ft.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:mt.createElement(ot.Z,{className:Je.Z.lists,gutter:[10,10]},ue.map((xe,Pe)=>mt.createElement(wt.Z,{flex:"110px",className:Je.Z.item},mt.createElement("div",null,mt.createElement(Re.Z,{value:"`$$"+xe.value+"$$`"}),xe.name),mt.createElement("div",{className:Je.Z.children},xe.children.map((Ke,nt)=>mt.createElement("div",{key:nt},Ke.name&&mt.createElement("h1",null,Ke.name),mt.createElement(ot.Z,{gutter:[10,10]},Ke.data.map((ft,qe)=>mt.createElement(wt.Z,{key:qe,onClick:()=>se(ft),className:Je.Z.diamond},mt.createElement(Re.Z,{value:"`$$"+ft.value+"$$`"}))))))))))}],me=()=>{var xe=document.createElement("div");xe.innerHTML=ne.current.getValue();var Pe=xe.innerText;return Vt&&Vt(Pe),Pe};return(0,ve.useImperativeHandle)(Te,()=>({getData:me})),mt.createElement("div",{className:Je.Z.mathWrap},mt.createElement(Qt.default,{defaultActiveKey:"1",items:ge}),mt.createElement("math-field",{locale:"zh_cn",className:Je.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ne,style:{width:800,marginTop:30,fontSize:18}},We||""),ct&&mt.createElement("div",{className:Je.Z.button},mt.createElement(Nt.ZP,{size:"large",onClick:me,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});ei.Z=yt},26194:function(Dn,ei,be){"use strict";var ve=be(67294),ot=be(4977),wt=be(85804),Qt=Object.defineProperty,Nt=Object.defineProperties,Re=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,yt=(Te,ne,te)=>ne in Te?Qt(Te,ne,{enumerable:!0,configurable:!0,writable:!0,value:te}):Te[ne]=te,Vt=(Te,ne)=>{for(var te in ne||(ne={}))pt.call(ne,te)&&yt(Te,te,ne[te]);if(Je)for(var te of Je(ne))mt.call(ne,te)&&yt(Te,te,ne[te]);return Te},ct=(Te,ne)=>Nt(Te,Re(ne));const We=({img:Te,buttonProps:ne={},styles:te={},customText:ue,ButtonText:se,ButtonClick:ge,Buttonclass:me,ButtonTwo:xe,imgStyles:Pe,loading:Ke=!1,className:nt=""})=>ve.createElement("section",{className:`tc animated fadeIn ${nt}`,style:Vt({color:"#999",margin:"100px auto",visibility:Ke?"hidden":"visible"},te)},ve.createElement("img",{src:Te||ot,style:ct(Vt({},Pe),{pointerEvents:"none",userSelect:"none"})}),ve.createElement("p",{className:"mt20 font14"},ue||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&ve.createElement(wt.ZP,Vt({className:me,onClick:ge},ne),se),xe&&xe);ei.Z=We},39717:function(Dn,ei,be){"use strict";be.d(ei,{Q:function(){return Re}});var ve=be(67294),ot=be(88044),wt=be(98813),Qt=be(37720),Nt=be(67294),Re=(pt=>(pt[pt.Number=1]="Number",pt[pt.Percent=2]="Percent",pt))(Re||{});const Je=({value:pt,onChange:mt,disabled:yt,hidePercentOption:Vt=!1,percentType:ct="select"})=>{const We=(0,ve.useMemo)(()=>Vt?1:2,[Vt]),[Te,ne]=(0,ve.useState)(We);console.log(Te);const te=se=>pt.type===1?`${se}\u5206`:`${se}%`,ue=(0,ve.useCallback)(se=>{if(Te===1){const ge=se.replace("\u5206","");return isNaN(parseInt(ge,10))?0:ge}else return se.replace("%","")},[Te]);return(0,ve.useEffect)(()=>{ne(pt.type)},[pt]),Nt.createElement("div",{style:{display:"flex",alignItems:"center"}},ct=="select"&&Nt.createElement(ot.default,{size:"large",onChange:se=>{ne(se),mt({type:se,inputValue:se===1?5:20})},value:Te||We,style:{width:100},options:Vt?[{label:"\u5206\u503C",value:1}]:[{label:"\u767E\u5206\u6BD4",value:2},{label:"\u5206\u503C",value:1}],disabled:yt}),ct=="radio"&&Nt.createElement(wt.ZP.Group,{size:"large",onChange:se=>{const ge=se.target.value;ne(ge),mt({type:ge,inputValue:ge===1?5:20})},value:Te||We,disabled:yt},!Vt&&Nt.createElement(wt.ZP,{value:2,style:{marginRight:"50px"}},"\u767E\u5206\u6BD4\u6263\u5206"),Nt.createElement(wt.ZP,{value:1},"\u56FA\u5B9A\u5206\u503C")),ct=="radio"&&Nt.createElement("div",{style:{marginRight:"10px",color:"#000000"}},pt.type==2?"\u6263\u9664\u8865\u4EA4\u9636\u6BB5\u5F97\u5206\u7684":"\u6263\u9664\u603B\u6210\u7EE9\u7684"),Nt.createElement(Qt.Z,{size:"large",disabled:yt,value:pt.inputValue,style:{width:"120px"},parser:ue,addonAfter:pt.type===1?"\u5206":"%",max:Te===2?100:Number.MAX_SAFE_INTEGER,min:0,precision:0,onChange:se=>{mt({type:Te,inputValue:se})}}),ct=="radio"&&pt.type==2&&Nt.createElement("div",{style:{marginLeft:"10px",color:"#000000"}},"\u5206\u6570"))};ei.Z=Je},20819:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return me}});var ve=be(67294),ot={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},wt=be(85804),Qt=be(30153),Nt=be(36295),Re=be(83062),Je=be(28706),pt=be(15835),mt=be(26194),yt=be(11320),Vt=be(66540),ct=be(67294),We=Object.defineProperty,Te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ue=(xe,Pe,Ke)=>Pe in xe?We(xe,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):xe[Pe]=Ke,se=(xe,Pe)=>{for(var Ke in Pe||(Pe={}))ne.call(Pe,Ke)&&ue(xe,Ke,Pe[Ke]);if(Te)for(var Ke of Te(Pe))te.call(Pe,Ke)&&ue(xe,Ke,Pe[Ke]);return xe},ge=(xe,Pe,Ke)=>new Promise((nt,ft)=>{var qe=Mt=>{try{jt(Ke.next(Mt))}catch(bt){ft(bt)}},at=Mt=>{try{jt(Ke.throw(Mt))}catch(bt){ft(bt)}},jt=Mt=>Mt.done?nt(Mt.value):Promise.resolve(Mt.value).then(qe,at);jt((Ke=Ke.apply(xe,Pe)).next())}),me=({editOffice:xe="view",data:Pe,issaver:Ke,onSaver:nt,theme:ft,type:qe,filename:at,monacoEditor:jt,className:Mt,style:bt,close:Bt,onClose:Ht,hasMask:Jn,disabledDownload:qn,onImgDimensions:sn,showNodata:Nn,recordInfo:lt})=>{const[Ge,Ne]=(0,ve.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Rn,ai]=(0,ve.useState)(""),[Zt,ci]=(0,ve.useState)(),On=window.ENV==="build"?"/react/build":"",Mi=location.host.startsWith("localhost")?yt.Z.PROXY_SERVER:yt.Z.API_SERVER,At=10*(1024*1024),on=(0,ve.useRef)();Pe!=null&&Pe.startsWith("/api")&&qe!=="txt"&&(Pe=yt.Z.API_SERVER+Pe);const Si=He=>He.substring(He.lastIndexOf("/")+1).split(".").pop();at&&jt&&(jt.filename=at),(0,ve.useEffect)(()=>{var He,et;const Oe=(et=(He=document.cookie)==null?void 0:He.replace(/\s/g,""))==null?void 0:et.split(";");Oe==null||Oe.map(ut=>{let Vn=ut.split("=");Vn[0]==="_educoder_session"&&ai(Vn[1])})},[]),(0,ve.useEffect)(()=>{qe==="office"&&(Pe.indexOf("bigfilescdn.")>-1||Pe.indexOf("bigfiles1")>-1?ci({url:Pe,fileType:Si(Pe),model:Pe.indexOf("model=edit")?"edit":"view"}):Xe())},[qe,Pe]);function Gt(He){return ge(this,null,function*(){He.data.type==="pdfdata"&&(nt(He.data.data),window.removeEventListener("message",Gt,!1)),console.log("mess---:",He.data)})}const Xe=()=>ge(void 0,null,function*(){console.log("data:",Pe);let He=Pe;Pe.startsWith("http")||(He=location.origin+He);let et=new URL(He).pathname.split("/").pop();const Oe=yield(0,pt.gJ)({attachment_id:et});Oe.url=Mi+Oe.url,ci(Oe)}),ke=()=>{if(Pe.startsWith("http")||Pe.startsWith("blob:")){Me();return}(0,Je.Sv)(at||"educoder",Pe,at)},Me=()=>{lt&&(0,Vt.fc)({id:lt==null?void 0:lt.id,watch_type:1,course_id:lt==null?void 0:lt.course_id}),(0,Je.Nd)(at||"educoder",decodeURIComponent(Pe))};return ct.createElement("div",{style:se({},bt||{}),className:`${Jn&&ot.bgBlack} ${qe?ot.wrp:"hide"}`},Bt&&ct.createElement("div",{className:ot.close,ref:on},!!sn&&ct.createElement(Re.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>on.current},ct.createElement("span",{onClick:()=>{Ht(),sn()}},ct.createElement("i",{className:"icon-yulanpizhu"}))),!qn&&ct.createElement(Re.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>on.current},ct.createElement("span",{onClick:Me},ct.createElement("i",{className:"icon-quxiaozhiding"}))),Ke&&ct.createElement(Re.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>on.current},ct.createElement("span",{className:"",onClick:()=>{const He=document.getElementById("pdfiframe");window.addEventListener("message",Gt,!1),setTimeout(()=>{He.contentWindow.postMessage("getData","*")},300)}},ct.createElement("i",{className:"icon-baocun"}))),ct.createElement(Re.Z,{title:"\u5173\u95ED",getPopupContainer:()=>on.current},ct.createElement("span",{className:"",onClick:()=>{Ht()}},ct.createElement("i",{className:"icon-guanbi1"})))),ct.createElement("div",{className:`${ot[Mt]} ${Mt} ${ot.monaco} ${qe==="txt"?"show":"hide"}`},qe==="txt"&&ct.createElement(ct.Fragment,null,ct.createElement(Nt.ZP,se({},jt)))),qe==="audio"&&ct.createElement("audio",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Pe}`,autoPlay:!0}),qe==="video"&&ct.createElement(ct.Fragment,null,(Pe==null?void 0:Pe.indexOf("http"))>-1?ct.createElement("video",{controls:!0,src:`${Pe}`,autoPlay:!0}):ct.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Pe}`,autoPlay:!0})),qe==="office"&&Zt&&ct.createElement("iframe",{src:`${On}/office.html?key=${Zt.key}&url=${btoa(Zt.url)}&callbackUrl=${Mi+(Zt.callbackUrl||"")}&fileType=${Zt.fileType}&title=${Zt.title||""}&model=${xe}&officeServer=${yt.Z.ONLYOFFICE}&disabledDownload=${!!qn}`}),qe==="html"&&ct.createElement("iframe",{src:Pe+"&disposition=inline"}),qe==="pdf"&&ct.createElement("iframe",{id:"pdfiframe",src:`${On}/js/pdfview/index.html?filename=${at||"educoder.pdf"}&url=${encodeURIComponent(Pe)}&disabledDownload=${!!qn}&model=${xe}`}),qe==="image"&&ct.createElement("img",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Pe}`}),(qe==="other"||qe==="download")&&ct.createElement(ct.Fragment,null,Nn?ct.createElement(mt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ct.createElement(wt.ZP,{icon:ct.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ke,disabled:qn},"\u4E0B\u8F7D")}):ct.createElement(wt.ZP,{type:"primary",size:"middle",onClick:ke,disabled:qn},ct.createElement(Qt.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},65226:function(Dn,ei,be){"use strict";be.d(ei,{z:function(){return qe},Z:function(){return at}});var ve=be(67294),ot=be(81897),wt=be(51161),Qt=be(11771),Nt=be(67631),Re=be.n(Nt),Je=be(11320),pt=be(28706),mt=be(20527),yt=be(25934),Vt=be(20819),ct=be(67294),Te=({html:jt})=>{const Mt=(0,ve.useRef)(null),bt=(0,ve.useRef)(null),Bt=`.markdown-body p { margin: 0 0 16px 0 !important; line-height: 28px; white-space: pre-wrap; } ol, ul, li { list-style-type: none } ol, ul, dl { margin-bottom: 0px; } .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #333; overflow: hidden; font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif; word-break: break-word; font-size: 16px; line-height: 1.6; white-space: normal; word-wrap: break-word; position: relative; } .markdown-body ul>li { list-style-type: disc; } .markdown-body ol>li { list-style-type: decimal; } .markdown-body a { background: transparent; } .markdown-body a:active, .markdown-body a:hover { outline: 0; } .markdown-body strong { font-weight: bold; } .markdown-body h1 { font-size: 2em; margin: 0.67em 0; } .markdown-body img { border: 0; } .markdown-body hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } .markdown-body pre { overflow: auto; } .markdown-body code, .markdown-body kbd, .markdown-body pre { font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; font-size: 1em; } .markdown-body input { color: inherit; font: inherit; margin: 0; } .markdown-body html input[disabled] { cursor: default; } .markdown-body input { line-height: normal; } .markdown-body input[type="checkbox"] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } .markdown-body table { border-collapse: collapse; border-spacing: 0; } .markdown-body td, .markdown-body th { padding: 0; } .markdown-body * { -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body input { font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; } .markdown-body a { color: #4183c4; text-decoration: none; } .markdown-body a:hover, .markdown-body a:active { text-decoration: underline; } .markdown-body hr { height: 0; margin: 15px 0; overflow: hidden; background: transparent; border: 0; border-bottom: 1px solid #ddd; } .markdown-body hr:before { display: table; content: ""; } .markdown-body hr:after { display: table; clear: both; content: ""; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin-top: 15px; margin-bottom: 15px; line-height: 1.1; } .markdown-body h1 { font-size: 30px; } .markdown-body h2 { font-size: 21px; } .markdown-body h3 { font-size: 16px; } .markdown-body h4 { font-size: 14px; } .markdown-body h5 { font-size: 12px; } .markdown-body h6 { font-size: 11px; } .markdown-body blockquote { margin: 0; } .markdown-body ul, .markdown-body ol { padding: 0; margin-top: 0; margin-bottom: 0; } ul.linenums, ol.linenums { padding: 16px 0 0 56px !important; } .markdown-body ul, .markdown-body ol { padding-left: 2em; } .markdown-body ol ol, .markdown-body ul ol { list-style-type: lower-roman; } .markdown-body ul ul ol, .markdown-body ul ol ol, .markdown-body ol ul ol, .markdown-body ol ol ol { list-style-type: lower-alpha; } .markdown-body dd { margin-left: 0; } .markdown-body code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-body .octicon { font: normal normal 16px octicons-anchor; line-height: 1; display: inline-block; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .markdown-body .octicon-link:before { content: '\f05c'; } .markdown-body>*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !important; } .markdown-body .anchor { position: absolute; top: 0; left: 0; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; } .markdown-body .anchor:focus { outline: none; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; margin-top: 1em; margin-bottom: 16px; font-weight: bold; line-height: 1.4; } .markdown-body h1 .octicon-link, .markdown-body h2 .octicon-link, .markdown-body h3 .octicon-link, .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { display: none; color: #000; vertical-align: middle; } .markdown-body h1:hover .anchor, .markdown-body h2:hover .anchor, .markdown-body h3:hover .anchor, .markdown-body h4:hover .anchor, .markdown-body h5:hover .anchor, .markdown-body h6:hover .anchor { padding-left: 8px; margin-left: -30px; text-decoration: none; } .markdown-body h1:hover .anchor .octicon-link, .markdown-body h2:hover .anchor .octicon-link, .markdown-body h3:hover .anchor .octicon-link, .markdown-body h4:hover .anchor .octicon-link, .markdown-body h5:hover .anchor .octicon-link, .markdown-body h6:hover .anchor .octicon-link { display: inline-block; } .markdown-body h1 { padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid #eee; } .markdown-body h1 .anchor { line-height: 1; } .markdown-body h2 { padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; } .markdown-body h2 .anchor { line-height: 1; } .markdown-body h3 { font-size: 1.5em; line-height: 1.43; } .markdown-body h3 .anchor { line-height: 1.2; } .markdown-body h4 { font-size: 1.25em; } .markdown-body h4 .anchor { line-height: 1.2; } .markdown-body h5 { font-size: 1em; } .markdown-body h5 .anchor { line-height: 1.1; } .markdown-body h6 { font-size: 1em; color: #777; } .markdown-body h6 .anchor { line-height: 1.1; } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; } .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, .markdown-body ol ul { margin-top: 0; margin-bottom: 0; } .markdown-body li>p { margin-top: 16px; } .markdown-body dl { padding: 0; } .markdown-body dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: bold; } .markdown-body dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-body blockquote { padding: 0 15px; color: #777; border-left: 4px solid #ddd; } .markdown-body blockquote> :first-child { margin-top: 0; } .markdown-body blockquote> :last-child { margin-bottom: 0; } .markdown-body table { display: block; width: 100%; overflow: auto; word-break: normal; word-break: keep-all; } .markdown-body table th { font-weight: bold; text-align: revert; } .markdown-body table th, .markdown-body table td { padding: 6px 13px; border: 1px solid #ddd; } .markdown-body table tr { background-color: #fff; border-top: 1px solid #ccc; } .markdown-body table tr:nth-child(2n) { background-color: #f8f8f8; } .markdown-body img { max-width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body code { padding: 0; padding-top: 0.2em; padding-bottom: 0.2em; margin: 0; font-size: 85%; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; } .markdown-body code:has(.katex) { background-color: transparent; } .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; content: "\\00a0"; } .markdown-body pre>code { padding: 0; margin: 0; font-size: 100%; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-body .highlight { margin-bottom: 16px; } .markdown-body .highlight pre, .markdown-body pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f7f7f7; border-radius: 3px; } .markdown-body .highlight pre { margin-bottom: 0; word-break: normal; } .markdown-body pre { word-wrap: normal; } .markdown-body pre code { display: inline; max-width: initial; padding: 0; margin: 0; overflow: initial; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-body pre code:before, .markdown-body pre code:after { content: normal; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font-size: 11px; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .pl-c { color: #969896; } .markdown-body .pl-c1, .markdown-body .pl-mdh, .markdown-body .pl-mm, .markdown-body .pl-mp, .markdown-body .pl-mr, .markdown-body .pl-s1 .pl-v, .markdown-body .pl-s3, .markdown-body .pl-sc, .markdown-body .pl-sv { color: #0086b3; } .markdown-body .pl-e, .markdown-body .pl-en { color: #795da3; } .markdown-body .pl-s1 .pl-s2, .markdown-body .pl-smi, .markdown-body .pl-smp, .markdown-body .pl-stj, .markdown-body .pl-vo, .markdown-body .pl-vpf { color: #333; } .markdown-body .pl-ent { color: #63a35c; } .markdown-body .pl-k, .markdown-body .pl-s, .markdown-body .pl-st { color: #a71d5d; } .markdown-body .pl-pds, .markdown-body .pl-s1, .markdown-body .pl-s1 .pl-pse .pl-s2, .markdown-body .pl-sr, .markdown-body .pl-sr .pl-cce, .markdown-body .pl-sr .pl-sra, .markdown-body .pl-sr .pl-sre, .markdown-body .pl-src { color: #df5000; } .markdown-body .pl-mo, .markdown-body .pl-v { color: #1d3e81; } .markdown-body .pl-id { color: #b52a1d; } .markdown-body .pl-ii { background-color: #b52a1d; color: #f8f8f8; } .markdown-body .pl-sr .pl-cce { color: #63a35c; font-weight: bold; } .markdown-body .pl-ml { color: #693a17; } .markdown-body .pl-mh, .markdown-body .pl-mh .pl-en, .markdown-body .pl-ms { color: #1d3e81; font-weight: bold; } .markdown-body .pl-mq { color: #008080; } .markdown-body .pl-mi { color: #333; font-style: italic; } .markdown-body .pl-mb { color: #333; font-weight: bold; } .markdown-body .pl-md, .markdown-body .pl-mdhf { background-color: #ffecec; color: #bd2c00; } .markdown-body .pl-mdht, .markdown-body .pl-mi1 { background-color: #eaffea; color: #55a532; } .markdown-body .pl-mdr { color: #795da3; font-weight: bold; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .task-list-item { list-style-type: none; } .markdown-body .task-list-item+.task-list-item { margin-top: 3px; } .markdown-body .task-list-item input { float: left; margin: 0.3em 0 0.25em -1.6em; vertical-align: middle; } .markdown-body :checked+.radio-label { z-index: 1; position: relative; border-color: #4183c4; } /*! Pretty printing styles. Used with prettify.js. */ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000 } /* plain text */ @media screen { .str { color: #080 } /* string content */ .kwd { color: #008 } /* a keyword */ .com { color: #800 } /* a comment */ .typ { color: #606 } /* a type name */ .lit { color: #066 } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660 } .tag { color: #008 } /* a markup tag name */ .atn { color: #606 } /* a markup attribute name */ .atv { color: #080 } /* a markup attribute value */ .dec, .var { color: #606 } /* a declaration; a variable name */ .fun { color: red } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060 } .kwd { color: #006; font-weight: bold } .com { color: #600; font-style: italic } .typ { color: #404; font-weight: bold } .lit { color: #044 } .pun, .opn, .clo { color: #440 } .tag { color: #006; font-weight: bold } .atn { color: #404 } .atv { color: #060 } } /* Put a border around prettyprinted code snippets. */ pre.prettyprint { padding: 2px; /* border: 1px solid #888 */ } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: none } /* Alternate shading for lines */ li.L1, li.L3, li.L5, li.L7, li.L9 { background: #eee } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; }`;return(0,ve.useEffect)(()=>{const Ht=Mt.current.attachShadow({mode:"open"});bt.current=document.createElement("div"),bt.current.className="markdown-body",bt.current.innerHTML=jt,Ht.appendChild(bt.current);const Jn=document.createElement("style");return Jn.textContent=Bt,Ht.appendChild(Jn),()=>{Ht.innerHTML=""}},[]),(0,ve.useEffect)(()=>{bt.current&&(bt.current.innerHTML=jt)},[jt]),ct.createElement("div",{ref:Mt})};function ne(jt){const Mt=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],bt=new RegExp(`\\b(${Mt.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return jt.replace(bt,"").trim()}var te=Object.defineProperty,ue=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,me=(jt,Mt,bt)=>Mt in jt?te(jt,Mt,{enumerable:!0,configurable:!0,writable:!0,value:bt}):jt[Mt]=bt,xe=(jt,Mt)=>{for(var bt in Mt||(Mt={}))se.call(Mt,bt)&&me(jt,bt,Mt[bt]);if(ue)for(var bt of ue(Mt))ge.call(Mt,bt)&&me(jt,bt,Mt[bt]);return jt};const Pe="@\u2581\u2581@",Ke="@\u2581@",nt=/]*>/g;function ft(jt){let Mt=document.createElement("div");return Mt.innerHTML=jt,Mt.childNodes.length===0?"":Mt.childNodes[0].nodeValue}const qe=(jt,Mt)=>{jt=jt||"";const bt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Bt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ht=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Jn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Mt?jt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(bt,(qn,sn,Nn,lt,Ge,Ne,Rn)=>{const ai=sn||lt||Ne,Zt=Nn||Ge||Rn||"?";return Je.Z.API_SERVER+"/api/attachments/"+ai+Zt+"&t="+(0,pt.Jn)(ai,Date.now())+(qn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(jt=jt.replace(Jn,(qn,sn,Nn,lt,Ge,Ne,Rn)=>{const ai=sn||lt||Ne,Zt=Nn||Ge||Rn||"?";return Je.Z.API_SERVER+"/attachments/download/"+ai+Zt+"&t="+(0,pt.Jn)(ai,Date.now())+(qn.indexOf(")")>-1?")":"&")}).replace(bt,(qn,sn,Nn,lt,Ge,Ne,Rn)=>{const ai=sn||lt||Ne,Zt=Nn||Ge||Rn||"?";return Je.Z.API_SERVER+"/api/attachments/"+ai+Zt+"&t="+(0,pt.Jn)(ai,Date.now())+(qn.indexOf(")")>-1?")":"&")}).replace(Bt,(qn,sn,Nn,lt,Ge)=>{const Ne=sn||lt,Rn=Nn||Ge||"";return'"'+Je.Z.API_SERVER+"/api/attachments/"+Ne+Rn+Ne+Rn+"&t="+(0,pt.Jn)(Ne,Date.now())}).replace(Ht,(qn,sn,Nn,lt,Ge)=>{const Ne=sn||lt,Rn=Nn||Ge||"";return"("+Je.Z.API_SERVER+"/files/uploads/"+Ne+Rn+Ne+Rn+"&t="+(0,pt.Jn)(Ne,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `),jt)};var at=({value:jt="",className:Mt,showTextOnly:bt,showLines:Bt,style:Ht={},stylesPrev:Jn={},highlightKeywords:qn,showProgramFill:sn,isProgramFill:Nn,disabledFill:lt=!1,programFillValue:Ge,onFillChange:Ne=Zt=>{},onFillBlur:Rn=()=>{},onFillFocus:ai=()=>{}})=>{let Zt=ne(String(jt||""));const[ci,On]=(0,ve.useState)(""),[Mi,Xt]=(0,ve.useState)("office"),[At,on]=(0,ve.useState)([]),Si=(0,ve.useRef)("a"+(0,yt.Z)()),Gt={},Xe=mn=>//i.test(mn||""),ke=(mn,Fi,Vi)=>{const Ir=document.createElement(mn===Ke?"input":"textarea");Ir.style.width="100%",Ir.style.height=mn===Ke?"40px":"151px",Ir.rows=5,Ir.spellcheck=!1,Ir.name="edu-program-fill",Ir.placeholder="\u8BF7\u8F93\u5165",Ir.dataset.id=Fi;const Qi=Object.keys(Gt).length;return Gt[Qi]=Ir,`${Ir.outerHTML}`};function Me(mn){return mn=mn.replace(/!\[.*?\]\(.*?\)/g,""),mn=mn.replace(/\[.*?\]\(.*?\)/g,""),mn=mn.replace(new RegExp("","gs"),""),mn=mn.replace(//g,""),mn=mn.replace(//g,""),mn=mn.replace(new RegExp(".*?<\\/video>","gs"),""),mn=mn.replace(new RegExp(".*?<\\/audio>","gs"),""),mn=mn.replace(new RegExp(".*?<\\/style>","gs"),""),mn=mn.replace(new RegExp(".*?<\\/script>","gs"),""),mn}const He=mn=>!bt&&Xe(Zt)?mn:mn.replace(/([\s\S]+?)<\/style>/gim,function(Fi,Vi){let Ir=Vi.replace(/(\n|\r)/g,"").split("}"),Qi=[];return Ir.map(Di=>{Di!=""&&Qi.push(`.${Si.current} ${Di}`)}),``}),et=(0,ve.useMemo)(()=>{try{const Ir=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Qi=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Di=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,$r=/\(\/attachments\/download\//g;Zt=Zt.replace($r,"("+Je.Z.API_SERVER+"/attachments/download/").replace(Ir,"("+Je.Z.API_SERVER+"/api/attachments/").replace(Qi,'"'+Je.Z.API_SERVER+"/api/attachments/").replace(Di,'"'+Je.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `)}catch(Ir){}if(sn){let Ir=-1;return Zt=Zt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Qi,Di,$r){var Yi;return++Ir,ke(Qi,Ir,(Yi=Ge==null?void 0:Ge[Ir])==null?void 0:Yi.value.replaceAll("<","<").replaceAll(">",">"))}),`
${He(Zt||"")}
`}let mn=He(Zt);mn=(0,wt.ZP)(mn);const Fi=(0,wt.ez)();Zt.match(/\[TOC\]/)&&(mn=mn.replace("

[TOC]

",(0,wt.Qv)()),(0,wt.Iy)()),mn=mn.replace(/(__special_katext_id_\d+__)/g,(Ir,Qi)=>{const{type:Di,expression:$r}=Fi[Qi];return(0,mt.renderToString)(ft($r)||"",{displayMode:Di==="block",throwOnError:!1,output:"html"})}),mn=mn.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,wt.AL)();const Vi=document.createElement("div");if(Vi.innerHTML=mn,bt)return Vi.innerText;if(qn){const Ir=qn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return jn(Vi,Ir),Vi.innerHTML}return setTimeout(()=>si(),500),Vi.innerHTML},[Zt,qn]);(0,ve.useEffect)(()=>{An.current&&An.current.querySelectorAll(["input","textarea"]).forEach(Fi=>{Fi.oninput=Oe,Fi.onblur=ut,Fi.onfocus=Vn})},[At]),(0,ve.useEffect)(()=>{var mn,Fi,Vi,Ir,Qi;if(Ge!=null&&Ge.length)try{const Di=An.current.querySelectorAll(".edu-program-fill-score"),$r=An.current.querySelectorAll('[name="edu-program-fill"]');for(const[Yi,hr]of $r.entries())hr.value=((mn=Ge==null?void 0:Ge[Yi])==null?void 0:mn.value)||"",((Fi=Ge==null?void 0:Ge[Yi])==null?void 0:Fi.type)==="warning"?hr.className="program-fill-warning":((Vi=Ge==null?void 0:Ge[Yi])==null?void 0:Vi.type)==="success"?hr.className="program-fill-success":hr.className="";for(const[Yi,hr]of Di.entries())hr.innerHTML=(Ir=Ge==null?void 0:Ge[Yi])!=null&&Ir.score?`${(Qi=Ge==null?void 0:Ge[Yi])==null?void 0:Qi.score}\u5206`:"";on(Ge)}catch(Di){console.log(Di,"error")}},[Ge]);const Oe=mn=>{At[mn.target.dataset.id]=At[mn.target.dataset.id]||{},At[mn.target.dataset.id].value=mn.target.value,on([...At]),Ne(At,mn.target.dataset.id)},ut=mn=>{At[mn.target.dataset.id]=At[mn.target.dataset.id]||{},At[mn.target.dataset.id].value=mn.target.value,on([...At]),Rn(At,mn.target.dataset.id)},Vn=mn=>{At[mn.target.dataset.id]=At[mn.target.dataset.id]||{},At[mn.target.dataset.id].value=mn.target.value,on([...At]),ai(At,mn.target.dataset.id)};function jn(mn,Fi){return mn.childNodes.forEach(Vi=>{var Ir;if(Vi.childNodes.length>0)jn(Vi,Fi);else if(Vi.nodeName!=="IMG")if(Vi.innerHTML)Vi.innerHTML=(Ir=Vi.innerHTML)==null?void 0:Ir.replace(new RegExp(Fi,"gi"),'$&');else{const Qi=document.createElement("span");Qi.innerHTML=Vi.textContent.replace(new RegExp(Fi,"gi"),'$&'),Vi.replaceWith(Qi)}})}const An=(0,ve.useRef)();wt.jb.WebkitLineClamp=Bt,Bt&&(Ht=xe(xe({},Ht),wt.jb));function Pn(mn){let Fi=mn.target;if(Fi.tagName.toUpperCase()==="A"){let Vi=Fi.getAttribute("href");if(Vi.indexOf("office")>-1)mn.preventDefault(),On(Vi),Xt("office");else if(Vi.indexOf("application/pdf")>-1)mn.preventDefault(),On(Vi),Xt("pdf");else if(Vi.indexOf("text/html")>-1)mn.preventDefault(),On(Vi),Xt("html");else if(Vi.startsWith("#")){mn.preventDefault();let Ir=document.getElementById(Vi.replace("#",""));Ir&&Ir.scrollIntoView(!0)}}}const si=()=>{var mn;const Fi=(mn=An.current)==null?void 0:mn.querySelectorAll("video");Fi==null||Fi.forEach(Vi=>{if(Vi.oncontextmenu=()=>!1,Vi.src.indexOf(".m3u8")>-1&&!Vi.canPlayType("application/vnd.apple.mpegurl")){if(Re().isSupported()){var Ir=new(Re());Ir.loadSource(Vi.src),Ir.attachMedia(Vi)}}})};return(0,ve.useEffect)(()=>{if(An.current&&et&&et.match(nt)&&window.PR.prettyPrint(),An.current)return An.current.addEventListener("click",Pn),()=>{var mn;(mn=An.current)==null||mn.removeEventListener("click",Pn),(0,wt.AL)(),(0,wt.Iy)()}},[et,An.current,Pn]),(0,ve.useEffect)(()=>{var mn;const Fi=Vi=>{Vi.preventDefault(),Vi.clipboardData.setData("text",window.getSelection().toString())};return(mn=An.current)==null||mn.addEventListener("copy",Fi),()=>{var Vi;(Vi=An.current)==null||Vi.removeEventListener("copy",Fi)}},[An.current]),ve.createElement(ve.Fragment,null,bt&&ve.createElement("div",{ref:An},et),!bt&&!Xe(et)&&ve.createElement("div",{ref:An,style:xe({},Ht),className:`${Mt||""} ${lt?"disabled-fill":""} markdown-body ${Si.current}`,dangerouslySetInnerHTML:{__html:et}}),!bt&&Xe(et)&&ve.createElement(Te,{html:et}),ve.createElement(Vt.Z,{close:!0,data:ci,type:ci!=null&&ci.length?Mi:"",style:xe({},Jn),onClose:()=>On("")}))}},96332:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return pt}});var ve=be(67294),ot={flex_box_center:"flex_box_center___rQJfc",flex_space_between:"flex_space_between___MDW24",flex_box_vertical_center:"flex_box_vertical_center___RZbAv",flex_box_center_end:"flex_box_center_end___ILhJA",flex_box_column:"flex_box_column___Fmij7",orangeColor:"orangeColor___U5vU6",redColor:"redColor___qYa6X",statustitle:"statustitle___pTBLm",statusbody:"statusbody___qUPQx",flex:"flex___VtL45"},wt=be(62844),Qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",Nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",Re=(mt,yt,Vt)=>new Promise((ct,We)=>{var Te=ue=>{try{te(Vt.next(ue))}catch(se){We(se)}},ne=ue=>{try{te(Vt.throw(ue))}catch(se){We(se)}},te=ue=>ue.done?ct(ue.value):Promise.resolve(ue.value).then(Te,ne);te((Vt=Vt.apply(mt,yt)).next())}),pt=({type:mt,resdata:yt,onok:Vt,oktext:ct,okloading:We})=>{const[Te,ne]=(0,ve.useState)(!1),{can_copy_list:te,can_copy_num:ue,challenge_type:se,course_data_list:ge,no_copy_list:me,no_copy_num:xe,no_use_list:Pe,no_use_num:Ke,repeat_shixun_num:nt,student_count:ft,total_num:qe,use_num:at}=yt;let jt=ue>0||mt==="exercise";(0,ve.useEffect)(()=>{(yt==null?void 0:yt.student_count)>0&&ne(!0)},[yt]),console.log("---11",We),(0,ve.useEffect)(()=>{We||ne(!1)},[We]);const Mt=()=>{if(mt==="exercise"&&se===1)return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709",ve.createElement("span",{className:ot.orangeColor},ft),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ve.createElement("span",{className:ot.orangeColor},at),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u4F5C\u7B54\u5DF2\u6311\u6218\u8FC7\u7684\u5B9E\u8BAD\u9898\u3002"));if(mt==="exercise"&&se===2)return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709",ve.createElement("span",{className:ot.orangeColor},ft),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ve.createElement("span",{className:ot.orangeColor},at),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(mt==="shixun"&&se===1)return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709",ve.createElement("span",{className:ot.orangeColor},ft),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(mt==="shixun"&&se===2)return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709",ve.createElement("span",{className:ot.orangeColor},ft),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(mt==="subject"&&se===1)return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709",ve.createElement("span",{className:ot.orangeColor},ft),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ve.createElement("span",{className:ot.orangeColor},at),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(mt==="subject"&&se===2)return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",ve.createElement("span",{className:ot.orangeColor},ft)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",ve.createElement("span",{className:ot.orangeColor},at)," \u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(mt==="exercisepush")return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709",ve.createElement("span",{className:ot.orangeColor},ft),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",ve.createElement("span",{className:ot.orangeColor},at),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u5728\u5F53\u524D\u8003\u8BD5\u4E2D\u8FDB\u884C\u4F5C\u7B54\u3002"));if(mt==="shixunpush"&&se===1)return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709",ve.createElement("span",{className:ot.orangeColor},ft),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",ve.createElement("span",{className:ot.orangeColor},at),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(mt==="shixunpush"&&se===2)return ve.createElement(ve.Fragment,null,"\u8BFE\u5802\u5185\u6709",ve.createElement("span",{className:ot.orangeColor},ft),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",ve.createElement("span",{className:ot.orangeColor},at),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",ve.createElement("span",{className:ot.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},bt=()=>{if(mt==="exercise"||mt==="subject"||mt==="exercisepush"||mt==="shixunpush")return ve.createElement("div",{style:{marginTop:20}},xe>0&&ve.createElement("div",null,ve.createElement("span",{className:ot.flex},ve.createElement("img",{src:Nt,style:{width:14}}),ve.createElement("span",{className:ot.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),ve.createElement("div",{className:ot.statusbody},mt==="exercise"&&ve.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ve.createElement("span",{className:ot.redColor},"\u4EE5\u4E0B\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\u3002"),"\u60A8\u4E5F\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),(mt==="subject"||mt==="exercisepush")&&ve.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",jt&&ve.createElement("span",{className:ot.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),mt==="shixunpush"&&ve.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",jt&&ve.createElement("span",{className:ot.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u5EFA\u8BAE\u60A8\u91CD\u65B0\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE\u518D\u53D1\u5E03\u4F5C\u4E1A\uFF0C\u4E5F\u53EF\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),ve.createElement("div",null,me==null?void 0:me.map((Bt,Ht)=>ve.createElement("a",{href:`/shixuns/${Bt.identifier}/challenges`,target:"_blank"},"\u300A",Bt==null?void 0:Bt.name,"\u300B",Ht+1!==xe&&"\u3001"))))),ue>0&&ve.createElement("div",{style:{marginTop:20}},ve.createElement("span",{className:ot.flex},ve.createElement("img",{src:Qt,style:{width:14}}),ve.createElement("span",{className:ot.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),ve.createElement("div",{className:ot.statusbody},mt==="exercise"&&ve.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u8BD5\u5377\u4E2D\u7684\u539F\u8BD5\u9898\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),(mt==="subject"||mt==="exercisepush")&&ve.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),mt==="shixunpush"&&ve.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u5F53\u524D\u4F5C\u4E1A\u4E2D\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),ve.createElement("div",null,te==null?void 0:te.map((Bt,Ht)=>ve.createElement("a",{href:`/shixuns/${Bt.identifier}/challenges`,target:"_blank"},"\u300A",Bt==null?void 0:Bt.name,"\u300B",Ht+1!==ue&&"\u3001"))))));if(mt==="shixun")return ve.createElement("div",{style:{marginTop:20}},ue>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return ve.createElement(wt.default,{open:Te,onCancel:()=>{ne(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!jt&&"none"}},zIndex:1003,confirmLoading:We,okText:jt?ct:"\u6211\u77E5\u9053\u4E86",onOk:()=>Re(void 0,null,function*(){jt?yield Vt([...te,...Pe]):ne(!1)})},ve.createElement("div",{style:{maxHeight:600,overflow:"auto"}},Mt(),bt()))}},57444:function(Dn,ei,be){"use strict";be.d(ei,{h:function(){return xe}});var ve=be(67294),ot=be(88044),wt=be(91773),Qt=be(85804),Nt=be(4631),Re=be.n(Nt),Je=be(71749),pt=be(30483),mt=Object.defineProperty,yt=Object.defineProperties,Vt=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,ne=(Pe,Ke,nt)=>Ke in Pe?mt(Pe,Ke,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Pe[Ke]=nt,te=(Pe,Ke)=>{for(var nt in Ke||(Ke={}))We.call(Ke,nt)&&ne(Pe,nt,Ke[nt]);if(ct)for(var nt of ct(Ke))Te.call(Ke,nt)&&ne(Pe,nt,Ke[nt]);return Pe},ue=(Pe,Ke)=>yt(Pe,Vt(Ke));const se=ot.default.Option,ge={labelCol:{span:4},wrapperCol:{span:20}},me={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"]};ei.Z=({callback:Pe,onCancel:Ke})=>{const[nt,ft]=(0,ve.useState)("python");function qe(jt){ft(me[jt][1])}function at(jt){Pe(jt)}return ve.createElement(wt.default,ue(te({},ge),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:at,style:{width:500}}),ve.createElement(wt.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ve.createElement(ot.default,{getPopupContainer:jt=>jt.parentNode,onChange:qe},Object.keys(me).map(jt=>ve.createElement(se,{key:jt,value:jt},me[jt][0])))),ve.createElement(wt.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ve.createElement(xe,{mode:nt})),ve.createElement("div",{className:"flex-container flex-end"},ve.createElement(Qt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ve.createElement(Qt.ZP,{type:"ghost",onClick:Ke},"\u53D6\u6D88")))};function xe({value:Pe,onChange:Ke,mode:nt,options:ft={}}){const qe=(0,ve.useRef)(),[at,jt]=(0,ve.useState)();return(0,ve.useEffect)(()=>{if(at){let Mt=function(bt){const Bt=bt.getValue();Ke&&Ke(Bt)};return at.on("change",Mt),()=>{at.off("change",Mt)}}},[at,Ke]),(0,ve.useEffect)(()=>{at&&at.setOption("mode",nt)},[at,nt]),(0,ve.useEffect)(()=>{at&&(Pe!==at.getValue()||Pe==="")&&setTimeout(()=>{at.setValue(Pe||"")},300)},[at,Pe]),(0,ve.useEffect)(()=>{if(qe.current&&!at){const Mt=Re().fromTextArea(qe.current,te({mode:nt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ft));jt(Mt)}},[qe.current,at]),ve.createElement("div",{className:"my-codemirror-container"},ve.createElement("textarea",{ref:qe}))}},35567:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return ni}});var ve=be(67294),ot=be(4631),wt=be.n(ot),Qt=be(91033),Nt=be(71749),Re=be(57341),Je=be(82801),pt=be(88386),mt=be(49047),yt=be(80785),Vt=be(65226),ct=({value:zt="",className:Kt,showTextOnly:Ft,showLines:un,style:Ti={}})=>{const Ri=(0,ve.useMemo)(()=>"",[zt]);return ve.createElement(ve.Fragment,null,ve.createElement("div",{dangerouslySetInnerHTML:{__html:Ri}}))},We=Object.defineProperty,Te=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ge=(zt,Kt,Ft)=>Kt in zt?We(zt,Kt,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):zt[Kt]=Ft,me=(zt,Kt)=>{for(var Ft in Kt||(Kt={}))ue.call(Kt,Ft)&&ge(zt,Ft,Kt[Ft]);if(te)for(var Ft of te(Kt))se.call(Kt,Ft)&&ge(zt,Ft,Kt[Ft]);return zt},xe=(zt,Kt)=>Te(zt,ne(Kt));let Pe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Ke({onActionCallback:zt,title:Kt,icon:Ft,actionName:un,className:Ti="",children:Ri}){function hi(){zt(un)}return ve.createElement("a",{title:Kt,className:Ti,onClick:hi},ve.createElement("i",{className:`${Ft}`}),Ri)}var nt=({watch:zt,showNullButton:Kt,showNullProgramButton:Ft,onActionCallback:un,fullScreen:Ti,insertTemp:Ri,hidetoolBar:hi,extraUse:Ut})=>{const zn=[...Pe,{title:`${zt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${zt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ve.createElement("ul",{className:"markdown-toolbar-container"},!hi&&zn.map((xn,Fr)=>ve.createElement("li",{key:Fr},xn.actionName?ve.createElement(Ke,xe(me({},xn),{onActionCallback:un})):ve.createElement("span",{className:"v-line"}))),Kt?ve.createElement("li",null,ve.createElement(Ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:un},ve.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ft?ve.createElement(ve.Fragment,null,ve.createElement("li",null,ve.createElement(Ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:un},ve.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ve.createElement("li",null,ve.createElement(Ke,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:un},ve.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Ri&&ve.createElement("li",null,ve.createElement(Ke,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Ri}`,onActionCallback:un},ve.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ut&&ve.createElement("li",null,Ut),ve.createElement("li",{className:"btn-full-screen"},ve.createElement(Ke,{icon:`${Ti?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ti?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:un})))},ft=be(76621),qe=be(91773),at=be(28802),jt=be(85804),Mt=Object.defineProperty,bt=Object.defineProperties,Bt=Object.getOwnPropertyDescriptors,Ht=Object.getOwnPropertySymbols,Jn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,sn=(zt,Kt,Ft)=>Kt in zt?Mt(zt,Kt,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):zt[Kt]=Ft,Nn=(zt,Kt)=>{for(var Ft in Kt||(Kt={}))Jn.call(Kt,Ft)&&sn(zt,Ft,Kt[Ft]);if(Ht)for(var Ft of Ht(Kt))qn.call(Kt,Ft)&&sn(zt,Ft,Kt[Ft]);return zt},lt=(zt,Kt)=>bt(zt,Bt(Kt));const Ge={labelCol:{span:4},wrapperCol:{span:20}};var Ne=({callback:zt,onCancel:Kt})=>{function Ft(un){zt(un)}return ve.createElement(qe.default,lt(Nn({},Ge),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ft,style:{width:500}}),ve.createElement(qe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ve.createElement(at.default,null)),ve.createElement(qe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ve.createElement(at.default,null)),ve.createElement("div",{className:"flex-container flex-end"},ve.createElement(jt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ve.createElement(jt.ZP,{type:"ghost",onClick:Kt},"\u53D6\u6D88")))},Rn=be(57444),ai=be(70859),Zt=be(62844),ci=be(71230),On=be(63205),Mi=be(67294),Xt=({callback:zt,onCancel:Kt})=>{const Ft=document.createElement("canvas"),un=Ft.getContext("2d");Ft.width=1e3,Ft.height=800,un.fillStyle="#ffffff",un.fillRect(0,0,Ft.width,Ft.height);const Ti=Ft.toDataURL("image/png");return Mi.createElement(Zt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Mi.createElement(ci.Z,{style:{height:"100vh"}},Mi.createElement(On.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ti,visible:!0,title:String(Date.now())},onOk:Ri=>{zt({src:Ri.url})},onClose:Kt})))},At=be(23495);function on(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(on,go.CommandHandler),on.prototype.canAlignSelection=function(){var zt=this.diagram;return!(zt===null||zt.isReadOnly||zt.isModelReadOnly||zt.selection.count<2)},on.prototype.alignLeft=function(){var zt=this.diagram;zt.startTransaction("aligning left");var Kt=1/0;zt.selection.each(function(Ft){Ft instanceof go.Link||(Kt=Math.min(Ft.position.x,Kt))}),zt.selection.each(function(Ft){Ft instanceof go.Link||Ft.move(new go.Point(Kt,Ft.position.y))}),zt.commitTransaction("aligning left")},on.prototype.alignRight=function(){var zt=this.diagram;zt.startTransaction("aligning right");var Kt=-1/0;zt.selection.each(function(Ft){if(!(Ft instanceof go.Link)){var un=Ft.actualBounds.x+Ft.actualBounds.width;Kt=Math.max(un,Kt)}}),zt.selection.each(function(Ft){Ft instanceof go.Link||Ft.move(new go.Point(Kt-Ft.actualBounds.width,Ft.position.y))}),zt.commitTransaction("aligning right")},on.prototype.alignTop=function(){var zt=this.diagram;zt.startTransaction("alignTop");var Kt=1/0;zt.selection.each(function(Ft){Ft instanceof go.Link||(Kt=Math.min(Ft.position.y,Kt))}),zt.selection.each(function(Ft){Ft instanceof go.Link||Ft.move(new go.Point(Ft.position.x,Kt))}),zt.commitTransaction("alignTop")},on.prototype.alignBottom=function(){var zt=this.diagram;zt.startTransaction("aligning bottom");var Kt=-1/0;zt.selection.each(function(Ft){if(!(Ft instanceof go.Link)){var un=Ft.actualBounds.y+Ft.actualBounds.height;Kt=Math.max(un,Kt)}}),zt.selection.each(function(Ft){Ft instanceof go.Link||Ft.move(new go.Point(Ft.actualBounds.x,Kt-Ft.actualBounds.height))}),zt.commitTransaction("aligning bottom")},on.prototype.alignCenterX=function(){var zt=this.diagram,Kt=zt.selection.first();if(Kt){zt.startTransaction("aligning Center X");var Ft=Kt.actualBounds.x+Kt.actualBounds.width/2;zt.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(Ft-un.actualBounds.width/2,un.actualBounds.y))}),zt.commitTransaction("aligning Center X")}},on.prototype.alignCenterY=function(){var zt=this.diagram,Kt=zt.selection.first();if(Kt){zt.startTransaction("aligning Center Y");var Ft=Kt.actualBounds.y+Kt.actualBounds.height/2;zt.selection.each(function(un){un instanceof go.Link||un.move(new go.Point(un.actualBounds.x,Ft-un.actualBounds.height/2))}),zt.commitTransaction("aligning Center Y")}},on.prototype.alignColumn=function(zt){var Kt=this.diagram;Kt.startTransaction("align Column"),zt===void 0&&(zt=0),zt=parseFloat(zt);var Ft=new Array;Kt.selection.each(function(Ut){Ut instanceof go.Link||Ft.push(Ut)});for(var un=0;un0){for(var Ut=Ri.elt(hi-1);Ut!==null&&Ut.isTreeExpanded&&!Ut.isTreeLeaf;){var zn=this._sortTreeChildrenByY(Ut);Ut=zn.last()}Ut!==null&&zt.select(Ut)}else zt.select(Ti)}}else if(Ft.key==="Down")if(Kt.isTreeExpanded&&!Kt.isTreeLeaf){var un=this._sortTreeChildrenByY(Kt).first();un!==null&&zt.select(un)}else for(;Kt!==null;){var Ti=Kt.findTreeParentNode();if(Ti===null)break;var Ri=this._sortTreeChildrenByY(Ti),hi=Ri.indexOf(Kt);if(hiRi.y?1:Ti.xRi.x?1:0}),Kt},on.prototype.copyToClipboard=function(zt){go.CommandHandler.prototype.copyToClipboard.call(this,zt),this._lastPasteOffset.set(this.pasteOffset)},on.prototype.pasteFromClipboard=function(){var zt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(zt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),zt},Object.defineProperty(on.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(zt){if(zt!=="move"&&zt!=="select"&&zt!=="scroll"&&zt!=="tree"&&zt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+zt);this._arrowKeyBehavior=zt}}),Object.defineProperty(on.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(zt){if(!(zt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+zt);this._pasteOffset.set(zt)}});var Si=on,Gt=be(18023),Xe=be(15746),ke=be(33170),Me={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},He=be(52262),et=be(67294),Oe=(zt,Kt,Ft)=>new Promise((un,Ti)=>{var Ri=zn=>{try{Ut(Ft.next(zn))}catch(xn){Ti(xn)}},hi=zn=>{try{Ut(Ft.throw(zn))}catch(xn){Ti(xn)}},Ut=zn=>zn.done?un(zn.value):Promise.resolve(zn.value).then(Ri,hi);Ut((Ft=Ft.apply(zt,Kt)).next())});function ut({onCancel:zt,callback:Kt}){let Ft=(0,ve.useRef)(),un=(0,ve.useRef)(),Ti=(0,ve.useRef)(),Ri=(0,ve.useRef)(!1);const hi=(0,ve.useRef)(!1),[Ut,zn]=(0,ve.useState)(0);function xn(){const ri=At.bx.make,$t={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};Ft.current=new At.S0(un.current,{padding:20,grid:ri(At.s_,"Grid",ri(At.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),ri(At.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:ln=>{var Yo=ln.diagram.commandHandler.addTopLevelParts(ln.diagram.selection,!0);Yo||ln.diagram.currentTool.doCancel()},commandHandler:ri(Si),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:ln=>{var Yo=ln.subject;Yo.location=Yo.location.copy().snapToGridPoint(ln.diagram.grid.gridOrigin,ln.diagram.grid.gridCellSize),setTimeout(()=>{ln.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:ln=>{var Yo=ln.subject;setTimeout(()=>{ln.diagram.commandHandler.editTextBlock()})},LinkRelinked:ln=>{var Yo=ln.parameter.part;Yo.invalidateConnectedLinks();var Va=ln.subject;ln.diagram.toolManager.linkingTool.isForwards?Va.toNode.invalidateConnectedLinks():Va.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ft.current.nodeTemplate=ri(At.NB,"Auto",{locationSpot:At.z6.Center,locationObjectName:"SHAPE",desiredSize:new At.$u(120,60),minSize:new At.$u(40,40),resizable:!0,resizeCellSize:new At.$u(10,10),rotatable:!0},new At.KX("location","loc",At.E9.parse).makeTwoWay(At.E9.stringify),new At.KX("desiredSize","size",At.$u.parse).makeTwoWay(At.$u.stringify),ri(At.bn,{name:"SHAPE",fill:$t.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:At.z6.AllSides,toSpot:At.z6.AllSides},new At.KX("figure"),new At.KX("fill"),new At.KX("stroke","borderColor"),new At.KX("strokeWidth","thickness"),new At.KX("strokeDashArray","dash")),ri(At.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),ri(At.al,{margin:1,textAlign:"center",overflow:At.al.OverflowEllipsis,editable:!0},new At.KX("text").makeTwoWay(),new At.KX("stroke","color"))),Ft.current.nodeTemplate.toolTip=ri("ToolTip",ri(At.s_,"Vertical",{maxSize:new At.$u(200,NaN)},ri(At.al,{font:"bold 10pt sans-serif",textAlign:"center"},new At.KX("text")),ri(At.al,{font:"10pt sans-serif",textAlign:"center"},new At.KX("text","details"))));function _i(ln,Yo){var Va=(Ao,ms)=>{Ao.handled=!0,Ao.diagram.model.commit(Ba=>{var $a=ms.part.adornedPart,Er=new At.E9().setRectSpot($a.actualBounds,ln);Er.subtract($a.location),Er.scale(2,2),Er.x+=Math.sign(Er.x)*130,Er.y+=Math.sign(Er.y)*130,Er.add($a.location),Er.snapToGridPoint(Ao.diagram.grid.gridOrigin,Ao.diagram.grid.gridCellSize);var uo=Ba.copyNodeData($a.data);Ba.setGroupKeyForNodeData(uo,Ba.getGroupKeyForNodeData($a.data)),Ba.addNodeData(uo);var So={from:$a.key,to:Ba.getKeyForNodeData(uo)};Ba.addLinkData(So);var Wn=Ao.diagram.findNodeForData(uo);Wn.location=Er,Ao.diagram.select(Wn),setTimeout(()=>{Ao.diagram.commandHandler.editTextBlock()},20)})};return ri(At.bn,{figure:Yo,alignment:ln,alignmentFocus:ln.opposite(),width:ln.equals(At.z6.Top)||ln.equals(At.z6.Bottom)?25:18,height:ln.equals(At.z6.Top)||ln.equals(At.z6.Bottom)?18:25,fill:"orange",stroke:$t.white,strokeWidth:4,mouseEnter:(Ao,ms)=>ms.fill="dodgerblue",mouseLeave:(Ao,ms)=>ms.fill="orange",isActionable:!0,click:Va,contextClick:Va})}function Wr(ln){return ri(At.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:(Yo,Va)=>Va.fill="dodgerblue",mouseLeave:(Yo,Va)=>Va.fill="orange",click:(Yo,Va)=>{Yo.diagram.commandHandler.showContextMenu(Va.part.adornedPart)}},ln||{})}Ft.current.nodeTemplate.selectionAdornmentTemplate=ri(At.uz,"Spot",ri(At.Vm,{padding:10}),_i(At.z6.Top,"TriangleUp"),_i(At.z6.Left,"TriangleLeft"),_i(At.z6.Right,"TriangleRight"),_i(At.z6.Bottom,"TriangleDown"),Wr({alignment:new At.z6(.75,0)}));function Br(ln,Yo){return(Va,Ao)=>{Va.handled=!0,Va.diagram.model.commit(ms=>{ms.set(Ao.part.adornedPart.data,ln,Yo)})}}function Sn(ln,Yo){return Yo||(Yo="color"),ri(At.bn,{width:16,height:16,stroke:"lightgray",fill:ln,margin:1,background:"transparent",mouseEnter:(Va,Ao)=>Ao.stroke="dodgerblue",mouseLeave:(Va,Ao)=>Ao.stroke="lightgray",click:Br(Yo,ln),contextClick:Br(Yo,ln)})}function or(){return[ri("ContextMenuButton",ri(At.s_,"Horizontal",Sn($t.white,"fill"),Sn($t.beige,"fill"),Sn($t.extralightblue,"fill"),Sn($t.extralightred,"fill"))),ri("ContextMenuButton",ri(At.s_,"Horizontal",Sn($t.lightgray,"fill"),Sn($t.lightgreen,"fill"),Sn($t.lightblue,"fill"),Sn($t.lightred,"fill")))]}function Xo(){return[ri("ContextMenuButton",ri(At.s_,"Horizontal",Sn($t.black),Sn($t.green),Sn($t.blue),Sn($t.red))),ri("ContextMenuButton",ri(At.s_,"Horizontal",Sn($t.white),Sn($t.magenta),Sn($t.purple),Sn($t.orange)))]}function Na(ln,Yo){return Yo||(Yo="thickness"),ri(At.bn,"LineH",{width:16,height:16,strokeWidth:ln,margin:1,background:"transparent",mouseEnter:(Va,Ao)=>Ao.background="dodgerblue",mouseLeave:(Va,Ao)=>Ao.background="transparent",click:Br(Yo,ln),contextClick:Br(Yo,ln)})}function aa(ln,Yo){return Yo||(Yo="dash"),ri(At.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:ln,margin:1,background:"transparent",mouseEnter:(Va,Ao)=>Ao.background="dodgerblue",mouseLeave:(Va,Ao)=>Ao.background="transparent",click:Br(Yo,ln),contextClick:Br(Yo,ln)})}function ur(){return[ri("ContextMenuButton",ri(At.s_,"Horizontal",Na(1),Na(2),Na(3),Na(4))),ri("ContextMenuButton",ri(At.s_,"Horizontal",aa(null),aa([2,4]),aa([4,4])))]}function Nr(ln,Yo){return Yo||(Yo="figure"),ri(At.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:ln,margin:1,background:"transparent",mouseEnter:(Va,Ao)=>Ao.fill="dodgerblue",mouseLeave:(Va,Ao)=>Ao.fill="lightgray",click:Br(Yo,ln),contextClick:Br(Yo,ln)})}Ft.current.nodeTemplate.contextMenu=ri("ContextMenu",ri("ContextMenuButton",ri(At.s_,"Horizontal",Nr("Rectangle"),Nr("RoundedRectangle"),Nr("Ellipse"),Nr("Diamond"))),ri("ContextMenuButton",ri(At.s_,"Horizontal",Nr("Parallelogram2"),Nr("ManualOperation"),Nr("Procedure"),Nr("Cylinder1"))),ri("ContextMenuButton",ri(At.s_,"Horizontal",Nr("Terminator"),Nr("CreateRequest"),Nr("Document"),Nr("TriangleDown"))),or(),Xo(),ur()),Ft.current.groupTemplate=ri(At.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:At.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(ln,Yo)=>{var Va=Yo.addMembers(Yo.diagram.selection,!0);Va||Yo.diagram.currentTool.doCancel()},avoidable:!1},new At.KX("location","loc",At.E9.parse).makeTwoWay(At.E9.stringify),ri(At.s_,"Auto",{name:"BODY"},ri(At.bn,{parameter1:10,fill:$t.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:At.z6.AllSides,toSpot:At.z6.AllSides},new At.KX("fill"),new At.KX("stroke","color"),new At.KX("strokeWidth","thickness"),new At.KX("strokeDashArray","dash")),ri(At.Vm,{background:"transparent",margin:20})),ri(At.al,{alignment:At.z6.Top,alignmentFocus:At.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new At.KX("text"),new At.KX("stroke","color"))),Ft.current.groupTemplate.selectionAdornmentTemplate=ri(At.uz,"Spot",ri(At.s_,"Auto",ri(At.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),ri(At.Vm,{margin:1.5})),Wr({alignment:At.z6.TopRight,alignmentFocus:At.z6.BottomRight})),Ft.current.groupTemplate.contextMenu=ri("ContextMenu",or(),Xo(),ur()),Ft.current.linkTemplate=ri(At.rU,{layerName:"Foreground",routing:At.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new At.KX("fromSpot","fromSpot",At.z6.parse),new At.KX("toSpot","toSpot",At.z6.parse),new At.KX("fromShortLength","dir",ln=>ln>=1?10:0),new At.KX("toShortLength","dir",ln=>ln>=1?10:0),new At.KX("points").makeTwoWay(),ri(At.bn,{strokeWidth:2},new At.KX("stroke","color"),new At.KX("strokeWidth","thickness"),new At.KX("strokeDashArray","dash")),ri(At.bn,{segmentIndex:0,segmentOffset:new At.E9(15,0),segmentOrientation:At.rU.OrientAlong,alignmentFocus:At.z6.Right,figure:"circle",width:10,strokeWidth:0},new At.KX("fill","color"),new At.KX("visible","dir",ln=>ln===1)),ri(At.bn,{segmentIndex:-1,segmentOffset:new At.E9(-10,6),segmentOrientation:At.rU.OrientPlus90,alignmentFocus:At.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new At.KX("fill","color"),new At.KX("visible","dir",ln=>ln>=1),new At.KX("width","thickness",ln=>7+3*ln),new At.KX("height","thickness",ln=>7+3*ln),new At.KX("segmentOffset","thickness",ln=>new At.E9(-15,4+1.5*ln))),ri(At.bn,{segmentIndex:0,segmentOffset:new At.E9(15,-6),segmentOrientation:At.rU.OrientMinus90,alignmentFocus:At.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new At.KX("fill","color"),new At.KX("visible","dir",ln=>ln===2),new At.KX("width","thickness",ln=>7+3*ln),new At.KX("height","thickness",ln=>7+3*ln),new At.KX("segmentOffset","thickness",ln=>new At.E9(-15,4+1.5*ln))),ri(At.al,{alignmentFocus:new At.z6(0,1,-4,0),editable:!0},new At.KX("text").makeTwoWay(),new At.KX("stroke","color"))),Ft.current.linkTemplate.selectionAdornmentTemplate=ri(At.uz,ri(At.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:io(2)},new At.KX("pathPattern","thickness",io)),Wr({alignmentFocus:new At.z6(0,0,-6,-4)}));function io(ln){return ri(At.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(ln+4).toString()+" H3"})}function va(ln){var Yo="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return ln===0?Yo="M0 0 M16 16 M0 8 L16 8":ln===2&&(Yo="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),ri(At.bn,{geometryString:Yo,margin:2,background:"transparent",mouseEnter:(Va,Ao)=>Ao.background="dodgerblue",mouseLeave:(Va,Ao)=>Ao.background="transparent",click:Br("dir",ln),contextClick:Br("dir",ln)})}function Ho(ln){var Yo=(Va,Ao)=>{Va.handled=!0,Va.diagram.model.commit(ms=>{var Ba=Ao.part.adornedPart;ms.set(Ba.data,ln?"toSpot":"fromSpot",At.z6.stringify(At.z6.AllSides)),(ln?Ba.toNode:Ba.fromNode).invalidateConnectedLinks()})};return ri(At.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Va,Ao)=>Ao.background="dodgerblue",mouseLeave:(Va,Ao)=>Ao.background="transparent",click:Yo,contextClick:Yo})}function pi(ln,Yo){var Va=0,Ao=At.z6.RightSide;ln.equals(At.z6.Top)?(Va=270,Ao=At.z6.TopSide):ln.equals(At.z6.Left)?(Va=180,Ao=At.z6.LeftSide):ln.equals(At.z6.Bottom)&&(Va=90,Ao=At.z6.BottomSide),Yo||(Va-=180);var ms=(Ba,$a)=>{Ba.handled=!0,Ba.diagram.model.commit(Er=>{var uo=$a.part.adornedPart;Er.set(uo.data,Yo?"toSpot":"fromSpot",At.z6.stringify(Ao)),(Yo?uo.toNode:uo.fromNode).invalidateConnectedLinks()})};return ri(At.bn,{alignment:ln,alignmentFocus:ln.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Va,background:"transparent",mouseEnter:(Ba,$a)=>$a.background="dodgerblue",mouseLeave:(Ba,$a)=>$a.background="transparent",click:ms,contextClick:ms})}Ft.current.linkTemplate.contextMenu=ri("ContextMenu",Xo(),ur(),ri("ContextMenuButton",ri(At.s_,"Horizontal",va(0),va(1),va(2))),ri("ContextMenuButton",ri(At.s_,"Horizontal",ri(At.s_,"Spot",Ho(!1),pi(At.z6.Top,!1),pi(At.z6.Left,!1),pi(At.z6.Right,!1),pi(At.z6.Bottom,!1)),ri(At.s_,"Spot",{margin:new At.Zt(0,0,0,2)},Ho(!0),pi(At.z6.Top,!0),pi(At.z6.Left,!0),pi(At.z6.Right,!0),pi(At.z6.Bottom,!0)))));const lo=`{ "class": "GraphLinksModel", "nodeDataArray": [ {"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3}, {"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"}, {"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"}, {"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"}, {"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"}, {"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3}, {"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22}, {"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22}, {"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"} ], "linkDataArray": [ {"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1}, {"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1}, {"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]}, {"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2}, {"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"}, {"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1}, {"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]} ]}`;var al=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function el(ln){return console.log("shapeName:",ln),al.indexOf(ln)>=0}var Ns=new At.YI(Ti.current,{maxSelectionCount:1,linkTemplate:ri(At.rU,{locationSpot:At.z6.Center,selectionAdornmentTemplate:ri(At.uz,"Link",{locationSpot:At.z6.Center},ri(At.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),ri(At.bn,{toArrow:"Standard",stroke:null}))},{routing:At.rU.AvoidsNodes,curve:At.rU.JumpOver,corner:5,toShortLength:4},new At.KX("points"),ri(At.bn,{isPanelMain:!0,strokeWidth:2}),ri(At.bn,{toArrow:"Standard",stroke:null})),model:new At.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...At.bn.getFigureGenerators().toArray().map(ln=>({text:"\u672A\u547D\u540D",size:"100 100",figure:ln.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ft.current.addDiagramListener("TextEdited",function(ln){var Yo;const Va=ln.subject.part;var Ao=(Yo=document.activeElement)==null?void 0:Yo.value;typeof Ao=="string"&&Ao.trim()===""&&Ft.current.model.commit(function(ms){ms.set(Va.data,"text","\u672A\u547D\u540D"),Ft.current.commandHandler.stopCommand()},"increment")}),Ns.nodeTemplate=ri(At.NB,"Auto",{locationSpot:At.z6.Center},new At.KX("location","location",At.E9.parse).makeTwoWay(At.E9.stringify),ri(At.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 At.KX("stroke").makeTwoWay(),new At.KX("fill").makeTwoWay(),new At.KX("figure")),ri(At.al,{margin:new At.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new At.$u(16,16),maxSize:new At.$u(10,NaN),textAlign:"center",editable:!0},new At.KX("key").makeTwoWay())),setTimeout(()=>{Ft.current.grid=ri(At.s_,"Grid",ri(At.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),ri(At.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ft.current.grid.visible=!0,Ft.current.grid.gridCellStroke="darkgray",Ft.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ft.current,Ft.current}const Fr=()=>Oe(this,null,function*(){var ri,$t=Ft.current.makeImage();const _i=yield(0,ke.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:$t.src,file_data:JSON.stringify({login:(ri=(0,He.eY)())==null?void 0:ri.login,data:JSON.parse(Ft.current.model.toJson())})}});Kt({src:_i.url})});return(0,ve.useEffect)(()=>(setTimeout(()=>{xn()},500),zn(Ut+1),()=>{Ft.current=null}),[]),et.createElement("div",{ref:hi,className:"body-overflow-initial"},et.createElement(Zt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Ut,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:et.createElement(ci.Z,null,et.createElement(Xe.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),et.createElement(Xe.Z,{onClick:()=>{var ri,$t,_i=Ft.current.selection.first();if(Ri.current=!Ri.current,document.activeElement&&_i){let Wr=($t=(ri=document.activeElement)==null?void 0:ri.value)==null?void 0:$t.trim();typeof Wr=="string"&&Ft.current.model.commit(function(Br){Br.set(_i.data,"text",Wr||"\u672A\u547D\u540D"),Ft.current.commandHandler.stopCommand()},"increment")}zn(Ut+1)}},et.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:zt},et.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Ri.current?"none":"block"},className:Me.flowChartWrp},et.createElement("div",{style:{display:"flex",height:"100%"}},et.createElement("div",{style:{width:"300px",height:"100%"}},et.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),et.createElement("div",{style:{height:"calc(100% - 50px)"},className:Me.myPaletteDiv,ref:Ti})),et.createElement("div",{style:{flex:1,position:"relative"}},et.createElement("div",{ref:un,style:{height:"80vh"}}))),et.createElement("div",{className:"tr"},et.createElement(jt.ZP,{size:"large",onClick:Fr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Vn=ut,jn=be(98813),An=be(37720);const Pn=jn.ZP.Group,si={margin:"0 8px"};var mn=({callback:zt,onCancel:Kt})=>{function Ft(un){zt(un)}return ve.createElement(qe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ft},ve.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ve.createElement("span",{style:si},"\u5355\u5143\u683C\u6570\uFF1A"),ve.createElement("span",{style:si},"\u884C\u6570"),ve.createElement(qe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ve.createElement(An.Z,null)),ve.createElement("span",{style:si},"\u5217\u6570"),ve.createElement(qe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ve.createElement(An.Z,null))),ve.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ve.createElement("span",{style:si},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ve.createElement(qe.default.Item,{name:"align"},ve.createElement(Pn,null,ve.createElement(jn.ZP,{value:"default"},ve.createElement("i",{className:"fa fa-align-justify"})),ve.createElement(jn.ZP,{value:"left"},ve.createElement("i",{className:"fa fa-align-left"})),ve.createElement(jn.ZP,{value:"center"},ve.createElement("i",{className:"fa fa-align-center"})),ve.createElement(jn.ZP,{value:"right"},ve.createElement("i",{className:"fa fa-align-right"}))))),ve.createElement("div",{className:"flex-container flex-end"},ve.createElement(jt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ve.createElement(jt.ZP,{type:"ghost",onClick:Kt},"\u53D6\u6D88")))},Fi=be(59637),Vi=be(61016),Ir=be.n(Vi),Di=(0,ve.forwardRef)(({use3d:zt,width:Kt,height:Ft,callback:un,showSaveButton:Ti},Ri)=>{const hi=(0,ve.useRef)(),Ut=(0,ve.useRef)(),[zn,xn]=(0,ve.useState)(!1),Fr=(0,ve.useRef)({id:hi,appName:"graphing",width:Kt||1e3,height:Ft||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ve.useEffect)(()=>{Ut.current=new(Ir())(Fr.current,!0),window.onload=function(){Ut.current.inject("applet_container")}},[]);const ri=()=>{var $t=window.ggbApplet.getPNGBase64(1,!0,72);return un&&un($t),$t};return(0,ve.useEffect)(()=>{Fr.current.appName=zn?"3D":"graphing",Ut.current.inject("applet_container")},[zn]),(0,ve.useEffect)(()=>{xn(zt)},[zt]),(0,ve.useImperativeHandle)(Ri,()=>({getImgData:ri})),ve.createElement(ve.Fragment,null,ve.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:hi}),ve.createElement(ci.Z,{align:"middle"},ve.createElement(Xe.Z,{flex:1},ve.createElement(Fi.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:zn,onChange:$t=>xn($t)})),ve.createElement(Xe.Z,null,ve.createElement(jt.ZP,{size:"large",onClick:ri,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),$r=be(36527),Yi=be(2453);const hr="link",dr="upload-image",kn="add-flowchart",Ii="draw-image",ra="add-flowchart",Un="code-block",Kr="add-table",ia="------------",sa={default:ia,left:`:${ia}`,center:`:${ia}:`,right:`${ia}:`};var Wa=be(99914);function ma(){}let Ha=0;const da=1e4,la="\u2581",No="@\u2581\u2581@",ti="@\u2581@",Ee=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,pn=["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 hn(zt){return/^\d+$/.test(zt)?`${zt}px`:zt}const Yn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",In={[Yn+"-B"]:"bold",[Yn+"-I"]:"italic"},en={[hr]:"\u6DFB\u52A0\u94FE\u63A5",[Un]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[dr]:"\u6DFB\u52A0\u56FE\u7247",[Ii]:"\u6DFB\u52A0\u753B\u56FE",[kn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Kr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var ni=({defaultValue:zt="",onChange:Kt,width:Ft="100%",height:un=400,miniToolbar:Ti=!1,isFocus:Ri=!1,watch:hi,insertTemp:Ut,mode:zn="markdown",id:xn="markdown-editor-id",showResizeBar:Fr=!1,noStorage:ri=!1,showNullButton:$t=!1,showNullProgramButton:_i=!1,hidetoolBar:Wr=!1,fullScreen:Br=!1,onBlur:Sn,onCMBeforeChange:or,onFullScreen:Xo,className:Na="",disablePaste:aa=!1,disabled:ur=!1,disabledFill:Nr=!1,placeholder:io="",values:va="",extraUse:Ho})=>{const[pi,lo]=(0,ve.useState)(null),[al,el]=(0,ve.useState)(zt),[Ns,ln]=(0,ve.useState)(hi),[Yo,Va]=(0,ve.useState)(Br),[Ao,ms]=(0,ve.useState)(""),[Ba,$a]=(0,ve.useState)(0),[Er,uo]=(0,ve.useState)(un),[So,Wn]=(0,ve.useState)(!1),[ka,Cn]=(0,ve.useState)(0),[Po,Ws]=(0,ve.useState)(0),ds=(0,ve.useRef)(),kl=(0,ve.useRef)(),Ss=(0,ve.useRef)(),Ua=(0,ve.useRef)();(0,ve.useEffect)(()=>{const Zi=window.scrollY||window.pageYOffset;el(va),pi==null||pi.setValue(va),window.scrollTo(0,Zi)},[va]),(0,ve.useEffect)(()=>{Xo==null||Xo(Yo)},[Yo]),(0,ve.useEffect)(()=>{if(ds.current){let Zi=function(pr,fn){var eo;if(aa){fn.preventDefault();return}const so=fn.clipboardData;if(so){const ya=so.types.toString(),fa=so.items;if(ya==="Files"||so.types.indexOf("Files")>-1){if(fn.preventDefault(),zn=="stex")return;try{let Ia=fa[1];((eo=fa[0])==null?void 0:eo.kind)==="file"&&(Ia=fa[0]);const ns=Ia.getAsFile(),Us=ns.name.split(".").pop();(0,ai.I)(ns,Ds=>{var fl,Hs,cn;Ds.id?((fl=ns==null?void 0:ns.type)==null?void 0:fl.indexOf("image"))>-1?vi.replaceSelection(``):((Hs=ns==null?void 0:ns.type)==null?void 0:Hs.indexOf("video"))>-1?vi.replaceSelection(``):((cn=ns==null?void 0:ns.type)==null?void 0:cn.indexOf("pdf"))>-1?vi.replaceSelection(`${ns.name}`):pn.includes(Us)?vi.replaceSelection(`${ns.name}`):vi.replaceSelection(`[${ns.name}](/api/attachments/${Ds.id}?type=${Ds.content_type})`):(Ds==null?void 0:Ds.status)===401&&(document.location.href="/user/login")})}catch(Ia){Yi.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const vi=wt().fromTextArea(ds.current,{mode:zn,lineNumbers:!Ti,lineWrapping:!0,value:zt,autoCloseTags:!0,autoCloseBrackets:!0});return vi.on("keyup",function(pr,fn){fn.keyCode===8&&(pr.getValue()==""?vi.setOption("placeholder",io):vi.setOption("placeholder",null))}),vi.on("keydown",function(pr,fn){if(fn.keyCode===8){var eo=tl(pr);eo&&fn.preventDefault()}}),Ri&&vi.focus(),vi.on("paste",Zi),ur&&vi.on("beforeChange",function(pr,fn){(fn.origin==="paste"||fn.origin==="+input")&&fn.cancel()}),lo(vi),()=>{vi.off("paste",Zi)}}},[]);const us=(0,ve.useCallback)(()=>{if(kl.current)try{}catch(Zi){console.log(Zi,"---- to set md editor body height")}},[Er,kl,Yo]);(0,ve.useEffect)(()=>{function Zi(){let vi=new Qt.Z(pr=>{for(let fn of pr)(fn.target.offsetHeight>0||fn.target.offsetWidth>0)&&(us(),pi.setSize("100%","100%"),pi.refresh())});return vi.observe(ds.current.parentElement),vi}if(pi){const vi=Zi();return()=>{var pr,fn;(pr=ds.current)!=null&&pr.parentElement&&vi.unobserve((fn=ds.current)==null?void 0:fn.parentElement)}}},[pi,us]),(0,ve.useEffect)(()=>{if(pi){let Zi=[];for(const[vi,pr]of Object.entries(In)){let fn={[vi]:()=>{ts(pr)}};Zi.push(fn),pi.addKeyMap(fn)}return()=>{for(let vi of Zi)pi.removeKeyMap(vi)}}},[pi]),(0,ve.useEffect)(()=>{Br!==Yo&&Va(Br)},[Br]),(0,Wa.Z)(()=>{if(!ri&&Ba>0){let Zi=new Date().getTime(),vi=window.sessionStorage.getItem(xn);Zi>=Ba+da&&(!vi||vi!==al)&&(window.sessionStorage.setItem(xn,al),Wn(!0))}},da),(0,ve.useEffect)(()=>{ln(hi)},[pi,hi]),(0,ve.useEffect)(()=>{pi&&Ri&&pi.focus()},[pi,Ri]),(0,ve.useEffect)(()=>{if(Ns&&pi){let Zi=function(pr){let fn=pr.target;if(Ua.current){let eo=fn.scrollTop/fn.scrollHeight;Ua.current.scrollTop=Ua.current.scrollHeight*eo}};const vi=pi.getScrollerElement();return vi.addEventListener("scroll",Zi),()=>{vi.removeEventListener("scroll",Zi)}}},[pi,Ns]),(0,ve.useEffect)(()=>{if(pi&&or){let Zi=function(vi,pr){or(vi,pr)};return pi.on("beforeChange",Zi),()=>{pi.off("beforeChange",Zi)}}},[pi,or]),(0,ve.useEffect)(()=>{if(pi&&Sn){let Zi=function(){Sn(pi.getValue())};return pi.on("blur",Zi),()=>{pi.off("blur",Zi)}}},[pi,Sn]);function tl(Zi,vi){var pr=Zi.getDoc(),fn=pr.getCursor(),eo=pr.getLine(fn.line),so=eo.charAt(fn.ch-1),ya=eo.lastIndexOf("@\u2581@",fn.ch),fa=eo.lastIndexOf("@\u2581\u2581@",fn.ch),Ia=ya>fa?ya:fa,ns=ya>fa?3:4;if(No.indexOf(so)===-1)return null;if(console.log("change1:",vi,Zi,eo,fn,Ia,ya,fa,so),Ia>=0&&fn.ch-Ia<5){var Us=Ia+ns;return pr.replaceRange("",{line:fn.line,ch:Ia},{line:fn.line,ch:Us}),{line:fn.line,ch:Us}}return null}(0,ve.useEffect)(()=>{if(pi){let Zi=function(vi,pr){const fn=vi.getValue();el(fn),$a(new Date().getTime()),vi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Kt&&(_i?Kt(fn,Yt(fn)):Kt(fn))};return pi.on("change",Zi),()=>{pi.off("change",Zi)}}},[pi,Kt]),(0,ve.useEffect)(()=>{if(pi)if(zt==null)pi.setValue(""),el("");else{const Zi=window.scrollY||window.pageYOffset;zt!==pi.getValue()&&(pi.setValue(zt),el(zt),pi.setCursor(ur?1:pi.lineCount(),0),window.scrollTo(0,Zi))}},[pi,zt]);const ts=(0,ve.useCallback)(Zi=>{const vi=pi.getCursor(),pr=pi.getSelection();let fn=pr.split(` `);switch(Zi){case"bold":return pi.replaceSelection("**"+pr+"**"),pr===""&&pi.setCursor(vi.line,vi.ch+2),pi.focus();case"italic":return pi.replaceSelection("*"+pr+"*"),pr===""&&pi.setCursor(vi.line,vi.ch+1),pi.focus();case"code":return pi.replaceSelection("`"+pr+"`"),pr===""&&pi.setCursor(vi.line,vi.ch+1),pi.focus();case"inline-latex":return ms("inline-latex"),pi.focus();case"latex":return pi.replaceSelection("```latex\n"+pr+"\n```"),pi.setCursor(vi.line+1,pr.length+1),pi.focus();case"line-break":return pi.replaceSelection(`
`),pi.focus();case"list-ul":return pr===""?pi.replaceSelection("- "+pr):pi.replaceSelection(fn.map(eo=>eo===""?"":`- ${eo}`).join(` `)),pi.focus();case"list-ol":return pr===""?pi.replaceSelection("1. "+pr):pi.replaceSelection(fn.map((eo,so)=>eo===""?"":`${so+1}. ${eo}`).join(` `)),pi.focus();case"add-null-ch":return pr===""&&pi.setCursor(vi.line,vi.ch),pi.replaceSelection(la),pi.focus();case"add-signal":return pr===""&&pi.setCursor(vi.line,vi.ch),pi.replaceSelection(ti),pi.focus();case"add-multiple":return pr===""&&pi.setCursor(vi.line,vi.ch),pi.replaceSelection(No),pi.focus();case"inster-template-1":return pr===""&&pi.setCursor(vi.line,vi.ch),pi.replaceSelection(Ee),pi.focus();case"eraser":return pi.setValue(""),pi.focus();case"trigger-watch":return ln(!Ns),pi.focus();case"trigger-full-screen":return Va(!Yo),pi.focus();case hr:ms(hr);return;case Un:ms(Un);return;case dr:ms(dr);return;case Ii:ms(Ii);return;case"maths-latex":ms("maths-latex");return;case kn:ms(kn);return;case Kr:ms(Kr);return;default:throw new Error}},[pi,Ns,Yo]),wr=(0,ve.useCallback)((Zi,vi)=>{var pr,fn,eo,so,ya,fa;switch(ms(""),Ao){case hr:const{title:fl,link:Hs}=Zi;return pi.replaceSelection(`[${fl}](${Hs})`),pi.focus();case Un:const{language:cn,content:nl}=Zi;return pi.replaceSelection(["```"+cn,nl,"```"].join(` `)),pi.focus();case"maths-latex":for(var Ia=atob(Zi),ns=new Uint8Array(Ia.length),Us=0;Us{Ra.id?pi.replaceSelection(`![,](/api/attachments/${Ra.id}?type=${Ra.content_type})`):(Ra==null?void 0:Ra.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":pi.replaceSelection("`$$"+Zi+"$$`");break;case dr:case Ii:case ra:const{src:dl,alt:gl}=Zi,Ys=vi,Ul=(eo=(fn=(pr=Ys==null?void 0:Ys.name)==null?void 0:pr.split("."))==null?void 0:fn.pop)==null?void 0:eo.call(fn);return((so=Ys==null?void 0:Ys.type)==null?void 0:so.indexOf("image"))>-1||!(Ys!=null&&Ys.type)?Ys!=null&&Ys.align||Ys!=null&&Ys.width?pi.replaceSelection(`

${gl||

`):pi.replaceSelection(`${gl||`):((ya=Ys==null?void 0:Ys.type)==null?void 0:ya.indexOf("video"))>-1?pi.replaceSelection(``):((fa=Ys==null?void 0:Ys.type)==null?void 0:fa.indexOf("pdf"))>-1?pi.replaceSelection(`${Ys.name}`):pn.includes(Ul)?pi.replaceSelection(`${Ys.name}`):pi.replaceSelection(`[${Ys.name}](${dl})`),pi.focus();case Kr:const{row:hu,col:fc,align:_s}=Zi;let il=` `;for(let Ra=0;Ra{switch(Ao){case hr:return ve.createElement(Ne,{callback:wr,onCancel:St});case Un:return ve.createElement(Rn.Z,{callback:wr,onCancel:St});case dr:return ve.createElement(ai.Z,{callback:wr,onCancel:St});case kn:return ve.createElement(Vn,{callback:wr,onCancel:St});case Kr:return ve.createElement(mn,{callback:wr,onCancel:St});case"maths-latex":return ve.createElement(Di,{showSaveButton:!0,callback:wr});case"inline-latex":return ve.createElement($r.Z,{showSaveButton:!0,callback:wr});default:return null}},[Ao]);function St(){ms("")}(0,ve.useEffect)(()=>{if(Ss.current){let Zi=function(ya){eo=!0,so=ya.pageY},vi=function(){eo=!1},pr=function(ya){if(eo){let fa=ya.pageY-so;fa<0&&(fa=0),fa>300&&(fa=300);let Ia=un+fa+"px";uo(Ia)}},fn=Ss.current,eo=!1,so=0;return fn.addEventListener("mousedown",Zi),document.addEventListener("mousemove",pr),document.addEventListener("mouseup",vi),()=>{fn.removeEventListener("mousedown",Zi),document.removeEventListener("mousemove",pr),document.removeEventListener("mouseup",vi)}}},[pi,Ss]),(0,ve.useEffect)(()=>{uo(un)},[un]);const Rt=hn(Ft),gn=hn(Er),Hn={width:Rt,height:gn},Oi=(0,ve.useMemo)(()=>{if(Ba){let Zi=new Date(Ba),vi=Zi.getHours(),pr=Zi.getMinutes(),fn=Zi.getSeconds();return vi=vi<10?"0"+vi:vi,pr=pr<10?"0"+pr:pr,fn=fn<10?"0"+fn:fn,`${vi}:${pr}:${fn}`}return 0},[Ba]),Yt=Zi=>{const vi=[];if(_i){let pr=-1;Zi=Zi.replace(/(@▁▁@|@▁@)/g,function(fn,eo,so){vi.push({multiLine:fn!==ti})})}return vi};function Zn(){window.sessionStorage.removeItem(xn),Wn(!1),$a(0)}function Ji(){Wn(!1),$a(0),pi.setValue(window.sessionStorage.getItem(xn))}(0,ve.useEffect)(()=>{en[Ao]&&Ao!==Ii&&Ao!==kn&&setTimeout(()=>{const Zi=document.getElementsByClassName("markdown-popup-form")[0],vi=window.innerWidth/2-Zi.offsetWidth/2,pr=window.innerHeight/2-Zi.offsetHeight/2;Cn(vi),Ws(pr)},0)},[Ao]);const xi=Zi=>{Zi.preventDefault();const vi=Zi.clientX-ka,pr=Zi.clientY-Po;document.body.onmousemove=fn=>{let eo=fn.clientX-vi,so=fn.clientY-pr;const ya=document.getElementsByClassName("markdown-popup-form")[0],fa=window.innerWidth-ya.offsetWidth,Ia=window.innerHeight-ya.offsetHeight;eo=Math.max(0,Math.min(eo,fa)),so=Math.max(0,Math.min(so,Ia)),nr(fn.clientX,fn.clientY,vi,pr)&&(Cn(eo),Ws(so))},document.body.onmouseup=function(){document.body.onmousemove=null}},nr=(Zi,vi,pr,fn)=>{const eo=document.body.clientHeight,so=document.body.clientWidth;return Zi<20&&pr>Zi||Zi>so-20&&prvi||vi>eo-20&&fnat in qe?Vt(qe,at,{enumerable:!0,configurable:!0,writable:!0,value:jt}):qe[at]=jt,se=(qe,at)=>{for(var jt in at||(at={}))ne.call(at,jt)&&ue(qe,jt,at[jt]);if(Te)for(var jt of Te(at))te.call(at,jt)&&ue(qe,jt,at[jt]);return qe},ge=(qe,at)=>ct(qe,We(at));const{useForm:me}=ve.default,xe={width:280,marginRight:10},Pe={labelCol:{span:5},wrapperCol:{span:19}};var Ke=({callback:qe,onCancel:at})=>{const[jt]=me();let Mt=(0,mt.useRef)();function bt(Jn){Mt.current.width=jt.getFieldValue("width"),Mt.current.align=jt.getFieldValue("align"),qe(Jn,Mt.current)}function Bt(Jn,qn){if(Jn.status===-1){ot.ZP.error(Jn.message);return}jt.setFieldsValue({src:`/api/attachments/${Jn.id}`,type:qn.type})}function Ht(Jn){let qn=Jn.target.files[0];Mt.current=qn,ft(qn,Bt)}return yt.createElement(ve.default,ge(se({form:jt},Pe),{className:"upload-image-panel",onFinish:bt,style:{width:470,overflow:"hidden"}}),yt.createElement(ve.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},yt.createElement("div",{className:"flex-container"},yt.createElement(ve.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},yt.createElement(wt.default,{style:xe})),yt.createElement(nt,{onFileChange:Ht}))),yt.createElement(ve.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},yt.createElement(wt.default,{style:{width:264}})),yt.createElement(ve.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},yt.createElement(Qt.Z,null,yt.createElement(ve.default.Item,{name:"width",style:{margin:0}},yt.createElement(Nt.Z,{style:{width:264}})),yt.createElement("span",{className:"ml8"},"%"))),yt.createElement(ve.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},yt.createElement(Re.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),yt.createElement("aside",null,yt.createElement(ve.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},yt.createElement(Je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),yt.createElement(Je.ZP,{type:"default",onClick:at},"\u53D6\u6D88"))))};function nt({onFileChange:qe}){return yt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",yt.createElement("input",{type:"file",onChange:qe}))}function ft(qe,at){if(!qe)throw new String("\u6CA1\u6709\u6587\u4EF6");let jt=new FormData;jt.append("editormd-image-file",qe),jt.append("file_param_name","editormd-image-file"),jt.append("byxhr","true");var Mt=new window.XMLHttpRequest;Mt.withCredentials=!0,Mt.addEventListener("load",function(bt){at(JSON.parse(bt.target.responseText),qe)},!1),Mt.addEventListener("error",function(bt){console.error(bt)},!1),Mt.open("POST",`${pt.KI}/api/attachments.json`),Mt.send(jt)}},76621:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return wt}});var ve=be(67294),ot=be(73935);class wt extends ve.Component{constructor(Nt){super(Nt);const Re=window.document;this.node=Re.createElement("div"),Re.body.appendChild(this.node)}render(){const{children:Nt}=this.props;return(0,ot.createPortal)(Nt,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(Dn,ei,be){"use strict";be.d(ei,{SV:function(){return At},ZP:function(){return Xt}});var ve=be(67294),ot=be(91033);const wt={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},Qt={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},Nt={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},Re={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},Je={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(` `)}]};var pt=be(84204),mt=be.n(pt),yt=(on,Si,Gt)=>new Promise((Xe,ke)=>{var Me=Oe=>{try{et(Gt.next(Oe))}catch(ut){ke(ut)}},He=Oe=>{try{et(Gt.throw(Oe))}catch(ut){ke(ut)}},et=Oe=>Oe.done?Xe(Oe.value):Promise.resolve(Oe.value).then(Me,He);et((Gt=Gt.apply(on,Si)).next())});const Vt={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},ct=(on,Si,Gt,Xe)=>{const ke=Si.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Gt.lineNumber,endColumn:Gt.column});return Array.from(new Set(ke.match(/\b\w{2,}\b/g)||[])).map(He=>({label:He,kind:on.languages.CompletionItemKind.Text,insertText:He,range:Xe}))},We=(on,Si,Gt,Xe)=>{on.languages.registerCompletionItemProvider(Si,{provideCompletionItems(ke,Me){const He=ke.getWordUntilPosition(Me),et={startLineNumber:Me.lineNumber,endLineNumber:Me.lineNumber,startColumn:He.startColumn,endColumn:He.endColumn},Oe=ke.getLineContent(Me.lineNumber).substring(He.startColumn-2,He.endColumn);return{suggestions:[...ct(on,ke,Me,et),...Gt.map(Vn=>({label:Vn,kind:on.languages.CompletionItemKind.Keyword,documentation:Vn,insertText:Vn,insertTextRules:on.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:et})),...Xe.map(Vn=>({label:Vn.label,kind:on.languages.CompletionItemKind.Snippet,documentation:Vn.content,insertText:Oe.startsWith("#")?Vn.content.replace(/#/,""):Vn.content,insertTextRules:on.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:et}))]}}})};var Te=on=>{Vt.languages.forEach(Si=>{on.languages.registerDocumentFormattingEditProvider(Si,{provideDocumentFormattingEdits(Gt){return yt(this,null,function*(){const Xe=mt()(Gt.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Gt.getFullModelRange(),text:Xe}]})}})}),We(on,"java",Qt.keywords,Qt.quickKey),We(on,"cpp",Nt.keywords,Nt.quickKey),We(on,"c",wt.keywords,[]),We(on,"python",Re.keywords,Re.quickKey),We(on,"scala",Je.keywords,Je.quickKey)};const ne="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var te=Object.defineProperty,ue=(on,Si,Gt)=>Si in on?te(on,Si,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):on[Si]=Gt,se=(on,Si,Gt)=>ue(on,typeof Si!="symbol"?Si+"":Si,Gt);const ge=class Ex{constructor(Si,Gt,Xe){this.placeholder=Si,this.editor=Gt,this.monaco=Xe,Gt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Ex.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};se(ge,"ID","editor.widget.placeholderHint");var xe=ge,Pe=be(84144),Ke=be(2453),nt=be(83062),ft=be(96486),qe=be(33054),at=be(74855),jt=Object.defineProperty,Mt=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable,qn=(on,Si,Gt)=>Si in on?jt(on,Si,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):on[Si]=Gt,sn=(on,Si)=>{for(var Gt in Si||(Si={}))Ht.call(Si,Gt)&&qn(on,Gt,Si[Gt]);if(Bt)for(var Gt of Bt(Si))Jn.call(Si,Gt)&&qn(on,Gt,Si[Gt]);return on},Nn=(on,Si)=>Mt(on,bt(Si)),lt=(on,Si)=>{var Gt={};for(var Xe in on)Ht.call(on,Xe)&&Si.indexOf(Xe)<0&&(Gt[Xe]=on[Xe]);if(on!=null&&Bt)for(var Xe of Bt(on))Si.indexOf(Xe)<0&&Jn.call(on,Xe)&&(Gt[Xe]=on[Xe]);return Gt},Ge=(on,Si,Gt)=>new Promise((Xe,ke)=>{var Me=Oe=>{try{et(Gt.next(Oe))}catch(ut){ke(ut)}},He=Oe=>{try{et(Gt.throw(Oe))}catch(ut){ke(ut)}},et=Oe=>Oe.done?Xe(Oe.value):Promise.resolve(Oe.value).then(Me,He);et((Gt=Gt.apply(on,Si)).next())});function Ne(on){return/^\d+$/.test(on)?`${on}px`:on}function Rn(){}let ai=!1;const Zt={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function ci(on=[]){let Si=on;if(Array.isArray(on)){for(let Gt=0;GtGe(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(on){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",on)}});var Xt=on=>{var Si=on,{width:Gt="100%",height:Xe="100%",value:ke,language:Me="javascript",style:He={},options:et={},overrideServices:Oe={},theme:ut="vs-dark",onEditBlur:Vn,isCopy:jn=!1,onSave:An,autoHeight:Pn=!1,forbidCopy:si=!1,onChange:mn=Rn,editorDidMount:Fi=Rn,onFocus:Vi=Rn,onBreakPoint:Ir=Rn,breakPointValue:Qi=[],filename:Di="educoder.txt",errorLine:$r,errorContent:Yi="",highlightLine:hr,openBreakPoint:dr=!1,placeholder:kn="",showMiniMap:Ii=!0}=Si,ra=lt(Si,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const Un=(0,ve.useRef)(),Kr=(0,ve.useRef)({}),ia=(0,ve.useRef)(),sa=(0,ve.useRef)(),Wa=(0,ve.useRef)([]),ma=(0,ve.useRef)(!1),Ha=(0,ve.useRef)(),da=(0,ve.useRef)(),la=(0,ve.useRef)(!1),[No,ti]=(0,ve.useState)(!1);function Ee(){let Ut;return Un.current&&(Ut=new ot.Z(zn=>{for(let xn of zn)(xn.target.offsetHeight>0||xn.target.offsetWidth>0)&&Kr.current.instance.layout()}),Ut.observe(Un.current)),Ut}function pn(){Ke.ZP.warning({content:decodeURIComponent(ne),key:"monaco-editor-tip"})}const hn=()=>{let Ut=Kr.current.instance;if(ke!=null&&Ut&&No){const zn=Ut.getModel();zn&&ke!==zn.getValue()&&(ai=!0,zn.setValue(ke),Ut.layout(),ai=!1)}};(0,ve.useEffect)(()=>{const Ut=qe.Z.subscribe("formatDocument",zn=>{var xn;let Fr=Kr.current.instance;(xn=Fr==null?void 0:Fr.getAction)==null||xn.call(Fr,"editor.action.formatDocument").run()});return window.updateMonacoValue=zn=>{mn(zn)},Ut},[]),(0,ve.useEffect)(()=>{var Ut;let zn=Kr.current.instance;sa.current&&clearTimeout(sa.current),sa.current=setTimeout(()=>{hn()},500),ke&&(ke!=null&&ke.length)&&((Ut=zn==null?void 0:zn.updateOptions)==null||Ut.call(zn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ke.split(/\r\n|\r|\n/g).length))+3,5)}))},[ke,No,Kr.current]),(0,ve.useEffect)(()=>{if($r&&Kr.current&&Kr.current.instance){let zn=Kr.current.instance;zn.changeViewZones(function(xn){var Fr=document.createElement("div");Fr.style.padding="10px 20px",Fr.style.width="calc(100% - 20px)",Fr.className="my-error-line-wrp",Fr.innerHTML=Yi,xn.addZone({afterLineNumber:$r||11,heightInLines:3,domNode:Fr})});var Ut={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};zn.addOverlayWidget(Ut),zn.revealPositionInCenter({lineNumber:20,column:1})}},[$r,Kr.current,No]);const ii=(Ut="",zn)=>{if(!Ut||Ut.trim()==="")return!0;const Fr=Kr.current.instance.getModel().getLineTokens(zn);let ri=!1;for(let $t=0;$t<2;$t++)Fr.getStandardTokenType($t)===1&&(ri=!0);return ri};(0,ve.useEffect)(()=>{var Ut;const zn=(Ut=Kr.current)==null?void 0:Ut.instance;if(zn&&No&&si){const xn=zn.onDidBlurEditorWidget(()=>{la.current=!1}),Fr=zn.onDidFocusEditorText(()=>{la.current=!0});return()=>{xn.dispose(),Fr.dispose()}}},[Kr.current,No,si]),(0,ve.useEffect)(()=>{var Ut;if((Ut=Kr.current)!=null&&Ut.instance&&No&&dr){let zn=Kr.current.instance,xn=zn.getModel();if(!xn)return;(()=>{var ur;let Nr=[],io=[];const va=xn.getAllDecorations();for(let pi of va)pi.options.className==="highlighted-line"&&(Nr.push((ur=pi==null?void 0:pi.range)==null?void 0:ur.startLineNumber),io.push(pi==null?void 0:pi.id));if(hr===Nr[0])return;xn.deltaDecorations(io,[]);const Ho=xn.getLineCount();hr&&hr<=Ho&&(zn.deltaDecorations([],[{range:new On.Range(hr,1,hr,xn.getLineMaxColumn(hr)),options:{isWholeLine:!0,className:"highlighted-line"}}]),zn.revealLineInCenter(hr))})();const ri=(ur=!1)=>{var Nr;let io=[],va=[];const Ho=xn.getAllDecorations();for(let pi of Ho)pi.options.linesDecorationsClassName==="breakpoints-select"&&(io.push((Nr=pi==null?void 0:pi.range)==null?void 0:Nr.startLineNumber),va.push(pi==null?void 0:pi.id));if(ur)return{lines:io,ids:va};Ir(io)},$t=ur=>Ge(void 0,null,function*(){let Nr={range:new On.Range(ur,1,ur,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield xn.deltaDecorations([],[Nr]),ri()}),_i=ur=>Ge(void 0,null,function*(){let Nr=[];const io=zn.getLineDecorations(ur);for(let va of io)va.options.linesDecorationsClassName==="breakpoints-select"&&Nr.push(va.id);yield xn.deltaDecorations(Nr,[]),ri()}),Wr=ur=>{let Nr=zn.getLineDecorations(ur);for(let io of Nr)if(io.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ft.isEqual)(Qi,ri(!0).lines)){xn.deltaDecorations(ri(!0).ids,[]);const ur=Qi.map(Nr=>({range:new On.Range(Nr,1,Nr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));xn.deltaDecorations([],ur)}const Br=zn.onDidChangeModelContent(ur=>{let Nr=zn.getPosition();if(Nr){let io=Nr.lineNumber;clearTimeout(da.current),da.current=setTimeout(()=>{ii(xn.getLineContent(io),io)?_i(io):Wr(io)?(_i(io),$t(io)):ri()},100)}}),Sn=zn.onMouseDown(ur=>{var Nr,io,va;if(ur.target.detail&&((va=(io=(Nr=ur.target)==null?void 0:Nr.element)==null?void 0:io.className)!=null&&va.includes("line-numbers"))){let Ho=ur.target.position.lineNumber;if(ii(xn.getLineContent(Ho),Ho))return;Wr(Ho)?_i(Ho):$t(Ho)}}),or=ur=>{let Nr={range:new On.Range(ur,1,ur,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Wa.current=zn.deltaDecorations(Wa.current,[Nr])},Xo=()=>{Wa.current=zn.deltaDecorations(Wa.current,[])},Na=zn.onMouseMove(ur=>{var Nr,io,va;if(Xo(),ur.target.detail&&((va=(io=(Nr=ur.target)==null?void 0:Nr.element)==null?void 0:io.className)!=null&&va.includes("line-numbers"))){let Ho=ur.target.position.lineNumber;if(ii(xn.getLineContent(Ho),Ho))return;or(Ho)}}),aa=zn.onMouseLeave(()=>{Xo()});return()=>{Br.dispose(),Sn.dispose(),Na.dispose(),aa.dispose()}}},[Kr.current,No,Qi,hr,dr,Me]),(0,ve.useEffect)(()=>{var Ut;(Ut=Kr.current)!=null&&Ut.instance&&dr&&Kr.current.instance.setPosition({lineNumber:0,column:0})},[hr]);function Yn(){let Ut=Kr.current.instance;if(Ut){const zn=Ut.getSelection(),xn=Kr.current.pastePos||{},Fr=new On.Range(xn.startLineNumber||zn.endLineNumber,xn.startColumn||zn.endColumn,xn.endLineNumber||zn.endLineNumber,xn.endColumn||zn.endColumn);setTimeout(()=>{Ut.executeEdits("",[{range:Fr,text:""}])},300)}}function In(Ut){(window.navigator.platform.match("Mac")?Ut.metaKey:Ut.ctrlKey)&&Ut.keyCode==83&&(Ut.preventDefault(),An())}const en=()=>{if(Pn&&Kr.current.instance){const Ut=Kr.current.instance.getContentHeight();Ri(Ut{if(!la.current)return;const{keyCode:zn,ctrlKey:xn,metaKey:Fr,target:ri,type:$t}=Ut;return($t==="paste"||(zn===67||zn===86)&&(Fr||xn))&&ri.nodeName==="TEXTAREA"&&(pn(),Ut.preventDefault()),!1};function Kt(Ut,zn){var xn=window.URL||window.webkitURL||window,Fr=new Blob([zn]),ri=document.createElementNS("http://www.w3.org/1999/xhtml","a");ri.href=xn.createObjectURL(Fr),ri.download=Ut,ni(ri)}(0,ve.useEffect)(()=>{en()},[en]),(0,ve.useEffect)(()=>{Un.current&&!No&&Promise.all([be.e(5552),be.e(9651)]).then(be.bind(be,55826)).then(Ut=>{try{On=Ut,Kr.current.instance=On.editor.create(Un.current,{value:ke,language:ci(Me),theme:ut,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ii||!1}},Oe);const zn=Kr.current.instance;let ri=[...Pe.BH._menuItems].find(Br=>Br[0]._debugName=="EditorContext")[1],$t=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],_i=(Br,Sn)=>{var or,Xo;let Na=Br._first;do Sn.includes((Xo=(or=Na.element)==null?void 0:or.command)==null?void 0:Xo.id)&&Br._remove(Na);while(Na=Na.next)};if(Fi(zn,On),setTimeout(()=>{en(),Kr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Kt(Di||"educoder.txt",zn.getValue())}})},500),Kr.current.subscription=zn.onDidChangeModelContent(Br=>{ma.current?clearTimeout(Ha.current):(en(),mn(zn.getValue(),Br)),Ha.current=setTimeout(()=>{ma.current=!1},500)}),window.Monaco||Te(On,ci(Me)),si&&(_i(ri,$t),Un.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",zt),window.removeEventListener("paste",zt),window.addEventListener("keydown",zt),window.addEventListener("paste",zt)),window.Monaco=On,Vn&&zn.onDidBlurEditorWidget(()=>{Vn(zn.getValue())}),Vi&&zn.onDidFocusEditorText(()=>{si&&Mi(),Vi(zn.getValue())}),si){Mi();try{zn.onDidPaste(Br=>{const Sn=zn.getSelection(),or=Kr.current.pastePos||{},Xo=new On.Range(or.startLineNumber||Sn.endLineNumber,or.startColumn||Sn.endColumn,or.endLineNumber||Sn.endLineNumber,or.endColumn||Sn.endColumn);zn.executeEdits("",[{range:Br.range,text:""}])})}catch(Br){}}let Wr=Ee();return kn&&typeof kn=="string"&&new xe(kn,zn,On),ti(!0),()=>{const Br=Kr.current.instance;Br.dispose();const Sn=Br.getModel();Sn&&Sn.dispose(),Kr.current.subscription&&Kr.current.subscription.dispose(),Wr.unobserve(Un.current)}}catch(zn){}})},[]),(0,ve.useEffect)(()=>{if(Kr.current.instance&&No)return document.addEventListener("keydown",In,!1),()=>{document.removeEventListener("keydown",In)}},[An,No]),(0,ve.useEffect)(()=>{let Ut=Kr.current.instance;if(Ut&&No){let zn=ci(Me);On.editor.setModelLanguage(Ut.getModel(),zn)}},[Me,No]),(0,ve.useEffect)(()=>{Kr.current.instance&&No&&On.editor.setTheme(ut)},[ut,No]),(0,ve.useEffect)(()=>{let Ut=Kr.current.instance;ia.current=et,Ut&&No&&(Ut.updateOptions(sn({},et)),setTimeout(()=>{Ut.getModel().updateOptions(sn({},et))},200))},[JSON.stringify(et),No]),(0,ve.useEffect)(()=>{let Ut=Kr.current.instance;Ut&&No&&Ut.layout()},[Gt,Xe,No]);const[Ft,un]=(0,ve.useState)(Ne(Gt)),[Ti,Ri]=(0,ve.useState)(Ne(Xe)),hi=Nn(sn({},He),{width:Ft,height:Ti,position:"relative"});return ve.createElement("div",{className:"my-monaco-editor",ref:Un,style:hi},jn&&ve.createElement(at.CopyToClipboard,{text:ke,onCopy:()=>Ke.ZP.success("\u590D\u5236\u6210\u529F")},ve.createElement(nt.Z,{title:"\u590D\u5236\u4EE3\u7801"},ve.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ve.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function At({width:on="100%",height:Si="100%",original:Gt,modified:Xe,language:ke,options:Me={}}){const He=(0,ve.useRef)(),[et,Oe]=(0,ve.useState)(null);function ut(Pn){let si;return He.current&&(si=new ot.Z(mn=>{for(let Fi of mn)(Fi.target.offsetHeight>0||Fi.target.offsetWidth>0)&&Pn.layout()}),si.observe(He.current)),si}(0,ve.useEffect)(()=>(He.current&&Promise.all([be.e(5552),be.e(9404)]).then(be.bind(be,50048)).then(Pn=>{On=Pn;const si=On.editor.createDiffEditor(He.current,Nn(sn({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Me),{wordWrap:!0}));Oe(si);let mn=ut(si);return()=>{si.dispose();const Fi=si.getModel();Fi&&Fi.dispose(),mn.unobserve(He.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ve.useEffect)(()=>{et&&et.setModel({original:On.editor.createModel(Gt,ke),modified:On.editor.createModel(Xe,ke)})},[Gt,Xe,ke,et]);const Vn=Ne(on),jn=Ne(Si),An={width:Vn,height:jn};return ve.createElement("div",{className:"my-diff-editor",ref:He,style:An})}},5476:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return Vt}});var ve={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},ot=be(74330),wt=be(83062),Qt=be(94184),Nt=be.n(Qt),Re=be(28706),Je=be(26194),pt=be(52262),mt=be(67294),Vt=({className:ct,dataSource:We=[],col:Te=4,right:ne,bottom:te=23,precision:ue=0,wrapWidth:se=1200,trackEventItems:ge,loading:me,onRemove:xe=()=>{},isCurrent:Pe=!0,showAlias:Ke=!1})=>{const nt=Math.floor((se-(Te-1)*ne)/Te),ft=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return mt.createElement(ot.Z,{spinning:me},mt.createElement("div",{className:Nt()(ve.list,ct)},!!(We!=null&&We.length)&&(We==null?void 0:We.map((qe,at)=>{var jt;const{name:Mt,id:bt,identifier:Bt,featured:Ht,school_name:Jn,image_url:qn,excellent:sn,is_plan:Nn}=qe;return mt.createElement("div",{key:bt,className:ve.wrap,style:{width:nt,marginRight:(1+at)%Te===0?0:ne+ue,marginBottom:te}},mt.createElement("a",{className:ve.li,onClick:lt=>{lt.preventDefault(),lt.stopPropagation(),ge&&(0,Re.L9)([ge]),(0,Re.xg)(`/paths/${Bt}`)}},mt.createElement("div",{className:ve.img},mt.createElement("img",{className:ve.cover,src:`${qn}`}),Pe&&(0,pt.bg)()&&(qe==null?void 0:qe.studying)&&mt.createElement("div",{className:`${ve.movebq} user-path-items`,onClick:lt=>{lt.stopPropagation(),xe(qe)}},mt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),mt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(jt=qe==null?void 0:qe.subject_tags)==null?void 0:jt.map((lt,Ge)=>{var Ne,Rn;if(Ge===0){const Zt=(Ne=ft.find(ci=>ci.name==lt))==null?void 0:Ne.swimg;return mt.createElement("img",{className:ve.sign,src:Zt,style:{left:"-4px"}})}const ai=(Rn=ft.find(Zt=>Zt.name==lt))==null?void 0:Rn.ptimg;return mt.createElement("img",{className:ve.sign,src:ai,style:{left:`${48+52*(Ge-1)+2*Ge}px`}})}),mt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(qe==null?void 0:qe.excellent)&&mt.createElement("div",{className:ve.bq},"\u5F00\u653E\u8BFE\u7A0B"))),mt.createElement("div",{className:ve.name},mt.createElement(wt.Z,{title:Ke&&(qe!=null&&qe.excellent_alias_name)?mt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Mt}`,mt.createElement("br",null),mt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${qe==null?void 0:qe.excellent_alias_name}`)):Mt},mt.createElement("span",{className:ve.e},Ke&&(qe==null?void 0:qe.excellent_alias_name)||Mt))),mt.createElement(wt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Jn}`},mt.createElement("div",{className:ve.unit},mt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Jn)),mt.createElement("div",{className:ve.tags},mt.createElement("div",null,mt.createElement(wt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},mt.createElement("span",null,mt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),mt.createElement("span",null,qe.stages_count))),mt.createElement(wt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},mt.createElement("span",null,mt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),mt.createElement("span",null,qe.members_count)))))))})),!We.length&&mt.createElement(Je.Z,null)))}},30001:function(Dn,ei,be){"use strict";be.d(ei,{jL:function(){return Nt},w9:function(){return Ne},QD:function(){return $r},cQ:function(){return qn.Z},op:function(){return mn},O5:function(){return hn},_b:function(){return ra},t7:function(){return se},Gi:function(){return Mi},YG:function(){return ci},qp:function(){return Vt},vr:function(){return dr},qE:function(){return Ir},Je:function(){return xe},wb:function(){return Jn},cq:function(){return Xe},tp:function(){return Te}});var ve=be(67294),ot={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",Nt=({dataSource:ii=[],img:Yn,imgWidth:In=346,title:en,sunTitle:ni,bannerExtraContent:zt})=>ve.createElement("div",{className:ot.banner},ve.createElement("div",{className:ot.content},ve.createElement("aside",null,ve.createElement("p",null,ve.createElement("b",null,en),ve.createElement("span",null,ni)),ii.length>0&&ve.createElement("div",{className:ot.btns},ii.map((Kt,Ft)=>ve.createElement("div",{key:Ft,onClick:Kt.click},Kt.name,Kt.sign?ve.createElement("img",{src:wt,width:39}):null))),zt),Yn&&ve.createElement("img",{style:{marginTop:33,marginRight:38},src:Yn,width:In}))),Re={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},Je=be(94184),pt=be.n(Je),mt=be(96486),Vt=({dataSource:ii=[],value:Yn,onChange:In,onTitleChange:en,className:ni,title:zt,titleWidth:Kt=41,style:Ft={},fontColor:un="#6A7283",showCount:Ti})=>{const[Ri,hi]=(0,ve.useState)(0),[Ut,zn]=(0,ve.useState)(!1),xn=(0,ve.useRef)(null),Fr=(0,ve.useRef)(null);return(0,ve.useEffect)(()=>{var ri;ii.length!==0&&(((ri=xn==null?void 0:xn.current)==null?void 0:ri.clientHeight)>97?hi(1):hi(0)),ii.length===0&&hi(0),zn(!1)},[ii]),ve.createElement("div",{className:pt()(Re.row,ni),style:Ft},ve.createElement("div",{onClick:(0,mt.throttle)(()=>en==null?void 0:en(),2e3),style:{width:Kt,marginTop:Ut?12:4},className:`${Re.title} ${en?"current":""}`},zt),ve.createElement("div",{className:Ut?`${Re.tagsWrap} ${Re.tagsBorderWrap}`:Re.tagsWrap},ve.createElement("div",{className:Re.bar,ref:Fr,style:Ri>0?{height:Ri===1?97:"auto",overflow:Ri===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},ve.createElement("div",{className:Re.tag,ref:xn},ii==null?void 0:ii.map(ri=>ve.createElement("span",{onClick:()=>In(ri.id),key:ri.id,style:{color:un},className:Yn===ri.id?Re.active:""},ve.createElement("span",{title:ri.name,className:Re.name},ri.name),!!Ti&&ve.createElement("span",{className:Re.num},ri.count))))),!!Ri&&ve.createElement(ve.Fragment,null,Ri===1?ve.createElement("div",{onClick:()=>{var ri;hi(2),((ri=xn==null?void 0:xn.current)==null?void 0:ri.clientHeight)>245?zn(!0):zn(!1)},className:Re.action},"\u5C55\u5F00",ve.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):ve.createElement("div",{onClick:()=>{Fr.current.scrollTop=0,hi(1),zn(!1)},className:Re.action},"\u6536\u8D77",ve.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},ct={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Te=({dataSource:ii=[],value:Yn,onChange:In,className:en,style:ni={}})=>ve.createElement("div",{style:ni,className:pt()(ct.tabs,en)},ii.map(zt=>ve.createElement("span",{onClick:()=>In(zt.id),className:Yn===zt.id?ct.active:"",key:zt.id},zt.name))),ne={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},te=be(28802),se=({dataSource:ii=[],value:Yn="",onChange:In,onInputChange:en=()=>{},className:ni,style:zt={},placeholder:Kt,allowClear:Ft=!1})=>{var un;const[Ti,Ri]=(0,ve.useState)(""),[hi,Ut]=(0,ve.useState)("");(0,ve.useEffect)(()=>{var Fr;let ri=Yn;(Fr=JSON.stringify(Yn))!=null&&Fr.includes("{")&&(Ri(Yn.id),ri=Yn.value||"");try{Ut(decodeURIComponent(ri||""))}catch($t){Ut(decodeURIComponent(ri||""))}},[Yn]);const zn=()=>{In(encodeURIComponent(hi),Ti||null)},xn=Fr=>{Fr!==Ti&&(Ri(Fr),In(encodeURIComponent(hi),Fr))};return ve.createElement("div",{className:pt()(ne.input,ni),style:zt},!!ii.length&&ve.createElement("div",{className:ne.dropdown},ve.createElement("div",{className:ne.text},(un=ii.find(Fr=>Fr.id===Ti))==null?void 0:un.name,ve.createElement("i",{className:"iconfont icon-zhankai4"}),ve.createElement("b",{className:ne.b1}),ve.createElement("b",{className:ne.b2})),ve.createElement("div",{className:ne.menu},ii.map((Fr,ri)=>ve.createElement("div",{key:ri,onClick:()=>xn(Fr.id)},Fr.name)))),ve.createElement(te.default,{onPressEnter:zn,value:hi,onChange:Fr=>{Ut(Fr.target.value),en(encodeURIComponent(Fr.target.value),Ti||null)},bordered:!1,placeholder:Kt}),ve.createElement("i",{onClick:zn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ge={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},xe=({value:ii,onChange:Yn,className:In,total:en,pageSize:ni,style:zt={}})=>{const Kt=ii<2,Ft=ii>=Math.ceil(en/ni);return en<=ni?ve.createElement(ve.Fragment,null):ve.createElement("div",{className:pt()(ge.quickPager,In),style:zt},ve.createElement("div",{onClick:()=>{Kt||Yn(ii-1,"prev")},className:Kt?ge.disabled:""},"\u4E0A\u4E00\u9875"),ve.createElement("div",{onClick:()=>{Ft||Yn(ii+1,"next")},className:Ft?ge.disabled:""},"\u4E0B\u4E00\u9875"))},Pe={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Ke=be(74330),nt=be(83062),ft=be(57097),qe=be(11320),at=be(28706),jt=be(96908),Mt=be(57177),bt=be(81378),Bt=be(26194),Jn=({className:ii,dataSource:Yn=[],col:In=4,right:en,bottom:ni=23,precision:zt=0,wrapWidth:Kt=1200,trackEventItems:Ft,loading:un})=>{const Ti=Math.floor((Kt-(In-1)*en)/In);return ve.createElement(Ke.Z,{spinning:un},ve.createElement("div",{className:pt()(Pe.list,ii)},!!Yn.length&&Yn.map((Ri,hi)=>{const{name:Ut,id:zn,identifier:xn,power:Fr,cover_image_id:ri,pic:$t}=Ri;return ve.createElement("div",{className:Pe.wrap,key:zn,style:{width:Ti,marginRight:(1+hi)%In===0?0:en+zt,marginBottom:ni}},ve.createElement("a",{target:"_blank",href:`/shixuns/${xn}/challenges`,className:Pe.li,onClick:_i=>{_i.preventDefault(),Ft&&(0,at.L9)([Ft]),Fr&&(0,at.xg)(`/shixuns/${xn}/challenges`)}},ve.createElement("div",{className:Pe.img},ve.createElement("img",{className:Pe.cover,src:`${$t}`}),Ri.is_jupyter&&ve.createElement("img",{className:Pe.sign,src:jt}),Ri.is_jupyter_lab&&ve.createElement("img",{className:Pe.sign,src:Mt}),Ri.is_unity_3d&&ve.createElement("img",{className:Pe.sign,src:bt})),ve.createElement("div",{className:Pe.name},ve.createElement(nt.Z,{title:Ut||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},ve.createElement("span",{className:Pe.e},Ut||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),ve.createElement("div",{className:Pe.tags},ve.createElement(nt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},ve.createElement("span",null,ve.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),ve.createElement("span",null,Ri.challenges_count))),!!Ri.myshixuns_count&&ve.createElement(nt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ve.createElement("span",null,ve.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),ve.createElement("span",null,Ri.myshixuns_count))),ve.createElement(nt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},ve.createElement("span",null,ve.createElement("span",null,Ri.level))),ve.createElement("div",{className:Pe.rate},ve.createElement(ft.Z,{allowHalf:!0,disabled:!0,defaultValue:Ri.score_info}),ve.createElement("span",null,"\xA0",Ri.score_info?`${Ri.score_info}\u5206`:"5\u5206")))),!Fr&&ve.createElement("div",{className:Pe.lockWrap},ve.createElement("img",{src:`${qe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),ve.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Yn.length&&ve.createElement(Bt.Z,null)))},qn=be(5476),sn={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},Nn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",lt=be(67294),Ne=({className:ii,dataSource:Yn=[],col:In=4,right:en,bottom:ni=23,precision:zt=0,wrapWidth:Kt=1200,trackEventItems:Ft,loading:un,handleVery:Ti=()=>!0})=>{const Ri=Math.floor((Kt-(In-1)*en)/In);return lt.createElement(Ke.Z,{spinning:un},lt.createElement("div",{className:pt()(sn.list,ii)},!!Yn.length&&Yn.map((hi,Ut)=>{const{subject_identifier:zn,id:xn,identifier:Fr,power:ri}=hi,$t=hi.is_public!=0&&hi.is_public;return lt.createElement("div",{className:sn.wrap,key:xn,style:{width:Ri,marginRight:(1+Ut)%In===0?0:en+zt,marginBottom:ni}},lt.createElement("a",{className:sn.li,onClick:_i=>{_i.preventDefault(),Ti(hi==null?void 0:hi.first_category_url)&&(Ft&&(0,at.L9)([Ft]),(0,at.xg)(hi.first_category_url))}},lt.createElement("div",{className:sn.top},lt.createElement(nt.Z,{title:hi.name},lt.createElement("div",{className:sn.name},hi.name)),lt.createElement("img",{className:sn.img,src:qe.Z.IMG_SERVER+"/images/"+hi.avatar_url}),lt.createElement("div",{className:sn.text,title:hi.creator},hi.creator),zn&<.createElement("div",{className:sn.btns},lt.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),lt.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),$t&<.createElement("div",{className:sn.sign},"\u516C\u5F00")),lt.createElement("div",{className:sn.bottom},hi.visits>0&<.createElement(nt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},lt.createElement("span",null,lt.createElement("i",{className:"iconfont icon-liulanyan"}),lt.createElement("span",null,hi.visits))),hi.course_members_count>0&<.createElement(nt.Z,{title:"\u6210\u5458",placement:"bottom"},lt.createElement("span",null,lt.createElement("i",{className:"iconfont icon-chengyuan"}),hi.course_members_count)),hi.tasks_count>0&<.createElement(nt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},lt.createElement("span",null,lt.createElement("i",{className:"iconfont icon-zuoye"}),hi.tasks_count)),hi.is_end?lt.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):lt.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!hi.is_accessible&<.createElement("div",{className:sn.lockWrap},lt.createElement("img",{src:`${qe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),lt.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Yn.length&<.createElement(Bt.Z,null)))},Rn={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},ai=be(35973),ci=({dataSource:ii=[],value:Yn,onChange:In,className:en,style:ni={},tabBarExtraContent:zt})=>ve.createElement("div",{className:pt()(Rn.tabs,en),style:ni},ve.createElement("div",{className:Rn.tabsWrap},ii.map((Kt,Ft)=>!(Kt!=null&&Kt.hide)&&ve.createElement("aside",{className:Rn.tab,onClick:()=>{In(Kt.id),Kt.link&&ai.history.push(Kt.link)},key:Ft},ve.createElement("div",{className:Yn===Kt.id?Rn.active:""},Kt.name),(Kt==null?void 0:Kt.resetCount)==null&&(Kt==null?void 0:Kt.total)!==void 0&&ve.createElement("span",null,"\uFF08",Kt==null?void 0:Kt.total,"\uFF09"),(Kt==null?void 0:Kt.resetCount)!==void 0&&(Kt==null?void 0:Kt.total)!==void 0&&ve.createElement(nt.Z,{title:(Kt==null?void 0:Kt.tip)!=null?Kt==null?void 0:Kt.tip:""},ve.createElement("span",{style:{color:"#9096A3"}},"\uFF08",ve.createElement("span",{style:{color:"#000"}},Kt==null?void 0:Kt.resetCount),"/",ve.createElement("span",null,Kt==null?void 0:Kt.total),"\uFF09"))))),ve.createElement("div",{className:Rn.tabBar},zt)),Mi=({className:ii,style:Yn={},children:In})=>ve.createElement("div",{className:pt()(ii),style:Yn},In),Xt={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},At=be(85418),on=be(50136);const Si=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Xe=({sortValue:ii,dropValue:Yn,className:In,onSort:en,onDrop:ni,dataSource:zt=Si})=>{var Kt;return ve.createElement("div",{className:pt()(Xt.orderWrap,In)},ve.createElement(At.Z,{dropdownRender:()=>ve.createElement(on.default,null,zt.map((Ft,un)=>ve.createElement(on.default.Item,{key:un,onClick:()=>ni(Ft.id)},Ft.name)))},ve.createElement("span",{className:Xt.orderTextWrap},(Kt=zt.find(Ft=>Yn===Ft.id))==null?void 0:Kt.name)),ve.createElement("span",{className:Xt.orderIconWrap},ve.createElement("span",{className:Xt.orderAsc},ve.createElement("i",{className:ii==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Xt.cursorPointer} ${Xt.active}`:`iconfont icon-sanjiaoxing-up font12 ${Xt.cursorPointer}`,onClick:()=>en(ii==="asc"?"desc":"asc")})),ve.createElement("span",{className:Xt.orderDesc},ve.createElement("i",{className:ii==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Xt.cursorPointer} ${Xt.active}`:`iconfont icon-sanjiaoxing-down font12 ${Xt.cursorPointer}`,onClick:()=>en(ii==="asc"?"desc":"asc")}))))},ke={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Me=be(85804),He=Object.defineProperty,et=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,Vn=(ii,Yn,In)=>Yn in ii?He(ii,Yn,{enumerable:!0,configurable:!0,writable:!0,value:In}):ii[Yn]=In,jn=(ii,Yn)=>{for(var In in Yn||(Yn={}))Oe.call(Yn,In)&&Vn(ii,In,Yn[In]);if(et)for(var In of et(Yn))ut.call(Yn,In)&&Vn(ii,In,Yn[In]);return ii},An=(ii,Yn)=>{var In={};for(var en in ii)Oe.call(ii,en)&&Yn.indexOf(en)<0&&(In[en]=ii[en]);if(ii!=null&&et)for(var en of et(ii))Yn.indexOf(en)<0&&ut.call(ii,en)&&(In[en]=ii[en]);return In},Pn=(ii,Yn,In)=>new Promise((en,ni)=>{var zt=un=>{try{Ft(In.next(un))}catch(Ti){ni(Ti)}},Kt=un=>{try{Ft(In.throw(un))}catch(Ti){ni(Ti)}},Ft=un=>un.done?en(un.value):Promise.resolve(un.value).then(zt,Kt);Ft((In=In.apply(ii,Yn)).next())}),mn=ii=>{var Yn=ii,{className:In,style:en,children:ni,loading:zt=!1,openLoading:Kt,onClick:Ft=()=>{},size:un="middle",shape:Ti="round"}=Yn,Ri=An(Yn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[hi,Ut]=(0,ve.useState)(!1);return ve.createElement(Me.ZP,jn({onClick:(0,mt.throttle)(zn=>Pn(void 0,null,function*(){Kt&&Ut(!0);try{yield Ft(zn)}catch(xn){console.log("error",xn)}Kt&&Ut(!1)}),2e3,{leading:!0,trailing:!1}),className:pt()(ke.btn,ke[`${un}-${Ti}`],In),style:en,size:un,shape:Ti,loading:hi||zt},Ri),ni)},Fi={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Ir=({className:ii,style:Yn,children:In=null,onClick:en,title:ni})=>ve.createElement("div",{className:pt()(Fi.head,ii),style:Yn},ve.createElement("span",{className:"primary-hover",onClick:en},ve.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),ve.createElement("b",{title:ni},ni),ve.createElement("div",{className:Fi.node},In)),Qi={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},$r=({confirmShow:ii=!0,confirmTitle:Yn,confirmClick:In,cancelShow:en=!0,cancelTitle:ni,cancelClick:zt,className:Kt,style:Ft,confirmLoading:un=!1})=>ve.createElement("div",{className:pt()(Qi.btns,Kt),style:Ft},ii&&ve.createElement(Me.ZP,{loading:un,onClick:In,type:"primary",className:Qi.confirm},Yn),en&&ve.createElement(Me.ZP,{onClick:zt,className:Qi.cancel},ni)),Yi={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},dr=({className:ii,style:Yn={},LeftContent:In,children:en,RightContent:ni})=>ve.createElement("div",{className:pt()(Yi.fixedBottom,ii),style:Yn},ve.createElement("div",{className:Yi.wrap},ve.createElement("div",{className:Yi.left},In),ve.createElement("div",{className:Yi.center},en),ve.createElement("div",{className:Yi.right},ni))),kn={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},ra=({className:ii,style:Yn={},dataSource:In=[]})=>ve.createElement("div",{className:pt()(kn.crumbs,ii),style:Yn},In.map((en,ni)=>niai.history.push(en.path)},en.name):ve.createElement("span",null,en.name),ve.createElement("span",null,"\xA0",">","\xA0")):ve.createElement("span",{key:ni,style:{color:"#5F6368"}},en.name))),Un=be(55054),Kr=Object.defineProperty,ia=Object.defineProperties,sa=Object.getOwnPropertyDescriptors,Wa=Object.getOwnPropertySymbols,ma=Object.prototype.hasOwnProperty,Ha=Object.prototype.propertyIsEnumerable,da=(ii,Yn,In)=>Yn in ii?Kr(ii,Yn,{enumerable:!0,configurable:!0,writable:!0,value:In}):ii[Yn]=In,la=(ii,Yn)=>{for(var In in Yn||(Yn={}))ma.call(Yn,In)&&da(ii,In,Yn[In]);if(Wa)for(var In of Wa(Yn))Ha.call(Yn,In)&&da(ii,In,Yn[In]);return ii},No=(ii,Yn)=>ia(ii,sa(Yn)),ti=(ii,Yn)=>{var In={};for(var en in ii)ma.call(ii,en)&&Yn.indexOf(en)<0&&(In[en]=ii[en]);if(ii!=null&&Wa)for(var en of Wa(ii))Yn.indexOf(en)<0&&Ha.call(ii,en)&&(In[en]=ii[en]);return In};const{Countdown:Ee}=Un.default;var hn=ii=>{var Yn=ii,{onChange:In}=Yn,en=ti(Yn,["onChange"]);const[ni,zt]=(0,ve.useState)(null);(0,ve.useEffect)(()=>{typeof ni=="number"&&ni>=0&&In(ni)},[ni]);const Kt=Ft=>{const un=Math.floor(Ft/1e3);zt(un)};return ve.createElement(Ee,No(la({},en),{onChange:Kt}))}},99914:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return ot}});var ve=be(67294);function ot(wt,Qt){const Nt=(0,ve.useRef)();(0,ve.useEffect)(()=>{Nt.current=wt}),(0,ve.useEffect)(()=>{function Re(){Nt.current()}if(Qt!==null){let Je=setInterval(Re,Qt);return()=>clearInterval(Je)}},[Qt])}},81119:function(Dn,ei,be){"use strict";be.r(ei),be.d(ei,{default:function(){return In}});var ve=be(67294),ot={card:"card___c4ypw",head:"head___d2Dfo",element:"element___PyfcV",collaborator:"collaborator___o6MF4",btn:"btn___CF6mw",delSty:"delSty___Wm5pj",delBorder:"delBorder___IVg2Z",copHover:"copHover___rNmmw",wrap:"wrap___feope",center:"center___uU09V",tip:"tip___yCX57",title:"title___OpV1r",content:"content___XU4yH",fixedBtns:"fixedBtns___ItSdd"},wt=be(94184),Qt=be.n(wt),Nt=be(30001),Re=be(35567),Je=be(71230),pt=be(85804),mt=be(62844),yt=be(28802),Vt=be(57399),ct=be(91773),We=be(83062),Te=be(37720),ne=be(2453),te=be(74330),ue=be(84567),se=be(98813),ge=be(18046),me=be(28706),xe=be(35973),Pe=be(50881),Ke=be(60887),nt=be(32339),ft=be(45587),qe=be(24285),at=be(26194),jt=Object.defineProperty,Mt=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable,qn=(en,ni,zt)=>ni in en?jt(en,ni,{enumerable:!0,configurable:!0,writable:!0,value:zt}):en[ni]=zt,sn=(en,ni)=>{for(var zt in ni||(ni={}))Ht.call(ni,zt)&&qn(en,zt,ni[zt]);if(Bt)for(var zt of Bt(ni))Jn.call(ni,zt)&&qn(en,zt,ni[zt]);return en},Nn=(en,ni)=>Mt(en,bt(ni));const lt=ve.createContext({}),Ge=()=>{const{setActivatorNodeRef:en,listeners:ni}=(0,ve.useContext)(lt);return ve.createElement(pt.ZP,sn({type:"text",size:"small",icon:ve.createElement(We.Z,{title:"\u53EF\u9F20\u6807\u62D6\u62FD\u8FDB\u884C\u8BD5\u9898\u6392\u5E8F\uFF0C\u5B66\u751F\u7AEF\u5C06\u6309\u7167\u6B64\u6392\u5E8F\u5C55\u793A"},ve.createElement(Pe.Z,null)),style:{cursor:"move"},ref:en},ni))},Ne=en=>{const{attributes:ni,listeners:zt,setNodeRef:Kt,setActivatorNodeRef:Ft,transform:un,transition:Ti,isDragging:Ri}=(0,ft.nB)({id:en["data-row-key"]}),hi=sn(Nn(sn({},en.style),{transform:qe.ux.Translate.toString(un),transition:Ti}),Ri?{position:"relative",zIndex:99}:{}),Ut=(0,ve.useMemo)(()=>({setActivatorNodeRef:Ft,listeners:zt}),[Ft,zt]);return ve.createElement(lt.Provider,{value:Ut},ve.createElement("tr",sn(Nn(sn({},en),{ref:Kt,style:hi}),ni)))};var ai=({columns:en,dataSource:ni,setDataSource:zt,loading:Kt})=>{const Ft=({active:un,over:Ti})=>{un.id!==(Ti==null?void 0:Ti.id)&&zt(Ri=>{const hi=Ri.findIndex(zn=>zn.id===(un==null?void 0:un.id)),Ut=Ri.findIndex(zn=>zn.id===(Ti==null?void 0:Ti.id));return(0,ft.Rp)(Ri,hi,Ut)})};return ve.createElement(Ke.LB,{modifiers:[nt.DL],onDragEnd:Ft},ve.createElement(ft.Fo,{items:ni.map(un=>un.id),strategy:ft.qw},ve.createElement(Vt.default,{pagination:!1,scroll:{y:400},rowKey:"id",loading:Kt,locale:{emptyText:ve.createElement(at.Z,{styles:{margin:"80px auto"},customText:ve.createElement("span",null,"\u8FD8\u6CA1\u6709\u8BD5\u9898\uFF0C\u8BF7\u4ECE",ve.createElement("span",{style:{color:"#CA7720"}},"\u53F3\u4E0A\u89D2\u64CD\u4F5C\u6309\u94AE"),"\u8FDB\u884C\u6DFB\u52A0\uFF5E")})},dataSource:ni,components:{body:{row:Ne}},columns:[{key:"sort",align:"center",width:80,render:()=>ve.createElement(Ge,null)},...en],size:"middle"})))},Zt=be(55238),ci=be(38089),On=be(88044),Mi=be(60024),Xt=be(14845),At=be(33170),on={flex_box_center:"flex_box_center___Iqqr9",flex_space_between:"flex_space_between___y0uZc",flex_box_vertical_center:"flex_box_vertical_center___akeKA",flex_box_center_end:"flex_box_center_end___DEJG9",flex_box_column:"flex_box_column___pgYr1",scoremodal:"scoremodal___PYXCN",selectWrapper:"selectWrapper___RNoPX",selectWrappers:"selectWrappers___fUTXA",allqingchu:"allqingchu___k6Qgb",title:"title___AAfdA",score:"score___oYtrM",close:"close___i8V3V",content:"content___JpTOI",items:"items___je5K0",bottom:"bottom___jjylc",yes:"yes___Wh4La",no:"no___fIya2",titlecount:"titlecount___pZQaF",add:"add___hT0xx",search:"search___WBmWG",searchIcon:"searchIcon___LgZF_",tabWrap:"tabWrap___lGZ3A",previewModal:"previewModal___jPoO2"},Si=be(53430),Gt={flex_box_center:"flex_box_center____Tkex",flex_space_between:"flex_space_between___EZnYm",flex_box_vertical_center:"flex_box_vertical_center___e6Uyw",flex_box_center_end:"flex_box_center_end___FubGu",flex_box_column:"flex_box_column___ibm4g",warp:"warp___IgClr",shixunbutton:"shixunbutton___DTP9s",redio:"redio___wfYmJ",redioitem:"redioitem___Lx8l8",redioitemyes:"redioitemyes___KKsIv",title:"title___GXJmE",titleyes:"titleyes___yYOlS",yestag:"yestag___WQlWV",qcount:"qcount___QpuQ9",score:"score___WkTL9",qtitle:"qtitle___TQM3w",checkbox:"checkbox___XWcyb",checkboxitem:"checkboxitem___eUzWD",checkboxitemyes:"checkboxitemyes___LOyRE",bottom:"bottom___IKM1j",bottomitem:"bottomitem___TaUK6",left:"left___szEjt",right:"right___XEuVG",completion:"completion___bVp0S",content:"content___R3KZ7",items:"items___DCx2v",simple:"simple___GPeTT",shixun:"shixun___hhixj",combination:"combination___toZnZ",program:"program___alaBk"},Xe=be(65226),ke=be(19575);const Me=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"];var et=({qitem:en})=>{var ni,zt,Kt,Ft,un,Ti,Ri,hi,Ut,zn;return ve.createElement("div",{className:Gt.warp},ve.createElement("div",{className:Gt.mainPart},ve.createElement("div",{className:Gt.qcount},(en==null?void 0:en.question_type)===8&&ve.createElement(Xe.Z,{className:Gt.content,showProgramFill:!0,value:(ni=en==null?void 0:en.program_attr)==null?void 0:ni.description}),(en==null?void 0:en.question_type)!=8&&ve.createElement(Xe.Z,{className:Gt.qtitle,value:(en==null?void 0:en.name)||(en==null?void 0:en.title)})),((en==null?void 0:en.question_type)===0||(en==null?void 0:en.question_type)===2)&&ve.createElement("div",null,(zt=en==null?void 0:en.choices)==null?void 0:zt.map((xn,Fr)=>ve.createElement("div",{className:Gt.redio},!(xn!=null&&xn.is_answer)&&ve.createElement("span",{className:Gt.redioitem}),(xn==null?void 0:xn.is_answer)&&ve.createElement("i",{className:`${Gt.redioitemyes} icon-duigou1`}),ve.createElement(Xe.Z,{className:xn!=null&&xn.is_answer?Gt.titleyes:Gt.title,value:Me[Fr]+(xn==null?void 0:xn.choice_text)}),(xn==null?void 0:xn.is_answer)&&ve.createElement("div",{className:Gt.yestag},"\u6B63\u786E\u7B54\u6848")))),(en==null?void 0:en.question_type)===1&&ve.createElement("div",null,(Kt=en==null?void 0:en.choices)==null?void 0:Kt.map((xn,Fr)=>ve.createElement("div",{className:Gt.checkbox},!(xn!=null&&xn.is_answer)&&ve.createElement("span",{className:Gt.checkboxitem}),(xn==null?void 0:xn.is_answer)&&ve.createElement("i",{className:`${Gt.checkboxitemyes} icon-duigou1`}),ve.createElement(Xe.Z,{className:xn!=null&&xn.is_answer?Gt.titleyes:Gt.title,value:Me[Fr]+(xn==null?void 0:xn.choice_text)}),(xn==null?void 0:xn.is_answer)&&ve.createElement("div",{className:Gt.yestag},"\u6B63\u786E\u7B54\u6848")))),(en==null?void 0:en.question_type)===3&&ve.createElement("div",{className:Gt.completion},(Ft=en==null?void 0:en.standard_answer)==null?void 0:Ft.map((xn,Fr)=>{var ri;return ve.createElement("div",{style:{display:"flex"}},ve.createElement("span",{className:Gt.title},"\u586B\u7A7A\u9879",Fr+1),ve.createElement("div",{className:Gt.content},(ri=xn==null?void 0:xn.answer_text)==null?void 0:ri.map(($t,_i)=>ve.createElement("div",{className:Gt.items},$t))))})),(en==null?void 0:en.question_type)===4&&ve.createElement("div",{className:Gt.simple},ve.createElement("div",{className:Gt.title},"\u53C2\u8003\u7B54\u6848"),ve.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(un=en==null?void 0:en.answer_texts)!=null&&un[0]?ve.createElement(Xe.Z,{className:Gt.content,value:(Ti=en==null?void 0:en.answer_texts)==null?void 0:Ti[0]}):ve.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),(en==null?void 0:en.question_type)===5&&((Ri=en==null?void 0:en.challenge_names)==null?void 0:Ri.map((xn,Fr)=>ve.createElement("div",{className:Gt.shixun},ve.createElement("span",{className:Gt.qtitle},ve.createElement("span",{style:{marginRight:10}},"\u7B2C",(0,me.EM)(Fr+1),"\u9898"),xn)))),(en==null?void 0:en.question_type)===6&&ve.createElement("div",{className:Gt.program},ve.createElement(Xe.Z,{className:Gt.content,value:((hi=en==null?void 0:en.program_attr)==null?void 0:hi.description)||"- -"})),(en==null?void 0:en.question_type)===7&&((Ut=en==null?void 0:en.sub_item_banks)==null?void 0:Ut.map((xn,Fr)=>{var ri,$t,_i,Wr,Br;return ve.createElement("div",null,ve.createElement("div",{className:Gt.combination},ve.createElement("span",{className:Gt.qtitle},xn==null?void 0:xn.name)),ve.createElement("div",{className:Gt.warp,style:{padding:"0px",paddingTop:20}},ve.createElement("div",null,((xn==null?void 0:xn.item_type)=="SINGLE"||(xn==null?void 0:xn.item_type)=="JUDGMENT")&&((ri=xn==null?void 0:xn.choices)==null?void 0:ri.map((Sn,or)=>ve.createElement("div",{className:Gt.redio},!(Sn!=null&&Sn.is_answer)&&ve.createElement("span",{className:Gt.redioitem}),(Sn==null?void 0:Sn.is_answer)&&ve.createElement("i",{className:`${Gt.redioitemyes} icon-duigou1`}),ve.createElement(Xe.Z,{className:Sn!=null&&Sn.is_answer?Gt.titleyes:Gt.title,value:Me[or]+(Sn==null?void 0:Sn.choice_text)}),(Sn==null?void 0:Sn.is_answer)&&ve.createElement("div",{className:Gt.yestag},"\u6B63\u786E\u7B54\u6848")))),(xn==null?void 0:xn.item_type)=="MULTIPLE"&&(($t=xn==null?void 0:xn.choices)==null?void 0:$t.map((Sn,or)=>ve.createElement("div",{className:Gt.checkbox},!(Sn!=null&&Sn.is_answer)&&ve.createElement("span",{className:Gt.checkboxitem}),(Sn==null?void 0:Sn.is_answer)&&ve.createElement("i",{className:`${Gt.checkboxitemyes} icon-duigou1`}),ve.createElement(Xe.Z,{className:Sn!=null&&Sn.is_answer?Gt.titleyes:Gt.title,value:Me[or]+(Sn==null?void 0:Sn.choice_text)}),(Sn==null?void 0:Sn.is_answer)&&ve.createElement("div",{className:Gt.yestag},"\u6B63\u786E\u7B54\u6848")))),(xn==null?void 0:xn.item_type)=="COMPLETION"&&ve.createElement("div",{className:Gt.completion},(_i=xn==null?void 0:xn.standard_answer)==null?void 0:_i.map((Sn,or)=>{var Xo;return ve.createElement("div",{style:{display:"flex"}},ve.createElement("span",{className:Gt.title},"\u586B\u7A7A\u9879",or+1),ve.createElement("div",{className:Gt.content},(Xo=Sn==null?void 0:Sn.answer_text)==null?void 0:Xo.map((Na,aa)=>ve.createElement("div",{className:Gt.items},Na))))})),(xn==null?void 0:xn.item_type)=="SUBJECTIVE"&&ve.createElement("div",{className:Gt.simple},ve.createElement("div",{className:Gt.title},"\u53C2\u8003\u7B54\u6848"),ve.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(Wr=xn==null?void 0:xn.answer_texts)!=null&&Wr[0]?ve.createElement(Xe.Z,{className:Gt.content,value:(Br=xn==null?void 0:xn.answer_texts)==null?void 0:Br[0]}):ve.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))))))})),(en==null?void 0:en.question_type)===8&&ve.createElement("div",null,ve.createElement(Xe.Z,{disabledFill:!0,className:Gt.content,showProgramFill:!0,value:ke.Base64.decode(((zn=en==null?void 0:en.program_attr)==null?void 0:zn.code)||"")})),(en==null?void 0:en.question_type)===5&&ve.createElement("div",{style:{background:"#F6F7F9",padding:"0px 20px",height:46,lineHeight:"46px",marginTop:40,display:"flex",alignItems:"center"}},ve.createElement("div",{style:{flex:1,alignItems:"center",display:"flex"}},ve.createElement("div",{style:{marginRight:30}},ve.createElement("span",{style:{marginRight:10}},"\u521B\u5EFA\u8005"),ve.createElement("span",{style:{color:"#000000"}},(en==null?void 0:en.author_name)||"- -")),ve.createElement("div",{style:{marginRight:30}},ve.createElement("span",{style:{marginRight:10}},"\u6240\u5C5E\u5355\u4F4D"),ve.createElement("span",{style:{color:"#000000"}},(en==null?void 0:en.author_school_name)||"- -")),ve.createElement("div",{style:{marginRight:30}},ve.createElement("span",{style:{marginRight:10}},"\u5B66\u4E60\u4EBA\u6570"),ve.createElement("span",{style:{color:"#000000"}},(en==null?void 0:en.study_count)||"0"))),ve.createElement("a",{className:Gt.shixunbutton,href:`/shixuns/${en==null?void 0:en.identifier}/challenges?exercise=true`,target:"_blank"},ve.createElement("i",{onClick:()=>{},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"\u5B9E\u8BAD\u8BE6\u60C5"))),((en==null?void 0:en.question_type)<=4||[6,8].includes(en==null?void 0:en.question_type))&&ve.createElement("div",{className:Gt.bottom},ve.createElement("div",{className:Gt.bottomitem},ve.createElement("span",{className:Gt.left},"\u89E3\u6790"),ve.createElement("span",{className:Gt.right},en!=null&&en.analysis?ve.createElement(Xe.Z,{value:en==null?void 0:en.analysis}):ve.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),ve.createElement("div",{className:Gt.bottomitem},ve.createElement("span",{className:Gt.left},"\u96BE\u5EA6"),ve.createElement("span",{className:Gt.right},(en==null?void 0:en.difficulty)===1?"\u7B80\u5355":(en==null?void 0:en.difficulty)===2?"\u9002\u4E2D":"\u56F0\u96BE")),ve.createElement("div",{className:Gt.bottomitem},ve.createElement("span",{className:Gt.left},"\u77E5\u8BC6\u70B9"),ve.createElement("span",{className:Gt.right},en!=null&&en.tag_discipline?en==null?void 0:en.tag_discipline:ve.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~")))))},Oe=be(36913),ut=be(57971),Vn=be(38244),jn=be(17663),An=be(67294),Pn=Object.defineProperty,si=Object.defineProperties,mn=Object.getOwnPropertyDescriptors,Fi=Object.getOwnPropertySymbols,Vi=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,Qi=(en,ni,zt)=>ni in en?Pn(en,ni,{enumerable:!0,configurable:!0,writable:!0,value:zt}):en[ni]=zt,Di=(en,ni)=>{for(var zt in ni||(ni={}))Vi.call(ni,zt)&&Qi(en,zt,ni[zt]);if(Fi)for(var zt of Fi(ni))Ir.call(ni,zt)&&Qi(en,zt,ni[zt]);return en},$r=(en,ni)=>si(en,mn(ni)),Yi=(en,ni,zt)=>new Promise((Kt,Ft)=>{var un=hi=>{try{Ri(zt.next(hi))}catch(Ut){Ft(Ut)}},Ti=hi=>{try{Ri(zt.throw(hi))}catch(Ut){Ft(Ut)}},Ri=hi=>hi.done?Kt(hi.value):Promise.resolve(hi.value).then(un,Ti);Ri((zt=zt.apply(en,ni)).next())});const hr=({setScoreShow:en,ScoreShow:ni,onOk:zt,isshixuns:Kt,isloadings:Ft,dispatch:un,selectedIds:Ti,user:Ri,virtualId:hi,shixunsDetail:Ut})=>{var zn;let[xn,Fr]=(0,ve.useState)({type:"0",page:1,per_page:10,updated_at:"",quotes:"",item_type:"PROGRAM"}),[ri,$t]=(0,ve.useState)([]),[_i,Wr]=(0,ve.useState)([]),[Br,Sn]=(0,ve.useState)([]),[or,Xo]=(0,ve.useState)([]);const[Na,aa]=(0,ve.useState)(!1),[ur]=ct.default.useForm(),[Nr,io]=(0,ve.useState)(),[va,Ho]=(0,ve.useState)(!1);let[pi,lo]=(0,ve.useState)(Kt);const[al,el]=(0,ve.useState)([]),[Ns,ln]=(0,ve.useState)(0),[Yo,Va]=(0,ve.useState)(!0),[Ao,ms]=(0,ve.useState)([]),[Ba,$a]=(0,ve.useState)([]),Er=[{name:"\u5168\u90E8",value:"",question_type:0},{name:"\u5355\u9009\u9898",value:"SINGLE",question_type:0},{name:"\u591A\u9009\u9898",value:"MULTIPLE",question_type:1},{name:"\u5224\u65AD\u9898",value:"JUDGMENT",question_type:2},{name:"\u586B\u7A7A\u9898",value:"COMPLETION",question_type:3},{name:"\u7B80\u7B54\u9898",value:"SUBJECTIVE",question_type:4},{name:"\u5B9E\u8BAD\u9898",value:"SHIXUN",question_type:5},{name:"\u7F16\u7A0B\u9898",value:"PROGRAM",question_type:6},{name:"\u7EC4\u5408\u9898",value:"COMBINATION",question_type:7},{name:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM",question_type:8}],[uo,So]=(0,ve.useState)([]),Wn=(0,ve.useRef)(new Set),ka=(0,ve.useRef)(new Set),Cn=(0,ve.useRef)(1),Po=[{name:"\u7B80\u5355",value:1},{name:"\u9002\u4E2D",value:2},{name:"\u56F0\u96BE",value:3}],Ws=[{name:"\u521D\u7EA7",value:1},{name:"\u4E2D\u7EA7",value:2},{name:"\u4E2D\u9AD8\u7EA7",value:3},{name:"\u9AD8\u7EA7",value:4}],ds=[{name:"\u672A\u53D1\u5E03",value:"unpublish"},{name:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{name:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],[kl,Ss]=(0,ve.useState)(!1),Ua=()=>{ur.resetFields(),pi=!1,lo(!1),Ss(!1),ur.submit()};(0,ve.useEffect)(()=>{ni&&(ur.setFieldsValue({item_type:"",courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,teach_group_id:null}),Yo&&pi&&(ur.setFieldsValue({item_type:"SHIXUN"}),xn.item_type="SHIXUN",Fr(Di({},xn)),Va(!1)),xn.type="0",Wr(Ti),Sn(Ti),ka.current=new Set(Ti),us(xn),tl(),ts({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}),wr())},[ni]),console.log(_i,Br,"listitems"),(0,ve.useEffect)(()=>{Ns>0&&setTimeout(()=>{ln(0)},2e3)},[Ns]);function us(Yt){return Yi(this,null,function*(){var Zn,Ji,xi;if(aa(!0),Fr(Di({},Yt)),(Br==null?void 0:Br.length)<=0&&Yt.type==="5"){Xo([]),aa(!1);return}let nr=Yt.type==="5"?Br==null?void 0:Br.filter(fn=>!al.includes(fn)):null,Zi=Yt.type==="5"?Br==null?void 0:Br.filter(fn=>al.includes(fn)):null;Cn.current=Cn.current+1;const vi=Cn.current;let pr=yield(0,At.ZP)("/api/item_banks.json",{method:"get",params:$r(Di({},Yt),{discipline_id:((Zn=Yt==null?void 0:Yt.courseid)==null?void 0:Zn[0])||null,sub_discipline_id:((Ji=Yt==null?void 0:Yt.courseid)==null?void 0:Ji[1])||null,ids:nr,shixun_ids:Zi,include_shixuns:!0,group_id:((xi=Yt.group_id)==null?void 0:xi.map(fn=>fn==null?void 0:fn.value))||null,keyword:Yt.keyword?encodeURIComponent(Yt.keyword):Yt.keyword,type:Yt.type==="5"?null:Yt.type,clazz:Yt.type==="3"?"ItemBanksGroup":null})});Cn.current===vi&&(Xo(pr),aa(!1))})}function tl(){return Yi(this,null,function*(){let Yt=yield(0,At.ZP)("/api/disciplines.json",{method:"get",params:{source:"question",group_id:0,group_type:xn.type==="5"?null:xn.type,clazz:"ItemBanksGroup"}});$t((0,Si.L)(Yt==null?void 0:Yt.disciplines))})}function ts(Yt){return Yi(this,null,function*(){var Zn;let Ji=yield(0,At.ZP)("/api/item_banks_groups/for_problemset.json",{method:"post",body:Yt}),xi=[{title:"\u6839\u76EE\u5F55",id:0,pid:0,value:0,key:0,isLeaf:!1,children:(Zn=Ji==null?void 0:Ji.data)==null?void 0:Zn.map(nr=>({title:nr.name,id:nr.id,pid:nr.id,value:nr.id,key:nr.id,isLeaf:!nr.have_child}))}];ms(xi)})}function wr(){return Yi(this,null,function*(){let Yt=yield(0,Vn.Dm)({});(Yt==null?void 0:Yt.status)===0&&$a(Yt==null?void 0:Yt.groups)})}function st(Yt){return Yi(this,null,function*(){var Zn,Ji,xi,nr;aa(!0);let Zi=(Zn=Yt.list)==null?void 0:Zn.filter(fn=>!al.includes(fn)),vi=(Ji=Yt.list)==null?void 0:Ji.filter(fn=>al.includes(fn));if(Zi.length===0&&vi.length===0){aa(!1),Xo([]);return}let pr=yield(0,At.ZP)("/api/item_banks.json",{method:"get",params:$r(Di({},Yt),{discipline_id:((xi=Yt==null?void 0:Yt.courseid)==null?void 0:xi[0])||null,sub_discipline_id:((nr=Yt==null?void 0:Yt.courseid)==null?void 0:nr[1])||null,ids:Zi,shixun_ids:vi,type:Yt.type==="5"?null:Yt.type,clazz:Yt.type==="3"?"ItemBanksGroup":null})});aa(!1),Xo(pr)})}const St=Yt=>Yi(void 0,null,function*(){const Zn=yield un({type:"shixunsDetail/release",payload:{id:Yt}});let Ji=Zn==null?void 0:Zn.tag_position,xi=(Zn==null?void 0:Zn.evaluation_set_position)||[],nr=Zn.status;return nr===0?(ne.ZP.success("\u53D1\u5E03\u6210\u529F"),us(xn),!0):(nr===2?ne.ZP.error(`\u7B2C${xi.join(",")}\u5173\u5C1A\u672A\u5B8C\u6210\uFF0C\u65E0\u6CD5\u7533\u8BF7\u53D1\u5E03`):nr===3?ne.ZP.error(`\u6BCF\u4E00\u4E2A\u5173\u5361\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u6280\u80FD\u6807\u7B7E, \u7B2C${Ji.join(",")}\u5173\u5C1A\u672A\u8BBE\u7F6E\u6280\u80FD\u6807\u7B7E\uFF0C\u8BF7\u8865\u5145`):ne.ZP.error("\u5C1A\u672A\u521B\u5EFA\u4EFB\u52A1\u7684\u5B9E\u8BAD\uFF0C\u4E0D\u80FD\u7533\u8BF7\u53D1\u5E03"),!1)}),Rt=Yt=>(Yt==null?void 0:Yt.shixun_tag_num)===1?"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528\uFF0C\u8BF7\u5148\u8FDB\u884C\u53D1\u5E03":"",gn=()=>Na?"\u6682\u65E0\u6570\u636E":xn.type==="3"&&!(Ba!=null&&Ba.length)?An.createElement("span",null,"\u4F60\u8FD8\u672A\u52A0\u5165\u6559\u7814\u56E2\u961F\uFF0C\u8BF7\u5148 ",An.createElement("span",{onClick:()=>{var Yt;return(0,me.xg)(`/users/${(Yt=Ri==null?void 0:Ri.userInfo)==null?void 0:Yt.login}/teach-group`)},style:{color:"#3061D0",cursor:"pointer"}},"\u65B0\u521B\u5EFA\u6559\u7814\u56E2\u961F")):xn.type==="0"&&(or==null?void 0:or.items_count)===0&&!(xn!=null&&xn.tag_discipline_id)&&!(xn!=null&&xn.difficulty)&&!(xn!=null&&xn.keyword)&&!(xn!=null&&xn.group_id)&&!(xn!=null&&xn.difficulty)?An.createElement("span",null,"\u4F60\u8FD8\u672A\u521B\u5EFA\u8FC7\u7F16\u7A0B\u9898\uFF0C\u8BF7\u5148 ",An.createElement("span",{onClick:()=>{(0,me.xg)(`/problems/newcreate?&pageId=${hi}`),en(!1)},style:{color:"#3061D0",cursor:"pointer"}},"\u521B\u5EFA\u7F16\u7A0B\u9898")):"\u6682\u65E0\u6570\u636E",Hn=(Yt,Zn,Ji)=>Yt.map(xi=>xi.key===Zn?Di(Di({},xi),Ji):xi.children?$r(Di({},xi),{children:Hn(xi.children,Zn,Ji)}):xi),Oi=Yt=>Yi(void 0,null,function*(){const{key:Zn}=Yt;let Ji=xn.type;const xi=yield(0,Vn.ex)({page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",group_id:Math.abs(Zn),type:Ji}),{data:nr,total_count:Zi}=xi||{};Zi>0&&ms(vi=>Hn(vi,Zn,{children:nr.map(pr=>({title:pr.name,id:pr.id,pid:pr.id,value:pr.id,key:pr.id,isLeaf:!pr.have_child}))}))});return An.createElement("div",null,An.createElement(mt.default,{title:!1,footer:!1,open:ni,width:1200,centered:!0,className:on.scoremodal,onCancel:()=>{en(!1)}},An.createElement("div",{style:{display:"flex",alignItems:"center"}},An.createElement("div",{className:on.title},"\u9009\u62E9\u7F16\u7A0B\u9898")),An.createElement(Zt.default,{className:on.tabWrap,activeKey:xn.type,onChange:Yt=>{Yt==="3"?(xn.show_all_share=!0,ts({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"3"})):xn.show_all_share=null,Yt==="0"&&ts({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}),xn.type=Yt,xn.page=1,xn.updated_at="",xn.quotes="",xn.courseid="",xn.tag_discipline_id=null,xn.difficulty=null,xn.keyword=null,xn.group_id=null,xn.teach_group_id=null,ur.setFieldsValue({courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:[],teach_group_id:null}),(xn==null?void 0:xn.item_type)==="SHIXUN"&&xn.type!=="5"&&(pi=!0,lo(!0)),Ss(!1),xn.type==="5"&&(pi=!1,lo(!1)),Fr(Di({},xn)),us(Di({},xn)),tl()},items:[{label:"\u6211\u521B\u5EFA\u7684",key:"0"},{label:"\u56E2\u961F\u5171\u4EAB",key:"3"},{label:"\u516C\u5171",key:"1"},{label:An.createElement("div",null,"\u5DF2\u9009",Br.length>0&&An.createElement("span",{className:on.titlecount},Br.length),Ns>0&&An.createElement("span",{className:on.add},"+",Ns)),key:"5"}]}),An.createElement(ct.default,{layout:"inline",form:ur,onValuesChange:(Yt,Zn)=>{const Ji=Object.values(Zn).some(nr=>nr!==null&&nr!==""&&nr!==void 0),xi=Zn.keyword==="";if(Ss(Ji||!xi),xn.page=1,(Zn==null?void 0:Zn.item_type)==="SHIXUN"){if(xn.type==="5"?lo(!1):lo(!0),Yt.keyword||Yt.keyword==="")return;ur.submit()}else{if(Yt!=null&&Yt.courseid&&ur.setFieldsValue({tag_discipline_id:""}),lo(!1),Yt.keyword||Yt.keyword==="")return;ur.submit()}},onFinish:Yt=>{var Zn;xn.type==="3"&&(!Yt.group_id||((Zn=Yt==null?void 0:Yt.group_id)==null?void 0:Zn.length)===0)?xn.show_all_share=!0:xn.show_all_share=null,Fr(Di(Di({},xn),Yt)),us(Di(Di({},xn),Yt))}},An.createElement(ct.default.Item,{name:"courseid"},An.createElement(ci.Z,{className:on.selectWrapper,style:{width:160},size:"middle",placeholder:"\u65B9\u5411&\u8BFE\u7A0B",options:ri})),!pi&&An.createElement(ct.default.Item,{name:"tag_discipline_id"},An.createElement(On.default,{className:on.selectWrapper,placeholder:"\u77E5\u8BC6\u70B9",style:{width:160},size:"middle",allowClear:!0},(zn=or==null?void 0:or.tag_disciplines)==null?void 0:zn.map(Yt=>An.createElement(On.default.Option,{key:Yt.id},Yt.name)))),An.createElement(ct.default.Item,{name:pi?"diff":"difficulty"},An.createElement(On.default,{className:on.selectWrapper,placeholder:"\u96BE\u5EA6",style:{width:118},size:"middle",allowClear:!0},!pi&&Po.map(Yt=>An.createElement(On.default.Option,{key:Yt.value},Yt.name)),pi&&Ws.map(Yt=>An.createElement(On.default.Option,{key:Yt.value},Yt.name)))),pi&&An.createElement(ct.default.Item,{name:"shixun_publish_status"},An.createElement(On.default,{className:on.selectWrapper,placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"middle",allowClear:!0},ds.map(Yt=>An.createElement(On.default.Option,{key:Yt.value},Yt.name)))),xn.type==="3"&&!pi&&An.createElement(ct.default.Item,{name:"teach_group_id"},An.createElement(On.default,{className:on.selectWrapper,placeholder:"\u56E2\u961F",style:{width:118},size:"middle",showSearch:!0,allowClear:!0,filterOption:(Yt,Zn)=>(console.log("---",Yt,Zn),Zn.children.toUpperCase().indexOf(Yt.toUpperCase())!==-1)},Ba==null?void 0:Ba.map(Yt=>An.createElement(On.default.Option,{key:Yt.group_id},Yt.name)))),(xn.type==="3"||xn.type==="0")&&!pi&&An.createElement(ct.default.Item,{name:"group_id"},An.createElement(Mi.default,{treeDataSimpleMode:!0,style:{width:118},className:on.selectWrappers,multiple:!0,allowClear:!0,showSearch:!0,filterTreeNode:(Yt,Zn)=>Zn.title.toUpperCase().indexOf(Yt.toUpperCase())!==-1,dropdownStyle:{maxHeight:400,width:500,overflow:"auto"},placeholder:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939",treeCheckStrictly:!0,loadData:Oi,treeDefaultExpandedKeys:[0],maxTagCount:0,treeCheckable:!0,treeData:Ao})),kl&&An.createElement("span",{className:on.allqingchu,onClick:Ua},An.createElement("i",{className:"iconfont icon-guanbi4"}),An.createElement("span",null,"\u6E05\u9664\u7B5B\u9009\u6761\u4EF6")),An.createElement(ct.default.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"keyword"},An.createElement(yt.default.Search,{className:on.search,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u9898\u7F16\u53F7\u6216\u5173\u952E\u8BCD\u641C\u7D22",allowClear:!0,suffix:An.createElement("i",{className:`iconfont icon-sousuo9 font14 ${on.searchIcon}`,onClick:()=>ur.submit()}),onSearch:Yt=>{ur.submit()}}))),An.createElement("div",{style:{background:"#F6F7F9",display:"flex",alignItems:"center",marginTop:18,height:40,paddingLeft:10,paddingRight:20}},An.createElement("div",{onClick:()=>{xn.updated_at==="asc"?xn.updated_at="desc":xn.updated_at="asc",Fr($r(Di({},xn),{page:1})),us($r(Di({},xn),{page:1}))}}," ",xn.updated_at?An.createElement("img",{src:xn.updated_at==="asc"?Oe.Z:ut.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):An.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u66F4\u65B0\u65F6\u95F4\u6392\u5E8F"),An.createElement("div",{onClick:()=>{xn.quotes==="asc"?xn.quotes="desc":xn.quotes="asc",Fr($r(Di({},xn),{page:1})),us($r(Di({},xn),{page:1}))},style:{marginLeft:20}}," ",xn.quotes?An.createElement("img",{src:xn.quotes==="asc"?Oe.Z:ut.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):An.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u4F7F\u7528\u6B21\u6570\u6392\u5E8F")),An.createElement(Vt.default,{style:{marginTop:2,marginBottom:20},scroll:{y:260},dataSource:(or==null?void 0:or.items)||(or==null?void 0:or.shixun_list),pagination:!1,locale:{emptyText:An.createElement(at.Z,{styles:{margin:"18px auto"},customText:gn()})},loading:Na,rowKey:Yt=>Yt.id,rowSelection:{type:"checkbox",selectedRowKeys:_i,getCheckboxProps:Yt=>({disabled:Yt.shixun_tag_num===1}),onSelect(Yt,Zn,Ji){if(Zn)pi&&el([...al,Yt.id]),Wr([..._i,Yt.id]),So([...uo,Yt]),Yt.identifier?Wn.current.add(Yt.id):ka.current.add(Yt.id),ln(1),Sn([...Br,Yt.id]);else{const xi=uo.filter(vi=>vi.id!==Yt.id);So(xi);const nr=xi.map(vi=>vi.id);Wr([...nr]),Yt.identifier?Wn.current.delete(Yt.id):ka.current.delete(Yt.id);let Zi=Br.filter(vi=>vi!==Yt.id);if(Sn(Zi),pi){let vi=al.filter(pr=>pr!==Yt.id);el([...vi])}if(xn.type==="5"){st($r(Di({},xn),{list:[...Zi]}));return}}},onSelectAll(Yt,Zn,Ji){if(Yt){const xi=Ji.map(nr=>nr.id);pi&&el([...al,...xi]),So([...uo,...Ji]),Wr([..._i,...xi]),Sn([...Br,...xi]);for(const nr of Ji)nr.identifier?Wn.current.add(nr.id):ka.current.add(nr.id)}else{const xi=Ji.map(vi=>vi.id),nr=_i.filter(vi=>!xi.some(pr=>pr===vi)),Zi=uo.filter(vi=>!xi.some(pr=>pr===vi.id));if(So(Zi),Wr([...nr]),Sn([...nr]),pi){let vi=al.filter(pr=>!xi.some(fn=>fn===pr.id));el([...vi])}xn.type==="5"&&st($r(Di({},xn),{list:[...nr]}));for(const vi of xi)vi.identifier?Wn.current.delete(vi):ka.current.delete(vi)}}},columns:[{title:"\u8BD5\u9898\u7F16\u53F7",dataIndex:"id",key:"id",width:110,render:(Yt,Zn,Ji)=>{const xi=`No.${Yt}`;return An.createElement(We.Z,{title:xi},An.createElement("span",null,xi))}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:pi?"30%":"60%",key:"name",render:(Yt,Zn,Ji)=>{var xi;return An.createElement(We.Z,{title:Rt(Zn)},An.createElement("span",null,An.createElement(Xe.Z,{key:1,showLines:1,showTextOnly:!0,value:pi||Zn!=null&&Zn.challenge_names?Zn!=null&&Zn.title||Yt===null?"--":Yt:(Zn==null?void 0:Zn.item_type)=="BPROGRAM"?(xi=Zn==null?void 0:Zn.program_attr)==null?void 0:xi.description:Yt})))}},{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline",key:"tag_discipline",ellipsis:!0,width:150,render:(Yt,Zn,Ji)=>An.createElement(We.Z,{title:Yt},An.createElement("span",null,Yt||"- -"))},{title:"\u521B\u5EFA\u8005",dataIndex:"author_name",key:"author_name",hidden:!pi,render:(Yt,Zn,Ji)=>{var xi;return An.createElement(We.Z,{title:Rt(Zn)},An.createElement("span",null,Yt?(xi=Yt==null?void 0:Yt.split("\u3001"))==null?void 0:xi[0]:"- -"))}},{title:"\u6240\u5C5E\u5355\u4F4D",dataIndex:"author_school_name",key:"author_school_name",hidden:!pi,render:(Yt,Zn,Ji)=>An.createElement(We.Z,{title:Rt(Zn)},An.createElement("span",null,Yt||"- -"))},{title:"\u96BE\u5EA6",dataIndex:"difficulty",key:"difficulty",width:50,render:(Yt,Zn,Ji)=>{var xi,nr,Zi,vi;return An.createElement(We.Z,{title:Rt(Zn)},An.createElement("div",null,pi||Zn!=null&&Zn.challenge_names?(Zn==null?void 0:Zn.level)||((nr=(xi=Po==null?void 0:Po.filter(pr=>pr.value===Yt))==null?void 0:xi[0])==null?void 0:nr.name):(vi=(Zi=Po==null?void 0:Po.filter(pr=>pr.value===Yt))==null?void 0:Zi[0])==null?void 0:vi.name))}},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",hidden:!pi,render:(Yt,Zn,Ji)=>An.createElement(We.Z,{title:Rt(Zn)},An.createElement("div",null,Yt||"- -"))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"quotes",key:"quotes",width:74,render:(Yt,Zn,Ji)=>An.createElement(We.Z,{title:Rt(Zn)},An.createElement("div",null,pi||Zn!=null&&Zn.challenge_names?(Zn==null?void 0:Zn.study_count)||(Zn==null?void 0:Zn.stu_num):Yt))},{title:An.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",An.createElement(We.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},An.createElement(jn.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",hidden:!pi,render:(Yt,Zn,Ji)=>An.createElement(We.Z,{title:Rt(Zn)},An.createElement("div",null,Yt||"- -"))},{title:"\u64CD\u4F5C",dataIndex:"id",key:"item_type",width:50,align:"right",render:(Yt,Zn,Ji)=>An.createElement(We.Z,{title:Rt(Zn)},An.createElement("div",{style:{flex:1,textAlign:"start"}},An.createElement("a",{onClick:()=>{var xi,nr;io($r(Di({},Zn),{question_type:pi||Zn!=null&&Zn.challenge_names?5:(nr=(xi=Er==null?void 0:Er.filter(Zi=>Zi.value===(Zn==null?void 0:Zn.item_type)))==null?void 0:xi[0])==null?void 0:nr.question_type})),Ho(!0)}},"\u67E5\u770B"),(Zn==null?void 0:Zn.shixun_tag_num)===1&&An.createElement("a",{style:{marginLeft:10},onClick:()=>{mt.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,width:400,content:An.createElement("div",null,"\u662F\u5426\u786E\u5B9A\u53D1\u5E03",An.createElement("span",{style:{cursor:"pointer",color:"#3061D0"},onClick:()=>{window.open(`/shixuns/${Zn==null?void 0:Zn.identifier}/challenges`)}},(Zn==null?void 0:Zn.shixun_name)||"--"),"\uFF1F"),onOk:()=>Yi(void 0,null,function*(){if(!St(Zn==null?void 0:Zn.identifier))return new Promise((xi,nr)=>{nr()})})})}},"\u53D1\u5E03")))}].filter(Yt=>!Yt.hidden)}),An.createElement(Xt.Z,{current:xn.page,total:(or==null?void 0:or.items_count)||(or==null?void 0:or.shixuns_count),style:{marginBottom:20},defaultPageSize:xn.per_page,hideOnSinglePage:!(or!=null&&or.items_count),showTotal:Yt=>An.createElement("span",null,"\u5171\xA0",An.createElement("span",{style:{color:"#165DFF"}},Yt),"\xA0\u6761\u6570\u636E"),pageSize:xn.per_page,onChange:(Yt,Zn)=>{xn.page=Yt,xn.per_page=Zn,Fr(Di({},xn)),us(Di({},xn))}}),An.createElement("div",{className:on.bottom},An.createElement(pt.ZP,{className:on.no,onClick:()=>{en(!1)}},"\u53D6\u6D88"),An.createElement(pt.ZP,{loading:Ft,style:{width:Ft&&75},className:on.yes,onClick:()=>Yi(void 0,null,function*(){if((Br==null?void 0:Br.length)<=0){ne.ZP.info("\u5F53\u524D\u6682\u672A\u9009\u62E9\u6570\u636E");return}zt([...ka.current],[...Wn.current],!0,Br==null?void 0:Br.length)})},"\u786E\u8BA4"))),An.createElement(mt.default,{open:va,title:"\u9898\u76EE\u8BE6\u60C5",footer:!1,className:on.previewModal,width:1e3,centered:!0,onCancel:()=>{Ho(!1)},onOk:()=>{Ho(!1)}},An.createElement(et,{qitem:Nr})))};var dr=(0,xe.connect)(({shixunsDetail:en,user:ni})=>({shixunsDetail:en,user:ni}))(hr),kn=be(12082),Ii=be(94699),ra=be.n(Ii),Un=be(67294),Kr=Object.defineProperty,ia=Object.defineProperties,sa=Object.getOwnPropertyDescriptors,Wa=Object.getOwnPropertySymbols,ma=Object.prototype.hasOwnProperty,Ha=Object.prototype.propertyIsEnumerable,da=(en,ni,zt)=>ni in en?Kr(en,ni,{enumerable:!0,configurable:!0,writable:!0,value:zt}):en[ni]=zt,la=(en,ni)=>{for(var zt in ni||(ni={}))ma.call(ni,zt)&&da(en,zt,ni[zt]);if(Wa)for(var zt of Wa(ni))Ha.call(ni,zt)&&da(en,zt,ni[zt]);return en},No=(en,ni)=>ia(en,sa(ni)),ti=(en,ni)=>{var zt={};for(var Kt in en)ma.call(en,Kt)&&ni.indexOf(Kt)<0&&(zt[Kt]=en[Kt]);if(en!=null&&Wa)for(var Kt of Wa(en))ni.indexOf(Kt)<0&&Ha.call(en,Kt)&&(zt[Kt]=en[Kt]);return zt},Ee=(en,ni,zt)=>new Promise((Kt,Ft)=>{var un=hi=>{try{Ri(zt.next(hi))}catch(Ut){Ft(Ut)}},Ti=hi=>{try{Ri(zt.throw(hi))}catch(Ut){Ft(Ut)}},Ri=hi=>hi.done?Kt(hi.value):Promise.resolve(hi.value).then(un,Ti);Ri((zt=zt.apply(en,ni)).next())});const pn=({title:en,icon:ni,className:zt,style:Kt,children:Ft})=>Un.createElement("div",{className:Qt()(ot.card,zt),style:Kt},Un.createElement("div",{className:ot.head},Un.createElement("i",{className:ni}),Un.createElement("b",null,en)),Un.createElement("div",{className:ot.element},Ft)),hn=en=>{var ni=en,{value:zt,onChange:Kt}=ni,Ft=ti(ni,["value","onChange"]);return Un.createElement(Re.Z,No(la({},Ft),{defaultValue:zt,onChange:Kt}))},ii=({value:en=[],onChange:ni,params:zt,className:Kt})=>{const[Ft,un]=(0,ve.useState)(!1),[Ti,Ri]=(0,ve.useState)([]),[hi,Ut]=(0,ve.useState)(""),[zn,xn]=(0,ve.useState)([]),[Fr,ri]=(0,ve.useState)("");(0,ve.useEffect)(()=>{$t()},[]);function $t(){return Ee(this,null,function*(){let _i=yield(0,At.ZP)(`/api/courses/${zt==null?void 0:zt.coursesId}/teachers`,{method:"get",params:{homework_id:zt.categoryId,limit:1e3}});xn((_i==null?void 0:_i.teacher_list)||[])})}return Un.createElement(ve.Fragment,null,Un.createElement("div",{className:Qt()(ot.collaborator,Kt)},en==null?void 0:en.map(_i=>Un.createElement(Je.Z,{align:"middle",className:`${ot.btn} ${Fr==(_i==null?void 0:_i.user_id)?ot.delBorder:""}`,key:_i.user_id},Un.createElement("span",{className:"c-grey-333"},_i==null?void 0:_i.name),Un.createElement("span",{className:`iconfont icon-guanbi11 current ml20 c-grey-ccc ${ot.delSty}`,onMouseEnter:()=>{ri(_i==null?void 0:_i.user_id)},onMouseLeave:()=>{ri("")},onClick:()=>{const Wr=en.filter(Br=>Br.user_id!==_i.user_id);Ri(Wr.map(Br=>Br.user_id)),ni(Wr)}}))),Un.createElement(pt.ZP,{className:ot.copHover,style:{height:38,padding:"6px 15px"},type:"primary",ghost:!0,onClick:()=>un(!0)},"\u6DFB\u52A0\u534F\u4F5C\u8005")),Un.createElement(mt.default,{title:"\u6DFB\u52A0\u534F\u4F5C\u8005",open:Ft,onCancel:()=>un(!1),onOk:()=>{const _i=zn.filter(Wr=>Ti.includes(Wr.user_id));ni(_i),un(!1)},afterClose:()=>{Ut("")}},Un.createElement(Je.Z,{align:"middle"},Un.createElement("label",null,"\u59D3\u540D\uFF1A"),Un.createElement(yt.default.Search,{value:hi,size:"middle",style:{flex:1},onChange:_i=>Ut(_i.target.value)})),Un.createElement(Vt.default,{style:{marginTop:10,height:300,overflow:"auto"},rowSelection:{type:"checkbox",onChange:_i=>{Ri(_i)},selectedRowKeys:Ti,getCheckboxProps:_i=>({disabled:_i.is_collaborator})},pagination:!1,rowKey:"user_id",size:"middle",dataSource:zn.filter(_i=>_i.name.includes(hi)),columns:[{title:"\u59D3\u540D",dataIndex:"name"},{title:"\u89D2\u8272",dataIndex:"role"}]})))};var In=()=>{var en;const ni=(0,xe.useParams)(),zt=(0,xe.useDispatch)(),[Kt]=ct.default.useForm(),Ft=ct.default.useWatch("hack_score_settings",Kt),un=ct.default.useWatch("open_code",Kt),Ti=ct.default.useWatch("rank_forbidden",Kt),Ri=ct.default.useWatch("hack_analysis",Kt),hi=ct.default.useWatch("hack_answer",Kt),[Ut,zn]=(0,ve.useState)([]),[xn,Fr]=(0,ve.useState)({}),[ri,$t]=(0,ve.useState)({course_end_date:null,manage_all_group:!0,send_type:0,can_publish:!0,difficult_settings:[],difficult_count:[],unified_setting:!0}),[_i,Wr]=(0,ve.useState)(!0),[Br,Sn]=(0,ve.useState)(!1),[or,Xo]=(0,ve.useState)(!1),[Na,aa]=(0,ve.useState)({}),[ur,Nr]=(0,ve.useState)(!1),[io,va]=(0,ve.useState)(!1),Ho=(0,ve.useRef)(!1),pi=(0,ve.useRef)(String(Math.random()).slice(-6)),lo=(en=window.location.pathname)==null?void 0:en.includes("add");(0,ve.useEffect)(()=>(window.addEventListener("visibilitychange",al),()=>{window.removeEventListener("visibilitychange",al)}),[Ut,Na]),(0,ve.useEffect)(()=>(zt({type:"globalSetting/footerToggle",payload:!1}),()=>{zt({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,ve.useEffect)(()=>{Ut.length&&Ft!==void 0&&Ao()},[Ft,JSON.stringify(Ut==null?void 0:Ut.map(Er=>Er.id+Er.hack_score))]),(0,ve.useEffect)(()=>{el(),lo?Wr(!1):Ns()},[]);const al=()=>Ee(void 0,null,function*(){var Er;if(document.visibilityState==="visible"){va(!0);let uo=Ut.map(ka=>ka.id),So=localStorage.getItem(pi.current);So&&(So=JSON.parse(So),So=Array.isArray(So)?So:[],uo=[...uo,...So],localStorage.removeItem(pi.current));const Wn=yield(0,At.ZP)("/api/item_banks.json",{method:"get",params:{hack_item_bank_ids:uo.length?uo:-1,homework_common_id:lo?null:Na==null?void 0:Na.homework_id}});if(Wn!=null&&Wn.items){const ka=(Er=Wn==null?void 0:Wn.items)==null?void 0:Er.map(Cn=>{const Po=Ut.find(Ws=>Ws.id===Cn.id);return Po?No(la({},Cn),{hack_score:Po.hack_score}):Cn});zn(ka)}va(!1)}}),el=()=>Ee(void 0,null,function*(){const Er=yield(0,At.ZP)(`/api/courses/${ni.coursesId}/homework_commons/new.json`,{method:"get",params:{category:ni==null?void 0:ni.categoryId,type:5}});Er!=null&&Er.course_name&&Fr(Er)}),Ns=()=>Ee(void 0,null,function*(){var Er,uo;const So=yield(0,At.ZP)(`/api/homework_commons/${ni==null?void 0:ni.categoryId}/edit_hack.json`,{method:"get"});if((So==null?void 0:So.status)===0){const Wn=(Er=So==null?void 0:So.collaborators_data)==null?void 0:Er.map(Cn=>({user_id:Cn.id,name:Cn.real_name}));Kt.setFieldsValue(No(la({},So),{user_ids:Wn,rank_forbidden_start:So!=null&&So.rank_forbidden_start?ra()(So==null?void 0:So.rank_forbidden_start):"",rank_forbidden_end:So!=null&&So.rank_forbidden_end?ra()(So==null?void 0:So.rank_forbidden_end):""}));const ka=(uo=So==null?void 0:So.items)==null?void 0:uo.map((Cn,Po)=>{var Ws,ds;return No(la({},Cn),{hack_score:(ds=(Ws=So==null?void 0:So.hack_settings)==null?void 0:Ws[Po])==null?void 0:ds.hack_score})});zn(ka||[]),aa(la({},So))}Wr(!1)}),ln=()=>{let Er=`/classrooms/${ni==null?void 0:ni.coursesId}/program_homework`;return lo||(Er=`/classrooms/${ni==null?void 0:ni.coursesId}/program_homework/${ni==null?void 0:ni.categoryId}/detail`),Er},Yo=[{name:(xn==null?void 0:xn.course_name)||"",path:`/classrooms/${xn==null?void 0:xn.course_id}/program_homework`},{name:lo?"\u7F16\u7A0B\u4F5C\u4E1A":Na==null?void 0:Na.name,path:ln()},{name:(lo?"\u65B0\u5EFA":"\u7F16\u8F91")+"\u7F16\u7A0B\u4F5C\u4E1A"}],Va=[{title:"\u5E8F\u53F7",dataIndex:"index",width:80,render:(Er,uo,So)=>So+1},{title:"\u6807\u9898",dataIndex:"name",ellipsis:!0,render:Er=>Un.createElement(We.Z,{placement:"topLeft",title:Er},Un.createElement("span",null,Er||"--"))},{title:"\u5206\u503C",dataIndex:"hack_score",render:(Er,uo,So)=>Un.createElement(Te.Z,{disabled:Ft!==2,size:"middle",min:0,precision:1,addonAfter:"\u5206",value:Er,onChange:Wn=>{Ut[So].hack_score=Wn;const ka=Ut.reduce((Cn,Po)=>Cn+Number(Po.hack_score||0),0);Kt.setFieldsValue({total_score:ka.toFixed(2)}),zn([...Ut])}})},{title:"\u96BE\u5EA6",dataIndex:"difficulty",align:"center",width:90,render:Er=>Un.createElement("span",null,Er===1?"\u7B80\u5355":Er===2?"\u4E2D\u7B49":"\u56F0\u96BE")},{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline",render:Er=>Un.createElement(We.Z,{placement:"topLeft",title:Er},Un.createElement("span",{style:{backgroundColor:"#ECFAF5",color:"#1B8565",overflow:"hidden",textOverflow:"ellipsis",padding:"2px 6px"}},Er||"--"))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"quotes"},{title:"\u64CD\u4F5C",dataIndex:"action",width:146,render:(Er,uo)=>Un.createElement("span",null,Un.createElement("span",{onClick:()=>Ee(void 0,null,function*(){var So;zt({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u521D\u59CB\u5316\uFF0C\u8BF7\u7A0D\u540E..."}});let Wn=yield(0,At.ZP)(`/api/problems/${(So=uo==null?void 0:uo.program_attr)==null?void 0:So.identifier}/start.json`,{method:"get"});(Wn==null?void 0:Wn.status)===0&&(0,me.xg)(`/myproblems/${Wn==null?void 0:Wn.identifier}?type=1&pageId=edit&backUrl=${ln()}`),zt({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),className:"c-light-primary current"},"\u4F53\u9A8C"),Un.createElement("span",{onClick:()=>{var So;return(0,me.xg)(`/problems/newedit/${(So=uo==null?void 0:uo.program_attr)==null?void 0:So.identifier}?type=1&pageId=edit&backUrl=${window.location.pathname}`)},className:"c-light-primary current mr20 ml20"},"\u7F16\u8F91"),Un.createElement("span",{onClick:()=>{const So=Ut.filter(Wn=>Wn.id!==uo.id);zn(So),ne.ZP.success("\u5220\u9664\u6210\u529F")},className:"current",style:{color:"#E30000"}},"\u5220\u9664"))}],Ao=()=>{const Er=[...Ut],uo=Kt.getFieldValue("total_score"),So=Er==null?void 0:Er.length;let Wn=0,ka;switch(Ft){case 0:const Cn=(uo/So).toFixed(2);Er.map((tl,ts)=>{Wn=ts,tl.hack_score=Cn>0?Cn:0}),ka=(uo-Cn*(So-1)).toFixed(2),Er[Wn].hack_score=ka>0?ka:0;break;case 1:const Po=[0,1,3,6];let Ws=0;const ds=Er.filter(tl=>tl.difficulty===1).length*Po[1],kl=Er.filter(tl=>tl.difficulty===2).length*Po[2],Ss=Er.filter(tl=>tl.difficulty===3).length*Po[3],Ua=uo/(ds+kl+Ss);Er.map((tl,ts)=>{Wn=ts,tl.hack_score=(Po[tl.difficulty]*Ua).toFixed(2),Ws=Ws+Number(tl.hack_score)});let us=Er[Wn].hack_score;ka=(uo-Ws+Number(us)).toFixed(2),Er[Wn].hack_score=ka>0?ka:0;break}zn(Er)},ms=Er=>{Ho.current=Er,Kt.submit()},Ba=Er=>Ee(void 0,null,function*(){var uo;if(!Ut.length){ne.ZP.error("\u672A\u8BBE\u7F6E\u7F16\u7A0B\u9898\uFF0C\u8BF7\u6DFB\u52A0\u7F16\u7A0B\u9898"),Kt.scrollToField("hack_score_settings",{behavior:"smooth",block:"center"});return}Nr(!0);const So=[],Wn=Ut.map(Po=>(So.push(Po.hack_id),{hack_id:Po.hack_id,hack_name:Po.name,hack_score:Po.hack_score,difficult:Po.difficulty})),ka=(uo=Er==null?void 0:Er.user_ids)==null?void 0:uo.map(Po=>Po.user_id),Cn=yield(0,At.ZP)(`/api/courses/${ni.coursesId}/homework_commons/create_hack_homework.json`,{method:"post",body:No(la({},Er),{category:lo?Number(ni==null?void 0:ni.categoryId):null,homework_id:lo?null:Na==null?void 0:Na.homework_id,hack_settings:Wn,user_ids:ka,hack_ids:So})});if((Cn==null?void 0:Cn.status)===0)if(ne.ZP.success("\u4FDD\u5B58\u6210\u529F"),Ho.current){const Po=la({},Cn);$t(Po),zt({type:"classroomList/setActionTabs",payload:{key:"\u7ACB\u5373\u53D1\u5E03",selectArrs:[Cn==null?void 0:Cn.id],selectArrsAll:[Po],params:ni,detail:!0,type:2,manage_all_group:Po==null?void 0:Po.manage_all_group}})}else xe.history.push(`/classrooms/${ni.coursesId}/program_homework/${Cn==null?void 0:Cn.id}/detail`);Nr(!1)}),$a=Er=>Ee(void 0,null,function*(){if(!Er.length){ne.ZP.warning("\u8BF7\u9009\u62E9\u7F16\u7A0B\u9898");return}if(Er.length>200){ne.ZP.warning("\u7F16\u7A0B\u9898\u6570\u91CF\u4E0D\u5F97\u8D85\u8FC7200\u9053");return}const uo=[],So=Ut.map(Cn=>{var Po;return(Po=Cn.program_attr)==null?void 0:Po.origin_item_bank_id}),Wn=[];Er.forEach(Cn=>{if(So.includes(Cn)){const Po=Ut.find(Ws=>{var ds;return((ds=Ws.program_attr)==null?void 0:ds.origin_item_bank_id)===Cn});Wn.push(Po)}else uo.push(Cn)}),Xo(!0);const ka=yield(0,At.ZP)("/api/problems/copy_item_banks.json",{method:"post",body:{ids:uo}});if(ka!=null&&ka.items){const Cn=[...Wn,...ka==null?void 0:ka.items];if(Ft===2){const Po=Cn.reduce((Ws,ds)=>Ws+Number(ds.hack_score||0),0);Kt.setFieldsValue({total_score:Po.toFixed(2)})}zn(Cn),Sn(!1)}Xo(!1)});return Un.createElement("div",{className:ot.wrap},Un.createElement(te.Z,{spinning:_i},Un.createElement("div",{className:ot.center},Un.createElement(Nt._b,{dataSource:Yo,className:"mb20"}),Un.createElement(ct.default,{form:Kt,preserve:!1,onValuesChange:Er=>{"total_score"in Er&&Ao()},onFinishFailed:Er=>Ee(void 0,null,function*(){var uo,So;ne.ZP.error(Er.errorFields[0].errors[0]),Kt.scrollToField((So=(uo=Er==null?void 0:Er.errorFields)==null?void 0:uo[0])==null?void 0:So.name,{behavior:"smooth",block:"center"})}),onFinish:Ba,colon:!1,size:"large"},Un.createElement(pn,{className:"mb20",title:"\u57FA\u672C\u4FE1\u606F",icon:"iconfont icon-jibenxinxi2"},Un.createElement(ct.default.Item,{label:"\u4F5C\u4E1A\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u540D\u79F0"},{whitespace:!0,message:"\u4F5C\u4E1A\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"}]},Un.createElement(yt.default,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u540D\u79F0",showCount:!0,maxLength:60})),Un.createElement(ct.default.Item,{labelCol:{flex:"81px"},label:"\u4F5C\u4E1A\u8BF4\u660E",name:"description",initialValue:"",rules:[{max:5e4,message:"\u4F5C\u4E1A\u8BF4\u660E\u6700\u5927\u9650\u523650000\u4E2A\u5B57\u7B26"}]},Un.createElement(hn,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u523650000\u4E2A\u5B57\u7B26",watch:!0}))),Un.createElement(pn,{className:"mb20",title:"\u9898\u76EE\u8BBE\u7F6E",icon:"iconfont icon-timushezhi"},Un.createElement(ct.default.Item,{label:"\u8BD5\u9898\u7F16\u7A0B\u8BED\u8A00",name:"languages",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BD5\u9898\u7F16\u7A0B\u8BED\u8A00"}]},Un.createElement(ue.default.Group,null,Un.createElement(ue.default,{value:"c"},"C\u8BED\u8A00"),Un.createElement(ue.default,{value:"c++"},"C++\u8BED\u8A00"),Un.createElement(ue.default,{value:"java"},"Java\u8BED\u8A00"),Un.createElement(ue.default,{value:"python"},"Python\u8BED\u8A00"))),Un.createElement(Je.Z,{align:"middle"},Un.createElement(ct.default.Item,{label:"\u603B\u5206\u503C",name:"total_score",rules:[{required:!0,message:"\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A"}],initialValue:100},Un.createElement(Te.Z,{precision:1,disabled:Ft===2,min:0,style:{width:223},addonAfter:"\u5206"})),Un.createElement(ct.default.Item,{label:"\u6D4B\u8BC4\u5355\u6B21\u62A5\u9519\u589E\u52A0\u65F6\u957F",name:"punish_time",initialValue:0,style:{marginLeft:40}},Un.createElement(Te.Z,{min:0,style:{width:223},addonAfter:"\u5206\u949F"}))),Un.createElement(ct.default.Item,{label:"\u8BD5\u9898\u5206\u503C",name:"hack_score_settings",initialValue:0},Un.createElement(se.ZP.Group,null,Un.createElement(se.ZP,{value:0},"\u5747\u5206\u6BD4\u4F8B"),Un.createElement(se.ZP,{style:{margin:"0 40px"},value:1},"\u96BE\u6613\u5EA6"),Un.createElement(se.ZP,{value:2},"\u81EA\u5B9A\u4E49\u5206\u503C"))),Un.createElement(Je.Z,{align:"middle"},Un.createElement("span",null,"\u9898\u76EE\u5217\u8868"),Un.createElement(pt.ZP,{onClick:()=>Sn(!0),style:{marginLeft:"auto",width:110},type:"primary",ghost:!0},"\u9009\u62E9\u7F16\u7A0B\u9898"),Un.createElement(pt.ZP,{onClick:()=>(0,me.xg)(`/problems/newcreate?pageId=${pi.current}`),style:{marginLeft:20,width:110},type:"primary"},"\u65B0\u589E\u7F16\u7A0B\u9898")),Un.createElement("div",{className:ot.tip},Un.createElement("i",{className:"iconfont icon-tishi12 mr5 font14"}),"\u63D0\u793A\uFF1A\u53EF\u4EE5\u70B9\u51FB\u201C\u7F16\u8F91\u201D\u5BF9\u8BE5\u8BD5\u9898\u7684\u6D4B\u8BD5\u7528\u4F8B/\u521D\u59CB\u4EE3\u7801\u8FDB\u884C\u4FEE\u6539\uFF0C\u4FEE\u6539\u7684\u5185\u5BB9\u5E76\u4E0D\u4F1A\u540C\u6B65\u5230\u8BD5\u9898\u5E93"),Un.createElement(ct.default.Item,{name:"hack_settings",className:"mb0",initialValue:[]},Un.createElement(ai,{dataSource:Ut,setDataSource:zn,columns:Va,loading:io}))),Un.createElement(pn,{style:{marginBottom:100},title:"\u4F5C\u4E1A\u8BBE\u7F6E",icon:"iconfont icon-zuoyeshezhi"},Un.createElement("div",{className:ot.title},"\u6392\u884C\u699C\u65F6\u95F4\u540D\u6B21\u89C4\u5219"),Un.createElement("div",{className:`${ot.content} mb30`},Un.createElement(ct.default.Item,{name:"hack_rank_rule",noStyle:!0,initialValue:0},Un.createElement(se.ZP.Group,null,Un.createElement(se.ZP,{value:0},Un.createElement("span",{className:"c-black"},"\u8017\u65F6\u65F6\u957F\u4F18\u5148"),Un.createElement("span",{className:"c-grey-666 font14"},"\uFF08\u540C\u6210\u7EE9\uFF0C\u8017\u65F6\u8D8A\u77ED\u540D\u6B21\u8D8A\u524D\uFF09")),Un.createElement(se.ZP,{style:{marginLeft:40},value:1},Un.createElement("span",{className:"c-black"},"\u5B8C\u6210\u65F6\u95F4\u70B9\u4F18\u5148"),Un.createElement("span",{className:"c-grey-666 font14"},"\uFF08\u540C\u6210\u7EE9\uFF0C\u5B8C\u6210\u65F6\u95F4\u8D8A\u65E9\u540D\u6B21\u8D8A\u524D\uFF09"))))),Un.createElement("div",{className:`${ot.title} mt30`},"\u5B66\u751F\u5B9E\u9A8C\u62A5\u544A\u4EE3\u7801\u5C55\u793A\u8BBE\u7F6E"),Un.createElement("div",{className:ot.content},Un.createElement(ct.default.Item,{name:"show_late_code",noStyle:!0,valuePropName:"checked",initialValue:!0},Un.createElement(ue.default,null,Un.createElement("span",{className:"c-black"},"\u5C55\u793A\u6240\u6709\u8BC4\u6D4B\u4EE3\u7801"),Un.createElement("span",{className:"c-grey-666 ml10"},"\uFF08\u52FE\u9009\u540E\uFF0C\u5C55\u793A\u6240\u6709\u8BC4\u6D4B\u4EE3\u7801\uFF0C\u5426\u5219\u53EA\u5C55\u793A\u5728\u4F5C\u4E1A\u65F6\u95F4\u8303\u56F4\u5185\u63D0\u4EA4\u7684\u4EE3\u7801\uFF09")))),Un.createElement("div",{className:`${ot.title} mt30`},"\u516C\u5F00\u8BBE\u7F6E"),Un.createElement("div",{className:ot.content},Un.createElement(ct.default.Item,{name:"score_open",valuePropName:"checked",className:"mb0",initialValue:!1},Un.createElement(ue.default,null,Un.createElement("span",{className:"c-black"},"\u516C\u5F00\u6210\u7EE9"),Un.createElement("span",{className:"c-grey-666 ml10"},"\uFF08\u52FE\u9009\u540E\u5B66\u751F\u5728\u4F5C\u4E1A\u622A\u6B62/\u8865\u4EA4\u7ED3\u675F\u540E\uFF0C\u53EF\u67E5\u770B\u5176\u4ED6\u5B66\u751F\u7684\u6210\u7EE9\uFF09"))),Un.createElement(ct.default.Item,{name:"open_code",valuePropName:"checked",className:"mb0",initialValue:!1},Un.createElement(ue.default,null,Un.createElement("span",{className:"c-black"},"\u516C\u5F00\u4EE3\u7801"),Un.createElement("span",{className:"c-grey-666 ml10"},"\uFF08\u8BBE\u7F6E\u5B66\u751F\u53EF\u5728\u6392\u884C\u699C\u4E2D\u67E5\u770B\u4ED6\u4EBA\u8BD5\u9898\u901A\u8FC7\u4EE3\u7801\u8BE6\u60C5\uFF09"))),!!un&&Un.createElement(ct.default.Item,{name:"open_code_type",className:"mb0 ml25",initialValue:1},Un.createElement(se.ZP.Group,null,Un.createElement(se.ZP,{value:1},"\u4F5C\u4E1A\u7ED3\u675F\u540E"),Un.createElement(se.ZP,{style:{marginLeft:60},value:0},"\u4EFB\u610F\u65F6\u95F4"))),Un.createElement(ct.default.Item,{name:"rank_forbidden",valuePropName:"checked",className:"mb0",initialValue:!1},Un.createElement(ue.default,null,Un.createElement("span",{className:"c-black"},"\u5F00\u542F\u5C01\u699C"),Un.createElement("span",{className:"c-grey-666 ml10"},"\uFF08\u8BBE\u7F6E\u5B66\u751F\u4E0D\u53EF\u67E5\u770B\u6392\u884C\u699C\u4FE1\u606F\u7684\u65F6\u95F4\u6BB5\uFF09"))),!!Ti&&Un.createElement(Je.Z,{align:"middle",className:"ml25"},Un.createElement(ct.default.Item,{label:"\u5F00\u59CB\u65F6\u95F4",name:"rank_forbidden_start",initialValue:"",rules:[{required:!0,message:"\u5C01\u699C\u5F00\u59CB\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A"}],className:"mb0"},Un.createElement(ge.default,{style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:me.Q8,disabledTime:me.d0})),Un.createElement(ct.default.Item,{label:"\u622A\u6B62\u65F6\u95F4",name:"rank_forbidden_end",style:{marginLeft:40},initialValue:"",rules:[{required:!0,message:"\u5C01\u699C\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A"}],className:"mb0"},Un.createElement(ge.default,{style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm",disabledDate:me.Q8,disabledTime:me.d0}))),Un.createElement(ct.default.Item,{name:"hack_analysis",valuePropName:"checked",className:"mb0",initialValue:!1},Un.createElement(ue.default,null,Un.createElement("span",{className:"c-black"},"\u516C\u5F00\u89E3\u6790"),Un.createElement("span",{className:"c-grey-666 ml10"},"\uFF08\u8BBE\u7F6E\u5B66\u751F\u5728\u5B9E\u9A8C\u9875\u9762\u67E5\u770B\u8BD5\u9898\u89E3\u6790\uFF09"))),!!Ri&&Un.createElement(ct.default.Item,{name:"hack_analysis_type",className:"mb0 ml25",initialValue:2},Un.createElement(se.ZP.Group,null,Un.createElement(se.ZP,{value:2},"\u4F5C\u4E1A\u7ED3\u675F\u540E"),Un.createElement(se.ZP,{value:0,style:{marginLeft:60}},"\u4EFB\u610F\u65F6\u95F4"),Un.createElement(se.ZP,{style:{marginLeft:60},value:1},"\u5B66\u751F\u901A\u8FC7\u7B54\u9898\u540E/\u672A\u901A\u8FC7\u7684\u5B66\u751F\u4F5C\u4E1A\u622A\u6B62\u540E"))),Un.createElement(ct.default.Item,{name:"hack_answer",valuePropName:"checked",className:"mb0",initialValue:!1},Un.createElement(ue.default,null,Un.createElement("span",{className:"c-black"},"\u516C\u5F00\u7B54\u6848"),Un.createElement("span",{className:"c-grey-666 ml10"},"\uFF08\u8BBE\u7F6E\u5B66\u751F\u5728\u5B9E\u9A8C\u9875\u9762\u67E5\u770B\u8BD5\u9898\u7B54\u6848\uFF09"))),!!hi&&Un.createElement(ct.default.Item,{name:"hack_answer_type",className:"mb0 ml25",initialValue:1},Un.createElement(se.ZP.Group,null,Un.createElement(se.ZP,{value:1},"\u4F5C\u4E1A\u7ED3\u675F\u540E"),Un.createElement(se.ZP,{value:0,style:{marginLeft:60}},"\u4EFB\u610F\u65F6\u95F4")))),Un.createElement("div",{className:`${ot.title} mt30`},"\u534F\u4F5C\u8BBE\u7F6E"),Un.createElement(ct.default.Item,{name:"user_ids",noStyle:!0,initialValue:[]},Un.createElement(ii,{params:ni}))))),Un.createElement("div",{className:ot.fixedBtns},Un.createElement(Je.Z,{align:"middle",className:ot.center},Un.createElement(pt.ZP,{onClick:()=>xe.history.push(ln()),style:{padding:"6px 15px"},type:"primary",ghost:!0},"\u53D6\u6D88"),Un.createElement(pt.ZP,{loading:ur&&!Ho.current,disabled:ur&&Ho.current,onClick:()=>ms(!1),style:{marginLeft:"auto",marginRight:20,padding:"6px 40px"},type:"primary",ghost:!0},"\u4FDD\u5B58\u4F5C\u4E1A"),Un.createElement(pt.ZP,{loading:ur&&Ho.current,disabled:ur&&!Ho.current,onClick:()=>ms(!0),style:{padding:"6px 19px"},type:"primary"},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u4F5C\u4E1A")))),Un.createElement(dr,{setScoreShow:Sn,isshixuns:!1,ScoreShow:Br,virtualId:pi.current,isloadings:or,onOk:$a,selectedIds:Ut.map(Er=>{var uo;return(uo=Er.program_attr)==null?void 0:uo.origin_item_bank_id})||[]}),Un.createElement(kn.Z,{courseEndTime:ri==null?void 0:ri.course_end_date,onWindowBack:()=>{window.location.href=`/classrooms/${ni==null?void 0:ni.coursesId}/program_homework/${ri==null?void 0:ri.id}/detail`}}))}},12082:function(Dn,ei,be){"use strict";var ve=be(67294),ot=be(91773),wt=be(2453),Qt=be(62844),Nt=be(71230),Re=be(98813),Je=be(37720),pt=be(15746),mt=be(18046),yt=be(84567),Vt=be(94699),ct=be.n(Vt),We=be(33170),Te=be(52262),ne=be(28706),te=be(35973),ue=be(12317),se=be(89779),ge=be(17998),me=be(67294),xe=Object.defineProperty,Pe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,ft=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,at=(Jn,qn,sn)=>qn in Jn?xe(Jn,qn,{enumerable:!0,configurable:!0,writable:!0,value:sn}):Jn[qn]=sn,jt=(Jn,qn)=>{for(var sn in qn||(qn={}))ft.call(qn,sn)&&at(Jn,sn,qn[sn]);if(nt)for(var sn of nt(qn))qe.call(qn,sn)&&at(Jn,sn,qn[sn]);return Jn},Mt=(Jn,qn)=>Pe(Jn,Ke(qn)),bt=(Jn,qn)=>{var sn={};for(var Nn in Jn)ft.call(Jn,Nn)&&qn.indexOf(Nn)<0&&(sn[Nn]=Jn[Nn]);if(Jn!=null&&nt)for(var Nn of nt(Jn))qn.indexOf(Nn)<0&&qe.call(Jn,Nn)&&(sn[Nn]=Jn[Nn]);return sn},Bt=(Jn,qn,sn)=>new Promise((Nn,lt)=>{var Ge=ai=>{try{Rn(sn.next(ai))}catch(Zt){lt(Zt)}},Ne=ai=>{try{Rn(sn.throw(ai))}catch(Zt){lt(Zt)}},Rn=ai=>ai.done?Nn(ai.value):Promise.resolve(ai.value).then(Ge,Ne);Rn((sn=sn.apply(Jn,qn)).next())});const Ht=Jn=>{var qn=Jn,{classroomList:sn,dispatch:Nn,courseEndTime:lt,onWindowBack:Ge}=qn,Ne=bt(qn,["classroomList","dispatch","courseEndTime","onWindowBack"]),Rn,ai,Zt,ci,On,Mi,Xt,At,on,Si,Gt,Xe,ke,Me,He,et,Oe,ut,Vn,jn,An,Pn,si,mn,Fi,Vi,Ir,Qi,Di,$r,Yi,hr,dr,kn,Ii,ra,Un,Kr,ia;const sa=(0,te.useParams)(),[Wa]=ot.default.useForm(),[ma,Ha]=(0,ve.useState)(1),[da,la]=(0,ve.useState)([]),[No,ti]=(0,ve.useState)(0),[Ee,pn]=(0,ve.useState)(2e3),[hn,ii]=(0,ve.useState)(!0),[Yn,In]=(0,ve.useState)(!1),[en,ni]=(0,ve.useState)(!1),[zt,Kt]=(0,ve.useState)([]),[Ft,un]=(0,ve.useState)(!0),[Ti,Ri]=(0,ve.useState)(!((Zt=(ai=(Rn=sn.actionTabs)==null?void 0:Rn.selectArrsAll)==null?void 0:ai[0])!=null&&Zt.send_type));let[hi,Ut]=(0,ve.useState)([0,0,0]);(0,ve.useEffect)(()=>{var Br,Sn,or,Xo,Na,aa,ur,Nr,io,va,Ho,pi,lo;if(sn.actionTabs.key==="\u7ACB\u5373\u53D1\u5E03")if(ri(),(or=(Sn=(Br=sn.actionTabs)==null?void 0:Br.selectArrsAll)==null?void 0:Sn[0])!=null&&or.can_publish?Ut([...(io=(Nr=(ur=sn.actionTabs)==null?void 0:ur.selectArrsAll)==null?void 0:Nr[0])==null?void 0:io.difficult_count]):Ut([...(aa=(Na=(Xo=sn.actionTabs)==null?void 0:Xo.selectArrsAll)==null?void 0:Na[0])==null?void 0:aa.difficult_settings]),Ri(!((pi=(Ho=(va=sn.actionTabs)==null?void 0:va.selectArrsAll)==null?void 0:Ho[0])!=null&&pi.send_type)),zn(),sn.actionTabs.type===2){const al=(lo=sn.actionTabs.selectArrsAll)==null?void 0:lo[0];un(al.unified_setting)}else un(!1)},[sn.actionTabs]),(0,ve.useEffect)(()=>{if(Yn){if(en)return;Nn({type:"classroomList/setActionTabs",payload:{}}),(0,Te.GJ)()?(Nn({type:"classroomList/getClassroomTeacherCommonList",payload:Mt(jt({},sn.actionTabs.params),{type:1})}),Nn({type:"shixunHomeworks/getWorkList",payload:jt({},sa)})):Nn({type:"classroomList/getClassroomCommonList",payload:jt({},sn.actionTabs.params)})}},[Yn]);const zn=Br=>Bt(void 0,null,function*(){ii(!0);const Sn=yield(0,se.c_)(Mt(jt({},sa),{page:Br||ma,limit:2e4,homework_id:sn.actionTabs.type===1?"":sn.actionTabs.selectArrs[0]}));Sn==null||Sn.course_groups.map((or,Xo)=>{or.key=or.id,or.title=or.name,or.disabled=or.is_published}),Sn&&(la([...Sn==null?void 0:Sn.course_groups]),ti(Sn==null?void 0:Sn.course_groups_count),ii(!1),Br||Wa.setFieldsValue({publish_time:ct()(ct()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm")),end_time:ct()(ct()(new Date).add(7,"days").format("YYYY-MM-DD HH:mm"))}))}),xn=()=>{(0,Te.GJ)()?sn.actionTabs.detail?(Nn({type:"shixunHomeworks/setActionTabs",payload:{}}),Nn({type:"shixunHomeworks/getWorkList",payload:jt({},sa)}),Nn({type:"shixunHomeworks/getWorkSetting",payload:jt({},sa)})):Nn({type:"classroomList/getClassroomTeacherCommonList",payload:Mt(jt({},sn.actionTabs.params),{type:5,category:sn.actionTabs.params.categoryId})}):Nn({type:"classroomList/getClassroomCommonList",payload:jt({},sn.actionTabs.params)})},Fr=()=>Bt(void 0,null,function*(){var Br,Sn;if((0,Te.Rm)()&&!((Br=sn.AssistantObject.hack)!=null&&Br.can_publish)){wt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),Wr(!1);return}const or=jt({},Wa.getFieldsValue());if(or.end_time<=or.publish_time){wt.ZP.info("\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u5927\u4E8E\u6216\u7B49\u4E8E\u53D1\u5E03\u65F6\u95F4"),Wr(!1);return}if((zt==null?void 0:zt.length)<=0&&!Ft&&da.length>0){wt.ZP.info("\u53D1\u5E03\u73ED\u7EA7\u4E0D\u80FD\u4E3A\u7A7A"),Wr(!1);return}if(hi.reduce((aa,ur)=>aa+ur)===0&&!Ti){wt.ZP.info("\u7B80\u5355\u9002\u4E2D\u56F0\u96BE\u9898\u6570\u76F8\u52A0\u4E0D\u80FD\u4E3A0"),Wr(!1);return}let Xo={homework_ids:[...sn.actionTabs.selectArrs],group_ids:zt.length>0?zt.map(aa=>aa.id):(Sn=sn.detailCommonHomeworksList)==null?void 0:Sn.course_groups,end_time:ct()(or.end_time).format("YYYY-MM-DD HH:mm"),publish_time:ct()(or.publish_time).format("YYYY-MM-DD HH:mm"),difficult_settings:hi==null?void 0:hi.map(aa=>aa),send_type:Ti?"0":"1",unified_setting:!zt.length};if(Wr(!0),(yield(0,We.ZP)(`/api/courses/${sa.coursesId}/homework_commons/publish_with_homework_list_position.json`,{method:"post",body:jt({},Xo)})).status===0){if(Wr(!1),(0,ne.L9)(["\u6559\u5B66\u8BFE\u5802","\u56FE\u6587\u4F5C\u4E1A","\u7ACB\u5373\u53D1\u5E03"]),wt.ZP.success("\u53D1\u5E03\u6210\u529F"),Nn({type:"classroomList/setActionTabs",payload:{key:"\u6E05\u9664\u9009\u62E9\u6570\u636E"}}),Ge){Ge();return}Ne.onCallback&&Ne.onCallback(),xn(),localStorage.getItem("Noviceguide")==="0"||Nn({type:"shixunHomeworks/setActionTabs",payload:{key:"\u5E95\u90E8\u5F39\u7A97",type:13,text:me.createElement("div",null,"\u6700\u540E\uFF0C\u54B1\u4EEC\u7ED9\u6559\u5B66\u8BFE\u5802\u6DFB\u52A0\u4E00\u540D\u5B66\u751F~\u70B9\u51FB\u201C\u6DFB\u52A0\u5B66\u751F\u201D\uFF0C\u5728\u5F39\u7A97\u9875\u9762\u4E2D\u8F93\u5165\u5E76\u641C\u7D22\u5B66\u751F\u59D3\u540D\uFF0C\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u5C31\u53EF\u4EE5\u4E3A\u60A8\u7684\u8BFE\u5802\u6DFB\u52A0\u7B2C\u4E00\u4F4D\u5B66\u751F\u5566~")}})}else Wr(!1)}),ri=()=>{Ha(1),la([]),Kt([])},$t=No>ma*Ee,[_i,Wr]=(0,ve.useState)(!1);return me.createElement(Qt.default,{width:600,confirmLoading:_i,centered:!0,title:"\u53D1\u5E03\u4F5C\u4E1A",open:sn.actionTabs.key==="\u7ACB\u5373\u53D1\u5E03",okText:"\u53D1\u5E03\u4F5C\u4E1A",cancelText:"\u6682\u4E0D\u53D1\u5E03",onOk:Fr,onCancel:()=>{if(ri(),Nn({type:"classroomList/setActionTabs",payload:{}}),Ge){Ge();return}xn()}},me.createElement("p",{className:"tc"},"\u5B66\u751F\u5C06\u7ACB\u5373\u6536\u5230\u4F5C\u4E1A",me.createElement("br",null),'\u672C\u64CD\u4F5C\u53EA\u5BF9"\u672A\u53D1\u5E03"\u7684\u4F5C\u4E1A\u6709\u6548'),da&&me.createElement(ot.default,{form:Wa},me.createElement("div",{style:{paddingLeft:0}},sn.actionTabs.type===2&&me.createElement(Nt.Z,{style:{marginBottom:"10px"}},me.createElement("span",{className:"mr5"},"\u8BD5\u9898\u53D1\u9001:"),me.createElement(Re.ZP.Group,{value:Ti,disabled:!((Mi=(On=(ci=sn.actionTabs)==null?void 0:ci.selectArrsAll)==null?void 0:On[0])!=null&&Mi.can_publish),onChange:Br=>{Ri(Br.target.value)}},me.createElement(Re.ZP,{value:!0},"\u5168\u90E8\u56FA\u5B9A\u8BD5\u9898"),me.createElement(Re.ZP,{className:"ml20",value:!1},"\u968F\u673A\u62BD\u53D6"))),!Ti&&me.createElement(Nt.Z,{style:{marginBottom:"10px"}},me.createElement("span",{style:{marginRight:65}}),me.createElement("span",null,"\u7B80\u5355\u9898\u6570 ",me.createElement(Je.Z,{value:hi[0],onChange:Br=>{hi[0]=Br,Ut([...hi])},min:0,disabled:!((on=(At=(Xt=sn.actionTabs)==null?void 0:Xt.selectArrsAll)==null?void 0:At[0])!=null&&on.can_publish),placeholder:`\u6700\u5927${(ke=(Xe=(Gt=(Si=sn.actionTabs)==null?void 0:Si.selectArrsAll)==null?void 0:Gt[0])==null?void 0:Xe.difficult_count)==null?void 0:ke[0]}`,max:(Oe=(et=(He=(Me=sn.actionTabs)==null?void 0:Me.selectArrsAll)==null?void 0:He[0])==null?void 0:et.difficult_count)==null?void 0:Oe[0],style:{width:60}})),me.createElement("span",{style:{margin:"0px 40px"}},"\u9002\u4E2D\u9898\u6570 ",me.createElement(Je.Z,{value:hi[1],onChange:Br=>{hi[1]=Br,Ut([...hi])},min:0,disabled:!((jn=(Vn=(ut=sn.actionTabs)==null?void 0:ut.selectArrsAll)==null?void 0:Vn[0])!=null&&jn.can_publish),max:(mn=(si=(Pn=(An=sn.actionTabs)==null?void 0:An.selectArrsAll)==null?void 0:Pn[0])==null?void 0:si.difficult_count)==null?void 0:mn[1],placeholder:`\u6700\u5927${(Qi=(Ir=(Vi=(Fi=sn.actionTabs)==null?void 0:Fi.selectArrsAll)==null?void 0:Vi[0])==null?void 0:Ir.difficult_count)==null?void 0:Qi[1]}`,style:{width:60}})),me.createElement("span",null,"\u56F0\u96BE\u9898\u6570 ",me.createElement(Je.Z,{value:hi[2],onChange:Br=>{hi[2]=Br,Ut([...hi])},min:0,disabled:!((Yi=($r=(Di=sn.actionTabs)==null?void 0:Di.selectArrsAll)==null?void 0:$r[0])!=null&&Yi.can_publish),placeholder:`\u6700\u5927${(Ii=(kn=(dr=(hr=sn.actionTabs)==null?void 0:hr.selectArrsAll)==null?void 0:dr[0])==null?void 0:kn.difficult_count)==null?void 0:Ii[2]}`,max:(ia=(Kr=(Un=(ra=sn.actionTabs)==null?void 0:ra.selectArrsAll)==null?void 0:Un[0])==null?void 0:Kr.difficult_count)==null?void 0:ia[2],style:{width:60}}))),me.createElement(Nt.Z,{className:"mt30",align:"middle"},me.createElement(pt.Z,null,me.createElement(ot.default.Item,{name:"publish_time",label:"\u53D1\u5E03\u65F6\u95F4"},me.createElement(mt.default,{style:{width:170,marginRight:"25px"},disabledDate:Br=>(0,ge.Q8)(Br,lt),disabledTime:Br=>(0,ge.d0)(Br),placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:ct()((0,ne.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1}))),me.createElement(pt.Z,{className:"ml20"},me.createElement(ot.default.Item,{name:"end_time",label:"\u622A\u6B62\u65F6\u95F4"},me.createElement(mt.default,{style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:ct()((0,ne.U6)(),"HH:mm")},disabledDate:Br=>(0,ge.Q8)(Br,lt,Wa.getFieldValue("publish_time")),disabledTime:Br=>(0,ge.d0)(Br,Wa.getFieldValue("publish_time")),format:"YYYY-MM-DD HH:mm",allowClear:!1})))),sn.actionTabs.type===2&&me.createElement(Nt.Z,{style:{marginBottom:"10px"}},me.createElement("span",{className:"mr5"},"\u53D1\u5E03\u8BBE\u7F6E:"),me.createElement(Re.ZP.Group,{value:Ft,onChange:Br=>{un(Br.target.value),Kt([])}},me.createElement(Re.ZP,{value:!0,disabled:!sn.actionTabs.manage_all_group},"\u7EDF\u4E00\u53D1\u5E03"),me.createElement(Re.ZP,{className:"ml20",disabled:da.length<=0,value:!1},"\u5206\u73ED\u53D1\u5E03"))),da.length<=0&&sn.actionTabs.type===2&&me.createElement("span",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"}},'\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03"')),(sn.actionTabs.type===1||!Ft)&&da.length>0&&me.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"}},me.createElement("span",{style:{flex:1}},me.createElement(yt.default,{checked:zt.length===da.length,onChange:Br=>{zt.length===da.length?Kt([]):Kt(da.filter(Sn=>!Sn.is_published))}},"\u5168\u9009")," "),me.createElement("span",{style:{width:16}}),me.createElement("span",{style:{flex:1}},"\u5DF2\u9009\u62E9",zt.length||0,"\u4E2A\u5206\u73ED")),(sn.actionTabs.type===1||!Ft)&&da.length>0&&me.createElement(ue.Z,{data:da,selectedRowKeys:zt,setSelectedRowKeys:Kt})))};ei.Z=(0,te.connect)(({classroomList:Jn})=>({classroomList:Jn}))(Ht)},17998:function(Dn,ei,be){"use strict";be.d(ei,{Q8:function(){return Ge},d0:function(){return Ne},w6:function(){return lt}});var ve=be(67294),ot=be(18046),wt=be(88044),Qt=be(2453),Nt=be(62844),Re=be(98813),Je=be(71230),pt=be(15746),mt=be(83062),yt=be(84567),Vt=be(85804),ct=be(94699),We=be.n(ct),Te=be(52262),ne=be(33170),te=be(96486),ue=be.n(te),se=be(28706),ge=be(39886),me=be(35973),xe=be(39717),Pe=be(78207),Ke=be(92882),nt=be(96332),ft=be(93686),qe=be(67294),at=Object.defineProperty,jt=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,bt=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,Jn=(On,Mi,Xt)=>Mi in On?at(On,Mi,{enumerable:!0,configurable:!0,writable:!0,value:Xt}):On[Mi]=Xt,qn=(On,Mi)=>{for(var Xt in Mi||(Mi={}))Bt.call(Mi,Xt)&&Jn(On,Xt,Mi[Xt]);if(bt)for(var Xt of bt(Mi))Ht.call(Mi,Xt)&&Jn(On,Xt,Mi[Xt]);return On},sn=(On,Mi)=>jt(On,Mt(Mi)),Nn=(On,Mi,Xt)=>new Promise((At,on)=>{var Si=ke=>{try{Xe(Xt.next(ke))}catch(Me){on(Me)}},Gt=ke=>{try{Xe(Xt.throw(ke))}catch(Me){on(Me)}},Xe=ke=>ke.done?At(ke.value):Promise.resolve(ke.value).then(Si,Gt);Xe((Xt=Xt.apply(On,Mi)).next())});function lt(On,Mi){const Xt=[];for(let At=On;At{const At=OnWe()(Mi).endOf("day"),Si=On{const Xt=parseInt(We()(On).format("HH")),At=parseInt(We()().format("HH")),on=parseInt(We()().format("mm"));if(!On)return{disabledHours:()=>lt(0,At),disabledMinutes:()=>lt(0,on)};if(Mi){const Si=parseInt(We()(Mi).format("HH")),Gt=parseInt(We()(Mi).format("mm"));return We()(On).isSame(We()(Mi),"day")?{disabledHours:()=>lt(0,Si),disabledMinutes:()=>Xt<=Si?lt(0,Gt):[]}:void 0}if(We()(On).isSame(We()(),"day"))return{disabledHours:()=>lt(0,At),disabledMinutes:()=>We()(On).isSame(We()(),"hour")&&Xt<=At?lt(0,on):[]}},Rn=(On,Mi)=>On==null?void 0:On.map(Xt=>{var At;return(At=Mi==null?void 0:Mi.find(on=>on.value===Xt))==null?void 0:At.id}),{RangePicker:ai}=ot.default,{Option:Zt}=wt.default,ci=({shixunHomeworks:On,loading:Mi,dispatch:Xt,classroomList:At,user:on})=>{var Si,Gt,Xe,ke,Me,He,et,Oe,ut;const Vn=(0,me.useParams)(),{workSetting:jn,workList:An,shixunWorkList:Pn,headerInfo:si,changeData:mn}=On,[Fi,Vi]=(0,ve.useState)(!1),[Ir,Qi]=(0,ve.useState)(!1);let[Di,$r]=(0,ve.useState)([]),[Yi,hr]=(0,ve.useState)([]),[dr,kn]=(0,ve.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:xe.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,action_analysis:!1,work_end_forbid_evaluate:!1});const[Ii,ra]=(0,ve.useState)({}),[Un,Kr]=(0,ve.useState)({});(0,ve.useEffect)(()=>()=>{$r([])},[]),(0,ve.useEffect)(()=>{Vi(!(0,Te.GJ)())},[(0,Te.GJ)()]);const ia=()=>{Xt({type:"shixunHomeworks/getWorkSetting",payload:qn({},Vn)})};(0,ve.useEffect)(()=>{if(!(jn!=null&&jn.course_id))return;Object.keys(dr).map(function(hn){dr[hn]=jn[hn]}),(!dr.allow_late||!dr.unified_late)&&(dr.late_penalty=20,dr.penalty_type=xe.Q.Percent),dr.unified_setting||(dr.unified_late=!1,dr.unified_anonymous_comment=!1,dr.unified_anonymous_appeal=!1),Di=JSON.parse(JSON.stringify(jn.group_settings.map(hn=>sn(qn({},hn),{group_name:[hn.group_name]})).filter(hn=>hn.publish_time!==null))),Yi=JSON.parse(JSON.stringify(jn.allow_late_settings.map(hn=>sn(qn({},hn),{group_name:[hn.group_name]})).filter(hn=>hn.late_time!==null))),kn(qn({},dr));const pn=(0,se.QE)((Di==null?void 0:Di.length)>0?Di:[]);$r([...pn]),(Yi==null?void 0:Yi.length)<=0?hr([{penalty_type:xe.Q.Percent,late_penalty:20}]):hr([...Yi])},[jn]);const sa=()=>Nn(void 0,null,function*(){var pn,hn;if(((pn=on==null?void 0:on.userInfo)==null?void 0:pn.user_status)===2){(0,Pe.Rd)();return}const ii=JSON.parse(JSON.stringify(dr));if(ii.challenge_settings.filter(In=>!In.hide),ii.categoryId=Vn.categoryId,(hn=ii.challenge_settings)!=null&&hn.every(In=>!In.checked)){Qt.ZP.warning("\u5173\u5361\u4E0D\u80FD\u5168\u90E8\u8BBE\u7F6E\u4E3A\u53EF\u4E0D\u505A");return}if(console.log(Di),!dr.unified_setting)Di=Di==null?void 0:Di.map(In=>{var en;if(!In.publish_time||!In.end_time)throw Qt.ZP.error("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u53D1\u5E03\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!In.group_name)throw Qt.ZP.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return In.group_name=typeof(In==null?void 0:In.group_name)=="string"?[In==null?void 0:In.group_name]:In==null?void 0:In.group_name,In.group_id=(en=jn.group_settings)==null?void 0:en.filter(ni=>{var zt;return(zt=In==null?void 0:In.group_name)==null?void 0:zt.includes(ni.group_name)}).map(ni=>ni.group_id||ni.id).toString().split(","),In});else if(!dr.publish_time||!dr.end_time)throw Qt.ZP.error("\u53D1\u5E03\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A"),new String("\u53D1\u5E03\u622A\u6B62\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A");if(ii.group_settings=Di,dr.allow_late)if(dr.unified_late){if(dr.late_penalty===null||dr.late_penalty===void 0||dr.late_penalty<0||dr.late_penalty>100)throw Qt.ZP.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!dr.late_time)throw Qt.ZP.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574")}else Yi=Yi==null?void 0:Yi.map(In=>{var en,ni;if(In.late_penalty===null||In.late_penalty===void 0||In.late_penalty<0||In.late_penalty>100)throw Qt.ZP.error("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100"),new String("\u8FDF\u4EA4\u6263\u5206\u586B\u5199\u533A\u95F4\u4E3A0~100");if(!In.late_time)throw Qt.ZP.error("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574"),new String("\u8BF7\u628A\u622A\u6B62\u65F6\u95F4\u586B\u5199\u5B8C\u6574");if(!In.group_name)throw Qt.ZP.error("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0"),new String("\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0");return In.group_name=typeof(In==null?void 0:In.group_name)=="string"?[In==null?void 0:In.group_name]:In==null?void 0:In.group_name,In.group_id=(ni=(en=In==null?void 0:In.group_name)==null?void 0:en.map(zt=>{var Kt,Ft;let un=(Ft=(Kt=jn.group_settings)==null?void 0:Kt.filter(Ti=>(Ti==null?void 0:Ti.group_name)===zt))==null?void 0:Ft[0];return un==null?void 0:un.group_id}))==null?void 0:ni.toString().split(","),In}),ii.allow_late_settings=Yi;let Yn=yield(0,ft.Tr)({homework_common_ids:[parseInt(Vn.categoryId)],course_id:Vn.coursesId,type:"homework_common"});(Yn==null?void 0:Yn.student_count)===0?Wa(ii):(Kr(ii),ra(Yn))}),Wa=pn=>{var hn;if(pn.total_score===null){Qt.ZP.warning("\u603B\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}if(pn!=null&&pn.work_efficiency&&pn.eff_score===null){Qt.ZP.warning("\u6548\u7387\u5206\u4E0D\u80FD\u4E3A\u7A7A");return}const ii=pn.challenge_settings.reduce((en,ni)=>en+Number(ni.challenge_score),0);if((ii==null?void 0:ii.toFixed(10))!==((hn=pn.total_score-pn.eff_score)==null?void 0:hn.toFixed(10))){Qt.ZP.warning(`\u6548\u7387\u5206\u52A0\u5173\u5361\u4EFB\u52A1\u603B\u5206\u5FC5\u987B\u7B49\u4E8E\u603B\u5206\u503C\uFF1A${pn.total_score}\u5206`);return}const Yn={shixun_evaluation:pn.shixun_evaluation,challenge_settings:pn.challenge_settings};let In=()=>{var en;const ni=()=>Nn(void 0,null,function*(){Qi(!0),(yield(0,ne.ZP)(`/api/homework_commons/${Vn.categoryId}/publish_setting.json`,{method:"post",body:qn({},pn)})).status===0&&(Qt.ZP.success("\u66F4\u65B0\u6210\u529F"),ia(),Xt({type:"shixunHomeworks/getShixunWorkHeadInfo",payload:qn({},Vn)})),Qi(!1)});!(0,te.isEqual)(mn,Yn)&&!((en=si==null?void 0:si.homework_status)!=null&&en.includes("\u672A\u53D1\u5E03"))?Nt.default.confirm({title:"\u66F4\u65B0\u6210\u7EE9",content:"\u60A8\u6539\u52A8\u4E86\u672C\u6B21\u4F5C\u4E1A\u7684\u5173\u5361\u5F97\u5206\u8BBE\u7F6E\uFF0C\u8FD9\u53EF\u80FD\u5BFC\u81F4\u5DF2\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\u7684\u6210\u7EE9\u4EA7\u751F\u9519\u8BEF\u3002\u70B9\u51FB\u201C\u786E\u5B9A\u201D\u6309\u94AE\u5C06\u4FDD\u5B58\u6700\u65B0\u8BBE\u7F6E\u5E76\u6309\u6700\u65B0\u8BBE\u7F6E\u66F4\u65B0\u5168\u73ED\u6210\u7EE9\u3002",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:ni}):ni()};jn!=null&&jn.high_resources_consume&&!(jn!=null&&jn.high_resources_consume_permission)?Xt({type:"classroomList/setActionTabs",payload:{key:"\u6388\u6743\u4F7F\u7528",id:Vn.coursesId,type:"shixun",type_id:Vn.categoryId,name:jn.homework_name,fn:()=>{In()}}}):In()},ma=(pn,hn,ii="group_id")=>{var Yn;return hn?hn.find(In=>In[ii]===pn):(Yn=jn==null?void 0:jn.group_settings)==null?void 0:Yn.find(In=>In.group_id[0]===pn)},Ha=(jn==null?void 0:jn.allow_late)||(jn==null?void 0:jn.anonymous_comment),da=pn=>{var hn,ii;const Yn=ma(pn,jn==null?void 0:jn.allow_late_settings,"id"),In=ma(pn,jn==null?void 0:jn.anonymous_comment_settings),en=ma(pn);return(jn==null?void 0:jn.allow_late)&&Yn&&We()(Yn==null?void 0:Yn.late_time)<=We()()||(jn==null?void 0:jn.anonymous_comment)&&In&&(In==null?void 0:In.evaluation_start)!==null||((ii=(We()(en==null?void 0:en.end_time)<=We()()&&((hn=jn==null?void 0:jn.allow_late_settings)==null?void 0:hn.filter(ni=>ni.group_id.includes(pn))))[0])==null?void 0:ii.late_time)!=null},la=(0,ve.useMemo)(()=>(jn==null?void 0:jn.allow_late)||(jn==null?void 0:jn.all_group_late),[jn,si]),No=jn==null?void 0:jn.anonymous_comment,ti=pn=>{if(!pn)return!1;const hn=ma(pn,jn==null?void 0:jn.anonymous_comment_settings);return(jn==null?void 0:jn.anonymous_comment)&&hn&&(hn==null?void 0:hn.evaluation_start)!==null},Ee=(pn,hn)=>{var ii,Yn,In,en,ni;pn!=null&&pn.group_id||(pn.group_id=Rn(pn==null?void 0:pn.group_name,jn==null?void 0:jn.group_settings)),Xt({type:"classroomList/setActionTabs",payload:{key:"\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",data:pn,index:hn,rangePickerDisabled:(Yn=(ii=pn==null?void 0:pn.group_id)==null?void 0:ii[0])!=null&&Yn.publish_time?Fi||(We()()<=We()((en=ma((In=pn==null?void 0:pn.group_id)==null?void 0:In[0]))==null?void 0:en.publish_time)?!1:[!0,da((ni=pn==null?void 0:pn.group_id)==null?void 0:ni[0])]):!1,disabledDate:jn==null?void 0:jn.course_end_date}})};return qe.createElement("section",{className:ge.Z.form},qe.createElement("div",{className:ge.Z.title},"\u4F5C\u4E1A\u53D1\u5E03",qe.createElement("span",{className:"c-grey-666 font14",style:{fontWeight:400}},"\uFF08\u4F5C\u4E1A\u4E00\u65E6\u53D1\u5E03\u540E\u4E0D\u53EF\u53D8\u66F4\u8BD5\u9898\u53D1\u5E03\u6A21\u5F0F\uFF09")),qe.createElement("div",null,qe.createElement("div",{style:{background:"#F6F7F9",padding:"13px 30px",display:"flex",alignItems:"center"}},qe.createElement(Re.ZP.Group,{disabled:Fi||!((Si=si==null?void 0:si.homework_status)!=null&&Si.includes("\u672A\u53D1\u5E03"))||(0,Te.Rm)()&&!((Gt=At.AssistantObject.practice)!=null&&Gt.can_publish),value:dr.unified_setting,onChange:pn=>{var hn;if(!((hn=si==null?void 0:si.homework_status)!=null&&hn.includes("\u672A\u53D1\u5E03"))){Qt.ZP.error("\u5DF2\u53D1\u5E03\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u7EDF\u4E00\u8BBE\u7F6E");return}if(dr.unified_setting=!dr.unified_setting,dr.unified_setting||(dr.unified_late=!1,hr([{late_penalty:5}])),kn(Object.assign({},dr)),dr.unified_setting===!1&&Di==""){$r(Di.concat({}));return}dr.unified_setting&&($r([]),hr([{late_penalty:5}]))}},qe.createElement(Re.ZP,{value:!0,disabled:Fi||!(jn!=null&&jn.manage_all_group),style:{marginRight:"50px"}},"\u7EDF\u4E00\u53D1\u5E03"),qe.createElement(Re.ZP,{disabled:Fi||!((Xe=jn==null?void 0:jn.group_settings)!=null&&Xe.length),value:!1},"\u5206\u73ED\u53D1\u5E03")),((ke=jn==null?void 0:jn.group_settings)==null?void 0:ke.length)===0&&qe.createElement("div",{style:{color:"rgba(0, 0, 0, 0.25)",height:"22px"}},"\uFF08\u672C\u8BFE\u5802\u65E0\u5206\u73ED\uFF0C\u4EC5\u652F\u6301\u9009\u62E9\u201C\u7EDF\u4E00\u53D1\u5E03\u201C\uFF09")),dr.unified_setting&&qe.createElement("div",{style:{display:"flex",color:"#666666",background:"#F6F7F9",padding:"5px 30px",height:"50px",marginTop:"1px"}},qe.createElement(Je.Z,{align:"middle"},qe.createElement(pt.Z,{style:{marginLeft:"23px"}},"\u53D1\u5E03\u65F6\u95F4"),qe.createElement(pt.Z,{className:"ml10"},qe.createElement(ot.default,{size:"large",disabled:Fi||!((Me=si==null?void 0:si.homework_status)!=null&&Me.includes("\u672A\u53D1\u5E03")||(He=si==null?void 0:si.homework_status)!=null&&He.includes("\u672A\u5F00\u59CB"))||(0,Te.Rm)()&&!((et=At.AssistantObject.practice)!=null&&et.can_publish),style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u53D1\u5E03\u65F6\u95F4",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:pn=>Ge(pn,jn==null?void 0:jn.course_end_date),disabledTime:pn=>Ne(pn),value:dr.publish_time?We()(dr.publish_time):"",onChange:(pn,hn)=>{dr.publish_time=hn,(dr.end_time==""||!dr.end_time)&&dr.unified_setting&&(dr.end_time=We()(pn).add(7,"days").format("YYYY-MM-DD HH:mm:ss")),kn(Object.assign({},dr))}}))),qe.createElement(Je.Z,{align:"middle",className:"pl30"},qe.createElement(pt.Z,null,"\u622A\u6B62\u65F6\u95F4"),qe.createElement(pt.Z,{className:"ml10"},qe.createElement(ot.default,{size:"large",style:{width:170},allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:We()((0,se.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:(jn==null?void 0:jn.allow_late)&&(jn==null?void 0:jn.homework_status.includes("\u5DF2\u622A\u6B62"))||Fi||(jn==null?void 0:jn.allow_late)&&We()()>=We()(jn==null?void 0:jn.end_time)||(0,Te.Rm)()&&!((Oe=At.AssistantObject.practice)!=null&&Oe.can_publish),disabledDate:pn=>Ge(pn,jn==null?void 0:jn.course_end_date,dr.publish_time),disabledTime:pn=>Ne(pn,dr.publish_time),value:dr.end_time?We()(dr.end_time):"",onChange:(pn,hn)=>{dr.end_time=hn,kn(Object.assign({},dr))}})))),!dr.unified_setting&&(Di==null?void 0:Di.length)>0&&qe.createElement(Je.Z,{style:{display:"flex",color:"#666666",background:"#F6F7F9",padding:"5px 30px",marginTop:"1px"}},Di&&Di.map(function(pn,hn){var ii,Yn,In,en,ni,zt,Kt;return qe.createElement(pt.Z,{span:24,key:hn},qe.createElement(Je.Z,{gutter:[8,16],style:{display:"flex",alignItems:"center",marginBottom:hn==(Di==null?void 0:Di.length)-1?"0px":"10px"}},qe.createElement("div",{style:{minWidth:85,marginRight:"15px",textAlign:"right"}},"\u53D1\u5E03\u89C4\u5219",hn+1),qe.createElement(wt.default,{disabled:Fi||((ii=si==null?void 0:si.homework_status)!=null&&ii.includes("\u672A\u53D1\u5E03")&&pn.id||We()(){var un;if((0,Te.Rm)()&&!((un=At.AssistantObject.practice)!=null&&un.can_publish)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Di[hn].group_name=Ft,Di[hn].group_id=pn.group_id;const Ti=(0,te.flattenDeep)(Di.map(hi=>hi.group_name)),Ri=Yi.map(hi=>{let Ut=(hi==null?void 0:hi.group_name)||[];return sn(qn({},hi),{group_name:(0,te.remove)(Ut,zn=>Ti.includes(zn))})});hr(Ri),$r(Di.slice())},maxTagCount:4,maxTagPlaceholder:Ft=>qe.createElement("div",{style:{cursor:"pointer"},onClick:()=>Ee(pn,hn)},"+",Ft==null?void 0:Ft.length)},jn.group_settings&&jn.group_settings.map(function(Ft){if(!Di.map(Ti=>Ti.group_name).flat().includes(Ft.group_name))return qe.createElement(Zt,{value:Ft.group_name,key:Ft.id},Ft.group_name)})),qe.createElement("div",{className:"ml20"},qe.createElement(ai,{size:"large",ranges:{\u6B64\u523B:[pn.publish_time?We()(pn.publish_time):We()(),We()()]},allowClear:!1,disabled:Fi||(We()()<=We()((en=ma((In=pn==null?void 0:pn.group_id)==null?void 0:In[0]))==null?void 0:en.publish_time)?!1:[!0,da((ni=pn==null?void 0:pn.group_id)==null?void 0:ni[0])]),style:{width:605},placeholder:["\u53D1\u5E03\u65F6\u95F4\uFF08\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4\uFF09","\u622A\u6B62\u65F6\u95F4\uFF08\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9\uFF09"],disabledDate:Ft=>Ge(Ft,jn==null?void 0:jn.course_end_date),disabledTime:Ft=>Ne(Ft),showTime:{showNow:!0,format:"HH:mm",defaultValue:[We()((0,se.U6)(),"HH:mm"),We()((0,se.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:[pn.publish_time?We()(pn.publish_time):void 0,pn.end_time?We()(pn.end_time):void 0],onChange:(Ft,un)=>{var Ti;if((0,Te.Rm)()&&!((Ti=At.AssistantObject.practice)!=null&&Ti.can_publish)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Di[hn].publish_time=un[0],!pn.end_time&&un[0]?Di[hn].end_time=We()(un[0]).add(7,"days"):Di[hn].end_time=un[1],$r([...Di])},onCalendarChange:(Ft,un,Ti)=>{if(un!=null&&un[0]&&!un[1]){const Ri=We()(un[0]).add(7,"days");Di[hn].publish_time=un[0],Di[hn].end_time=Ri,$r([...Di])}}})),!Fi&&qe.createElement("div",{style:{display:"flex",width:"50px"}},((zt=pn==null?void 0:pn.group_id)==null?void 0:zt.length)>1&&qe.createElement(mt.Z,{title:"\u89C4\u5219\u62C6\u5206"},qe.createElement("i",{className:"iconfont icon-chaifen ml10",style:{cursor:"pointer",color:"#3061d0"},onClick:()=>Ee(pn,hn)})),Di.length<((Kt=jn==null?void 0:jn.group_settings)==null?void 0:Kt.length)&&qe.createElement("i",{className:"iconfont icon-zengjia1 ml10 mr10",style:{cursor:"pointer",color:"#00B187"},onClick:()=>{var Ft;if((0,Te.Rm)()&&!((Ft=At.AssistantObject.practice)!=null&&Ft.can_publish)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}$r(Di.concat({}))}}),((pn==null?void 0:pn.publish_time)&&We()(){const Ft=(0,te.cloneDeep)(Yi);Ft.forEach((un,Ti)=>{un.group_name&&(un.group_name=un.group_name.filter(Ri=>{var hi;return!((hi=Di[hn].group_name)!=null&&hi.includes(Ri))}))}),Di=Di.filter((un,Ti)=>hn!==Ti),hr(Ft),$r(Di.slice()),setTimeout(()=>$r(Di.slice()),10)}}))))}))),qe.createElement(Je.Z,null,qe.createElement(pt.Z,null,qe.createElement("div",{className:ge.Z.title,style:{marginTop:"30px"}},"\u8865\u4EA4\u8BBE\u7F6E",qe.createElement("span",{className:"c-grey-666 font14",style:{fontWeight:400}},"\uFF08\u53EF\u5BF9\u5728\u4F5C\u4E1A\u53D1\u5E03\u65F6\u95F4\u8303\u56F4\u5185\u672A\u5B8C\u6210\u4F5C\u4E1A\u7684\u5B66\u751F\uFF0C\u5EF6\u957F\u65F6\u95F4\u8FDB\u884C\u8865\u4EA4\uFF09"))),qe.createElement(pt.Z,{span:24,style:{background:"#F6F7F9",padding:"13px 30px",display:"flex",alignItems:"center"}},qe.createElement(yt.default,{checked:dr.allow_late,disabled:Fi||la,onChange:pn=>{var hn;if((0,Te.Rm)()&&!((hn=At.AssistantObject.practice)!=null&&hn.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}pn.target.checked&&Nt.default.warning({title:"\u5F00\u542F\u8865\u4EA4\u63D0\u793A",centered:!0,width:480,content:qe.createElement("div",{style:{padding:10,background:"#f5f6f9"}},qe.createElement("div",null,"1.\u5F00\u542F\u8865\u4EA4\u540E\u4E0D\u53EF\u5173\u95ED\uFF0C\u8865\u4EA4\u65B9\u5F0F\u63D0\u4EA4\u4FDD\u5B58\u540E\u4E0D\u53EF\u4FEE\u6539\uFF1B"),qe.createElement("div",null,"2.\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u5FC5\u987B\u665A\u4E8E\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\uFF1B"),qe.createElement("div",null,"3.\u73ED\u7EA7\u9636\u6BB5\u8FDB\u5165\u201C\u8865\u4EA4\u4E2D\u201D\u5219\u4E0D\u53EF\u53D8\u66F4\u4F5C\u4E1A\u622A\u6B62\u65F6\u95F4\u3002"))}),dr.allow_late=!dr.allow_late,Yi==""&&hr([{late_penalty:5}]),kn(Object.assign({},dr))}},qe.createElement("strong",null,"\u5F00\u542F\u8865\u4EA4")))),(dr==null?void 0:dr.allow_late)&&qe.createElement("div",{style:{background:"#F6F7F9",padding:"10px 30px",marginTop:"1px",color:"#666666"}},qe.createElement("div",{style:{display:"flex"}},qe.createElement("div",{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u65B9\u5F0F"),qe.createElement(Re.ZP.Group,{style:{marginLeft:"20px"},disabled:Fi||(jn==null?void 0:jn.anonymous_comment)||(jn==null?void 0:jn.allow_late),value:dr.unified_late,onChange:pn=>{var hn;if((0,Te.Rm)()&&!((hn=At.AssistantObject.practice)!=null&&hn.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}dr.unified_late=pn.target.value,Yi==""&&!pn.target.value&&hr([{penalty_type:xe.Q.Percent,late_penalty:20}]),kn(qn({},dr))}},(dr==null?void 0:dr.unified_setting)&&qe.createElement(Re.ZP,{value:!0,disabled:!(jn!=null&&jn.manage_all_group),style:{marginRight:"50px"}},"\u7EDF\u4E00\u8865\u4EA4"),((ut=jn==null?void 0:jn.group_settings)==null?void 0:ut.length)>0&&qe.createElement(Re.ZP,{value:!1},"\u5206\u73ED\u8865\u4EA4"))),dr!=null&&dr.unified_late?qe.createElement(qe.Fragment,null,qe.createElement(Je.Z,{align:"middle",style:{marginTop:"10px"}},qe.createElement(pt.Z,{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u6263\u5206"),qe.createElement(pt.Z,{className:"ml20"},qe.createElement(xe.Z,{disabled:Fi||No,value:{type:dr.penalty_type,inputValue:dr.late_penalty},onChange:pn=>{var hn;if((0,Te.Rm)()&&!((hn=At.AssistantObject.practice)!=null&&hn.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}kn(sn(qn({},dr),{late_penalty:pn.inputValue,penalty_type:pn.type}))}})),qe.createElement(pt.Z,{flex:"1",className:"ml5"},qe.createElement("span",{className:"c-grey-c ml10"},dr.penalty_type===xe.Q.Number?"(\u8865\u4EA4\u65F6\u6309\u7167\u5B66\u751F\u603B\u6210\u7EE9\u6263\u5206)":"(\u5B66\u751F\u6700\u7EC8\u5F97\u5206=\u8865\u4EA4\u524D\u5F97\u5206+\u8865\u4EA4\u9636\u6BB5\u589E\u52A0\u7684\u5206\u503C*\uFF08100%-\u767E\u5206\u6BD4%\uFF09)"))),qe.createElement(Je.Z,{align:"middle",style:{marginTop:"15px"}},qe.createElement(pt.Z,{style:{width:"110px",textAlign:"right"}},"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4"),qe.createElement(pt.Z,{className:"ml20"},qe.createElement(ot.default,{size:"large",allowClear:!1,style:{width:170},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",showTime:{format:"HH:mm",defaultValue:We()((0,se.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:Fi||No,value:dr.late_time?We()(dr.late_time):"",disabledDate:pn=>Ge(pn,jn==null?void 0:jn.course_end_date),onChange:(pn,hn)=>{var ii;if((0,Te.Rm)()&&!((ii=At.AssistantObject.practice)!=null&&ii.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}dr.late_time=hn,kn(Object.assign({},dr))}})))):Yi.map(function(pn,hn){var ii;return qe.createElement(pt.Z,{span:24,key:hn},qe.createElement(Je.Z,{style:{display:"flex",alignItems:"center",marginTop:"10px"}},qe.createElement("div",{style:{width:"85px",marginLeft:"27px",textAlign:"right"}},"\u8865\u4EA4\u89C4\u5219",hn+1),qe.createElement(wt.default,{disabled:Fi||!((ii=si==null?void 0:si.homework_status)!=null&&ii.includes("\u672A\u53D1\u5E03"))&&pn.id||(jn==null?void 0:jn.anonymous_comment),mode:"multiple",className:ge.Z.multiple_select,style:{width:"212px",marginLeft:"18px"},value:typeof pn.group_name=="string"?[pn.group_name]:pn.group_name,placeholder:"\u8BF7\u9009\u62E9\u5206\u73ED\u540D\u79F0",onChange:Yn=>{var In;if((0,Te.Rm)()&&!((In=At.AssistantObject.practice)!=null&&In.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Yi[hn].group_name=Yn,Yi[hn].group_id=pn.group_id,hr(Yi.slice())}},jn.group_settings&&jn.group_settings.map(function(Yn){const In=Yi.map(ni=>ni.group_name).flat(),en=Di.map(ni=>ni.group_name).flat();if(dr!=null&&dr.unified_setting){if(!In.includes(Yn.group_name))return qe.createElement(Zt,{value:Yn.group_name,key:Yn.id},Yn.group_name)}else if(en.includes(Yn.group_name)&&!In.includes(Yn.group_name))return qe.createElement(Zt,{value:Yn.group_name,key:Yn.id},Yn.group_name)})),qe.createElement("div",{className:"ml20 mr10"},"\u8865\u4EA4\u6263\u5206"),qe.createElement(xe.Z,{disabled:Fi||ti(pn.id),value:{type:pn.penalty_type,inputValue:pn.late_penalty},onChange:Yn=>{var In;if((0,Te.Rm)()&&!((In=At.AssistantObject.practice)!=null&&In.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Yi[hn].late_penalty=Yn.inputValue,Yi[hn].penalty_type=Yn.type,hr([...Yi])}}),qe.createElement("div",{className:"ml20 mr10"},"\u8865\u4EA4\u622A\u6B62\u65F6\u95F4"),qe.createElement(ot.default,{size:"large",disabled:Fi||ti(pn.id),style:{width:225},showTime:{format:"HH:mm",defaultValue:We()((0,se.U6)(),"HH:mm")},placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65F6\u95F4",disabledDate:Yn=>Ge(Yn,jn==null?void 0:jn.course_end_date),format:"YYYY-MM-DD HH:mm",value:pn!=null&&pn.late_time?We()(pn.late_time):void 0,onChange:(Yn,In)=>{var en;if((0,Te.Rm)()&&!((en=At.AssistantObject.practice)!=null&&en.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Yi[hn].late_time=In,hr([...Yi])}}),!Fi&&qe.createElement("div",{style:{display:"flex",width:"50px"}},qe.createElement("i",{className:"iconfont icon-zengjia1 ml10 mr10",style:{cursor:"pointer",color:"#00B187"},onClick:()=>{var Yn;if((0,Te.Rm)()&&!((Yn=At.AssistantObject.practice)!=null&&Yn.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}hr(Yi.concat({penalty_type:xe.Q.Percent,late_penalty:20}))}}),hn>0&&!pn.id&&qe.createElement("i",{className:"iconfont icon-shanjian1",style:{cursor:"pointer",color:"#E30000"},onClick:()=>{var Yn;if((0,Te.Rm)()&&!((Yn=At.AssistantObject.practice)!=null&&Yn.can_late)){Qt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Yi=Yi.filter((In,en)=>hn!==en),hr(Yi.slice()),setTimeout(()=>hr(Yi.slice()),10)}}))))})),!Fi&&qe.createElement(qe.Fragment,null,qe.createElement(Vt.ZP,{type:"primary",size:"large",loading:Ir,style:{width:"138px",marginTop:"30px"},onClick:()=>sa()},"\u4FDD\u5B58")),qe.createElement(Ke.Z,{onConfirm:(pn,hn)=>{Di.splice(pn,0,...hn),Di.splice(pn+hn.length,1);const ii=(0,se.QE)([...Di]);$r([...ii])}}),qe.createElement(nt.Z,{resdata:Ii,type:"shixun",okloading:Ir,oktext:(Ii==null?void 0:Ii.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:pn=>Nn(void 0,null,function*(){Qi(!0);let hn=yield(0,ne.ZP)(`/api/courses/${Vn.coursesId}/batch_copy_shixuns.json`,{method:"post",body:{type:"homework_common",ids:[parseInt(Vn.categoryId)]}});Qi(!1),(hn==null?void 0:hn.status)===0&&Wa(Un)})}))};ei.ZP=(0,me.connect)(({shixunHomeworks:On,classroomList:Mi,loading:Xt,user:At})=>({shixunHomeworks:On,classroomList:Mi,loading:Xt.effects,user:At}))(ci)},12317:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return yt}});var ve=be(67294),ot=be(28802),wt=be(84567),Qt=be(71230),Nt={leftdiv:"leftdiv___aBzsX",listClass:"listClass___bxIEW",spantitle:"spantitle___v_Vc4",rightdiv:"rightdiv___xWu4M"},Re="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC",Je=be(26194),pt=(Vt,ct,We)=>new Promise((Te,ne)=>{var te=ge=>{try{se(We.next(ge))}catch(me){ne(me)}},ue=ge=>{try{se(We.throw(ge))}catch(me){ne(me)}},se=ge=>ge.done?Te(ge.value):Promise.resolve(ge.value).then(te,ue);se((We=We.apply(Vt,ct)).next())}),yt=({data:Vt,value:ct=[],handleChangePage:We,className:Te="",setSelectedRowKeys:ne,selectedRowKeys:te,onChange:ue=()=>{}})=>{const[se,ge]=(0,ve.useState)([]),[me,xe]=(0,ve.useState)([]),[Pe,Ke]=(0,ve.useState)([]);let[nt,ft]=(0,ve.useState)(1),[qe,at]=(0,ve.useState)();return(0,ve.useEffect)(()=>{ge(Vt),xe([]),Ke([])},[Vt]),(0,ve.useEffect)(()=>{ne&&(xe(te),Ke(te))},[te]),ve.createElement("div",{className:`flex justify-between w-full ${Te}`},ve.createElement("div",{className:Nt.leftdiv},ve.createElement(ot.default.Search,{size:"middle",style:{marginBottom:"10rem"},onChange:jt=>pt(void 0,null,function*(){ge(Vt.filter(Mt=>{var bt;return(bt=Mt==null?void 0:Mt.name)==null?void 0:bt.includes(jt.target.value)}))}),placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),se.length===0&&ve.createElement(Je.Z,{styles:{margin:"70rem auto"},customText:"\u6682\u65E0\u5206\u73ED"}),ve.createElement("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"}},ve.createElement(wt.default.Group,{value:me.map(jt=>`${jt.id}`),onChange:jt=>{ne(se.filter(Mt=>jt.includes(`${Mt.id}`)))},style:{marginTop:"10px",flexDirection:"column"}},se.map((jt,Mt)=>ve.createElement(Qt.Z,{key:jt.id,style:{marginTop:"10rem",lineHeight:"24rem",display:"flex",width:"200rem"}},ve.createElement(wt.default,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:jt.is_published,value:`${jt.id}`},ve.createElement("div",{className:Nt.listClass},ve.createElement("span",{className:Nt.spantitle,style:{width:jt.is_published?"108px":"170px"}},jt.name),jt.is_published&&ve.createElement("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"}},"\u5DF2\u53D1\u5E03")))))))),ve.createElement("div",{className:Nt.rightdiv},ve.createElement(ot.default.Search,{onChange:jt=>{Ke(me.filter(Mt=>Mt.name.includes(jt.target.value)))},size:"middle",placeholder:"\u53EF\u8F93\u5165\u73ED\u7EA7\u540D\u79F0\u67E5\u8BE2"}),Pe.length===0&&ve.createElement(Je.Z,{imgStyles:{width:"200rem"},styles:{margin:"70rem auto"},customText:"\u6682\u672A\u9009\u62E9\u5206\u73ED"}),Pe.length>0&&ve.createElement("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"}},ve.createElement("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0}},Pe.map((jt,Mt)=>ve.createElement("div",{className:"flex justify-between item-center",style:{marginTop:"10rem"},key:jt.id},ve.createElement("div",{className:"multi_ellipsis1 flex-1 minW-0",style:{margin:"0 5rem"}},jt.name),ve.createElement("img",{src:Re,className:"current",style:{height:"16rem",marginRight:"17rem"},onClick:()=>{ne(me.filter(bt=>`${bt.id}`!=`${jt.id}`))}})))))))}},92882:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return ue}});var ve=be(67294),ot=be(35973),wt=be(18046),Qt=be(62844),Nt=be(28802),Re=be(2453),Je=be(71230),pt=be(15746),mt={title_tooltip:"title_tooltip___LLdrn",multiple_select:"multiple_select___kDXUm",modal_con:"modal_con___ERnkW"},yt=be(94699),Vt=be.n(yt),ct=be(28706),We=be(26194),Te=be(67294);const{RangePicker:ne}=wt.default,te=({dispatch:se,classroomList:ge,onConfirm:me})=>{const[xe,Pe]=(0,ve.useState)([]),[Ke,nt]=(0,ve.useState)([]),[ft,qe]=(0,ve.useState)(""),[at,jt]=(0,ve.useState)([!1,!1]);(0,ve.useEffect)(()=>{var Bt,Ht,Jn,qn;if(ge.actionTabs.key==="\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206"){console.log((Bt=ge.actionTabs)==null?void 0:Bt.rangePickerDisabled),(Ht=ge.actionTabs)!=null&&Ht.rangePickerDisabled?jt((Jn=ge.actionTabs)==null?void 0:Jn.rangePickerDisabled):jt([!1,!1]);let sn=ge.actionTabs.data,Nn=(qn=sn==null?void 0:sn.group_name)==null?void 0:qn.map((lt,Ge)=>{var Ne;return{group_id:sn==null?void 0:sn.group_id[Ge],group_name:sn==null?void 0:sn.group_name[Ge],is_admin:sn==null?void 0:sn.is_admin,end_time:sn==null?void 0:sn.end_time,publish_time:Array.isArray(sn==null?void 0:sn.publish_time)?(Ne=sn==null?void 0:sn.publish_time)==null?void 0:Ne[0]:sn==null?void 0:sn.publish_time}});Nn&&(Pe([...Nn]),nt([...Nn]))}},[ge.actionTabs]);const Mt=()=>{se({type:"classroomList/setActionTabs",payload:{}}),qe("")},bt=Bt=>{if(Bt){const Ht=Ke==null?void 0:Ke.filter(Jn=>{var qn,sn;return(sn=(qn=Jn==null?void 0:Jn.group_name)==null?void 0:qn.toLowerCase())==null?void 0:sn.includes(Bt==null?void 0:Bt.toLowerCase())});Pe(Ht)}else Pe(Ke)};return Te.createElement(Qt.default,{width:980,title:Te.createElement("div",{style:{fontWeight:"bold",display:"flex"}},Te.createElement("div",null,"\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",Te.createElement("span",{className:mt.title_tooltip},"\uFF08\u5F53\u5206\u73ED\u53D1\u5E03\u65F6\u95F4\u548C\u622A\u6B62\u65F6\u95F4\u4E0D\u76F8\u540C\u65F6\u5019\uFF0C\u73ED\u7EA7\u81EA\u52A8\u62C6\u5206\u51FA\u53BB\u65B0\u8D77\u89C4\u5219\uFF09")),Te.createElement(Nt.default.Search,{allowClear:!0,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",style:{width:220,marginLeft:"60px"},value:ft,onChange:Bt=>{qe(Bt.target.value.trim()),bt(Bt.target.value.trim())}})),centered:!0,maskClosable:!1,open:ge.actionTabs.key==="\u5206\u73ED\u53D1\u5E03-\u53D1\u5E03\u89C4\u5219\u62C6\u5206",onCancel:()=>Mt(),onOk:()=>{var Bt;if(Ke.some(Jn=>!Jn.end_time||!Jn.publish_time)){Re.ZP.warning("\u8BF7\u5C06\u5217\u8868\u6570\u636E\u4E2D\u7684\u53D1\u5E03\u65F6\u95F4\u548C\u622A\u6B62\u65F6\u95F4\u8865\u5145\u5B8C\u6574\uFF01");return}me((Bt=ge.actionTabs)==null?void 0:Bt.index,Ke),Mt()}},Te.createElement("div",{className:mt.modal_con},Te.createElement(Je.Z,{style:{display:"flex",color:"#666666",padding:"5px",marginTop:"1px"}},(xe==null?void 0:xe.length)>0?xe.map(function(Bt,Ht){return Te.createElement(pt.Z,{span:24,key:Ht},Te.createElement(Je.Z,{gutter:[8,16],style:{display:"flex",alignItems:"center",marginBottom:Ht==(xe==null?void 0:xe.length)-1?"0px":"10px"}},Te.createElement("div",{className:mt.multiple_select,title:Bt==null?void 0:Bt.group_name},Bt==null?void 0:Bt.group_name),Te.createElement("div",{className:"ml20"},Te.createElement(ne,{size:"large",allowClear:!1,disabled:at,style:{width:600},placeholder:["\u53D1\u5E03\u65F6\u95F4\uFF08\u5B66\u751F\u6536\u5230\u4F5C\u4E1A\u65F6\u95F4\uFF09","\u622A\u6B62\u65F6\u95F4\uFF08\u5B66\u751F\u201C\u6309\u65F6\u201D\u63D0\u4EA4\u4F5C\u54C1\u65F6\u95F4\u622A\u70B9\uFF09"],disabledDate:Jn=>{var qn;return(0,ct.Q8)(Jn,(qn=ge.actionTabs)==null?void 0:qn.disabledDate)},disabledTime:Jn=>(0,ct.d0)(Jn),showTime:{showNow:!0,format:"HH:mm",defaultValue:[Vt()((0,ct.U6)(),"HH:mm"),Vt()((0,ct.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:(Bt==null?void 0:Bt.publish_time)&&[Vt()(Bt==null?void 0:Bt.publish_time),Bt!=null&&Bt.end_time?Vt()(Bt==null?void 0:Bt.end_time):void 0],onChange:(Jn,qn)=>{xe[Ht].publish_time=qn[0],xe[Ht].end_time=qn[1],Pe([...xe]),Ke.forEach(sn=>{sn.group_id===(Bt==null?void 0:Bt.group_id)&&(sn.publish_time=qn[0],sn.end_time=qn[1])}),nt([...Ke])},onCalendarChange:(Jn,qn,sn)=>{if(qn!=null&&qn[0]&&!qn[1]){const Nn=Vt()(qn[0]).add(7,"days");xe[Ht].publish_time=qn[0],xe[Ht].end_time=Nn,Pe([...xe]),Ke.forEach(lt=>{lt.group_id===(Bt==null?void 0:Bt.group_id)&&(lt.publish_time=qn[0],lt.end_time=Nn)}),nt([...Ke])}}})),at[0]?Te.createElement("i",{className:"iconfont icon-shanjian1 ml15",style:{color:"#E30000",opacity:"0.2",cursor:"not-allowed"}}):Te.createElement("i",{className:"iconfont icon-shanjian1 ml15",style:{cursor:"pointer",color:"#E30000"},onClick:()=>{xe.splice(Ht,1),Pe([...xe]),Ke.forEach((Jn,qn)=>{Jn.group_id===(Bt==null?void 0:Bt.group_id)&&Ke.splice(qn,1)}),nt([...Ke])}})))}):Te.createElement(We.Z,null))))};var ue=(0,ot.connect)(({classroomList:se})=>({classroomList:se}))(te)},51161:function(Dn,ei,be){"use strict";be.d(ei,{AL:function(){return xe},Iy:function(){return Vt},Qv:function(){return Te},ez:function(){return me},jb:function(){return ct}});var ve=be(47084),ot=be.n(ve),wt=be(90621),Qt=be.n(wt);let Nt=1;function Re(qe,at){const jt=qe.match(/^(\s+)(?:```)/);if(jt===null)return at;const Mt=jt[1];return at.split(` `).map(bt=>{const Bt=bt.match(/^\s+/);if(Bt===null)return bt;const[Ht]=Bt;return Ht.length>=Mt.length?bt.slice(Mt.length):bt}).join(` `)}let Je=[],pt=["
    "];const mt=new(ot()).Renderer,yt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Vt(){Je.length=0,pt=["
      "]}const ct={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function We(qe,at,jt,Mt){if(at>=qe.length||qe[at].level<=jt)return at;var bt=qe[at];Mt.push("
    • "+bt.text+""),at++;var Bt=[];return at=We(qe,at,bt.level,Bt),Bt.length>0&&(Mt.push("
        "),Bt.forEach(function(Ht){Mt.push(Ht)}),Mt.push("
      ")),Mt.push("
    • "),at=We(qe,at,jt,Mt),at}function Te(){return We(Je,0,0,pt),pt.push("
    "),pt.join("")}const ne={heading(qe){const at=yt.exec(qe);if(Nt+=1,at)return{type:"heading",raw:at[0],depth:at[1].length,text:at[2]}},fences(qe){const at=this.rules.block.fences.exec(qe);if(at){const jt=at[0];let Mt=Re(jt,at[3]||"");const bt=at[2]?at[2].trim():at[2];if(["latex","katex","math"].indexOf(bt)>=0){const Bt=se(),Ht=Mt;Mt=Bt,ge[Bt]={type:"block",expression:Ht}}return{type:"code",raw:jt,lang:bt,text:Mt}}}},te=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ue=0;const se=()=>`__special_katext_id_${ue++}__`;let ge={};function me(){return ge}function xe(){ue=0,ge={}}function Pe(qe){return qe=qe.replace(te,(at,jt)=>{const Mt=se();return ge[Mt]={type:"inline",expression:jt},Mt}),qe}const Ke=mt.listitem;mt.listitem=function(qe){return Ke(Pe(qe))};const nt=mt.paragraph;mt.paragraph=function(qe){return nt(Pe(qe))};const ft=mt.tablecell;mt.tablecell=function(qe,at){return ft(Pe(qe),at)},mt.code=function(qe,at,jt){const Mt=(at||"").match(/\S*/)[0];return Mt?["latex","katex","math"].indexOf(Mt)>=0?`

    ${qe}

    `:`
    ${jt?qe:(0,wt.escape)(qe,!0)}
    `:'
    '+(jt?qe:(0,wt.escape)(qe,!0))+"
    "},mt.heading=function(qe,at,jt){let Mt=this.options.headerPrefix+jt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Je.push({anchor:Mt,level:at,text:qe}),"'+qe+""},ot().setOptions({silent:!0,gfm:!0,pedantic:!1}),ot().use({tokenizer:ne,renderer:mt}),ei.ZP=ot()},78207:function(Dn,ei,be){"use strict";be.d(ei,{rX:function(){return Pe},pW:function(){return Ke},gy:function(){return nt},xY:function(){return xe},O5:function(){return me},hs:function(){return te},tJ:function(){return Te},o1:function(){return ne},Rd:function(){return ge}});var ve=be(35973),ot=be(62844),wt=be(96074),Qt=be(2453),Nt=be(52262),Re=be(28706),Je=be(55304),pt=be(25510),mt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAABcRAAAXEQHKJvM/AAAouElEQVR42u3de5gU1Z038HOqqu89PQPMhQHkNqCiCCK5qMRojIkXRNFERDTGNRvik5hNjPtgzEuyJLq6sq/EbEyy+u5jjBEhSEREvKyXQJRVs1FEMARhhhlgLsDAMD3T96o67x8zzPQMPTPVU12XX8/38/D4PDZdVedUd3+py6nf4UIIBgBAgeR0AwAAjEJgAQAZCCwAIAOBBQBkILAAgAwEFgCQgcACADIQWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMxfhbOedOt7a/nKUmcrbT2aIUxned8Xaa/DhMbsi2dppk8nO3ovG27XnbemTbDmE4wgIAQhBYAEAGAgsAyEBgAQAZCCwAIAOBBQBk5DGsIaedO3dWVFRY3cpVq1atXLnS4JuNj3WwgvF7tCbHZFhxe9u2dZp8Z04uHGlhxbAbKz44F/6KB2I2sCoqKqqqqqzuajgctnoTACMWoV8xTgkBgAwEFgCQgcACADIQWABABgILAMgwe5cwJ5O3jVtaWgp+z8KKW+bOPvjuwq1bMaTD+OLG2+ks2/aSSS78FTMcYQEAIQgsACADgQUAZCCwAIAMBBYAkIHAAgAyLBnW4CxnS/fb9k4r7nk7W8LBClZUQbBiYIEVI2ycnXjFIjjCAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQU4bAGK25Fu/Besm03wm27i2/bEATbNmTbN6QoRzDkhCMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5F7Xpnpy2w7Ta8bawo4eDC6RVIf0YmufBXzCwKLIvaCgC2ceevGKeEAEAGAgsAyEBgAQAZCCwAIMPsRfdVq1aFw2GrW7llyxZ7dgfACEToV8ydvd9vkhV1CPBOvHOkvdNZeY0IwSkhAJCBwAIAMhBYAEAGAgsAyEBgAQAZCCwAICOPcVhUnke3rcg/lYktbLuT7eyet+0zIo16j3CEBQBkILAAgAwEFgCQgcACADIQWABABgILAMjIo1pDHit19K6zFXfxXTiwgMqz+FZ004Wc/YidHSJjsuILqjUAQHFCYAEAGQgsACADgQUAZCCwAIAMBBYAkGF21hxnKxZQqdJvW5Nsm1LEinbmXNy2vlNZ3DhnfwgWjbDBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgw+ywBpOsuMlKZZ3GN2RycdsKcriQC3cIlclH3FkOBEdYAEAGAgsAyEBgAQAZCCwAIAOBBQBkILAAgAz7JqHIiUqZfeONN8nZ4gS29d2KggcmWbF1Z4tnGN8QlZk+GI6wAIAQBBYAkIHAAgAyEFgAQAYCCwDIQGABABl5VGuw7Z63FSMYSN/NpTK1hEkuHC5AZdzMyPl14AgLAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkGG2WoMLa++bbKdxzvbIZN+pVL9wdqyDs01y4eKO/95xhAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIyKNaQ0623bA3eUPUhdMBmOym8XdaMdOH8b67cLYLZ1kxdsS2ARDOThTCcIQFAIQgsACADAQWAJCBwAIAMhBYAEAGAgsAyDBbrSGPLbmvEgDpDRnfum3VGqzYEJXSCC5skjtnkTAJR1gAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyqNdh2x93kOq1ovLM9smIQgG1lDEw2ydlhNzk5+7lb0U1n5+/AJBQAUJwQWABABgILAMhAYAEAGQgsACADgQUAZJidhMI2VlTpt22sQ045t27baAPjO8TZ2S5sG/hiRa0IZ4tSWNFO4zAJBQCMdAgsACADgQUAZCCwAIAMBBYAkIHAAgAyzA5rcPYpc2ebZFvjTXJ2h9h2v9/Zxhtf3OSGrJjpw2Q7c7LogyMzDguMsOKbN5LbCW6DU0IYcdasWTNhwgSnWwHDkce8hM7OOmcclUHtJtcJJi1ZsmTNmjU9/+vCT9PxankONn4gOMKCEeqZZ55ZtmyZ062A/OAIq8AbyglHWK510003rV27lrny08QRVo7VIrAKu6GcEFhuNnHixIMHD7rw00Rg5Vitsx2wIu+c/c2T/pIZbXkyqbceUxsOqrV16r46rf6A1tist7Xp7e2iIyYyaZFRGWPco3CPl5eEpNJSadQoeXy1PHmiMm2qUjNVmXSaVD6G+/1Od4Uxxp599tlFixbl7qkF/5wbX9x4k6xIB3d+FRFYdnQzJyo96m5DJqO3HM7s2p1+f3vmo13q3lrtaKuIdghVZcabxzlXFB4pkSvKlek1nlkzvXPneGbOkMZWcY/Hwd5VVlYePXo0R68RWMNd3CIILDu6mROJHolMRqs/kNr2burNrentO7SDjSKVKuD6uc8nnzbeO2e279KLffPOlydPdCS5+t0x7O0+Amu4i1sEgWVHN3NyeY/01mOpbe8mNm5ObXtHa2xmmmbt9mRZHl/tm3dB4Nr5vnnnS+Vj7OzsunXrbrzxxlNfR2ANe3GLILDs6GZOLu2REGp9Q/KFl+Lrn8/s2i2SSfs23bUH/H7PzBnBry70XzNfmTyR2fJoTlNT0/jx43PtDATWMBe3CALLjm7m5LoeCaHW1cfXPBv/w3Nq3X6m63ZsdCCSpNRMCS66PnjTDcrUyTbElhWJg8AqOASWHd3MyVU90ppb4qvXxZ56Rt1Xl8dFdKtxrkybGrp1SfDmRXL1WIs3hcAqZI8sYsk4LLNtct84F+Mc/0TzbnA8kXjx5c5fPpbevsPyC1XDI8veObPD3/1W4OoreTBg0UZcOGrJihGFtpVbsGjXIbAKjFZgZT7e3bHq0cTzm0Q84XRbhsCDgcDCBSU/uNNz9gxL1o/AcmhDeUFgFRiVwBLJZGL9xuhDP1f31Trdljwo02oi99wV+Oq1BR90isByakN5QWAVGInA0pqaOx56JLZ6rYjFnW5L3ngoGLp5cck935fHVRdytQgshzaUFwRWgbk/sNLvf9i+/GeprW+76OJ6vjj3Xfy50vt/4p17buFWicByZkN5QXmZkUQXyc2vHL/tjtSWtwinFWNMiNSWt47fdkdy8ytMp9wRyBMCa8RQ1dhTq9u+czeti1aDdWhfbdt37o49tZqpqtNtAZvYV17GOCqFPqwYSGXRiYlIZ2KPPxG9f6XeHjW5KreRSiOR5ctCS2/nXlMPIbpwAJ0Lf0dWbD0vmISi+Il0pvNXj0UfeFh0djrdlsLT26PtP/03kcmEv/Mtk5kF7odTwmKnqrHHnyjWtOoiOjujDzwce/wJnBsWPQRWURMi9vTa6P0rizitujva2Rm9f2Xs6bW0bybAUBBYxSy5+dXoigeL77pVTnp7NLriweTmV51uCFgIgVW00u9vP/GjFdrhI043xD7a4SMnfrQi/f52pxsCVkFgFSetqbl9+X3q3iIZwWCcure2ffl9WlOz0w0BS5gtL0Nlghxnh0rYPGhYpFLt9/yk87EnzGyUtPC3bi996Gfc5zO+CJXyMjk5+8CJSZhIdaRLPLsh9vRap1vhpNjTaxPPbnC6FVB4CKxik9m1O7ryEYpPNReQiMWjKx/JfLzb6YZAgSGwioqIJzoeeXQEXro6lbq3tuPnj7q/zhfkBYFVVBKbXkps2OR0K9wisWFTYtNLTrcCCgmBVTy05pbOXz2OY4oeIp7o/NXjWnOL0w2BgkFgFY/46nXp9z90uhXukn7/w/jqdU63AgrGbLUG45ytbeBsqQnzd4iH3CdqbV3rdUtw9epUyvSa8g3PKDVTB3+bC2d1craIgjtLOOAIq0jE16xHWuWk7q2Nr1nvdCugMBBYxUCtq4+ve86SVQvBdL3Pn7z0WzbfP13/IJtpAGOMsfi659S6ekv2D9gL9bCKQXLTS+q+usKvVzBp9Gipopyxk0fyqqodbBSZjKHFZVmedBr3+XsXz4uua43NTFXl08Yz5eQXNZPRDjUZbcBJ6r665KaXwt/7duF3EdgLgUWe3nosvn6j0bIqksR0vXvCVM67/wy4ai2wcH5k+bLu4xpJ0hqbjn9tqbq/nklDHZsLIZWWjvrFv3tmnT2c+Vk5F52x40u/q+5vGPX/fqlMnsR0nUmy+vc9x267Qxw5mt/k9ULE128M3nyjVD6mwHsf7IXAIi+17d3Mro+NvJN7veE7vyVVVqh792kNB9WDh/Rjx0VHh0ilezOF8z5hJMty9djedNB1pshGWyZLUlXFsKeYF50x7vMxIeSKip4ZvdRP9opEcoh0zpVlmV0fp7a9G7h2fmF2OjgEgUVcRk1s3CySqaHfKQTz+fxXXub73IVMFyKR0KMd+uEjWlOzWrtf3V+v7m/Qmpr11mPakaO9pTu7LiT1REC+53ambgoJJgQPBJjX2/OS1tTCFZmXlrIBDrBEOiOSyRyvJ1OJjZsDV13OPPjOE2b2wzN+N9f4XVKT91OtmA7AhVN1dFHrG1Lb3jHaNq9HKokwxpjEeSgoh4JydZXn3HO6m5hIing88/dPjn/j21r9gazjLBPtNPdJMsakkrAU6J3k2ff5C8f84XcDLiFJsaeeiT+1JudBVmrbO2p9gzK9Jo8WOPqltYJtG7II/rWhLbXtXe1Qk6G3CsH9fl4Szv23nPNggAcDUqSEJVMDXiHiLI8Q0nX9SKvW3DLErT0heDgklZX1vhCL6+3tojMmkkmpojy7zfKE8fKE8YNsMfa71UzXmZzjvFU71JTa9m5egQVug8AiTGQyqTe3Gr/TL0VKeCAw+Hu0xmY9Gu0bWKInpISqCdXYHTrO9RPtbf/0z0MXpdL14A3XRZYv6zmmS7zyWvS+h5imaQcOhW67mfv9Q26te00n2tVP9g2yodSbW0M3L2IeTK5DFQKLML35cHr7jjzeH4+n3tyqnHWmXFXRHV6nHImo++tFKt3zv9zr7XMNXlVZMmX0IEvTtLp6MUSecsaE1nI4+zq6ONGu/v0TputMUTyzzzF+Q1A/clRrbB7k/entO7Tmw/LECeZ2PDgGgUVY5uPd2qFGo++WJO3AobZv38VLI3L5GKmqUh43VpkyWamZKk86TR5fLY0qk8JhdX89U9WeIOM+b/Y6RDotdN3oSaEQ8qSJ/su/yBUl9309SdIONSZe+m/GeZ8Q5IzJMhNCKh/jmTPr1NX2+d+seFIPHtJPnBgksLRDjZmPdyOw6EJgEZb+4END9wd7CCHSaXHkqN5yhO36G2OMSRLzeKRwSBpVJo+rlieMT3/4Ud8xVn1+/CKeyGPuP133nHl62cr7BjwP5Tz15p+Tb2wdqLWeGWcoU6f0vKDure38zX+JRKI7knThn//lwIKret+we4+IxQcJLJFMpT/40H/llwr9UYBNEFhUiWQys2Nn/osJxhiT+5zl6W0n9ONt6r46JgST5d4fPOc8FOyzdCwm8p2sdPCxqQP9jRBMUQJXXymVRnpeS7ywufPRx5jouqYmmCR5P31eVke0zK7dTNNyXnHvkdmxUySTxq+LgavkEVi2VUGwYl4M295pxfiJnFvXW4/l/bSzokiREhGLi1Sqz0jRfoNFszfc9+BI7+hkeT4WM0y6rpx5uv/qK3pfaDuRfOX1rl507Slp9CjPWWf2viEazezeM+SK1b21euuxwW41DsW2CU2cnZnCtqIUecERFlVqwwHtaGseC+i6MmVS2cMPiERSO9SoHWpUDxzS6hu0I0f1Y20imWSZDBOMSVnhJUk80mcYhIh2iIya32MxgxtoVUJ4Pz1XmXRazwuZ7TsyH+3qbZsQ8tgqOesNWlOzdvDQkM8MaUdb1YYDZgILHITAokqt3S+iHXksIIQ0epT3U+dJo8q6X0ilRWen3npMa2pWGw6otfvV+gPq7j2Z3Xt6Hh6USkuz16G3nRjOg4Enpf705/T/fsCknlNOSd1XK9JdNyX7/YPMpdKSnvQRGTX+x436ifbswFKmTZVGj+rdIX//RD/eNmSYimiHWrvfN++Cgn8iYAMEFlXqvrr8ihYIIZWEs0dFcZ+X+0ZLY0YrZ0z3nXxPfN1zbd/8btdYBK7I2eM5GWPakaNM14d+8nkAiU0vd/z8l4xLJ69ddT/003/wBOt/bSvz0c7ky6/1eUmWvZ+em30pKv3RLpFKDdk2oWY0KypbgC0QWFRp9QfyXYSXlAwxZpJzrflwdw4Kwf3+7GveTNf1I0eMloXIxTN7ZuAr1/E+mSKYzxf4yrW5joxOjlZNp2NPrtYam7IPr6RIxPuZub1ricUzH+401DbB1Px3HbgEAosqrdHYEzk9OJdGj+LyoAcgQmj1Dd032oTgoSAv6z0lFKqqHztu5nnm0C2LgzfdcErDJN7/gWTOOJfC3ZfPUlu3JZ57oU+i6bo8ZZJy5unZeyOzZ6/Bi2taIyaypwqBRZXediK/BSQp/Zf3o//678q0GnnSBLm6WhpdJoVCvbXxGBPxhLq/oXeJsrLsi0QintBaj5l6nlmWuTx0dRqhaUywrrIKasOBjodW6a3H+p3reT8zVy4f031IxXnmk3264SJZelubiT6Ak/IILGdnfLDz1qkZtg2A0Nvb821ZZseuzI6dzOORgkFpzChp7FhlyiRl8iRl+lR5XLVUVck0TWts6v7ZCyFPGN9zmMMYEx0d+rHjhbxFOFDXWg4zXWNcUusb2u/5SWrbu/2vTMlyZuff2u76IdNPBtbHu0UyaTSwcu06275Lzs5yYtvvyKIN4QiLKtERy3sZiTPGmabp0aje3s5q96fffofJEvMo3B+QIiVSaUStb2C8Ox2UaVN5VmkXrblFb80zsPKq7sAYY0zd35B85XXGeeqtbcmXXhlo4rL0O++ls+vqSJLxWwHD2XXgDggsqkQmPfyF+40+VzXR0aFFo9qhRiZJ3Qnj8XjOOrPPk3r7G0RHNJ/A4npbe+qd97jPa/DKl360Nfbk6vT2HUySUlve6r4jKQQvKQl/8zZ5fLXQdc640NT46nV9hmXZtuvAUQgsqkTGwCMyeR2BnzwT7PqvFClRzpie/feZj3eL5FDjBrLjTJbS23ccW/T1PI6x0hmRSPYO1OralhBSaST09SU97RGpVGrL28N5Msn4rgNXQmAVL865z9f748+LpnvOmenJCiyRTKqf1HK/f/Ca7iKj9j4d3dUAzvOolOz19taHEEwkEl3jVLnPx/xZdbXSGZFIOLRbwUkILKq4RxGDDDoXQopEIivuVaZMEnr+VzqFUCaM7zPHjCSF71wa/NriQU4JucRjT61JrN/IZIkJIZWVlj74U+X0acOZTJBzEU+0/+S+zPsfMsZ4KCiFQj1/qcfjejQ67ALMHGXdycInRxX3eIeoLePz+i660DPzrMJszuv1fW7ox1lS297rPQ/1eLxzZnlmnzO8LYrOmFRa2lXuVCorzb78Lzpjoj067AEW3OMd5pLgNEsCy4q7pC4cwWCFPEaElIRYx6DPEgphbtKaYenb1OEc3GUtffKCGpPHVmXPnSNiMb0zNuwBFrwkNLwFuxe3ax4HF/6OrKg/kVeTMFU9Vf0eS87N/hlS+KD/O9x1yuOqedZDRfrxNpFIDnt9hnYduBJOCamSRo0a8j0ik2GaJvKrr8C595TnDVV1qNLsjDHGJalPLQchWEY10gAuyQNfyxdM8chTJmW/pB05KmIxpmmMc2Zg6Pwwdh24EwKLKnl89WB/zbmIdrT/aIUUKTU0uIGzrnKjodtu8V/+xey/UffVdqz8hX7ixBDHS5wxxjJ/29NdzpRz0dHR/uP7pNIhGiCEHvjSpaF//HrPgInUn7fFf79WpNPqnr1MkngwoNRMyV5ECocDV1/BGNdjsfT/vNdbNLkguw5cDIFFlTJ5Iht0wIBIp1NvbDU+FEvoeuCqL3tmnd3nxXi84//+R+y3vzfarKwR5yKVTr2xZYjDK86ZEHL5mFBWO9VP9sV+t7q7XjNjckW5Mmli9kL+L1/q++IljDMR7Tj29aWp1/6Ux3EWZ8rkiUbfDC6DwKJKnjaVK54hSmIZ/xlrmnfunNIHfypXj81+ObFhU/zZ57sLvZ+afYMf1wghjRmjnD6NDVgigov29szuPUyS+xy+SZx5PN2DIXRdHlctVVb0WU5RuMIYY7x8THDhgtSWt42PnOCKR5421eTOB6cgsKhSaqbwSIk4drwA69J1efKk0gdX9BsDkd7+UfShn4vOTibLgQVXej/7aSZO5gKXUlvfSr765mCnibrumTNr9G9/wwP+nEeCXJaTW986/rWlg48sVc48XcqesFqI7KD0XXKRMnWy+sk+g4/p8EiJUoPAosq+SSiMs+22scm+G2+8FVMMKJMmyhXluvnA0nV5bFXpA//iv/TiPi+3Hove/1DXVSSmatznC3/7H7MrfPo+d37mw51ay5FBBtNzRZFKI4NMNy2FQkMcpnm93s/MzQ4jtW4/D4XlsZXd+6Fmiv/KL3UOMuFzX3JFeXap+N6mWvCtM/m1Mfnjsq1HxhtvHoY1UCWVj1Gm15hdi65LY0aXPvAvweuvyQ4OkUp1PPLr5CuvdyeFxJNvbEn/dXv2op45s/3XXJXHYzfDap5cUe6dOyf7tcSml1Ov/ylrR0iBa6+Wxow2eLVOmV7TZwQ/kILAoor7/cMeRN5N16XKitL7fxJc/NU+51NCxH+/tvM3/5U9FZjeeiz+hz9mT0rIPZ7QLTdKVZVmiiYPeRXMc+45ytTJvS8kEqktbyde2CySveOwvHNm+y660OBlLM/sczApIV24hkWY97xzud+X3+TPPbrOBB/8aXDxV/pd/Um+sTX64MOis7P/6y+/pn7zNs+smT2veM6dFbjyy7EnnzY4qiCzZ6/WcKDn+jqXpfT2j5jWFYK5Uk9R/Jd9gQd7J3PVmlvUv38iMhl1X13PFTceDAQWLki+8vrJCXgGxP0+73nnWvBRgE0QWIR5zp4hTxivDmMOGE2Xp0ws+7efBa6d3y+V0n/9oH3Z8u7CWNkkSWtsSrz4SnZgcZ8v9A83J17+b4PlieO/W9356ONZNw050zQRT+SeHVrX5dMm+C65qE/zPtihtbSIVDr56uvZtwh8F12onDE9s2Pn4Jfe5QnjPWfPsO4TAavhlJAwqbrKO2d23ovpuufsM0c9uipw3YJ+P291z94Td/+fzMe7c//sdT2xYZN2qDH7Nc95cwLzLzd4VshDIamyQqqsPPmnQqquUmac4bvw/BxbFML3+QuVrCEIIpNJvvq6iCeYpiVffi27qr08YVzg6iuGDE3vnNlydZUFHwXYBEdYhHGPx3fpxfE/bjQ6CkkIxpjvC58vffCn3jmz+v2lure27a4fpt/73wEPUiQps3tP4sVXw3fc3tsGryd065LE5leNHGSF7/hG8KYb+oyEEIx7PNLJW349a2VCSKPKgjfdkD2RorqvLrX17a7DsfSOnem/vJ89KD9wzVWx3z6tNTUP0n7fpRcPMdEZuJvZSSisWNzZMQRWjN6wbqyDb9758oRx2oFDRjrGFCV4/TWR+5b3GzjOGFPr6k/84N7UG1uGGM2UTifWbwguWiiNHt3zmue82f4vXxp/ai2Th2i8NGa0NGY0G5IQTNd9l32hX0Gb5Euvage7z1VFtCPx4sv+yy7pGRyrnHWm79LPx3+/dqC1yhPG+eadP/A2C/+1Mcn4Ol04g4ZFTcIpIW3K5EmGZl3Xdam0NPLDH5T9x8pT0yqzY2fbHd9LvvanocdeSlJ6+0ept9/Nfo37fKHbbpEqy03dLsxubNsJqaI8fMc3sgdwaQcb4+s2ZB9Lpv68Tc06P+Veb/ArC3kkMlAzfPMuUPo+RA3kILCI8yiBa+fz7PLBpxJCmXHGqF+vKrnnrn5TzzNdT/152/Gl/5Ta+rahUjCci46O+Nr12aMKGGPez3wqMP+KggSW3h5N/c97wZtu8F3wmezXEy9szvwt6+KaJGn7G1JvvZP9Hu9nP+U556ycJ8jc7wtcOz97EkagCJ8feb5553tmnp3+6wcDvcH76fMiP7zbM2eWfuRoVqZwpmuJza92rHpUO3Awj+lnJCm15a3ka3/yfmpO70AtWfZ96QuJjS/qJ9r7DEBNJrXGZh7wG6sYwUVnLPbkav3o0eCy72tHjnZHjySp9Q2djz3B0pnsdopkMrFhk2/eZ7nXe3JGVcl3wWfT7/zl1HV7Zp49yPkgUMGtGOlv2+UAF17DcuRiWecvfn3i3hW5Q4FzuapSKivNUdBK07RDTSKRGMZkWXJVJS/rWzdG1bRDh0Q662FswXgoKI+vNl77RcTjWlOLFCnpMx6Vc9HRqTXlmF+e+3zyhPG94yS63tnc0n9XcF724Irw976dbzdtu2SDeYKNNgCBNezF3RNYal1968LF6t7agbY04AFOzgFQRugix1DPXEMT8j5PlKTcS+VMVcF6n8ce+J3K9Jry59dmj5g3CIHl1A4ZCK5hFQNl6uTgousH/GvOu8tUnfpn2Hd+pVzrzGvTA/0ZaKncXWNG3hlcdP0w0gpcKI8jrNzLO/pEuLP/BJnse2Ebr9bWtV63ZMCDrBFMmV5TvuEZR0rKOPvrsGJDVnQTk1CMRErN1NCtS4Y3dXsxk6TQrUtQAKto4PtdPII3L/LOPdfpVriLd+65wZsXOd0KKBgEVvGQq8eGv7OUBwPmV1UceDAQ/s7SfkWfgTQEVlEJLLgqcN0Cp1vhFoHrFgQWXOV0K6CQEFhFhQcDJXfdqUyf5nRDnKdMn1Zy15043iwyCKxi4zl7RmTZ93goaH5VdPFQMLLseyh9VXzsq9aQk8nn0W2r0p9znS4c19clcMN16b9u73zsCacb4pjQLYsDN1xn0cptG0FtG5M/Lju7iSOsIsR9vpJl3+9Xq3Pk8F1yUcmy72cX0oKigcAqTvK46tL7f1yAaXWoUabXlN7/Y3kcJqMvTgisouWdO6fsgRVyVaX5VVEhV1WWPbCi37RgUEwQWMXMP//yyIp7pdKI0w2xg1Qaiay41z//cqcbAhZCYBU1zkO3LI4sX8bDYfMrczMeDkeWLwvdsnj4j3MDBQisYqcooaW3R350dxFnFg+HIz+6O7T0dhQULXpurNZgkhWjDWwr5mVRj0Q6E3v8iej9K/X2aMF3jrOk0khk+bLQ0tu519R0OLaVHLCi7ogLG29ReRUEVoG76c7AYowxVY09vTa64kHt8JGC7x+nyFWVkRX3hm5ZbP7YyoW/edKNtyiwcEo4YihK6NYlo371sDKtSMY6KNNqRv3q4dCtS3AmOHIgsEYSSfLPv2L0k//pu+Qi2henOfddctHoJ//TP/8KlAAbUXBKWOBuuveUMIvW1Nzx0COx1WtFLF7YNduAh4KhmxeX3PP9wo4OdeFZFenG4xqWUQgsQ+tMJhPrN0Yf+rm6j1JVZWVaTeSeuwJfvZb7/YVdswt/86Qbj8AyCoFlXObj3R2rHk08v0nEExZtolB4MBBYuKDkB3daVIPBhb950o13PrBsa6sVc2oZZ1veuaTYg4gnEi++3PnLx9Lbd/ROjOoqsuydMzv83W8Frr7SuvpWVvzmXbhO4xvKCYFV+A2ZNNICq4vW3BJfvS721DPqvrqCzDhfGJwr06aGbl0SvHmR1ZWOXRguLvzOI7AKvyGTRmZgdTVIrauPr3k2/ofn1Lr97NSZou0kScrUKcEbrw/edIMydbIN9zRdGC4u/M4jsAq/IZNGbmCdbJZafyD5wub4+uczu3aLZNLm7XO/3zNzRvCrC/3XzFcmT7Rt+IULw8WF33kEVuE3ZNJID6yT9NZjqW3vJjZuTm17R2tstvzylizL46t98y4IXDvfN+98qXyMzf11Ybi48DuPwCr8hkxCYPVpZCaj1R9IbXs39ebW9PYd2sFGkUoVcs/4fPJp471zZvsuvdg373x58kTuMfVI4PBb4r5wceF3HoFV+A2ZhMDKSWQyesvhzK7d6fe3Zz7ape6t1Y62imiHUNU8LtJzzhWFR0rkinJleo1n1kzv3DmemTOksVVO5VR200ztHwTWcN+ZF7PjsKzolXG0fvNGkIg2kUzqrcfUhoNqbZ26r06rP6A1NultJ/T2dtERE5m0yKiMMe5RuMfLS0JSaak0qkweP06ePFGZNlWpmapMOk0qH1PwwZ/2sO3fY5NNMs62wYPm+47AchcSgTXCIbCGvU7zfceDowBABgILAMhAYAEAGQgsqtauXet0EwDshovu7pLXrqusrLzssssWLlx40UUXjR1r7aN20AMX3Ye9TvN9t6S2rMm2OjsOy2Q3c7KikowVWzfZ95Hzsyl4O40vnrOdVnwczn5pB4JTQgAgA4EFAGQgsACADAQWAJCBwAIAMhBYAECGfeVlnOXCqXSojMexopvO7qWcRsiX1njf3VlnCUdYAEAGAgsAyEBgAQAZCCwAIAOBBQBkILAAgIw8qjXYdpPVtkodVgzUoHIr2rbBCiZ7ZFvfnS0xYlvtDePFHoyz89eBIywAIAOBBQBkILAAgAwEFgCQgcACADIQWABARh7DGpx97N62ev5W3KO1besmpy0wyYXDBXKiUmLEWVZMgYFqDQAwgiCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIyGMSCks2774n161op8l12nbH3YUzkpCelcMkZ7+fJjdkUQkHHGEBABkILAAgA4EFAGQgsACADAQWAJCBwAIAMsgMa3DhU/vO3sV34Z1sk+s0zoVbd+E4D2fLq1gER1gAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDwmoTDOihoMxhc3eefVZEV9K7hwAg6T7XR2ZgrH780XvEkunGPFor7jCAsAyEBgAQAZCCwAIAOBBQBkILAAgAwEFgCQkUe1BmfLGFixIdv6bnydLpwXwzjbboTbtnXbyi04O6TD2flQMKwBAIoTAgsAyEBgAQAZCCwAIAOBBQBkILAAgIw8qjWYLGNg2/wIVrBitIELZ9BwdoeYXNy2cR623e/PyYq+W7FOi3YIjrAAgAwEFgCQgcACADIQWABABgILAMhAYAEAGXlUazC7JUeLEzhbK8K2IR3FN3bEhTVCrOhmTi4cVGFbjwaCIywAIAOBBQBkILAAgAwEFgCQgcACADIQWABARh7VGkxytjyAyQ1ZcdvYtjoEVgyAoDLbhbPrNF7LxHiTbCvI4WydjIHgCAsAyEBgAQAZCCwAIAOBBQBkILAAgAwEFgCQkcewBioPvlsxAMK2u/gunHPB5OJWjJ+wbeSKs1u3YnHqRT5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIMFutYefOnRUVFVa3ctWqVStXrjT4ZtsqK+RE5Ql7K1BpvAtHmdhWI8S2QhcWDWswG1gVFRVVVVVWtCxbOBy2ehMA4H44JQQAMhBYAEAGAgsAyEBgAQAZCCwAIMOSSShM3tFsaWkp+J1HZx+RN75O23pkRWEGk5wdEWJFN0023mTdEWfH9xjvZl5whAUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIsGRYg7NIP99vRd+tKDlg2zutYLxJzk7/Ydv+dOEcKwPBERYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgowiHNYzk4QJWPEzvwm7mZEVlBZP1Epwd65CTbSMYLBq5giMsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQIYlwxpaWlrMLG5yBgrbSvfbVnKASsED25j8iE2u0/jiJsc6uLBWhLPrZBYFVsHnvAEAYDglBABCEFgAQAYCCwDIQGABABlmL7qvWrUqHA5b3cotW7bYszsAwM24FXeIbUPl0XPbahsY76ZtU3W48+64ma0bZ9tnZFtdB9tKoQwEp4QAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjDyGNQAAOAtHWABABgILAMhAYAEAGQgsACADgQUAZCCwAIAMBBYAkIHAAgAyEFgAQAYCCwDIQGABABkILAAgA4EFAGQgsACAjP8Prqme11Be/zoAAAAASUVORK5CYII=",yt=be.p+"static/newqrcode.a8740efb.png",Vt=be(32637),ct=be(67294),We=(ft,qe,at)=>new Promise((jt,Mt)=>{var bt=Jn=>{try{Ht(at.next(Jn))}catch(qn){Mt(qn)}},Bt=Jn=>{try{Ht(at.throw(Jn))}catch(qn){Mt(qn)}},Ht=Jn=>Jn.done?jt(Jn.value):Promise.resolve(Jn.value).then(bt,Bt);Ht((at=at.apply(ft,qe)).next())});const Te=(ft,qe=!1,at=!1,jt="",Mt=!1)=>!!(ne(ft)&&ue(ft,qe,at,jt,Mt)),ne=ft=>(0,Nt.bg)()?!0:(ft({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1),te=ft=>{var qe,at,jt;const{user:Mt}=(0,ve.getDvaApp)()._store.getState();(0,Nt.bg)()&&!((at=(qe=Mt==null?void 0:Mt.userInfo)==null?void 0:qe.course)!=null&&at.course_public)&&!((jt=Mt==null?void 0:Mt.userInfo)!=null&&jt.profile_completed)&&ft({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:"/account/profile/edit",isCurrentPage:!0}})},ue=(ft,qe=!1,at=!0,jt="",Mt=!1)=>{var bt;const{user:Bt}=(0,ve.getDvaApp)()._store.getState();return(bt=Bt.userInfo)!=null&&bt.profile_completed?!0:(at?ft({type:"user/showUpdateProfilePanel",payload:{showUpdateProfilePanel:!0,showClosable:!0,backurl:jt,isCurrentPage:Mt}}):ot.default.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:()=>{(0,Re.xg)("/account/profile/edit"),se()}}),!1)},se=()=>{ot.default.success({title:"\u63D0\u793A",width:430,closable:!0,centered:!0,content:"\u5DF2\u5B8C\u5584\u4E2A\u4EBA\u8D44\u6599\uFF1F\u8BF7\u5237\u65B0\u9875\u9762",okText:"\u7ACB\u5373\u5237\u65B0",icon:null,onOk:()=>{location.reload()}})},ge=()=>{ot.default.warning({title:"\u63D0\u793A",icon:null,width:400,content:ct.createElement("div",{style:{textAlign:"center"}},ct.createElement("div",{style:{color:"#191919",fontSize:14,marginBottom:15,textAlign:"left"}},"\u8001\u5E08\u60A8\u597D\uFF0C\u60A8\u7684\u8BFE\u5802\u8BD5\u7528\u671F\u5DF2\u7ED3\u675F\uFF0C\u76F8\u5173\u529F\u80FD\u88AB\u9650\u5236\u3002 \u5982\u9700\u7EE7\u7EED\u4F7F\u7528\uFF0C\u8BF7\u5C3D\u5FEB\u5BF9\u63A5\u4EBA\u5DE5\u652F\u6301\uFF01"),ct.createElement("img",{style:{border:"1px solid #D8E3E9",width:190,height:180},src:Vt}),ct.createElement("div",{style:{color:"#666666",fontSize:14,marginTop:15}},"\u6DFB\u52A0\u5BA2\u670D\u4EBA\u5458\u5FAE\u4FE1\uFF0C\u83B7\u5F97\u66F4\u591A\u652F\u6301"))})},me=()=>{var ft;const{user:qe}=(0,ve.getDvaApp)()._store.getState();return(ft=qe.userInfo)!=null&&ft.professional_certification?!0:(ot.default.confirm({title:"\u63D0\u793A",centered:!0,content:ct.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:()=>{(0,Re.xg)("/account/certification")}}),!1)},xe=()=>(0,Nt.V9)()?!0:(ot.default.warning({centered:!0,width:530,title:"\u63D0\u793A",content:ct.createElement("div",{className:"tc",style:{marginLeft:-38}},ct.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),ct.createElement("img",{src:yt,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1),Pe=(ft,qe)=>ft?!0:(ot.default.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:ct.createElement("div",null,ct.createElement("p",null,qe||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),ct.createElement("div",{style:{marginLeft:"110px"}},ct.createElement("img",{src:mt,width:200}),ct.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:()=>{(0,Re.xg)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1),Ke=ft=>{ot.default.info({title:"\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425",icon:null,width:615,centered:!0,content:ct.createElement("div",null,ct.createElement("div",null,ct.createElement("p",{style:{color:"#191919",fontWeight:400,fontSize:14}},"\u201C\u4FDD\u5B58\u5B9E\u9A8C\u4E34\u65F6\u6570\u636E\u201D\u529F\u80FD\u4E3A\u4ED8\u8D39\u529F\u80FD\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425\u8FDB\u884C\u5F00\u901A\u3002"),ct.createElement(wt.Z,null),ct.createElement("p",{style:{color:"#666666",fontSize:12}}," ",ct.createElement("span",{style:{display:"inline-flex",width:14,height:14,borderRadius:2,background:"#F3F3F3",justifyContent:"center",color:"#666666",fontSize:12,lineHeight:"14px",marginRight:8}},"1")," \u56E0\u5E73\u53F0\u7684\u5B9E\u9A8C\u6570\u636E\u50A8\u5B58\u5BB9\u91CF\u548C\u6210\u672C\u6D88\u8017\u8F83\u5927\uFF0C\u5B9E\u8DF5\u9879\u76EE\u9ED8\u8BA4\u4FDD\u5B58\u5B9E\u9A8C\u73AF\u5883\u4E2D\u4E34\u65F6\u6570\u636E ",ct.createElement("a",null,ft),"\u5929\u3002"),ct.createElement("p",{style:{color:"#666666",fontSize:12}}," ",ct.createElement("span",{style:{display:"inline-flex",width:14,height:14,borderRadius:2,background:"#F3F3F3",justifyContent:"center",color:"#666666",fontSize:12,lineHeight:"14px",marginRight:8}},"2"),"\u82E5\u60A8\u9700\u8981\u4E2A\u6027\u5316\u7684\u6570\u636E\u4FDD\u5B58\u5468\u671F\u670D\u52A1\uFF0C\u6211\u4EEC\u53EF\u4EE5\u63D0\u4F9B\u76F8\u5173\u6280\u672F\u652F\u6301\uFF0C\u5E76\u6839\u636E\u60A8\u7684\u9700\u6C42\u6536\u53D6\u5B9A\u5236\u8D39\u7528\u3002")),ct.createElement("div",{style:{textAlign:"center",marginTop:30}},ct.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:pt,alt:"\u4E8C\u7EF4\u7801",width:160})))})},nt=(ft,qe="")=>{const{shixunsDetail:{detail:at}}=(0,ve.getDvaApp)()._store.getState();if((at==null?void 0:at.public)===2||(at==null?void 0:at.public)===1||(at==null?void 0:at.shixun_status)===3){let jt="";return(at==null?void 0:at.public)===2&&(jt="\u5DF2\u516C\u5F00"),(at==null?void 0:at.public)===1&&(jt="\u5F85\u5BA1\u6838"),(at==null?void 0:at.shixun_status)===3&&(jt="\u5DF2\u5173\u95ED"),ot.default.info({centered:!0,icon:ct.createElement(Je.Z,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:ct.createElement("div",{className:"tc",style:{marginLeft:-38}},ct.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},ct.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",jt,"\uFF0C",qe,"\u3002"),ct.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),ct.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:pt,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0}return(at==null?void 0:at.shixun_status)===2?(ot.default.confirm({centered:!0,icon:ct.createElement(Je.Z,null),title:"\u63D0\u793A",content:ct.createElement("div",null,ct.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",qe,"\u3002"),ct.createElement("br",null),ct.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:()=>{ot.default.confirm({width:440,centered:!0,icon:ct.createElement(Je.Z,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:()=>We(void 0,null,function*(){(yield ft({type:"shixunsDetail/cancelRelease",payload:{id:at==null?void 0:at.identifier}})).status!==401&&(Qt.ZP.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),ft({type:"shixunsDetail/getShixunsDetail",payload:{id:at==null?void 0:at.identifier}}),ft({type:"practiceSetting/getCommonData",payload:{id:at==null?void 0:at.identifier}}))})})}}),!0):!1}},88386:function(Dn,ei,be){(function(ve){ve(be(4631))})(function(ve){ve.defineOption("placeholder","",function(pt,mt,yt){var Vt=yt&&yt!=ve.Init;if(mt&&!Vt)pt.on("blur",Nt),pt.on("change",Re),pt.on("swapDoc",Re),ve.on(pt.getInputField(),"compositionupdate",pt.state.placeholderCompose=function(){Qt(pt)}),Re(pt);else if(!mt&&Vt){pt.off("blur",Nt),pt.off("change",Re),pt.off("swapDoc",Re),ve.off(pt.getInputField(),"compositionupdate",pt.state.placeholderCompose),ot(pt);var ct=pt.getWrapperElement();ct.className=ct.className.replace(" CodeMirror-empty","")}mt&&!pt.hasFocus()&&Nt(pt)});function ot(pt){pt.state.placeholder&&(pt.state.placeholder.parentNode.removeChild(pt.state.placeholder),pt.state.placeholder=null)}function wt(pt){ot(pt);var mt=pt.state.placeholder=document.createElement("pre");mt.style.cssText="height: 0; overflow: visible",mt.style.direction=pt.getOption("direction"),mt.className="CodeMirror-placeholder CodeMirror-line-like";var yt=pt.getOption("placeholder");typeof yt=="string"&&(yt=document.createTextNode(yt)),mt.appendChild(yt),pt.display.lineSpace.insertBefore(mt,pt.display.lineSpace.firstChild)}function Qt(pt){setTimeout(function(){var mt=!1,yt=pt.getInputField();yt.nodeName=="TEXTAREA"?mt=!yt.value:pt.lineCount()==1&&(mt=!/[^\u200b]/.test(yt.querySelector(".CodeMirror-line").textContent)),mt?wt(pt):ot(pt)},20)}function Nt(pt){Je(pt)&&wt(pt)}function Re(pt){var mt=pt.getWrapperElement(),yt=Je(pt);mt.className=mt.className.replace(" CodeMirror-empty","")+(yt?" CodeMirror-empty":""),yt?wt(pt):ot(pt)}function Je(pt){return pt.lineCount()===1&&pt.getLine(0)===""}})},82801:function(Dn,ei,be){(function(ve){ve(be(4631))})(function(ve){var ot={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},wt=ve.Pos;ve.defineOption("autoCloseBrackets",!1,function(ne,te,ue){ue&&ue!=ve.Init&&(ne.removeKeyMap(Nt),ne.state.closeBrackets=null),te&&(Re(Qt(te,"pairs")),ne.state.closeBrackets=te,ne.addKeyMap(Nt))});function Qt(ne,te){return te=="pairs"&&typeof ne=="string"?ne:typeof ne=="object"&&ne[te]!=null?ne[te]:ot[te]}var Nt={Backspace:mt,Enter:yt};function Re(ne){for(var te=0;te=0;ge--){var xe=se[ge].head;ne.replaceRange("",wt(xe.line,xe.ch-1),wt(xe.line,xe.ch+1),"+delete")}}function yt(ne){var te=pt(ne),ue=te&&Qt(te,"explode");if(!ue||ne.getOption("disableInput"))return ve.Pass;for(var se=ne.listSelections(),ge=0;ge0;return{anchor:new wt(ne.anchor.line,ne.anchor.ch+(te?-1:1)),head:new wt(ne.head.line,ne.head.ch+(te?1:-1))}}function ct(ne,te){var ue=pt(ne);if(!ue||ne.getOption("disableInput"))return ve.Pass;var se=Qt(ue,"pairs"),ge=se.indexOf(te);if(ge==-1)return ve.Pass;for(var me=Qt(ue,"closeBefore"),xe=Qt(ue,"triples"),Pe=se.charAt(ge+1)==te,Ke=ne.listSelections(),nt=ge%2==0,ft,qe=0;qe=0&&ne.getRange(jt,wt(jt.line,jt.ch+3))==te+te+te?Mt="skipThree":Mt="skip";else if(Pe&&jt.ch>1&&xe.indexOf(te)>=0&&ne.getRange(wt(jt.line,jt.ch-2),jt)==te+te){if(jt.ch>2&&/\bstring/.test(ne.getTokenTypeAt(wt(jt.line,jt.ch-2))))return ve.Pass;Mt="addFour"}else if(Pe){var Bt=jt.ch==0?" ":ne.getRange(wt(jt.line,jt.ch-1),jt);if(!ve.isWordChar(bt)&&Bt!=te&&!ve.isWordChar(Bt))Mt="both";else return ve.Pass}else if(nt&&(bt.length===0||/\s/.test(bt)||me.indexOf(bt)>-1))Mt="both";else return ve.Pass;if(!ft)ft=Mt;else if(ft!=Mt)return ve.Pass}var Ht=ge%2?se.charAt(ge-1):te,Jn=ge%2?te:se.charAt(ge+1);ne.operation(function(){if(ft=="skip")ne.execCommand("goCharRight");else if(ft=="skipThree")for(var qn=0;qn<3;qn++)ne.execCommand("goCharRight");else if(ft=="surround"){for(var sn=ne.getSelections(),qn=0;qn'"]=function(We){return Qt(We)}),mt.addKeyMap(ct)}});var ot=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],wt=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function Qt(mt){if(mt.getOption("disableInput"))return ve.Pass;for(var yt=mt.listSelections(),Vt=[],ct=mt.getOption("autoCloseTags"),We=0;WeTe.ch&&(ge=ge.slice(0,ge.length-ne.end+Te.ch));var Ke=ge.toLowerCase();if(!ge||ne.type=="string"&&(ne.end!=Te.ch||!/[\"\']/.test(ne.string.charAt(ne.string.length-1))||ne.string.length==1)||ne.type=="tag"&&se.close||ne.string.indexOf("/")==Te.ch-ne.start-1||xe&&Je(xe,Ke)>-1||pt(mt,te.mode.xmlCurrentContext&&te.mode.xmlCurrentContext(ue)||[],ge,Te,!0))return ve.Pass;var nt=typeof ct=="object"&&ct.emptyTags;if(nt&&Je(nt,ge)>-1){Vt[We]={text:"/>",newPos:ve.Pos(Te.line,Te.ch+2)};continue}var ft=Pe&&Je(Pe,Ke)>-1;Vt[We]={indent:ft,text:">"+(ft?` `:"")+"",newPos:ft?ve.Pos(Te.line+1,0):ve.Pos(Te.line,Te.ch+1)}}for(var qe=typeof ct=="object"&&ct.dontIndentOnAutoClose,We=yt.length-1;We>=0;We--){var at=Vt[We];mt.replaceRange(at.text,yt[We].head,yt[We].anchor,"+insert");var jt=mt.listSelections().slice(0);jt[We]={head:at.newPos,anchor:at.newPos},mt.setSelections(jt),!qe&&at.indent&&(mt.indentLine(at.newPos.line,null,!0),mt.indentLine(at.newPos.line+1,null,!0))}}function Nt(mt,yt){for(var Vt=mt.listSelections(),ct=[],We=yt?"/":""&&(xe+=">"),ct[te]=xe}if(mt.replaceSelections(ct),Vt=mt.listSelections(),!ne)for(var te=0;te=0&&yt[ue]==Vt;ue--)++te;ct=ne.to;for(var ue=1;ue=ue.max))return ue.ch=0,ue.text=ue.cm.getLine(++ue.line),!0}function yt(ue){if(!(ue.line<=ue.min))return ue.text=ue.cm.getLine(--ue.line),ue.ch=ue.text.length,!0}function Vt(ue){for(;;){var se=ue.text.indexOf(">",ue.ch);if(se==-1){if(mt(ue))continue;return}if(!pt(ue,se+1)){ue.ch=se+1;continue}var ge=ue.text.lastIndexOf("/",se),me=ge>-1&&!/\S/.test(ue.text.slice(ge+1,se));return ue.ch=se+1,me?"selfClose":"regular"}}function ct(ue){for(;;){var se=ue.ch?ue.text.lastIndexOf("<",ue.ch-1):-1;if(se==-1){if(yt(ue))continue;return}if(!pt(ue,se+1)){ue.ch=se;continue}Re.lastIndex=se,ue.ch=se;var ge=Re.exec(ue.text);if(ge&&ge.index==se)return ge}}function We(ue){for(;;){Re.lastIndex=ue.ch;var se=Re.exec(ue.text);if(!se){if(mt(ue))continue;return}if(!pt(ue,se.index+1)){ue.ch=se.index+1;continue}return ue.ch=se.index+se[0].length,se}}function Te(ue){for(;;){var se=ue.ch?ue.text.lastIndexOf(">",ue.ch-1):-1;if(se==-1){if(yt(ue))continue;return}if(!pt(ue,se+1)){ue.ch=se;continue}var ge=ue.text.lastIndexOf("/",se),me=ge>-1&&!/\S/.test(ue.text.slice(ge+1,se));return ue.ch=se+1,me?"selfClose":"regular"}}function ne(ue,se){for(var ge=[];;){var me=We(ue),xe,Pe=ue.line,Ke=ue.ch-(me?me[0].length:0);if(!me||!(xe=Vt(ue)))return;if(xe!="selfClose")if(me[1]){for(var nt=ge.length-1;nt>=0;--nt)if(ge[nt]==me[2]){ge.length=nt;break}if(nt<0&&(!se||se==me[2]))return{tag:me[2],from:ot(Pe,Ke),to:ot(ue.line,ue.ch)}}else ge.push(me[2])}}function te(ue,se){for(var ge=[];;){var me=Te(ue);if(!me)return;if(me=="selfClose"){ct(ue);continue}var xe=ue.line,Pe=ue.ch,Ke=ct(ue);if(!Ke)return;if(Ke[1])ge.push(Ke[2]);else{for(var nt=ge.length-1;nt>=0;--nt)if(ge[nt]==Ke[2]){ge.length=nt;break}if(nt<0&&(!se||se==Ke[2]))return{tag:Ke[2],from:ot(ue.line,ue.ch),to:ot(xe,Pe)}}}}ve.registerHelper("fold","xml",function(ue,se){for(var ge=new Je(ue,se.line,0);;){var me=We(ge);if(!me||ge.line!=se.line)return;var xe=Vt(ge);if(!xe)return;if(!me[1]&&xe!="selfClose"){var Pe=ot(ge.line,ge.ch),Ke=ne(ge,me[2]);return Ke&&wt(Ke.from,Pe)>0?{from:Pe,to:Ke.from}:null}}}),ve.findMatchingTag=function(ue,se,ge){var me=new Je(ue,se.line,se.ch,ge);if(!(me.text.indexOf(">")==-1&&me.text.indexOf("<")==-1)){var xe=Vt(me),Pe=xe&&ot(me.line,me.ch),Ke=xe&&ct(me);if(!(!xe||!Ke||wt(me,se)>0)){var nt={from:ot(me.line,me.ch),to:Pe,tag:Ke[2]};return xe=="selfClose"?{open:nt,close:null,at:"open"}:Ke[1]?{open:te(me,Ke[2]),close:nt,at:"close"}:(me=new Je(ue,Pe.line,Pe.ch,ge),{open:nt,close:ne(me,Ke[2]),at:"open"})}}},ve.findEnclosingTag=function(ue,se,ge,me){for(var xe=new Je(ue,se.line,se.ch,ge);;){var Pe=te(xe,me);if(!Pe)break;var Ke=new Je(ue,se.line,se.ch,ge),nt=ne(Ke,Pe.tag);if(nt)return{open:Pe,close:nt}}},ve.scanForClosingTag=function(ue,se,ge,me){var xe=new Je(ue,se.line,se.ch,me?{from:0,to:me}:null);return ne(xe,ge)}})},4631:function(Dn){(function(ei,be){Dn.exports=be()})(this,function(){"use strict";var ei=navigator.userAgent,be=navigator.platform,ve=/gecko\/\d/i.test(ei),ot=/MSIE \d/.test(ei),wt=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ei),Qt=/Edge\/(\d+)/.exec(ei),Nt=ot||wt||Qt,Re=Nt&&(ot?document.documentMode||6:+(Qt||wt)[1]),Je=!Qt&&/WebKit\//.test(ei),pt=Je&&/Qt\/\d+\.\d+/.test(ei),mt=!Qt&&/Chrome\//.test(ei),yt=/Opera\//.test(ei),Vt=/Apple Computer/.test(navigator.vendor),ct=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ei),We=/PhantomJS/.test(ei),Te=!Qt&&/AppleWebKit/.test(ei)&&/Mobile\/\w+/.test(ei),ne=/Android/.test(ei),te=Te||ne||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ei),ue=Te||/Mac/.test(be),se=/\bCrOS\b/.test(ei),ge=/win/i.test(be),me=yt&&ei.match(/Version\/(\d*\.\d*)/);me&&(me=Number(me[1])),me&&me>=15&&(yt=!1,Je=!0);var xe=ue&&(pt||yt&&(me==null||me<12.11)),Pe=ve||Nt&&Re>=9;function Ke(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var nt=function(ie,oe){var he=ie.className,de=Ke(oe).exec(he);if(de){var pe=he.slice(de.index+de[0].length);ie.className=he.slice(0,de.index)+(pe?de[1]+pe:"")}};function ft(ie){for(var oe=ie.childNodes.length;oe>0;--oe)ie.removeChild(ie.firstChild);return ie}function qe(ie,oe){return ft(ie).appendChild(oe)}function at(ie,oe,he,de){var pe=document.createElement(ie);if(he&&(pe.className=he),de&&(pe.style.cssText=de),typeof oe=="string")pe.appendChild(document.createTextNode(oe));else if(oe)for(var Fe=0;Fe=oe)return Ve+(oe-Fe);Ve+=rt-Fe,Ve+=he-Ve%he,Fe=rt+1}}var Ge=function(){this.id=null,this.f=null,this.time=0,this.handler=sn(this.onTimeout,this)};Ge.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ge.prototype.set=function(ie,oe){this.f=oe;var he=+new Date+ie;(!this.id||he=oe)return de+Math.min(Ve,oe-pe);if(pe+=Fe-de,pe+=he-pe%he,de=Fe+1,pe>=oe)return de}}var Xt=[""];function At(ie){for(;Xt.length<=ie;)Xt.push(on(Xt)+" ");return Xt[ie]}function on(ie){return ie[ie.length-1]}function Si(ie,oe){for(var he=[],de=0;de"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Me.test(ie))}function et(ie,oe){return oe?oe.source.indexOf("\\w")>-1&&He(ie)?!0:oe.test(ie):He(ie)}function Oe(ie){for(var oe in ie)if(ie.hasOwnProperty(oe)&&ie[oe])return!1;return!0}var ut=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Vn(ie){return ie.charCodeAt(0)>=768&&ut.test(ie)}function jn(ie,oe,he){for(;(he<0?oe>0:oehe?-1:1;;){if(oe==he)return oe;var pe=(oe+he)/2,Fe=de<0?Math.ceil(pe):Math.floor(pe);if(Fe==oe)return ie(Fe)?oe:he;ie(Fe)?he=Fe:oe=Fe+de}}function Pn(ie,oe,he,de){if(!ie)return de(oe,he,"ltr",0);for(var pe=!1,Fe=0;Feoe||oe==he&&Ve.to==oe)&&(de(Math.max(Ve.from,oe),Math.min(Ve.to,he),Ve.level==1?"rtl":"ltr",Fe),pe=!0)}pe||de(oe,he,"ltr")}var si=null;function mn(ie,oe,he){var de;si=null;for(var pe=0;peoe)return pe;Fe.to==oe&&(Fe.from!=Fe.to&&he=="before"?de=pe:si=pe),Fe.from==oe&&(Fe.from!=Fe.to&&he!="before"?de=pe:si=pe)}return de!=null?de:si}var Fi=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",oe="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function he(Pt){return Pt<=247?ie.charAt(Pt):1424<=Pt&&Pt<=1524?"R":1536<=Pt&&Pt<=1785?oe.charAt(Pt-1536):1774<=Pt&&Pt<=2220?"r":8192<=Pt&&Pt<=8203?"w":Pt==8204?"b":"L"}var de=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pe=/[stwN]/,Fe=/[LRr]/,Ve=/[Lb1n]/,rt=/[1n]/;function $e(Pt,tn,Ct){this.level=Pt,this.from=tn,this.to=Ct}return function(Pt,tn){var Ct=tn=="ltr"?"L":"R";if(Pt.length==0||tn=="ltr"&&!de.test(Pt))return!1;for(var bn=Pt.length,Ln=[],er=0;er-1&&(de[oe]=pe.slice(0,Fe).concat(pe.slice(Fe+1)))}}}function Yi(ie,oe){var he=Di(ie,oe);if(he.length)for(var de=Array.prototype.slice.call(arguments,2),pe=0;pe0}function Ii(ie){ie.prototype.on=function(oe,he){Qi(this,oe,he)},ie.prototype.off=function(oe,he){$r(this,oe,he)}}function ra(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function Un(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function Kr(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function ia(ie){ra(ie),Un(ie)}function sa(ie){return ie.target||ie.srcElement}function Wa(ie){var oe=ie.which;return oe==null&&(ie.button&1?oe=1:ie.button&2?oe=3:ie.button&4&&(oe=2)),ue&&ie.ctrlKey&&oe==1&&(oe=3),oe}var ma=function(){if(Nt&&Re<9)return!1;var ie=at("div");return"draggable"in ie||"dragDrop"in ie}(),Ha;function da(ie){if(Ha==null){var oe=at("span","\u200B");qe(ie,at("span",[oe,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(Ha=oe.offsetWidth<=1&&oe.offsetHeight>2&&!(Nt&&Re<8))}var he=Ha?at("span","\u200B"):at("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return he.setAttribute("cm-text",""),he}var la;function No(ie){if(la!=null)return la;var oe=qe(ie,document.createTextNode("A\u062EA")),he=Mt(oe,0,1).getBoundingClientRect(),de=Mt(oe,1,2).getBoundingClientRect();return ft(ie),!he||he.left==he.right?!1:la=de.right-he.right<3}var ti=` b`.split(/\n/).length!=3?function(ie){for(var oe=0,he=[],de=ie.length;oe<=de;){var pe=ie.indexOf(` `,oe);pe==-1&&(pe=ie.length);var Fe=ie.slice(oe,ie.charAt(pe-1)=="\r"?pe-1:pe),Ve=Fe.indexOf("\r");Ve!=-1?(he.push(Fe.slice(0,Ve)),oe+=Ve+1):(he.push(Fe),oe=pe+1)}return he}:function(ie){return ie.split(/\r\n?|\n/)},Ee=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(oe){return!1}}:function(ie){var oe;try{oe=ie.ownerDocument.selection.createRange()}catch(he){}return!oe||oe.parentElement()!=ie?!1:oe.compareEndPoints("StartToEnd",oe)!=0},pn=function(){var ie=at("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),hn=null;function ii(ie){if(hn!=null)return hn;var oe=qe(ie,at("span","x")),he=oe.getBoundingClientRect(),de=Mt(oe,0,1).getBoundingClientRect();return hn=Math.abs(he.left-de.left)>1}var Yn={},In={};function en(ie,oe){arguments.length>2&&(oe.dependencies=Array.prototype.slice.call(arguments,2)),Yn[ie]=oe}function ni(ie,oe){In[ie]=oe}function zt(ie){if(typeof ie=="string"&&In.hasOwnProperty(ie))ie=In[ie];else if(ie&&typeof ie.name=="string"&&In.hasOwnProperty(ie.name)){var oe=In[ie.name];typeof oe=="string"&&(oe={name:oe}),ie=ke(oe,ie),ie.name=oe.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return zt("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return zt("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Kt(ie,oe){oe=zt(oe);var he=Yn[oe.name];if(!he)return Kt(ie,"text/plain");var de=he(ie,oe);if(Ft.hasOwnProperty(oe.name)){var pe=Ft[oe.name];for(var Fe in pe)pe.hasOwnProperty(Fe)&&(de.hasOwnProperty(Fe)&&(de["_"+Fe]=de[Fe]),de[Fe]=pe[Fe])}if(de.name=oe.name,oe.helperType&&(de.helperType=oe.helperType),oe.modeProps)for(var Ve in oe.modeProps)de[Ve]=oe.modeProps[Ve];return de}var Ft={};function un(ie,oe){var he=Ft.hasOwnProperty(ie)?Ft[ie]:Ft[ie]={};Nn(oe,he)}function Ti(ie,oe){if(oe===!0)return oe;if(ie.copyState)return ie.copyState(oe);var he={};for(var de in oe){var pe=oe[de];pe instanceof Array&&(pe=pe.concat([])),he[de]=pe}return he}function Ri(ie,oe){for(var he;ie.innerMode&&(he=ie.innerMode(oe),!(!he||he.mode==ie));)oe=he.state,ie=he.mode;return he||{mode:ie,state:oe}}function hi(ie,oe,he){return ie.startState?ie.startState(oe,he):!0}var Ut=function(ie,oe,he){this.pos=this.start=0,this.string=ie,this.tabSize=oe||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=he};Ut.prototype.eol=function(){return this.pos>=this.string.length},Ut.prototype.sol=function(){return this.pos==this.lineStart},Ut.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ut.prototype.next=function(){if(this.posoe},Ut.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},Ut.prototype.skipToEnd=function(){this.pos=this.string.length},Ut.prototype.skipTo=function(ie){var oe=this.string.indexOf(ie,this.pos);if(oe>-1)return this.pos=oe,!0},Ut.prototype.backUp=function(ie){this.pos-=ie},Ut.prototype.column=function(){return this.lastColumnPos0?null:(Fe&&oe!==!1&&(this.pos+=Fe[0].length),Fe)}},Ut.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ut.prototype.hideFirstChars=function(ie,oe){this.lineStart+=ie;try{return oe()}finally{this.lineStart-=ie}},Ut.prototype.lookAhead=function(ie){var oe=this.lineOracle;return oe&&oe.lookAhead(ie)},Ut.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function zn(ie,oe){if(oe-=ie.first,oe<0||oe>=ie.size)throw new Error("There is no line "+(oe+ie.first)+" in the document.");for(var he=ie;!he.lines;)for(var de=0;;++de){var pe=he.children[de],Fe=pe.chunkSize();if(oe=ie.first&&oehe?Sn(he,zn(ie,he).text.length):va(oe,zn(ie,oe.line).text.length)}function va(ie,oe){var he=ie.ch;return he==null||he>oe?Sn(ie.line,oe):he<0?Sn(ie.line,0):ie}function Ho(ie,oe){for(var he=[],de=0;dethis.maxLookAhead&&(this.maxLookAhead=ie),oe},lo.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var oe=this.baseTokens[this.baseTokenPos+1];return{type:oe&&oe.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},lo.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},lo.fromSaved=function(ie,oe,he){return oe instanceof pi?new lo(ie,Ti(ie.mode,oe.state),he,oe.lookAhead):new lo(ie,Ti(ie.mode,oe),he)},lo.prototype.save=function(ie){var oe=ie!==!1?Ti(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pi(oe,this.maxLookAhead):oe};function al(ie,oe,he,de){var pe=[ie.state.modeGen],Fe={};$a(ie,oe.text,ie.doc.mode,he,function(Pt,tn){return pe.push(Pt,tn)},Fe,de);for(var Ve=he.state,rt=function(Pt){he.baseTokens=pe;var tn=ie.state.overlays[Pt],Ct=1,bn=0;he.state=!0,$a(ie,oe.text,tn.mode,he,function(Ln,er){for(var Cr=Ct;bnLn&&pe.splice(Ct,1,Ln,pe[Ct+1],qr),Ct+=2,bn=Math.min(Ln,qr)}if(er)if(tn.opaque)pe.splice(Cr,Ct-Cr,Ln,"overlay "+er),Ct=Cr+2;else for(;Crie.options.maxHighlightLength&&Ti(ie.doc.mode,de.state),Fe=al(ie,oe,de);pe&&(de.state=pe),oe.stateAfter=de.save(!pe),oe.styles=Fe.styles,Fe.classes?oe.styleClasses=Fe.classes:oe.styleClasses&&(oe.styleClasses=null),he===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return oe.styles}function Ns(ie,oe,he){var de=ie.doc,pe=ie.display;if(!de.mode.startState)return new lo(de,!0,oe);var Fe=Er(ie,oe,he),Ve=Fe>de.first&&zn(de,Fe-1).stateAfter,rt=Ve?lo.fromSaved(de,Ve,Fe):new lo(de,hi(de.mode),Fe);return de.iter(Fe,oe,function($e){ln(ie,$e.text,rt);var Pt=rt.line;$e.stateAfter=Pt==oe-1||Pt%5==0||Pt>=pe.viewFrom&&Ptoe.start)return Fe}throw new Error("Mode "+ie.name+" failed to advance stream.")}var Ao=function(ie,oe,he){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=oe||null,this.state=he};function ms(ie,oe,he,de){var pe=ie.doc,Fe=pe.mode,Ve;oe=io(pe,oe);var rt=zn(pe,oe.line),$e=Ns(ie,oe.line,he),Pt=new Ut(rt.text,ie.options.tabSize,$e),tn;for(de&&(tn=[]);(de||Pt.posie.options.maxHighlightLength?(rt=!1,Ve&&ln(ie,oe,de,tn.pos),tn.pos=oe.length,Ct=null):Ct=Ba(Va(he,tn,de.state,bn),Fe),bn){var Ln=bn[0].name;Ln&&(Ct="m-"+(Ct?Ln+" "+Ct:Ln))}if(!rt||Pt!=Ct){for(;$eVe;--rt){if(rt<=Fe.first)return Fe.first;var $e=zn(Fe,rt-1),Pt=$e.stateAfter;if(Pt&&(!he||rt+(Pt instanceof pi?Pt.lookAhead:0)<=Fe.modeFrontier))return rt;var tn=lt($e.text,null,ie.options.tabSize);(pe==null||de>tn)&&(pe=rt-1,de=tn)}return pe}function uo(ie,oe){if(ie.modeFrontier=Math.min(ie.modeFrontier,oe),!(ie.highlightFrontierhe;de--){var pe=zn(ie,de).stateAfter;if(pe&&(!(pe instanceof pi)||de+pe.lookAhead=oe:Fe.to>oe);(de||(de=[])).push(new Po(Ve,Fe.from,$e?null:Fe.to))}}return de}function Ua(ie,oe,he){var de;if(ie)for(var pe=0;pe=oe:Fe.to>oe);if(rt||Fe.from==oe&&Ve.type=="bookmark"&&(!he||Fe.marker.insertLeft)){var $e=Fe.from==null||(Ve.inclusiveLeft?Fe.from<=oe:Fe.from0&&rt)for(var za=0;za0)){var tn=[$e,1],Ct=or(Pt.from,rt.from),bn=or(Pt.to,rt.to);(Ct<0||!Ve.inclusiveLeft&&!Ct)&&tn.push({from:Pt.from,to:rt.from}),(bn>0||!Ve.inclusiveRight&&!bn)&&tn.push({from:rt.to,to:Pt.to}),pe.splice.apply(pe,tn),$e+=tn.length-3}}return pe}function wr(ie){var oe=ie.markedSpans;if(oe){for(var he=0;heoe)&&(!de||gn(de,Fe.marker)<0)&&(de=Fe.marker)}return de}function Ji(ie,oe,he,de,pe){var Fe=zn(ie,oe),Ve=Wn&&Fe.markedSpans;if(Ve)for(var rt=0;rt=0&&Ct<=0||tn<=0&&Ct>=0)&&(tn<=0&&($e.marker.inclusiveRight&&pe.inclusiveLeft?or(Pt.to,he)>=0:or(Pt.to,he)>0)||tn>=0&&($e.marker.inclusiveRight&&pe.inclusiveLeft?or(Pt.from,de)<=0:or(Pt.from,de)<0)))return!0}}}function xi(ie){for(var oe;oe=Oi(ie);)ie=oe.find(-1,!0).line;return ie}function nr(ie){for(var oe;oe=Yt(ie);)ie=oe.find(1,!0).line;return ie}function Zi(ie){for(var oe,he;oe=Yt(ie);)ie=oe.find(1,!0).line,(he||(he=[])).push(ie);return he}function vi(ie,oe){var he=zn(ie,oe),de=xi(he);return he==de?oe:$t(de)}function pr(ie,oe){if(oe>ie.lastLine())return oe;var he=zn(ie,oe),de;if(!fn(ie,he))return oe;for(;de=Yt(he);)he=de.find(1,!0).line;return $t(he)+1}function fn(ie,oe){var he=Wn&&oe.markedSpans;if(he){for(var de=void 0,pe=0;peoe.maxLineLength&&(oe.maxLineLength=pe,oe.maxLine=de)})}var Ia=function(ie,oe,he){this.text=ie,st(this,oe),this.height=he?he(this):1};Ia.prototype.lineNo=function(){return $t(this)},Ii(Ia);function ns(ie,oe,he,de){ie.text=oe,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),wr(ie),st(ie,he);var pe=de?de(ie):1;pe!=ie.height&&ri(ie,pe)}function Us(ie){ie.parent=null,wr(ie)}var Ds={},fl={};function Hs(ie,oe){if(!ie||/^\s*$/.test(ie))return null;var he=oe.addModeClass?fl:Ds;return he[ie]||(he[ie]=ie.replace(/\S+/g,"cm-$&"))}function cn(ie,oe){var he=jt("span",null,null,Je?"padding-right: .1px":null),de={pre:jt("pre",[he],"CodeMirror-line"),content:he,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};oe.measure={};for(var pe=0;pe<=(oe.rest?oe.rest.length:0);pe++){var Fe=pe?oe.rest[pe-1]:oe.line,Ve=void 0;de.pos=0,de.addToken=dl,No(ie.display.measure)&&(Ve=Vi(Fe,ie.doc.direction))&&(de.addToken=Ys(de.addToken,Ve)),de.map=[];var rt=oe!=ie.display.externalMeasured&&$t(Fe);hu(Fe,de,el(ie,Fe,rt)),Fe.styleClasses&&(Fe.styleClasses.bgClass&&(de.bgClass=Jn(Fe.styleClasses.bgClass,de.bgClass||"")),Fe.styleClasses.textClass&&(de.textClass=Jn(Fe.styleClasses.textClass,de.textClass||""))),de.map.length==0&&de.map.push(0,0,de.content.appendChild(da(ie.display.measure))),pe==0?(oe.measure.map=de.map,oe.measure.cache={}):((oe.measure.maps||(oe.measure.maps=[])).push(de.map),(oe.measure.caches||(oe.measure.caches=[])).push({}))}if(Je){var $e=de.content.lastChild;(/\bcm-tab\b/.test($e.className)||$e.querySelector&&$e.querySelector(".cm-tab"))&&(de.content.className="cm-tab-wrap-hack")}return Yi(ie,"renderLine",ie,oe.line,de.pre),de.pre.className&&(de.textClass=Jn(de.pre.className,de.textClass||"")),de}function nl(ie){var oe=at("span","\u2022","cm-invalidchar");return oe.title="\\u"+ie.charCodeAt(0).toString(16),oe.setAttribute("aria-label",oe.title),oe}function dl(ie,oe,he,de,pe,Fe,Ve){if(oe){var rt=ie.splitSpaces?gl(oe,ie.trailingSpace):oe,$e=ie.cm.state.specialChars,Pt=!1,tn;if(!$e.test(oe))ie.col+=oe.length,tn=document.createTextNode(rt),ie.map.push(ie.pos,ie.pos+oe.length,tn),Nt&&Re<9&&(Pt=!0),ie.pos+=oe.length;else{tn=document.createDocumentFragment();for(var Ct=0;;){$e.lastIndex=Ct;var bn=$e.exec(oe),Ln=bn?bn.index-Ct:oe.length-Ct;if(Ln){var er=document.createTextNode(rt.slice(Ct,Ct+Ln));Nt&&Re<9?tn.appendChild(at("span",[er])):tn.appendChild(er),ie.map.push(ie.pos,ie.pos+Ln,er),ie.col+=Ln,ie.pos+=Ln}if(!bn)break;Ct+=Ln+1;var Cr=void 0;if(bn[0]==" "){var qr=ie.cm.options.tabSize,jo=qr-ie.col%qr;Cr=tn.appendChild(at("span",At(jo),"cm-tab")),Cr.setAttribute("role","presentation"),Cr.setAttribute("cm-text"," "),ie.col+=jo}else bn[0]=="\r"||bn[0]==` `?(Cr=tn.appendChild(at("span",bn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Cr.setAttribute("cm-text",bn[0]),ie.col+=1):(Cr=ie.cm.options.specialCharPlaceholder(bn[0]),Cr.setAttribute("cm-text",bn[0]),Nt&&Re<9?tn.appendChild(at("span",[Cr])):tn.appendChild(Cr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,Cr),ie.pos++}}if(ie.trailingSpace=rt.charCodeAt(oe.length-1)==32,he||de||pe||Pt||Fe||Ve){var La=he||"";de&&(La+=de),pe&&(La+=pe);var ta=at("span",[tn],La,Fe);if(Ve)for(var za in Ve)Ve.hasOwnProperty(za)&&za!="style"&&za!="class"&&ta.setAttribute(za,Ve[za]);return ie.content.appendChild(ta)}ie.content.appendChild(tn)}}function gl(ie,oe){if(ie.length>1&&!/ /.test(ie))return ie;for(var he=oe,de="",pe=0;pePt&&Ct.from<=Pt));bn++);if(Ct.to>=tn)return ie(he,de,pe,Fe,Ve,rt,$e);ie(he,de.slice(0,Ct.to-Pt),pe,Fe,null,rt,$e),Fe=null,de=de.slice(Ct.to-Pt),Pt=Ct.to}}}function Ul(ie,oe,he,de){var pe=!de&&he.widgetNode;pe&&ie.map.push(ie.pos,ie.pos+oe,pe),!de&&ie.cm.display.input.needsContentAttribute&&(pe||(pe=ie.content.appendChild(document.createElement("span"))),pe.setAttribute("cm-marker",he.id)),pe&&(ie.cm.display.input.setUneditable(pe),ie.content.appendChild(pe)),ie.pos+=oe,ie.trailingSpace=!1}function hu(ie,oe,he){var de=ie.markedSpans,pe=ie.text,Fe=0;if(!de){for(var Ve=1;Ve$e||Gs.collapsed&&$o.to==$e&&$o.from==$e)){if($o.to!=null&&$o.to!=$e&&Ln>$o.to&&(Ln=$o.to,Cr=""),Gs.className&&(er+=" "+Gs.className),Gs.css&&(bn=(bn?bn+";":"")+Gs.css),Gs.startStyle&&$o.from==$e&&(qr+=" "+Gs.startStyle),Gs.endStyle&&$o.to==Ln&&(za||(za=[])).push(Gs.endStyle,$o.to),Gs.title&&((La||(La={})).title=Gs.title),Gs.attributes)for(var Xl in Gs.attributes)(La||(La={}))[Xl]=Gs.attributes[Xl];Gs.collapsed&&(!jo||gn(jo.marker,Gs)<0)&&(jo=$o)}else $o.from>$e&&Ln>$o.from&&(Ln=$o.from)}if(za)for(var Xu=0;Xu=rt)break;for(var Kc=Math.min(rt,Ln);;){if(tn){var bc=$e+tn.length;if(!jo){var Ku=bc>Kc?tn.slice(0,Kc-$e):tn;oe.addToken(oe,Ku,Ct?Ct+er:er,qr,$e+Ku.length==Ln?Cr:"",bn,La)}if(bc>=Kc){tn=tn.slice(Kc-$e),$e=Kc;break}$e=bc,qr=""}tn=pe.slice(Fe,Fe=he[Pt++]),Ct=Hs(he[Pt++],oe.cm.options)}}}function fc(ie,oe,he){this.line=oe,this.rest=Zi(oe),this.size=this.rest?$t(on(this.rest))-he+1:1,this.node=this.text=null,this.hidden=fn(ie,oe)}function _s(ie,oe,he){for(var de=[],pe,Fe=oe;Fe2&&Fe.push(($e.bottom+Pt.top)/2-he.top)}}Fe.push(he.bottom-he.top)}}function Hc(ie,oe,he){if(ie.line==oe)return{map:ie.measure.map,cache:ie.measure.cache};for(var de=0;dehe)return{map:ie.measure.maps[pe],cache:ie.measure.caches[pe],before:!0}}function Yh(ie,oe){oe=xi(oe);var he=$t(oe),de=ie.display.externalMeasured=new fc(ie.doc,oe,he);de.lineN=he;var pe=de.built=cn(ie,de);return de.text=pe.pre,qe(ie.display.lineMeasure,pe.pre),de}function Wu(ie,oe,he,de){return Iu(ie,Hu(ie,oe),he,de)}function El(ie,oe){if(oe>=ie.display.viewFrom&&oe=he.lineN&&oeoe)&&(Fe=$e-rt,pe=Fe-1,oe>=$e&&(Ve="right")),pe!=null){if(de=ie[Pt+2],rt==$e&&he==(de.insertLeft?"left":"right")&&(Ve=he),he=="left"&&pe==0)for(;Pt&&ie[Pt-2]==ie[Pt-3]&&ie[Pt-1].insertLeft;)de=ie[(Pt-=3)+2],Ve="left";if(he=="right"&&pe==$e-rt)for(;Pt=0&&(he=ie[pe]).left==he.right;pe--);return he}function ml(ie,oe,he,de){var pe=Jc(oe.map,he,de),Fe=pe.node,Ve=pe.start,rt=pe.end,$e=pe.collapse,Pt;if(Fe.nodeType==3){for(var tn=0;tn<4;tn++){for(;Ve&&Vn(oe.line.text.charAt(pe.coverStart+Ve));)--Ve;for(;pe.coverStart+rt0&&($e=de="right");var Ct;ie.options.lineWrapping&&(Ct=Fe.getClientRects()).length>1?Pt=Ct[de=="right"?Ct.length-1:0]:Pt=Fe.getBoundingClientRect()}if(Nt&&Re<9&&!Ve&&(!Pt||!Pt.left&&!Pt.right)){var bn=Fe.parentNode.getClientRects()[0];bn?Pt={left:bn.left,right:bn.left+Eu(ie.display),top:bn.top,bottom:bn.bottom}:Pt=ku}for(var Ln=Pt.top-oe.rect.top,er=Pt.bottom-oe.rect.top,Cr=(Ln+er)/2,qr=oe.view.measure.heights,jo=0;jo=de.text.length?($e=de.text.length,Pt="before"):$e<=0&&($e=0,Pt="after"),!rt)return Ve(Pt=="before"?$e-1:$e,Pt=="before");function tn(er,Cr,qr){var jo=rt[Cr],La=jo.level==1;return Ve(qr?er-1:er,La!=qr)}var Ct=mn(rt,$e,Pt),bn=si,Ln=tn($e,Ct,Pt=="before");return bn!=null&&(Ln.other=tn($e,bn,Pt!="before")),Ln}function Wl(ie,oe){var he=0;oe=io(ie.doc,oe),ie.options.lineWrapping||(he=Eu(ie.display)*oe.ch);var de=zn(ie.doc,oe.line),pe=so(de)+eu(ie.display);return{left:he,right:he,top:pe,bottom:pe+de.height}}function fu(ie,oe,he,de,pe){var Fe=Sn(ie,oe,he);return Fe.xRel=pe,de&&(Fe.outside=de),Fe}function Ru(ie,oe,he){var de=ie.doc;if(he+=ie.display.viewOffset,he<0)return fu(de.first,0,null,-1,-1);var pe=_i(de,he),Fe=de.first+de.size-1;if(pe>Fe)return fu(de.first+de.size-1,zn(de,Fe).text.length,null,1,1);oe<0&&(oe=0);for(var Ve=zn(de,pe);;){var rt=di(ie,Ve,pe,oe,he),$e=Zn(Ve,rt.ch+(rt.xRel>0||rt.outside>0?1:0));if(!$e)return rt;var Pt=$e.find(1);if(Pt.line==pe)return Pt;Ve=zn(de,pe=Pt.line)}}function Fo(ie,oe,he,de){de-=xl(oe);var pe=oe.text.length,Fe=An(function(Ve){return Iu(ie,he,Ve-1).bottom<=de},pe,0);return pe=An(function(Ve){return Iu(ie,he,Ve).top>de},Fe,pe),{begin:Fe,end:pe}}function gu(ie,oe,he,de){he||(he=Hu(ie,oe));var pe=Ts(ie,oe,Iu(ie,he,de),"line").top;return Fo(ie,oe,he,pe)}function Ot(ie,oe,he,de){return ie.bottom<=he?!1:ie.top>he?!0:(de?ie.left:ie.right)>oe}function di(ie,oe,he,de,pe){pe-=so(oe);var Fe=Hu(ie,oe),Ve=xl(oe),rt=0,$e=oe.text.length,Pt=!0,tn=Vi(oe,ie.doc.direction);if(tn){var Ct=(ie.options.lineWrapping?Yu:Kl)(ie,oe,he,Fe,tn,de,pe);Pt=Ct.level!=1,rt=Pt?Ct.from:Ct.to-1,$e=Pt?Ct.to:Ct.from-1}var bn=null,Ln=null,er=An(function(ps){var $o=Iu(ie,Fe,ps);return $o.top+=Ve,$o.bottom+=Ve,Ot($o,de,pe,!1)?($o.top<=pe&&$o.left<=de&&(bn=ps,Ln=$o),!0):!1},rt,$e),Cr,qr,jo=!1;if(Ln){var La=de-Ln.left=za.bottom?1:0}return er=jn(oe.text,er,1),fu(he,er,qr,jo,de-Cr)}function Kl(ie,oe,he,de,pe,Fe,Ve){var rt=An(function(Ct){var bn=pe[Ct],Ln=bn.level!=1;return Ot(Vs(ie,Sn(he,Ln?bn.to:bn.from,Ln?"before":"after"),"line",oe,de),Fe,Ve,!0)},0,pe.length-1),$e=pe[rt];if(rt>0){var Pt=$e.level!=1,tn=Vs(ie,Sn(he,Pt?$e.from:$e.to,Pt?"after":"before"),"line",oe,de);Ot(tn,Fe,Ve,!0)&&tn.top>Ve&&($e=pe[rt-1])}return $e}function Yu(ie,oe,he,de,pe,Fe,Ve){var rt=Fo(ie,oe,de,Ve),$e=rt.begin,Pt=rt.end;/\s/.test(oe.text.charAt(Pt-1))&&Pt--;for(var tn=null,Ct=null,bn=0;bn=Pt||Ln.to<=$e)){var er=Ln.level!=1,Cr=Iu(ie,de,er?Math.min(Pt,Ln.to)-1:Math.max($e,Ln.from)).right,qr=Crqr)&&(tn=Ln,Ct=qr)}}return tn||(tn=pe[pe.length-1]),tn.from<$e&&(tn={from:$e,to:tn.to,level:tn.level}),tn.to>Pt&&(tn={from:tn.from,to:Pt,level:tn.level}),tn}var ec;function pu(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(ec==null){ec=at("pre",null,"CodeMirror-line-like");for(var oe=0;oe<49;++oe)ec.appendChild(document.createTextNode("x")),ec.appendChild(at("br"));ec.appendChild(document.createTextNode("x"))}qe(ie.measure,ec);var he=ec.offsetHeight/50;return he>3&&(ie.cachedTextHeight=he),ft(ie.measure),he||1}function Eu(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var oe=at("span","xxxxxxxxxx"),he=at("pre",[oe],"CodeMirror-line-like");qe(ie.measure,he);var de=oe.getBoundingClientRect(),pe=(de.right-de.left)/10;return pe>2&&(ie.cachedCharWidth=pe),pe||10}function pc(ie){for(var oe=ie.display,he={},de={},pe=oe.gutters.clientLeft,Fe=oe.gutters.firstChild,Ve=0;Fe;Fe=Fe.nextSibling,++Ve){var rt=ie.display.gutterSpecs[Ve].className;he[rt]=Fe.offsetLeft+Fe.clientLeft+pe,de[rt]=Fe.clientWidth}return{fixedPos:mc(oe),gutterTotalWidth:oe.gutters.offsetWidth,gutterLeft:he,gutterWidth:de,wrapperWidth:oe.wrapper.clientWidth}}function mc(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function wl(ie){var oe=pu(ie.display),he=ie.options.lineWrapping,de=he&&Math.max(5,ie.display.scroller.clientWidth/Eu(ie.display)-3);return function(pe){if(fn(ie.doc,pe))return 0;var Fe=0;if(pe.widgets)for(var Ve=0;Ve0&&(Pt=zn(ie.doc,$e.line).text).length==$e.ch){var tn=lt(Pt,Pt.length,ie.options.tabSize)-Pt.length;$e=Sn($e.line,Math.max(0,Math.round((Fe-du(ie.display).left)/Eu(ie.display))-tn))}return $e}function au(ie,oe){if(oe>=ie.display.viewTo||(oe-=ie.display.viewFrom,oe<0))return null;for(var he=ie.display.view,de=0;deoe)&&(pe.updateLineNumbers=oe),ie.curOp.viewChanged=!0,oe>=pe.viewTo)Wn&&vi(ie.doc,oe)pe.viewFrom?Ml(ie):(pe.viewFrom+=de,pe.viewTo+=de);else if(oe<=pe.viewFrom&&he>=pe.viewTo)Ml(ie);else if(oe<=pe.viewFrom){var Fe=Fu(ie,he,he+de,1);Fe?(pe.view=pe.view.slice(Fe.index),pe.viewFrom=Fe.lineN,pe.viewTo+=de):Ml(ie)}else if(he>=pe.viewTo){var Ve=Fu(ie,oe,oe,-1);Ve?(pe.view=pe.view.slice(0,Ve.index),pe.viewTo=Ve.lineN):Ml(ie)}else{var rt=Fu(ie,oe,oe,-1),$e=Fu(ie,he,he+de,1);rt&&$e?(pe.view=pe.view.slice(0,rt.index).concat(_s(ie,rt.lineN,$e.lineN)).concat(pe.view.slice($e.index)),pe.viewTo+=de):Ml(ie)}var Pt=pe.externalMeasured;Pt&&(he=pe.lineN&&oe=de.viewTo)){var Fe=de.view[au(ie,oe)];if(Fe.node!=null){var Ve=Fe.changes||(Fe.changes=[]);Ne(Ve,he)==-1&&Ve.push(he)}}}function Ml(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Fu(ie,oe,he,de){var pe=au(ie,oe),Fe,Ve=ie.display.view;if(!Wn||he==ie.doc.first+ie.doc.size)return{index:pe,lineN:he};for(var rt=ie.display.viewFrom,$e=0;$e0){if(pe==Ve.length-1)return null;Fe=rt+Ve[pe].size-oe,pe++}else Fe=rt-oe;oe+=Fe,he+=Fe}for(;vi(ie.doc,he)!=he;){if(pe==(de<0?0:Ve.length-1))return null;he+=de*Ve[pe-(de<0?1:0)].size,pe+=de}return{index:pe,lineN:he}}function sl(ie,oe,he){var de=ie.display,pe=de.view;pe.length==0||oe>=de.viewTo||he<=de.viewFrom?(de.view=_s(ie,oe,he),de.viewFrom=oe):(de.viewFrom>oe?de.view=_s(ie,oe,de.viewFrom).concat(de.view):de.viewFromhe&&(de.view=de.view.slice(0,au(ie,he)))),de.viewTo=he}function su(ie){for(var oe=ie.display.view,he=0,de=0;de=ie.display.viewTo||rt.to().line0?oe.blinker=setInterval(function(){ie.hasFocus()||_c(ie),oe.cursorDiv.style.visibility=(he=!he)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(oe.cursorDiv.style.visibility="hidden")}}function Zs(ie){ie.state.focused||(ie.display.input.focus(),js(ie))}function Pl(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,_c(ie))},100)}function js(ie,oe){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(Yi(ie,"focus",ie,oe),ie.state.focused=!0,Ht(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Je&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),Ms(ie))}function _c(ie,oe){ie.state.delayingBlurEvent||(ie.state.focused&&(Yi(ie,"blur",ie,oe),ie.state.focused=!1,nt(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function _r(ie){for(var oe=ie.display,he=oe.lineDiv.offsetTop,de=0;de.005||tn<-.005)&&(ri(pe.line,Ve),ju(pe.line),pe.rest))for(var Ct=0;Ctie.display.sizerWidth){var bn=Math.ceil(rt/Eu(ie.display));bn>ie.display.maxLineLength&&(ie.display.maxLineLength=bn,ie.display.maxLine=pe.line,ie.display.maxLineChanged=!0)}}}}function ju(ie){if(ie.widgets)for(var oe=0;oe=Ve&&(Fe=_i(oe,so(zn(oe,$e))-ie.wrapper.clientHeight),Ve=$e)}return{from:Fe,to:Math.max(Ve,Fe+1)}}function sd(ie,oe){if(!hr(ie,"scrollCursorIntoView")){var he=ie.display,de=he.sizer.getBoundingClientRect(),pe=null;if(oe.top+de.top<0?pe=!0:oe.bottom+de.top>(window.innerHeight||document.documentElement.clientHeight)&&(pe=!1),pe!=null&&!We){var Fe=at("div","\u200B",null,`position: absolute; top: `+(oe.top-he.viewOffset-eu(ie.display))+`px; height: `+(oe.bottom-oe.top+Ol(ie)+he.barHeight)+`px; left: `+oe.left+"px; width: "+Math.max(2,oe.right-oe.left)+"px;");ie.display.lineSpace.appendChild(Fe),Fe.scrollIntoView(pe),ie.display.lineSpace.removeChild(Fe)}}}function Vc(ie,oe,he,de){de==null&&(de=0);var pe;!ie.options.lineWrapping&&oe==he&&(oe=oe.ch?Sn(oe.line,oe.sticky=="before"?oe.ch-1:oe.ch,"after"):oe,he=oe.sticky=="before"?Sn(oe.line,oe.ch+1,"before"):oe);for(var Fe=0;Fe<5;Fe++){var Ve=!1,rt=Vs(ie,oe),$e=!he||he==oe?rt:Vs(ie,he);pe={left:Math.min(rt.left,$e.left),top:Math.min(rt.top,$e.top)-de,right:Math.max(rt.left,$e.left),bottom:Math.max(rt.bottom,$e.bottom)+de};var Pt=Th(ie,pe),tn=ie.doc.scrollTop,Ct=ie.doc.scrollLeft;if(Pt.scrollTop!=null&&(Lt(ie,Pt.scrollTop),Math.abs(ie.doc.scrollTop-tn)>1&&(Ve=!0)),Pt.scrollLeft!=null&&(It(ie,Pt.scrollLeft),Math.abs(ie.doc.scrollLeft-Ct)>1&&(Ve=!0)),!Ve)break}return pe}function xh(ie,oe){var he=Th(ie,oe);he.scrollTop!=null&&Lt(ie,he.scrollTop),he.scrollLeft!=null&&It(ie,he.scrollLeft)}function Th(ie,oe){var he=ie.display,de=pu(ie.display);oe.top<0&&(oe.top=0);var pe=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:he.scroller.scrollTop,Fe=Wc(ie),Ve={};oe.bottom-oe.top>Fe&&(oe.bottom=oe.top+Fe);var rt=ie.doc.height+Cc(he),$e=oe.toprt-de;if(oe.toppe+Fe){var tn=Math.min(oe.top,(Pt?rt:oe.bottom)-Fe);tn!=pe&&(Ve.scrollTop=tn)}var Ct=ie.options.fixedGutter?0:he.gutters.offsetWidth,bn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:he.scroller.scrollLeft-Ct,Ln=Cu(ie)-he.gutters.offsetWidth,er=oe.right-oe.left>Ln;return er&&(oe.right=oe.left+Ln),oe.left<10?Ve.scrollLeft=0:oe.leftLn+bn-3&&(Ve.scrollLeft=oe.right+(er?0:10)-Ln),Ve}function _u(ie,oe){oe!=null&&(lu(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+oe)}function Dc(ie){lu(ie);var oe=ie.getCursor();ie.curOp.scrollToPos={from:oe,to:oe,margin:ie.options.cursorScrollMargin}}function Zu(ie,oe,he){(oe!=null||he!=null)&&lu(ie),oe!=null&&(ie.curOp.scrollLeft=oe),he!=null&&(ie.curOp.scrollTop=he)}function Ko(ie,oe){lu(ie),ie.curOp.scrollToPos=oe}function lu(ie){var oe=ie.curOp.scrollToPos;if(oe){ie.curOp.scrollToPos=null;var he=Wl(ie,oe.from),de=Wl(ie,oe.to);Qe(ie,he,de,oe.margin)}}function Qe(ie,oe,he,de){var pe=Th(ie,{left:Math.min(oe.left,he.left),top:Math.min(oe.top,he.top)-de,right:Math.max(oe.right,he.right),bottom:Math.max(oe.bottom,he.bottom)+de});Zu(ie,pe.scrollLeft,pe.scrollTop)}function Lt(ie,oe){Math.abs(ie.doc.scrollTop-oe)<2||(ve||vt(ie,{top:oe}),Tt(ie,oe,!0),ve&&vt(ie),cs(ie,100))}function Tt(ie,oe,he){oe=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,oe)),!(ie.display.scroller.scrollTop==oe&&!he)&&(ie.doc.scrollTop=oe,ie.display.scrollbars.setScrollTop(oe),ie.display.scroller.scrollTop!=oe&&(ie.display.scroller.scrollTop=oe))}function It(ie,oe,he,de){oe=Math.max(0,Math.min(oe,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((he?oe==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-oe)<2)&&!de)&&(ie.doc.scrollLeft=oe,_e(ie),ie.display.scroller.scrollLeft!=oe&&(ie.display.scroller.scrollLeft=oe),ie.display.scrollbars.setScrollLeft(oe))}function dn(ie){var oe=ie.display,he=oe.gutters.offsetWidth,de=Math.round(ie.doc.height+Cc(ie.display));return{clientHeight:oe.scroller.clientHeight,viewHeight:oe.wrapper.clientHeight,scrollWidth:oe.scroller.scrollWidth,clientWidth:oe.scroller.clientWidth,viewWidth:oe.wrapper.clientWidth,barLeft:ie.options.fixedGutter?he:0,docHeight:de,scrollHeight:de+Ol(ie)+oe.barHeight,nativeBarWidth:oe.nativeBarWidth,gutterWidth:he}}var yn=function(ie,oe,he){this.cm=he;var de=this.vert=at("div",[at("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pe=this.horiz=at("div",[at("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");de.tabIndex=pe.tabIndex=-1,ie(de),ie(pe),Qi(de,"scroll",function(){de.clientHeight&&oe(de.scrollTop,"vertical")}),Qi(pe,"scroll",function(){pe.clientWidth&&oe(pe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Nt&&Re<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yn.prototype.update=function(ie){var oe=ie.scrollWidth>ie.clientWidth+1,he=ie.scrollHeight>ie.clientHeight+1,de=ie.nativeBarWidth;if(he){this.vert.style.display="block",this.vert.style.bottom=oe?de+"px":"0";var pe=ie.viewHeight-(oe?de:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+pe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(oe){this.horiz.style.display="block",this.horiz.style.right=he?de+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Fe=ie.viewWidth-ie.barLeft-(he?de:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Fe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(de==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:he?de:0,bottom:oe?de:0}},yn.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yn.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yn.prototype.zeroWidthHack=function(){var ie=ue&&!ct?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ge,this.disableVert=new Ge},yn.prototype.enableZeroWidthBar=function(ie,oe,he){ie.style.pointerEvents="auto";function de(){var pe=ie.getBoundingClientRect(),Fe=he=="vert"?document.elementFromPoint(pe.right-1,(pe.top+pe.bottom)/2):document.elementFromPoint((pe.right+pe.left)/2,pe.bottom-1);Fe!=ie?ie.style.pointerEvents="none":oe.set(1e3,de)}oe.set(1e3,de)},yn.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Tn=function(){};Tn.prototype.update=function(){return{bottom:0,right:0}},Tn.prototype.setScrollLeft=function(){},Tn.prototype.setScrollTop=function(){},Tn.prototype.clear=function(){};function li(ie,oe){oe||(oe=dn(ie));var he=ie.display.barWidth,de=ie.display.barHeight;ji(ie,oe);for(var pe=0;pe<4&&he!=ie.display.barWidth||de!=ie.display.barHeight;pe++)he!=ie.display.barWidth&&ie.options.lineWrapping&&_r(ie),ji(ie,dn(ie)),he=ie.display.barWidth,de=ie.display.barHeight}function ji(ie,oe){var he=ie.display,de=he.scrollbars.update(oe);he.sizer.style.paddingRight=(he.barWidth=de.right)+"px",he.sizer.style.paddingBottom=(he.barHeight=de.bottom)+"px",he.heightForcer.style.borderBottom=de.bottom+"px solid transparent",de.right&&de.bottom?(he.scrollbarFiller.style.display="block",he.scrollbarFiller.style.height=de.bottom+"px",he.scrollbarFiller.style.width=de.right+"px"):he.scrollbarFiller.style.display="",de.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(he.gutterFiller.style.display="block",he.gutterFiller.style.height=de.bottom+"px",he.gutterFiller.style.width=oe.gutterWidth+"px"):he.gutterFiller.style.display=""}var Ei={native:yn,null:Tn};function gr(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&nt(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new Ei[ie.options.scrollbarStyle](function(oe){ie.display.wrapper.insertBefore(oe,ie.display.scrollbarFiller),Qi(oe,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),oe.setAttribute("cm-not-content","true")},function(oe,he){he=="horizontal"?It(ie,oe):Lt(ie,oe)},ie),ie.display.scrollbars.addClass&&Ht(ie.display.wrapper,ie.display.scrollbars.addClass)}var Bi=0;function ir(ie){ie.curOp={cm:ie,viewChanged:!1,startHeight:ie.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Bi},Ra(ie.curOp)}function Xi(ie){var oe=ie.curOp;oe&&Is(oe,function(he){for(var de=0;de=he.viewTo)||he.maxLineChanged&&oe.options.lineWrapping,ie.update=ie.mustUpdate&&new rs(oe,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function Ro(ie){ie.updatedDisplay=ie.mustUpdate&&ze(ie.cm,ie.update)}function na(ie){var oe=ie.cm,he=oe.display;ie.updatedDisplay&&_r(oe),ie.barMeasure=dn(oe),he.maxLineChanged&&!oe.options.lineWrapping&&(ie.adjustWidthTo=Wu(oe,he.maxLine,he.maxLine.text.length).left+3,oe.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(he.scroller.clientWidth,he.sizer.offsetLeft+ie.adjustWidthTo+Ol(oe)+oe.display.barWidth),ie.maxScrollLeft=Math.max(0,he.sizer.offsetLeft+ie.adjustWidthTo-Cu(oe))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=he.input.prepareSelection())}function Yr(ie){var oe=ie.cm;ie.adjustWidthTo!=null&&(oe.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft=ie.display.viewTo)){var he=+new Date+ie.options.workTime,de=Ns(ie,oe.highlightFrontier),pe=[];oe.iter(de.line,Math.min(oe.first+oe.size,ie.display.viewTo+500),function(Fe){if(de.line>=ie.display.viewFrom){var Ve=Fe.styles,rt=Fe.text.length>ie.options.maxHighlightLength?Ti(oe.mode,de.state):null,$e=al(ie,Fe,de,!0);rt&&(de.state=rt),Fe.styles=$e.styles;var Pt=Fe.styleClasses,tn=$e.classes;tn?Fe.styleClasses=tn:Pt&&(Fe.styleClasses=null);for(var Ct=!Ve||Ve.length!=Fe.styles.length||Pt!=tn&&(!Pt||!tn||Pt.bgClass!=tn.bgClass||Pt.textClass!=tn.textClass),bn=0;!Ct&&bnhe)return cs(ie,ie.options.workDelay),!0}),oe.highlightFrontier=de.line,oe.modeFrontier=Math.max(oe.modeFrontier,de.line),pe.length&&oo(ie,function(){for(var Fe=0;Fe=he.viewFrom&&oe.visible.to<=he.viewTo&&(he.updateLineNumbers==null||he.updateLineNumbers>=he.viewTo)&&he.renderedView==he.view&&su(ie)==0)return!1;Ye(ie)&&(Ml(ie),oe.dims=pc(ie));var pe=de.first+de.size,Fe=Math.max(oe.visible.from-ie.options.viewportMargin,de.first),Ve=Math.min(pe,oe.visible.to+ie.options.viewportMargin);he.viewFromVe&&he.viewTo-Ve<20&&(Ve=Math.min(pe,he.viewTo)),Wn&&(Fe=vi(ie.doc,Fe),Ve=pr(ie.doc,Ve));var rt=Fe!=he.viewFrom||Ve!=he.viewTo||he.lastWrapHeight!=oe.wrapperHeight||he.lastWrapWidth!=oe.wrapperWidth;sl(ie,Fe,Ve),he.viewOffset=so(zn(ie.doc,he.viewFrom)),ie.display.mover.style.top=he.viewOffset+"px";var $e=su(ie);if(!rt&&$e==0&&!oe.force&&he.renderedView==he.view&&(he.updateLineNumbers==null||he.updateLineNumbers>=he.viewTo))return!1;var Pt=Cs(ie);return $e>4&&(he.lineDiv.style.display="none"),an(ie,he.updateLineNumbers,oe.dims),$e>4&&(he.lineDiv.style.display=""),he.renderedView=he.view,Be(Pt),ft(he.cursorDiv),ft(he.selectionDiv),he.gutters.style.height=he.sizer.style.minHeight=0,rt&&(he.lastWrapHeight=oe.wrapperHeight,he.lastWrapWidth=oe.wrapperWidth,cs(ie,400)),he.updateLineNumbers=null,!0}function it(ie,oe){for(var he=oe.viewport,de=!0;;de=!1){if(!de||!ie.options.lineWrapping||oe.oldDisplayWidth==Cu(ie)){if(he&&he.top!=null&&(he={top:Math.min(ie.doc.height+Cc(ie.display)-Wc(ie),he.top)}),oe.visible=xs(ie.display,ie.doc,he),oe.visible.from>=ie.display.viewFrom&&oe.visible.to<=ie.display.viewTo)break}else de&&(oe.visible=xs(ie.display,ie.doc,he));if(!ze(ie,oe))break;_r(ie);var pe=dn(ie);Gl(ie),li(ie,pe),Le(ie,pe),oe.force=!1}oe.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(oe.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function vt(ie,oe){var he=new rs(ie,oe);if(ze(ie,he)){_r(ie),it(ie,he);var de=dn(ie);Gl(ie),li(ie,de),Le(ie,de),he.finish()}}function an(ie,oe,he){var de=ie.display,pe=ie.options.lineNumbers,Fe=de.lineDiv,Ve=Fe.firstChild;function rt(er){var Cr=er.nextSibling;return Je&&ue&&ie.display.currentWheelTarget==er?er.style.display="none":er.parentNode.removeChild(er),Cr}for(var $e=de.view,Pt=de.viewFrom,tn=0;tn<$e.length;tn++){var Ct=$e[tn];if(!Ct.hidden)if(!Ct.node||Ct.node.parentNode!=Fe){var bn=zu(ie,Ct,Pt,he);Fe.insertBefore(bn,Ve)}else{for(;Ve!=Ct.node;)Ve=rt(Ve);var Ln=pe&&oe!=null&&oe<=Pt&&Ct.lineNumber;Ct.changes&&(Ne(Ct.changes,"gutter")>-1&&(Ln=!1),Pu(ie,Ct,Pt,he)),Ln&&(ft(Ct.lineNumber),Ct.lineNumber.appendChild(document.createTextNode(Br(ie.options,Pt)))),Ve=Ct.node.nextSibling}Pt+=Ct.size}for(;Ve;)Ve=rt(Ve)}function Ce(ie){var oe=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=oe+"px"}function Le(ie,oe){ie.display.sizer.style.minHeight=oe.docHeight+"px",ie.display.heightForcer.style.top=oe.docHeight+"px",ie.display.gutters.style.height=oe.docHeight+ie.display.barHeight+Ol(ie)+"px"}function _e(ie){var oe=ie.display,he=oe.view;if(!(!oe.alignWidgets&&(!oe.gutters.firstChild||!ie.options.fixedGutter))){for(var de=mc(oe)-oe.scroller.scrollLeft+ie.doc.scrollLeft,pe=oe.gutters.offsetWidth,Fe=de+"px",Ve=0;VeVe.clientWidth,$e=Ve.scrollHeight>Ve.clientHeight;if(de&&rt||pe&&$e){if(pe&&ue&&Je){e:for(var Pt=oe.target,tn=Fe.view;Pt!=Ve;Pt=Pt.parentNode)for(var Ct=0;Ct=0&&or(ie,de.to())<=0)return he}return-1};var oi=function(ie,oe){this.anchor=ie,this.head=oe};oi.prototype.from=function(){return ur(this.anchor,this.head)},oi.prototype.to=function(){return aa(this.anchor,this.head)},oi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Li(ie,oe,he){var de=ie&&ie.options.selectionsMayTouch,pe=oe[he];oe.sort(function(bn,Ln){return or(bn.from(),Ln.from())}),he=Ne(oe,pe);for(var Fe=1;Fe0:$e>=0){var Pt=ur(rt.from(),Ve.from()),tn=aa(rt.to(),Ve.to()),Ct=rt.empty()?Ve.from()==Ve.head:rt.from()==rt.head;Fe<=he&&--he,oe.splice(--Fe,2,new oi(Ct?tn:Pt,Ct?Pt:tn))}}return new yi(oe,he)}function Ui(ie,oe){return new yi([new oi(ie,oe||ie)],0)}function sr(ie){return ie.text?Sn(ie.from.line+ie.text.length-1,on(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function to(ie,oe){if(or(ie,oe.from)<0)return ie;if(or(ie,oe.to)<=0)return sr(oe);var he=ie.line+oe.text.length-(oe.to.line-oe.from.line)-1,de=ie.ch;return ie.line==oe.to.line&&(de+=sr(oe).ch-oe.to.ch),Sn(he,de)}function br(ie,oe){for(var he=[],de=0;de1&&ie.remove(rt.line+1,er-1),ie.insert(rt.line+1,jo)}Mo(ie,"change",ie,oe)}function po(ie,oe,he){function de(pe,Fe,Ve){if(pe.linked)for(var rt=0;rt1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),on(ie.done)}function Da(ie,oe,he,de){var pe=ie.history;pe.undone.length=0;var Fe=+new Date,Ve,rt;if((pe.lastOp==de||pe.lastOrigin==oe.origin&&oe.origin&&(oe.origin.charAt(0)=="+"&&pe.lastModTime>Fe-(ie.cm?ie.cm.options.historyEventDelay:500)||oe.origin.charAt(0)=="*"))&&(Ve=ca(pe,pe.lastOp==de)))rt=on(Ve.changes),or(oe.from,oe.to)==0&&or(oe.from,rt.to)==0?rt.to=sr(oe):Ve.changes.push(Dr(ie,oe));else{var $e=on(pe.done);for((!$e||!$e.ranges)&&Jo(ie.sel,pe.done),Ve={changes:[Dr(ie,oe)],generation:pe.generation},pe.done.push(Ve);pe.done.length>pe.undoDepth;)pe.done.shift(),pe.done[0].ranges||pe.done.shift()}pe.done.push(he),pe.generation=++pe.maxGeneration,pe.lastModTime=pe.lastSelTime=Fe,pe.lastOp=pe.lastSelOp=de,pe.lastOrigin=pe.lastSelOrigin=oe.origin,rt||Yi(ie,"historyAdded")}function ga(ie,oe,he,de){var pe=oe.charAt(0);return pe=="*"||pe=="+"&&he.ranges.length==de.ranges.length&&he.somethingSelected()==de.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Jr(ie,oe,he,de){var pe=ie.history,Fe=de&&de.origin;he==pe.lastSelOp||Fe&&pe.lastSelOrigin==Fe&&(pe.lastModTime==pe.lastSelTime&&pe.lastOrigin==Fe||ga(ie,Fe,on(pe.done),oe))?pe.done[pe.done.length-1]=oe:Jo(oe,pe.done),pe.lastSelTime=+new Date,pe.lastSelOrigin=Fe,pe.lastSelOp=he,de&&de.clearRedo!==!1&&Co(pe.undone)}function Jo(ie,oe){var he=on(oe);he&&he.ranges&&he.equals(ie)||oe.push(ie)}function ua(ie,oe,he,de){var pe=oe["spans_"+ie.id],Fe=0;ie.iter(Math.max(ie.first,he),Math.min(ie.first+ie.size,de),function(Ve){Ve.markedSpans&&((pe||(pe=oe["spans_"+ie.id]={}))[Fe]=Ve.markedSpans),++Fe})}function Ea(ie){if(!ie)return null;for(var oe,he=0;he-1&&(on(rt)[Ct]=Pt[Ct],delete Pt[Ct])}}return de}function yo(ie,oe,he,de){if(de){var pe=ie.anchor;if(he){var Fe=or(oe,pe)<0;Fe!=or(he,pe)<0?(pe=oe,oe=he):Fe!=or(oe,he)<0&&(oe=he)}return new oi(pe,oe)}else return new oi(he||oe,oe)}function ea(ie,oe,he,de,pe){pe==null&&(pe=ie.cm&&(ie.cm.display.shift||ie.extend)),Mr(ie,new yi([yo(ie.sel.primary(),oe,he,pe)],0),de)}function Ka(ie,oe,he){for(var de=[],pe=ie.cm&&(ie.cm.display.shift||ie.extend),Fe=0;Fe=oe.ch:rt.to>oe.ch))){if(pe&&(Yi($e,"beforeCursorEnter"),$e.explicitlyCleared))if(Fe.markedSpans){--Ve;continue}else break;if(!$e.atomic)continue;if(he){var Ct=$e.find(de<0?1:-1),bn=void 0;if((de<0?tn:Pt)&&(Ct=dt(ie,Ct,-de,Ct&&Ct.line==oe.line?Fe:null)),Ct&&Ct.line==oe.line&&(bn=or(Ct,he))&&(de<0?bn<0:bn>0))return je(ie,Ct,oe,de,pe)}var Ln=$e.find(de<0?-1:1);return(de<0?Pt:tn)&&(Ln=dt(ie,Ln,de,Ln.line==oe.line?Fe:null)),Ln?je(ie,Ln,oe,de,pe):null}}return oe}function Ue(ie,oe,he,de,pe){var Fe=de||1,Ve=je(ie,oe,he,Fe,pe)||!pe&&je(ie,oe,he,Fe,!0)||je(ie,oe,he,-Fe,pe)||!pe&&je(ie,oe,he,-Fe,!0);return Ve||(ie.cantEdit=!0,Sn(ie.first,0))}function dt(ie,oe,he,de){return he<0&&oe.ch==0?oe.line>ie.first?io(ie,Sn(oe.line-1)):null:he>0&&oe.ch==(de||zn(ie,oe.line)).text.length?oe.line=0;--pe)Fn(ie,{from:de[pe].from,to:de[pe].to,text:pe?[""]:oe.text,origin:oe.origin});else Fn(ie,oe)}}function Fn(ie,oe){if(!(oe.text.length==1&&oe.text[0]==""&&or(oe.from,oe.to)==0)){var he=br(ie,oe);Da(ie,oe,he,ie.cm?ie.cm.curOp.id:NaN),Ci(ie,oe,he,us(ie,oe));var de=[];po(ie,function(pe,Fe){!Fe&&Ne(de,pe.history)==-1&&(ki(pe.history,oe),de.push(pe.history)),Ci(pe,oe,null,us(pe,oe))})}}function Kn(ie,oe,he){var de=ie.cm&&ie.cm.state.suppressEdits;if(!(de&&!he)){for(var pe=ie.history,Fe,Ve=ie.sel,rt=oe=="undo"?pe.done:pe.undone,$e=oe=="undo"?pe.undone:pe.done,Pt=0;Pt=0;--Ln){var er=bn(Ln);if(er)return er.v}}}}function En(ie,oe){if(oe!=0&&(ie.first+=oe,ie.sel=new yi(Si(ie.sel.ranges,function(pe){return new oi(Sn(pe.anchor.line+oe,pe.anchor.ch),Sn(pe.head.line+oe,pe.head.ch))}),ie.sel.primIndex),ie.cm)){ll(ie.cm,ie.first,ie.first-oe,oe);for(var he=ie.cm.display,de=he.viewFrom;deie.lastLine())){if(oe.from.lineFe&&(oe={from:oe.from,to:Sn(Fe,zn(ie,Fe).text.length),text:[oe.text[0]],origin:oe.origin}),oe.removed=xn(ie,oe.from,oe.to),he||(he=br(ie,oe)),ie.cm?Gi(ie.cm,oe,de):ao(ie,oe,de),Gr(ie,he,Zt),ie.cantEdit&&Ue(ie,Sn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function Gi(ie,oe,he){var de=ie.doc,pe=ie.display,Fe=oe.from,Ve=oe.to,rt=!1,$e=Fe.line;ie.options.lineWrapping||($e=$t(xi(zn(de,Fe.line))),de.iter($e,Ve.line+1,function(Ln){if(Ln==pe.maxLine)return rt=!0,!0})),de.sel.contains(oe.from,oe.to)>-1&&dr(ie),ao(de,oe,he,wl(ie)),ie.options.lineWrapping||(de.iter($e,Fe.line+oe.text.length,function(Ln){var er=ya(Ln);er>pe.maxLineLength&&(pe.maxLine=Ln,pe.maxLineLength=er,pe.maxLineChanged=!0,rt=!1)}),rt&&(ie.curOp.updateMaxLine=!0)),uo(de,Fe.line),cs(ie,400);var Pt=oe.text.length-(Ve.line-Fe.line)-1;oe.full?ll(ie):Fe.line==Ve.line&&oe.text.length==1&&!mr(ie.doc,oe)?fs(ie,Fe.line,"text"):ll(ie,Fe.line,Ve.line+1,Pt);var tn=kn(ie,"changes"),Ct=kn(ie,"change");if(Ct||tn){var bn={from:Fe,to:Ve,text:oe.text,removed:oe.removed,origin:oe.origin};Ct&&Mo(ie,"change",ie,bn),tn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(bn)}ie.display.selForContextMenu=null}function Pi(ie,oe,he,de,pe){var Fe;de||(de=he),or(de,he)<0&&(Fe=[de,he],he=Fe[0],de=Fe[1]),typeof oe=="string"&&(oe=ie.splitLines(oe)),rn(ie,{from:he,to:de,text:oe,origin:pe})}function Ai(ie,oe,he,de){he1||!(this.children[0]instanceof Gn))){var rt=[];this.collapse(rt),this.children=[new Gn(rt)],this.children[0].parent=this}},collapse:function(ie){for(var oe=0;oe50){for(var Ve=pe.lines.length%25+25,rt=Ve;rt10);ie.parent.maybeSpill()}},iterN:function(ie,oe,he){for(var de=0;deie.display.maxLineLength&&(ie.display.maxLine=Pt,ie.display.maxLineLength=tn,ie.display.maxLineChanged=!0)}de!=null&&ie&&this.collapsed&&ll(ie,de,pe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&ye(ie.doc)),ie&&Mo(ie,"markerCleared",ie,this,de,pe),oe&&Xi(ie),this.parent&&this.parent.clear()}},Et.prototype.find=function(ie,oe){ie==null&&this.type=="bookmark"&&(ie=1);for(var he,de,pe=0;pe0||Ve==0&&Fe.clearWhenEmpty!==!1)return Fe;if(Fe.replacedWith&&(Fe.collapsed=!0,Fe.widgetNode=jt("span",[Fe.replacedWith],"CodeMirror-widget"),de.handleMouseEvents||Fe.widgetNode.setAttribute("cm-ignore-events","true"),de.insertLeft&&(Fe.widgetNode.insertLeft=!0)),Fe.collapsed){if(Ji(ie,oe.line,oe,he,Fe)||oe.line!=he.line&&Ji(ie,he.line,oe,he,Fe))throw new Error("Inserting collapsed marker partially overlapping an existing one");Cn()}Fe.addToHistory&&Da(ie,{from:oe,to:he,origin:"markText"},ie.sel,NaN);var rt=oe.line,$e=ie.cm,Pt;if(ie.iter(rt,he.line+1,function(Ct){$e&&Fe.collapsed&&!$e.options.lineWrapping&&xi(Ct)==$e.display.maxLine&&(Pt=!0),Fe.collapsed&&rt!=oe.line&&ri(Ct,0),kl(Ct,new Po(Fe,rt==oe.line?oe.ch:null,rt==he.line?he.ch:null)),++rt}),Fe.collapsed&&ie.iter(oe.line,he.line+1,function(Ct){fn(ie,Ct)&&ri(Ct,0)}),Fe.clearOnEnter&&Qi(Fe,"beforeCursorEnter",function(){return Fe.clear()}),Fe.readOnly&&(ka(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Fe.collapsed&&(Fe.id=++ar,Fe.atomic=!0),$e){if(Pt&&($e.curOp.updateMaxLine=!0),Fe.collapsed)ll($e,oe.line,he.line+1);else if(Fe.className||Fe.startStyle||Fe.endStyle||Fe.css||Fe.attributes||Fe.title)for(var tn=oe.line;tn<=he.line;tn++)fs($e,tn,"text");Fe.atomic&&ye($e.doc),Mo($e,"markerAdded",$e,Fe)}return Fe}var Pr=function(ie,oe){this.markers=ie,this.primary=oe;for(var he=0;he=0;$e--)rn(this,de[$e]);rt?fo(this,rt):this.cm&&Dc(this.cm)}),undo:qo(function(){Kn(this,"undo")}),redo:qo(function(){Kn(this,"redo")}),undoSelection:qo(function(){Kn(this,"undo",!0)}),redoSelection:qo(function(){Kn(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,oe=0,he=0,de=0;de=ie.ch)&&oe.push(pe.marker.parent||pe.marker)}return oe},findMarks:function(ie,oe,he){ie=io(this,ie),oe=io(this,oe);var de=[],pe=ie.line;return this.iter(ie.line,oe.line+1,function(Fe){var Ve=Fe.markedSpans;if(Ve)for(var rt=0;rt=$e.to||$e.from==null&&pe!=ie.line||$e.from!=null&&pe==oe.line&&$e.from>=oe.ch)&&(!he||he($e.marker))&&de.push($e.marker.parent||$e.marker)}++pe}),de},getAllMarks:function(){var ie=[];return this.iter(function(oe){var he=oe.markedSpans;if(he)for(var de=0;deie)return oe=ie,!0;ie-=Fe,++he}),io(this,Sn(he,oe))},indexFromPos:function(ie){ie=io(this,ie);var oe=ie.ch;if(ie.lineoe&&(oe=ie.from),ie.to!=null&&ie.to-1){oe.state.draggingText(ie),setTimeout(function(){return oe.display.input.focus()},20);return}try{var tn=ie.dataTransfer.getData("Text");if(tn){var Ct;if(oe.state.draggingText&&!oe.state.draggingText.copy&&(Ct=oe.listSelections()),Gr(oe.doc,Ui(he,he)),Ct)for(var bn=0;bn=0;rt--)Pi(ie.doc,"",de[rt].from,de[rt].to,"+delete");Dc(ie)})}function Es(ie,oe,he){var de=jn(ie.text,oe+he,he);return de<0||de>ie.text.length?null:de}function Ma(ie,oe,he){var de=Es(ie,oe.ch,he);return de==null?null:new Sn(oe.line,de,he<0?"after":"before")}function Qa(ie,oe,he,de,pe){if(ie){oe.doc.direction=="rtl"&&(pe=-pe);var Fe=Vi(he,oe.doc.direction);if(Fe){var Ve=pe<0?on(Fe):Fe[0],rt=pe<0==(Ve.level==1),$e=rt?"after":"before",Pt;if(Ve.level>0||oe.doc.direction=="rtl"){var tn=Hu(oe,he);Pt=pe<0?he.text.length-1:0;var Ct=Iu(oe,tn,Pt).top;Pt=An(function(bn){return Iu(oe,tn,bn).top==Ct},pe<0==(Ve.level==1)?Ve.from:Ve.to-1,Pt),$e=="before"&&(Pt=Es(he,Pt,1))}else Pt=pe<0?Ve.to:Ve.from;return new Sn(de,Pt,$e)}}return new Sn(de,pe<0?he.text.length:0,pe<0?"before":"after")}function Ks(ie,oe,he,de){var pe=Vi(oe,ie.doc.direction);if(!pe)return Ma(oe,he,de);he.ch>=oe.text.length?(he.ch=oe.text.length,he.sticky="before"):he.ch<=0&&(he.ch=0,he.sticky="after");var Fe=mn(pe,he.ch,he.sticky),Ve=pe[Fe];if(ie.doc.direction=="ltr"&&Ve.level%2==0&&(de>0?Ve.to>he.ch:Ve.from=Ve.from&&bn>=tn.begin)){var Ln=Ct?"before":"after";return new Sn(he.line,bn,Ln)}}var er=function(jo,La,ta){for(var za=function(Xl,Xu){return Xu?new Sn(he.line,rt(Xl,1),"before"):new Sn(he.line,Xl,"after")};jo>=0&&jo0==(ps.level!=1),Gs=$o?ta.begin:rt(ta.end,-1);if(ps.from<=Gs&&Gs0?tn.end:rt(tn.begin,-1);return qr!=null&&!(de>0&&qr==oe.text.length)&&(Cr=er(de>0?0:pe.length-1,de,Pt(qr)),Cr)?Cr:null}var Xs={selectAll:Wt,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),Zt)},killLine:function(ie){return Ja(ie,function(oe){if(oe.empty()){var he=zn(ie.doc,oe.head.line).text.length;return oe.head.ch==he&&oe.head.line0)pe=new Sn(pe.line,pe.ch+1),ie.replaceRange(Fe.charAt(pe.ch-1)+Fe.charAt(pe.ch-2),Sn(pe.line,pe.ch-2),pe,"+transpose");else if(pe.line>ie.doc.first){var Ve=zn(ie.doc,pe.line-1).text;Ve&&(pe=new Sn(pe.line,1),ie.replaceRange(Fe.charAt(0)+ie.doc.lineSeparator()+Ve.charAt(Ve.length-1),Sn(pe.line-1,Ve.length-1),pe,"+transpose"))}}he.push(new oi(pe,pe))}ie.setSelections(he)})},newlineAndIndent:function(ie){return oo(ie,function(){for(var oe=ie.listSelections(),he=oe.length-1;he>=0;he--)ie.replaceRange(ie.doc.lineSeparator(),oe[he].anchor,oe[he].head,"+input");oe=ie.listSelections();for(var de=0;deie&&or(oe,this.pos)==0&&he==this.button};var bl,ul;function Nu(ie,oe){var he=+new Date;return ul&&ul.compare(he,ie,oe)?(bl=ul=null,"triple"):bl&&bl.compare(he,ie,oe)?(ul=new Ps(he,ie,oe),bl=null,"double"):(bl=new Ps(he,ie,oe),ul=null,"single")}function Nl(ie){var oe=this,he=oe.display;if(!(hr(oe,ie)||he.activeTouch&&he.input.supportsTouch())){if(he.input.ensurePolled(),he.shift=ie.shiftKey,Il(he,ie)){Je||(he.scroller.draggable=!1,setTimeout(function(){return he.scroller.draggable=!0},100));return}if(!Jh(oe,ie)){var de=mu(oe,ie),pe=Wa(ie),Fe=de?Nu(de,pe):"single";window.focus(),pe==1&&oe.state.selectingText&&oe.state.selectingText(ie),!(de&&bu(oe,pe,de,Fe,ie))&&(pe==1?de?rl(oe,de,Fe,ie):sa(ie)==he.scroller&&ra(ie):pe==2?(de&&ea(oe.doc,de),setTimeout(function(){return he.input.focus()},20)):pe==3&&(Pe?oe.display.input.onContextMenu(ie):Pl(oe)))}}}function bu(ie,oe,he,de,pe){var Fe="Click";return de=="double"?Fe="Double"+Fe:de=="triple"&&(Fe="Triple"+Fe),Fe=(oe==1?"Left":oe==2?"Middle":"Right")+Fe,Za(ie,Pa(Fe,pe),pe,function(Ve){if(typeof Ve=="string"&&(Ve=Xs[Ve]),!Ve)return!1;var rt=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),rt=Ve(ie,he)!=ai}finally{ie.state.suppressEdits=!1}return rt})}function is(ie,oe,he){var de=ie.getOption("configureMouse"),pe=de?de(ie,oe,he):{};if(pe.unit==null){var Fe=se?he.shiftKey&&he.metaKey:he.altKey;pe.unit=Fe?"rectangle":oe=="single"?"char":oe=="double"?"word":"line"}return(pe.extend==null||ie.doc.extend)&&(pe.extend=ie.doc.extend||he.shiftKey),pe.addNew==null&&(pe.addNew=ue?he.metaKey:he.ctrlKey),pe.moveOnDrag==null&&(pe.moveOnDrag=!(ue?he.altKey:he.ctrlKey)),pe}function rl(ie,oe,he,de){Nt?setTimeout(sn(Zs,ie),0):ie.curOp.focus=Bt();var pe=is(ie,he,de),Fe=ie.doc.sel,Ve;ie.options.dragDrop&&ma&&!ie.isReadOnly()&&he=="single"&&(Ve=Fe.contains(oe))>-1&&(or((Ve=Fe.ranges[Ve]).from(),oe)<0||oe.xRel>0)&&(or(Ve.to(),oe)>0||oe.xRel<0)?Zl(ie,de,oe,pe):uh(ie,de,oe,pe)}function Zl(ie,oe,he,de){var pe=ie.display,Fe=!1,Ve=oa(ie,function(Pt){Je&&(pe.scroller.draggable=!1),ie.state.draggingText=!1,$r(pe.wrapper.ownerDocument,"mouseup",Ve),$r(pe.wrapper.ownerDocument,"mousemove",rt),$r(pe.scroller,"dragstart",$e),$r(pe.scroller,"drop",Ve),Fe||(ra(Pt),de.addNew||ea(ie.doc,he,null,null,de.extend),Je&&!Vt||Nt&&Re==9?setTimeout(function(){pe.wrapper.ownerDocument.body.focus({preventScroll:!0}),pe.input.focus()},20):pe.input.focus())}),rt=function(Pt){Fe=Fe||Math.abs(oe.clientX-Pt.clientX)+Math.abs(oe.clientY-Pt.clientY)>=10},$e=function(){return Fe=!0};Je&&(pe.scroller.draggable=!0),ie.state.draggingText=Ve,Ve.copy=!de.moveOnDrag,pe.scroller.dragDrop&&pe.scroller.dragDrop(),Qi(pe.wrapper.ownerDocument,"mouseup",Ve),Qi(pe.wrapper.ownerDocument,"mousemove",rt),Qi(pe.scroller,"dragstart",$e),Qi(pe.scroller,"drop",Ve),Pl(ie),setTimeout(function(){return pe.input.focus()},20)}function Du(ie,oe,he){if(he=="char")return new oi(oe,oe);if(he=="word")return ie.findWordAt(oe);if(he=="line")return new oi(Sn(oe.line,0),io(ie.doc,Sn(oe.line+1,0)));var de=he(ie,oe);return new oi(de.from,de.to)}function uh(ie,oe,he,de){var pe=ie.display,Fe=ie.doc;ra(oe);var Ve,rt,$e=Fe.sel,Pt=$e.ranges;if(de.addNew&&!de.extend?(rt=Fe.sel.contains(he),rt>-1?Ve=Pt[rt]:Ve=new oi(he,he)):(Ve=Fe.sel.primary(),rt=Fe.sel.primIndex),de.unit=="rectangle")de.addNew||(Ve=new oi(he,he)),he=mu(ie,oe,!0,!0),rt=-1;else{var tn=Du(ie,he,de.unit);de.extend?Ve=yo(Ve,tn.anchor,tn.head,de.extend):Ve=tn}de.addNew?rt==-1?(rt=Pt.length,Mr(Fe,Li(ie,Pt.concat([Ve]),rt),{scroll:!1,origin:"*mouse"})):Pt.length>1&&Pt[rt].empty()&&de.unit=="char"&&!de.extend?(Mr(Fe,Li(ie,Pt.slice(0,rt).concat(Pt.slice(rt+1)),0),{scroll:!1,origin:"*mouse"}),$e=Fe.sel):Vo(Fe,rt,Ve,ci):(rt=0,Mr(Fe,new yi([Ve],0),ci),$e=Fe.sel);var Ct=he;function bn(ta){if(or(Ct,ta)!=0)if(Ct=ta,de.unit=="rectangle"){for(var za=[],ps=ie.options.tabSize,$o=lt(zn(Fe,he.line).text,he.ch,ps),Gs=lt(zn(Fe,ta.line).text,ta.ch,ps),Xl=Math.min($o,Gs),Xu=Math.max($o,Gs),uu=Math.min(he.line,ta.line),Kc=Math.min(ie.lastLine(),Math.max(he.line,ta.line));uu<=Kc;uu++){var bc=zn(Fe,uu).text,Ku=Mi(bc,Xl,ps);Xl==Xu?za.push(new oi(Sn(uu,Ku),Sn(uu,Ku))):bc.length>Ku&&za.push(new oi(Sn(uu,Ku),Sn(uu,Mi(bc,Xu,ps))))}za.length||za.push(new oi(he,he)),Mr(Fe,Li(ie,$e.ranges.slice(0,rt).concat(za),rt),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(ta)}else{var Qc=Ve,vc=Du(ie,ta,de.unit),Gu=Qc.anchor,Sl;or(vc.anchor,Gu)>0?(Sl=vc.head,Gu=ur(Qc.from(),vc.anchor)):(Sl=vc.anchor,Gu=aa(Qc.to(),vc.head));var Su=$e.ranges.slice(0);Su[rt]=Zh(ie,new oi(io(Fe,Gu),Sl)),Mr(Fe,Li(ie,Su,rt),ci)}}var Ln=pe.wrapper.getBoundingClientRect(),er=0;function Cr(ta){var za=++er,ps=mu(ie,ta,!0,de.unit=="rectangle");if(ps)if(or(ps,Ct)!=0){ie.curOp.focus=Bt(),bn(ps);var $o=xs(pe,Fe);(ps.line>=$o.to||ps.line<$o.from)&&setTimeout(oa(ie,function(){er==za&&Cr(ta)}),150)}else{var Gs=ta.clientYLn.bottom?20:0;Gs&&setTimeout(oa(ie,function(){er==za&&(pe.scroller.scrollTop+=Gs,Cr(ta))}),50)}}function qr(ta){ie.state.selectingText=!1,er=1/0,ta&&(ra(ta),pe.input.focus()),$r(pe.wrapper.ownerDocument,"mousemove",jo),$r(pe.wrapper.ownerDocument,"mouseup",La),Fe.history.lastSelOrigin=null}var jo=oa(ie,function(ta){ta.buttons===0||!Wa(ta)?qr(ta):Cr(ta)}),La=oa(ie,qr);ie.state.selectingText=La,Qi(pe.wrapper.ownerDocument,"mousemove",jo),Qi(pe.wrapper.ownerDocument,"mouseup",La)}function Zh(ie,oe){var he=oe.anchor,de=oe.head,pe=zn(ie.doc,he.line);if(or(he,de)==0&&he.sticky==de.sticky)return oe;var Fe=Vi(pe);if(!Fe)return oe;var Ve=mn(Fe,he.ch,he.sticky),rt=Fe[Ve];if(rt.from!=he.ch&&rt.to!=he.ch)return oe;var $e=Ve+(rt.from==he.ch==(rt.level!=1)?0:1);if($e==0||$e==Fe.length)return oe;var Pt;if(de.line!=he.line)Pt=(de.line-he.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var tn=mn(Fe,de.ch,de.sticky),Ct=tn-Ve||(de.ch-he.ch)*(rt.level==1?-1:1);tn==$e-1||tn==$e?Pt=Ct<0:Pt=Ct>0}var bn=Fe[$e+(Pt?-1:0)],Ln=Pt==(bn.level==1),er=Ln?bn.from:bn.to,Cr=Ln?"after":"before";return he.ch==er&&he.sticky==Cr?oe:new oi(new Sn(he.line,er,Cr),de)}function Xh(ie,oe,he,de){var pe,Fe;if(oe.touches)pe=oe.touches[0].clientX,Fe=oe.touches[0].clientY;else try{pe=oe.clientX,Fe=oe.clientY}catch(bn){return!1}if(pe>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;de&&ra(oe);var Ve=ie.display,rt=Ve.lineDiv.getBoundingClientRect();if(Fe>rt.bottom||!kn(ie,he))return Kr(oe);Fe-=rt.top-Ve.viewOffset;for(var $e=0;$e=pe){var tn=_i(ie.doc,Fe),Ct=ie.display.gutterSpecs[$e];return Yi(ie,he,ie,tn,Ct.className,oe),Kr(oe)}}}function Jh(ie,oe){return Xh(ie,oe,"gutterClick",!0)}function Ld(ie,oe){Il(ie.display,oe)||_f(ie,oe)||hr(ie,oe,"contextmenu")||Pe||ie.display.input.onContextMenu(oe)}function _f(ie,oe){return kn(ie,"gutterContextMenu")?Xh(ie,oe,"gutterContextMenu",!1):!1}function Gd(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ec(ie)}var wh={toString:function(){return"CodeMirror.Init"}},Ud={},kd={};function yf(ie){var oe=ie.optionHandlers;function he(de,pe,Fe,Ve){ie.defaults[de]=pe,Fe&&(oe[de]=Ve?function(rt,$e,Pt){Pt!=wh&&Fe(rt,$e,Pt)}:Fe)}ie.defineOption=he,ie.Init=wh,he("value","",function(de,pe){return de.setValue(pe)},!0),he("mode",null,function(de,pe){de.doc.modeOption=pe,bi(de)},!0),he("indentUnit",2,bi,!0),he("indentWithTabs",!1),he("smartIndent",!0),he("tabSize",4,function(de){Xr(de),Ec(de),ll(de)},!0),he("lineSeparator",null,function(de,pe){if(de.doc.lineSep=pe,!!pe){var Fe=[],Ve=de.doc.first;de.doc.iter(function($e){for(var Pt=0;;){var tn=$e.text.indexOf(pe,Pt);if(tn==-1)break;Pt=tn+pe.length,Fe.push(Sn(Ve,tn))}Ve++});for(var rt=Fe.length-1;rt>=0;rt--)Pi(de.doc,pe,Fe[rt],Sn(Fe[rt].line,Fe[rt].ch+pe.length))}}),he("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(de,pe,Fe){de.state.specialChars=new RegExp(pe.source+(pe.test(" ")?"":"| "),"g"),Fe!=wh&&de.refresh()}),he("specialCharPlaceholder",nl,function(de){return de.refresh()},!0),he("electricChars",!0),he("inputStyle",te?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),he("spellcheck",!1,function(de,pe){return de.getInputField().spellcheck=pe},!0),he("autocorrect",!1,function(de,pe){return de.getInputField().autocorrect=pe},!0),he("autocapitalize",!1,function(de,pe){return de.getInputField().autocapitalize=pe},!0),he("rtlMoveVisually",!ge),he("wholeLineUpdateBefore",!0),he("theme","default",function(de){Gd(de),nn(de)},!0),he("keyMap","default",function(de,pe,Fe){var Ve=Fa(pe),rt=Fe!=wh&&Fa(Fe);rt&&rt.detach&&rt.detach(de,Ve),Ve.attach&&Ve.attach(de,rt||null)}),he("extraKeys",null),he("configureMouse",null),he("lineWrapping",!1,Yd,!0),he("gutters",[],function(de,pe){de.display.gutterSpecs=kt(pe,de.options.lineNumbers),nn(de)},!0),he("fixedGutter",!0,function(de,pe){de.display.gutters.style.left=pe?mc(de.display)+"px":"0",de.refresh()},!0),he("coverGutterNextToScrollbar",!1,function(de){return li(de)},!0),he("scrollbarStyle","native",function(de){gr(de),li(de),de.display.scrollbars.setScrollTop(de.doc.scrollTop),de.display.scrollbars.setScrollLeft(de.doc.scrollLeft)},!0),he("lineNumbers",!1,function(de,pe){de.display.gutterSpecs=kt(de.options.gutters,pe),nn(de)},!0),he("firstLineNumber",1,nn,!0),he("lineNumberFormatter",function(de){return de},nn,!0),he("showCursorWhenSelecting",!1,Gl,!0),he("resetSelectionOnContextMenu",!0),he("lineWiseCopyCut",!0),he("pasteLinesPerSelection",!0),he("selectionsMayTouch",!1),he("readOnly",!1,function(de,pe){pe=="nocursor"&&(_c(de),de.display.input.blur()),de.display.input.readOnlyChanged(pe)}),he("screenReaderLabel",null,function(de,pe){pe=pe===""?null:pe,de.display.input.screenReaderLabelChanged(pe)}),he("disableInput",!1,function(de,pe){pe||de.display.input.reset()},!0),he("dragDrop",!0,ch),he("allowDropFileTypes",null),he("cursorBlinkRate",530),he("cursorScrollMargin",0),he("cursorHeight",1,Gl,!0),he("singleCursorHeightPerLine",!0,Gl,!0),he("workTime",100),he("workDelay",100),he("flattenSpans",!0,Xr,!0),he("addModeClass",!1,Xr,!0),he("pollInterval",100),he("undoDepth",200,function(de,pe){return de.doc.history.undoDepth=pe}),he("historyEventDelay",1250),he("viewportMargin",10,function(de){return de.refresh()},!0),he("maxHighlightLength",1e4,Xr,!0),he("moveInputWithCursor",!0,function(de,pe){pe||de.display.input.resetPosition()}),he("tabindex",null,function(de,pe){return de.display.input.getField().tabIndex=pe||""}),he("autofocus",null),he("direction","ltr",function(de,pe){return de.doc.setDirection(pe)},!0),he("phrases",null)}function ch(ie,oe,he){var de=he&&he!=wh;if(!oe!=!de){var pe=ie.display.dragFunctions,Fe=oe?Qi:$r;Fe(ie.display.scroller,"dragstart",pe.start),Fe(ie.display.scroller,"dragenter",pe.enter),Fe(ie.display.scroller,"dragover",pe.over),Fe(ie.display.scroller,"dragleave",pe.leave),Fe(ie.display.scroller,"drop",pe.drop)}}function Yd(ie){ie.options.lineWrapping?(Ht(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(nt(ie.display.wrapper,"CodeMirror-wrap"),fa(ie)),Ca(ie),ll(ie),Ec(ie),setTimeout(function(){return li(ie)},100)}function zs(ie,oe){var he=this;if(!(this instanceof zs))return new zs(ie,oe);this.options=oe=oe?Nn(oe):{},Nn(Ud,oe,!1);var de=oe.value;typeof de=="string"?de=new Hi(de,oe.mode,null,oe.lineSeparator,oe.direction):oe.mode&&(de.modeOption=oe.mode),this.doc=de;var pe=new zs.inputStyles[oe.inputStyle](this),Fe=this.display=new Bn(ie,de,pe,oe);Fe.wrapper.CodeMirror=this,Gd(this),oe.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),gr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Ge,keySeq:null,specialChars:null},oe.autofocus&&!te&&Fe.input.focus(),Nt&&Re<11&&setTimeout(function(){return he.display.input.reset(!0)},20),ld(this),Vr(),ir(this),this.curOp.forceUpdate=!0,Ar(this,de),oe.autofocus&&!te||this.hasFocus()?setTimeout(function(){he.hasFocus()&&!he.state.focused&&js(he)},20):_c(this);for(var Ve in kd)kd.hasOwnProperty(Ve)&&kd[Ve](this,oe[Ve],wh);Ye(this),oe.finishInit&&oe.finishInit(this);for(var rt=0;rt20*20}Qi(oe.scroller,"touchstart",function($e){if(!hr(ie,$e)&&!Fe($e)&&!Jh(ie,$e)){oe.input.ensurePolled(),clearTimeout(he);var Pt=+new Date;oe.activeTouch={start:Pt,moved:!1,prev:Pt-de.end<=300?de:null},$e.touches.length==1&&(oe.activeTouch.left=$e.touches[0].pageX,oe.activeTouch.top=$e.touches[0].pageY)}}),Qi(oe.scroller,"touchmove",function(){oe.activeTouch&&(oe.activeTouch.moved=!0)}),Qi(oe.scroller,"touchend",function($e){var Pt=oe.activeTouch;if(Pt&&!Il(oe,$e)&&Pt.left!=null&&!Pt.moved&&new Date-Pt.start<300){var tn=ie.coordsChar(oe.activeTouch,"page"),Ct;!Pt.prev||Ve(Pt,Pt.prev)?Ct=new oi(tn,tn):!Pt.prev.prev||Ve(Pt,Pt.prev.prev)?Ct=ie.findWordAt(tn):Ct=new oi(Sn(tn.line,0),io(ie.doc,Sn(tn.line+1,0))),ie.setSelection(Ct.anchor,Ct.head),ie.focus(),ra($e)}pe()}),Qi(oe.scroller,"touchcancel",pe),Qi(oe.scroller,"scroll",function(){oe.scroller.clientHeight&&(Lt(ie,oe.scroller.scrollTop),It(ie,oe.scroller.scrollLeft,!0),Yi(ie,"scroll",ie))}),Qi(oe.scroller,"mousewheel",function($e){return Wi(ie,$e)}),Qi(oe.scroller,"DOMMouseScroll",function($e){return Wi(ie,$e)}),Qi(oe.wrapper,"scroll",function(){return oe.wrapper.scrollTop=oe.wrapper.scrollLeft=0}),oe.dragFunctions={enter:function($e){hr(ie,$e)||ia($e)},over:function($e){hr(ie,$e)||(Qr(ie,$e),ia($e))},start:function($e){return vr(ie,$e)},drop:oa(ie,Eo),leave:function($e){hr(ie,$e)||xr(ie)}};var rt=oe.input.getField();Qi(rt,"keyup",function($e){return Wo.call(ie,$e)}),Qi(rt,"keydown",oa(ie,Uo)),Qi(rt,"keypress",oa(ie,os)),Qi(rt,"focus",function($e){return js(ie,$e)}),Qi(rt,"blur",function($e){return _c(ie,$e)})}var Bh=[];zs.defineInitHook=function(ie){return Bh.push(ie)};function Au(ie,oe,he,de){var pe=ie.doc,Fe;he==null&&(he="add"),he=="smart"&&(pe.mode.indent?Fe=Ns(ie,oe).state:he="prev");var Ve=ie.options.tabSize,rt=zn(pe,oe),$e=lt(rt.text,null,Ve);rt.stateAfter&&(rt.stateAfter=null);var Pt=rt.text.match(/^\s*/)[0],tn;if(!de&&!/\S/.test(rt.text))tn=0,he="not";else if(he=="smart"&&(tn=pe.mode.indent(Fe,rt.text.slice(Pt.length),rt.text),tn==ai||tn>150)){if(!de)return;he="prev"}he=="prev"?oe>pe.first?tn=lt(zn(pe,oe-1).text,null,Ve):tn=0:he=="add"?tn=$e+ie.options.indentUnit:he=="subtract"?tn=$e-ie.options.indentUnit:typeof he=="number"&&(tn=$e+he),tn=Math.max(0,tn);var Ct="",bn=0;if(ie.options.indentWithTabs)for(var Ln=Math.floor(tn/Ve);Ln;--Ln)bn+=Ve,Ct+=" ";if(bnVe,$e=ti(oe),Pt=null;if(rt&&de.ranges.length>1)if(Vu&&Vu.text.join(` `)==oe){if(de.ranges.length%Vu.text.length==0){Pt=[];for(var tn=0;tn=0;bn--){var Ln=de.ranges[bn],er=Ln.from(),Cr=Ln.to();Ln.empty()&&(he&&he>0?er=Sn(er.line,er.ch-he):ie.state.overwrite&&!rt?Cr=Sn(Cr.line,Math.min(zn(Fe,Cr.line).text.length,Cr.ch+on($e).length)):rt&&Vu&&Vu.lineWise&&Vu.text.join(` `)==$e.join(` `)&&(er=Cr=Sn(er.line,0)));var qr={from:er,to:Cr,text:Pt?Pt[bn%Pt.length]:$e,origin:pe||(rt?"paste":ie.state.cutIncoming>Ve?"cut":"+input")};rn(ie.doc,qr),Mo(ie,"inputRead",ie,qr)}oe&&!rt&&ud(ie,oe),Dc(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Ct),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Ph(ie,oe){var he=ie.clipboardData&&ie.clipboardData.getData("Text");if(he)return ie.preventDefault(),!oe.isReadOnly()&&!oe.options.disableInput&&oo(oe,function(){return qh(oe,he,0,null,"paste")}),!0}function ud(ie,oe){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var he=ie.doc.sel,de=he.ranges.length-1;de>=0;de--){var pe=he.ranges[de];if(!(pe.head.ch>100||de&&he.ranges[de-1].head.line==pe.head.line)){var Fe=ie.getModeAt(pe.head),Ve=!1;if(Fe.electricChars){for(var rt=0;rt-1){Ve=Au(ie,pe.head.line,"smart");break}}else Fe.electricInput&&Fe.electricInput.test(zn(ie.doc,pe.head.line).text.slice(0,pe.head.ch))&&(Ve=Au(ie,pe.head.line,"smart"));Ve&&Mo(ie,"electricInput",ie,pe.head.line)}}}function cd(ie){for(var oe=[],he=[],de=0;deFe&&(Au(this,rt.head.line,de,!0),Fe=rt.head.line,Ve==this.doc.sel.primIndex&&Dc(this));else{var $e=rt.from(),Pt=rt.to(),tn=Math.max(Fe,$e.line);Fe=Math.min(this.lastLine(),Pt.line-(Pt.ch?0:1))+1;for(var Ct=tn;Ct0&&Vo(this.doc,Ve,new oi($e,bn[Ve].to()),Zt)}}}),getTokenAt:function(de,pe){return ms(this,de,pe)},getLineTokens:function(de,pe){return ms(this,Sn(de),pe,!0)},getTokenTypeAt:function(de){de=io(this.doc,de);var pe=el(this,zn(this.doc,de.line)),Fe=0,Ve=(pe.length-1)/2,rt=de.ch,$e;if(rt==0)$e=pe[2];else for(;;){var Pt=Fe+Ve>>1;if((Pt?pe[Pt*2-1]:0)>=rt)Ve=Pt;else if(pe[Pt*2+1]$e&&(de=$e,Ve=!0),rt=zn(this.doc,de)}else rt=de;return Ts(this,rt,{top:0,left:0},pe||"page",Fe||Ve).top+(Ve?this.doc.height-so(rt):0)},defaultTextHeight:function(){return pu(this.display)},defaultCharWidth:function(){return Eu(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(de,pe,Fe,Ve,rt){var $e=this.display;de=Vs(this,io(this.doc,de));var Pt=de.bottom,tn=de.left;if(pe.style.position="absolute",pe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pe),$e.sizer.appendChild(pe),Ve=="over")Pt=de.top;else if(Ve=="above"||Ve=="near"){var Ct=Math.max($e.wrapper.clientHeight,this.doc.height),bn=Math.max($e.sizer.clientWidth,$e.lineSpace.clientWidth);(Ve=="above"||de.bottom+pe.offsetHeight>Ct)&&de.top>pe.offsetHeight?Pt=de.top-pe.offsetHeight:de.bottom+pe.offsetHeight<=Ct&&(Pt=de.bottom),tn+pe.offsetWidth>bn&&(tn=bn-pe.offsetWidth)}pe.style.top=Pt+"px",pe.style.left=pe.style.right="",rt=="right"?(tn=$e.sizer.clientWidth-pe.offsetWidth,pe.style.right="0px"):(rt=="left"?tn=0:rt=="middle"&&(tn=($e.sizer.clientWidth-pe.offsetWidth)/2),pe.style.left=tn+"px"),Fe&&xh(this,{left:tn,top:Pt,right:tn+pe.offsetWidth,bottom:Pt+pe.offsetHeight})},triggerOnKeyDown:_a(Uo),triggerOnKeyPress:_a(os),triggerOnKeyUp:Wo,triggerOnMouseDown:_a(Nl),execCommand:function(de){if(Xs.hasOwnProperty(de))return Xs[de].call(null,this)},triggerElectric:_a(function(de){ud(this,de)}),findPosH:function(de,pe,Fe,Ve){var rt=1;pe<0&&(rt=-1,pe=-pe);for(var $e=io(this.doc,de),Pt=0;Pt0&&tn(Fe.charAt(Ve-1));)--Ve;for(;rt.5||this.options.lineWrapping)&&Ca(this),Yi(this,"refresh",this)}),swapDoc:_a(function(de){var pe=this.doc;return pe.cm=null,this.state.selectingText&&this.state.selectingText(),Ar(this,de),Ec(this),this.display.input.reset(),Zu(this,de.scrollLeft,de.scrollTop),this.curOp.forceScroll=!0,Mo(this,"swapDoc",this,pe),pe}),phrase:function(de){var pe=this.options.phrases;return pe&&Object.prototype.hasOwnProperty.call(pe,de)?pe[de]:de},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ii(ie),ie.registerHelper=function(de,pe,Fe){he.hasOwnProperty(de)||(he[de]=ie[de]={_global:[]}),he[de][pe]=Fe},ie.registerGlobalHelper=function(de,pe,Fe,Ve){ie.registerHelper(de,pe,Ve),he[de]._global.push({pred:Fe,val:Ve})}}function $h(ie,oe,he,de,pe){var Fe=oe,Ve=he,rt=zn(ie,oe.line),$e=pe&&ie.direction=="rtl"?-he:he;function Pt(){var La=oe.line+$e;return La=ie.first+ie.size?!1:(oe=new Sn(La,oe.ch,oe.sticky),rt=zn(ie,La))}function tn(La){var ta;if(de=="codepoint"){var za=rt.text.charCodeAt(oe.ch+(de>0?0:-1));isNaN(za)?ta=null:ta=new Sn(oe.line,Math.max(0,Math.min(rt.text.length,oe.ch+he*(za>=55296&&za<56320?2:1))),-he)}else pe?ta=Ks(ie.cm,rt,oe,he):ta=Ma(rt,oe,he);if(ta==null)if(!La&&Pt())oe=Qa(pe,ie.cm,rt,oe.line,$e);else return!1;else oe=ta;return!0}if(de=="char"||de=="codepoint")tn();else if(de=="column")tn(!0);else if(de=="word"||de=="group")for(var Ct=null,bn=de=="group",Ln=ie.cm&&ie.cm.getHelper(oe,"wordChars"),er=!0;!(he<0&&!tn(!er));er=!1){var Cr=rt.text.charAt(oe.ch)||` `,qr=et(Cr,Ln)?"w":bn&&Cr==` `?"n":!bn||/\s/.test(Cr)?null:"p";if(bn&&!er&&!qr&&(qr="s"),Ct&&Ct!=qr){he<0&&(he=1,tn(),oe.sticky="after");break}if(qr&&(Ct=qr),he>0&&!tn(!er))break}var jo=Ue(ie,oe,Fe,Ve,!0);return Xo(Fe,jo)&&(jo.hitSide=!0),jo}function Ih(ie,oe,he,de){var pe=ie.doc,Fe=oe.left,Ve;if(de=="page"){var rt=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),$e=Math.max(rt-.5*pu(ie.display),3);Ve=(he>0?oe.bottom:oe.top)+he*$e}else de=="line"&&(Ve=he>0?oe.bottom+3:oe.top-3);for(var Pt;Pt=Ru(ie,Fe,Ve),!!Pt.outside;){if(he<0?Ve<=0:Ve>=pe.height){Pt.hitSide=!0;break}Ve+=he*5}return Pt}var Al=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ge,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Al.prototype.init=function(ie){var oe=this,he=this,de=he.cm,pe=he.div=ie.lineDiv;Fd(pe,de.options.spellcheck,de.options.autocorrect,de.options.autocapitalize);function Fe(rt){for(var $e=rt.target;$e;$e=$e.parentNode){if($e==pe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test($e.className))break}return!1}Qi(pe,"paste",function(rt){!Fe(rt)||hr(de,rt)||Ph(rt,de)||Re<=11&&setTimeout(oa(de,function(){return oe.updateFromDOM()}),20)}),Qi(pe,"compositionstart",function(rt){oe.composing={data:rt.data,done:!1}}),Qi(pe,"compositionupdate",function(rt){oe.composing||(oe.composing={data:rt.data,done:!1})}),Qi(pe,"compositionend",function(rt){oe.composing&&(rt.data!=oe.composing.data&&oe.readFromDOMSoon(),oe.composing.done=!0)}),Qi(pe,"touchstart",function(){return he.forceCompositionEnd()}),Qi(pe,"input",function(){oe.composing||oe.readFromDOMSoon()});function Ve(rt){if(!(!Fe(rt)||hr(de,rt))){if(de.somethingSelected())Qh({lineWise:!1,text:de.getSelections()}),rt.type=="cut"&&de.replaceSelection("",null,"cut");else if(de.options.lineWiseCopyCut){var $e=cd(de);Qh({lineWise:!0,text:$e.text}),rt.type=="cut"&&de.operation(function(){de.setSelections($e.ranges,0,Zt),de.replaceSelection("",null,"cut")})}else return;if(rt.clipboardData){rt.clipboardData.clearData();var Pt=Vu.text.join(` `);if(rt.clipboardData.setData("Text",Pt),rt.clipboardData.getData("Text")==Pt){rt.preventDefault();return}}var tn=Zd(),Ct=tn.firstChild;de.display.lineSpace.insertBefore(tn,de.display.lineSpace.firstChild),Ct.value=Vu.text.join(` `);var bn=document.activeElement;qn(Ct),setTimeout(function(){de.display.lineSpace.removeChild(tn),bn.focus(),bn==pe&&he.showPrimarySelection()},50)}}Qi(pe,"copy",Ve),Qi(pe,"cut",Ve)},Al.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Al.prototype.prepareSelection=function(){var ie=tc(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Al.prototype.showSelection=function(ie,oe){!ie||!this.cm.display.view.length||((ie.focus||oe)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Al.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Al.prototype.showPrimarySelection=function(){var ie=this.getSelection(),oe=this.cm,he=oe.doc.sel.primary(),de=he.from(),pe=he.to();if(oe.display.viewTo==oe.display.viewFrom||de.line>=oe.display.viewTo||pe.line=oe.display.viewFrom&&Xd(oe,de)||{node:rt[0].measure.map[2],offset:0},Pt=pe.lineie.firstLine()&&(de=Sn(de.line-1,zn(ie.doc,de.line-1).length)),pe.ch==zn(ie.doc,pe.line).text.length&&pe.lineoe.viewTo-1)return!1;var Fe,Ve,rt;de.line==oe.viewFrom||(Fe=au(ie,de.line))==0?(Ve=$t(oe.view[0].line),rt=oe.view[0].node):(Ve=$t(oe.view[Fe].line),rt=oe.view[Fe-1].node.nextSibling);var $e=au(ie,pe.line),Pt,tn;if($e==oe.view.length-1?(Pt=oe.viewTo-1,tn=oe.lineDiv.lastChild):(Pt=$t(oe.view[$e+1].line)-1,tn=oe.view[$e+1].node.previousSibling),!rt)return!1;for(var Ct=ie.doc.splitLines(dd(ie,rt,tn,Ve,Pt)),bn=xn(ie.doc,Sn(Ve,0),Sn(Pt,zn(ie.doc,Pt).text.length));Ct.length>1&&bn.length>1;)if(on(Ct)==on(bn))Ct.pop(),bn.pop(),Pt--;else if(Ct[0]==bn[0])Ct.shift(),bn.shift(),Ve++;else break;for(var Ln=0,er=0,Cr=Ct[0],qr=bn[0],jo=Math.min(Cr.length,qr.length);Lnde.ch&&La.charCodeAt(La.length-er-1)==ta.charCodeAt(ta.length-er-1);)Ln--,er++;Ct[Ct.length-1]=La.slice(0,La.length-er).replace(/^\u200b+/,""),Ct[0]=Ct[0].slice(Ln).replace(/\u200b+$/,"");var ps=Sn(Ve,Ln),$o=Sn(Pt,bn.length?on(bn).length-er:0);if(Ct.length>1||Ct[0]||or(ps,$o))return Pi(ie.doc,Ct,ps,$o,"+input"),!0},Al.prototype.ensurePolled=function(){this.forceCompositionEnd()},Al.prototype.reset=function(){this.forceCompositionEnd()},Al.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Al.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},Al.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&oo(this.cm,function(){return ll(ie.cm)})},Al.prototype.setUneditable=function(ie){ie.contentEditable="false"},Al.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||oa(this.cm,qh)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Al.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Al.prototype.onContextMenu=function(){},Al.prototype.resetPosition=function(){},Al.prototype.needsContentAttribute=!0;function Xd(ie,oe){var he=El(ie,oe.line);if(!he||he.hidden)return null;var de=zn(ie.doc,oe.line),pe=Hc(he,de,oe.line),Fe=Vi(de,ie.doc.direction),Ve="left";if(Fe){var rt=mn(Fe,oe.ch);Ve=rt%2?"right":"left"}var $e=Jc(pe.map,oe.ch,Ve);return $e.offset=$e.collapse=="right"?$e.end:$e.start,$e}function Sf(ie){for(var oe=ie;oe;oe=oe.parentNode)if(/CodeMirror-gutter-wrapper/.test(oe.className))return!0;return!1}function hd(ie,oe){return oe&&(ie.bad=!0),ie}function dd(ie,oe,he,de,pe){var Fe="",Ve=!1,rt=ie.doc.lineSeparator(),$e=!1;function Pt(Ln){return function(er){return er.id==Ln}}function tn(){Ve&&(Fe+=rt,$e&&(Fe+=rt),Ve=$e=!1)}function Ct(Ln){Ln&&(tn(),Fe+=Ln)}function bn(Ln){if(Ln.nodeType==1){var er=Ln.getAttribute("cm-text");if(er){Ct(er);return}var Cr=Ln.getAttribute("cm-marker"),qr;if(Cr){var jo=ie.findMarks(Sn(de,0),Sn(pe+1,0),Pt(+Cr));jo.length&&(qr=jo[0].find(0))&&Ct(xn(ie.doc,qr.from,qr.to).join(rt));return}if(Ln.getAttribute("contenteditable")=="false")return;var La=/^(pre|div|p|li|table|br)$/i.test(Ln.nodeName);if(!/^br$/i.test(Ln.nodeName)&&Ln.textContent.length==0)return;La&&tn();for(var ta=0;ta=9&&oe.hasSelection&&(oe.hasSelection=null),he.poll()}),Qi(pe,"paste",function(Ve){hr(de,Ve)||Ph(Ve,de)||(de.state.pasteIncoming=+new Date,he.fastPoll())});function Fe(Ve){if(!hr(de,Ve)){if(de.somethingSelected())Qh({lineWise:!1,text:de.getSelections()});else if(de.options.lineWiseCopyCut){var rt=cd(de);Qh({lineWise:!0,text:rt.text}),Ve.type=="cut"?de.setSelections(rt.ranges,null,Zt):(he.prevInput="",pe.value=rt.text.join(` `),qn(pe))}else return;Ve.type=="cut"&&(de.state.cutIncoming=+new Date)}}Qi(pe,"cut",Fe),Qi(pe,"copy",Fe),Qi(ie.scroller,"paste",function(Ve){if(!(Il(ie,Ve)||hr(de,Ve))){if(!pe.dispatchEvent){de.state.pasteIncoming=+new Date,he.focus();return}var rt=new Event("paste");rt.clipboardData=Ve.clipboardData,pe.dispatchEvent(rt)}}),Qi(ie.lineSpace,"selectstart",function(Ve){Il(ie,Ve)||ra(Ve)}),Qi(pe,"compositionstart",function(){var Ve=de.getCursor("from");he.composing&&he.composing.range.clear(),he.composing={start:Ve,range:de.markText(Ve,de.getCursor("to"),{className:"CodeMirror-composing"})}}),Qi(pe,"compositionend",function(){he.composing&&(he.poll(),he.composing.range.clear(),he.composing=null)})},yu.prototype.createField=function(ie){this.wrapper=Zd(),this.textarea=this.wrapper.firstChild},yu.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},yu.prototype.prepareSelection=function(){var ie=this.cm,oe=ie.display,he=ie.doc,de=tc(ie);if(ie.options.moveInputWithCursor){var pe=Vs(ie,he.sel.primary().head,"div"),Fe=oe.wrapper.getBoundingClientRect(),Ve=oe.lineDiv.getBoundingClientRect();de.teTop=Math.max(0,Math.min(oe.wrapper.clientHeight-10,pe.top+Ve.top-Fe.top)),de.teLeft=Math.max(0,Math.min(oe.wrapper.clientWidth-10,pe.left+Ve.left-Fe.left))}return de},yu.prototype.showSelection=function(ie){var oe=this.cm,he=oe.display;qe(he.cursorDiv,ie.cursors),qe(he.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},yu.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var oe=this.cm;if(oe.somethingSelected()){this.prevInput="";var he=oe.getSelection();this.textarea.value=he,oe.state.focused&&qn(this.textarea),Nt&&Re>=9&&(this.hasSelection=he)}else ie||(this.prevInput=this.textarea.value="",Nt&&Re>=9&&(this.hasSelection=null))}},yu.prototype.getField=function(){return this.textarea},yu.prototype.supportsTouch=function(){return!1},yu.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!te||Bt()!=this.textarea))try{this.textarea.focus()}catch(ie){}},yu.prototype.blur=function(){this.textarea.blur()},yu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},yu.prototype.receivedFocus=function(){this.slowPoll()},yu.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},yu.prototype.fastPoll=function(){var ie=!1,oe=this;oe.pollingFast=!0;function he(){var de=oe.poll();!de&&!ie?(ie=!0,oe.polling.set(60,he)):(oe.pollingFast=!1,oe.slowPoll())}oe.polling.set(20,he)},yu.prototype.poll=function(){var ie=this,oe=this.cm,he=this.textarea,de=this.prevInput;if(this.contextMenuPending||!oe.state.focused||Ee(he)&&!de&&!this.composing||oe.isReadOnly()||oe.options.disableInput||oe.state.keySeq)return!1;var pe=he.value;if(pe==de&&!oe.somethingSelected())return!1;if(Nt&&Re>=9&&this.hasSelection===pe||ue&&/[\uf700-\uf7ff]/.test(pe))return oe.display.input.reset(),!1;if(oe.doc.sel==oe.display.selForContextMenu){var Fe=pe.charCodeAt(0);if(Fe==8203&&!de&&(de="\u200B"),Fe==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ve=0,rt=Math.min(de.length,pe.length);Ve1e3||pe.indexOf(` `)>-1?he.value=ie.prevInput="":ie.prevInput=pe,ie.composing&&(ie.composing.range.clear(),ie.composing.range=oe.markText(ie.composing.start,oe.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},yu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},yu.prototype.onKeyPress=function(){Nt&&Re>=9&&(this.hasSelection=null),this.fastPoll()},yu.prototype.onContextMenu=function(ie){var oe=this,he=oe.cm,de=he.display,pe=oe.textarea;oe.contextMenuPending&&oe.contextMenuPending();var Fe=mu(he,ie),Ve=de.scroller.scrollTop;if(!Fe||yt)return;var rt=he.options.resetSelectionOnContextMenu;rt&&he.doc.sel.contains(Fe)==-1&&oa(he,Mr)(he.doc,Ui(Fe),Zt);var $e=pe.style.cssText,Pt=oe.wrapper.style.cssText,tn=oe.wrapper.offsetParent.getBoundingClientRect();oe.wrapper.style.cssText="position: static",pe.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(ie.clientY-tn.top-5)+"px; left: "+(ie.clientX-tn.left-5)+`px; z-index: 1000; background: `+(Nt?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ct;Je&&(Ct=window.scrollY),de.input.focus(),Je&&window.scrollTo(null,Ct),de.input.reset(),he.somethingSelected()||(pe.value=oe.prevInput=" "),oe.contextMenuPending=Ln,de.selForContextMenu=he.doc.sel,clearTimeout(de.detectingSelectAll);function bn(){if(pe.selectionStart!=null){var Cr=he.somethingSelected(),qr="\u200B"+(Cr?pe.value:"");pe.value="\u21DA",pe.value=qr,oe.prevInput=Cr?"":"\u200B",pe.selectionStart=1,pe.selectionEnd=qr.length,de.selForContextMenu=he.doc.sel}}function Ln(){if(oe.contextMenuPending==Ln&&(oe.contextMenuPending=!1,oe.wrapper.style.cssText=Pt,pe.style.cssText=$e,Nt&&Re<9&&de.scrollbars.setScrollTop(de.scroller.scrollTop=Ve),pe.selectionStart!=null)){(!Nt||Nt&&Re<9)&&bn();var Cr=0,qr=function(){de.selForContextMenu==he.doc.sel&&pe.selectionStart==0&&pe.selectionEnd>0&&oe.prevInput=="\u200B"?oa(he,Wt)(he):Cr++<10?de.detectingSelectAll=setTimeout(qr,500):(de.selForContextMenu=null,de.input.reset())};de.detectingSelectAll=setTimeout(qr,200)}}if(Nt&&Re>=9&&bn(),Pe){ia(ie);var er=function(){$r(window,"mouseup",er),setTimeout(Ln,20)};Qi(window,"mouseup",er)}else setTimeout(Ln,50)},yu.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},yu.prototype.setUneditable=function(){},yu.prototype.needsContentAttribute=!1;function Kf(ie,oe){if(oe=oe?Nn(oe):{},oe.value=ie.value,!oe.tabindex&&ie.tabIndex&&(oe.tabindex=ie.tabIndex),!oe.placeholder&&ie.placeholder&&(oe.placeholder=ie.placeholder),oe.autofocus==null){var he=Bt();oe.autofocus=he==ie||ie.getAttribute("autofocus")!=null&&he==document.body}function de(){ie.value=rt.getValue()}var pe;if(ie.form&&(Qi(ie.form,"submit",de),!oe.leaveSubmitMethodAlone)){var Fe=ie.form;pe=Fe.submit;try{var Ve=Fe.submit=function(){de(),Fe.submit=pe,Fe.submit(),Fe.submit=Ve}}catch($e){}}oe.finishInit=function($e){$e.save=de,$e.getTextArea=function(){return ie},$e.toTextArea=function(){$e.toTextArea=isNaN,de(),ie.parentNode.removeChild($e.getWrapperElement()),ie.style.display="",ie.form&&($r(ie.form,"submit",de),!oe.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=pe))}},ie.style.display="none";var rt=zs(function($e){return ie.parentNode.insertBefore($e,ie.nextSibling)},oe);return rt}function fd(ie){ie.off=$r,ie.on=Qi,ie.wheelEventPixels=Qn,ie.Doc=Hi,ie.splitLines=ti,ie.countColumn=lt,ie.findColumn=Mi,ie.isWordChar=He,ie.Pass=ai,ie.signal=Yi,ie.Line=Ia,ie.changeEnd=sr,ie.scrollbarModel=Ei,ie.Pos=Sn,ie.cmpPos=or,ie.modes=Yn,ie.mimeModes=In,ie.resolveMode=zt,ie.getMode=Kt,ie.modeExtensions=Ft,ie.extendMode=un,ie.copyState=Ti,ie.startState=hi,ie.innerMode=Ri,ie.commands=Xs,ie.keyMap=xa,ie.keyName=gs,ie.isModifierKey=wa,ie.lookupKey=Rr,ie.normalizeKeyMap=no,ie.StringStream=Ut,ie.SharedTextMarker=Pr,ie.TextMarker=Et,ie.LineWidget=fi,ie.e_preventDefault=ra,ie.e_stopPropagation=Un,ie.e_stop=ia,ie.addClass=Ht,ie.contains=bt,ie.rmClass=nt,ie.keyNames=bo}yf(zs),Oh(zs);var Ch="iter insert remove copy getEditor constructor".split(" ");for(var Dd in Hi.prototype)Hi.prototype.hasOwnProperty(Dd)&&Ne(Ch,Dd)<0&&(zs.prototype[Dd]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Hi.prototype[Dd]));return Ii(Hi),zs.inputStyles={textarea:yu,contenteditable:Al},zs.defineMode=function(ie){!zs.defaults.mode&&ie!="null"&&(zs.defaults.mode=ie),en.apply(this,arguments)},zs.defineMIME=ni,zs.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),zs.defineMIME("text/plain","null"),zs.defineExtension=function(ie,oe){zs.prototype[ie]=oe},zs.defineDocExtension=function(ie,oe){Hi.prototype[ie]=oe},zs.fromTextArea=Kf,fd(zs),zs.version="5.58.2",zs})},49047:function(Dn,ei,be){(function(ve){ve(be(4631),be(29589),be(52539))})(function(ve){"use strict";ve.defineMode("markdown",function(ot,wt){var Qt=ve.getMode(ot,"text/html"),Nt=Qt.name=="null";function Re(lt){if(ve.findModeByName){var Ge=ve.findModeByName(lt);Ge&&(lt=Ge.mime||Ge.mimes[0])}var Ne=ve.getMode(ot,lt);return Ne.name=="null"?null:Ne}wt.highlightFormatting===void 0&&(wt.highlightFormatting=!1),wt.maxBlockquoteDepth===void 0&&(wt.maxBlockquoteDepth=0),wt.taskLists===void 0&&(wt.taskLists=!1),wt.strikethrough===void 0&&(wt.strikethrough=!1),wt.emoji===void 0&&(wt.emoji=!1),wt.fencedCodeBlockHighlighting===void 0&&(wt.fencedCodeBlockHighlighting=!0),wt.fencedCodeBlockDefaultMode===void 0&&(wt.fencedCodeBlockDefaultMode="text/plain"),wt.xml===void 0&&(wt.xml=!0),wt.tokenTypeOverrides===void 0&&(wt.tokenTypeOverrides={});var Je={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var pt in Je)Je.hasOwnProperty(pt)&&wt.tokenTypeOverrides[pt]&&(Je[pt]=wt.tokenTypeOverrides[pt]);var mt=/^([*\-_])(?:\s*\1){2,}\s*$/,yt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Vt=/^\[(x| )\](?=\s)/i,ct=wt.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,We=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Te=/^[^#!\[\]*_\\<>` "'(~:]+/,ne=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,te=/^\s*\[[^\]]+?\]:.*$/,ue=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function ge(lt,Ge,Ne){return Ge.f=Ge.inline=Ne,Ne(lt,Ge)}function me(lt,Ge,Ne){return Ge.f=Ge.block=Ne,Ne(lt,Ge)}function xe(lt){return!lt||!/\S/.test(lt.string)}function Pe(lt){if(lt.linkTitle=!1,lt.linkHref=!1,lt.linkText=!1,lt.em=!1,lt.strong=!1,lt.strikethrough=!1,lt.quote=0,lt.indentedCode=!1,lt.f==nt){var Ge=Nt;if(!Ge){var Ne=ve.innerMode(Qt,lt.htmlState);Ge=Ne.mode.name=="xml"&&Ne.state.tagStart===null&&!Ne.state.context&&Ne.state.tokenize.isInText}Ge&&(lt.f=jt,lt.block=Ke,lt.htmlState=null)}return lt.trailingSpace=0,lt.trailingSpaceNewLine=!1,lt.prevLine=lt.thisLine,lt.thisLine={stream:null},null}function Ke(lt,Ge){var Ne=lt.column()===Ge.indentation,Rn=xe(Ge.prevLine.stream),ai=Ge.indentedCode,Zt=Ge.prevLine.hr,ci=Ge.list!==!1,On=(Ge.listStack[Ge.listStack.length-1]||0)+3;Ge.indentedCode=!1;var Mi=Ge.indentation;if(Ge.indentationDiff===null&&(Ge.indentationDiff=Ge.indentation,ci)){for(Ge.list=null;Mi=4&&(ai||Ge.prevLine.fencedCodeEnd||Ge.prevLine.header||Rn))return lt.skipToEnd(),Ge.indentedCode=!0,Je.code;if(lt.eatSpace())return null;if(Ne&&Ge.indentation<=On&&(on=lt.match(ct))&&on[1].length<=6)return Ge.quote=0,Ge.header=on[1].length,Ge.thisLine.header=!0,wt.highlightFormatting&&(Ge.formatting="header"),Ge.f=Ge.inline,qe(Ge);if(Ge.indentation<=On&<.eat(">"))return Ge.quote=Ne?1:Ge.quote+1,wt.highlightFormatting&&(Ge.formatting="quote"),lt.eatSpace(),qe(Ge);if(!At&&!Ge.setext&&Ne&&Ge.indentation<=On&&(on=lt.match(yt))){var Si=on[1]?"ol":"ul";return Ge.indentation=Mi+lt.current().length,Ge.list=!0,Ge.quote=0,Ge.listStack.push(Ge.indentation),Ge.em=!1,Ge.strong=!1,Ge.code=!1,Ge.strikethrough=!1,wt.taskLists&<.match(Vt,!1)&&(Ge.taskList=!0),Ge.f=Ge.inline,wt.highlightFormatting&&(Ge.formatting=["list","list-"+Si]),qe(Ge)}else{if(Ne&&Ge.indentation<=On&&(on=lt.match(ne,!0)))return Ge.quote=0,Ge.fencedEndRE=new RegExp(on[1]+"+ *$"),Ge.localMode=wt.fencedCodeBlockHighlighting&&Re(on[2]||wt.fencedCodeBlockDefaultMode),Ge.localMode&&(Ge.localState=ve.startState(Ge.localMode)),Ge.f=Ge.block=ft,wt.highlightFormatting&&(Ge.formatting="code-block"),Ge.code=-1,qe(Ge);if(Ge.setext||(!Xt||!ci)&&!Ge.quote&&Ge.list===!1&&!Ge.code&&!At&&!te.test(lt.string)&&(on=lt.lookAhead(1))&&(on=on.match(We)))return Ge.setext?(Ge.header=Ge.setext,Ge.setext=0,lt.skipToEnd(),wt.highlightFormatting&&(Ge.formatting="header")):(Ge.header=on[0].charAt(0)=="="?1:2,Ge.setext=Ge.header),Ge.thisLine.header=!0,Ge.f=Ge.inline,qe(Ge);if(At)return lt.skipToEnd(),Ge.hr=!0,Ge.thisLine.hr=!0,Je.hr;if(lt.peek()==="[")return ge(lt,Ge,Jn)}return ge(lt,Ge,Ge.inline)}function nt(lt,Ge){var Ne=Qt.token(lt,Ge.htmlState);if(!Nt){var Rn=ve.innerMode(Qt,Ge.htmlState);(Rn.mode.name=="xml"&&Rn.state.tagStart===null&&!Rn.state.context&&Rn.state.tokenize.isInText||Ge.md_inside&<.current().indexOf(">")>-1)&&(Ge.f=jt,Ge.block=Ke,Ge.htmlState=null)}return Ne}function ft(lt,Ge){var Ne=Ge.listStack[Ge.listStack.length-1]||0,Rn=Ge.indentation=lt.quote?Ge.push(Je.formatting+"-"+lt.formatting[Ne]+"-"+lt.quote):Ge.push("error"))}if(lt.taskOpen)return Ge.push("meta"),Ge.length?Ge.join(" "):null;if(lt.taskClosed)return Ge.push("property"),Ge.length?Ge.join(" "):null;if(lt.linkHref?Ge.push(Je.linkHref,"url"):(lt.strong&&Ge.push(Je.strong),lt.em&&Ge.push(Je.em),lt.strikethrough&&Ge.push(Je.strikethrough),lt.emoji&&Ge.push(Je.emoji),lt.linkText&&Ge.push(Je.linkText),lt.code&&Ge.push(Je.code),lt.image&&Ge.push(Je.image),lt.imageAltText&&Ge.push(Je.imageAltText,"link"),lt.imageMarker&&Ge.push(Je.imageMarker)),lt.header&&Ge.push(Je.header,Je.header+"-"+lt.header),lt.quote&&(Ge.push(Je.quote),!wt.maxBlockquoteDepth||wt.maxBlockquoteDepth>=lt.quote?Ge.push(Je.quote+"-"+lt.quote):Ge.push(Je.quote+"-"+wt.maxBlockquoteDepth)),lt.list!==!1){var Rn=(lt.listStack.length-1)%3;Rn?Rn===1?Ge.push(Je.list2):Ge.push(Je.list3):Ge.push(Je.list1)}return lt.trailingSpaceNewLine?Ge.push("trailing-space-new-line"):lt.trailingSpace&&Ge.push("trailing-space-"+(lt.trailingSpace%2?"a":"b")),Ge.length?Ge.join(" "):null}function at(lt,Ge){if(lt.match(Te,!0))return qe(Ge)}function jt(lt,Ge){var Ne=Ge.text(lt,Ge);if(typeof Ne!="undefined")return Ne;if(Ge.list)return Ge.list=null,qe(Ge);if(Ge.taskList){var Rn=lt.match(Vt,!0)[1]===" ";return Rn?Ge.taskOpen=!0:Ge.taskClosed=!0,wt.highlightFormatting&&(Ge.formatting="task"),Ge.taskList=!1,qe(Ge)}if(Ge.taskOpen=!1,Ge.taskClosed=!1,Ge.header&<.match(/^#+$/,!0))return wt.highlightFormatting&&(Ge.formatting="header"),qe(Ge);var ai=lt.next();if(Ge.linkTitle){Ge.linkTitle=!1;var Zt=ai;ai==="("&&(Zt=")"),Zt=(Zt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ci="^\\s*(?:[^"+Zt+"\\\\]+|\\\\\\\\|\\\\.)"+Zt;if(lt.match(new RegExp(ci),!0))return Je.linkHref}if(ai==="`"){var On=Ge.formatting;wt.highlightFormatting&&(Ge.formatting="code"),lt.eatWhile("`");var Mi=lt.current().length;if(Ge.code==0&&(!Ge.quote||Mi==1))return Ge.code=Mi,qe(Ge);if(Mi==Ge.code){var Xt=qe(Ge);return Ge.code=0,Xt}else return Ge.formatting=On,qe(Ge)}else if(Ge.code)return qe(Ge);if(ai==="\\"&&(lt.next(),wt.highlightFormatting)){var At=qe(Ge),on=Je.formatting+"-escape";return At?At+" "+on:on}if(ai==="!"&<.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ge.imageMarker=!0,Ge.image=!0,wt.highlightFormatting&&(Ge.formatting="image"),qe(Ge);if(ai==="["&&Ge.imageMarker&<.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ge.imageMarker=!1,Ge.imageAltText=!0,wt.highlightFormatting&&(Ge.formatting="image"),qe(Ge);if(ai==="]"&&Ge.imageAltText){wt.highlightFormatting&&(Ge.formatting="image");var At=qe(Ge);return Ge.imageAltText=!1,Ge.image=!1,Ge.inline=Ge.f=bt,At}if(ai==="["&&!Ge.image)return Ge.linkText&<.match(/^.*?\]/)||(Ge.linkText=!0,wt.highlightFormatting&&(Ge.formatting="link")),qe(Ge);if(ai==="]"&&Ge.linkText){wt.highlightFormatting&&(Ge.formatting="link");var At=qe(Ge);return Ge.linkText=!1,Ge.inline=Ge.f=lt.match(/\(.*?\)| ?\[.*?\]/,!1)?bt:jt,At}if(ai==="<"&<.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ge.f=Ge.inline=Mt,wt.highlightFormatting&&(Ge.formatting="link");var At=qe(Ge);return At?At+=" ":At="",At+Je.linkInline}if(ai==="<"&<.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ge.f=Ge.inline=Mt,wt.highlightFormatting&&(Ge.formatting="link");var At=qe(Ge);return At?At+=" ":At="",At+Je.linkEmail}if(wt.xml&&ai==="<"&<.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Si=lt.string.indexOf(">",lt.pos);if(Si!=-1){var Gt=lt.string.substring(lt.start,Si);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Gt)&&(Ge.md_inside=!0)}return lt.backUp(1),Ge.htmlState=ve.startState(Qt),me(lt,Ge,nt)}if(wt.xml&&ai==="<"&<.match(/^\/\w*?>/))return Ge.md_inside=!1,"tag";if(ai==="*"||ai==="_"){for(var Xe=1,ke=lt.pos==1?" ":lt.string.charAt(lt.pos-2);Xe<3&<.eat(ai);)Xe++;var Me=lt.peek()||" ",He=!/\s/.test(Me)&&(!ue.test(Me)||/\s/.test(ke)||ue.test(ke)),et=!/\s/.test(ke)&&(!ue.test(ke)||/\s/.test(Me)||ue.test(Me)),Oe=null,ut=null;if(Xe%2&&(!Ge.em&&He&&(ai==="*"||!et||ue.test(ke))?Oe=!0:Ge.em==ai&&et&&(ai==="*"||!He||ue.test(Me))&&(Oe=!1)),Xe>1&&(!Ge.strong&&He&&(ai==="*"||!et||ue.test(ke))?ut=!0:Ge.strong==ai&&et&&(ai==="*"||!He||ue.test(Me))&&(ut=!1)),ut!=null||Oe!=null){wt.highlightFormatting&&(Ge.formatting=Oe==null?"strong":ut==null?"em":"strong em"),Oe===!0&&(Ge.em=ai),ut===!0&&(Ge.strong=ai);var Xt=qe(Ge);return Oe===!1&&(Ge.em=!1),ut===!1&&(Ge.strong=!1),Xt}}else if(ai===" "&&(lt.eat("*")||lt.eat("_"))){if(lt.peek()===" ")return qe(Ge);lt.backUp(1)}if(wt.strikethrough){if(ai==="~"&<.eatWhile(ai)){if(Ge.strikethrough){wt.highlightFormatting&&(Ge.formatting="strikethrough");var Xt=qe(Ge);return Ge.strikethrough=!1,Xt}else if(lt.match(/^[^\s]/,!1))return Ge.strikethrough=!0,wt.highlightFormatting&&(Ge.formatting="strikethrough"),qe(Ge)}else if(ai===" "&<.match(/^~~/,!0)){if(lt.peek()===" ")return qe(Ge);lt.backUp(2)}}if(wt.emoji&&ai===":"&<.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ge.emoji=!0,wt.highlightFormatting&&(Ge.formatting="emoji");var Vn=qe(Ge);return Ge.emoji=!1,Vn}return ai===" "&&(lt.match(/^ +$/,!1)?Ge.trailingSpace++:Ge.trailingSpace&&(Ge.trailingSpaceNewLine=!0)),qe(Ge)}function Mt(lt,Ge){var Ne=lt.next();if(Ne===">"){Ge.f=Ge.inline=jt,wt.highlightFormatting&&(Ge.formatting="link");var Rn=qe(Ge);return Rn?Rn+=" ":Rn="",Rn+Je.linkInline}return lt.match(/^[^>]+/,!0),Je.linkInline}function bt(lt,Ge){if(lt.eatSpace())return null;var Ne=lt.next();return Ne==="("||Ne==="["?(Ge.f=Ge.inline=Ht(Ne==="("?")":"]"),wt.highlightFormatting&&(Ge.formatting="link-string"),Ge.linkHref=!0,qe(Ge)):"error"}var Bt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ht(lt){return function(Ge,Ne){var Rn=Ge.next();if(Rn===lt){Ne.f=Ne.inline=jt,wt.highlightFormatting&&(Ne.formatting="link-string");var ai=qe(Ne);return Ne.linkHref=!1,ai}return Ge.match(Bt[lt]),Ne.linkHref=!0,qe(Ne)}}function Jn(lt,Ge){return lt.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ge.f=qn,lt.next(),wt.highlightFormatting&&(Ge.formatting="link"),Ge.linkText=!0,qe(Ge)):ge(lt,Ge,jt)}function qn(lt,Ge){if(lt.match(/^\]:/,!0)){Ge.f=Ge.inline=sn,wt.highlightFormatting&&(Ge.formatting="link");var Ne=qe(Ge);return Ge.linkText=!1,Ne}return lt.match(/^([^\]\\]|\\.)+/,!0),Je.linkText}function sn(lt,Ge){return lt.eatSpace()?null:(lt.match(/^[^\s]+/,!0),lt.peek()===void 0?Ge.linkTitle=!0:lt.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ge.f=Ge.inline=jt,Je.linkHref+" url")}var Nn={startState:function(){return{f:Ke,prevLine:{stream:null},thisLine:{stream:null},block:Ke,htmlState:null,indentation:0,inline:jt,text:at,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(lt){return{f:lt.f,prevLine:lt.prevLine,thisLine:lt.thisLine,block:lt.block,htmlState:lt.htmlState&&ve.copyState(Qt,lt.htmlState),indentation:lt.indentation,localMode:lt.localMode,localState:lt.localMode?ve.copyState(lt.localMode,lt.localState):null,inline:lt.inline,text:lt.text,formatting:!1,linkText:lt.linkText,linkTitle:lt.linkTitle,linkHref:lt.linkHref,code:lt.code,em:lt.em,strong:lt.strong,strikethrough:lt.strikethrough,emoji:lt.emoji,header:lt.header,setext:lt.setext,hr:lt.hr,taskList:lt.taskList,list:lt.list,listStack:lt.listStack.slice(0),quote:lt.quote,indentedCode:lt.indentedCode,trailingSpace:lt.trailingSpace,trailingSpaceNewLine:lt.trailingSpaceNewLine,md_inside:lt.md_inside,fencedEndRE:lt.fencedEndRE}},token:function(lt,Ge){if(Ge.formatting=!1,lt!=Ge.thisLine.stream){if(Ge.header=0,Ge.hr=!1,lt.match(/^\s*$/,!0))return Pe(Ge),null;if(Ge.prevLine=Ge.thisLine,Ge.thisLine={stream:lt},Ge.taskList=!1,Ge.trailingSpace=0,Ge.trailingSpaceNewLine=!1,!Ge.localState&&(Ge.f=Ge.block,Ge.f!=nt)){var Ne=lt.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ge.indentation=Ne,Ge.indentationDiff=null,Ne>0)return null}}return Ge.f(lt,Ge)},innerMode:function(lt){return lt.block==nt?{state:lt.htmlState,mode:Qt}:lt.localState?{state:lt.localState,mode:lt.localMode}:{state:lt,mode:Nn}},indent:function(lt,Ge,Ne){return lt.block==nt&&Qt.indent?Qt.indent(lt.htmlState,Ge,Ne):lt.localState&<.localMode.indent?lt.localMode.indent(lt.localState,Ge,Ne):ve.Pass},blankLine:Pe,getType:qe,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Nn},"xml"),ve.defineMIME("text/markdown","markdown"),ve.defineMIME("text/x-markdown","markdown")})},52539:function(Dn,ei,be){(function(ve){ve(be(4631))})(function(ve){"use strict";ve.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var ot=0;ot-1&&Qt.substring(Je+1,Qt.length);if(pt)return ve.findModeByExtension(pt)},ve.findModeByName=function(Qt){Qt=Qt.toLowerCase();for(var Nt=0;Nt0?Te.cmdState[Te.cmdState.length-1]:null}function Re(Te){var ne=Te.cmdState.pop();ne&&ne.closeBracket()}function Je(Te){for(var ne=Te.cmdState,te=ne.length-1;te>=0;te--){var ue=ne[te];if(ue.name!="DEFAULT")return ue}return{styleIdentifier:function(){return null}}}function pt(Te,ne,te){return function(){this.name=Te,this.bracketNo=0,this.style=ne,this.styles=te,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var mt={};mt.importmodule=pt("importmodule","tag",["string","builtin"]),mt.documentclass=pt("documentclass","tag",["","atom"]),mt.usepackage=pt("usepackage","tag",["atom"]),mt.begin=pt("begin","tag",["atom"]),mt.end=pt("end","tag",["atom"]),mt.label=pt("label","tag",["atom"]),mt.ref=pt("ref","tag",["atom"]),mt.eqref=pt("eqref","tag",["atom"]),mt.cite=pt("cite","tag",["atom"]),mt.bibitem=pt("bibitem","tag",["atom"]),mt.Bibitem=pt("Bibitem","tag",["atom"]),mt.RBibitem=pt("RBibitem","tag",["atom"]),mt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function yt(Te,ne){Te.f=ne}function Vt(Te,ne){var te;if(Te.match(/^\\[a-zA-Z@]+/)){var ue=Te.current().slice(1);return te=mt.hasOwnProperty(ue)?mt[ue]:mt.DEFAULT,te=new te,Qt(ne,te),yt(ne,We),te.style}if(Te.match(/^\\[$&%#{}_]/)||Te.match(/^\\[,;!\/\\]/))return"tag";if(Te.match("\\["))return yt(ne,function(ge,me){return ct(ge,me,"\\]")}),"keyword";if(Te.match("\\("))return yt(ne,function(ge,me){return ct(ge,me,"\\)")}),"keyword";if(Te.match("$$"))return yt(ne,function(ge,me){return ct(ge,me,"$$")}),"keyword";if(Te.match("$"))return yt(ne,function(ge,me){return ct(ge,me,"$")}),"keyword";var se=Te.next();if(se=="%")return Te.skipToEnd(),"comment";if(se=="}"||se=="]"){if(te=Nt(ne),te)te.closeBracket(se),yt(ne,We);else return"error";return"bracket"}else return se=="{"||se=="["?(te=mt.DEFAULT,te=new te,Qt(ne,te),"bracket"):/\d/.test(se)?(Te.eatWhile(/[\w.%]/),"atom"):(Te.eatWhile(/[\w\-_]/),te=Je(ne),te.name=="begin"&&(te.argument=Te.current()),te.styleIdentifier())}function ct(Te,ne,te){if(Te.eatSpace())return null;if(te&&Te.match(te))return yt(ne,Vt),"keyword";if(Te.match(/^\\[a-zA-Z@]+/))return"tag";if(Te.match(/^[a-zA-Z]+/))return"variable-2";if(Te.match(/^\\[$&%#{}_]/)||Te.match(/^\\[,;!\/]/)||Te.match(/^[\^_&]/))return"tag";if(Te.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Te.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ue=Te.next();return ue=="{"||ue=="}"||ue=="["||ue=="]"||ue=="("||ue==")"?"bracket":ue=="%"?(Te.skipToEnd(),"comment"):"error"}function We(Te,ne){var te=Te.peek(),ue;return te=="{"||te=="["?(ue=Nt(ne),ue.openBracket(te),Te.eat(te),yt(ne,Vt),"bracket"):/[ \t\r]/.test(te)?(Te.eat(te),null):(yt(ne,Vt),Re(ne),Vt(Te,ne))}return{startState:function(){var Te=wt.inMathMode?function(ne,te){return ct(ne,te)}:Vt;return{cmdState:[],f:Te}},copyState:function(Te){return{cmdState:Te.cmdState.slice(),f:Te.f}},token:function(Te,ne){return ne.f(Te,ne)},blankLine:function(Te){Te.f=Vt,Te.cmdState.length=0},lineComment:"%"}}),ve.defineMIME("text/x-stex","stex"),ve.defineMIME("text/x-latex","stex")})},29589:function(Dn,ei,be){(function(ve){ve(be(4631))})(function(ve){"use strict";var ot={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},wt={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ve.defineMode("xml",function(Qt,Nt){var Re=Qt.indentUnit,Je={},pt=Nt.htmlMode?ot:wt;for(var mt in pt)Je[mt]=pt[mt];for(var mt in Nt)Je[mt]=Nt[mt];var yt,Vt;function ct(Mt,bt){function Bt(qn){return bt.tokenize=qn,qn(Mt,bt)}var Ht=Mt.next();if(Ht=="<")return Mt.eat("!")?Mt.eat("[")?Mt.match("CDATA[")?Bt(ne("atom","]]>")):null:Mt.match("--")?Bt(ne("comment","-->")):Mt.match("DOCTYPE",!0,!0)?(Mt.eatWhile(/[\w\._\-]/),Bt(te(1))):null:Mt.eat("?")?(Mt.eatWhile(/[\w\._\-]/),bt.tokenize=ne("meta","?>"),"meta"):(yt=Mt.eat("/")?"closeTag":"openTag",bt.tokenize=We,"tag bracket");if(Ht=="&"){var Jn;return Mt.eat("#")?Mt.eat("x")?Jn=Mt.eatWhile(/[a-fA-F\d]/)&&Mt.eat(";"):Jn=Mt.eatWhile(/[\d]/)&&Mt.eat(";"):Jn=Mt.eatWhile(/[\w\.\-:]/)&&Mt.eat(";"),Jn?"atom":"error"}else return Mt.eatWhile(/[^&<]/),null}ct.isInText=!0;function We(Mt,bt){var Bt=Mt.next();if(Bt==">"||Bt=="/"&&Mt.eat(">"))return bt.tokenize=ct,yt=Bt==">"?"endTag":"selfcloseTag","tag bracket";if(Bt=="=")return yt="equals",null;if(Bt=="<"){bt.tokenize=ct,bt.state=me,bt.tagName=bt.tagStart=null;var Ht=bt.tokenize(Mt,bt);return Ht?Ht+" tag error":"tag error"}else return/[\'\"]/.test(Bt)?(bt.tokenize=Te(Bt),bt.stringStartCol=Mt.column(),bt.tokenize(Mt,bt)):(Mt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Te(Mt){var bt=function(Bt,Ht){for(;!Bt.eol();)if(Bt.next()==Mt){Ht.tokenize=We;break}return"string"};return bt.isInAttribute=!0,bt}function ne(Mt,bt){return function(Bt,Ht){for(;!Bt.eol();){if(Bt.match(bt)){Ht.tokenize=ct;break}Bt.next()}return Mt}}function te(Mt){return function(bt,Bt){for(var Ht;(Ht=bt.next())!=null;){if(Ht=="<")return Bt.tokenize=te(Mt+1),Bt.tokenize(bt,Bt);if(Ht==">")if(Mt==1){Bt.tokenize=ct;break}else return Bt.tokenize=te(Mt-1),Bt.tokenize(bt,Bt)}return"meta"}}function ue(Mt,bt,Bt){this.prev=Mt.context,this.tagName=bt,this.indent=Mt.indented,this.startOfLine=Bt,(Je.doNotIndent.hasOwnProperty(bt)||Mt.context&&Mt.context.noIndent)&&(this.noIndent=!0)}function se(Mt){Mt.context&&(Mt.context=Mt.context.prev)}function ge(Mt,bt){for(var Bt;;){if(!Mt.context||(Bt=Mt.context.tagName,!Je.contextGrabbers.hasOwnProperty(Bt)||!Je.contextGrabbers[Bt].hasOwnProperty(bt)))return;se(Mt)}}function me(Mt,bt,Bt){return Mt=="openTag"?(Bt.tagStart=bt.column(),xe):Mt=="closeTag"?Pe:me}function xe(Mt,bt,Bt){return Mt=="word"?(Bt.tagName=bt.current(),Vt="tag",ft):Je.allowMissingTagName&&Mt=="endTag"?(Vt="tag bracket",ft(Mt,bt,Bt)):(Vt="error",xe)}function Pe(Mt,bt,Bt){if(Mt=="word"){var Ht=bt.current();return Bt.context&&Bt.context.tagName!=Ht&&Je.implicitlyClosed.hasOwnProperty(Bt.context.tagName)&&se(Bt),Bt.context&&Bt.context.tagName==Ht||Je.matchClosing===!1?(Vt="tag",Ke):(Vt="tag error",nt)}else return Je.allowMissingTagName&&Mt=="endTag"?(Vt="tag bracket",Ke(Mt,bt,Bt)):(Vt="error",nt)}function Ke(Mt,bt,Bt){return Mt!="endTag"?(Vt="error",Ke):(se(Bt),me)}function nt(Mt,bt,Bt){return Vt="error",Ke(Mt,bt,Bt)}function ft(Mt,bt,Bt){if(Mt=="word")return Vt="attribute",qe;if(Mt=="endTag"||Mt=="selfcloseTag"){var Ht=Bt.tagName,Jn=Bt.tagStart;return Bt.tagName=Bt.tagStart=null,Mt=="selfcloseTag"||Je.autoSelfClosers.hasOwnProperty(Ht)?ge(Bt,Ht):(ge(Bt,Ht),Bt.context=new ue(Bt,Ht,Jn==Bt.indented)),me}return Vt="error",ft}function qe(Mt,bt,Bt){return Mt=="equals"?at:(Je.allowMissing||(Vt="error"),ft(Mt,bt,Bt))}function at(Mt,bt,Bt){return Mt=="string"?jt:Mt=="word"&&Je.allowUnquoted?(Vt="string",ft):(Vt="error",ft(Mt,bt,Bt))}function jt(Mt,bt,Bt){return Mt=="string"?jt:ft(Mt,bt,Bt)}return{startState:function(Mt){var bt={tokenize:ct,state:me,indented:Mt||0,tagName:null,tagStart:null,context:null};return Mt!=null&&(bt.baseIndent=Mt),bt},token:function(Mt,bt){if(!bt.tagName&&Mt.sol()&&(bt.indented=Mt.indentation()),Mt.eatSpace())return null;yt=null;var Bt=bt.tokenize(Mt,bt);return(Bt||yt)&&Bt!="comment"&&(Vt=null,bt.state=bt.state(yt||Bt,Mt,bt),Vt&&(Bt=Vt=="error"?Bt+" error":Vt)),Bt},indent:function(Mt,bt,Bt){var Ht=Mt.context;if(Mt.tokenize.isInAttribute)return Mt.tagStart==Mt.indented?Mt.stringStartCol+1:Mt.indented+Re;if(Ht&&Ht.noIndent)return ve.Pass;if(Mt.tokenize!=We&&Mt.tokenize!=ct)return Bt?Bt.match(/^(\s*)/)[0].length:0;if(Mt.tagName)return Je.multilineTagIndentPastTag!==!1?Mt.tagStart+Mt.tagName.length+2:Mt.tagStart+Re*(Je.multilineTagIndentFactor||1);if(Je.alignCDATA&&/$/,blockCommentStart:"",configuration:Je.htmlMode?"html":"xml",helperType:Je.htmlMode?"html":"xml",skipAttribute:function(Mt){Mt.state==at&&(Mt.state=ft)},xmlCurrentTag:function(Mt){return Mt.tagName?{name:Mt.tagName,close:Mt.type=="closeTag"}:null},xmlCurrentContext:function(Mt){for(var bt=[],Bt=Mt.context;Bt;Bt=Bt.prev)Bt.tagName&&bt.push(Bt.tagName);return bt.reverse()}}}),ve.defineMIME("text/xml","xml"),ve.defineMIME("application/xml","xml"),ve.mimeModes.hasOwnProperty("text/html")||ve.defineMIME("text/html",{name:"xml",htmlMode:!0})})},28734:function(Dn){(function(ei,be){Dn.exports=be()})(this,function(){"use strict";return function(ei,be){var ve=be.prototype,ot=ve.format;ve.format=function(wt){var Qt=this,Nt=this.$locale();if(!this.isValid())return ot.bind(this)(wt);var Re=this.$utils(),Je=(wt||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(pt){switch(pt){case"Q":return Math.ceil((Qt.$M+1)/3);case"Do":return Nt.ordinal(Qt.$D);case"gggg":return Qt.weekYear();case"GGGG":return Qt.isoWeekYear();case"wo":return Nt.ordinal(Qt.week(),"W");case"w":case"ww":return Re.s(Qt.week(),pt==="w"?1:2,"0");case"W":case"WW":return Re.s(Qt.isoWeek(),pt==="W"?1:2,"0");case"k":case"kk":return Re.s(String(Qt.$H===0?24:Qt.$H),pt==="k"?1:2,"0");case"X":return Math.floor(Qt.$d.getTime()/1e3);case"x":return Qt.$d.getTime();case"z":return"["+Qt.offsetName()+"]";case"zzz":return"["+Qt.offsetName("long")+"]";default:return pt}});return ot.bind(this)(Je)}}})},96036:function(Dn){(function(ei,be){Dn.exports=be()})(this,function(){"use strict";return function(ei,be,ve){var ot=be.prototype,wt=function(pt){return pt&&(pt.indexOf?pt:pt.s)},Qt=function(pt,mt,yt,Vt,ct){var We=pt.name?pt:pt.$locale(),Te=wt(We[mt]),ne=wt(We[yt]),te=Te||ne.map(function(se){return se.slice(0,Vt)});if(!ct)return te;var ue=We.weekStart;return te.map(function(se,ge){return te[(ge+(ue||0))%7]})},Nt=function(){return ve.Ls[ve.locale()]},Re=function(pt,mt){return pt.formats[mt]||function(yt){return yt.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Vt,ct,We){return ct||We.slice(1)})}(pt.formats[mt.toUpperCase()])},Je=function(){var pt=this;return{months:function(mt){return mt?mt.format("MMMM"):Qt(pt,"months")},monthsShort:function(mt){return mt?mt.format("MMM"):Qt(pt,"monthsShort","months",3)},firstDayOfWeek:function(){return pt.$locale().weekStart||0},weekdays:function(mt){return mt?mt.format("dddd"):Qt(pt,"weekdays")},weekdaysMin:function(mt){return mt?mt.format("dd"):Qt(pt,"weekdaysMin","weekdays",2)},weekdaysShort:function(mt){return mt?mt.format("ddd"):Qt(pt,"weekdaysShort","weekdays",3)},longDateFormat:function(mt){return Re(pt.$locale(),mt)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};ot.localeData=function(){return Je.bind(this)()},ve.localeData=function(){var pt=Nt();return{firstDayOfWeek:function(){return pt.weekStart||0},weekdays:function(){return ve.weekdays()},weekdaysShort:function(){return ve.weekdaysShort()},weekdaysMin:function(){return ve.weekdaysMin()},months:function(){return ve.months()},monthsShort:function(){return ve.monthsShort()},longDateFormat:function(mt){return Re(pt,mt)},meridiem:pt.meridiem,ordinal:pt.ordinal}},ve.months=function(){return Qt(Nt(),"months")},ve.monthsShort=function(){return Qt(Nt(),"monthsShort","months",3)},ve.weekdays=function(pt){return Qt(Nt(),"weekdays",null,null,pt)},ve.weekdaysShort=function(pt){return Qt(Nt(),"weekdaysShort","weekdays",3,pt)},ve.weekdaysMin=function(pt){return Qt(Nt(),"weekdaysMin","weekdays",2,pt)}}})},55183:function(Dn){(function(ei,be){Dn.exports=be()})(this,function(){"use strict";var ei="week",be="year";return function(ve,ot,wt){var Qt=ot.prototype;Qt.week=function(Nt){if(Nt===void 0&&(Nt=null),Nt!==null)return this.add(7*(Nt-this.week()),"day");var Re=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var Je=wt(this).startOf(be).add(1,be).date(Re),pt=wt(this).endOf(ei);if(Je.isBefore(pt))return 1}var mt=wt(this).startOf(be).date(Re).startOf(ei).subtract(1,"millisecond"),yt=this.diff(mt,ei,!0);return yt<0?wt(this).startOf("week").week():Math.ceil(yt)},Qt.weeks=function(Nt){return Nt===void 0&&(Nt=null),this.week(Nt)}}})},172:function(Dn){(function(ei,be){Dn.exports=be()})(this,function(){"use strict";return function(ei,be){be.prototype.weekYear=function(){var ve=this.month(),ot=this.week(),wt=this.year();return ot===1&&ve===11?wt+1:ve===0&&ot>=52?wt-1:wt}}})},6833:function(Dn){(function(ei,be){Dn.exports=be()})(this,function(){"use strict";return function(ei,be){be.prototype.weekday=function(ve){var ot=this.$locale().weekStart||0,wt=this.$W,Qt=(wtx&&(x=Math.max(0,b+x)),(E==null||E>b)&&(E=b),E=Number(E),0>E&&(E=Math.max(0,b+E)),x=Number(x||0);x=a.length?a.push(x):a.splice(y,0,x):$t("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function aa(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):$t("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function ur(){var a=Ns.pop();return a===void 0?[]:a}function Nr(a){a.length=0,Ns.push(a)}function io(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(Sn(a)&&a.constructor)return io(a.constructor);return typeof a}function va(a){var y=a;return Sn(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function Ho(a,y){if(a.hasOwnProperty(y))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(y))return!0;var x=a.CA;if(x&&x[y])return!0;a=Object.getPrototypeOf(a)}return!1}function pi(a,y,x){Object.defineProperty(xs.prototype,a,{get:y,set:x})}function lo(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;bx;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",ee=0;ee-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var al=Ut.navigator!==void 0&&0this.key)return!1;a=a.s;var y=a.length,x=++this.Za,E=this.qf;if(E!==null)for(;xthis.key)return!1;var y=--this.Za;return 0<=y?(this.key=y,this.value=a.s[y],!0):(this.de(),!1)},So.prototype.Ad=function(){return this.next()},So.prototype.first=function(){var a=this.Bb;this.qa=a.Ja;var y=a.s;return this.Za=a=y.length-1,0<=a?(y=y[a],this.key=a,this.value=y):null},So.prototype.any=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(a(y[x]))return!0;return!1},So.prototype.all=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)if(!a(y[x]))return!1;return!0},So.prototype.each=function(a){var y=this.Bb;y.Hg=null,y=y.s;var x=y.length;for(this.Za=x,--x;0<=x;x--)a(y[x]);return this},So.prototype.map=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--)x.push(a(y[E]));return a=new Wn,a.s=x,a.xb(),a.iterator},So.prototype.filter=function(a){var y=this.Bb;y.Hg=null;var x=[];y=y.s;var E=y.length;for(this.Za=E,--E;0<=E;E--){var b=y[E];a(b)&&x.push(b)}return a=new Wn,a.s=x,a.xb(),a.iterator},So.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},So.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},un.Object.defineProperties(So.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),So.prototype.first=So.prototype.first,So.prototype.hasNext=So.prototype.Ad,So.prototype.next=So.prototype.next,So.prototype.reset=So.prototype.reset,So.className="ListIteratorBackwards";function Wn(a){Po(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ee=Wn.prototype,Ee.xb=function(){var a=this.Ja;a++,999999999a||a>=y.length)&&Wr(a,"0 <= i < length",Wn,"elt:i"),y[a]},Ee.get=function(a){return this.M(a)},Ee.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Wr(a,"0 <= i < length",Wn,"setElt:i"),this._isFrozen&&_i(this,a),x[a]=y},Ee.set=function(a,y){this.cd(a,y)},Ee.first=function(){var a=this.s;return a.length===0?null:a[0]},Ee.jc=function(){var a=this.s,y=a.length;return 0a&&Wr(a,">= 0",Wn,"insertAt:i"),this._isFrozen&&_i(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ee.remove=function(a){if(a===null)return!1;this._isFrozen&&_i(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},Ee.delete=function(a){return this.remove(a)},Ee.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Wr(a,"0 <= i < length",Wn,"removeAt:i"),this._isFrozen&&_i(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ee.removeRange=function(a,y){var x=this.s,E=x.length;if(0>a)a=0;else if(a>=E)return this;if(0>y)return this;if(y>=E&&(y=E-1),a>y)return this;this._isFrozen&&_i(this);for(var b=a,z=y+1;z=z)return this;if((0>y||y>=b-1)&&Wr(y,"0 <= from < length",Wn,"sortRange:from"),z===2)return x=E[y],b=E[y+1],0=b)E.sort(a);else for(y=E.slice(0,x),y.sort(a),a=0;a=b)for(x=E.slice(y),x.sort(a),a=y;a=this.s.length)return $a;var a=this.Sa;return a!==null?(a.reset(),a):new uo(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return $a;var a=this.Hg;return a!==null?(a.reset(),a):new So(this)}}}),Wn.prototype.reverse=Wn.prototype.reverse,Wn.prototype.sortRange=Wn.prototype.zi,Wn.prototype.sort=Wn.prototype.sort,Wn.prototype.toSet=Wn.prototype.Iv,Wn.prototype.toArray=Wn.prototype.Fa,Wn.prototype.removeRange=Wn.prototype.removeRange,Wn.prototype.removeAt=Wn.prototype.mb,Wn.prototype.delete=Wn.prototype.delete,Wn.prototype.remove=Wn.prototype.remove,Wn.prototype.insertAt=Wn.prototype.Gb,Wn.prototype.pop=Wn.prototype.pop,Wn.prototype.last=Wn.prototype.jc,Wn.prototype.first=Wn.prototype.first,Wn.prototype.set=Wn.prototype.set,Wn.prototype.setElt=Wn.prototype.cd,Wn.prototype.get=Wn.prototype.get,Wn.prototype.elt=Wn.prototype.M,Wn.prototype.indexOf=Wn.prototype.indexOf,Wn.prototype.has=Wn.prototype.has,Wn.prototype.contains=Wn.prototype.contains,Wn.prototype.clear=Wn.prototype.clear,Wn.prototype.addAll=Wn.prototype.addAll,Wn.prototype.push=Wn.prototype.push,Wn.prototype.add=Wn.prototype.add,Wn.prototype.thaw=Wn.prototype.ka,Wn.prototype.freeze=Wn.prototype.freeze,Wn.className="List";function ka(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ka.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},ka.prototype.next=function(){var a=this.eg;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},ka.prototype.Ad=function(){return this.next()},ka.prototype.first=function(){var a=this.eg;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},ka.prototype.any=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},ka.prototype.all=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},ka.prototype.each=function(a){var y=this.eg;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},ka.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Wn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},ka.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Wn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},ka.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},ka.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},un.Object.defineProperties(ka.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),ka.prototype.first=ka.prototype.first,ka.prototype.hasNext=ka.prototype.Ad,ka.prototype.next=ka.prototype.next,ka.prototype.reset=ka.prototype.reset,ka.className="SetIterator";function Cn(a){Po(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ee=Cn.prototype,Ee.xb=function(){var a=this.Ja;a++,999999999=this.Sb)return $a;var a=this.Sa;return a!==null?(a.reset(),a):new ka(this)}}}),Cn.prototype.toList=Cn.prototype.Hv,Cn.prototype.toArray=Cn.prototype.Fa,Cn.prototype.clear=Cn.prototype.clear,Cn.prototype.retainAll=Cn.prototype.pA,Cn.prototype.removeAll=Cn.prototype.hp,Cn.prototype.delete=Cn.prototype.delete,Cn.prototype.remove=Cn.prototype.remove,Cn.prototype.first=Cn.prototype.first,Cn.prototype.containsAny=Cn.prototype.Ty,Cn.prototype.containsAll=Cn.prototype.Sy,Cn.prototype.has=Cn.prototype.has,Cn.prototype.contains=Cn.prototype.contains,Cn.prototype.addAll=Cn.prototype.addAll,Cn.prototype.add=Cn.prototype.add,Cn.prototype.thaw=Cn.prototype.ka,Cn.prototype.freeze=Cn.prototype.freeze;var kl=1;Cn.className="Set",Cn.uniqueHash=Po,Cn.hashIdUnique=Ws,Cn.hashId=ds;function Ss(a){this.ma=a,this.qa=a.Ja,this.sa=null}Ss.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Ss.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},Ss.prototype.Ad=function(){return this.next()},Ss.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},Ss.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ss.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ss.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},Ss.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Wn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Ss.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Wn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Ss.prototype.de=function(){this.value=this.key=null,this.qa=-1},Ss.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},un.Object.defineProperties(Ss.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ss.prototype.first=Ss.prototype.first,Ss.prototype.hasNext=Ss.prototype.Ad,Ss.prototype.next=Ss.prototype.next,Ss.prototype.reset=Ss.prototype.reset,Ss.className="MapKeySetIterator";function Ua(a){Cn.call(this),Po(this),this._isFrozen=!0,this.ma=a}Ft(Ua,Cn),Ee=Ua.prototype,Ee.freeze=function(){return this},Ee.ka=function(){return this},Ee.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ee.add=function(){$t("This Set is read-only: "+this.toString())},Ee.contains=function(a){return this.ma.contains(a)},Ee.has=function(a){return this.contains(a)},Ee.remove=function(){$t("This Set is read-only: "+this.toString())},Ee.delete=function(a){return this.remove(a)},Ee.clear=function(){$t("This Set is read-only: "+this.toString())},Ee.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Ua.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ua.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ua.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Ua.prototype.map=function(a){for(var y=new Cn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Ua.prototype.filter=function(a){for(var y=new Cn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Ua.prototype.copy=function(){return new Ua(this.ma)},Ua.prototype.Iv=function(){var a=new Cn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Ua.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},Ua.prototype.Hv=function(){var a=new Wn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},un.Object.defineProperties(Ua.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?$a:new Ss(this.ma)}}}),Ua.prototype.toList=Ua.prototype.Hv,Ua.prototype.toArray=Ua.prototype.Fa,Ua.prototype.toSet=Ua.prototype.Iv,Ua.prototype.first=Ua.prototype.first,Ua.prototype.clear=Ua.prototype.clear,Ua.prototype.delete=Ua.prototype.delete,Ua.prototype.remove=Ua.prototype.remove,Ua.prototype.has=Ua.prototype.has,Ua.prototype.contains=Ua.prototype.contains,Ua.prototype.add=Ua.prototype.add,Ua.prototype.thaw=Ua.prototype.ka,Ua.prototype.freeze=Ua.prototype.freeze,Ua.className="MapKeySet";function us(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}us.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},us.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},us.prototype.Ad=function(){return this.next()},us.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},us.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},us.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},us.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},us.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Wn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},us.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Wn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},us.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},us.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},un.Object.defineProperties(us.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),us.prototype.first=us.prototype.first,us.prototype.hasNext=us.prototype.Ad,us.prototype.next=us.prototype.next,us.prototype.reset=us.prototype.reset,us.className="MapValueSetIterator";function tl(a,y){this.key=a,this.value=y,this.ll=this.va=null}tl.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},tl.className="KeyValuePair";function ts(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ts.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},ts.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},ts.prototype.Ad=function(){return this.next()},ts.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},ts.prototype.any=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},ts.prototype.all=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},ts.prototype.each=function(a){var y=this.ma;for(this.sa=y.Sa=null,y=y.ea;y!==null;)a(y),y=y.va;return this},ts.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Wn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},ts.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Wn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},ts.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},ts.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},un.Object.defineProperties(ts.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ts.prototype.first=ts.prototype.first,ts.prototype.hasNext=ts.prototype.Ad,ts.prototype.next=ts.prototype.next,ts.prototype.reset=ts.prototype.reset,ts.className="MapIterator";function wr(a){Po(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.jf=this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&$t("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ee=wr.prototype,Ee.xb=function(){var a=this.Ja;a++,999999999=this.count)return $a;var a=this.Sa;return a!==null?(a.reset(),a):new ts(this)}},iteratorKeys:{get:function(){return 0>=this.count?$a:new Ss(this)}},iteratorValues:{get:function(){if(0>=this.count)return $a;var a=this.jf;return a!==null?(a.reset(),a):new us(this)}}}),wr.prototype.toKeySet=wr.prototype.Lf,wr.prototype.toArray=wr.prototype.Fa,wr.prototype.clear=wr.prototype.clear,wr.prototype.delete=wr.prototype.delete,wr.prototype.remove=wr.prototype.remove,wr.prototype.get=wr.prototype.get,wr.prototype.getValue=wr.prototype.I,wr.prototype.has=wr.prototype.has,wr.prototype.contains=wr.prototype.contains,wr.prototype.first=wr.prototype.first,wr.prototype.addAll=wr.prototype.addAll,wr.prototype.set=wr.prototype.set,wr.prototype.add=wr.prototype.add,wr.prototype.thaw=wr.prototype.ka,wr.prototype.freeze=wr.prototype.freeze,wr.className="Map";function st(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):$t("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var St,Rt,gn,Hn,Oi;st.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.h=function(a,y){return this.x=a,this.y=y,this},st.prototype.sg=function(a,y){return this.x=a,this.y=y,this},st.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.copy=function(){var a=new st;return a.x=this.x,a.y=this.y,a},Ee=st.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Yt(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new st(x,b)}return new st}function Zn(a){return a.x.toString()+" "+a.y.toString()}Ee.toString=function(){return"Point("+this.x+","+this.y+")"},Ee.D=function(a){return a instanceof st?this.x===a.x&&this.y===a.y:!1},Ee.hi=function(a,y){return this.x===a&&this.y===y},Ee.Xa=function(a){return Ot.B(this.x,a.x)&&Ot.B(this.y,a.y)},Ee.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ee.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ee.offset=function(a,y){return this.x+=a,this.y+=y,this},st.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Ee=st.prototype,Ee.scale=function(a,y){return this.x*=a,this.y*=y,this},Ee.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ee.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ee.normalize=function(){var a=this.x,y=this.y,x=Math.sqrt(a*a+y*y);return 0y?270:0;if(y===0)return 0a?x=0>y?x+180:180-x:0>y&&(x=360-x),x}Ee.Ry=function(a,y){return Ot.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ee.fA=function(a,y,x,E){return Ot.qh(a,y,x,E,this.x,this.y,this),this},Ee.gA=function(a,y){return Ot.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ee.uA=function(a,y,x,E){return Ot.No(this.x,this.y,a,y,x,E,this),this},Ee.vA=function(a,y){return Ot.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ee.xi=function(a,y){return this.x=a.x+y.x*a.width+y.offsetX,this.y=a.y+y.y*a.height+y.offsetY,this},Ee.yi=function(a,y,x,E,b){return this.x=a+b.x*x+b.offsetX,this.y=y+b.y*E+b.offsetY,this},Ee.transform=function(a){return a.Ga(this),this};function xi(a,y){return y.Cd(a),a}function nr(a,y,x,E,b,z){var ee=b-x,re=z-E,ae=ee*ee+re*re;x-=a,E-=y;var le=-x*ee-E*re;return 0>=le||le>=ae?(ee=b-a,re=z-y,Math.min(x*x+E*E,ee*ee+re*re)):(a=ee*E-re*x,a*a/ae)}function Zi(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function vi(a,y,x,E){return a=x-a,y=E-y,a===0?0y?270:0:y===0?0a?E=0>y?E+180:180-E:0>y&&(E=360-E),E)}Ee.w=function(){return isFinite(this.x)&&isFinite(this.y)},st.alloc=function(){var a=pr.pop();return a===void 0?new st:a},st.allocAt=function(a,y){var x=pr.pop();return x===void 0?new st(a,y):(x.x=a,x.y=y,x)},st.free=function(a){pr.push(a)},st.prototype.isReal=st.prototype.w,st.prototype.setSpot=st.prototype.yi,st.prototype.setRectSpot=st.prototype.xi,st.prototype.snapToGridPoint=st.prototype.vA,st.prototype.snapToGrid=st.prototype.uA,st.prototype.projectOntoLineSegmentPoint=st.prototype.gA,st.prototype.projectOntoLineSegment=st.prototype.fA,st.intersectingLineSegments=function(a,y,x,E,b,z,ee,re){return Ot.Rl(a,y,x,E,b,z,ee,re)},st.prototype.compareWithLineSegmentPoint=st.prototype.Ry,st.compareWithLineSegment=function(a,y,x,E,b,z){return Ot.Fl(a,y,x,E,b,z)},st.prototype.direction=st.prototype.direction,st.prototype.directionPoint=st.prototype.ab,st.prototype.normalize=st.prototype.normalize,st.prototype.distanceSquared=st.prototype.zd,st.prototype.distanceSquaredPoint=st.prototype.Bf,st.prototype.scale=st.prototype.scale,st.prototype.rotate=st.prototype.rotate,st.prototype.offset=st.prototype.offset,st.prototype.subtract=st.prototype.re,st.prototype.add=st.prototype.add,st.prototype.equalsApprox=st.prototype.Xa,st.prototype.equalTo=st.prototype.hi,st.prototype.equals=st.prototype.D,st.prototype.set=st.prototype.set,st.prototype.setTo=st.prototype.sg;var pr=[];st.className="Point",st.parse=Yt,st.stringify=Zn,st.distanceLineSegmentSquared=nr,st.distanceSquared=Zi,st.direction=vi,st.Origin=St=new st(0,0).ja(),st.InfiniteTopLeft=Rt=new st(-1/0,-1/0).ja(),st.InfiniteBottomRight=gn=new st(1/0,1/0).ja(),st.SixPoint=Hn=new st(6,6).ja(),st.NoPoint=Oi=new st(NaN,NaN).ja(),st.parse=Yt,st.stringify=Zn,st.distanceLineSegmentSquared=nr,st.distanceSquared=Zi,st.direction=vi;function fn(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):$t("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var eo,so,ya,fa,Ia,ns,Us;fn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},fn.prototype.h=function(a,y){return this.width=a,this.height=y,this},fn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},fn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},fn.prototype.copy=function(){var a=new fn;return a.width=this.width,a.height=this.height,a},Ee=fn.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ds(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new fn(x,b)}return new fn}function fl(a){return a.width.toString()+" "+a.height.toString()}Ee.toString=function(){return"Size("+this.width+","+this.height+")"},Ee.D=function(a){return a instanceof fn?this.width===a.width&&this.height===a.height:!1},Ee.hi=function(a,y){return this.width===a&&this.height===y},Ee.Xa=function(a){return Ot.B(this.width,a.width)&&Ot.B(this.height,a.height)},Ee.Bc=function(a,y){return a=this.width+a,this.width=0<=a?a:0,y=this.height+y,this.height=0<=y?y:0,this},Ee.w=function(){return isFinite(this.width)&&isFinite(this.height)},fn.alloc=function(){var a=Hs.pop();return a===void 0?new fn:a},fn.free=function(a){Hs.push(a)},fn.prototype.isReal=fn.prototype.w,fn.prototype.inflate=fn.prototype.Bc,fn.prototype.equalsApprox=fn.prototype.Xa,fn.prototype.equalTo=fn.prototype.hi,fn.prototype.equals=fn.prototype.D,fn.prototype.set=fn.prototype.set,fn.prototype.setTo=fn.prototype.sg;var Hs=[];fn.className="Size",fn.parse=Ds,fn.stringify=fl,fn.ZeroSize=eo=new fn(0,0).ja(),fn.OneSize=so=new fn(1,1).ja(),fn.SixSize=ya=new fn(6,6).ja(),fn.EightSize=fa=new fn(8,8).ja(),fn.TenSize=Ia=new fn(10,10).ja(),fn.InfiniteSize=ns=new fn(1/0,1/0).ja(),fn.NoSize=Us=new fn(NaN,NaN).ja(),fn.parse=Ds,fn.stringify=fl;function cn(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof st?(x=a.x,a=a.y,y instanceof st?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof fn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):$t("Incorrect second argument supplied to Rect constructor "+y)):$t("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Ee=cn.prototype,Ee.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ee.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function nl(a,y,x){a.width=y,a.height=x}Ee.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Ee.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ee.dd=function(a){return this.x=a.x,this.y=a.y,this},Ee.tA=function(a){return this.width=a.width,this.height=a.height,this},cn.prototype.copy=function(){var a=new cn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ee=cn.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function dl(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var ee=0;a[y]==="";)y++;return(E=a[y++])&&(ee=parseFloat(E)),new cn(x,b,z,ee)}return new cn}function gl(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ee.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ee.D=function(a){return a instanceof cn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ee.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Ee.Xa=function(a){return Ot.B(this.x,a.x)&&Ot.B(this.y,a.y)&&Ot.B(this.width,a.width)&&Ot.B(this.height,a.height)};function Ys(a,y){return Ot.$(a.x,y.x)&&Ot.$(a.y,y.y)&&Ot.$(a.width,y.width)&&Ot.$(a.height,y.height)}Ee.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ee.Re=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height},Ee.contains=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),this.x<=a&&a+x<=this.x+this.width&&this.y<=y&&y+E<=this.y+this.height},Ee.offset=function(a,y){return this.x+=a,this.y+=y,this},Ee.Bc=function(a,y){return Ul(this,y,a,y,a)},Ee.Co=function(a){return Ul(this,a.top,a.right,a.bottom,a.left)},Ee.Fv=function(a){return Ul(this,-a.top,-a.right,-a.bottom,-a.left)},Ee.Hz=function(a,y,x,E){return Ul(this,a,y,x,E)};function Ul(a,y,x,E,b){var z=a.width;return x+b<=-z?(a.x+=z/2,a.width=0):(a.x-=b,a.width+=x+b),x=a.height,y+E<=-x?(a.y+=x/2,a.height=0):(a.y-=y,a.height+=y+E),a}Ee.Ex=function(a){return hu(this,a.x,a.y,a.width,a.height)},Ee.Uu=function(a,y,x,E){return hu(this,a,y,x,E)};function hu(a,y,x,E,b){var z=Math.max(a.x,y),ee=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=ee,a.width=Math.max(0,y-z),a.height=Math.max(0,x-ee),a}Ee.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ee.Vu=function(a,y,x,E){var b=this.width,z=this.x;return b!==1/0&&x!==1/0&&(b+=z,x+=a,isNaN(x)||isNaN(b)||z>x||a>b)?!1:(a=this.height,x=this.y,!(a!==1/0&&E!==1/0&&(a+=x,E+=y,isNaN(E)||isNaN(a)||x>E||y>a)))};function fc(a,y){var x=a.width,E=a.x,b=y.x-10;return E>y.width+10+10+b||b>x+E?!1:(x=a.height,a=a.y,E=y.y-10,!(a>y.height+10+10+E||E>x+a))}Ee.Ye=function(a){return _s(this,a.x,a.y,0,0)},Ee.ed=function(a){return _s(this,a.x,a.y,a.width,a.height)},Ee.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),_s(this,a,y,x,E)};function _s(a,y,x,E,b){var z=Math.min(a.x,y),ee=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=ee,a.width=y-z,a.height=x-ee,a}Ee.yi=function(a,y,x){return this.x=a-x.offsetX-x.x*this.width,this.y=y-x.offsetY-x.y*this.height,this};function il(a,y,x,E,b,z,ee,re){return ee===void 0&&(ee=0),re===void 0&&(re=0),a<=b&&b+ee<=a+x&&y<=z&&z+re<=y+E}function Ra(a,y,x,E,b,z,ee,re){return a>ee+b||b>x+a?!1:!(y>re+z||z>E+y)}Ee.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ee.Mz=function(){return this.width===0&&this.height===0},cn.alloc=function(){var a=pl.pop();return a===void 0?new cn:a},cn.allocAt=function(a,y,x,E){var b=pl.pop();return b===void 0?new cn(a,y,x,E):b.h(a,y,x,E)},cn.free=function(a){pl.push(a)},un.Object.defineProperties(cn.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new st(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new fn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new st(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),cn.prototype.isEmpty=cn.prototype.Mz,cn.prototype.isReal=cn.prototype.w,cn.intersectsLineSegment=function(a,y,x,E,b,z,ee,re){return Ot.Fx(a,y,x,E,b,z,ee,re)},cn.prototype.setSpot=cn.prototype.yi,cn.prototype.union=cn.prototype.Kv,cn.prototype.unionRect=cn.prototype.ed,cn.prototype.unionPoint=cn.prototype.Ye,cn.prototype.intersects=cn.prototype.Vu,cn.prototype.intersectsRect=cn.prototype.Yc,cn.prototype.intersect=cn.prototype.Uu,cn.prototype.intersectRect=cn.prototype.Ex,cn.prototype.grow=cn.prototype.Hz,cn.prototype.subtractMargin=cn.prototype.Fv,cn.prototype.addMargin=cn.prototype.Co,cn.prototype.inflate=cn.prototype.Bc,cn.prototype.offset=cn.prototype.offset,cn.prototype.contains=cn.prototype.contains,cn.prototype.containsRect=cn.prototype.Re,cn.prototype.containsPoint=cn.prototype.ca,cn.prototype.equalsApprox=cn.prototype.Xa,cn.prototype.equalTo=cn.prototype.hi,cn.prototype.equals=cn.prototype.D,cn.prototype.setSize=cn.prototype.tA,cn.prototype.setPoint=cn.prototype.dd,cn.prototype.set=cn.prototype.set,cn.prototype.setTo=cn.prototype.sg;var Xa=null,Is=null,pl=[];cn.className="Rect",cn.parse=dl,cn.stringify=gl,cn.contains=il,cn.intersects=Ra,cn.ZeroRect=Xa=new cn(0,0,0,0).ja(),cn.NoRect=Is=new cn(NaN,NaN,NaN,NaN).ja(),cn.parse=dl,cn.stringify=gl,cn.contains=il,cn.intersects=Ra;function Mo(a,y,x,E){a===void 0?this.left=this.bottom=this.right=this.top=0:y===void 0?this.left=this.bottom=this.right=this.top=a:x===void 0?(this.top=a,this.right=y,this.bottom=a,this.left=y):E!==void 0?(this.top=a,this.right=y,this.bottom=x,this.left=E):$t("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Mo.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Mo.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Mo.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Mo.prototype.copy=function(){var a=new Mo;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ee=Mo.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function $u(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=NaN;a[y]==="";)y++;var E=a[y++];if(E&&(x=parseFloat(E)),isNaN(x))return new Mo;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Mo(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Mo(x,b);for(var ee=NaN;a[y]==="";)y++;return(E=a[y++])&&(ee=parseFloat(E)),isNaN(ee)?new Mo(x,b):new Mo(x,b,z,ee)}return new Mo}function Pu(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ee.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ee.D=function(a){return a instanceof Mo?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ee.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Ee.Xa=function(a){return Ot.B(this.top,a.top)&&Ot.B(this.right,a.right)&&Ot.B(this.bottom,a.bottom)&&Ot.B(this.left,a.left)},Ee.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Mo.alloc=function(){var a=gc.pop();return a===void 0?new Mo:a},Mo.free=function(a){gc.push(a)},Mo.prototype.isReal=Mo.prototype.w,Mo.prototype.equalsApprox=Mo.prototype.Xa,Mo.prototype.equalTo=Mo.prototype.hi,Mo.prototype.equals=Mo.prototype.D,Mo.prototype.set=Mo.prototype.set,Mo.prototype.setTo=Mo.prototype.sg;var $l=null,ou=null,gc=[];Mo.className="Margin",Mo.parse=$u,Mo.stringify=Pu,Mo.ZeroMargin=$l=new Mo(0,0,0,0).ja(),Mo.TwoMargin=ou=new Mo(2,2,2,2).ja(),Mo.parse=$u,Mo.stringify=Pu;function kr(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var hl,Rs,Bu,zu,Ou,Sa,Lu,Fl,Il,eu,Cc,du,Ol,Cu,Wc,ah,Hc,Yh,Wu,El,Hu,Iu,ku,Jc,Sh,ml,sh,lh,Nc,Ec,tu,Vl,xl,Ts,nu,ol;kr.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},kr.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},kr.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},kr.prototype.copy=function(){var a=new kr;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ee=kr.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this};function Vs(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Wl(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return hl;if(a==="TopLeft")return Rs;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Bu;if(a==="TopRight")return zu;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Ou;if(a==="Center")return Sa;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Lu;if(a==="BottomLeft")return Fl;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Il;if(a==="BottomRight")return eu;if(a==="TopSide")return Cc;if(a==="LeftSide")return du;if(a==="RightSide")return Ol;if(a==="BottomSide")return Cu;if(a==="TopBottomSides")return Wc;if(a==="LeftRightSides")return ah;if(a==="TopLeftSides")return Hc;if(a==="TopRightSides")return Yh;if(a==="BottomLeftSides")return Wu;if(a==="BottomRightSides")return El;if(a==="NotTopSide")return Hu;if(a==="NotLeftSide")return Iu;if(a==="NotRightSide")return ku;if(a==="NotBottomSide")return Jc;if(a==="AllSides")return Sh;if(a==="Default")return ml;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,ee=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=ee,this.translate(-y,-x),this},Ee=Fo.prototype,Ee.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ee.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ee.Ga=function(a){var y=a.x,x=a.y;return a.h(y*this.m11+x*this.m21+this.dx,y*this.m12+x*this.m22+this.dy)},Ee.Cd=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=a.x,E=a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ee.Eu=function(a){var y=1/(this.m11*this.m22-this.m12*this.m21),x=1.25*a.x,E=1.2*a.y;return a.h(x*this.m22*y+E*-this.m21*y+y*(this.m21*this.dy-this.m22*this.dx),x*-this.m12*y+E*this.m11*y+y*(this.m12*this.dx-this.m11*this.dy))},Ee.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,ee=this.m12,re=this.m21,ae=this.m22,le=this.dx,ce=this.dy,fe=y*z+x*re+le,Se=y*ee+x*ae+ce,we=E*z+x*re+le,Ae=E*ee+x*ae+ce;return x=y*z+b*re+le,y=y*ee+b*ae+ce,z=E*z+b*re+le,E=E*ee+b*ae+ce,b=Math.min(fe,we),fe=Math.max(fe,we),we=Math.min(Se,Ae),Se=Math.max(Se,Ae),b=Math.min(b,x),fe=Math.max(fe,x),we=Math.min(we,y),Se=Math.max(Se,y),b=Math.min(b,z),fe=Math.max(fe,z),we=Math.min(we,E),Se=Math.max(Se,E),a.h(b,we,fe-b,Se-we),a},Fo.alloc=function(){var a=gu.pop();return a===void 0?new Fo:a},Fo.free=function(a){gu.push(a)},Fo.prototype.transformRect=Fo.prototype.pp,Fo.prototype.transformPoint=Fo.prototype.Ga,Fo.prototype.scale=Fo.prototype.scale,Fo.prototype.translate=Fo.prototype.translate,Fo.prototype.rotate=Fo.prototype.rotate,Fo.prototype.invert=Fo.prototype.Vj,Fo.prototype.multiplyInverted=Fo.prototype.bv,Fo.prototype.multiply=Fo.prototype.multiply,Fo.prototype.reset=Fo.prototype.reset,Fo.prototype.isIdentity=Fo.prototype.ws,Fo.prototype.equals=Fo.prototype.D,Fo.prototype.setTransform=Fo.prototype.setTransform,Fo.prototype.set=Fo.prototype.set;var gu=[];Fo.className="Transform",Fo.xF="54a702f3e53909c447824c6706603faf4c";var Ot={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Ot.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Ot.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5a&&-5e-8=b&&(b=1e-6),ace-le)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=ee&&ee<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(ee=(x-a)/(E-y)*(ee-y)+a,ee-b<=z&&z<=ee+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,ee,re,ae,le,ce,fe){if(Ot.Yb(a,y,ee,re,fe,x,E)&&Ot.Yb(a,y,ee,re,fe,b,z))return Ot.Yb(a,y,ee,re,fe,le,ce);var Se=(a+x)/2,we=(y+E)/2,Ae=(x+b)/2,De=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(Se+Ae)/2,x=(we+De)/2,Ae=(Ae+b)/2,De=(De+z)/2;var tt=(E+Ae)/2,Ze=(x+De)/2;return Ot.cs(a,y,Se,we,E,x,tt,Ze,ae,le,ce,fe)||Ot.cs(tt,Ze,Ae,De,b,z,ee,re,ae,le,ce,fe)},ax:function(a,y,x,E,b,z,ee,re,ae){var le=(x+b)/2,ce=(E+z)/2;return ae.h((((a+x)/2+le)/2+(le+(b+ee)/2)/2)/2,(((y+E)/2+ce)/2+(ce+(z+re)/2)/2)/2),ae},My:function(a,y,x,E,b,z,ee,re){var ae=(x+b)/2,le=(E+z)/2;return vi(((a+x)/2+ae)/2,((y+E)/2+le)/2,(ae+(b+ee)/2)/2,(le+(z+re)/2)/2)},Dl:function(a,y,x,E,b,z,ee,re,ae,le){if(Ot.Yb(a,y,ee,re,ae,x,E)&&Ot.Yb(a,y,ee,re,ae,b,z))_s(le,a,y,0,0),_s(le,ee,re,0,0);else{var ce=(a+x)/2,fe=(y+E)/2,Se=(x+b)/2,we=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(ce+Se)/2,x=(fe+we)/2,Se=(Se+b)/2,we=(we+z)/2;var Ae=(E+Se)/2,De=(x+we)/2;Ot.Dl(a,y,ce,fe,E,x,Ae,De,ae,le),Ot.Dl(Ae,De,Se,we,b,z,ee,re,ae,le)}return le},Qe:function(a,y,x,E,b,z,ee,re,ae,le){if(Ot.Yb(a,y,ee,re,ae,x,E)&&Ot.Yb(a,y,ee,re,ae,b,z))le.length===0&&(le.push(a),le.push(y)),le.push(ee),le.push(re);else{var ce=(a+x)/2,fe=(y+E)/2,Se=(x+b)/2,we=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(ce+Se)/2,x=(fe+we)/2,Se=(Se+b)/2,we=(we+z)/2;var Ae=(E+Se)/2,De=(x+we)/2;Ot.Qe(a,y,ce,fe,E,x,Ae,De,ae,le),Ot.Qe(Ae,De,Se,we,b,z,ee,re,ae,le)}return le},jv:function(a,y,x,E,b,z,ee,re,ae,le){if(Ot.Yb(a,y,b,z,le,x,E))return Ot.Yb(a,y,b,z,le,re,ae);var ce=(a+x)/2,fe=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var Se=(ce+x)/2,we=(fe+E)/2;return Ot.jv(a,y,ce,fe,Se,we,ee,re,ae,le)||Ot.jv(Se,we,x,E,b,z,ee,re,ae,le)},OA:function(a,y,x,E,b,z,ee){return ee.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),ee},iv:function(a,y,x,E,b,z,ee,re){if(Ot.Yb(a,y,b,z,ee,x,E))_s(re,a,y,0,0),_s(re,b,z,0,0);else{var ae=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ce=(ae+x)/2,fe=(le+E)/2;Ot.iv(a,y,ae,le,ce,fe,ee,re),Ot.iv(ce,fe,x,E,b,z,ee,re)}return re},ep:function(a,y,x,E,b,z,ee,re){if(Ot.Yb(a,y,b,z,ee,x,E))re.length===0&&(re.push(a),re.push(y)),re.push(b),re.push(z);else{var ae=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ce=(ae+x)/2,fe=(le+E)/2;Ot.ep(a,y,ae,le,ce,fe,ee,re),Ot.ep(ce,fe,x,E,b,z,ee,re)}return re},Eo:function(a,y,x,E,b,z,ee,re,ae,le,ce,fe,Se,we){if(Ot.Yb(a,y,ee,re,Se,x,E)&&Ot.Yb(a,y,ee,re,Se,b,z))return!Ot.Rl(a,y,ee,re,ae,le,ce,fe)||(Se=(a-ee)*(le-fe)-(y-re)*(ae-ce),Se===0)?!1:(we.h(((a*re-y*ee)*(ae-ce)-(a-ee)*(ae*fe-le*ce))/Se,((a*re-y*ee)*(le-fe)-(y-re)*(ae*fe-le*ce))/Se),!0);var Ae=(a+x)/2,De=(y+E)/2,tt=(x+b)/2,Ze=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(Ae+tt)/2,x=(De+Ze)/2,tt=(tt+b)/2,Ze=(Ze+z)/2;var ht=(E+tt)/2,gt=(x+Ze)/2,xt=1/0,Dt=!1,qt=0,zi=0;return Ot.Eo(a,y,Ae,De,E,x,ht,gt,ae,le,ce,fe,Se,we)&&(a=(we.x-ae)*(we.x-ae)+(we.y-le)*(we.y-le),a=ce)return we;if((ae>ce?ae-ce:ce-ae)<(le>fe?le-fe:fe-le)){if(ya)return we}else if(aa)return we;0Se&&we--}else{Ae=(a+x)/2,De=(y+E)/2;var tt=(x+b)/2,Ze=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(Ae+tt)/2,x=(De+Ze)/2,tt=(tt+b)/2,Ze=(Ze+z)/2;var ht=(E+tt)/2,gt=(x+Ze)/2;we+=Ot.Fo(a,y,Ae,De,E,x,ht,gt,ae,le,ce,fe,Se),we+=Ot.Fo(ht,gt,tt,Ze,b,z,ee,re,ae,le,ce,fe,Se)}return we},qh:function(a,y,x,E,b,z,ee){return Ot.$(a,x)?(yy?(ee.h(a,y),!1):(ee.h(a,z),!0)):Ot.$(y,E)?(aa?(ee.h(a,y),!1):(ee.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(ee.h(a,y),!1):1.000005y?(ae.h(a,y),!1):(ae.h(a,x),!0)):(ee=(E-y)/(x-a),Ot.$(re,ee)?(Ot.qh(a,y,x,E,b,z,ae),!1):(b=(ee*a-re*b+z-y)/(ee-re),Ot.$(ee,0)?(aa?(ae.h(a,y),!1):(ae.h(b,y),!0)):Ot.qh(a,y,x,E,b,ee*(b-a)+y,ae))))},MA:function(a,y,x,E,b){return Ot.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,ee,re,ae,le){function ce(tt,Ze){var ht=(tt-a)*(tt-a)+(Ze-y)*(Ze-y);ht(x>a?x-a:a-x)){if(Se=1-(x-b)*(x-b)/(Se*Se),0>Se)return ae;Se=Math.sqrt(Se),E=-le*Se+z,ce(x,le*Se+z),ce(x,E)}else{if(x=(E-y)/(x-a),E=1/(Se*Se)+x*x/(le*le),re=2*x*(y-x*a)/(le*le)-2*x*z/(le*le)-2*b/(Se*Se),Se=re*re-4*E*(2*x*a*z/(le*le)-2*y*z/(le*le)+z*z/(le*le)+b*b/(Se*Se)-1+(y-x*a)*(y-x*a)/(le*le)),0>Se)return ae;Se=Math.sqrt(Se),le=(-re+Se)/(2*E),ce(le,x*le-x*a+y),Se=(-re-Se)/(2*E),ce(Se,x*Se-x*a+y)}return ae},Ff:function(a,y,x,E,b,z,ee,re,ae){var le=1e21,ce=a,fe=y;if(Ot.Ve(a,y,a,E,b,z,ee,re,ae)){var Se=(ae.x-b)*(ae.x-b)+(ae.y-z)*(ae.y-z);Sele},us:function(a,y,x){return Ot.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,ee,re){var ae=a+x,le=y+E;return b===ee?(z=y):z===re?(b=a):!!(il(a,y,x,E,b,z)||il(a,y,x,E,ee,re)||Ot.Rl(a,y,ae,y,b,z,ee,re)||Ot.Rl(ae,y,ae,le,b,z,ee,re)||Ot.Rl(ae,le,a,le,b,z,ee,re)||Ot.Rl(a,le,a,y,b,z,ee,re))},Rl:function(a,y,x,E,b,z,ee,re){return a===x&&y===E&&b===ee&&z===re?a===b&&y===z:0>=Ot.Fl(a,y,x,E,b,z)*Ot.Fl(a,y,x,E,ee,re)&&0>=Ot.Fl(b,z,ee,re,a,y)*Ot.Fl(b,z,ee,re,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var ee=Math.PI;z||(E*=ee/180,b*=ee/180);var re=E>b?-1:1;z=[];var ae=ee/2,le=E;if(E=Math.min(2*ee,Math.abs(b-E)),1e-5>E)return ae=le+re*Math.min(E,ae),re=a+x*Math.cos(le),le=y+x*Math.sin(le),a+=x*Math.cos(ae),y+=x*Math.sin(ae),x=(re+a)/2,ae=(le+y)/2,z.push([re,le,x,ae,x,ae,a,y]),z;for(;1e-5x,z=0>E;if(ale&&(y=.5*(re+ae),!(y===re||y===ae));++le){var ce=a/(y+b),fe=ee/(y+z);if(ce=ce*ce+fe*fe-1,0ce)ae=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,za?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a)+"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);case di.u:var y=new cn(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case di.F:if(y=new cn(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case di.o:y="",x=this.figures.s;for(var E=x.length,b=0;b=xt-1?!0:le[De+1].match(Dt)!==null}function E(){return De++,le[De]}function b(Bo){var xo=parseFloat(E()),qa=parseFloat(E());tt===tt.toLowerCase()&&(xo=gt.x+xo,qa=gt.y+qa),Bo.h(xo,qa)}function z(){return b(gt),gt}function ee(){return b(ht),ht}function re(){var Bo=Ze.toLowerCase();return Bo!=="c"&&Bo!=="s"&&Bo!=="q"&&Bo!=="t"?gt:new st(2*gt.x-ht.x,2*gt.y-ht.y)}y===void 0&&(y=!1);var ae=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ae,"$1 $2"),a=a.replace(ae,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var le=a.split(" ");for(a=0;a=xt-1);)if(Ze=tt,tt=E(),tt!=="")switch(tt.toUpperCase()){case"X":we=!0,fe=ce=!1;break;case"M":for(Ae=z(),a.mc===null||we===!0?(Gg(a,Ae.x,Ae.y,ce,!fe,Se),we=!1):a.moveTo(Ae.x,Ae.y),ae.assign(gt);!x();)Ae=z(),a.lineTo(Ae.x,Ae.y);break;case"L":for(;!x();)Ae=z(),a.lineTo(Ae.x,Ae.y);break;case"H":for(;!x();)gt=new st((tt===tt.toLowerCase()?gt.x:0)+parseFloat(E()),gt.y),a.lineTo(gt.x,gt.y);break;case"V":for(;!x();)gt=new st(gt.x,(tt===tt.toLowerCase()?gt.y:0)+parseFloat(E())),a.lineTo(gt.x,gt.y);break;case"C":for(;!x();){Ae=new st,b(Ae);var qt=ee(),zi=z();$d(a,Ae.x,Ae.y,qt.x,qt.y,zi.x,zi.y)}break;case"S":for(;!x();)Ae=re(),qt=ee(),zi=z(),$d(a,Ae.x,Ae.y,qt.x,qt.y,zi.x,zi.y);break;case"Q":for(;!x();)Ae=ee(),qt=z(),Km(a,Ae.x,Ae.y,qt.x,qt.y);break;case"T":for(;!x();)ht=Ae=re(),qt=z(),Km(a,Ae.x,Ae.y,qt.x,qt.y);break;case"B":for(;!x();){Ae=parseFloat(E()),qt=parseFloat(E()),zi=parseFloat(E());var cr=parseFloat(E()),tr=parseFloat(E()),gi=tr,_n=!1;x()||(gi=parseFloat(E()),x()||(_n=parseFloat(E())!==0)),tt===tt.toLowerCase()&&(zi+=gt.x,cr+=gt.y),a.arcTo(Ae,qt,zi,cr,tr,gi,_n)}break;case"A":for(;!x();)Ae=Math.abs(parseFloat(E())),qt=Math.abs(parseFloat(E())),zi=parseFloat(E()),tr=cr=!1,_n=gi=0,gi=E(),gi.length===1?(cr=!!parseFloat(gi),tr=!!parseFloat(E()),gi=parseFloat(E())):gi.length===2?(cr=!!parseFloat(gi[0]),tr=!!parseFloat(gi[1]),gi=parseFloat(E())):(cr=!!parseFloat(gi[0]),tr=!!parseFloat(gi[1]),gi=parseFloat(gi.slice(2))),_n=parseFloat(E()),tt===tt.toLowerCase()&&(gi=gt.x+gi,_n=gt.y+_n),gt.h(gi,_n),Nx(a,Ae,qt,zi,cr,tr,gi,_n);break;case"Z":Fx(a),gt.assign(ae);break;case"F":for(Ae="",qt=1;le[De+qt];)if(le[De+qt]==="0")Se=!0,qt++;else if(le[De+qt].match(/[Uu]/)!==null)qt++;else if(le[De+qt].match(Dt)===null)qt++;else{Ae=le[De+qt];break}Ae.match(/[Mm]/)?ce=!0:0ee&&(ee+=360),Ae.startAngle+=ee),0>a&&(Ae.startAngle=180-Ae.startAngle,Ae.sweepAngle=-Ae.sweepAngle),0>E&&(Ae.startAngle=-Ae.startAngle,Ae.sweepAngle=-Ae.sweepAngle),Ae.radiusX*=Math.sqrt(a*a+x*x),Ae.radiusY!==void 0&&(Ae.radiusY*=Math.sqrt(y*y+E*E));break;case su:if(ee=Ae.endX,re=Ae.endY,Ae.endX=ee*a+re*x+b,Ae.endY=ee*y+re*E+z,Ae.radiusX===0||Ae.radiusY===0)break;y!==0&&(ee=180*Math.atan2(y,a)/Math.PI,0>ee&&(ee+=360),Ae.xAxisRotation+=ee),0>a&&(Ae.xAxisRotation=180-Ae.xAxisRotation,Ae.isClockwiseArc=!Ae.isClockwiseArc),0>E&&(Ae.xAxisRotation=-Ae.xAxisRotation,Ae.isClockwiseArc=!Ae.isClockwiseArc),Ae.radiusX*=Math.sqrt(a*a+x*x),Ae.radiusY*=Math.sqrt(y*y+E*E);break;default:$t("Unknown Segment type: "+Ae.type)}}}}return this._isInvalidBounds=!0,this},Ee.ca=function(a,y){y===void 0&&(y=0);var x=this.od,E=this.pd,b=this.Dc,z=this.Ec;switch(this.type){case di.j:return Ot.Yb(x,E,b,z,y,a.x,a.y);case di.u:var ee=cn.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=ee.ca(a),cn.free(ee),a;case di.F:ee=Math.min(x,b)-y;var re=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(ee=a.x-(ee+x),re=a.y-(re+y),1>=ee*ee/(x*x)+re*re/(y*y));case di.o:return ec(this,a,y,!0,!1);default:return!1}};function ec(a,y,x,E,b){var z=y.x;y=y.y;for(var ee=a.bounds.x-20,re=0,ae,le,ce,fe,Se=a.figures.s,we=Se.length,Ae=0;Ae=a)return 0;if((b>ee?b-ee:ee-b)<(z>re?z-re:re-z)){if(zre)return 0}else if(yz)return 0}else if(bee)return 0}else if(leb)return 0;return 0a?a=0:1=z)return E=z-ee,E=ce===0?0:E/ce,x=x[re],re=x[2*a],b=x[2*a+1],y.h(re+(x[2*a+2]-re)*E,b+(x[2*a+3]-b)*E),y;ee+=ce}}return y},Ee.wx=function(a){if(0>a?a=0:1=b)return b=y[ee],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=le}}return NaN},Ee.Qu=function(a,y){if(0>a?a=0:1=z)return E=z-ee,E=ce===0?0:E/ce,ce=x[re],x=ce[2*a],re=ce[2*a+1],b=ce[2*a+2],a=ce[2*a+3],y[0]=x+(b-x)*E,y[1]=re+(a-re)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-re)?0:1>Math.abs(b-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=b-x?0:180:180*Math.atan2(a-re,b-x)/Math.PI,y;ee+=ce}}return y},Ee.xx=function(a){if(this.type===di.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x=E?E===x?0:1:Math.abs(a-x)/(E-ee)}if(x===b)return y=E?E===y?0:1:Math.abs(z-y)/(E-ee);ee=(E-y)*(E-y)+(b-x)*(b-x);var re=st.alloc();return Ot.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,st.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ee)}}else if(this.type===di.u){ee=this.startX,re=this.startY;var ae=this.endX;if(b=this.endY,ee!==ae||re!==b){y=ae-ee,x=b-re,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,ee),ae),a=Math.min(Math.max(a,re),b),ee=Math.abs(E-ee),ae=Math.abs(E-ae),re=Math.abs(a-re),b=Math.abs(a-b);var le=Math.min(ee,ae,re,b);if(le===re)return E/z;if(le===ae)return(y+a)/z;if(le===b)return(2*y+x-E)/z;if(le===ee)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=st.alloc(),b=1/0,re=ee=0,ae=y.length;for(var ce=le=0,fe=0;fea?0:1a?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(a)+" "+this.startY.toFixed(a),x=this.segments.s,E=x.length,b=0;ba&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof ee=="boolean"?ee&&(this.isLargeArc=!0):typeof ee=="number"&&ee&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===sl&&(z=Math.max(z,0)),this.Wh=z,typeof ee=="number"?(a===sl&&(ee=Math.max(ee,0)),this.Pg=ee):this.Pg=0),this.ae=null}Ca.prototype.copy=function(){var a=new Ca;return a.na=this.na,a.l=this.l&-2,a.Dc=this.Dc,a.Ec=this.Ec,a.Ne=this.Ne,a.Vh=this.Vh,a.Wh=this.Wh,a.Pg=this.Pg,a},Ee=Ca.prototype,Ee.Xa=function(a){if(!(a instanceof Ca)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ll:case fs:return Ot.B(this.endX,a.endX)&&Ot.B(this.endY,a.endY);case Ml:return Ot.B(this.endX,a.endX)&&Ot.B(this.endY,a.endY)&&Ot.B(this.point1X,a.point1X)&&Ot.B(this.point1Y,a.point1Y)&&Ot.B(this.point2X,a.point2X)&&Ot.B(this.point2Y,a.point2Y);case Fu:return Ot.B(this.endX,a.endX)&&Ot.B(this.endY,a.endY)&&Ot.B(this.point1X,a.point1X)&&Ot.B(this.point1Y,a.point1Y);case sl:return Ot.B(this.startAngle,a.startAngle)&&Ot.B(this.sweepAngle,a.sweepAngle)&&Ot.B(this.centerX,a.centerX)&&Ot.B(this.centerY,a.centerY)&&Ot.B(this.radiusX,a.radiusX)&&Ot.B(this.radiusY,a.radiusY);case su:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Ot.B(this.xAxisRotation,a.xAxisRotation)&&Ot.B(this.endX,a.endX)&&Ot.B(this.endY,a.endY)&&Ot.B(this.radiusX,a.radiusX)&&Ot.B(this.radiusY,a.radiusY);default:return!1}},Ee.qb=function(a){a.classType===Ca&&(this.type=a)},Ee.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ll:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case fs:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ml:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Fu:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case sl:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case su:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return this._isFrozen=!1,this},Ee.close=function(){return this.isClosed=!0,this};function mu(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=Ot.jx(0,0,x=we?ee=Math.PI:1<=we&&(ee=0),!ae&&0ee&&(ee+=2*Math.PI),ae=y>z?1:y/z,we=y>z?z/y:1,y=Ot.jx(0,0,y>z?y:z,ce,ce+ee,!0),z=Fo.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ae,we),di.Ha(y,z),Fo.free(z),a.ae=y,a.ae}un.Object.defineProperties(Ca.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&_i(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&_i(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&_i(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&_i(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&_i(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&_i(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&_i(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&_i(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&_i(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Wr(a,">= zero",Ca,"radiusX"),this._isFrozen&&_i(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Wr(a,">= zero",Ca,"radiusY"),this._isFrozen&&_i(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&_i(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&_i(this,a),360a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&_i(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&_i(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&_i(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Ca.prototype.equalsApprox=Ca.prototype.Xa;var ll=new ln(Ca,"Move",0),fs=new ln(Ca,"Line",1),Ml=new ln(Ca,"Bezier",2),Fu=new ln(Ca,"QuadraticBezier",3),sl=new ln(Ca,"Arc",4),su=new ln(Ca,"SvgArc",4);Ca.className="PathSegment",Ca.Move=ll,Ca.Line=fs,Ca.Bezier=Ml,Ca.QuadraticBezier=Fu,Ca.Arc=sl,Ca.SvgArc=su;function Gl(){this.H=null,this.xu=new st(0,0).freeze(),this.mt=new st(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}Gl.prototype.copy=function(){var a=new Gl;return this.clone(a)},Gl.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},Gl.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},Gl.prototype.So=function(a,y){var x=this.diagram;return x===null||Pa(x,a,y),y},Gl.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Pa(x,a,y),y.assign(x.Ps(y))),y},un.Object.defineProperties(Gl.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),Gl.prototype.getMultiTouchDocumentPoint=Gl.prototype.Bz,Gl.prototype.getMultiTouchViewPoint=Gl.prototype.So,Gl.className="InputEvent";function tc(){this.H=null,this.xa="",this.ar=this.Lr=null}tc.prototype.copy=function(){var a=new tc;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},tc.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},un.Object.defineProperties(tc.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}}),tc.className="DiagramEvent";function Bs(){this.Fm=As,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Bs.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Bs.prototype.copy=function(){var a=new Bs;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=Sn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Sn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Sn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Sn(y)&&typeof y.J=="function"?y.J():y,a},Bs.prototype.qb=function(a){a.classType===Bs&&(this.change=a)},Bs.prototype.toString=function(){var a="";return a=this.change===vu?a+"* ":this.change===As?a+(this.model!==null?"!m":"!d"):a+((this.model!==null?"!m":"!d")+this.change),this.propertyName&&typeof this.propertyName=="string"&&(a+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(a+=" "+this.modelChange),a+=": ",this.change===vu?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=va(this.object)),this.oldValue!==null&&(a+=" old: "+va(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+va(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Bs.prototype.I=function(a){return a?this.oldValue:this.newValue},Bs.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Bs.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Bs.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Bs.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Bs.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},un.Object.defineProperties(Bs.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===vu&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),Bs.prototype.redo=Bs.prototype.redo,Bs.prototype.canRedo=Bs.prototype.canRedo,Bs.prototype.undo=Bs.prototype.undo,Bs.prototype.canUndo=Bs.prototype.canUndo,Bs.prototype.getParam=Bs.prototype.Dz,Bs.prototype.getValue=Bs.prototype.I,Bs.prototype.clear=Bs.prototype.clear;var vu=new ln(Bs,"Transaction",-1),As=new ln(Bs,"Property",0),Ms=new ln(Bs,"Insert",1),Zs=new ln(Bs,"Remove",2);Bs.className="ChangedEvent",Bs.Transaction=vu,Bs.Property=As,Bs.Insert=Ms,Bs.Remove=Zs;function Pl(){this.o=new Wn().freeze(),this.xa="",this.j=!1}Pl.prototype.toString=function(a){var y="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(a!==void 0&&0y&&a.cd(y,E),y++);for(;a.length>y;)a.pop();a.freeze()}},un.Object.defineProperties(Pl.prototype,{changes:{get:function(){return this.o}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isComplete:{get:function(){return this.j},set:function(a){this.j=a}}}),Pl.prototype.optimize=Pl.prototype.ak,Pl.prototype.redo=Pl.prototype.redo,Pl.prototype.canRedo=Pl.prototype.canRedo,Pl.prototype.undo=Pl.prototype.undo,Pl.prototype.canUndo=Pl.prototype.canUndo,Pl.prototype.clear=Pl.prototype.clear,Pl.className="Transaction";function js(){this.Pt=new Cn,this.Jd=!1,this.u=new Wn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Wn().freeze(),this.hl=new Wn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}js.prototype.toString=function(a){var y="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;y+="[";for(var x=this.nestedTransactionNames.count,E=0;Ea.transactionLevel&&Br("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}Ee.lx=function(){if(!this.isUndoingRedoing&&this.canRedo()){var a=this.history;a.ka();for(var y=a.count-1;y>this.historyIndex;y--){var x=a.M(y);x!==null&&x.clear(),a.mb(y),this.rq=!0}a.freeze()}},js.prototype.canUndo=function(){if(!this.isEnabled||0=this.transactionLevel&&!this.tt&&(a=a.diagram,a!==null&&a.pi===!1||Br("Change not within a transaction: "+x.toString()))}},js.prototype.skipsEvent=function(a){if(a===null||0>a.change.value)return!0;if(a=a.object,a===null)return!1;if(a.layer!==void 0){if(a=a.layer,a!==null&&a.isTemporary)return!0}else if(a.isTemporary)return!0;return!1},un.Object.defineProperties(js.prototype,{models:{get:function(){return this.Pt.iterator}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.M(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexb||Math.abs(y.y-a.y)>E},un.Object.defineProperties(_r.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Et&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),_r.prototype.startTransaction=_r.prototype.Ea,_r.className="Tool";function xs(){_r.call(this),this.name="ToolManager",this.hb=new Wn,this.ob=new Wn,this.Hb=new Wn,this.F=this.V=850,this.o=new fn(2,2).ja(),this.Ha=5e3,this.ia=Vc,this.u=_u,this.Mp=this.j=null,this.zj=-1}Ft(xs,_r),xs.prototype.initializeStandardTools=function(){},xs.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Ga&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},xs.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Dc&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Zu){y.bubbles=!0;return}if(this.gestureBehavior===Dc)return;if(a.currentTool.canStartMultiTouch()){a.currentTool.standardPinchZoomStart();return}}for(var x=this.mouseDownTools.length,E=0;Eb.right&&(x.x-=E.width+5/y.scale),x.xb.bottom?x.y-(E.height+5/y.scale):x.y+20/y.scale,x.yx.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,ee=null;x.fromNode===null&&(z=Bi(a,x.i(0),!1),z!==null&&(ee=z.part));var re=null,ae=null;x.toNode===null&&(re=Bi(a,x.i(x.pointsCount-1),!0),re!==null&&(ae=re.part)),b.isValidLink(ee,z,ae,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ee,z!==null&&(x.fromPortId=z.portId),x.toNode=ae,re!==null&&(x.toPortId=re.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):ze(b,ee,z,ae,re):ze(b,null,null,null,null)}}}}Ko.prototype.doDragOver=function(){};function Xi(a,y){var x=a.diagram;a.dragsLink&&ir(a,!0),Lt(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var ee=z.mouseDrop;if(ee!==null&&(ee(b,z),b.handled))break;Tr(a,b,z),z=gr(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Yr!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Ki&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Yr!==null){for(a=cn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Ki&&ro(x,E,a);cn.free(a)}}}function Tr(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof Io||(x=a.mouseDrop,x!==null&&x(y))}function ro(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof mi},!0,function(b){return b instanceof mi},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Ko.prototype.doDropOnto=function(){},Ko.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(It(this,!1),pa(a,this.copiedParts),Tn(this,this.copiedParts,!1),Lo(a,this.copiedParts)):this.mayMove()?(dn(this),Tn(this,this.draggedParts,!0)):this.mayDragOut()?(It(this,!1),Tn(this,this.copiedParts,!1)):dn(this),ji(this,a.lastInput.documentPoint))}},Ko.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(dn(this),It(this,!0),pa(a,this.copiedParts),Tn(this,this.copiedParts,!1),Lo(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,dn(this),this.mayMove()&&(Tn(this,this.draggedParts,!0),ji(this,a.lastInput.documentPoint))),this.Ym=!0,Xi(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&Ro(this),a.Ya(),Lo(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Ko.prototype.simulatedMouseMove=function(a,y,x){if(Yr===null)return!1;var E=Yr.diagram;x instanceof Et||(x=null);var b=ko;return x!==b&&(b!==null&&b!==E&&(b.ug(),Yr.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),ko=x,x!==null&&x!==E&&(Tt(),b=x.toolManager.findTool("Dragging"),b!==null&&(lu.contains(b)||lu.add(b),b.doSimulatedDragEnter())),this.doUpdateCursor(null)),x===null||x===E||!x.allowDrop||x.isReadOnly||!x.allowInsert?!1:(E=x.toolManager.findTool("Dragging"),E!==null&&(a!==null&&(a.targetTouches!==void 0&&(0ee&&(ee=le),ce>re&&(re=ce))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,ee-E,re-b),E=z.x+z.width/2,b=z.y+z.height/2,cn.free(z),z=a.Fr,ee=new wr,re=st.alloc(),ae=y.iterator;ae.next();)le=ae.value,le instanceof mi&&le.canCopy()&&(ce=x.I(le),ce!==null&&(ce.points=le.points,nf(ce,z.x-E,z.y-b),ce.suspendsRouting=!0,ee.add(ce,a.Pd())));for(y=y.iterator;y.next();)le=y.value,le.Zc()&&le.canCopy()&&(ae=x.I(le),ae!==null&&(le=le.location,re.h(z.x-(E-le.x),z.y-(b-le.y)),ae.location=re,ae.Va(),ee.add(ae,a.Pd(re))));st.free(re),a.copiedParts=ee,Qe(a,ee.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,nf(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Ko.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Ko.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new st},un.Object.defineProperties(Ko.prototype,{isCopyEnabled:{get:function(){return this.ob},set:function(a){this.ob=a}},copiesEffectiveCollection:{get:function(){return this.u},set:function(a){this.u=a}},dragOptions:{get:function(){return this.ia},set:function(a){this.ia=a}},isGridSnapEnabled:{get:function(){return this.dragOptions.isGridSnapEnabled},set:function(a){this.dragOptions.isGridSnapEnabled=a}},isComplexRoutingRealtime:{get:function(){return this.hb},set:function(a){this.hb=a}},isGridSnapRealtime:{get:function(){return this.dragOptions.isGridSnapRealtime},set:function(a){this.dragOptions.isGridSnapRealtime=a}},gridSnapCellSize:{get:function(){return this.dragOptions.gridSnapCellSize},set:function(a){this.dragOptions.gridSnapCellSize.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSize=a)}},gridSnapCellSpot:{get:function(){return this.dragOptions.gridSnapCellSpot},set:function(a){this.dragOptions.gridSnapCellSpot.D(a)||(a=a.J(),this.dragOptions.gridSnapCellSpot=a)}},gridSnapOrigin:{get:function(){return this.dragOptions.gridSnapOrigin},set:function(a){this.dragOptions.gridSnapOrigin.D(a)||(a=a.J(),this.dragOptions.gridSnapOrigin=a)}},dragsLink:{get:function(){return this.dragOptions.dragsLink},set:function(a){this.dragOptions.dragsLink=a}},dragsTree:{get:function(){return this.dragOptions.dragsTree},set:function(a){this.dragOptions.dragsTree=a}},copyCursor:{get:function(){return this.F},set:function(a){this.F=a}},moveCursor:{get:function(){return this.Oc},set:function(a){this.Oc=a}},nodropCursor:{get:function(){return this.Pc},set:function(a){this.Pc=a}},currentPart:{get:function(){return this.V},set:function(a){this.V=a}},copiedParts:{get:function(){return this.o},set:function(a){this.o=a}},draggedParts:{get:function(){return this.Ha},set:function(a){this.Ha=a}},draggingParts:{get:function(){return this.copiedParts!==null?this.copiedParts.Lf():this.draggedParts!==null?this.draggedParts.Lf():this.te}},draggedLink:{get:function(){return this.diagram.draggedLink},set:function(a){this.diagram.draggedLink=a}},isDragOutStarted:{get:function(){return this.Hb},set:function(a){this.Hb=a}},startPoint:{get:function(){return this.Fr},set:function(a){this.Fr.D(a)||this.Fr.assign(a)}},delay:{get:function(){return this.Ik},set:function(a){this.Ik=a}}}),Ko.prototype.getDraggingSource=Ko.prototype.Az;var Yr=null,ko=null;Ko.className="DraggingTool",lu=new Wn,pi("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),xs.prototype.doCancel=function(){Yr!==null&&Yr.doCancel(),_r.prototype.doCancel.call(this)};function oo(){_r.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new mi,y=new Zo;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Zo,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Ki,y=new Zo,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=so,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Ki,y=new Zo,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=so,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new wr,this.Of=this.gj=this.Pf=null}Ft(oo,_r),oo.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},oo.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ee=fn.alloc();ee.width=y.naturalBounds.width*z,ee.height=y.naturalBounds.height*z,E.desiredSize=ee,fn.free(ee),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Sa,z=st.alloc(),x.location=y.ga(Sa,z),st.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},oo.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=so,y.fromSpot=hl,y.toSpot=hl),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},oo.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},oo.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Ki){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},oo.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Ki))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Ki)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},oo.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(fe){return b.findValidLinkablePort(fe,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var ee=z.value,re=ee.part;if(re instanceof Ki){var ae=ee.ga(Sa,st.alloc()),le=x.x-ae.x,ce=x.y-ae.y;st.free(ae),ae=le*le+ce*ce,aex){if(this.originalLink!==null&&a===this.originalFromNode&&y===this.originalFromPort)return!0;if(y=y.portId,y===null&&(y=""),a.Mo(y).count>=x)return!1}return!0},oo.prototype.isValidTo=function(a,y){if(a===null||y===null)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(a.layer!==null&&!a.layer.allowLink||y.toLinkable!==!0))return!1;var x=y.toMaxLinks;if(1/0>x){if(this.originalLink!==null&&a===this.originalToNode&&y===this.originalToPort)return!0;if(y=y.portId,y===null&&(y=""),a.Sd(y).count>=x)return!1}return!0},oo.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},oo.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Ki))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Ki))return!1;for(y=y.portId,y===null&&(y=""),y=E.Sd(y);y.next();)if(E=y.value,E.fromNode===x&&E.fromPortId===a)return!0;return!1},oo.prototype.isValidLink=function(a,y,x,E){if(!this.isValidFrom(a,y)||!this.isValidTo(x,E)||!(y===null||E===null||(y.fromLinkableSelfNode&&E.toLinkableSelfNode||!this.isInSameNode(y,E))&&(y.fromLinkableDuplicates&&E.toLinkableDuplicates||!this.isLinked(y,E)))||this.originalLink!==null&&(a!==null&&this.isLabelDependentOnLink(a,this.originalLink)||x!==null&&this.isLabelDependentOnLink(x,this.originalLink))||a!==null&&x!==null&&(a.data===null&&x.data!==null||a.data!==null&&x.data===null)||!this.isValidCycle(a,x,this.originalLink))return!1;if(a!==null){var b=a.linkValidation;if(b!==null&&!b(a,y,x,E,this.originalLink))return!1}return x!==null&&(b=x.linkValidation,b!==null&&!b(a,y,x,E,this.originalLink))?!1:(b=this.linkValidation,b!==null?b(a,y,x,E,this.originalLink):!0)},oo.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new Cn;return E.add(a),oa(this,x,y,E)};function oa(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),oa(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),oa(a,y.labeledLink,x,E))))}oo.prototype.isValidCycle=function(a,y,x){if(x===void 0&&(x=null),a===null||y===null)return this.isUnconnectedLinkValid;var E=this.diagram.validCycle;if(E!==qh){if(E===Fd){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=y.linksConnected;E.next();){var b=E.value;if(b!==x&&b.isTreeLink&&b.toNode===y)return!1}return!_a(this,a,y,x,!0)}if(E===Zd){if(E=x||this.temporaryLink,E!==null&&!E.isTreeLink)return!0;for(E=a.linksConnected;E.next();)if(b=E.value,b!==x&&b.isTreeLink&&b.fromNode===a)return!1;return!_a(this,a,y,x,!0)}if(E===Ph)return a===y?a=!0:(E=new Cn,E.add(y),a=qo(this,E,a,y,x)),!a;if(E===ud)return!_a(this,a,y,x,!1);if(E===cd)return a===y?a=!0:(E=new Cn,E.add(y),a=cs(this,E,a,y,x)),!a}return!0};function _a(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var ee=z.value;if(ee!==E&&(!b||ee.isTreeLink)&&ee.toNode===y&&(ee=ee.fromNode,ee!==y&&_a(a,ee,x,E,b)))return!0}return!1}function qo(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ee=z.value;if(ee!==b&&ee.toNode===x&&(ee=ee.fromNode,ee!==x&&qo(a,y,ee,E,b)))return!0}return!1}function cs(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ee=z.value;if(ee!==b){var re=ee.fromNode;if(ee=ee.toNode,re=re===x?ee:re,re!==x&&cs(a,y,re,E,b))return!0}}return!1}un.Object.defineProperties(oo.prototype,{portGravity:{get:function(){return this.te},set:function(a){0<=a&&(this.te=a)}},isUnconnectedLinkValid:{get:function(){return this.Ha},set:function(a){this.Ha=a}},linkingCursor:{get:function(){return this.u},set:function(a){this.u=a}},temporaryLink:{get:function(){return this.Ci},set:function(a){this.Ci=a}},temporaryFromNode:{get:function(){return this.Bi},set:function(a){(this.Bi=a)&&(this.j=a.port)}},temporaryFromPort:{get:function(){return this.j},set:function(a){if(this.j!==null){var y=this.j.panel;if(y!==null){var x=y.O.indexOf(this.j);y.mb(x),y.Gb(x,a)}}this.j=a}},temporaryToNode:{get:function(){return this.Di},set:function(a){(this.Di=a)&&(this.o=a.port)}},temporaryToPort:{get:function(){return this.o},set:function(a){if(this.o!==null){var y=this.o.panel;if(y!==null){var x=y.O.indexOf(this.o);y.mb(x),y.Gb(x,a)}}this.o=a}},originalLink:{get:function(){return this.Hb},set:function(a){this.Hb=a}},originalFromNode:{get:function(){return this.hb},set:function(a){this.hb=a}},originalFromPort:{get:function(){return this.ob},set:function(a){this.ob=a}},originalToNode:{get:function(){return this.Oc},set:function(a){this.Oc=a}},originalToPort:{get:function(){return this.Pc},set:function(a){this.Pc=a}},isForwards:{get:function(){return this.ia},set:function(a){this.ia=a}},validPortsCache:{get:function(){return this.hy}},targetPort:{get:function(){return this.Pf},set:function(a){this.Pf=a}},linkValidation:{get:function(){return this.gj},set:function(a){this.gj=a}},portTargeted:{get:function(){return this.Of},set:function(a){this.Of=a}}}),oo.className="LinkingBaseTool";function ja(){oo.call(this),this.name="Linking",this.V={},this.F=null,this.K=rs,this.Xd=null}Ft(ja,oo),ja.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.xs()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:this.findLinkablePort()!==null},ja.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof Ki)))return null;var x=this.direction;if(x===rs||x===qs){var E=this.findValidLinkablePort(y,!1);if(E!==null||this.startObject===a&&(E=a.port,this.findValidLinkablePort(E,!1)))return this.isForwards=!0,E}return(x===rs||x===Cs)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ja.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof Ki&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof Ki&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},ja.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},ja.prototype.doStop=function(){oo.prototype.doStop.call(this),this.startObject=null},ja.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var ee=this.targetPort=this.findTargetPort(this.isForwards);if(ee!==null){var re=ee.part;re instanceof Ki&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=re,b=ee):(y=re,x=ee,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(ee===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},ja.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof mi)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},ja.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},ja.prototype.doNoLink=function(){},un.Object.defineProperties(ja.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}});var rs=new ln(ja,"Either",0),qs=new ln(ja,"ForwardsOnly",0),Cs=new ln(ja,"BackwardsOnly",0);ja.className="LinkingTool",ja.Either=rs,ja.ForwardsOnly=qs,ja.BackwardsOnly=Cs;function Be(){oo.call(this),this.name="Relinking";var a=new Zo;a.figure="Diamond",a.desiredSize=fa,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Zo,a.figure="Diamond",a.desiredSize=fa,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new cn}Ft(Be,oo),Be.prototype.updateAdornments=function(a){if(a!==null&&a instanceof mi){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Be.prototype.makeAdornment=function(a,y){var x=new Ga;return x.type=ui.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Be.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!a.lastInput.left)return!1;var y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");return y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")),y!==null},Be.prototype.doActivate=function(){var a=this.diagram;if(this.originalLink===null){var y=this.handle;if(y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"))),y===null)return;var x=y.part;if(!(x instanceof Ga&&x.adornedPart instanceof mi))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0y.firstPickIndex+1&&x=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break e;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof ui)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},Ye.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return!a.isReadOnly&&a.allowResize&&a.lastInput.left?this.findToolHandleAt(a.firstInput.documentPoint,this.name)!==null:!1},Ye.prototype.doActivate=function(){var a=this.diagram;this.handle===null&&(this.handle=this.findToolHandleAt(a.firstInput.documentPoint,this.name)),this.handle!==null&&(this.adornedObject=this.handle.part.adornedObject,this.adornedObject!==null&&(a.isMouseCaptured=!0,a.animationManager.Cc(),this.Ea(this.name),this.Xq.set(this.adornedObject.ga(this.handle.alignment.gv())),this.Tn.set(this.adornedObject.part.location),this.Dw.set(this.adornedObject.desiredSize),this.pt=this.computeCellSize(),this.rt=this.computeMinSize(),this.qt=this.computeMaxSize(),this.isActive=!0))},Ye.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},Ye.prototype.stopTransaction=function(){var a=this.diagram,y=_r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Ye.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Ye.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,st.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),st.free(b)}},Ye.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,st.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),st.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Ye.prototype.resize=function(a){var y=this.diagram,x=this.adornedObject;if(x!==null){if(x.desiredSize=a.size,a=x.part,a.Va(),x=x.ga(this.handle.alignment.gv()),a instanceof Io){var E=new Wn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new oe;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},Ye.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Sa);var ee=this.adornedObject.naturalBounds,re=ee.x,ae=ee.y,le=ee.x+ee.width,ce=ee.y+ee.height,fe=1;if(!z){fe=ee.width;var Se=ee.height;0>=fe&&(fe=1),0>=Se&&(Se=1),fe=Se/fe}return Se=st.alloc(),Ot.No(a.x,a.y,re,ae,b.width,b.height,Se),a=ee.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Se.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.y=Math.max(Se.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(fe*a.width,E.height),x.height),a.width=a.height/fe):(a.width=Math.max(Math.min(a.height/fe,E.width),x.width),a.height=fe*a.width),a.x=le-a.width,a.y=ce-a.height)):1<=y.y?(a.x=Math.max(Se.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.height=Math.max(Math.min(Se.y-ae,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(fe*a.width,E.height),x.height),a.width=a.height/fe):(a.width=Math.max(Math.min(a.height/fe,E.width),x.width),a.height=fe*a.width),a.x=le-a.width)):(a.x=Math.max(Se.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=le-a.x,z||(a.height=Math.max(Math.min(fe*a.width,E.height),x.height),a.width=a.height/fe,a.y=ae+.5*(ce-ae-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Se.x-re,E.width),x.width),a.y=Math.max(Se.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(fe*a.width,E.height),x.height),a.width=a.height/fe):(a.width=Math.max(Math.min(a.height/fe,E.width),x.width),a.height=fe*a.width),a.y=ce-a.height)):1<=y.y?(a.width=Math.max(Math.min(Se.x-re,E.width),x.width),a.height=Math.max(Math.min(Se.y-ae,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(fe*a.width,E.height),x.height),a.width=a.height/fe):(a.width=Math.max(Math.min(a.height/fe,E.width),x.width),a.height=fe*a.width))):(a.width=Math.max(Math.min(Se.x-re,E.width),x.width),z||(a.height=Math.max(Math.min(fe*a.width,E.height),x.height),a.width=a.height/fe,a.y=ae+.5*(ce-ae-a.height))):0>=y.y?(a.y=Math.max(Se.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=ce-a.y,z||(a.width=Math.max(Math.min(a.height/fe,E.width),x.width),a.height=fe*a.width,a.x=re+.5*(le-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Se.y-ae,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/fe,E.width),x.width),a.height=fe*a.width,a.x=re+.5*(le-re-a.width))),st.free(Se),a},Ye.prototype.computeReshape=function(){var a=Ln;return this.adornedObject instanceof Zo&&(a=L0(this.adornedObject)),!(a===er||this.diagram.lastInput.shift)},Ye.prototype.computeMinSize=function(){var a=this.adornedObject.minSize.copy(),y=this.minSize;return!isNaN(y.width)&&y.width>a.width&&(a.width=y.width),!isNaN(y.height)&&y.height>a.height&&(a.height=y.height),a},Ye.prototype.computeMaxSize=function(){var a=this.adornedObject.maxSize.copy(),y=this.maxSize;return!isNaN(y.width)&&y.widthx?x+=360:360<=x&&(x-=360),x=Math.round(45*Math.round(x/45));var E=this.handleDistance;return x===0?y.x=a.naturalBounds.width+E:x===45?(y.x=a.naturalBounds.width+E,y.y=a.naturalBounds.height+E):x===90?y.y=a.naturalBounds.height+E:x===135?(y.x=-E,y.y=a.naturalBounds.height+E):x===180?y.x=-E:x===225?(y.x=-E,y.y=-E):x===270?y.y=-E:x===315&&(y.x=a.naturalBounds.width+E,y.y=-E),a.ga(y)},kt.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new st(NaN,NaN),this.isActive=a.isMouseCaptured=!1},kt.prototype.stopTransaction=function(){var a=this.diagram,y=_r.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},kt.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},kt.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},kt.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){a.delaysLayout=!1;var y=this.computeRotate(a.lastInput.documentPoint);this.rotate(y),a.Ya(),this.transactionResult=this.name,a.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},kt.prototype.rotate=function(a){var y=this.adornedObject;if(y!==null){y.angle=a,y=y.part,y.Va();var x=y.locationObject,E=y.rotateObject;(x===E||x.rg(E))&&(x=this.Tn.copy(),y.location=x.re(this.rotationPoint).rotate(a-this.originalAngle).add(this.rotationPoint)),this.diagram.bd()}},kt.prototype.computeRotate=function(a){a=this.rotationPoint.ab(a)-this.handleAngle;var y=this.adornedObject.panel;y!==null&&(a-=y.li()),360<=a?a-=360:0>a&&(a+=360),y=Math.min(Math.abs(this.snapAngleMultiple),180);var x=Math.min(Math.abs(this.snapAngleEpsilon),y/2);return!this.diagram.lastInput.shift&&0y-x&&(a=(Math.floor(a/y)+1)*y)),360<=a?a-=360:0>a&&(a+=360),a},un.Object.defineProperties(kt.prototype,{handleArchetype:{get:function(){return this.o},set:function(a){this.o=a}},handle:{get:function(){return this.j},set:function(a){if(a!==null&&!(a.part instanceof Ga))throw Error("new handle is not in an Adornment: "+a);this.j=a}},adornedObject:{get:function(){return this.ue},set:function(a){if(a!==null&&a.part instanceof Ga)throw Error("new handle must not be in an Adornment: "+a);this.ue=a}},snapAngleMultiple:{get:function(){return this.ia},set:function(a){this.ia=a}},snapAngleEpsilon:{get:function(){return this.V},set:function(a){this.V=a}},originalAngle:{get:function(){return this.Cw}},rotationPoint:{get:function(){return this.kr},set:function(a){this.kr=a.copy()}},handleAngle:{get:function(){return this.u},set:function(a){this.u=a}},handleDistance:{get:function(){return this.F},set:function(a){this.F=a}}}),kt.className="RotatingTool",pi("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function _t(){_r.call(this),this.name="ClickSelecting"}Ft(_t,_r),_t.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},_t.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},_t.className="ClickSelectingTool";function nn(){_r.call(this),this.name="Action",this.pk=null}Ft(nn,_r),nn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram,y=a.lastInput,x=a.ic(y.documentPoint,function(E){for(;E.panel!==null&&!E.isActionable;)E=E.panel;return E});return x!==null&&x.isActionable?(this.pk=x,a.Ck=a.ic(y.documentPoint,null,null),!0):!1},nn.prototype.doMouseDown=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionDown!==null&&y.actionDown(a,y))}else this.canStart()&&this.doActivate()},nn.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionMove!==null&&y.actionMove(a,y))}},nn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram.lastInput,y=this.pk;if(y===null)return;a.targetObject=y,y.actionUp!==null&&y.actionUp(a,y),this.standardMouseClick(function(x){for(;x.panel!==null&&(!x.isActionable||x!==y);)x=x.panel;return x},function(x){return x===y})}this.stopTool()},nn.prototype.doCancel=function(){var a=this.diagram.lastInput,y=this.pk;y!==null&&(a.targetObject=y,y.actionCancel!==null&&y.actionCancel(a,y),this.stopTool())},nn.prototype.doStop=function(){this.pk=null},nn.className="ActionTool";function Bn(){_r.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new st(0,0)}Ft(Bn,_r),Bn.prototype.canStart=function(){if(!this.isEnabled||this.archetypeNodeData===null)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(a.lastInput.clickCount===1&&(this.mw=a.lastInput.viewPoint.copy()),a.lastInput.clickCount!==2||this.isBeyondDragSize(this.mw))return!1}else if(a.lastInput.clickCount!==1)return!1;return!(a.currentTool!==this&&a.Ol(a.lastInput.documentPoint,!0)!==null)},Bn.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Bn.prototype.insertPart=function(a){var y=this.diagram,x=this.archetypeNodeData;if(x===null)return null;var E=null;try{if(y.R("ChangingSelection",y.selection),this.Ea(this.name),x instanceof zr)x.Zc()&&(fh(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Sn(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=st.allocAt(a.x,a.y);this.isGridSnapEnabled&&yl(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),st.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},un.Object.defineProperties(Bn.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){this.Ri=a}},isDoubleClick:{get:function(){return this.o},set:function(a){this.o=a}},isGridSnapEnabled:{get:function(){return this.j},set:function(a){this.j=a}}}),Bn.className="ClickCreatingTool";function vn(){_r.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new zr;a.layerName="Tool",a.selectable=!1;var y=new Zo;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ft(vn,_r),vn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(!a.allowSelect)return!1;var y=a.lastInput;return!(!y.left||a.currentTool!==this&&(!this.isBeyondDragSize()||y.timestamp-a.firstInput.timestampb.right&&(x.x-=E.width+5/y.scale),x.xb.bottom&&(x.y-=E.height+5/y.scale),x.ya.lastInput.clickCount)):!1},bi.prototype.doStart=function(){ua=this,this.textBlock!==null&&this.doActivate()},bi.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof ks&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=ca;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new cn(this.textBlock.ga(Rs),this.textBlock.ga(eu));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},bi.prototype.doCancel=function(){this.stopTool()},bi.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},bi.prototype.doMouseDown=function(){this.isActive&&this.acceptText(po)},bi.prototype.acceptText=function(a){switch(a){case po:this.qa===Jo?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===ca||this.qa===Jr||this.qa===Da)&&(this.qa=ga,mr(this));break;case ao:case To:case Ar:(To!==a||this.textBlock.isMultiline!==!0)&&(this.qa===ca||this.qa===Jr||this.qa===Da)&&(this.qa=ga,mr(this))}};function mr(a){var y=a.textBlock,x=a.diagram,E=a.currentTextEditor;if(y!==null&&E!==null){var b=y.text,z="";E.valueFunction!==null&&(z=E.valueFunction()),a.isValidText(y,b,z)?(a.Ea(a.name),a.qa=Jo,a.transactionResult=a.name,y.text=z,a.doSuccess(b,z),x!==null&&x.R("TextEdited",y,b),a.stopTransaction(),a.stopTool(),x!==null&&x.doFocus()):(a.qa=Jr,a.doError(b,z))}}bi.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},bi.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},bi.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Co,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},bi.prototype.doStop=function(){ua=null},bi.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},bi.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},un.Object.defineProperties(bi.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),bi.prototype.measureTemporaryTextBlock=bi.prototype.Lx;var ao=new ln(bi,"LostFocus",0),po=new ln(bi,"MouseDown",1),Ar=new ln(bi,"Tab",2),To=new ln(bi,"Enter",3),mo=new ln(bi,"SingleClick",0),zo=new ln(bi,"SingleClickSelected",1),Dr=new ln(bi,"DoubleClick",2),Co=new ln(bi,"StateNone",0),ca=new ln(bi,"StateActive",1),Da=new ln(bi,"StateEditing",2),ga=new ln(bi,"StateValidating",3),Jr=new ln(bi,"StateInvalid",4),Jo=new ln(bi,"StateValidated",5),ua=null;bi.className="TextEditingTool",bi.LostFocus=ao,bi.MouseDown=po,bi.Tab=Ar,bi.Enter=To,bi.SingleClick=mo,bi.SingleClickSelected=zo,bi.DoubleClick=Dr,bi.StateNone=Co,bi.StateActive=ca,bi.StateEditing=Da,bi.StateValidating=ga,bi.StateInvalid=Jr,bi.StateValidated=Jo,pi("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Ea(a){Ie||(Do(),Ie=!0),this.H=Pr,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=je,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Cn,this.ce=new Wt,this.ce.Yd=this,this.Ei=new Cn,this.pu=new Cn,this.Sr=new Cn,this.pr=new Cn,a&&Object.assign(this,a)}Ea.prototype.Xe=function(a){this.H=a},Ea.prototype.canStart=function(){return!0};function es(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ma(a.H),a.zb=!0)}function ba(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===je?(y.isViewportUnconstrained=!0,y.vc.clear(),y.add(x,"position",x.position.copy().offset(0,-200),x.position),y.add(x,"opacity",0,1)):a.Pk===dt&&y.vc.clear(),a.Qw=!!(a.Pk===Ue&&x.du.D(x.pa)),x.R("InitialAnimationStarting",a)),E&&!a.Gh||y.vc.count===0?(a.Zd.clear(),a.zb=!1,y.vc.clear(),Jt(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Au&&E!==null&&(delete E.start.scale,delete E.end.scale),Ut.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Hi(x),Eo(x),a.zb=!1,y.start(),y.bc&&(Vo(a),x.Ya(),En(y,0),Ja(x,!0),Zr(a),x.R("AnimationStarting",a)))}))}}function _o(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function yo(a,y,x,E){a.isTicking||_o(a)||y instanceof mi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Ee=Ea.prototype,Ee.fv=function(a){return this.ce.fv(a)},Ee.Xu=function(a){return this.ce.Xu(a)};function ea(a,y){function x(){if(0z?z+=360:ae+=360),z=b(x,z,ae-z,E)%360,ee=b(x,ee,le-ee,E),re=b(x,re,ce-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ee+"%, "+re+"%, "+x+")"}function Do(){function a(x,E,b,z,ee,re){x.position=new st(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re))}var y=new wr;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,ee,re){eea&&Wr(a,">= 1",Ea,"duration"),this.Dg=a}},isAnimating:{get:function(){return this.bc}},isTicking:{get:function(){return this.vq}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a}},defaultAnimation:{get:function(){return this.ce}},activeAnimations:{get:function(){return this.Ei}},initialAnimationStyle:{get:function(){return this.Pk},set:function(a){this.Pk=a}}}),Ea.prototype.stopAnimation=Ea.prototype.Cc;var ye=null,Ie=!1,je=new ln(Ea,"Default",1),Ue=new ln(Ea,"AnimateLocations",2),dt=new ln(Ea,"None",3);Ea.className="AnimationManager",Ea.defineAnimationEffect=function(a,y){Ie||(Do(),Ie=!0),ye.add(a,y)},Ea.Default=je,Ea.AnimateLocations=Ue,Ea.None=dt;function Wt(a){this.vu=this.Nw=this.Yd=this.H=null,this.Xk=this.bc=this.j=!1,this.cn=this.Qd=0,this.Lp=this.ot=Ci,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=St,this.vc=new wr,this.Tt=new wr,this.yl=new Cn,this.Ut=new Cn,this.dw=Oh,a&&Object.assign(this,a)}Wt.prototype.suspend=function(){this.Xk=!0},Wt.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Kn(this,!0),Vo(this.Yd),Ja(this.H),Zr(this.Yd),this.H.redraw()};function Jt(a,y){if(a.Tt.clear(),a.Wk=!1,a.au=0,a.Gd=NaN,0a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,ba.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function En(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Ct&&z.diagram===null)){var ee=E.value,re=b?ee.end:ee.start;ee=b?ee.start:ee.end;var ae=ye,le;for(le in ee)le==="position"&&(ee["position:placeholder"]||ee["position:nodeCollapse"])||ae.get(le)===null||ae.get(le)(z,re[le],ee[le],a.Lp,y,x,a)}}}Ee.stop=function(){return this.bc?(this.Ml(!0),this):this},Ee.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,Vo(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=ye;E.next();){var ee=E.key,re=E.value,ae=b?re.end:re.start,le=b?re.start:re.end,ce=re.Ku,fe;for(fe in le)if(z.get(fe)!==null){var Se=fe;!re.Hu||Se!=="position:nodeCollapse"&&Se!=="position:placeholder"||(Se="position"),z.get(Se)(ee,ae[fe],ce[fe]!==void 0?ce[fe]:re.Hu?ae[fe]:le[fe],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ce.location!==void 0&&ee instanceof zr&&(ee.location=ce.location),re.nv&&ee instanceof zr&&ee.Zb(!1)}if(y.As.clear(),Lr(y,!1),y.Ya(),y.N(),Ja(y,!0),x.defaultAnimation===this){for(fe=x.pr.iterator;fe.next();)b=fe.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ja(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Zr(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Jt(this,null),x.Ml(this),y.$b())}},Ee.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof Io&&(E=y.placeholder),E!==null?(x=E.ga(Rs),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new st(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof Io)for(a=a.memberParts;a.next();)E=a.value,E instanceof Ki&&this.Cj(E,y)},Ee.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof Io&&(x=y.placeholder),x!==null){var E=x.ga(Rs);x=x.padding,E.x+=x.left,E.y+=x.top,this.add(a,"position:placeholder",a.position,E,!0)}else this.add(a,"position:nodeCollapse",a.position,y,!0);if(this.add(a,"scale",a.scale,.01,!0),E=this.vc,E.contains(a)&&(E.I(a).nv=!0),a instanceof Io)for(a=a.memberParts;a.next();)E=a.value,E instanceof Ki&&this.Aj(E,y)}},Ee.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},un.Object.defineProperties(Wt.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Wr(a,">= 1",Wt,"duration"),this.Dg=a}},reversible:{get:function(){return this.ho},set:function(a){this.ho=a}},runCount:{get:function(){return this.cu},set:function(a){0a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Gi(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Wt.className="Animation",Wt.EaseLinear=function(a,y,x,E){return x*a/E+y},Wt.EaseInOutQuad=Ci,Wt.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Wt.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Wt.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Wt.EaseOutExpo=Gi;function Pi(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Pi.className="AnimationState";function Ai(a,y,x){this.xd=null,this.rf=a,this.so=x||ki,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=wn))}Ai.prototype.copy=function(){var a=new Ai(this.rf);a.so=this.so;var y=this.uk;if(y!==null){var x={};y.duration!==void 0&&(x.duration=y.duration),y.finished!==void 0&&(x.finished=y.finished),y.easing!==void 0&&(x.easing=y.easing),a.uk=x}return a};function Ni(a,y){a=a.uk,a!==null&&(a.duration&&(y.duration=a.duration),a.finished&&(y.finished=a.finished),a.easing&&(y.easing=a.easing))}un.Object.defineProperties(Ai.prototype,{propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},animationSettings:{get:function(){return this.uk},set:function(a){this.uk=a}},startCondition:{get:function(){return this.so},set:function(a){this.so=a}}});var ki=new ln(Ai,"Default",1),wn=new ln(Ai,"Immediate",2),Gn=new ln(Ai,"Bundled",3);Ai.className="AnimationTrigger",Ai.Default=ki,Ai.Immediate=wn,Ai.Bundled=Gn;function $n(a){Po(this),this.H=null,this.Pa=new Wn,this.xa="",this.pb=1,this.o=!1,this.j=this.Uh=this.u=this.Oi=this.Ni=this.Mi=this.Li=this.Ji=this.Ki=this.Ii=this.Qi=this.Hi=this.Pi=this.Gi=this.Fi=!0,this.Zq=[],a&&Object.assign(this,a)}Ee=$n.prototype,Ee.clear=function(){for(var a=this.Pa,y=0;y=a)return y;for(var x=0,E=0,b=0,z=0,ee=0,re=this.Pa.iterator;re.next();){var ae=re.value;ae instanceof Io?b++:ae instanceof Ki?E++:ae instanceof mi?z++:ae instanceof Ga?ee++:x++}if(re="",0x.Oq||re.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Sl(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Sl(y,a,"rgba(0,0,0,0.3)",!0,!1,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.background!==null&&(a.transform(x.m11,x.m12,x.m21,x.m22,x.dx,x.dy),Sl(y,a,y.background,!0,!1,z,b),a.fillRect(0,0,z.width/2,z.height/2),x.ws()||(y=1/(x.m11*x.m22-x.m12*x.m21),a.transform(x.m22*y,-x.m12*y,-x.m21*y,x.m11*y,y*(x.m21*x.dy-x.m22*x.dx),y*(x.m12*x.dx-x.m11*x.dy)))))),E&&(a.restore(),a.Vc(!0))}},Ee.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(As,a,this,y,x,E,b)},Ee.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&Gu(y),a>=E.count)a=E.count;else if(E.M(a)===y)return-1;return E.Gb(a,y),y.Vo(x),E=this.diagram,E!==null&&(x?E.N():E.oi(y)),$i(this,a,y),a},Ee.pc=function(a,y,x){if(!x&&y.layer!==this&&y.layer!==null)return y.layer.pc(a,y,x);var E=this.Pa;if(0>a||a>=E.length){if(a=E.indexOf(y),0>a)return-1}else if(E.M(a)!==y&&(a=E.indexOf(y),0>a))return-1;return y.Wo(x),E.mb(a),E=this.diagram,E!==null&&(x?E.N():E.pc(y)),y.Ig=null,Gu(y),a};function $i(a,y,x){if(y=ar(a,y,x),x instanceof Io&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,ee=0;eeE&&re.containingGroup===x&&(E=ee,0<=y))break}!(0>E)&&E=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,ee=NaN;0<=z&&(ee=a.M(z).zOrder,!!isNaN(ee));)z--;for(var re=y+1,ae=NaN;reE)for(;;){if(z===-1||ee<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(ee=NaN;0<=--z&&(ee=a.M(z).zOrder,isNaN(ee)););}else if(!isNaN(ae)&&ae=E){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(ae=NaN;++rea||1=a)return y;for(var x=this.Wa.iterator;x.next();)y+=` `+x.value.toString(a-1);return y};function wi(a,y){if(zs){if(y!=null||$t("Diagram setup requires an argument DIV."),a.Ka!==null&&$t("Diagram has already completed setup."),typeof y=="string"?a.Ka=Ut.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:$t("No DIV or DIV id supplied: "+y),a.Ka===null&&$t("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&$t("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Ut.ResizeObserver){var x=xn(function(){a.$b()},250);a.ol=new Ut.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Ut.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var E="rgba(2"+y+"5, 255, 255, 0)";y--,a.Ka.style["-webkit-tap-highlight-color"]=E,a.Ka.innerHTML="",a.Ka.H=a,a.Ka.goDiagram=a,a.Ka.go=Ut.go;var b=new dh(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Ut.getComputedStyle(a.Ka,null).getPropertyValue("direction")==="rtl"&&(a.tn=!0),b.style.zIndex="2",b.style.userSelect="none",b.style.MozUserSelect="none",b.style.touchAction="none",b.style.letterSpacing="normal !important",b.style.wordSpacing="normal !important"),a.ta=b,a.ib=b.context,E=a.ib,a.Mb=a.computePixelRatio(),a.viewSize.w()||(a.Aa=a.Ka.clientWidth||1,a.ya=a.Ka.clientHeight||1),Yl(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new dh(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,zs){b=ri("div");var z=ri("div");b.style.position="absolute",b.style.overflow="auto",b.style.width=a.Aa+"px",b.style.height=a.ya+"px",b.style.zIndex="1",z.style.position="absolute",z.style.width="1px",z.style.height="1px",a.Ka.appendChild(b),b.appendChild(z),b.onscroll=xr,b.addEventListener("pointerdown",fr),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=xn(function(){a.Yh=null,a.N()},300),a.Ov=xn(function(){Eo(a)},250),a.preventDefault=function(ee){return ee.preventDefault(),!1},a.$j=function(ee){if(a.isEnabled){var re=xa(a,ee,!0);re.bubbles=!0;var ae=0,le=0;re.delta=0,ee.deltaX!==void 0?(ee.deltaX!==0&&(ae=0Math.abs(ee.deltaY)?-ae:-le):ee.wheelDeltaX!==void 0?(ee.wheelDeltaX!==0&&(ae=0Math.abs(ee.wheelDeltaY)?-ae:-le):ee.wheelDelta!==void 0&&ee.wheelDelta!==0&&(re.delta=0re||Math.abs(le.y-ee.screenY)>re)?a.yq++:a.yq=1,ae.clickCount=a.yq,a.tw=ee.timeStamp,a.uw.sg(ee.screenX,ee.screenY),a.doMouseDown(),ee.button===1?ee.preventDefault():Rr(ae,ee)}},a.dk=function(ee){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==ee.pointerId&&re[0].pointerType===ee.pointerType){if(re[1]!==null&&re[1].pointerId===ee.pointerId){re[1]=ee;return}if(re[0]===null)re[0]=ee;else return}else re[0]=ee;if(re[0].pointerId===ee.pointerId){re=no(a,ee,!1,!1,!1,re[1]!==null);var ae=Ut.document.elementFromPoint(ee.clientX,ee.clientY)||null;ae!==null&&ae.shadowRoot!==void 0&&ae.shadowRoot!==null&&(ae=ae.shadowRoot.elementFromPoint(ee.clientX,ee.clientY));var le=a,ce=ee;ae&&ae.H&&(ce=ee,le=ae.H),re.targetDiagram=le,wa(a,ce,re),re.targetObject=null,a.doMouseMove(),Rr(re,ee)}}},a.fk=function(ee){if(a.isEnabled){a.Vk=!0;var re=ee.pointerType==="touch"||ee.pointerType==="pen",ae=a.Yt;if(re&&a.qu)delete ae[ee.pointerId],ee.preventDefault();else if(ae=a.oj,ae[0]===null||ae[0].pointerId!==ee.pointerId&&ae[0].pointerType===ee.pointerType)ae[1]!==null&&ae[1].pointerId===ee.pointerId&&(ae[1]=null);else{ae[0]=null,ae=no(a,ee,!1,!0,!0,!1);var le=Ut.document.elementFromPoint(ee.clientX,ee.clientY)||null;le!==null&&le.shadowRoot!==void 0&&le.shadowRoot!==null&&(le=le.shadowRoot.elementFromPoint(ee.clientX,ee.clientY)),le!==null&&le.H instanceof Et&&le.H!==a&&wa(le.H,ee,ae),le===null&&(le=ee.target),wa(a,ee,ae),ae.clickCount=a.yq,ae.targetDiagram=Oa(ee,le),ae.targetObject=null,a.doMouseUp(),Rr(ae,ee),re&&(a.wq=!1)}}},a.ek=function(ee){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[ee.pointerId]&&delete re[ee.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===ee.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===ee.pointerId&&(re[1]=null),ee.pointerType!=="touch"&&ee.pointerType!=="pen"&&(ee=a.currentTool,ee.cancelWaitAfter(),ee.standardMouseOver())}},a.ck=function(ee){var re=a.oj;re[0]!==null&&re[0].pointerId===ee.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===ee.pointerId&&(re[1]=null)},a.Vp=E.Z["d"+Dd[1]+Dd[2]+"wI"+dd.slice(1,5)]["b"+Hx.slice(1,y)](E.Z,Nd,y,y),E.Vc(!0),qi(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Et.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Et.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function qi(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(Ut,"resize",a.Ov,!1)}function Hi(a){30Ae&&(this.position=tt.h(-(y.scrollWidth-this.Aa)+Ze-this.Aa/b+ce,this.position.y))),a.vy&&this.allowVerticalScroll&&(reDe&&(this.position=tt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),st.free(tt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ce=E.right,Ae=b.right,z=E.bottom,De=b.bottom,ee=E.x,fe=b.x,re=E.y,E=b.y,Se>=ae&&ee>=fe&&ce<=Ae&&(x.style.width="1px"),we>=le&&re>=E&&z<=De&&(x.style.height="1px"))}},Et.prototype.computeBounds=function(a){return a===void 0&&(a=new cn),Ma(this),Hr(this,a)};function Hr(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;zx&&(y=x),ya.maxScale&&(y=a.maxScale),y):y===Qh?(y=ae>re?(ee-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),ya.maxScale&&(y=a.maxScale),y):a.scale}Et.prototype.zoomToFit=function(){var a=this.sj;this.sj=Oh,this.scale=Aa(this,Vu),a!==Oh&&(Vr(this,!1),Ya(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ee=Et.prototype,Ee.BA=function(a,y){y===void 0&&(y=Vu);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Vu||y===Qh)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===Qh?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new st(a.x,a.y)}},Ee.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new st(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Ee.zz=function(a){if(a instanceof Ct){this.eq=a;var y=st.alloc();this.fq=this.op(a.ga(Rs,y)),st.free(y)}else this.eq=null,this.fq=Oi};function Ya(a,y,x,E,b,z){var ee=st.allocAt(a.pa.x,a.pa.y),re=ee.x,ae=ee.y;if(a.eq!==null){var le=st.alloc();le=a.eq.ga(Rs,le),re=le.x-a.fq.x/a.scale,ae=le.y-a.fq.y/a.scale,b=hl,st.free(le)}(z||a.scrollMode===Oh)&&(b.sb()&&(x>y.width&&(re=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ae=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,xy.left?re=y.left:rey.top?ae=y.top:aey;y++){var x=a.De.iterator;if(x===null||a.De.count===0)break;a.De=new Cn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof Io&&E.U&65536&&(E.U=E.U^65536)})}}Ee.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof Io||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof Io&&x.isVisible()&&Qa(this,x);for(a.reset();a.next();)x=a.value,x instanceof mi&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof Ga&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function Qa(a,y){for(var x=ur(),E=ur(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof Io?(Gc(z)||ic(z)||wf(z))&&Qa(a,z):z instanceof mi?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;bDt&&(Ze=zi.left,ht=zi.right),tt.height>qt&&(gt=zi.top,xt=zi.bottom)):(Ze=zi.left,ht=zi.right,gt=zi.top,xt=zi.bottom);var cr=tt.width+Ze+ht,tr=tt.height+gt+xt;zi=a.scale;var gi=cr>ae/zi,_n=tr>le/zi;if(!(z||a.gf||a.Be||gi||_n))return!0;Ze=tt.x-Ze,ae=ce.x,ht=tt.right+ht,le=ce.right+ee,gt=tt.y-gt;var Bo=ce.y;tt=tt.bottom+xt,ce=ce.bottom+re;var xo="1px";if(xt="1px",a.scrollMode===Oh&&(gi||_n)&&(gi&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(gi=1,Ze+1le+1&&(gi=Math.max((ht-le)*zi+a.Aa,gi)),Dt+ee+1ce+1&&(gi=Math.max((tt-ce)*zi+a.ya,gi)),qt+re+1le+1&&(ee=Math.max((ht-le)*zi+a.Aa,ee)),Dt+1ce+1&&(re=Math.max((tt-ce)*zi+ee,re)),qt+1le+1&&(y=a.position.x*zi)),a.tn)switch(a.bu){case"negative":y=-(Ae.scrollWidth-y-Ae.clientWidth);break;case"reverse":y=Ae.scrollWidth-y-Ae.clientWidth}return Ae.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(qt+1ce+1&&(Ae.scrollTop=a.position.y*zi)),ae=a.Aa,le=a.ya,Ae.style.width=ae+(a.gf?a.Db:0)+"px",Ae.style.height=le+(a.Be?a.Db:0)+"px",x!==ae||E!==le||a.animationManager.zb?(x=cn.allocAt(b,fe,Se,we),a.onViewportBoundsChanged(x,a.viewportBounds,zi,z),cn.free(x),!1):!0}Ee=Et.prototype,Ee.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&$t("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+y.toString()),y=this.Qj(a.layerName),y===null&&(y=this.Qj("")),y===null&&$t('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(Ms,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Ee.oi=function(a){this.partManager.oi(a);var y=this;Zf(a,function(x){bl(y,x)}),(a instanceof Ga||a instanceof Io&&a.placeholder!==null)&&a.v(),a.data!==null&&Zf(a,function(x){hy(y.partManager,x)}),ic(a)!==!0&&wf(a)!==!0||this.De.add(a),_S(a,!0,this),KS(a)?(a.actualBounds.w()&&this.N(Qf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Qf(a,a.actualBounds)),this.$b()},Ee.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Zf(a,function(x){dy(y.partManager,x,y)}),this.De.remove(a),KS(a)?(a.actualBounds.w()&&this.N(Qf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Qf(a,a.actualBounds)),this.$b()},Ee.remove=function(a){ws(this,a,!0)};function ws(a,y,x){var E=y.layer;E!==null&&E.diagram===a&&(y.isSelected=!1,y.isHighlighted=!1,y.C(2),x&&y.Lj(),x=E.pc(-1,y,!1),0<=x&&a.cb(Zs,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Ee.Is=function(a,y){if(y===void 0&&(y=!1),or(a))for(var x=a.length,E=0;EE&&this.Ya(),this},Ee.Cy=function(a,y){jr(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Zs,"layers",this,a,null,E,null));var b=x.count,z;for(z=0;zE&&this.Ya(),this},Ee.kA=function(a){if(a.diagram!==this&&$t("Cannot remove a Layer from another Diagram: "+a+" of "+a.diagram),a.name!==""){var y=this.Wa,x=y.indexOf(a);if(y.remove(a)){for(y=a.Pa.copy().iterator;y.next();){var E=y.value,b=E.layerName;b!==a.name?E.layerName=b:E.layerName=""}this.cc!==null&&this.cb(Zs,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Ee.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ee.Yw=function(a){return this.pf===null&&(this.pf=new Wn),this.pf.add(a),this.model.Pe(a),this},Ee.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ee.Pe=function(a){return this.zg===null&&(this.zg=new Wn),this.zg.add(a),this},Ee.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ee.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==vu&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;Efe.Pa.indexOf(we)&&fe.oi(Se,we,Ae):(we.isSelected=!1,we.isHighlighted=!1,we.Wb(),fe.pc(Ae?Se:-1,we,Ae)))}else fe instanceof Et?typeof Se=="number"&&we instanceof $n&&(y?(we.Xe(this),this.Wa.Gb(Se,we)):this.Wa.mb(Se)):$t("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==vu&&$t("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Et.prototype.Ea=function(a){return this.undoManager.Ea(a)},Et.prototype.eb=function(a){return this.undoManager.eb(a)},Et.prototype.Kf=function(){return this.undoManager.Kf()},Et.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},Et.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Et.prototype.rp=function(){this.partManager.rp()};function Wo(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Nl(a),a.N(),a.Ee=!0,E.zb&&(_o(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Nl(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,ee=a.ya,re=a.zoomPoint.x,ae=a.zoomPoint.y,le=a.contentAlignment;isNaN(re)&&(le.$c()?le.Hf(du)?re=0:le.Hf(Ol)&&(re=z-1):re=le.sb()?le.x*(z-1):z/2),isNaN(ae)&&(le.$c()?le.Hf(Cc)?ae=0:le.Hf(Cu)&&(ae=ee-1):ae=le.sb()?le.y*(ee-1):ee/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),xa.maxScale&&(x=a.maxScale),z=st.allocAt(a.pa.x+re/y-re/x,a.pa.y+ae/y-ae/x),a.position=z,st.free(z),a.Ca=x,Nl(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Vr(a,!1),E.zb&&(_o(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Et.prototype.onViewportBoundsChanged=function(a,y,x,E){if(!a.D(y)){E===void 0&&(E=!1),E||(this.Ee=!0),this.vd=!0;var b=this.layout;b===null||!b.isViewportSized||this.autoScale!==Au||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof xs&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),sd(b,this)),this.vb||this.invalidateViewport(a,y),os(this),this.fc.scale=x,this.fc.position.x=a.x,this.fc.position.y=a.y,this.fc.bounds.assign(a),this.fc.canvasSize.width=Math.round(a.width*x),this.fc.canvasSize.height=Math.round(a.height*x),this.fc.newCanvasSize.width=this.Aa,this.fc.newCanvasSize.height=this.ya,this.fc.isScroll=E,this.R("ViewportBoundsChanged",this.fc,a),this.isVirtualized&&this.links.each(function(z){z.isAvoiding&&z.actualBounds.Yc(y)&&z.bb()})}};function os(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=fn.alloc(),b=1,z=1,ee=x.O.s,re=ee.length,ae=0;aece||(S0(le.figure)?z=z*ce/Ot.vx(z,ce):b=b*ce/Ot.vx(b,ce))}if(ee=x.gridCellSize,E.h(z*ee.width,b*ee.height),y!==void 0)b=y.width,z=y.height,a=y.x,ee=y.y;else{if(y=cn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){cn.free(y);return}b=y.width,z=y.height,a=y.x,ee=y.y,cn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=st.alloc(),Ot.No(a,ee,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),fn.free(E),x.part.location=y,st.free(y)}}Et.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b=E&&!z.defaultAnimation.isAnimating&&!z.zb&&(y||es(z,"Layout")),a.xh=!1;for(var ee=a.ai.iterator;ee.next();)Du(a,ee.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Ma(a),b.isValidLayout=!0):a.xh=!0)}finally{y=a.undoManager.isInternalTransaction,E===0&&(a.eb("Layout"),a.undoManager.isInternalTransaction=!1),!y||E!==0&&E!==1||ba(z),a.aa=x}}}function Du(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Du(a,b.value,x,E);b=y.layout,b===null||b.isValidLayout||(!x||b.isRealtime||E===0?(y.rh=!y.location.w(),b.doLayout(y),y.C(32),Qa(a,y),b.isValidLayout=!0):a.xh=!0)}}Ee.yz=function(){for(var a=new Wn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function uh(a){function y(b){var z=b.toLowerCase(),ee=new Wn;x.add(b,ee),x.add(z,ee),E.add(b,b),E.add(z,b)}var x=new wr,E=new wr;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function Zh(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Xh(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;$t("Unknown DiagramEvent name: "+y)}Ee.Bj=function(a,y){return a=Xh(this,a),a!==null&&a.add(y),this},Ee.am=function(a,y){a=Xh(this,a),a!==null&&a.remove(y)},Ee.R=function(a,y,x){var E=Xh(this,a),b=new tc;if(b.diagram=this,a=Zh(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=cn.allocAt(0,0,E.width*b,E.height*b);var z=st.allocAt(0,0);if(a.x>=E.x&&a.xE.x+E.width-x.right&&this.allowHorizontalScroll&&(ee=Math.max(this.scrollHorizontalLineChange,1),ee|=0,z.x+=ee,a.x>E.x+E.width-x.right/2&&(z.x+=ee),a.x>E.x+E.width-x.right/4&&(z.x+=4*ee));return a.y>=E.y&&a.yE.y+E.height-x.bottom&&this.allowVerticalScroll&&(ee=Math.max(this.scrollVerticalLineChange,1),ee|=0,z.y+=ee,a.y>E.y+E.height-x.bottom/2&&(z.y+=ee),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*ee)),z.Xa(St)||(y=new st(y.x+z.x/b,y.y+z.y/b)),cn.free(E),st.free(z),y},Ee=Et.prototype,Ee.Cs=function(){return null},Ee.av=function(){return null},Ee.bs=function(a,y){this.pj.add(a,y)},Ee.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof Io&&(y.$p=null)})};function kd(a,y,x){function E(){var ce=+new Date;for(z=!0,ee.reset();ee.next();)if(!ee.value[0].al){z=!1;break}z||ce-le>ae?y(x,b,re):Ut.requestAnimationFrame(E)}for(var b=x.callback,z=!0,ee=a.Og.iterator;ee.next();)if(!ee.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var re=a,ae=x.callbackTimeout||300,le=+new Date;return Ut.requestAnimationFrame(function(){E()}),null}Ee.Wz=function(a){return zs?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ee.Jx=function(a){return a===void 0&&(a={}),kd(this,this.Xz,a)},Ee.Xz=function(a,y,x){var E=yf(x,a,"canvas",null);if(E===null)return null;x=E.Z.canvas;var b=null;if(x!==null)switch(b=a.returnType,b===void 0?b="string":b=b.toLowerCase(),b){case dd+"data":b=E.getImageData(0,0,x.width,x.height);break;case dd:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&$t('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),typeof x.toBlob=="function"?(x.toBlob(y,a.type,a.details),"toBlob"):(y(null),null);default:b=x.toDataURL(a.type,a.details)}return typeof y=="function"?(y(b),null):b};function yf(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&$t("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var ee=y.maxSize;y.maxSize===void 0&&(ee=x==="SVG"?new fn(1/0,1/0):new fn(2e3,2e3));var re=y.position||null,ae=y.parts||null,le=y.padding===void 0?1:y.padding,ce=y.background||null,fe=y.omitTemporary;fe===void 0&&(fe=!0);var Se=y.document||document,we=y.elementFinished||null,Ae=y.showTemporary;Ae===void 0&&(Ae=!fe),y=y.showGrid,y===void 0&&(y=Ae),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof le=="number"?le=new Mo(le):le instanceof Mo||$t("MakeImage padding must be a Margin or a number."),le.left=Math.max(le.left,0),le.right=Math.max(le.right,0),le.top=Math.max(le.top,0),le.bottom=Math.max(le.bottom,0),a.ib.Vc(!0),fe=new dh(null,Se,void 0,!0);var De=fe.context;if(!(b||z||ae||re))return fe.width=a.Aa+Math.ceil(le.left+le.right),fe.height=a.ya+Math.ceil(le.top+le.bottom),x==="SVG"?E===null?null:(E.resize(fe.width,fe.height,fe.width,fe.height),E.ownerDocument=Se,E.hs=we,Ks(a,E.context,le,new fn(fe.width,fe.height),a.Ca,a.pa,ae,ce,Ae,y),E.context):(a.Xm=!1,Ks(a,De,le,new fn(fe.width,fe.height),a.Ca,a.pa,ae,ce,Ae,y),a.Xm=!0,fe.context);var tt=a.Pp,Ze=a.documentBounds.copy();if(Ze.Fv(a.yb),Ae)for(var ht=a.Wa.s,gt=ht.length,xt=0;xttt?(z=tt,b=Ze.width,Ze=Ze.height):(b=ee.width,Ze=ee.height)):(b=Ze.width*z,Ze=Ze.height*z):(z=tt,b=Ze.width,Ze=Ze.height),le!==null?(b+=re,Ze+=gt):le=new Mo(0),ee!==null&&(tt=ee.width,ee=ee.height,isNaN(tt)&&(tt=2e3),isNaN(ee)&&(ee=2e3),isFinite(tt)&&(b=Math.min(b,tt)),isFinite(ee)&&(Ze=Math.min(Ze,ee))),fe.width=Math.ceil(b),fe.height=Math.ceil(Ze),x==="SVG"?E===null?null:(E.resize(fe.width,fe.height,fe.width,fe.height),E.ownerDocument=Se,E.hs=we,Ks(a,E.context,le,new fn(Math.ceil(b),Math.ceil(Ze)),z,ht,ae,ce,Ae,y),E.context):(a.Xm=!1,Ks(a,De,le,new fn(Math.ceil(b),Math.ceil(Ze)),z,ht,ae,ce,Ae,y),a.Xm=!0,fe.context)}un.Object.defineProperties(Et.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof pe||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new ed(this,Ut.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new ed(this,Ut.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(Ut,"resize",this.Ov,!1),this.removeEventListener(Ut,"wheel",this.$j,!0),Pr===this&&(Pr=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),wi(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1a&&Wr(a,">= 0",Et,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Wr(a,">= 0",Et,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var E=y.style.cursor;y.style.cursor=a,x.style.cursor=a,y.style.cursor===E&&(y.style.cursor="-webkit-"+a,x.style.cursor="-webkit-"+a,y.style.cursor===E&&(y.style.cursor="-moz-"+a,x.style.cursor="-moz-"+a,y.style.cursor===E&&(y.style.cursor=a,x.style.cursor=a)))}}}},defaultCursor:{get:function(){return this.Op},set:function(a){a===""&&(a="auto");var y=this.Op;y!==a&&(this.Op=a,this.g("defaultCursor",y,a))}},click:{get:function(){return this.zh},set:function(a){var y=this.zh;y!==a&&(this.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.Fh},set:function(a){var y=this.Fh;y!==a&&(this.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.Bh},set:function(a){var y=this.Bh;y!==a&&(this.Bh=a,this.g("contextClick",y,a))}},mouseOver:{get:function(){return this.Qh},set:function(a){var y=this.Qh;y!==a&&(this.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.Oh},set:function(a){var y=this.Oh;y!==a&&(this.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.Nh},set:function(a){var y=this.Nh;y!==a&&(this.Nh=a,this.g("mouseHold",y,a))}},mouseDragOver:{get:function(){return this.Qt},set:function(a){var y=this.Qt;y!==a&&(this.Qt=a,this.g("mouseDragOver",y,a))}},mouseDrop:{get:function(){return this.Lh},set:function(a){var y=this.Lh;y!==a&&(this.Lh=a,this.g("mouseDrop",y,a))}},handlesDragDropForTopLevelParts:{get:function(){return this.xt},set:function(a){var y=this.xt;y!==a&&(this.xt=a,this.g("handlesDragDropForTopLevelParts",y,a))}},mouseEnter:{get:function(){return this.Mh},set:function(a){var y=this.Mh;y!==a&&(this.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.Ph},set:function(a){var y=this.Ph;y!==a&&(this.Ph=a,this.g("mouseLeave",y,a))}},toolTip:{get:function(){return this.$h},set:function(a){var y=this.$h;y!==a&&(this.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.Ch},set:function(a){var y=this.Ch;y!==a&&(this.Ch=a,this.g("contextMenu",y,a))}},commandHandler:{get:function(){return this.nb},set:function(a){this.nb!==a&&(this.nb=a,a.Xe(this))}},toolManager:{get:function(){return this.te},set:function(a){this.te!==a&&(this.te=a,a.diagram=this)}},defaultTool:{get:function(){return this.ob},set:function(a){var y=this.ob;y!==a&&(this.ob=a,a.diagram=this,this.currentTool===y&&(this.currentTool=a))}},currentTool:{get:function(){return this.hb},set:function(a){var y=this.hb;y&&(y.isActive&&y.doDeactivate(),y.cancelWaitAfter(),y.doStop()),a===null&&(a=this.defaultTool),a!==null&&(this.hb=a,a.diagram=this,a.doStart())}},selection:{get:function(){return this.Hw}},maxSelectionCount:{get:function(){return this.Nt},set:function(a){var y=this.Nt;if(y!==a)if(0<=a&&!isNaN(a)){if(this.Nt=a,this.g("maxSelectionCount",y,a),!this.undoManager.isUndoingRedoing&&(a=this.selection.count-a,0= 0",Et,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||vs(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&$t("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Oo(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,es(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=Ps(this.cc.type);for(var b=0;bthis.scale&&(this.scale=a)):Wr(a,"> 0",Et,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0 0",Et,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),Vr(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Mo(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.Ya(),this.g("padding",y,a))}},partManager:{get:function(){return this.Pc},set:function(a){var y=this.Pc;y!==a&&(a.diagram!==null&&$t("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)kp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Ih&&a!==Al&&a!==Xd&&$t("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new fn(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new Mo(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),un.Object.defineProperties(Et,{licenseKey:{get:function(){return Sf.jc()},set:function(a){Sf.add(a.replace(/\s/g,""))}},version:{get:function(){return hd}}}),Et.prototype.makeImageData=Et.prototype.Jx,Et.prototype.makeImage=Et.prototype.Wz,Et.prototype.cacheGroupExternalLinks=Et.prototype.Fu,Et.prototype.addRenderer=Et.prototype.bs,Et.prototype.makeSVG=Et.prototype.av,Et.prototype.makeSvg=Et.prototype.Cs,Et.prototype.stopAutoScroll=Et.prototype.ug,Et.prototype.doAutoScroll=Et.prototype.gs,Et.prototype.isUnoccupied=Et.prototype.Yj,Et.prototype.raiseDiagramEvent=Et.prototype.R,Et.prototype.removeDiagramListener=Et.prototype.am,Et.prototype.addDiagramListener=Et.prototype.Bj,Et.prototype.findTreeRoots=Et.prototype.yz,Et.prototype.layoutDiagram=Et.prototype.Uz,Et.prototype.findTopLevelGroups=Et.prototype.qz,Et.prototype.findTopLevelNodesAndLinks=Et.prototype.rz,Et.prototype.ensureBounds=Et.prototype.Va,Et.prototype.findLinksByExample=Et.prototype.ls,Et.prototype.findNodesByExample=Et.prototype.ms,Et.prototype.findLinkForData=Et.prototype.Kc,Et.prototype.findNodeForData=Et.prototype.ii,Et.prototype.findPartForData=Et.prototype.Lc,Et.prototype.findLinkForKey=Et.prototype.findLinkForKey,Et.prototype.findNodeForKey=Et.prototype.Vb,Et.prototype.findPartForKey=Et.prototype.findPartForKey,Et.prototype.rebuildParts=Et.prototype.Wd,Et.prototype.transformViewToDoc=Et.prototype.Ps,Et.prototype.transformRectDocToView=Et.prototype.zA,Et.prototype.transformDocToView=Et.prototype.op,Et.prototype.centerRect=Et.prototype.es,Et.prototype.scrollToRect=Et.prototype.tv,Et.prototype.scroll=Et.prototype.scroll,Et.prototype.highlightCollection=Et.prototype.Jz,Et.prototype.highlight=Et.prototype.Iz,Et.prototype.selectCollection=Et.prototype.rA,Et.prototype.select=Et.prototype.select,Et.prototype.updateAllRelationshipsFromData=Et.prototype.rp,Et.prototype.updateAllTargetBindings=Et.prototype.updateAllTargetBindings,Et.prototype.commit=Et.prototype.commit,Et.prototype.rollbackTransaction=Et.prototype.Kf,Et.prototype.commitTransaction=Et.prototype.eb,Et.prototype.startTransaction=Et.prototype.Ea,Et.prototype.raiseChanged=Et.prototype.g,Et.prototype.raiseChangedEvent=Et.prototype.cb,Et.prototype.removeChangedListener=Et.prototype.ik,Et.prototype.addChangedListener=Et.prototype.Pe,Et.prototype.removeModelChangedListener=Et.prototype.mA,Et.prototype.addModelChangedListener=Et.prototype.Yw,Et.prototype.findLayer=Et.prototype.Qj,Et.prototype.removeLayer=Et.prototype.kA,Et.prototype.addLayerAfter=Et.prototype.Cy,Et.prototype.addLayerBefore=Et.prototype.Ww,Et.prototype.addLayer=Et.prototype.Al,Et.prototype.moveParts=Et.prototype.moveParts,Et.prototype.copyParts=Et.prototype.Kj,Et.prototype.removeParts=Et.prototype.Is,Et.prototype.remove=Et.prototype.remove,Et.prototype.add=Et.prototype.add,Et.prototype.clearDelayedGeometries=Et.prototype.bx,Et.prototype.setProperties=Et.prototype.nm,Et.prototype.attach=Et.prototype.Du,Et.prototype.set=Et.prototype.set,Et.prototype.resetInputOptions=Et.prototype.Sx,Et.prototype.setInputOption=Et.prototype.sA,Et.prototype.getInputOption=Et.prototype.Ql,Et.prototype.resetRenderingHints=Et.prototype.Tx,Et.prototype.setRenderingHint=Et.prototype.Xx,Et.prototype.getRenderingHint=Et.prototype.Gf,Et.prototype.maybeUpdate=Et.prototype.bd,Et.prototype.requestUpdate=Et.prototype.$b,Et.prototype.delayInitialization=Et.prototype.Xy,Et.prototype.isUpdateRequested=Et.prototype.Pz,Et.prototype.invalidateDocumentBounds=Et.prototype.Ya,Et.prototype.findObjectsNear=Et.prototype.og,Et.prototype.findPartsNear=Et.prototype.mz,Et.prototype.findObjectsIn=Et.prototype.Cf,Et.prototype.findPartsIn=Et.prototype.ux,Et.prototype.findObjectsAt=Et.prototype.ji,Et.prototype.findPartsAt=Et.prototype.lz,Et.prototype.findObjectAt=Et.prototype.ic,Et.prototype.findPartAt=Et.prototype.Ol,Et.prototype.focusObject=Et.prototype.zz,Et.prototype.alignDocument=Et.prototype.Jy,Et.prototype.zoomToRect=Et.prototype.BA,Et.prototype.zoomToFit=Et.prototype.zoomToFit,Et.prototype.diagramScroll=Et.prototype.kx,Et.prototype.focus=Et.prototype.focus;var ch=new wr,Yd=null,zs=Ut.document!==void 0,ld=null,Bh="",Au=new ln(Et,"None",0),Vu=new ln(Et,"Uniform",1),Qh=new ln(Et,"UniformToFill",2),qh=new ln(Et,"CycleAll",10),Ph=new ln(Et,"CycleNotDirected",11),ud=new ln(Et,"CycleNotDirectedFast",12),cd=new ln(Et,"CycleNotUndirected",13),Fd=new ln(Et,"CycleDestinationTree",14),Zd=new ln(Et,"CycleSourceTree",15),Oh=new ln(Et,"DocumentScroll",1),$h=new ln(Et,"InfiniteScroll",2),Ih=new ln(Et,"TreeParentCollapsed",21),Al=new ln(Et,"AllParentsCollapsed",22),Xd=new ln(Et,"AnyParentsCollapsed",23),Sf=new Wn,hd="2.3.10",dd="image",Nd=null,Vf=!1;function yu(){if(zs){var a=Ut.document.createElement("canvas"),y=a.getContext("2d"),x=lo("7ca11abfd022028846");y[x]=lo("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",zn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Fo.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ot.za],b=1;5>b;b++)y[lo("7ca11abfd7330390")](lo(E[b-1]),10,15*b);for(y[x]=lo("39f046ebb36e4b"),x=1;5>x;x++)y[lo("7ca11abfd7330390")](lo(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Fo.prototype.Cd=Fo.prototype.Eu),Nd=a}}Et.className="Diagram",Et.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Ut.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Et?y.H:null},Et.inherit=function(a,y){function x(){}if(Object.getPrototypeOf(a).prototype)throw Error(`Used go.Diagram.inherit defining already defined class `+a);x.prototype=y.prototype,a.prototype=new x,a.prototype.constructor=a},Et.useDOM=function(a){zs=a?Ut.document!==void 0:!1},Et.isUsingDOM=function(){return zs},Et.None=Au,Et.Uniform=Vu,Et.UniformToFill=Qh,Et.CycleAll=qh,Et.CycleNotDirected=Ph,Et.CycleNotDirectedFast=ud,Et.CycleNotUndirected=cd,Et.CycleDestinationTree=Fd,Et.CycleSourceTree=Zd,Et.DocumentScroll=Oh,Et.InfiniteScroll=$h,Et.TreeParentCollapsed=Ih,Et.AllParentsCollapsed=Al,Et.AnyParentsCollapsed=Xd;function Kf(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function fd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=Ut[lo("76a715b2f73f148a")][lo("72ba13b5")]||"";if(a.Rc=!0,zs){var E=Et[lo("76a115b6ed251eaf4692")];if(E)for(var b=Sf.iterator;b.next()&&(E=b.value,E=lo(E).split(lo("39e9")),!(6>E.length));){var z=lo(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ee=lo(zn[lo("6cae19")]).split(".");if(z[0]>ee[0]||z[0]===ee[0]&&z[1]>=ee[1]){var re=Ut[lo("74a900bae4370f8b51")][lo("6fbb13a1c2311e8a57")].toLowerCase();if(ee=re[lo("73a612b6fb191d")](lo("3aad1ab6e022098b4dc4")),z=lo(E[2]),-1ee&&z!==lo("7da71ca0ad381e90")&&(ee=y[lo("73a612b6fb191d")](lo("76a715b2ef3e149757"))),0>ee&&(ee=y[lo("73a612b6fb191d")](lo("76a715b2ef3e149757"))),0>ee&&(ee=y[lo("73a612b6fb191d")](lo("2bfa41fdb3784bca12"))),0>ee&&(ee=x[lo("73a612b6fb191d")](lo("7baa19a6f76c1988428554"))),a.Rc=!(0<=ee&&eere),!a.Rc)))break;if(z[0]==="#"){ee=Ut.document.createElement("div");for(var ae=E[0].replace(/[A-Za-z]/g,"");4>ae.length;)ae+="9";if(re=ae,ae=ae.substr(ae.length-4),E="",E+=["gsh","gsf"][parseInt(ae.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ae.substr(0,1),10)%4],ee[lo("79a417a0f0181a8946")]=E,Ut.document[lo("78a712aa")]){Ut.document[lo("78a712aa")][lo("7bb806b6ed32388c4a875b")](ee),ae=Ut.getComputedStyle(ee).getPropertyValue(lo("78a704b7e62456904c9b12701b6532a8"));var le=Ut.getComputedStyle(ee).getPropertyValue(lo("75b817b0ea2202"));if(Ut.document[lo("78a712aa")][lo("68ad1bbcf533388c4a875b")](ee),ae){if(ee=Ut[lo("77a902b0eb1b1e804a8a")],le==="0."+parseInt(re,10)%100||ae.indexOf(parseInt(z[1]+z[2],16))!==-1&&ae.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(ee&&ee(lo("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;zE.updateDelay?E.N():E.o||(E.o=!0,setTimeout(function(){return E.redraw()},E.updateDelay))},x.Of=function(){E.observed!==null&&Ve(E)},x.autoScale=Vu,x.vb=!1,y&&Object.assign(x,y),x}Ft(pe,Et),pe.prototype.computePixelRatio=function(){return 1},pe.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(hs(this),this.ql===null){var x=new dh(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Fe(this)}finally{this.ta=a,this.ib=y}}}Et.prototype.redraw.call(this)},pe.prototype.gc=function(){if(this.Ka===null&&$t("No div specified"),this.ta===null&&$t("No canvas specified"),!(this.ta instanceof ed)&&(z0(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){hs(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?Fe(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;Ea&&(a=0),this.ia!==a&&(this.ia=a)}}}),pe.className="Overview";function rt(){Ko.call(this),this.j=null}Ft(rt,Ko),rt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestampy.maxScale||(y.scale=a))},$e.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Au?!1:(a=y.scale*a,ay.maxScale?!1:y.allowZoom)},$e.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Au&&(a=y.scale*a,ay.maxScale||(y.scale=a))},$e.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Au?!1:(a=y.scale*a,ay.maxScale?!1:y.allowZoom)},$e.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;ay.maxScale||(y.scale=a)},$e.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return ay.maxScale?!1:y.allowZoom},$e.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;es(y,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&E===this.Au&&!isNaN(this.Jt)&&a.documentBounds.D(this.yu)?(a.scale=this.Jt,a.position=this.sw,this.Au=NaN,this.yu=Xa):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ba(y)},$e.prototype.canZoomToFit=function(){return this.diagram.allowZoom},$e.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(ae){this.cg=null}a===null&&(0a&&(a+=360)),a},Ee.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ee.qs=function(a,y){return y===void 0&&(y=new st),y.assign(a),this.oe.Cd(y),y},Ee.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ee.Sj=function(a,y,x,E,b){var z=this.transform,ee=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ee,ae=-z.m12*ee,le=-z.m21*ee,ce=z.m11*ee,fe=ee*(z.m21*z.dy-z.m22*z.dx),Se=ee*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Ot.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ee=a*re+y*le+fe,a=a*ae+y*ce+Se,y=x*re+E*le+fe,x=x*ae+E*ce+Se,b.h(0,0),E=this.naturalBounds,x=Ot.Ff(0,0,E.width,E.height,ee,a,y,x,b),b.transform(z),x)},Ct.prototype.measure=function(a,y,x,E){if(Gc(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var ee=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+ee:a,y=isFinite(b.width)?b.width+ee:y):(a=isFinite(b.width)?b.width+ee:a,y=isFinite(b.height)?b.height+ee:y),b=x||0,ee=E||0;var re=this instanceof ui;switch(yc(this,!0)){case Ln:ee=b=0,re&&(y=a=1/0);break;case bn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(ee=y);break;case Cr:isFinite(a)&&a>x&&(b=a),ee=0,re&&(y=1/0);break;case qr:isFinite(y)&&y>E&&(ee=y),b=0,re&&(a=1/0)}re=this.maxSize;var ae=this.minSize;b>re.width&&ae.widthre.height&&ae.heighta.height||this.Cb>a.width))&&(x=!0)),this.l=x?this.l|256:this.l&-257,this.Ib.w()||$t("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),gd(this,!1),cn.free(z)},Ee=Ct.prototype,Ee.eh=function(){};function Xu(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var ee=x.top+x.bottom;switch(x=z.width+y,z=z.height+ee,E+=y,b+=ee,y=yc(a,!0),x===E&&z===b&&(y=Ln),y){case Ln:(x>E||z>b)&&(Rl(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case bn:Rl(a,!0),a.measure(E,b,0,0);break;case Cr:Rl(a,!0),a.measure(E,z,0,0);break;case qr:Rl(a,!0),a.measure(x,b,0,0)}}}Ee.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||_0(x,!0),this.N(),Ys(a,y)||(x.oh(),this.Pn(x)))},Ee.Pn=function(a){this.portId!==null&&(_0(a,!0),a instanceof Ki&&ZS(a,this))},Ee.gc=function(a,y){if(!Qc(this,a,y)&&this.visible){var x=this.opacity;if(x!==0){var E=1;x!==1&&(E=a.globalAlpha,a.globalAlpha=E*x);var b="";this.filter!==""&&(b=a.filter,a.filter=this.filter);var z=this instanceof ui&&qd(this),ee=this.Ib;if(z){var re=this.Ib,ae=this.dc,le=this.areaBackground,ce=this.Ma;le===null&&ce===null||a.yc(),le!==null&&(Sl(this,a,le,!0,!0,ae,re),le instanceof as&&le.type===eh?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(le)):a.fillRect(re.x,re.y,re.width,re.height)),ce!==null&&(Sl(this,a,ce,!0,!1,ae,re),ce instanceof as&&ce.type===eh?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ce)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||ee.width!==0&&ee.height!==0&&!isNaN(ee.x)&&!isNaN(ee.y))){z=this.transform,re=this.panel,this.l&4096&&Su(this),le=this.part,ae=!1;var fe=0;le&&y.Gf("drawShadows")&&(ae=le.isShadowed)&&(ce=le.shadowOffset,fe=Math.max(ce.y,ce.x)*y.scale*y.Mb),ce=this.Dd();var Se;if(!(Se=y.$i||!ce)){var we=this.naturalBounds;Se=this.wh;var Ae=Se.m11,De=Se.m21,tt=Se.dx,Ze=Se.m12,ht=Se.m22,gt=Se.dy,xt,Dt=xt=0;Se=xt*Ae+Dt*De+tt;var qt=xt*Ze+Dt*ht+gt;xt=we.width+fe,Dt=0;var zi=xt*Ae+Dt*De+tt;xt=xt*Ze+Dt*ht+gt,Dt=Math.min(Se,zi);var cr=Math.min(qt,xt),tr=Math.max(Se+0,zi)-Dt,gi=Math.max(qt+0,xt)-cr;Se=Dt,qt=cr,xt=we.width+fe,Dt=we.height+fe,zi=xt*Ae+Dt*De+tt,xt=xt*Ze+Dt*ht+gt,Dt=Math.min(Se,zi),cr=Math.min(qt,xt),tr=Math.max(Se+tr,zi)-Dt,gi=Math.max(qt+gi,xt)-cr,Se=Dt,qt=cr,xt=0,Dt=we.height+fe,zi=xt*Ae+Dt*De+tt,xt=xt*Ze+Dt*ht+gt,Dt=Math.min(Se,zi),cr=Math.min(qt,xt),tr=Math.max(Se+tr,zi)-Dt,gi=Math.max(qt+gi,xt)-cr,Se=Dt,qt=cr,fe=y.viewportBounds,we=fe.x,Ae=fe.y,Se=!(Se>fe.width+we||we>tr+Se||qt>fe.height+Ae||Ae>gi+qt)}if(Se){if(Se=(this.l&256)!==0,a.clipInsteadOfFill&&(Se=!1),this instanceof ks&&(a.font=this.font),Se){if(qt=re.se()?re.naturalBounds:re.actualBounds,tr=Math.max(ee.x,qt.x),gi=Math.max(ee.y,qt.y),fe=Math.min(ee.right,qt.right)-tr,we=Math.min(ee.bottom,qt.bottom)-gi,Ae=this.tb,Ae!==null&&(tr=Ae.x,gi=Ae.y,fe=Ae.width,we=Ae.height),tr>ee.width+ee.x||ee.x>qt.width+qt.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(tr,gi,fe,we),a.clip()}if(ce){if(!le.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ae&&(qt=le.shadowOffset,a.Ev(qt.x*y.scale*this.scale*y.Mb,qt.y*y.scale*this.scale*y.Mb,le.shadowBlur),Td(a),a.shadowColor=le.shadowColor)}ae&&this.shadowVisible===!0?Td(a):ae&&this.shadowVisible===!1&&pd(a),le=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Kc(this,a,le,ee)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ae&&uu(this,re)&&this.shadowVisible===null&&pd(a),this.Ma!==null&&(a.yc(),bc(this,a,le,ee)),ae&&(this.Ma!==null||this.areaBackground!==null||uu(this,re))?(Eh(this,!0),this.shadowVisible===null&&pd(a)):Eh(this,!1),this.hh(a,y),ae&&this.l&512&&Td(a),ce&&ae&&pd(a),Se&&(a.restore(),a.Vc(this instanceof ui)),z.ws()||(y=1/(z.m11*z.m22-z.m12*z.m21),a.transform(z.m22*y,-z.m12*y,-z.m21*y,z.m11*y,y*(z.m21*z.dy-z.m22*z.dx),y*(z.m12*z.dx-z.m11*z.dy)))}}x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b)}}};function uu(a,y){return y===null?!1:(qd(y)&&(y=y.panel),(y.l&512)!==0||(y.type===ui.Auto||y.type===ui.Spot)&&y.Pb()!==a)}Ee.Dv=function(){};function Kc(a,y,x,E){Sl(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof as&&a.areaBackground.type===eh?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function bc(a,y,x,E){var b=a.kq(),z=x.x,ee=x.y,re=x.width+b,ae=x.height+b;Sl(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof as&&a.Ma.type===eh?(y.beginPath(),y.rect(z-b/2,ee-b/2,re,ae),y.ng(a.Ma)):y.fillRect(z-b/2,ee-b/2,re,ae)}function Ku(a,y,x){for(var E=y.O.s,b=E.length,z=-1,ee=0;eeb)&&$t("Must specify non-negative integer row for RowColumnDefinition "+y+", not: "+b),a.isRow=!0,a.index=b):y.column!==void 0&&(b=y.column,(b==null||b===1/0||isNaN(b)||0>b)&&$t("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Ao;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);vl(a,b)}else vl(a,y);else $t('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Jd(a,y){Dg.add(a,y)}function pm(a,y,x){x===void 0&&(x=null);var E=a[1];if(typeof x=="function"?x(E):typeof E=="string")return a.splice(1,1),E;if(y===void 0)throw Error("no "+(typeof x=="function"?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return y}un.Object.defineProperties(Ct.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new cg),this.A.zp=a)}},localBindings:{get:function(){return this.A!==null?this.A.te:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new cg),this.A.te=a)}},srcBindings:{get:function(){return this.A!==null?this.A.wm:null},set:function(a){this.srcBindings!==a&&(this.A===null&&(this.A=new cg),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&($o(this),this.A.Ci=a,this.Uc=!0,this.N(),this.g("shadowVisible",y,a))}},enabledChanged:{get:function(){return this.A!==null?this.A.Hb:null},set:function(a){var y=this.enabledChanged;y!==a&&($o(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:ac},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new xf),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===ac&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new xf),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1a||1=a&&$t("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,qy(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Zo&&this.qc(),this.g("desiredSize",E,a),Mu(this)&&(a=this.part,a!==null&&(Gs(this,a,"width"),Gs(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new fn(a,this.jd.height).freeze(),this.v(),this instanceof Zo&&this.qc(),this.g("desiredSize",y,a),Mu(this)&&(a=this.part,a!==null&&Gs(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new fn(this.jd.width,a).freeze(),this.v(),this instanceof Zo&&this.qc(),this.g("desiredSize",y,a),Mu(this)&&(a=this.part,a!==null&&Gs(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:eo},set:function(a){var y=this.minSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),$o(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:ns},set:function(a){var y=this.maxSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=1/0),isNaN(a.height)&&(a.height=1/0),a.freeze(),$o(this),this.A.o=a,this.v(),this.g("maxSize",y,a))}},measuredBounds:{get:function(){return this.uc}},naturalBounds:{get:function(){return this.dc}},margin:{get:function(){return this.Kg},set:function(a){typeof a=="number"&&(a=new Mo(a));var y=this.Kg;y.D(a)||(this.Kg=a=a.J(),this.v(),this.g("margin",y,a))}},transform:{get:function(){return this.l&2048&&Su(this),this.Ab}},oe:{get:function(){return this.l&4096&&Su(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&($o(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Ln},set:function(a){this.reshapingBehavior!==a&&($o(this),this.A.Pf=a)}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(a.Mc()&&!a.Xb()&&$t("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),nc(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Wr(a,">= 0",Ct,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Wr(a,">= 1",Ct,"columnSpan"),$o(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Wr(a,">= 0",Ct,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Wr(a,">= 1",Ct,"rowSpan"),$o(this),this.A.Bi=a,this.v(),this.g("rowSpan",y,a))}},spanAllocation:{get:function(){return this.A!==null?this.A.Di:null},set:function(a){var y=this.spanAllocation;y!==a&&($o(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof Ki||$t("Cannot set portID on a Link: "+a),y!==null&&x!==null&&U0(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,QS(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:hl},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Gf(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Wr(a,">= 0",Ct,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Gf(this))}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:0},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.g("toShortLength",y,a),Gf(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&Wr(a,">= 0",Ct,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:hl},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Gf(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Wr(a,">= 0",Ct,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Gf(this))}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:0},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.g("fromShortLength",y,a),Gf(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&Wr(a,">= 0",Ct,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",y,a))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(a){var y=this.cursor;y!==a&&($o(this),this.A.j=a,this.g("cursor",y,a))}},click:{get:function(){return this.A!==null?this.A.zh:null},set:function(a){var y=this.click;y!==a&&($o(this),this.A.zh=a,this.g("click",y,a))}},doubleClick:{get:function(){return this.A!==null?this.A.Fh:null},set:function(a){var y=this.doubleClick;y!==a&&($o(this),this.A.Fh=a,this.g("doubleClick",y,a))}},contextClick:{get:function(){return this.A!==null?this.A.Bh:null},set:function(a){var y=this.contextClick;y!==a&&($o(this),this.A.Bh=a,this.g("contextClick",y,a))}},mouseEnter:{get:function(){return this.A!==null?this.A.Mh:null},set:function(a){var y=this.mouseEnter;y!==a&&($o(this),this.A.Mh=a,this.g("mouseEnter",y,a))}},mouseLeave:{get:function(){return this.A!==null?this.A.Ph:null},set:function(a){var y=this.mouseLeave;y!==a&&($o(this),this.A.Ph=a,this.g("mouseLeave",y,a))}},mouseOver:{get:function(){return this.A!==null?this.A.Qh:null},set:function(a){var y=this.mouseOver;y!==a&&($o(this),this.A.Qh=a,this.g("mouseOver",y,a))}},mouseHover:{get:function(){return this.A!==null?this.A.Oh:null},set:function(a){var y=this.mouseHover;y!==a&&($o(this),this.A.Oh=a,this.g("mouseHover",y,a))}},mouseHold:{get:function(){return this.A!==null?this.A.Nh:null},set:function(a){var y=this.mouseHold;y!==a&&($o(this),this.A.Nh=a,this.g("mouseHold",y,a))}},mouseDragEnter:{get:function(){return this.A!==null?this.A.Of:null},set:function(a){var y=this.mouseDragEnter;y!==a&&($o(this),this.A.Of=a,this.g("mouseDragEnter",y,a))}},mouseDragLeave:{get:function(){return this.A!==null?this.A.Xd:null},set:function(a){var y=this.mouseDragLeave;y!==a&&($o(this),this.A.Xd=a,this.g("mouseDragLeave",y,a))}},mouseDrop:{get:function(){return this.A!==null?this.A.Lh:null},set:function(a){var y=this.mouseDrop;y!==a&&($o(this),this.A.Lh=a,this.g("mouseDrop",y,a))}},actionDown:{get:function(){return this.A!==null?this.A.V:null},set:function(a){var y=this.actionDown;y!==a&&($o(this),this.A.V=a,this.g("actionDown",y,a))}},actionMove:{get:function(){return this.A!==null?this.A.ia:null},set:function(a){var y=this.actionMove;y!==a&&($o(this),this.A.ia=a,this.g("actionMove",y,a))}},actionUp:{get:function(){return this.A!==null?this.A.Ha:null},set:function(a){var y=this.actionUp;y!==a&&($o(this),this.A.Ha=a,this.g("actionUp",y,a))}},actionCancel:{get:function(){return this.A!==null?this.A.F:null},set:function(a){var y=this.actionCancel;y!==a&&($o(this),this.A.F=a,this.g("actionCancel",y,a))}},toolTip:{get:function(){return this.A!==null?this.A.$h:null},set:function(a){var y=this.toolTip;y!==a&&($o(this),this.A.$h=a,this.g("toolTip",y,a))}},contextMenu:{get:function(){return this.A!==null?this.A.Ch:null},set:function(a){var y=this.contextMenu;y!==a&&($o(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Ct.prototype.trigger=Ct.prototype.Jv,Ct.prototype.findBindingPanel=Ct.prototype.ih,Ct.prototype.findTemplateBinder=Ct.prototype.pz,Ct.prototype.setProperties=Ct.prototype.nm,Ct.prototype.apply=Ct.prototype.apply,Ct.prototype.attach=Ct.prototype.Du,Ct.prototype.set=Ct.prototype.set,Ct.prototype.isEnabledObject=Ct.prototype.If,Ct.prototype.isVisibleObject=Ct.prototype.Ed,Ct.prototype.isContainedBy=Ct.prototype.rg,Ct.prototype.getNearestIntersectionPoint=Ct.prototype.rs,Ct.prototype.getLocalPoint=Ct.prototype.qs,Ct.prototype.getDocumentScale=Ct.prototype.Df,Ct.prototype.getDocumentAngle=Ct.prototype.li,Ct.prototype.getDocumentBounds=Ct.prototype.mi,Ct.prototype.getDocumentPoint=Ct.prototype.ga,Ct.prototype.intersectsRect=Ct.prototype.Yc,Ct.prototype.containedInRect=Ct.prototype.fh,Ct.prototype.containsRect=Ct.prototype.Re,Ct.prototype.containsPoint=Ct.prototype.ca,Ct.prototype.raiseChanged=Ct.prototype.g,Ct.prototype.raiseChangedEvent=Ct.prototype.cb,Ct.prototype.addCopyProperty=Ct.prototype.Vw;var Dg=null;Ct.className="GraphObject",Dg=new wr,Jd("Button",function(){function a(x,E){return x.diagram.ic(x.documentPoint,function(b){for(;b.panel!==null&&!b.isActionable;)b=b.panel;return b},function(b){return b===E})!==null}var y=$c(ui,ui.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof ui){var b=x.fb("ButtonBorder");b!==null&&(b.fill=E?x._buttonFillNormal:x._buttonFillDisabled)}},cursor:"pointer",_buttonFillNormal:"#F5F5F5",_buttonStrokeNormal:"#BDBDBD",_buttonFillOver:"#E0E0E0",_buttonStrokeOver:"#9E9E9E",_buttonFillPressed:"#BDBDBD",_buttonStrokePressed:"#9E9E9E",_buttonFillDisabled:"#E5E5E5"},$c(Zo,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new kr(0,0,2.76142374915397,2.761423749153969),spot2:new kr(1,1,-2.76142374915397,-2.761423749153969),parameter1:2,parameter2:2,fill:"#F5F5F5",stroke:"#BDBDBD"}));return y.mouseEnter=function(x,E){if(E.If()&&E instanceof ui&&(x=E.fb("ButtonBorder"),x instanceof Zo)){var b=E._buttonFillOver;E._buttonFillNormal=x.fill,x.fill=b,b=E._buttonStrokeOver,E._buttonStrokeNormal=x.stroke,x.stroke=b}},y.mouseLeave=function(x,E){E.If()&&E instanceof ui&&(x=E.fb("ButtonBorder"),x instanceof Zo&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof ui&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Zo){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var ee=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=ee,ee=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=ee,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof ui&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Zo){var z=x.diagram,ee=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=ee}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof ui&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Zo){var z=x.diagram,ee=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=ee}}},y.actionMove=function(x,E){if(E.If()&&E instanceof ui&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Zo))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var ee=E._buttonFillPressed;x.fill!==ee&&(x.fill=ee),ee=E._buttonStrokePressed,x.stroke!==ee&&(x.stroke=ee),b.skipsUndoManager=z}}},y}),Jd("TreeExpanderButton",function(){var a=$c("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},$c(Zo,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:fa},new Dl("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Dl("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Ga&&(x=x.adornedPart),x instanceof Ki){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isTreeExpanded){if(!E.canCollapseTree(x))return}else if(!E.canExpandTree(x))return;y.handled=!0,x.isTreeExpanded?E.collapseTree(x):E.expandTree(x)}}},a}),Jd("SubGraphExpanderButton",function(){var a=$c("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},$c(Zo,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:fa},new Dl("figure","isSubGraphExpanded",function(y,x){return x=x.panel,y?x._subGraphExpandedFigure:x._subGraphCollapsedFigure}).cp()));return a.click=function(y,x){if(x=x.part,x instanceof Ga&&(x=x.adornedPart),x instanceof Io){var E=x.diagram;if(E!==null){if(E=E.commandHandler,x.isSubGraphExpanded){if(!E.canCollapseSubGraph(x))return}else if(!E.canExpandSubGraph(x))return;y.handled=!0,x.isSubGraphExpanded?E.collapseSubGraph(x):E.expandSubGraph(x)}}},a}),Jd("ToolTip",function(){return $c(Ga,ui.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},$c(Zo,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new kr(0,0,4,6),spot2:new kr(1,1,-4,-4)}))}),Jd("ContextMenu",function(){return $c(Ga,ui.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},new Dl("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Jd("ContextMenuButton",function(){var a=$c("Button");a.stretch=Cr;var y=a.fb("ButtonBorder");return y instanceof Zo&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new kr(0,0,2,3),y.spot2=new kr(1,1,-2,-2)),a}),Jd("PanelExpanderButton",function(a){var y=pm(a,"COLLAPSIBLE"),x=$c("Button",{_buttonExpandedFigure:"M0 0 M0 6 L4 2 8 6 M8 8",_buttonCollapsedFigure:"M0 0 M0 2 L4 6 8 2 M8 8",_buttonFillNormal:"rgba(0, 0, 0, 0)",_buttonStrokeNormal:null,_buttonFillOver:"rgba(0, 0, 0, .2)",_buttonStrokeOver:null,_buttonFillPressed:"rgba(0, 0, 0, .4)",_buttonStrokePressed:null},$c(Zo,{name:"ButtonIcon",strokeWidth:2},new Dl("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Zo&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var ee=b.ih();ee===null&&(ee=b.part),ee!==null&&(b=ee.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),Jd("CheckBoxButton",function(a){var y=pm(a);return a=$c("Button",{desiredSize:new fn(14,14)},$c(Zo,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:bn,geometryStretch:er,visible:!1},y!==""?new Dl("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof ui){var b=x.diagram;if(!(b===null||b.isReadOnly||y!==""&&b.model.isReadOnly)){x.handled=!0;var z=E.fb("ButtonIcon");b.Ea("checkbox"),z.visible=!z.visible,typeof E._doClick=="function"&&E._doClick(x,E),b.eb("checkbox")}}},a}),Jd("CheckBox",function(a){a=pm(a),a=$c("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Mo(0,1,0,0)});var y=$c(ui,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Mo(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),Ct.None=Ln=new ln(Ct,"None",0),Ct.Default=jo=new ln(Ct,"Default",0),Ct.Vertical=qr=new ln(Ct,"Vertical",4),Ct.Horizontal=Cr=new ln(Ct,"Horizontal",5),Ct.Fill=bn=new ln(Ct,"Fill",3),Ct.Uniform=er=new ln(Ct,"Uniform",1),Ct.UniformToFill=La=new ln(Ct,"UniformToFill",2),Ct.FlipVertical=ta=new ln(Ct,"FlipVertical",1),Ct.FlipHorizontal=za=new ln(Ct,"FlipHorizontal",2),Ct.FlipBoth=ps=new ln(Ct,"FlipBoth",3),Ct.make=$c,Ct.getBuilders=function(){var a=new wr,y;for(y in Dg)if(y!==y.toLowerCase()){var x=Dg.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Ct.defineBuilder=Jd,Ct.build=function(a,y,x){for(var E=[],b=2;ba&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,ee=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=ee,this.translate(-y,-x)}},Uf.className="STransform";function hg(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}hg.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},hg.className="SGradient";function ed(a,y,x){this.ownerDocument=a=y===void 0?Ut.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new Tc(this,x)}ed.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},ed.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Sn(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},ed.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},ed.prototype.focus=function(){this.Oa.focus()},ed.prototype.mx=function(){this.ownerDocument=null},un.Object.defineProperties(ed.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}}),ed.className="SVGSurface";function Tc(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new Uf,this.j=mm(this),this.Nj=mm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=kl++,E=this.Ud("clipPath",{id:"mainClip"+x});E.appendChild(this.Ud("rect",{x:0,y:0,width:a.width,height:a.height})),this.ww=E,this.svg.appendChild(this.j),this.j.appendChild(this.Nj),this.svg.appendChild(E),this.j.setAttributeNS(null,"clip-path","url(#mainClip"+x+")"),this.eA={},this.isTemporary=!!y,this.filter="",this.bk=null}function $y(a,y,x,E,b,z,ee){a.Nj===void 0?Sp(a,y,x,E,b,z,ee):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+ee+")")}Ee=Tc.prototype,Ee.arc=function(a,y,x,E,b,z,ee,re){var ae=2*Math.PI,le=ae-1e-6,ce=x*Math.cos(E),fe=x*Math.sin(E),Se=a+ce,we=y+fe,Ae=z?0:1;E=z?E-b:b-E,(1e-6E&&(E=E%ae+ae),E>le?(this.path.push(["A",x,x,0,1,Ae,a-ce,y-fe]),this.path.push(["A",x,x,0,1,Ae,Se,we])):1e-6=Math.PI),Ae,a+x*Math.cos(b),y+x*Math.sin(b)])},Ee.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ee.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ee.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Ee.clearRect=function(){},Ee.clip=function(){this.Yl.clipPath=!0},Ee.closePath=function(){this.path.push(["z"])},Ee.createLinearGradient=function(a,y,x,E){var b=new hg("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Ee.createPattern=function(a){var y="";a instanceof HTMLCanvasElement&&(y=a.toDataURL()),a instanceof HTMLImageElement&&(y=a.getAttribute("src"));var x=this.eA;if(x[y])return"url(#"+x[y]+")";var E="PATTERN"+kl++,b={x:0,y:0,width:a.width,height:a.height,href:y};return a=this.Ud("pattern",{width:a.width,height:a.height,id:E,patternUnits:"userSpaceOnUse"}),a.appendChild(this.Ud(dd,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Ee.createRadialGradient=function(a,y,x,E,b,z){var ee=new hg("radial");return ee.x1=a,ee.y1=y,ee.r1=x,ee.x2=E,ee.y2=b,ee.r2=z,ee};function eS(a,y,x,E,b,z,ee,re,ae){E=re/E,b=ae/b,z===0&&ee===0||a.rb.translate(z,ee),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}Ee.drawImage=function(a,y,x,E,b,z,ee,re,ae){var le="";a instanceof HTMLCanvasElement&&(le=a.toDataURL()),a instanceof HTMLImageElement&&(le=a.getAttribute("src"));var ce=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ee=x,re=E=ce,ae=b=a),E=E||0,b=b||0,re=re||0,ae=ae||0,eS(this,y,x,E,b,z||0,ee||0,re,ae),z={x:0,y:0,width:ce||E,height:a||b,href:le},Ot.$(E,re)&&Ot.$(b,ae)?le.toLowerCase().indexOf(".svg")===-1&&le.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ce||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),Tg(this,dd,z,this.rb),this.addElement(dd,z)},Ee.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),s0(this,this.Yl)},Ee.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ee.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},Tg(this,"fill",a,this.rb),this.addElement("rect",a)},Ee.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},Tg(this,"fill",a,this.rb),s0(this,a),this.svg.prepend(this.Ud("rect",a))},Ee.fillText=function(a,y,x){a=[a,y,x],y=this.textAlign,y==="left"?y="start":y==="right"?y="end":y==="center"&&(y="middle"),y={x:a[1],y:a[2],style:"font: "+this.font,"text-anchor":y},Tg(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Ee.lineTo=function(a,y){this.path.push(["L",a,y])},Ee.moveTo=function(a,y){this.path.push(["M",a,y])},Ee.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Ee.rect=function(a,y,x,E){this.path.push(["M",a,y],["L",a+x,y],["L",a+x,y+E],["L",a,y+E],["z"])},Ee.restore=function(){this.rb=this.stack.pop(),this.path=this.stack.pop();var a=this.stack.pop();this.fillStyle=a.fillStyle,this.font=a.font,this.globalAlpha=a.globalAlpha,this.lineCap=a.lineCap,this.lineDashOffset=a.lineDashOffset,this.lineJoin=a.lineJoin,this.lineWidth=a.lineWidth,this.miterLimit=a.miterLimit,this.shadowBlur=a.shadowBlur,this.shadowColor=a.shadowColor,this.shadowOffsetX=a.shadowOffsetX,this.shadowOffsetY=a.shadowOffsetY,this.strokeStyle=a.strokeStyle,this.textAlign=a.textAlign,this.bk=a.bk},Ee.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign,bk:this.bk});for(var a=[],y=0;yce.offset?1:-1}),b=0;bx?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Ee.jk=function(){this.Hm||this.stroke()},Ee.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ee.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ee.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(bx),a.lineDashOffset=0)},Ee.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ee.Hs=function(){},un.Object.defineProperties(Yf.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var bx=Object.freeze([]);Yf.className="CanvasSurfaceContext";function xp(){this.F=this.o=this.u=this.j=0}xp.className="ColorNumbers";function as(a,y){Rg||(g0(),Rg=!0),Po(this),this._isFrozen=!1,a===void 0?(this.na=Qd,this.xk="black"):typeof a=="string"?(this.na=Qd,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Od?(this.Qd=Bu,this.Lk=Il):this.Lk=a===eh?this.Qd=Sa:this.Qd=hl,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}as.prototype.copy=function(){var a=new as;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},Ee=as.prototype,Ee.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ee.ka=function(){return Object.isFrozen(this)&&$t("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ee.qb=function(a){a.classType===as&&(this.type=a)},Ee.toString=function(){var a="Brush(";if(this.type===Qd)a+=this.color;else if(a=this.type===Od?a+"Linear ":this.type===eh?a+"Radial ":this.type===jg?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},Ee.addColorStop=function(a,y){return this._isFrozen&&_i(this),(typeof a!="number"||!isFinite(a)||1a)&&Wr(a,"0 <= loc <= 1",as,"addColorStop:loc"),this.we===null&&(this.we=new wr),this.we.add(a,y),this.na===Qd&&(this.type=Od),this.xe=null,this},Ee.Vz=function(a,y){if(this._isFrozen&&_i(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?zg:y,this.type===Qd)Bd(this.color),this.color=Og(a,y);else if((this.type===Od||this.type===eh)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Bd(x.value),this.addColorStop(x.key,Og(a,y));return this};function rS(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?zg:x,Bd(a),Og(y,x)}Ee.Wy=function(a,y){if(this._isFrozen&&_i(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?zg:y,this.type===Qd)Bd(this.color),this.color=Og(-a,y);else if((this.type===Od||this.type===eh)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Bd(x.value),this.addColorStop(x.key,Og(-a,y));return this};function oS(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?zg:x,Bd(a),Og(-y,x)}function u0(a,y,x){Bd(a),a=Os.j;var E=Os.u,b=Os.o,z=Os.F;return Bd(y),x===void 0&&(x=.5),"rgba("+Math.round((Os.j-a)*x+a)+", "+Math.round((Os.u-E)*x+E)+", "+Math.round((Os.o-b)*x+b)+", "+Math.round((Os.F-z)*x+z)+")"}Ee.Gx=function(){if(this.type===Qd)return Bg(this.color);if((this.type===Od||this.type===eh)&&this.colorStops!==null){var a=this.colorStops;if(this.type===eh)return Bg(a.first().value);if(a.get(.5)!==null)return Bg(a.get(.5));if(a.count===2)return a=a.Fa(),Bg(u0(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var ee=y.key,re=Math.abs(.5-y.key);b>z&&re=b&&reE&&(z=x,x=E,E=z,z=b),b=E-x,Bg(u0(a.get(x),a.get(E),1-z/b))}return!1};function Bg(a){return a?a instanceof as?a.Gx():(Bd(a),128>(299*Os.j+587*Os.u+114*Os.o)/1e3):!1}function Og(a,y){switch(y){case zg:y=100*h0(Os.j);var x=100*h0(Os.u),E=100*h0(Os.o);return rc.j=.4124564*y+.3575761*x+.1804375*E,rc.u=.2126729*y+.7151522*x+.072175*E,rc.o=.0193339*y+.119192*x+.9503041*E,rc.F=Os.F,y=f0(rc.j/Ig[0]),x=f0(rc.u/Ig[1]),E=f0(rc.o/Ig[2]),md.j=116*x-16,md.u=500*(y-x),md.o=200*(x-E),md.F=rc.F,md.j=Math.min(100,Math.max(0,md.j+100*a)),a=(md.j+16)/116,y=a-md.o/200,rc.j=Ig[0]*aS(md.u/500+a),rc.u=Ig[1]*(md.j>ym*p0?Math.pow(a,3):md.j/ym),rc.o=Ig[2]*aS(y),rc.F=md.F,a=-.969266*rc.j+1.8760108*rc.u+.041556*rc.o,y=.0556434*rc.j+-.2040259*rc.u+1.0572252*rc.o,Os.j=255*d0((3.2404542*rc.j+-1.5371385*rc.u+-.4985314*rc.o)/100),Os.u=255*d0(a/100),Os.o=255*d0(y/100),Os.F=rc.F,Os.j=Math.round(Os.j),255Os.j&&(Os.j=0),Os.u=Math.round(Os.u),255Os.u&&(Os.u=0),Os.o=Math.round(Os.o),255Os.o&&(Os.o=0),"rgba("+Os.j+", "+Os.u+", "+Os.o+", "+Os.F+")";case sS:return c0(),Uc.o=Math.min(100,Math.max(0,Uc.o+100*a)),"hsla("+Uc.j+", "+Uc.u+"%, "+Uc.o+"%, "+Uc.F+")";default:$t("Unknown color space: "+y)}}function Bd(a){Rg||(g0(),Rg=!0);var y=m0;if(y!==null){y.clearRect(0,0,1,1),y.fillStyle="#000000";var x=y.fillStyle;y.fillStyle=a,y.fillStyle!==x?(y.fillRect(0,0,1,1),a=y.getImageData(0,0,1,1).data,Os.j=a[0],Os.u=a[1],Os.o=a[2],Os.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Os.j=0,Os.u=0,Os.o=0,Os.F=1)}}function c0(){var a=Os.j/255,y=Os.u/255,x=Os.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var ee=a=0;else{switch(E){case a:ee=(y-x)/z%6;break;case y:ee=(x-a)/z+2;break;case x:ee=(a-y)/z+4}ee*=60,0>ee&&(ee+=360),a=z/(1-Math.abs(2*b-1))}Uc.j=Math.round(ee),Uc.u=Math.round(100*a),Uc.o=Math.round(100*b),Uc.F=Os.F}function h0(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function d0(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function f0(a){return a>p0?Math.pow(a,1/3):(ym*a+16)/116}function aS(a){var y=a*a*a;return y>p0?y:(116*a-16)/ym}function dg(a,y){typeof a!="string"&&(a instanceof as||$t("Value for "+y+" must be a color string or a Brush, not "+a))}function g0(){m0=zs?new dh(null,void 0,{willReadFrequently:!0}).context:null}un.Object.defineProperties(as.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&_i(this,a),this.na=a,this.start.Mc()&&(a===Od?this.start=Bu:a===eh&&(this.start=Sa)),this.end.Mc()&&(a===Od?this.end=Il:a===eh&&(this.end=Sa)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&_i(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&_i(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&_i(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&_i(this,a),0>a&&Wr(a,">= zero",as,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&_i(this,a),0>a&&Wr(a,">= zero",as,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&_i(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&_i(this,a),this.cr=a,this.xe=null}}}),as.prototype.isDark=as.prototype.Gx,as.prototype.darkenBy=as.prototype.Wy,as.prototype.lightenBy=as.prototype.Vz,as.prototype.addColorStop=as.prototype.addColorStop;var p0=216/24389,ym=24389/27,Ig=[95.047,100,108.883],m0=null,Os=new xp,Uc=new xp,rc=new xp,md=new xp,Rg=!1;as.className="Brush";var Qd;as.Solid=Qd=new ln(as,"Solid",0);var Od;as.Linear=Od=new ln(as,"Linear",1);var eh;as.Radial=eh=new ln(as,"Radial",2);var jg;as.Pattern=jg=new ln(as,"Pattern",4);var zg;as.Lab=zg=new ln(as,"Lab",5);var sS;as.HSL=sS=new ln(as,"HSL",6),as.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},as.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Rg||(g0(),Rg=!0);var y=m0;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},as.lighten=function(a){return rS(a)},as.lightenBy=rS,as.darken=function(a){return oS(a)},as.darkenBy=oS,as.mix=u0,as.isDark=Bg;function Hl(){this.xa="Base"}Hl.prototype.measure=function(){},Hl.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Hl.prototype.arrange=function(){},Hl.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Hl.prototype.iA=function(a){a.Uj()},Hl.prototype.gc=function(){},un.Object.defineProperties(Hl.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return ui}}}),Hl.prototype.remeasureObject=Hl.prototype.iA,Hl.prototype.arrangeElement=Hl.prototype.Ly,Hl.prototype.measureElement=Hl.prototype.Yz,Hl.className="PanelLayout";function Sm(){this.xa="Base"}Ft(Sm,Hl),Sm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length;a=Id(a);for(var ae=0;aecr&&(Ql=Math.max(cr-Of,0));var Yv=_n.oa===0;_n.oc=_n.oc+Ql,_n.actual=_n.oa+Ql,cr=Math.max(cr-(Ql+(Yv?Of:0)),0)}if(Mc.columnSpan===1&&(qu===Ln||qu===qr)){_n=a.Eb(Qu);var lm=_n.Wc();Ql=Math.max(ng-_n.actual,0),Ql+lm>zi&&(Ql=Math.max(zi-lm,0));var Ky=_n.oa===0;_n.oc=_n.oc+Ql,_n.actual=_n.oa+Ql,zi=Math.max(zi-(Ql+(Ky?lm:0)),0)}Bf&&Mc.Uj()}}}}}Nr(ht);var bd=0,zd=0;z=a.columnCount;for(var bg=0;bg=a.rowCount);ff++)_n=a.Fb(Cl.row+ff),Ql=0,Ql=qu===bn||qu===qr?Math.max(_n.minimum,Gh[Cl.row+ff]===0?_n.maximum:Math.min(Gh[Cl.row+ff],_n.maximum)):Math.max(_n.minimum,isNaN(_n.Hc)?_n.maximum:Math.min(_n.Hc,_n.maximum)),_d.height+=Ql,zc+=_n.minimum;for(var yh=1;yh=a.columnCount);yh++)_n=a.Eb(Cl.column+yh),Ql=0,Ql=qu===bn||qu===Cr?Math.max(_n.minimum,oh[Cl.column+yh]===0?_n.maximum:Math.min(oh[Cl.column+yh],_n.maximum)):Math.max(_n.minimum,isNaN(_n.Hc)?_n.maximum:Math.min(_n.Hc,_n.maximum)),_d.width+=Ql,Qv+=_n.minimum;wu.width+=_d.width,wu.height+=_d.height;var pp=Cl.margin,Wf=pp.right+pp.left,cm=pp.top+pp.bottom;Cl.measure(wu.width,wu.height,Qv,zc);for(var mp=Cl.measuredBounds,ad=Math.max(mp.width+Wf,0),ag=Math.max(mp.height+cm,0),Hf=0,vp=0;vp=a.rowCount);vp++)_n=a.Fb(Cl.row+vp),Hf+=_n.total||0;if(Hf=gf)&&!(Cl.row+Vd>=a.rowCount);Vd++){_n=a.Fb(Cl.row+Vd);var mf=_n.oa||0,sg=pf(Cl,_n,Md);_n.actual=Math.min(_n.maximum,mf+sg),_n.oa!==mf&&(gf-=_n.oa-mf)}for(;0Uh&&(_n.actual=Math.min(_n.maximum,Uh+gf),_n.oa!==Uh&&(gf-=_n.oa-Uh)),_n.index===0)break;_n=a.Fb(_n.index-1)}}for(var Lg=0,vf=0;vf=a.columnCount);vf++)_n=a.Eb(Cl.column+vf),Lg+=_n.total||0;if(Lg=kg)&&!(Cl.column+lg>=a.columnCount);lg++){_n=a.Eb(Cl.column+lg);var hm=_n.oa||0,Yy=Kd(Cl,_n,Uy);_n.actual=Math.min(_n.maximum,hm+Yy),_n.oa!==hm&&(kg-=_n.oa-hm)}for(;0qv&&(_n.actual=Math.min(_n.maximum,qv+kg),_n.oa!==qv&&(kg-=_n.oa-qv)),_n.index===0)break;_n=a.Eb(_n.index-1)}}}}Nr(gt),fn.free(_d),fn.free(wu),Gh!==void 0&&Nr(Gh),oh!==void 0&&Nr(oh);var Fg=0,Ng=0,$v=a.desiredSize,Sx=a.maxSize;qu=yc(a,!0);var dm=zd=bd=0,fm=0;z=a.columnCount;for(var e0=0;e0=a.rowCount);_n++){var Bo=a.Fb(ht+_n);Bo.oa!==0&&(Ze.height+=Bo.total)}for(_n=1;_n=a.columnCount);_n++)Bo=a.Eb(xt+_n),Bo.oa!==0&&(Ze.width+=Bo.total);var xo=Dt.oa+Ze.width,qa=gt.oa+Ze.height;_n=re,Bo=ae;var Ls=xo,Jl=qa,ru=re,Ju=ae,Ql=xo,uf=qa;re+xo>x.width&&(Ql=Math.max(x.width-re,0)),ae+qa>x.height&&(uf=Math.max(x.height-ae,0));var Tl=tr.alignment;if(Tl.Xb()){Tl=a.defaultAlignment,Tl.sb()||(Tl=Sa);var _h=Tl.x,Qu=Tl.y,cf=Tl.offsetX;Tl=Tl.offsetY;var Xc=Dt.alignment,mh=gt.alignment;Xc.sb()&&(_h=Xc.x,cf=Xc.offsetX),mh.sb()&&(Qu=mh.y,Tl=mh.offsetY)}else _h=Tl.x,Qu=Tl.y,cf=Tl.offsetX,Tl=Tl.offsetY;(isNaN(_h)||isNaN(Qu))&&(Qu=_h=.5,Tl=cf=0),Xc=gi.width,mh=gi.height;var Ic=tr.margin,Mc=Ic.left+Ic.right,Bf=Ic.top+Ic.bottom,Vh=Rh(tr,gt,Dt,!1);!isNaN(tr.desiredSize.width)||Vh!==bn&&Vh!==Cr||(Xc=Math.max(xo-Mc,0)),!isNaN(tr.desiredSize.height)||Vh!==bn&&Vh!==qr||(mh=Math.max(qa-Bf,0)),xo=tr.maxSize,qa=tr.minSize,Xc=Math.min(xo.width,Xc),mh=Math.min(xo.height,mh),Xc=Math.max(qa.width,Xc),mh=Math.max(qa.height,mh),xo=mh+Bf,_n+=Ls*_h-(Xc+Mc)*_h+cf+Ic.left,Bo+=Jl*Qu-xo*Qu+Tl+Ic.top,tr.visible&&(il(ru,Ju,Ql,uf,_n,Bo,gi.width,gi.height)?tr.arrange(_n,Bo,Xc,mh):tr.arrange(_n,Bo,Xc,mh,new cn(ru,Ju,Ql,uf)))}}}for(fn.free(Ze),a=0;a=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,ee=a.actualBounds,re=z.width,ae=z.height,le=Math.ceil(re/b),ce=Math.ceil(ae/E),fe=a.gridOrigin,Se=fe.x;fe=fe.y,y.save(),y.beginPath(),y.rect(0,0,re,ae),y.clip(),y.Se();for(var we=[],Ae=a.O.s,De=Ae.length,tt=0;ttgt)){Ze=S0(Ze.figure);for(var xt=0;xtgt&&ht.push(Dt))}}}}for(Ae=a.O.s,De=Ae.length,tt=0;ttb*Ze*x))){if(gt=qt.segmentIndex,(!isFinite(gt)||isNaN(gt))&&(gt=0),0>gt&&(gt=Ze-Math.min(-gt,Ze)),gt=Math.round(gt%Ze),Ze=qt.opacity,xt=1,Ze!==1){if(Ze===0)continue;xt=y.globalAlpha,y.globalAlpha=xt*Ze}Dt=we[tt];var zi=!1,cr=qt.strokeDashArray;if(cr!==null&&(zi=!0,y.js(cr,qt.strokeDashOffset)),qt.figure==="LineV"&&qt.stroke!==null&&0y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;bfe)ht.measure(1/0,1/0,0,0),gt=ht.measuredBounds,x.ed(gt),we.push(gt);else{var xt=ht.segmentIndex,Dt=ht.segmentFraction,qt=ht.alignmentFocus;qt.Mc()&&(qt=Sa);var zi=ht.segmentOrientation,cr=ht.segmentOffset;if(isNaN(xt)){var tr=ae.ua;gt=ur(),tr.Qu(Dt,gt);var gi=st.allocAt(gt[0],gt[1]);if(gi.add(ae.i(0)),tr.type===di.j?gi.offset(-tr.startX,-tr.startY):(tr=tr.figures.first(),tr!==null&&gi.offset(-tr.startX,-tr.startY)),tr=gt[2],zi!==ac){var _n=ae.computeAngle(ht,zi,tr);ht.Kb=_n}_n=gi.x-y.x;var Bo=gi.y-y.y;st.free(gi),Nr(gt)}else if(xt<-fe||xt>=fe)gt=st.alloc(),ae.vg(),ae.computeMidPoint(gt),tr=ae.midAngle,zi!==ac&&(_n=ae.computeAngle(ht,zi,tr),ht.Kb=_n),_n=gt.x-y.x,Bo=gt.y-y.y,st.free(gt);else{if(_n=0,0<=xt?(Bo=ce.M(xt),gt=xtxo+10?0<=xt?tr.ab(Bo):Bo.ab(tr):xo>gi+10?0<=xt?gt.ab(_n):_n.ab(gt):0<=xt?tr.ab(_n):_n.ab(tr)}else tr=0<=xt?Bo.ab(gt):gt.ab(Bo);zi!==ac&&(_n=ae.computeAngle(ht,zi,tr),ht.Kb=_n),_n=Bo.x+(gt.x-Bo.x)*Dt-y.x,Bo=Bo.y+(gt.y-Bo.y)*Dt-y.y}ht.measure(1/0,1/0,0,0),gt=ht.measuredBounds,gi=ht.naturalBounds;var qa=0;ht instanceof Zo&&(qa=ht.strokeWidth),xo=gi.width+qa;var Ls=gi.height+qa;Ae.reset(),Ae.translate(-gt.x,-gt.y),Ae.scale(ht.scale,ht.scale),Ae.rotate(zi===ac?ht.angle:tr,xo/2,Ls/2),zi!==Bp&&zi!==Ip||Ae.rotate(90,xo/2,Ls/2),zi!==Op&&zi!==Rp||Ae.rotate(-90,xo/2,Ls/2),zi===ov&&(45tr||225tr)&&Ae.rotate(-tr,xo/2,Ls/2),gi=new cn(0,0,xo,Ls),De.xi(gi,qt),Ae.Ga(De),qt=-De.x+qa/2*ht.scale,ht=-De.y+qa/2*ht.scale,tt.assign(cr),qa=isNaN(cr.x);var Jl=isNaN(cr.y);if(qa||Jl){xo=xo/2+3,Ls=Ls/2+3;var ru=45<=tr&&135>=tr,Ju=225<=tr&&315>=tr;zi===ac&&(ru||Ju)?(tt.x=Jl?xo:cr.y,tt.y=qa?Ls:cr.x,ru?0<=xt||isNaN(xt)&&.5>Dt||!qa||(tt.y=-Ls):Ju&&((0<=xt||isNaN(xt)&&.5>Dt)&&qa&&(tt.y=-Ls),Jl&&(tt.x=-xo))):(qa&&(tt.x=0<=xt||isNaN(xt)&&.5>Dt?xo:-xo),Jl&&(tt.y=-Ls),tt.rotate(tr))}else tt.rotate(tr);_n+=tt.x,Bo+=tt.y,gi.set(gt),gi.h(_n+qt,Bo+ht,gt.width,gt.height),we.push(gi),x.ed(gi)}}if(ee!==null)for(E=ee.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),nl(b,x.width||0,x.height||0),Fo.free(Ae),st.free(De),st.free(tt)}}}},km.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Ga||a instanceof mi){var E=a,b=null;a instanceof Ga&&(b=a,E=b.adornedPart);var z=a instanceof Ga?null:E.path,ee=a.j;if(ee.length!==0){var re=0;if(z!==null&&re=x)Ae=st.alloc(),we=fe,tt=Ae,we.vg(),we.computeMidPoint(tt),we=fe.midAngle,le!==ac&&(fe=fe.computeAngle(ee,le,we),ee.angle=fe),fe=Ae.x,tt=Ae.y,st.free(Ae);else{if(De=0,0<=re?(Ae=y.s[re],tt=reht+10?0<=re?we.ab(Ae):Ae.ab(we):ht>Ze+10?0<=re?tt.ab(De):De.ab(tt):0<=re?we.ab(De):De.ab(we)}else we=0<=re?Ae.ab(tt):tt.ab(Ae);le!==ac&&(fe=fe.computeAngle(ee,le,we),ee.angle=fe),fe=Ae.x+(tt.x-Ae.x)*ae,tt=Ae.y+(tt.y-Ae.y)*ae}if(Se.ys())ee.location=new st(fe,tt);else{Se.Mc()&&(Se=Sa),Ae=Fo.alloc(),Ae.reset(),Ae.scale(ee.scale,ee.scale),Ae.rotate(ee.angle,0,0);var gt=ee.naturalBounds;De=cn.allocAt(0,0,gt.width,gt.height),Ze=st.alloc(),Ze.xi(De,Se),Ae.Ga(Ze),Se=-Ze.x,ht=-Ze.y;var xt=gt.width,Dt=gt.height;gt=st.alloc(),gt.assign(ce);var qt=isNaN(ce.x),zi=isNaN(ce.y);if(qt||zi){xt=xt/2+3,Dt=Dt/2+3;var cr=45<=we&&135>=we,tr=225<=we&&315>=we;le===ac&&(cr||tr)?(gt.x=zi?xt:ce.y,gt.y=qt?Dt:ce.x,cr?0<=re||isNaN(re)&&.5>ae||!qt||(gt.y=-Dt):tr&&((0<=re||isNaN(re)&&.5>ae)&&qt&&(gt.y=-Dt),zi&&(gt.x=-xt))):(qt&&(gt.x=0<=re||isNaN(re)&&.5>ae?xt:-xt),zi&&(gt.y=-Dt),gt.rotate(we))}else gt.rotate(we);fe+=gt.x,tt+=gt.y,Ae.pp(De),Se+=De.x,ht+=De.y,re=st.allocAt(fe+Se,tt+ht),ee.move(re),st.free(re),st.free(gt),st.free(Ze),cn.free(De),Fo.free(Ae)}}b!==null?b.Ul(!1):E.Ul(!1),E=RS(a),a.location.h(a.position.x+E.x,a.position.y+E.y),st.free(E)}};function lS(a,y,x,E){if(Gc(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Ga&&a.type===ui.Link&&a.adornedObject instanceof Zo&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof mi&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof Ga&&a.adornedPart.ua!==null?(a=a.adornedPart.ua.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):E.Ge(-(b/2),-(b/2),y+b,x+b),b=E.desiredSize,b.w()||E.ua===null?E.dc.h(0,0,b.width,b.height):E.dc.assign(E.ua.bounds),Rl(E,!1)}}function Pp(){this.xa="Base"}Ft(Pp,Hl),Pp.prototype.measure=function(a,y,x,E,b,z,ee){var re=a.Pb();a.graduatedBounds=[];var ae=re.margin,le=ae.right+ae.left,ce=ae.top+ae.bottom;re.measure(y,x,z,ee);var fe=re.measuredBounds,Se=new cn(-ae.left,-ae.top,Math.max(fe.width+le,0),Math.max(fe.height+ce,0));a.graduatedBounds.push(Se),b.assign(Se);for(var we=re.geometry,Ae=re.strokeWidth,De=we.flattenedSegments,tt=we.flattenedLengths,Ze=we.flattenedTotalLength,ht=De.length,gt=0,xt=0,Dt=ur(),qt=0;qtxo&&(xo+=360),cr.push(xo)}gt=_n,xt=Bo}Dt.push(cr)}if(a.graduatedIntervals===null){for(var qa=[],Ls=a.O.s,Jl=Ls.length,ru=0;ruuf)){for(var Tl=0;Tluf&&Ql.push(Qu)}}}}}a.graduatedIntervals=qa}var cf=a.graduatedIntervals,Xc=a.O.s,mh=Xc.length,Ic=0,Mc=0,Bf=Ze;a.graduatedMarks=[];for(var Vh,lp=0;lpsm*qu*Ze/a.graduatedRange&&Rc.graduatedSkip===null)){var Eg=tt[0][0],id=0,Lc=0;Mc=Ze*Rc.graduatedStart-1e-4,Bf=Ze*Rc.graduatedEnd+1e-4;var ng=sm*qu,jc=a.graduatedTickBase;if(jca.graduatedMin+ng&&(jc-=Math.floor((jc-a.graduatedMin)/ng)*ng);for(var Yv=cf[lp],lm=jc,Ky=1e-6*a.graduatedMax,bd=1;jc<=a.graduatedMax+Ky;bd++){e:{for(var zd=Yv.length,bg=0;bg-up){var Rf=!1;break e}}Rf=!0}if(Rf&&(jc>a.graduatedMax&&(jc=a.graduatedMax),Rc.graduatedSkip===null||Rc instanceof ks&&!Rc.graduatedSkip(jc,Rc)||Rc instanceof Zo&&!Rc.graduatedSkip(jc,Rc))&&(Ic=(jc-a.graduatedMin)*Ze/a.graduatedRange,Ic>Ze&&(Ic=Ze),Mc<=Ic&&Ic<=Bf)){for(var Ad=Dt[id][Lc],hf=tt[id][Lc];idEg&&LcWd&&.4995Wd?0Wd||.9995Ag){var hp=1-Math.abs(.5-Wd);Ad=(Kh*hp+od*(1-hp))%360;break e}}}Ad=Kh}if(Rc instanceof ks){var Nh="";Rc.graduatedFunction!==null?(Nh=Rc.graduatedFunction(jc,Rc),Nh=Nh!=null?Nh.toString():""):Nh=(+jc.toFixed(2)).toString(),Nh!==""&&Vh.push({$l:cp,angle:Ad,text:Nh})}else Vh.push({$l:cp,angle:Ad})}jc=lm+bd*ng}}}a.graduatedMarks.push(Vh)}Nr(Dt);var wu=a.graduatedMarks;if(wu!==null)for(var um=E.length,hc=0;hcDh;Dh++){switch(Dh){case 0:Fc.h(_d,Gh);break;case 1:Fc.h(_d+dp,Gh);break;case 2:Fc.h(_d,Gh+og);break;case 3:Fc.h(_d+dp,Gh+og)}Fc.rotate(Cl+Bl.angle),Fc.offset(Jv,gp),fp===0&&Dh===0?oh.h(Fc.x,Fc.y,0,0):oh.Ye(Fc),Fc.offset(-Jv,-gp),Fc.rotate(-Cl-Bl.angle)}st.free(Fc),Hd.graduatedBounds!==null&&Hd.graduatedBounds.push(oh),_s(df,oh.x,oh.y,oh.width,oh.height)}else if(Bl instanceof ks){var vh=a,Qv=b;vh.temporaryTextBlock===null&&(vh.temporaryTextBlock=new ks);var zc=vh.temporaryTextBlock;CS(zc,Bl);var ff=Bl.alignmentFocus;ff.Mc()&&(ff=Bu);for(var yh=Bl.segmentOrientation,pp=Bl.segmentOffset,Wf=new cn,cm=0,mp=0,ad=0,ag=0,Hf=0,vp=dc.length,gf=0;gfad||225ad)&&Uh.rotate(-ad,mf/2,sg/2);var Lg=cn.allocAt(0,0,mf,sg),vf=st.alloc();vf.xi(Lg,ff),Uh.Ga(vf);var kg=-vf.x,Uy=-vf.y,Kd=st.alloc();Kd.assign(pp),isNaN(Kd.x)&&(Kd.x=mf/2+3),isNaN(Kd.y)&&(Kd.y=-(sg/2+3)),Kd.rotate(ad),cm+=Kd.x+kg,mp+=Kd.y+Uy;var lg=new cn(cm,mp,pf.width,pf.height),hm=new cn(pf.x,pf.y,pf.width,pf.height),Yy=new cn(Vd.x,Vd.y,Vd.width,Vd.height);Md.Sz=ag,Md.lineCount=zc.lineCount,Md.lines=[zc.Cb,zc.Ih,zc.df,zc.Le,zc.Qc,zc.Qb,zc.ze],Md.actualBounds=lg,Md.measuredBounds=hm,Md.naturalBounds=Yy,gf===0?Wf.assign(lg):Wf.ed(lg),st.free(Kd),st.free(vf),cn.free(Lg),Fo.free(Uh)}vh.graduatedBounds!==null&&vh.graduatedBounds.push(Wf),_s(Qv,Wf.x,Wf.y,Wf.width,Wf.height)}Rl(Bl,!1)}}},Pp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,ee=0,re=z[ee];ee++,E!==null&&E.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var ae=y.length,le=0;le=ee&&(ee=1);for(var re=z.actualBounds,ae=a.O.s,le=a.graduatedMarks,ce=ae.length,fe=0;fea.graduatedTickUnit*Se.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ee&&Se.graduatedSkip===null)){var De=Se.measuredBounds,tt=Se.strokeWidth*Se.scale,Ze=Se.alignmentFocus;Ze.Mc()&&(Ze=Bu);for(var ht=0;htee.height)continue}else if(le.position>ee.width)continue;var ce=le.separatorStrokeWidth;isNaN(ce)&&(ce=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var fe=le.separatorStroke;if(fe===null&&(fe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ce!==0&&fe!==null){Sl(a,y,fe,!1,!1,ee,z),fe=!1;var Se=le.separatorDashArray;Se===null&&(Se=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Se!==null&&(fe=!0,y.js(Se,0)),y.beginPath(),Se=le.position+ce,x?Se>ee.height&&(ce-=Se-ee.height):Se>ee.width&&(ce-=Se-ee.width),le=le.position+ce/2,y.lineWidth=ce,ce=a.yb,x?(le+=ce.top,Se=ee.width-ce.right,y.moveTo(ce.left,le),y.lineTo(Se,le)):(le+=ce.left,Se=ee.height-ce.bottom,y.moveTo(le,ce.top),y.lineTo(le,Se)),y.stroke(),y.Se(),fe&&y.fs()}}}}function Fm(a,y,x,E,b){for(var z=E.length,ee=a.actualBounds,re=a.naturalBounds,ae=cS(a,!0),le=cS(a,!1),ce=0;ceSe)){var we=fe.Wc(),Ae=fe.separatorStrokeWidth;isNaN(Ae)&&(Ae=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var De=fe.separatorStroke;De===null&&(De=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(De===null||fe.index===(x?ae:le))&&(Ae=0),we-=Ae,Ae=fe.position+Ae,we+=fe.actual,Ae+we>Se&&(we=Se-Ae),0>=we||(Se=a.yb,Sl(a,y,fe.background,!0,!1,re,ee),x?y.fillRect(Se.left,Ae+Se.top,ee.width-(Se.left+Se.right),we):y.fillRect(Ae+Se.left,Se.top,we,ee.height-(Se.top+Se.bottom)))}}}}function cS(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;EE&&b.set(Ae),st.free(Ae)),st.free(ce),z&&b.transform(ee),le},Ee.Gj=function(){for(var a=this.O.s,y=a.length,x=0;xx||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case bn:this.v(!0),this.measure(x+re,E+ee,0,0);break;case Cr:this.v(!0),this.measure(x+re,z+ee,0,0);break;case qr:this.v(!0),this.measure(y+re,E+ee,0,0)}}this.na.arrange(this,b,this.jg)}},Ee.gh=function(a){var y=this.naturalBounds,x=Id(this);if(il(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=st.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(xi(b.set(a),z.transform),z.ca(b)))return st.free(b),!0}return st.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Ee.ks=function(a){if(this.bindingId===a)return this;for(var y=this.O.s,x=y.length,E=0;ESe.width||fe.y>Se.height||0>fe.x+fe.width||0>fe.y+fe.height||(fe=ce,ce=ce instanceof ui?ce:null,Se=Fo.alloc(),Se.set(ee),(ce!==null?ce.Cf(a,y,x,E,b,Se):Xl(fe,a,E,Se))&&(y!==null&&(fe=y(fe)),fe===null||x!==null&&!x(fe)||b.add(fe)),Fo.free(Se))}}return z===void 0&&Fo.free(ee),E}return z===void 0&&Fo.free(ee),!1};function x0(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var ee=b[z];if(ee.visible){var re=ee.actualBounds,ae=a.naturalBounds;re.x>ae.width||re.y>ae.height||0>re.x+re.width||0>re.y+re.height||(ee instanceof ui&&x0(ee,y,x,E),y!==null&&(ee=y(ee)),ee===null||x!==null&&!x(ee)||E.add(ee))}}}Ee.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var ee=this.naturalBounds,re=this.se(),ae=re?a:xi(st.allocAt(a.x,a.y),this.transform),le=re?y:xi(st.allocAt(y.x,y.y),this.transform),ce=ae.Bf(le),fe=0tt.width||De.y>tt.height||0>De.x+De.width||0>De.y+De.height))&&(Ae.se()?(De=Ae.transform,xi(ae.set(a),De),xi(le.set(y),De)):(ae.set(a),le.set(y)),De=Ae,Ae=Ae instanceof ui?Ae:null,(Ae!==null?Ae.og(ae,le,x,E,b,z):De.tx(ae,le,b))&&(x!==null&&(De=x(De)),De===null||E!==null&&!E(De)||z.add(De)))}}st.free(ae),st.free(le)}return b?fe:ee}return!1};function w0(a){var y=null;return a instanceof Zo&&(y=a.spot1,y===ml&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Rs),y}function P0(a){var y=null;return a instanceof Zo&&(y=a.spot2,y===ml&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=eu),y}Ee.add=function(a){for(var y=[],x=0;x=b.count&&a>=b.count)return;b.mb(z),E=z}else $t("element "+y.toString()+" has panel "+x.toString()+" but is not contained by it.")}(0>a||a>b.count)&&(a=b.count),b.Gb(a,y),(a===0||y.isPanelMain)&&(this.$g=null),Gc(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof ui&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Dm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Ki&&(x.Te=!0),x.Te&&x instanceof Ki&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Zs,"elements",this,y,null,E,null),x.cb(Ms,"elements",this,null,y,null,a)))};function C0(a,y){a.l=y?a.l|16777216:a.l&-16777217}Ee.remove=function(a){for(var y=this.O.s,x=y.length,E=-1,b=0;ba&&Wr(a,">= 0",ui,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new jl;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Ms,"rowdefs",this,null,x,null,a)}return y[a]},Ee.oA=function(a){if(0>a&&Wr(a,">= 0",ui,"removeRowDefinition:idx"),this.rowCount!==0){a=Math.round(a);var y=this.rowDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Zs,"rowdefs",this,x,null,a,null),this.v()}}};function pS(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof jl?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ee.Eb=function(a){0>a&&Wr(a,">= 0",ui,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new jl;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Ms,"coldefs",this,null,x,null,a)}return y[a]},Ee.jA=function(a){if(0>a&&Wr(a,">= 0",ui,"removeColumnDefinition:idx"),this.columnCount!==0){a=Math.round(a);var y=this.colDefs,x=y[a];if(x){y[a]=void 0;for(var E=y.length-1;0<=E&&y[E--]===void 0;)y.length--;this.cb(Zs,"coldefs",this,x,null,a,null),this.v()}}};function mS(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof jl?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ee.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Tm(y,a),this},Ee.Hy=function(a,y){return(a=this.Fb(a))&&Tm(a,new jl(y)),this},Ee.By=function(a,y){return(a=this.Eb(a))&&Tm(a,new jl(y)),this},Ee.nz=function(a){if(0>a||this.type!==ui.Table||this.rowCount===0)return-1;for(var y=0,x=this.rowDefs,E=x.length,b=this.topIndex;ba||this.type!==ui.Table||this.columnCount===0)return-1;for(var y=0,x=this.colDefs,E=x.length,b=this.leftIndex;ba;)this.pc(this.O.length-1,!1);yS(this,this.itemArray)};function yS(a,y){var x=Cp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;Ex)){var b=b0(a,y);if(b=A0(a,b),b!==null){if(fh(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&C0(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new wr),a.ge.add(y,b)),z=x+Cp(a),a.Gb(z,b),E&&(b.ub=y,E0(a,z,x),b.ub=null),b.data=y}}}function E0(a,y,x){for(a=a.O;ya&&Wr(a,">= 0",ui,"padding"),a=new Mo(a)):(0>a.left&&Wr(a.left,">= 0",ui,"padding:value.left"),0>a.right&&Wr(a.right,">= 0",ui,"padding:value.right"),0>a.top&&Wr(a.top,">= 0",ui,"padding:value.top"),0>a.bottom&&Wr(a.bottom,">= 0",ui,"padding:value.bottom"));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.v(),this.g("padding",y,a))}},defaultAlignment:{get:function(){return this.Tm},set:function(a){var y=this.Tm;y.D(a)||(this.Tm=a=a.J(),this.v(),this.g("defaultAlignment",y,a))}},defaultStretch:{get:function(){return this.Uf},set:function(a){var y=this.Uf;y!==a&&(this.Uf=a,this.v(),this.g("defaultStretch",y,a))}},defaultSeparatorPadding:{get:function(){return this.T!==null?this.T.Qp:$l},set:function(a){typeof a=="number"&&(a=new Mo(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new th),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof as)&&(a instanceof as&&a.freeze(),this.T===null&&(this.T=new th),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new th),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;ba)&&$t("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new th),this.T.Hb=a,this.v(),this.g("topIndex",y,a))}},leftIndex:{get:function(){return this.T!==null?this.T.hb:0},set:function(a){var y=this.leftIndex;y!==a&&((!isFinite(a)||0>a)&&$t("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new th),this.T.hb=a,this.v(),this.g("leftIndex",y,a))}},data:{get:function(){return this.ub},set:function(a){var y=this.ub;if(y!==a){var x=this instanceof zr&&!(this instanceof Ga);fh(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof mi?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof zr&&(y!==null&&x.cf.remove(y),a!==null&&x.cf.add(a,this))):(x=this.panel,x!==null&&x.ge!==null&&(y!==null&&x.ge.remove(y),a!==null&&x.ge.add(a,this)))),this.g("data",y,a),E!==null&&E.undoManager.isUndoingRedoing||a!==null&&this.La()}}},itemIndex:{get:function(){return this.zn},set:function(a){var y=this.zn;y!==a&&(this.zn=a,this.g("itemIndex",y,a))}},allBindings:{get:function(){return this.A!==null?this.A.nb:null},set:function(a){this.localBindings!==a&&(this.A===null&&(this.A=new cg),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Mx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&dy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&hy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||yS(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new wr}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof zr||a.isPanelMain)&&$t("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+a),this.itemTemplateMap.add("",a),this.g("itemTemplate",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv())}},itemTemplateMap:{get:function(){return this.A!==null?this.A.Pc:null},set:function(a){var y=this.itemTemplateMap;if(y!==a){for(var x=a.iterator;x.next(););$o(this),this.A.Pc=a,this.g("itemTemplateMap",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.mv()}}},itemCategoryProperty:{get:function(){return this.A!==null?this.A.Oc:"category"},set:function(a){var y=this.itemCategoryProperty;y!==a&&($o(this),this.A.Oc=a,this.g("itemCategoryProperty",y,a))}},isAtomic:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("isAtomic",y,a))}},isClipping:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this instanceof Io&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&Dm(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),un.Object.defineProperties(ui,{Position:{get:function(){return bh.I("Position")}},Horizontal:{get:function(){return bh.I("Horizontal")}},Vertical:{get:function(){return bh.I("Vertical")}},Spot:{get:function(){return bh.I("Spot")}},Auto:{get:function(){return bh.I("Auto")}},Table:{get:function(){return bh.I("Table")}},Viewbox:{get:function(){return bh.I("Viewbox")}},TableRow:{get:function(){return bh.I("TableRow")}},TableColumn:{get:function(){return bh.I("TableColumn")}},Link:{get:function(){return bh.I("Link")}},Grid:{get:function(){return bh.I("Grid")}},Graduated:{get:function(){return bh.I("Graduated")}}}),ui.prototype.rebuildItemElements=ui.prototype.mv,ui.prototype.findItemPanelForData=ui.prototype.sx,ui.prototype.updateTargetBindings=ui.prototype.La,ui.prototype.copyTemplate=ui.prototype.Uy,ui.prototype.graduatedValueForPoint=ui.prototype.Gz,ui.prototype.graduatedPointForValue=ui.prototype.Fz,ui.prototype.findColumnForLocalX=ui.prototype.fz,ui.prototype.findRowForLocalY=ui.prototype.nz,ui.prototype.addColumnDefinition=ui.prototype.By,ui.prototype.addRowDefinition=ui.prototype.Hy,ui.prototype.addRowColumnDefinition=ui.prototype.Gy,ui.prototype.removeColumnDefinition=ui.prototype.jA,ui.prototype.getColumnDefinition=ui.prototype.Eb,ui.prototype.removeRowDefinition=ui.prototype.oA,ui.prototype.getRowDefinition=ui.prototype.Fb,ui.prototype.removeAt=ui.prototype.mb,ui.prototype.remove=ui.prototype.remove,ui.prototype.insertAt=ui.prototype.Gb,ui.prototype.elt=ui.prototype.M,ui.prototype.add=ui.prototype.add,ui.prototype.findObject=ui.prototype.fb,ui.prototype.findInVisualTree=ui.prototype.Nl,ui.prototype.walkVisualTreeFrom=ui.prototype.qm,ui.prototype.findMainElement=ui.prototype.Pb;var SS=!1,xS=null,bh=new wr;ui.className="Panel",ui.definePanelLayout=td,td("Position",new Sm),td("Vertical",new wm),td("Auto",new Cm),td("Link",new km);function Rd(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Rd.prototype.copy=function(){var a=new Rd;return a.lq=this.lq,a.F=this.F,a.ia=this.ia,a.V=this.V,a.u=this.u,a.j=this.j,a.o=this.o,a.Zh=this.Zh,a},Rd.className="GradPanelSettings";function th(){this.Pc=[],this.Oc=[],this.j=this.ob=Om,this.hb=this.Hb=0,this.Qp=$l,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}th.prototype.copy=function(a){for(var y=new th,x=this.Pc,E=x.length,b=y.Pc,z=0;za&&Wr(a,">= 0",jl,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Wr(a,">= 0",jl,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Wr(a,">= 0",jl,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Wr(a,">= 0",jl,"maximum"),this.hj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("maximum",y,a))}},alignment:{get:function(){return this.Jb},set:function(a){var y=this.Jb;y.D(a)||(this.Jb=a.J(),this.panel!==null&&this.panel.v(),this.Ob("alignment",y,a))}},stretch:{get:function(){return this.hg},set:function(a){var y=this.hg;y!==a&&(this.hg=a,this.panel!==null&&this.panel.v(),this.Ob("stretch",y,a))}},separatorPadding:{get:function(){return this.dg},set:function(a){typeof a=="number"&&(a=new Mo(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&dg(a,"RowColumnDefinition.separatorStroke"),a instanceof as&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;bb)){var z=E.measuredBounds,ee=Math.max(1,z.width);z=z.height;for(var re=x[0],ae=x[1],le,ce,fe,Se,we,Ae,De=0,tt=ur(),Ze=2;Zefe&&(fe=1),b=x=fe,le=ee/2,ce=le!==0,Ze=0,Ae=tt[Ze],fe=Ae[0],we=Ae[1],Se=Ae[2],Ae=Ae[3];for(var ht=0;.1<=De;){if(ht===0&&(ce?(b=x,b-=le,De-=le,ce=!1):b=x,b===0&&(b=1)),b>De){Nr(tt);return}b>Ae?(ht=b-Ae,b=Ae):ht=0;var gt=Math.sqrt(b*b/(1+Se*Se));if(0>fe&&(gt=-gt),re+=gt,ae+=Se*gt,a.translate(re,ae),a.rotate(we),a.translate(-(ee/2),-(z/2)),ht===0&&E.hh(a,y),a.translate(ee/2,z/2),a.rotate(-we),a.translate(-re,-ae),De-=b,Ae-=b,ht!==0){if(Ze++,Ze===tt.length){Nr(tt);return}Ae=tt[Ze],fe=Ae[0],we=Ae[1],Se=Ae[2],Ae=Ae[3],b=ht}}Nr(tt)}}Ee.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,ee=this.naturalBounds;E!==null&&Sl(this,a,E,!0,!1,ee,z);var re=this.part,ae=this.ig;if(x===null||ae!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(ae=re.type===ui.Link&&re instanceof Ga&&re.category==="Selection"&&re.adornedObject instanceof Zo&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),ae===0&&(x=null),x!==null&&ae!==0&&(Sl(this,a,x,!1,!1,ee,z),a.lineWidth=ae,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,re&&y.Gf("drawShadows")&&(z=re.isShadowed),a.Il===!1&&(z=!1),re=!0,x===null||E!==null&&E!=="transparent"||(re=!1),ee=!1,ae=this.strokeDashArray,ae!==null&&(ee=!0,a.js(ae,this.strokeDashOffset)),b.type===di.j)a.beginPath(),a.moveTo(b.startX,b.startY),a.lineTo(b.endX,b.endY),x!==null&&a.jk(),a.Se();else if(b.type===di.u){var le=b.startX;ae=b.startY;var ce=b.endX,fe=b.endY;b=Math.min(le,ce);var Se=Math.min(ae,fe);le=Math.abs(ce-le),ae=Math.abs(fe-ae),a.beginPath(),a.rect(b,Se,le,ae),E!==null&&a.ng(E),x!==null&&(re&&z&&pd(a),a.jk(),re&&z&&Td(a)),a.Se()}else if(b.type===di.F)le=b.startX,ae=b.startY,ce=b.endX,fe=b.endY,b=Math.abs(ce-le)/2,Se=Math.abs(fe-ae)/2,le=Math.min(le,ce)+b,ae=Math.min(ae,fe)+Se,a.beginPath(),a.moveTo(le,ae-Se),a.bezierCurveTo(le+Ot.wg*b,ae-Se,le+b,ae-Ot.wg*Se,le+b,ae),a.bezierCurveTo(le+b,ae+Ot.wg*Se,le+Ot.wg*b,ae+Se,le,ae+Se),a.bezierCurveTo(le-Ot.wg*b,ae+Se,le-b,ae+Ot.wg*Se,le-b,ae),a.bezierCurveTo(le-b,ae-Ot.wg*Se,le-Ot.wg*b,ae-Se,le,ae-Se),a.closePath(),E!==null&&a.ng(E),x!==null&&(re&&z&&pd(a),a.jk(),re&&z&&Td(a)),a.Se();else if(b.type===di.o)for(b=b.figures,ae=b.length,Se=0;SeDe.sweepAngle,we!==null?we.endX:le.startX,we!==null?we.endY:le.startY)}else if(we=mu(De,le),tt=we.length,tt===0)a.lineTo(De.centerX,De.centerY);else for(var Ze=0;Ze(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(cn.free(z),Ot.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===di.u){y=x.startX;var ee=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(ee,x),z.width=Math.abs(re-y),z.height=Math.abs(x-ee),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return cn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),cn.free(z),a}if(x.type===di.F){ee=x.startX,b=x.startY,re=x.endX;var ae=x.endY;if(x=Math.min(ee,re),y=Math.min(b,ae),ee=Math.abs(re-ee)/2,b=Math.abs(ae-b)/2,x=a.x-(x+ee),y=a.y-(y+b),this.fill===null){if(ee-=E,b-=E,0>=ee||0>=b||1>=x*x/(ee*ee)+y*y/(b*b))return cn.free(z),!1;ee+=E,b+=E}return this.stroke!==null&&(ee+=E,b+=E),cn.free(z),0>=ee||0>=b?!1:1>=x*x/(ee*ee)+y*y/(b*b)}if(x.type===di.o)return cn.free(z),this.fill===null?Eu(x,a.x,a.y,b):ec(x,a,b,1=this.strokeWidth)ce=Ot.Ve(le.startX,le.startY,le.endX,le.endY,z,ee,re,ae,b);else{if(le.startX===le.endX?(E=fe,ce=0):(y=(le.endY-le.startY)/(le.endX-le.startX),ce=fe/Math.sqrt(1+y*y),E=ce*y),y=ur(),a=new st,Ot.Ve(le.startX+E,le.startY+ce,le.endX+E,le.endY+ce,z,ee,re,ae,a)&&y.push(a),a=new st,Ot.Ve(le.startX-E,le.startY-ce,le.endX-E,le.endY-ce,z,ee,re,ae,a)&&y.push(a),a=new st,Ot.Ve(le.startX+E,le.startY+ce,le.startX-E,le.startY-ce,z,ee,re,ae,a)&&y.push(a),a=new st,Ot.Ve(le.endX+E,le.endY+ce,le.endX-E,le.endY-ce,z,ee,re,ae,a)&&y.push(a),re=y.length,re===0)return Nr(y),!1;for(ce=!0,ae=1/0,E=0;EMath.abs(x)){if(ae=ee-ce-x*(z-E),0>a*a*x*x+le*le-ae*ae){b.x=NaN,b.y=NaN,ce=!1;break e}fe=Math.sqrt(a*a*x*x+le*le-ae*ae),re=(-(a*a*x*ae)+a*le*fe)/(le*le+a*a*x*x)+E,a=(-(a*a*x*ae)-a*le*fe)/(le*le+a*a*x*x)+E,le=x*(re-E)+ae+ce,ae=x*(a-E)+ae+ce,Math.abs((z-re)*(z-re))+Math.abs((ee-le)*(ee-le))re){b.x=NaN,b.y=NaN,ce=!1;break e}ae=Math.sqrt(re),re=ce+ae,ae=ce-ae,Math.abs(re-ee)Math.abs(Ae)?(De*=.5/Ae,Ae=.5):De!==0&&.5>Math.abs(De)&&(Ae*=.5/De,De=.5),Ze-=Ae,ht-=De;we.contains(Ze,ht);)Ze-=Ae,ht-=De;for(b.x=re,b.y=ae,De=0;Dex?a-x:x-a)<(y>E?y-E:E-y)?(a=ya||Ot.$(ae.y,a))&&(ae.yy||Ot.$(ae.x,y))&&(ae.x=a&&E<=y):(a=E&&x<=a)}Ee.tx=function(a,y,x){function E(tt,Ze){for(var ht=tt.length,gt=0;gtb)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5=b||Zi(y,z,0,-fe)>=b||Zi(y,z,0,fe)>=b||Zi(y,z,ce,0)>=b)}else if(y.type===di.o){if(le=y.bounds,z=le.x,re=le.y,ae=le.x+le.width,le=le.y+le.height,a.x>ae&&a.xle&&a.yb&&nr(a.x,a.y,z,re,ae,re)>b&&nr(a.x,a.y,ae,le,z,le)>b&&nr(a.x,a.y,ae,le,ae,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Eu(y,a.x,a.y,z):ec(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;yb)return!1;for(re=z.segments.s,ae=re.length,le=0;leb)return!1;break;case Ml:var Se=ur();if(Ot.Qe(ee,ce,fe.point1X,fe.point1Y,fe.point2X,fe.point2Y,fe.endX,fe.endY,.8,Se),ee=E(Se,a),Nr(Se),ee||(ee=fe.endX,ce=fe.endY,a.zd(ee,ce)>b))return!1;break;case Fu:if(Se=ur(),Ot.ep(ee,ce,fe.point1X,fe.point1Y,fe.endX,fe.endY,.8,Se),ee=E(Se,a),Nr(Se),ee||(ee=fe.endX,ce=fe.endY,a.zd(ee,ce)>b))return!1;break;case sl:case su:Se=fe.type===sl?mu(fe,z):au(fe,z,ee,ce);var we=Se.length;if(we===0){if(ee=fe.type===sl?fe.centerX:fe.endX,ce=fe.type===sl?fe.centerY:fe.endY,a.zd(ee,ce)>b)return!1;break}fe=null;for(var Ae=ur(),De=0;De= 0",Zo,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Wr(a,'"butt", "round", or "square"',Zo,"strokeCap"):(Xf(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?Wr(a,'"miter", "bevel", or "round"',Zo,"strokeJoin"):(Xf(this),this.Na.Ir=a,this.N(),this.g("strokeJoin",y,a)))}},strokeMiterLimit:{get:function(){return this.Na!==null?this.Na.Jr:10},set:function(a){var y=this.strokeMiterLimit;if(y!==a&&1<=a){Xf(this),this.Na.Jr=a,this.N();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeMiterLimit",y,a)}}},strokeDashArray:{get:function(){return this.Yg},set:function(a){var y=this.Yg;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;ba?a=0:1a?a=0:1(fe*fe+ce*ce)*Se*Se&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Tc&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,fe=this.spacingBelow,this.flip){case za:a.translate(b,0),a.scale(-1,1);break;case ta:a.translate(0,z),a.scale(1,-1);break;case ps:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ce=this.Gc,Se=(y+ee+fe)*ce,z>Se&&(E=this.verticalAlignment,E=E.y*z-E.y*Se+E.offsetY),ce===1&&this.ze!==null)fe=this.Cb,fe>b&&(fe=b),this.Oj(this.ze,a,0,E+y,b,ee,fe,x,re,ae,le);else if(this.Qc!==null&&this.Qb!==null)for(Se=0;Seb&&(we=b),E+=y,this.Oj(this.Qb[Se],a,0,E,b,ee,we,x,re,ae,le),E+=ee+fe}switch(this.flip){case za:a.scale(-1,1),a.translate(-b,0);break;case ta:a.scale(1,-1),a.translate(0,-z);break;case ps:a.scale(-1,-1),a.translate(-b,-z)}}},Ee.Oj=function(a,y,x,E,b,z,ee,re,ae,le,ce){var fe=0;if(re)ae==="left"?fe=0:ae==="right"?fe=b-ee:ae==="center"&&(fe=(b-ee)/2),y.fillRect(x+fe,E+.25*z,ee,1);else{if(ae==="left"?fe=0:ae==="right"?fe=b:ae==="center"&&(fe=b/2),b=jm!==null?jm(this,z):.75*z,y.fillText(a,x+fe,E+b),a=z/20|0,a===0&&(a=1),ae==="right"?fe-=ee:ae==="center"&&(fe-=ee/2),le){re=zm!==null?zm(this,z):.8*z,ae=x+fe,le=E+re,b=x+fe+ee,re=E+re;var Se=a;y.beginPath(),y.lineWidth=Se,y.moveTo(ae,le),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Tc&&y.ad.classList.add("gojs-td")}ce&&(ce=E+z-z/2.2|0,a%2!==0&&(ce+=.5),E=x+fe,z=ce,x=x+fe+ee,ee=ce,fe=a,y.beginPath(),y.lineWidth=fe,y.moveTo(E,z),y.lineTo(x,ee),y.stroke(),y.Se(),y instanceof Tc&&y.ad.classList.add("gojs-td"))}},Ee.kk=function(a,y,x){if(!Ct.prototype.kk.call(this,a,y,x))return!1;if(Sl(this,a,this.xc,!0,!1,this.naturalBounds,this.actualBounds),x){if(this.svg.getElementsByTagName("text").length===0)return!0;for(y=this.svg.getElementsByClassName("gojs-td"),x=0;x=this.Qb.length))){for(this.l|=16777216,le=this.Qb[ae],y=Math.max(1,a-y);Ah(le)>y&&1a.maxLines&&(a.l|=16777216))}function N0(a,y,x,E){var b=a.formatting===Mp;b&&(y=y.trim());var z=0,ee=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,Ap(a)+re);var ae=a.overflow===Wm?ES(ee):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ee=y,a.wrap===D0){a.Le=1;var le=Ah(y);if(ae===0||le<=x)a.Cb=Math.max(a.Cb,le),bp(a,y,a.Cb),E!==null&&E.h(le,re);else{for(z=Hg(a,ee),ee=ee.substr(z.length),y=Hg(a,ee),le=Ah(z+y);0x&&1x;){var fe=1;for(le=Ah(y.substr(0,fe)),ce=0;le<=x;)fe++,ce=le,le=Ah(y.substr(0,fe));if(fe===1){var Se=le;z=Math.max(z,le)}else Se=ce,z=Math.max(z,ce);if(fe--,1>fe&&(fe=1),bp(a,y.substr(0,fe),Se),ae++,y=y.substr(fe),a.Gc+ae>a.maxLines)break}for(ce=Hg(a,ee),le=Ah(y+ce);0a.maxLines))break}a.Le=Math.min(a.maxLines,ae),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,re*a.Le)}}function Hg(a,y){if(a.wrap===MS)return y.substr(0,1);for(var x=y.length,E=0,b=Lx;E=y.length?y:y.substr(0,E)}function Ah(a){return Sc===null?8*a.length:Sc.measureText(a).width}function Ap(a){if(a.df!==null)return a.df;var y=a.Ae;if(Sc===null){var x=16;return a.df=x}return O0[y]!==void 0&&5e3>kS?x=O0[y]:(x=1.3*Sc.measureText("M").width,O0[y]=x,kS++),a.df=x}function ES(a){if(Sc===null)return 6;if(Hm[a]!==void 0&&5e3>I0)var y=Hm[a];else y=Sc.measureText(Lp).width,Hm[a]=y,I0++;return y}function bS(a,y){var x=a.ec.replace(/\r\n/g,` `).replace(/\r/g,` `),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,Ap(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(` `,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,ee,re=!1;!re;){if(ee=x.indexOf(` `,z),ee===-1&&(ee=x.length,re=!0),z<=ee){if(z=x.substr(z,ee-z),a.wrap!==D0){a.Le=0;var ae=fn.alloc();N0(a,z,y,ae),b+=ae.height,fn.free(ae),a.Gc+=a.Le}else N0(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ee+1}return a.Lq=b}un.Object.defineProperties(ks.prototype,{font:{get:function(){return this.Ae},set:function(a){var y=this.Ae;y!==a&&(this.Ae=a,this.df=null,this.v(),this.g("font",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;a!=null?a=a.toString():a="",y!==a&&(this.ec=a,this.v(),this.g("text",y,a),this.Uc=!0)}},textAlign:{get:function(){return this.da!==null?this.da.Or:"start"},set:function(a){var y=this.textAlign;y===a||a!=="start"&&a!=="end"&&a!=="left"&&a!=="right"&&a!=="center"||(nd(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Ln},set:function(a){var y=this.flip;y!==a&&(nd(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Nc},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),nd(this),this.da.Yr=a,nc(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=fn.alloc();N0(this,this.ec,999999,a);var y=a.width;fn.free(a),a=bS(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),nl(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:T0},set:function(a){var y=this.wrap;y!==a&&(nd(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:B0},set:function(a){var y=this.overflow;y!==a&&(nd(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&dg(a,"TextBlock.stroke"),a instanceof as&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Ap(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(nd(this),this.da.Qr=a,this.g("textEditor",y,a))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(a){var y=this.errorFunction;y!==a&&(nd(this),this.da.Hd=a,this.g("errorFunction",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new yd),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1a?a=0:1=a&&Wr(a,"> 0",ks,"maxLines"),nd(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var jm=null,zm=null,D0=new ln(ks,"None",0),AS=new ln(ks,"WrapFit",1),T0=new ln(ks,"WrapDesiredSize",2),MS=new ln(ks,"WrapBreakAll",3),B0=new ln(ks,"OverflowClip",0),Wm=new ln(ks,"OverflowEllipsis",1),Mp=new ln(ks,"FormatTrim",0),LS=new ln(ks,"FormatNone",0),Lx=/[ \u200b\u00ad]/,O0=new Ao,kS=0,Hm=new Ao,I0=0,Lp="...",FS="",Sc=null,_m=!1;ks.className="TextBlock";function R0(){this.nc=!1,this.Hd=null,this.Xf=Ln,this.gq=Mp,this.Jq=1/0,this.$q=B0,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Nc,this.$r=T0}R0.prototype.copy=function(){var a=new R0;return a.Hd=this.Hd,a.Xf=this.Xf,a.gq=this.gq,a.Jq=this.Jq,a.$q=this.$q,a.Dr=this.Dr,a.Er=this.Er,a.Or=this.Or,a.Pr=this.Pr,a.Qr=this.Qr,a.vj=this.vj,a.Yr=this.Yr,a.$r=this.$r,a},ks.getEllipsis=function(){return Lp},ks.setEllipsis=function(a){Lp=a,Hm=new Ao,I0=0},ks.getBaseline=function(){return jm},ks.setBaseline=function(a){jm=a},ks.getUnderline=function(){return zm},ks.setUnderline=function(a){zm=a},ks.isValidFont=function(a){if(_m||(Sc=zs?new dh(null).context:null,_m=!0),Sc===null)return!0;var y=Sc.font;if(a===y||a==="10px sans-serif")return!0;Sc.font="10px sans-serif",Sc.font=a;var x=Sc.font;if(x!=="10px sans-serif")return Sc.font=y,!0;Sc.font="19px serif";var E=Sc.font;return Sc.font=a,x=Sc.font,Sc.font=y,x!==E},ks.FormatNone=LS,ks.FormatTrim=Mp,ks.None=D0,ks.OverflowClip=B0,ks.OverflowEllipsis=Wm,ks.WrapBreakAll=MS,ks.WrapDesiredSize=T0,ks.WrapFit=AS;function yd(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}yd.prototype.copy=function(){var a=new yd;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},yd.className="GradElementSettings";function xc(a,y){Ct.call(this),this.Eg=null,this.qo="",this.Xg=Is,this.Nk=bn,this.Zg=this.Hd=null,this.Mk=Sa,this.Xf=Ln,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var _g;Ft(xc,Ct),xc.prototype.cloneProtected=function(a){Ct.prototype.cloneProtected.call(this,a),a.qo=this.qo,a.element=this.Eg,a.Xg=this.Xg.J(),a.Nk=this.Nk,a.Xf=this.Xf,a.Hd=this.Hd,a.Zg=this.Zg,a.Mk=this.Mk.J(),a.en=this.en,a.rl=this.rl},xc.prototype.qb=function(a){a===Ln||a===er||a===La?this.imageStretch=a:Ct.prototype.qb.call(this,a)},xc.prototype.toString=function(){return"Picture("+this.source+")#"+ds(this)};function Vg(a){a===void 0&&(a=""),a!==""?_g[a]&&(delete _g[a],Vm--):(_g=new Ao,Vm=0)}function NS(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",ee=b.Og.I(z);if(ee!==null)for(var re=ee.length,ae=0;ae=E.width&&(z=z+Ae.offsetX+(fe*Ae.x-E.width*Ae.x)),Se>=E.height&&(ee=ee+Ae.offsetY+(Se*Ae.y-E.height*Ae.y)),ae=Math.min(E.width,fe),re=Math.min(E.height,Se);break;case bn:fe=E.width,Se=E.height;break;case er:case La:we===er?(we=Math.min(E.height/Se,E.width/fe),fe*=we,Se*=we):we===La&&(we=Math.max(E.height/Se,E.width/fe),fe*=we,Se*=we,fe>=E.width&&(z=(z+Ae.offsetX+(fe*Ae.x-E.width*Ae.x)/fe)*ae),Se>=E.height&&(ee=(ee+Ae.offsetY+(Se*Ae.y-E.height*Ae.y)/Se)*re),ae*=1/(fe/E.width),re*=1/(Se/E.height),fe=E.width,Se=E.height)}we=this.Df()*y.scale;var De=fe*we*Se*we,tt=ae*re/De,Ze=x.__goCache;we=null;var ht=kx;if(!b){if(x.sq&&Ze!==void 0&&4ht*ht)for(Ze.gi===null&&(TS(Ze,4,le,ce,x),TS(Ze,16,le,ce,x)),b=Ze.gi,le=b.length,ce=0;cea)&&(a=5),a=Math.min(a,y/3),a=Math.min(a,x/3);var E="rr"+y+","+x+","+a,b=Ot.Mf[E];if(b!==void 0)return b;var z=a*Ot.wg;return b=new di().add(new wl(a,0,!0).add(new Ca(fs,y-a,0)).add(new Ca(Ml,y,a,y-z,0,y,z)).add(new Ca(fs,y,x-a)).add(new Ca(Ml,y-a,x,y,x-z,y-z,x)).add(new Ca(fs,a,x)).add(new Ca(Ml,0,x-a,z,x,0,x-z)).add(new Ca(fs,0,a)).add(new Ca(Ml,a,0,0,z,z,0).close())),1b.x&&a.y>b.y&&a.rightb.x&&y.y>b.y&&y.right=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(wc(this),this.P.oq=a,this.g("highlightedChanged",y,a))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(a){var y=this.selectionObjectName;y!==a&&(wc(this),this.P.vr=a,this.Ug=null,this.g("selectionObjectName",y,a))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(a){var y=this.selectionAdornmentTemplate;y!==a&&(wc(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof mi?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(wc(this),this.P.ur=a,this.g("selectionChanged",y,a))}},resizeAdornmentTemplate:{get:function(){return this.P!==null?this.P.fr:null},set:function(a){var y=this.resizeAdornmentTemplate;y!==a&&(wc(this),this.P.fr=a,this.g("resizeAdornmentTemplate",y,a))}},resizeObjectName:{get:function(){return this.P!==null?this.P.hr:""},set:function(a){var y=this.resizeObjectName;y!==a&&(wc(this),this.P.hr=a,this.g("resizeObjectName",y,a))}},resizeObject:{get:function(){var a=this.resizeObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},resizeCellSize:{get:function(){return this.P!==null?this.P.gr:Us},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),wc(this),this.P.gr=a,this.g("resizeCellSize",y,a))}},rotateAdornmentTemplate:{get:function(){return this.P!==null?this.P.ir:null},set:function(a){var y=this.rotateAdornmentTemplate;y!==a&&(wc(this),this.P.ir=a,this.g("rotateAdornmentTemplate",y,a))}},rotateObjectName:{get:function(){return this.P!==null?this.P.jr:""},set:function(a){var y=this.rotateObjectName;y!==a&&(wc(this),this.P.jr=a,this.g("rotateObjectName",y,a))}},rotateObject:{get:function(){var a=this.rotateObjectName;return a!==""&&(a=this.fb(a),a!==null)?a:this}},rotationSpot:{get:function(){return this.P!==null?this.P.lr:ml},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),wc(this),this.P.lr=a,this.g("rotationSpot",y,a))}},text:{get:function(){return this.ec},set:function(a){var y=this.ec;y!==a&&(this.ec=a,this.g("text",y,a))}},containingGroup:{get:function(){return this.Ah},set:function(a){if(this.Zc()){var y=this.Ah;if(y!==a){a===null||this!==a&&!a.Td(this)||(this===a&&$t("Cannot make a Group a member of itself: "+this.toString()),$t("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?X0(y,this):this instanceof Io&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Z0(a,this):this instanceof Io&&x!==null&&x.ai.add(this),this.C(1),x!==null&&x.aa){var E=this.data,b=x.model;if(E!==null&&b.Xj()){var z=b.wa(a!==null?a.data:null);b.mp(E,z)}}if(E=this.containingGroupChanged,E!==null&&(b=!0,x!==null&&(b=x.aa,x.aa=!0),E(this,y,a),x!==null&&(x.aa=b)),this instanceof Io){for(x=new Cn,Cf(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Ki)for(E=E.linksConnected;E.next();)Ug(E.value)}if(this instanceof Ki){for(x=this.linksConnected;x.next();)Ug(x.value);x=this.labeledLink,x!==null&&Ug(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&$i(y,-1,a))}}else $t("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.P!==null?this.P.Kp:null},set:function(a){var y=this.containingGroupChanged;y!==a&&(wc(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Ki&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(wc(this),this.P.Cq=a,this.g("layoutConditions",y,a))}},dragComputation:{get:function(){return this.P!==null?this.P.Up:null},set:function(a){var y=this.dragComputation;y!==a&&(wc(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Hn},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),wc(this),this.P.zr=a,this.N(),this.g("shadowOffset",y,a))}},shadowColor:{get:function(){return this.P!==null?this.P.yr:"gray"},set:function(a){var y=this.shadowColor;y!==a&&(wc(this),this.P.yr=a,this.N(),this.g("shadowColor",y,a))}},shadowBlur:{get:function(){return this.P!==null?this.P.Vg:4},set:function(a){var y=this.shadowBlur;y!==a&&(wc(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),zr.prototype.invalidateLayout=zr.prototype.C,zr.prototype.findCommonContainingGroup=zr.prototype.px,zr.prototype.isMemberOf=zr.prototype.Td,zr.prototype.findTopLevelPart=zr.prototype.sz,zr.prototype.findSubGraphLevel=zr.prototype.oz,zr.prototype.ensureBounds=zr.prototype.Va,zr.prototype.getDocumentBounds=zr.prototype.mi,zr.prototype.findObject=zr.prototype.fb,zr.prototype.moveTo=zr.prototype.moveTo,zr.prototype.invalidateAdornments=zr.prototype.Wb,zr.prototype.clearAdornments=zr.prototype.Ej,zr.prototype.removeAdornment=zr.prototype.Jf,zr.prototype.addAdornment=zr.prototype.bh,zr.prototype.findAdornment=zr.prototype.Pj,zr.prototype.updateTargetBindings=zr.prototype.La;var GS=!1;zr.className="Part",zr.LayoutNone=0,zr.LayoutAdded=1,zr.LayoutRemoved=2,zr.LayoutShown=4,zr.LayoutHidden=8,zr.LayoutNodeSized=16,zr.LayoutGroupLayout=32,zr.LayoutNodeReplaced=64,zr.LayoutStandard=127,zr.LayoutAll=16777215;function Ga(a,y){a===void 0||a instanceof Hl||typeof a=="string"?zr.call(this,a):(zr.call(this),a&&(y=a)),this.G&=-257,this.Jg="Adornment",this.ue=null,this.Aw=0,this.Uw=!1,this.j=this.$a=null,y&&Object.assign(this,y)}Ft(Ga,zr),Ga.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Ga.prototype.updateRelationshipsFromData=function(){},Ga.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof mi&&y instanceof Zo){y=x.path,x.Ul(a),a=y.geometry,x=this.O.s,y=x.length;for(var E=0;Ea&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Cn;x.add(this),$S(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ih),y.Ue=!1}};function $S(a,y,x,E,b,z,ee){if(1a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Cn;x.add(this),t1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ih),y.Ue=!1}};function t1(a,y,x,E,b,z,ee){for(var re=z===a?!1:a.isTreeExpanded,ae=x?a.Mo():a.Sd(),le={};ae.next();){var ce=ae.value;if(ce.isTreeLink&&(re||ce.fd||ce.bb(),ce=ce.To(a),ce!==null&&ce!==a&&!y.contains(ce))){if(y.add(ce),!re){ce.Zb(!0),ce.oh();var fe=x?ce.Oo():ce.Po();le.vv=a,fe.all(function(Se){return function(we){return we===Se.vv||!we.isTreeExpanded}}(le))&&b.Cj(ce,z)}(2b&&(b=re.right),re.bottom>z&&(z=re.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},un.Object.defineProperties(oc.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Mo(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),oc.className="Placeholder";function mi(a){zr.call(this,ui.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=ac,this.Om=0,this.Qm=ac,this.Rm=NaN,this.qj=ey,this.po=.5,this.wd=null,this.Nb=new Wn().freeze(),this.Tg=this.Mg=null,this.ml=new cn,this.ua=new di,this.u=this.o=this.Sf=this.Wf=null,this.su=new st,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ft(mi,zr),mi.prototype.cloneProtected=function(a){zr.prototype.cloneProtected.call(this,a),a.Qa=this.Qa&-113,a.ff=this.ff,a.gn=this.gn,a.vf=this.vf,a.uo=this.uo,a.qk=this.qk,a.Om=this.Om,a.Qm=this.Qm,a.Rm=this.Rm,a.qj=this.qj,a.po=this.po,this.ba!==null&&(a.ba=this.ba.copy())},Ee=mi.prototype,Ee.Af=function(a){zr.prototype.Af.call(this,a),this.ff=a.ff,this.vf=a.vf,a.Mg=null,a.bb(),a.Sf=this.Sf;var y=a.fromPort;y!==null&&Bc(y),a=a.toPort,a!==null&&Bc(a)},Ee.qb=function(a){a.classType===mi?(a.value&2)===2?this.routing=a:a===Yc||a===rf||a===Zg?this.curve=a:a===Dp||a===nv||a===iv?this.adjusting=a:a!==ey&&a!==ac&&$t("Unknown Link enum value for a Link property: "+a):zr.prototype.qb.call(this,a)},Ee.Xc=function(){this.ba===null&&(this.ba=new yp)},Ee.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),ic(a)||wf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),ic(a)||wf(a)))},Ee.zv=function(){return!1},Ee.Av=function(){},Ee.Zc=function(){return!1},mi.prototype.computeAngle=function(a,y,x){return mi.computeAngle(y,x)},mi.computeAngle=function(a,y){switch(a){default:case ac:a=0;break;case Tp:a=y;break;case Bp:a=y+90;break;case Op:a=y-90;break;case ty:a=y+180;break;case rv:a=Ot.bp(y),90a&&(a-=180);break;case Ip:a=Ot.bp(y+90),90a&&(a-=180);break;case Rp:a=Ot.bp(y-90),90a&&(a-=180);break;case ov:if(a=Ot.bp(y),45a||225a)return 0;90a&&(a-=180)}return Ot.bp(a)};function Ug(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&X0(x,a),a.Ah=y,y!==null&&Z0(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,ee=a.diagram;ee!==null&&(z=ee.aa,ee.aa=!0),b(a,x,y),ee!==null&&(ee.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}Ee=mi.prototype,Ee.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&zr.prototype.oh.call(this)},Ee.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ee.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function r1(a,y){a.wd===null&&(a.wd=new Cn),a.wd.add(y),a.v()}Ee.Vo=function(a){if(zr.prototype.Vo.call(this,a),qf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Zm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Zm(x,this,E)}Fp(this)}},Ee.Wo=function(a){if(zr.prototype.Wo.call(this,a),qf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Xm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Xm(x,this,E)}Np(this)}},Ee.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},mi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},mi.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?zr.prototype.move.call(this,a,!1):(a=st.allocAt(x.x+E,x.y+b),zr.prototype.move.call(this,a,!1),st.free(a)),nf(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},mi.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},mi.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},mi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Oi),a;if(y===1)return a.assign(this.i(0)),a;if(y===2){var x=this.i(0),E=this.i(1);return a.h((x.x+E.x)/2,(x.y+E.y)/2),a}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Yc))return this.ua.Pu(.5,a),a.add(this.i(0)),x=this.ua.figures.first(),a.offset(-x.startX,-x.startY),a;if(this.computeCurve()===Yc){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return Ot.ax(x.x,x.y,E.x,E.y,E.x,E.y,b.x,b.y,a),a}if(E=(y-1)/3|0,x=3*(E/2|0),E%2===1){E=this.i(x),b=this.i(x+1);var z=this.i(x+2);x=this.i(x+3),Ot.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var ee=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;Ex/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},mi.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===Yc))return this.ua.wx(.5);if(this.computeCurve()===Yc&&4<=a){var y=(a-1)/3|0,x=3*(y/2|0);if(y%2===1){x=Math.floor(x),a=this.i(x),y=this.i(x+1);var E=this.i(x+2);return x=this.i(x+3),Ot.My(a.x,a.y,y.x,y.y,E.x,E.y,x.x,x.y)}if(0E/2));)b+=z,x++;if(y=this.i(x),E=this.i(x+1),1>Math.abs(y.x-E.x)&&1>Math.abs(y.y-E.y)){if(0Math.abs(y.x-E.x))return y.y>E.y?270:90;if(1>Math.abs(y.y-E.y))return y.x>E.x?180:0}return y.ab(E)},Ee=mi.prototype,Ee.i=function(a){return this.Nb.s[a]},Ee.dd=function(a,y){this.Nb.cd(a,y)},Ee.L=function(a,y,x){this.Nb.cd(a,new st(y,x))},Ee.Kz=function(a,y){this.Nb.Gb(a,y)},Ee.m=function(a,y,x){this.Nb.Gb(a,new st(y,x))},Ee.ne=function(a){this.Nb.add(a)},Ee.yf=function(a,y){this.Nb.add(new st(a,y))},Ee.pv=function(a){this.Nb.mb(a)},Ee.Fj=function(){this.Nb.clear()};function nf(a,y,x){if(y!==0||x!==0)if(a.pointsCount===0)a.defaultFromPoint&&a.defaultFromPoint.offset(y,x),a.defaultToPoint&&a.defaultToPoint.offset(y,x);else{for(var E=a.fd,b=new Wn,z=a.Nb.iterator;z.next();){var ee=z.value;b.add(new st(ee.x+y,ee.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,ee=a.diagram,isNaN(y)||isNaN(x)||ee!==null&&ee.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),nc(a)),E?Qm(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ee!==null&&ee.animationManager.zb&&fo(ee.animationManager,a,b),a.g("points",z,b)}}Ee.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ee.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,ee=0;eele&&(fe=-fe),De=(0>ae?-1:1)*fe+we,tt=ce*(De-we)+Ae),we=z.x+2*re/3,Ae=z.y+2*ae/3;var Ze=we,ht=Ae;Ot.B(ae,0)?ht=0ae?-1:1)*fe+we,ht=ce*(Ze-we)+Ae),this.Fj(),this.ne(z),this.yf(De,tt),this.yf(Ze,ht),this.ne(Se),this.dd(0,this.getLinkPoint(a,y,ee,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,Se=b,E=this.getLinkPoint(a,y,ee,!0,!1,z,Se),b=this.getLinkPoint(z,Se,x,!1,!1,a,y),this.hasCurviness()?(Se=b.x-E.x,x=b.y-E.y,ee=this.computeCurviness(),a=E.x+Se/2,y=E.y+x/2,z=a,re=y,Ot.B(x,0)?re=0ee&&(z=-z),z=(0>x?-1:1)*z+a,re=Se*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=cn.alloc(),y.mi(re),ae=re.ca(b),Se.mi(re),le=re.ca(E),(ae||le)&&(ee=y.ga($m(ee),new st),this.dd(0,this.getLinkPointFromPoint(a,y,ee,b,!0,ee)),x=Se.ga($m(x),new st),this.dd(1,this.getLinkPointFromPoint(z,Se,x,E,!1,x))),cn.free(re))}else{fe=this.isAvoiding,Se&&(ce&&fe||le)&&this.Fj();var gt=le?this.computeCurviness():0;fe=this.getLinkPoint(a,y,ee,!0,ce,E,b),we=De=Ae=0,(ce||!re||le)&&(tt=this.computeEndSegmentLength(a,y,ee,!0),we=this.getLinkDirection(a,y,fe,ee,!0,ce,E,b),le&&(re||ee.D(x)||!ce&&ee.x+x.x===1&&ee.y+x.y===1)&&(we-=ce?90:30,0>gt&&(we-=180)),0>we?we+=360:360<=we&&(we-=360),le&&(tt+=Math.abs(gt)*(ce?1:2)),we===0?Ae=tt:we===90?De=tt:we===180?Ae=-tt:we===270?De=-tt:(Ae=tt*Math.cos(we*Math.PI/180),De=tt*Math.sin(we*Math.PI/180)),ee.Mc()&&le&&(tt=y.ga(Sa,st.alloc()),Ze=st.allocAt(tt.x+1e3*Ae,tt.y+1e3*De),this.getLinkPointFromPoint(a,y,tt,Ze,!0,fe),st.free(tt),st.free(Ze))),tt=this.getLinkPoint(E,b,x,!1,ce,a,y);var xt=ht=Ze=0;if(ce||!ae||le){var Dt=this.computeEndSegmentLength(E,b,x,!1);xt=this.getLinkDirection(E,b,tt,x,!1,ce,a,y),le&&(ae||ee.D(x)||!ce&&ee.x+x.x===1&&ee.y+x.y===1)&&(xt+=ce?0:30,0>gt&&(xt+=180)),0>xt?xt+=360:360<=xt&&(xt-=360),le&&(Dt+=Math.abs(gt)*(ce?1:2)),xt===0?Ze=Dt:xt===90?ht=Dt:xt===180?Ze=-Dt:xt===270?ht=-Dt:(Ze=Dt*Math.cos(xt*Math.PI/180),ht=Dt*Math.sin(xt*Math.PI/180)),x.Mc()&&le&&(x=b.ga(Sa,st.alloc()),ee=st.allocAt(x.x+1e3*Ze,x.y+1e3*ht),this.getLinkPointFromPoint(E,b,x,ee,!1,tt),st.free(x),st.free(ee))}x=fe,(ce||!re||le)&&(x=new st(fe.x+Ae,fe.y+De)),ee=tt,(ce||!ae||le)&&(ee=new st(tt.x+Ze,tt.y+ht)),!Se&&!ce&&re&&3Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}mi.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new st),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var ee=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),ee=a.m22*b;var re=-a.m12*b,ae=-a.m21*b,le=a.m11*b,ce=b*(a.m21*a.dy-a.m22*a.dx),fe=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*ee+E.y*ae+ce,E=E.x*re+E.y*le+fe,ee=x.x*ee+x.y*ae+ce,x=x.x*re+x.y*le+fe}return y.Sj(b,E,ee,x,z),a!==null&&z.transform(a),z};function qm(a,y){var x=y.Zn;return x===null&&(x=new vg,x.port=y,x.node=y.part,y.Zn=x),d1(x,a)}mi.prototype.getLinkPoint=function(a,y,x,E,b,z,ee,re){if(re===void 0&&(re=new st),x.sb()&&!Yg(x))return y.ga(x,re),re;if(x.$c()){var ae=qm(this,y);if(ae!==null){if(re.assign(ae.Zo),b&&this.routing===a1){var le=qm(this,ee);if(le!==null&&ae.Gl=ce.y&&a.y<=ce.y+ce.height?re.y=a.y:(x.Hf(Cc)||x.Hf(Cu))&&a.x>=ce.x&&a.x<=ce.x+ce.width&&(re.x=a.x),st.free(ae),st.free(le)}}return re}}return x=y.ga($m(x),st.alloc()),this.pointsCount>(b?6:2)?(ee=E?this.i(1):this.i(this.pointsCount-2),b&&(ee=J0(x,ee.copy()))):(ae=this.computeSpot(!E,ee),z=st.alloc(),ee=ee.ga($m(ae),z),b&&(ee=J0(x,ee)),st.free(z)),this.getLinkPointFromPoint(a,y,x,ee,E,re),st.free(x),re},mi.prototype.getLinkDirection=function(a,y,x,E,b,z,ee,re){e:if(E.sb())var ae=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?J0(ae,re.copy()):x):(x=st.alloc(),re=re.ga(Sa,x),st.free(x)),x=Math.abs(re.x-ae.x)>Math.abs(re.y-ae.y)?re.x>=ae.x?0:180:re.y>=ae.y?90:270,st.free(ae),ae=x}return E.Mc()&&ee.Td(a)&&(ae+=180,360<=ae&&(ae-=360)),Yg(E)||(a=y.li(),a===0)||(45<=a&&135>a?ae+=90:135<=a&&225>a?ae+=180:225<=a&&315>a&&(ae+=270),360<=ae&&(ae-=360)),ae},mi.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=qm(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},mi.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Sa:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===ml?hl:y)):(a=y||this.toPort,a===null?a=Sa:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===ml?hl:y)),a};function Yg(a){return a===hl||a.x===.5&&a.y===.5}function $m(a){return a.x===.5&&a.y===.5?a:Sa}mi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==ac&&4Se.width||fe.y>Se.height||0>fe.x+fe.width||0>fe.y+fe.height)){if(fe=Fo.alloc(),fe.set(ee),ce instanceof ui)re=ce.Cf(a,y,x,E,b,fe);else if(this.path===ce){if(ce instanceof Zo)if(re=a,Se=E,ce.pickable===!1)re=!1;else if(fe.multiply(ce.transform),Se)e:{var we=re,Ae=fe;if(ce.fh(we,Ae))re=!0;else{if(Ae===void 0&&(Ae=ce.transform,we.Re(ce.actualBounds))){re=!0;break e}re=we.left,Se=we.right;var De=we.top;we=we.bottom;var tt=st.alloc(),Ze=st.alloc(),ht=st.alloc(),gt=Fo.alloc();gt.set(Ae),gt.bv(ce.transform),gt.Vj(),Ze.x=Se,Ze.y=De,Ze.transform(gt),tt.x=re,tt.y=De,tt.transform(gt),Ae=!1,Jf(ce,tt,Ze,ht)?Ae=!0:(tt.x=Se,tt.y=we,tt.transform(gt),Jf(ce,tt,Ze,ht)?Ae=!0:(Ze.x=re,Ze.y=we,Ze.transform(gt),Jf(ce,tt,Ze,ht)?Ae=!0:(tt.x=re,tt.y=De,tt.transform(gt),Jf(ce,tt,Ze,ht)&&(Ae=!0)))),Fo.free(gt),st.free(tt),st.free(Ze),st.free(ht),re=Ae}}else re=ce.fh(re,fe)}else re=Xl(ce,a,E,fe);re&&(Se=ce,y!==null&&(Se=y(ce)),Se&&(x===null||x(Se))&&b.add(Se)),Fo.free(fe)}}}return z===void 0&&Fo.free(ee),re||this.background!==null||this.areaBackground!==null}return z===void 0&&Fo.free(ee),!1},mi.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?Yc:this.curve},mi.prototype.computeCorner=function(){if(this.curve===Yc)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},mi.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;Eae?-Math.PI/2:Math.PI/2;else ce=Math.atan(ae/Math.abs(re)),0>re&&(ce=Math.PI-ce);ee=y.x;var fe=y.y;re=E.x-ee;var Se=E.y-fe;for(ae=Math.sqrt(re*re+Se*Se),Ot.$(re,0)?Se=0>Se?-Math.PI/2:Math.PI/2:(Se=Math.atan(Se/Math.abs(re)),0>re&&(Se=Math.PI-Se)),le=ae/le,ce=Se-ce,this.dd(a,y),a+=1;aae?-Math.PI/2:Math.PI/2:(ae=Math.atan(ae/Math.abs(re)),0>re&&(ae=Math.PI-ae)),re=ae+ce,y*=le,this.L(a,ee+y*Math.cos(re),fe+y*Math.sin(re)));this.dd(x,E)}}return!0;case iv:if(z=this.i(a),fe=this.i(x),!z.Xa(y)||!fe.Xa(E)){b=z.x,z=z.y,ee=fe.x,fe=fe.y,le=(ee-b)*(ee-b)+(fe-z)*(fe-z),re=y.x,ce=y.y,ae=E.x,Se=E.y;var we=1;if(ae-re!==0){var Ae=(Se-ce)/(ae-re);we=Math.sqrt(1+1/(Ae*Ae))}else Ae=9e9;for(this.dd(a,y),a+=1;ay?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var ee=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var re=b.actualBounds.copy(),ae=z.actualBounds.copy();if(re.w()&&ae.w()){re.Bc(jp,jp),ae.Bc(jp,jp),re.Ye(a),ae.Ye(x);var le=st.alloc(),ce=st.alloc();y===0?x.x>a.x||E===270&&x.ya.x||E===90&&x.y>a.y&&ae.right>a.x?(le.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),E===180?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=le.x,ce.y=x.y):E===270&&x.ya.y?(le.x=a.xae.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ae.right,ce.x=le.x,ce.y=x.y):E===0&&a.xae.top&&a.yre.bottom)&&(E===180&&(ae.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.ya.y&&(E===180||E===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,ae.top),!0)),ce.x=x.x,ce.y=le.y),le.y>re.top&&le.y=re.left&&x.x<=a.x||a.x<=ae.right&&a.x>=x.x?(E===90||E===270)&&(le.h(Math.max((a.x+x.x)/2,a.x),a.y),ce.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.ya.y&&ae.lefta.y?(le.x=a.x>ae.right?this.computeMidOrthoPosition(a.x,a.y,ae.right,x.y,!1):a.x>ae.left&&(E===270&&a.yae.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ae.left,ce.x=le.x,ce.y=x.y):E===180&&a.x>ae.right&&a.y>ae.top&&a.yre.bottom)&&(E===0&&(ae.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.ya.y&&(E===0||E===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,ae.top),!0)),ce.x=x.x,ce.y=le.y),le.y>re.top&&le.y=a.x||a.x>=ae.left&&a.x<=x.x?(E===90||E===270)&&(le.h(Math.min((a.x+x.x)/2,a.x),a.y),ce.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.ya.y||E===180&&x.xa.y||E===0&&x.x>a.x&&ae.bottom>a.y?(le.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),E===270?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=le.y):E===180&&x.xa.x?(le.y=a.yae.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ae.bottom,ce.x=x.x,ce.y=le.y):E===90&&a.yae.left&&a.xre.right)&&(E===270&&(ae.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.xa.x&&(E===270||E===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,ae.left),x.y,!1)),ce.x=le.x,ce.y=x.y),le.x>re.left&&le.x=re.top&&x.y<=a.y||a.y<=ae.bottom&&a.y>=x.y?(E===0||E===180)&&(le.h(a.x,Math.max((a.y+x.y)/2,a.y)),ce.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.xa.x&&ae.top=a.x?(le.y=a.y>ae.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ae.bottom,!0):a.y>ae.top&&(E===180&&a.xae.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ae.top,ce.x=x.x,ce.y=le.y):E===270&&a.y>ae.bottom&&a.x>ae.left&&a.xre.right)&&(E===90&&(ae.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.xa.x&&(E===90||E===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,ae.left),x.y,!1)),ce.x=le.x,ce.y=x.y),le.x>re.left&&le.x=a.y||a.y>=ae.top&&a.y<=x.y?(E===0||E===180)&&(le.h(a.x,Math.min((a.y+x.y)/2,a.y)),ce.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x=Jg&&(u1(we),re.Bc(we.Ho*we.Hx,we.Go*we.Ix),c1(we,a,y,fe,E,re,!1),ae=Sd(we,fe.x,fe.y)),!we.abort&&aethis.pointsCount?(y===0||y===180?(re.x=a.x,re.y=fe.y):(re.x=fe.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(ee=this.i(3),y===0||y===180?Ot.B(re.x,ee.x)?(re=y===0?Math.max(re.x,a.x):Math.min(re.x,a.x),this.L(2,re,a.y),this.L(3,re,ee.y)):Ot.B(re.y,ee.y)?(Math.abs(a.y-re.y)<=we.Go/2&&(this.L(2,re.x,a.y),this.L(3,ee.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(Ot.B(re.y,ee.y)?(re=y===90?Math.max(re.y,a.y):Math.min(re.y,a.y),this.L(2,a.x,re),this.L(3,ee.x,re)):Ot.B(re.x,ee.x)?(Math.abs(a.x-re.x)<=we.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,ee.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),ee=this.i(2),a.x!==ee.x&&a.y!==ee.y?y===0||y===180?this.m(2,a.x,ee.y):this.m(2,ee.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Ae!==null&&(E===0||E===180?this.yf(z.x,Ae.y):this.yf(Ae.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(le.copy()),this.ne(ce.copy())),st.free(le),st.free(ce)}},mi.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Q0(a){if(a.diagram===null||!a.isAvoiding||!Jh(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=Ld(a.diagram,!0,a.containingGroup,null);for(var E=1;E$f&&Sd(y,ce,fe)!==le-1&&(Sd(y,x-re,E)===le-1?(b=180,ce=x-re,fe=E):Sd(y,x+re,E)===le-1?(b=0,ce=x+re,fe=E):Sd(y,x,E-ae)===le-1?(b=270,ce=x,fe=E-ae):Sd(y,x,E+ae)===le-1&&(b=90,ce=x,fe=E+ae));le>$f&&Sd(y,ce,fe)===le-1;)x=ce,E=fe,b===0?ce+=re:b===90?fe+=ae:b===180?ce-=re:fe-=ae,--le;z?le>$f&&(b===180||b===0?x=Math.floor(x/re)*re+re/2:(b===90||b===270)&&(E=Math.floor(E/ae)*ae+ae/2)):(x=Math.floor(x/re)*re+re/2,E=Math.floor(E/ae)*ae+ae/2),le>$f&&(z=b,ee=x,ce=E,b===0?(z=90,ce+=ae):b===90?(z=180,ee-=re):b===180?(z=270,ce-=ae):b===270&&(z=0,ee+=re),Sd(y,ee,ce)===le-1?q0(a,y,ee,ce,z,!1,z):(ee=x,ce=E,b===0?(z=270,ce-=ae):b===90?(z=0,ee+=re):b===180?(z=90,ce+=ae):b===270&&(z=180,ee-=re),Sd(y,ee,ce)===le-1&&q0(a,y,ee,ce,z,!1,z))),a.yf(x,E)}mi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=nr(y,a,x.x,x.y,E.x,E.y),z=0,ee=1;eethis.pointsCount?this.lk=!0:this.ua=this.makeGeometry(),a=this.path,a!==null)){a.ua=this.ua;for(var y=this.O.s,x=y.length,E=0;E=y&&(E=y-1),ae=this.i(E),z.x=Math.min(ae.x,z.x),z.y=Math.min(ae.y,z.y);E=z.x,ae=z.y}else{for(ae=0;aett?Ae>we?(z.x=Ze-gt,z.y=we-gt,b.x=Ze+De,b.y=we+De):(z.x=Ze-gt,z.y=we+gt,b.x=Ze+De,b.y=we-De):Ae>we?(z.x=Ze+gt,z.y=we-gt,b.x=Ze-De,b.y=we+De):(z.x=Ze+gt,z.y=we+gt,b.x=Ze-De,b.y=we-De)),Ot.$(tt,Ze)&&Ot.$(we,Ae)&&(we>Se?(ht>Ze?(z.x=Ze-gt,z.y=we-gt,b.x=Ze+De):(z.x=Ze+gt,z.y=we-gt,b.x=Ze-De),b.y=we+De):(ht>Ze?(z.x=Ze-gt,z.y=we+gt,b.x=Ze+De):(z.x=Ze+gt,z.y=we+gt,b.x=Ze-De),b.y=we-De)),(Ot.$(tt,Ze)&&Ot.$(Ze,ht)||Ot.$(Se,we)&&Ot.$(we,Ae))&&(tt=.5*(tt+ht),Se=.5*(Se+Ae),z.x=tt,z.y=Se,b.x=tt,b.y=Se),(fe===1||fe===2&&Ot.$(ee.x,this.i(0).x)&&Ot.$(ee.y,this.i(0).y))&&(x.x=.5*(ee.x+le.x),x.y=.5*(ee.y+le.y)),$d(re,x.x-E,x.y-ae,z.x-E,z.y-ae,le.x-E,le.y-ae),y.set(z),x.set(b),ee=le}}le=ee.x,ee=ee.y,ce=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ce=fg(this,ce.copy(),!1,St)),le=.5*(le+ce.x),ee=.5*(ee+ce.y),$d(re,b.x-E,b.y-ae,le-E,ee-ae,ce.x-E,ce.y-ae),st.free(y),st.free(x),st.free(z),st.free(b)}else for(x=3;x=y&&(x=y-1),b=this.i(x-1),ee=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ee=fg(this,ee.copy(),!1,St)),$d(re,z.x-E,z.y-ae,b.x-E,b.y-ae,ee.x-E,ee.y-ae);else{for(z=st.alloc(),z.assign(this.i(0)),b=st.alloc(),b.assign(z),ee=this.computeCorner(),fe=1,le=0;fe=y-1){if(!z.D(ce))this.computeShortLength(!1)!==0&&(ce=fg(this,ce.copy(),!1,St)),gg(this,re,-E,-ae,z,ce,x);else if(le===0)for(fe=1;fez.x?xt=Se.x-Ae:xt=Se.x+Ae,Ze.y>Se.y?ht=Se.y+gt:ht=Se.y-gt,Ze=st.allocAt(xt,Dt),gg(this,re,fe,tt,z,Ze,De),st.free(Ze),Km(re,Se.x+fe,Se.y+tt,we+fe,ht+tt),z.h(we,ht)}else Ot.B(z.x,Se.x)&&Ot.B(Se.y,Ze.y)?(Ae=Math.min(ee,Math.abs(Se.y-b.y)/2),Ae=gt=Math.min(Ae,Math.abs(Ze.x-Se.x)/2),Ot.B(gt,0)?(gg(this,re,fe,tt,z,Se,De),z.assign(Se)):(xt=Se.x,Dt=Se.y,we=xt,ht=Dt,Se.y>z.y?Dt=Se.y-Ae:Dt=Se.y+Ae,Ze.x>Se.x?we=Se.x+gt:we=Se.x-gt,Ze=st.allocAt(xt,Dt),gg(this,re,fe,tt,z,Ze,De),st.free(Ze),Km(re,Se.x+fe,Se.y+tt,we+fe,ht+tt),z.h(we,ht))):(gg(this,re,fe,tt,z,Se,De),z.assign(Se));b.assign(ce),fe=le}st.free(z)}Gm=re}else re=this.i(1).copy(),re.x-=E,re.y-=ae,this.computeShortLength(!0)!==0&&(b=fg(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=fg(this,re,!1,z)),a.type=di.j,a.startX=b.x,a.startY=b.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function ev(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Ot.$(a,0)?y:Ot.$(y,0)?a:Math.sqrt(a*a+y*y)))}function fg(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=ev(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=ev(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function $0(a,y,x,E){for(var b=a.pointsCount,z=y;Ot.$(y.x,z.x)&&Ot.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!Ot.$(y.x,z.x)&&!Ot.$(y.y,z.y))return x-1;for(var ee=z;Ot.$(y.x,z.x)&&Ot.$(z.x,ee.x)&&(!E||(y.y>=z.y?z.y>=ee.y:z.y<=ee.y))||Ot.$(y.y,z.y)&&Ot.$(z.y,ee.y)&&(!E||(y.x>=z.x?z.x>=ee.x:z.x<=ee.x));){if(x>=b)return b-1;ee=a.i(x++)}return x-2}mi.prototype.computeJumpLength=function(){return 10};function gg(a,y,x,E,b,z,ee){if(!ee&&qf(a)){ee=a.computeJumpLength();var re=ee/2,ae=[],le=0;if(a.isVisible()&&(le=Bx(a,b,z,ae)),0fe-ee);)le--,fe=Math.max(ce-re,z.x);ce=z.y-ee+E,fe+=x,we=z.y+E,a.curve===rf?Gg(y,fe,we,!1):$d(y,Se,ce,fe,ce,fe,we)}else if(Ot.B(b.x,z.x))if(b.yce-ee);)le--,ce=Math.max(fe-re,z.y);fe=z.x-ee+x,we=z.x+x,ce+=E,a.curve===rf?Gg(y,we,ce,!1):$d(y,fe,Se,fe,ce,we,ce)}}}y.lineTo(z.x+x,z.y+E)}function Bx(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var ee=z.length,re=0;reee.x&&ce.x>=le.x||le.xee.y&&ce.y>=le.y||le.yee&&Math.min(Ae,De)ce&&!Ot.B(Ae,De)){re.x=ce,re.y=ee,ce=!0;break e}}else if(Ot.B(fe,we)&&Ot.B(Ae,De)&&Math.min(ce,Se)Ae&&Math.min(ee,tt)fe&&!Ot.B(ee,tt)){re.x=Ae,re.y=fe,ce=!0;break e}re.x=0,re.y=0,ce=!1}ce&&(b?x.push(re.x):x.push(re.y)),ee=le}st.free(re)}function qf(a){return a=a.curve,a===Zg||a===rf}function tv(a,y){(y||qf(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}mi.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var ee=b.length,re=0;rea&&Wr(a,">= 0",mi,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ml},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),(y.$c()||a.$c())&&this.toNode!==null&&Bc(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Wr(a,">= 0",mi,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0=E&&(z=E-1);var re=this.i(z-1),ae=this.i(z);Ot.Dl(b.x,b.y,ee.x,ee.y,re.x,re.y,ae.x,ae.y,.5,a),y=Math.min(ae.x,y),x=Math.min(ae.y,x),b=ae}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;bE&&(E=-E)):Ot.$(E.y,b.y)?(E=b.x-E.x,0>E&&(E=-E)):E=Math.sqrt(E.Bf(b)),a.push(E)}}return this.cq}},flattenedTotalLength:{get:function(){var a=this.vt;if(isNaN(a)){for(var y=this.flattenedLengths,x=y.length,E=a=0;Ethis.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!Yg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Yg(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),tv(this,y===rf||y===Zg||a===rf||a===Zg),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),tv(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),mi.prototype.invalidateOtherJumpOvers=mi.prototype.Xo,mi.prototype.findClosestSegment=mi.prototype.ez,mi.prototype.updateRoute=mi.prototype.vg,mi.prototype.invalidateRoute=mi.prototype.bb,mi.prototype.rollbackRoute=mi.prototype.rv,mi.prototype.commitRoute=mi.prototype.zf,mi.prototype.startRoute=mi.prototype.uh,mi.prototype.clearPoints=mi.prototype.Fj,mi.prototype.removePoint=mi.prototype.pv,mi.prototype.addPointAt=mi.prototype.yf,mi.prototype.addPoint=mi.prototype.ne,mi.prototype.insertPointAt=mi.prototype.m,mi.prototype.insertPoint=mi.prototype.Kz,mi.prototype.setPointAt=mi.prototype.L,mi.prototype.setPoint=mi.prototype.dd,mi.prototype.getPoint=mi.prototype.i,mi.prototype.getOtherPort=mi.prototype.Cz,mi.prototype.getOtherNode=mi.prototype.To;var pg=null,mg=null,ey=new ln(mi,"Normal",1),Ix=new ln(mi,"Orthogonal",2),Rx=new ln(mi,"AvoidsNodes",6),a1=new ln(mi,"AvoidsNodesStraight",7),ac=new ln(mi,"None",0),Yc=new ln(mi,"Bezier",9),rf=new ln(mi,"JumpGap",10),Zg=new ln(mi,"JumpOver",11),Dp=new ln(mi,"End",17),nv=new ln(mi,"Scale",18),iv=new ln(mi,"Stretch",19),Tp=new ln(mi,"OrientAlong",21),Bp=new ln(mi,"OrientPlus90",22),Op=new ln(mi,"OrientMinus90",23),ty=new ln(mi,"OrientOpposite",24),rv=new ln(mi,"OrientUpright",25),Ip=new ln(mi,"OrientPlus90Upright",26),Rp=new ln(mi,"OrientMinus90Upright",27),ov=new ln(mi,"OrientUpright45",28),s1=16,l1=14,jp=8;mi.className="Link",mi.Normal=ey,mi.Orthogonal=Ix,mi.AvoidsNodes=Rx,mi.AvoidsNodesStraight=a1,mi.None=ac,mi.Bezier=Yc,mi.JumpGap=rf,mi.JumpOver=Zg,mi.End=Dp,mi.Scale=nv,mi.Stretch=iv,mi.OrientAlong=Tp,mi.OrientPlus90=Bp,mi.OrientMinus90=Op,mi.OrientOpposite=ty,mi.OrientUpright=rv,mi.OrientPlus90Upright=Ip,mi.OrientMinus90Upright=Rp,mi.OrientUpright45=ov,mi.EndSegmentStep=8,mi.CurvinessStart=s1,mi.SpacingMin=l1,mi.OrthoShortCut=jp;function av(a,y,x,E){Po(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}av.prototype.Sl=function(){if(!this.qq){var a=this.links;0=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di=$f&&(x[E]=ny)}zp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+xthis.Fn||y+Ea&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===of)return!1}return!0};function xd(a,y,x,E,b,z,ee,re,ae){if(!(yee||xae)){var le=y|0,ce=x|0,fe=a.ac[le][ce];if(fe>=$f&&fe=a.ac[le][ce]);)a.ac[le][ce]=fe,fe+=1,b?ce+=E:le+=E;if(le=b?ce:le,b)if(0le;x+=E)xd(a,y,x,1,!b,z,ee,re,ae),xd(a,y,x,-1,!b,z,ee,re,ae);else if(0le;y+=E)xd(a,y,x,1,!b,z,ee,re,ae),xd(a,y,x,-1,!b,z,ee,re,ae)}}function sv(a,y,x,E,b,z,ee,re,ae){y|=0,x|=0;var le=of,ce=$f;for(a.ac[y][x]=ce;le===of&&y>z&&yre&&xz&&yre&&x=Math.abs(re-le)&&1>=Math.abs(ae-ce))a.abort=!0;else{var fe=z.x;E=z.y,y=z.x+z.width;var Se=z.y+z.height;fe-=a.Nd,fe/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,Se-=a.Od,Se/=a.sc,z=Math.max(0,Math.min(a.di,fe|0)),y=Math.min(a.di,Math.max(0,y|0)),fe=Math.max(0,Math.min(a.ei,E|0)),Se=Math.min(a.ei,Math.max(0,Se|0)),E=a.ac,re|=0,ae|=0,le|=0,ce|=0;var we=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][ae]===of?(sv(a,re,ae,we,x,z,y,fe,Se),sv(a,re,ae,1,!x,z,y,fe,Se),sv(a,re,ae,-1,!x,z,y,fe,Se)):sv(a,re,ae,we,x,re,ae,re,ae),E[le][ce]===of?(lv(a,le,ce,b===0||b===90?1:-1,b===90||b===270,z,y,fe,Se),lv(a,le,ce,1,!(b===90||b===270),z,y,fe,Se),lv(a,le,ce,-1,!(b===90||b===270),z,y,fe,Se)):lv(a,le,ce,we,x,le,ce,le,ce),x=ur(),ee&&h1(a,le,ce,b,re,ae,x))for((x[0]!==le||x[1]!==ce)&&(x.unshift(ce),x.unshift(le)),(x[x.length-2]!==re||x[x.length-1]!==ae)&&(x.push(re),x.push(ae)),a=$f,b=x[x.length-2],ee=x[x.length-1],E[b][ee]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],ee=x[z+3],y=x[z],le=x[z+1];y>b?b++:yee?ee++:leb)ce--;else break;else if(fe>z)fe--;else break;var Se=re[ce][fe];if(Se===0||Se===iy)break;ae=ce,le=fe}for(;;){if(ce=E,fe=ae,Se=le,E===0?Sez&&(ce=270,Se--):E===90?feb&&(ce=180,fe--):E===180?Sez&&(ce=270,Se--):feb&&(ce=180,fe--),fe=re[fe][Se],ce!==E&&fe!==0&&fe!==iy){if(ee.push(ae),ee.push(le),h1(a,ae,le,ce,b,z,ee))return!0;ee.pop(),ee.pop()}if(re[ae][le]=iy,E===0){if(ae===y)return!1;ae--}else if(E===90){if(le===x)return!1;le--}else if(E===180){if(ae===y)return!1;ae++}else{if(le===x)return!1;le++}}}un.Object.defineProperties(zp.prototype,{bounds:{get:function(){return new cn(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0=x?180:0}switch(a=180*Math.atan2(a.height,a.width)/Math.PI,y){case 3:return x>a&&x<=180+a?180:270;case 5:return x>180-a&&x<=360-a?270:0;case 12:return x>a&&x<=180+a?90:0;case 10:return x>180-a&&x<=360-a?180:90;case 7:return 90180+a&&x<=360-a?270:0;case 13:return 180a&&180>=x?90:0;case 14:return x>a&&x<=180-a?90:x>180-a&&270>=x?180:0;case 11:return x>180-a&&x<=180+a?180:x>180+a?270:90}return E&&y!==15&&(x-=15,0>x&&(x+=360)),x>a&&x<180-a?90:x>=180-a&&x<=180+a?180:x>180+a&&x<360-a?270:0}vg.prototype.Sl=function(){this.pe.length=0};function d1(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof Io?b:null;if(z===null||z.isSubGraphExpanded)var ee=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}E=z,ee=E.Lu()}z=a.pe.length=0;var re=a.port.ga(Rs,st.alloc()),ae=a.port.ga(eu,st.alloc());for(b=cn.allocAt(re.x,re.y,0,0),b.Ye(ae),st.free(re),st.free(ae),re=st.allocAt(b.x+b.width/2,b.y+b.height/2),ae=a.port.li(),ee=ee.iterator;ee.next();){var le=ee.value;if(le.isVisible()&&le.fromPort!==le.toPort){var ce=le.fromPort===a.port||le.fromNode!==null&&le.fromNode.Td(E),fe=le.computeSpot(ce,a.port);if(fe.$c()&&(ce=ce?le.toPort:le.fromPort,ce!==null)){var Se=ce.part;if(Se!==null){var we=Se.findVisibleNode();we!==null&&we!==Se&&(Se=we,ce=Se.port),ce=le.computeOtherPoint(Se,ce),Se=re.ab(ce),Se-=ae,0>Se?Se+=360:360<=Se&&(Se-=360),fe=jx(b,fe,Se,le.isOrthogonal),fe===0?(fe=4,180Se&&(Se+=360)),we=a.pe[z],we===void 0?(we=new ry(le,Se,fe),a.pe[z]=we):(we.link=le,we.angle=Se,we.Nc=fe),we.hv.set(ce),z++}}}}for(st.free(re),a.pe.sort(vg.prototype.j),ae=a.pe.length,E=-1,z=re=0;zMath.abs(De)?(ht=Math.abs(De)/Se,Se=Math.abs(De)):ht=1;break;case 2:we>Math.abs(gt)?(ht=Math.abs(gt)/we,we=Math.abs(gt)):ht=1;break;case 1:fe>Math.abs(De)?(ht=Math.abs(De)/fe,fe=Math.abs(De)):ht=1;break;default:case 4:ce>Math.abs(gt)?(ht=Math.abs(gt)/ce,ce=Math.abs(gt)):ht=1}Ze=0}var qt=xt.Zo;if(E===Y0){switch(xt=xt.link.computeThickness(),xt*=ht,qt.set(Dt),Ae){case 8:qt.x=Dt.x+De/2+Se/2-Ze-xt/2;break;case 2:qt.y=Dt.y+gt/2+we/2-Ze-xt/2;break;case 1:qt.x=Dt.x+De/2-fe/2+Ze+xt/2;break;default:case 4:qt.y=Dt.y+gt/2-ce/2+Ze+xt/2}Ze+=xt}else{var zi=.5;E===Jm&&(zi=(xt.Uo+1)/(xt.Gl+1)),qt.x=Dt.x+De*zi,qt.y=Dt.y+gt*zi}}}for(st.free(re),st.free(ae),st.free(ee),st.free(le),Dt=a.pe,z=0;zy.Nc?1:a.angley.angle?1:0},vg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,hl,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y=y-1?(z=0,E=x,b+=ee+20,ee=0):z++}},$s.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,ee=this.network.vertexes.iterator;ee.next();){var re=ee.value.node;if(!(re===null||re instanceof mi)&&(Wp(re),this.rh(re))){var ae=re.measuredBounds,le=ae.width;ae=ae.height,re.moveTo(x,E),re instanceof Io&&(re.rh=!1),x+=Math.max(le,50)+20,z=Math.max(z,Math.max(ae,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},$s.prototype.rh=function(a){return!!(!a.location.w()||a instanceof Io&&a.rh)};function Ef(a,y,x,E,b,z,ee,re){for(x=x.iterator;x.next();){var ae=x.value;E&&!ae.isTopLevel||b!==null&&!b(ae)||!ae.canLayout()||(z&&ae instanceof Ki?ae.isLinkLabel||(ae instanceof Io&&ae.layout===null?Ef(a,y,ae.memberParts,!1,b,z,ee,re):(Wp(ae),y.add(ae))):ee&&ae instanceof mi?y.add(ae):!re||!ae.Zc()||ae instanceof Ki||(Wp(ae),y.add(ae)))}}function Wp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}$s.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new cn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},$s.prototype.ex=function(a){var y=new Cn;return a instanceof Et?(Ef(this,y,a.nodes,!0,null,!0,!0,!0),Ef(this,y,a.links,!0,null,!0,!0,!0),Ef(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof Io?Ef(this,y,a.memberParts,!1,null,!0,!0,!0):Ef(this,y,a.iterator,!1,null,!0,!0,!0),y},$s.prototype.initialOrigin=function(a){var y=this.group;if(y!==null){var x=y.position.copy();return(isNaN(x.x)||isNaN(x.y))&&x.set(a),y=y.placeholder,y!==null&&(x=y.ga(Rs),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},un.Object.defineProperties($s.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},group:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a,a!==null&&(this.H=a.diagram))}},isOngoing:{get:function(){return this.sn},set:function(a){this.sn!==a&&(this.sn=a)}},isInitial:{get:function(){return this.Gh},set:function(a){this.Gh=a,a||(this.xn=!0)}},isViewportSized:{get:function(){return this.yn},set:function(a){this.yn!==a&&(this.yn=a)&&this.C()}},isRouting:{get:function(){return this.vn},set:function(a){this.vn!==a&&(this.vn=a)}},isRealtime:{get:function(){return this.un},set:function(a){this.un!==a&&(this.un=a)}},isValidLayout:{get:function(){return this.xn},set:function(a){this.xn!==a&&(this.xn=a,a||(a=this.diagram,a!==null&&(a.xh=!0)))}},network:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a,a!==null&&(a.layout=this))}},boundsComputation:{get:function(){return this.Em},set:function(a){this.Em!==a&&(this.Em=a,this.C())}},arrangementOrigin:{get:function(){return this.Am},set:function(a){this.Am.D(a)||(this.Am.assign(a),this.C())}}}),$s.prototype.collectParts=$s.prototype.ex,$s.prototype.getLayoutBounds=$s.prototype.ni,$s.prototype.invalidateLayout=$s.prototype.C,$s.className="Layout";function Fs(a){Po(this),this.Sc=a,this.wf=new Cn,this.ye=new Cn,this.Es=new wr,this.zs=new wr}Fs.prototype.clear=function(){if(this.wf)for(var a=this.wf.iterator;a.next();)a.value.clear();if(this.ye)for(a=this.ye.iterator;a.next();)a.value.clear();this.wf=new Cn,this.ye=new Cn,this.Es=new wr,this.zs=new wr},Fs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutNetwork"+(this.layout!==null?"("+this.layout.toString()+")":"");if(0>=a)return y;if(y+=" vertexes: "+this.wf.count+" edges: "+this.ye.count,1y?1:0):1:y!==null?-1:0}un.Object.defineProperties(_l.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=cn.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),cn.free(x),!(a instanceof Io)&&(a=a.locationObject.ga(Sa),a.w())){this.o.h(a.x-y,a.y-b);return}this.o.h(z/2,E/2)}}},bounds:{get:function(){return this.j},set:function(a){this.j.D(a)||this.j.assign(a)}},focus:{get:function(){return this.o},set:function(a){this.o.D(a)||this.o.assign(a)}},centerX:{get:function(){return this.j.x+this.o.x},set:function(a){var y=this.j;y.x+this.o.x!==a&&(y.ka(),y.x=a-this.o.x,y.freeze())}},centerY:{get:function(){return this.j.y+this.o.y},set:function(a){var y=this.j;y.y+this.o.y!==a&&(y.ka(),y.y=a-this.o.y,y.freeze())}},focusX:{get:function(){return this.o.x},set:function(a){var y=this.o;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},focusY:{get:function(){return this.o.y},set:function(a){var y=this.o;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},x:{get:function(){return this.j.x},set:function(a){var y=this.j;y.x!==a&&(y.ka(),y.x=a,y.freeze())}},y:{get:function(){return this.j.y},set:function(a){var y=this.j;y.y!==a&&(y.ka(),y.y=a,y.freeze())}},width:{get:function(){return this.j.width},set:function(a){var y=this.j;y.width!==a&&(y.ka(),y.width=a,y.freeze())}},height:{get:function(){return this.j.height},set:function(a){var y=this.j;y.height!==a&&(y.ka(),y.height=a,y.freeze())}},network:{get:function(){return this.ob},set:function(a){this.ob=a}},sourceVertexes:{get:function(){for(var a=new Cn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Cn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Cn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new Wn,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),_l.prototype.deleteDestinationEdge=_l.prototype.Jl,_l.prototype.addDestinationEdge=_l.prototype.zl,_l.prototype.deleteSourceEdge=_l.prototype.Kl,_l.prototype.addSourceEdge=_l.prototype.Cl,_l.className="LayoutVertex",_l.standardComparer=ly,_l.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x "+(this.qd?this.qd.toString():"null"))),y},Oc.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Oc.prototype.commit=function(){},Oc.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},un.Object.defineProperties(Oc.prototype,{network:{get:function(){return this.nb},set:function(a){this.nb=a}},data:{get:function(){return this.ub},set:function(a){this.ub!==a&&(this.ub=a)}},link:{get:function(){return this.$k},set:function(a){this.$k!==a&&(this.$k=a)}},fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}}}),Oc.prototype.getOtherVertex=Oc.prototype.Ax,Oc.className="LayoutEdge";function xu(a){$s.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new fn(NaN,NaN).freeze(),this.tf=new fn(10,10).freeze(),this.Jb=Hp,this.Rb=cv,this.nd=_p,this.hd=g1,a&&Object.assign(this,a)}Ft(xu,$s),xu.prototype.cloneProtected=function(a){$s.prototype.cloneProtected.call(this,a),a.zo=this.zo,a.yo=this.yo,a.yg.assign(this.yg),a.tf.assign(this.tf),a.Jb=this.Jb,a.Rb=this.Rb,a.nd=this.nd,a.hd=this.hd},xu.prototype.qb=function(a){a.classType===xu?a===_p||a===dv||a===uy||a===hv?this.sorting=a:a===cv||a===jh?this.arrangement=a:a===Hp||a===uv?this.alignment=a:$t("Unknown enum value: "+a):$s.prototype.qb.call(this,a)},xu.prototype.doLayout=function(a){this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var y=this.ex(a);a=this.diagram;for(var x=y.copy().iterator;x.next();){var E=x.value;if(!E.ph()||E.fromNode===null&&E.toNode===null){if(E.Va(),E instanceof Io)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case hv:b.reverse();break;case _p:b.sort(this.comparer);break;case dv:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var ee=this.wrappingWidth;switch(isNaN(ee)&&a!==null?(y=a.padding,ee=Math.max(a.viewportBounds.width-y.left-y.right,0)):ee=Math.max(this.wrappingWidth,0),0>=z&&0>=ee&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case uv:var re=y,ae=x,le=cn.alloc(),ce=Math.max(this.cellSize.width,1);if(!isFinite(ce))for(var fe=ce=0;fez-1||0ee)&&(E.push(new cn(0,De,ee+re,Ze)),tt=0,Ae=we,De+=Ze,Ze=0),Ze=Math.max(Ze,qt),Se){case jh:xt=-xt.width;break;default:xt=0}switch(gt.moveTo(Ae+xt,De),Se){case jh:Ae-=Dt;break;default:Ae+=Dt}tt++}E.push(new cn(0,De,ee+re,Ze)),cn.free(le);break;case Hp:for(ae=ee,ce=z,fe=y,Se=x,ee=cn.alloc(),we=Math.max(this.cellSize.width,1),z=De=le=0,re=st.alloc(),Ae=0;Ae=le&&(ae-=le),le=gt=0,Dt=Math.max(this.cellSize.height,1),xt=z=0,qt=!0,tt=st.alloc(),zi=0;zice-1||0ae){for(E.push(new cn(0,qt?ht-z:ht,ae+fe,xt+z+Se)),cr=0;crle&&(z.width+=z.x-le,z.x=le);cn.free(ee)}for(re=z=ee=b=0;rey?1:0}un.Object.defineProperties(xu.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0fe)){var De=fe+Cp(Ae);Ae.pc(De,!0),E0(Ae,De,fe)}}y.isModified=!0}}finally{y.aa=!0}}}}},ss.prototype.updateAllTargetBindings=function(a){a===void 0&&(a="");for(var y=this.parts.iterator;y.next();)y.value.La(a);for(y=this.nodes.iterator;y.next();)y.value.La(a);for(y=this.links.iterator;y.next();)y.value.La(a)},ss.prototype.rp=function(){for(var a=this.H.model,y=new Cn,x=a.nodeDataArray,E=0;E=E)return"[]";var b=new Va;b.add("["),x&&1E)return;aa(a.Tc,E)}zl(a,"nodeDataArray",Zs,"nodeDataArray",a,y,null,E,null),a.qp(y)}Ee.nA=function(a){if(or(a))for(var y=a.length,x=0;xy&&(y=a.length),Na(a,y,x),zl(this,"",Ms,"",a,null,x,null,y)},Ee.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&$t("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];aa(a,y),zl(this,"",Zs,"",a,x,null,y,null)},Ee.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Ll(a,y),y===void 0))return"";if(typeof y=="string")return y;$t("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ee.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Ll(a,x);E===void 0&&(E=""),E!==y&&(Qs(a,x,y),zl(this,"nodeCategory",As,x,a,E,y))}else Qs(a,x,y)}},Ee.lm=function(a,y){this.jm(y,this.Ro(a))},Ee.Tl=function(){return!1},Ee.Wj=function(){return!1},Ee.ri=function(){return!1},Ee.xs=function(){return!1},Ee.Xj=function(){return!1};function gy(){return new yr}function Kp(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return Kp(a,y.constructor);return typeof y}function py(a){return Mh[a]?Mh[a]:Ut.go!==void 0&&Ut.go[a]?Ut.go[a]:null}function Ll(a,y){if(!a||!y)return null;try{if(typeof y=="function")var x=y(a);else typeof a.getAttribute=="function"?(x=a.getAttribute(y),x===null&&(x=void 0)):x=a[y]}catch(E){}return x}function Qs(a,y,x){if(a&&y)try{typeof y=="function"?y(a,x):typeof a.setAttribute=="function"?a.setAttribute(y,x):a[y]=x}catch(E){}}un.Object.defineProperties(yr.prototype,{name:{get:function(){return this.xa},set:function(a){var y=this.xa;y!==a&&(this.xa=a,this.g("name",y,a))}},dataFormat:{get:function(){return this.Sm},set:function(a){var y=this.Sm;y!==a&&(this.Sm=a,this.g("dataFormat",y,a))}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},modelData:{get:function(){return this.j},set:function(a){var y=this.j;y!==a&&(this.j=a,this.g("modelData",y,a),this.La(a))}},undoManager:{get:function(){return this.o},set:function(a){var y=this.o;y!==a&&(y!==null&&y.Rx(this),this.o=a,a!==null&&a.Xw(this))}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a}},nodeKeyProperty:{get:function(){return this.Th},set:function(a){var y=this.Th;y!==a&&(a===""&&$t("Model.nodeKeyProperty may not be the empty string"),0"+Zc(this,b,!1)}return y},Ee.Qv=function(a,y){this.linkKeyProperty===""&&$t("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=yr.prototype.Qv.call(this,a,y),E=this,b=new Cn,z=new Cn,ee=new Cn,re=this.vh;a.changes.each(function(ce){ce.model===E&&(ce.modelChange==="linkDataArray"?ce.change===Ms?b.add(ce.newValue):ce.change===Zs&&ee.add(ce.oldValue):E.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(fe){E.Jc(fe)&&z.add(fe)}):ce.object instanceof yr||E.lb(ce.object)||T1(E,ce.object).each(function(fe){z.add(fe)})))});var ae=this.il;ae.clear(),b.each(function(ce){ae.add(E.Ac(ce)),y||z.add(ce)});var le=this.kl;return le.clear(),ee.each(function(ce){le.add(E.Ac(ce)),y&&z.add(ce)}),a=E.cloneDeep(z.Fa()),0E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===Zs){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Sn(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}yr.prototype.changeState.call(this,a,y)}},Ee=Ta.prototype,Ee.Vl=function(a){if(a!==void 0){var y=this.Ri;if(y!==null){var x=this.hc(a);x===null&&(x=this.copyNodeData(y),Qs(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ee.yx=function(a){return Zc(this,a,!0)},Ee.wv=function(a,y){qg(this,a,y,!0)},Ee.Bx=function(a){return Zc(this,a,!1)},Ee.Bv=function(a,y){qg(this,a,y,!1)};function Zc(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Ll(y,a),a!==void 0))){if(Af(a))return a;$t((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function qg(a,y,x,E){if(x===null&&(x=void 0),y!==null){var b=E?a.lf:a.mf;if(b!=="")if(x=a.Vl(x),a.Jc(y)){var z=Ll(y,b);z!==x&&(Wh(a,z,y),Qs(y,b,x),a.hc(x)===null&&zh(a,x,y),zl(a,E?"linkFromKey":"linkToKey",As,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Qs(y,b,x)}}Ee.zx=function(a){return vv(this,a,!0)},Ee.xv=function(a,y){$g(this,a,y,!0)},Ee.Cx=function(a){return vv(this,a,!1)},Ee.Cv=function(a,y){$g(this,a,y,!1)};function vv(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Ll(y,a),y===void 0?"":y)}function $g(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Ll(y,b);z===void 0&&(z=""),z!==x&&(Qs(y,b,x),zl(a,E?"linkFromPortId":"linkToPortId",As,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Qs(y,b,x)}}Ee.Ef=function(a){if(a===null)return yv;var y=this.je;return y===""?yv:(a=Ll(a,y),a===void 0?yv:a)},Ee.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Ll(a,x);if(E===void 0&&(E=yv),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;zb||(E.splice(b,1),this.Jc(a)&&(Wh(this,y,a),zl(this,"linkLabelKeys",Zs,x,a,y,null,b,null)))}else E!==void 0&&$t(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ee.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Ll(a,y),y!==void 0)){if(Af(y))return y;$t("Key value for link data "+a+" is not a number or a string: "+y)}}},Ee.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Ll(a,x);E!==y&&this.jh(y)===null&&(Qs(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),zl(this,"linkKey",As,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Qs(a,x,y)}},Ee.jh=function(a){return a===null&&$t("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Af(a)?this.wb.I(a):null},Ee.Bs=function(a){if(a!==null){var y=this.Jh;if(y!==""){var x=this.Ac(a);if(x===void 0||this.wb.contains(x)){var E=this.cl;if(E!==null&&(x=E(this,a),x!=null&&!this.wb.contains(x))){Qs(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;Qs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Qs(a,y,x)}}}}},Ee.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ee.fi=function(a){a!==null&&(Ws(a),this.Jc(a)||B1(this,a,!0))};function B1(a,y,x){if(a.linkKeyProperty!==""){var E=a.Ac(y);if(E!==void 0&&a.wb.I(E)===y)return;a.Bs(y),E=a.Ac(y),E===void 0&&$t("GraphLinksModel.makeLinkDataKeyUnique failed on "+y+". Data not added to model."),a.wb.add(E,y)}a.$f.add(y),E=null,x&&(E=a.md.length,a.md.splice(E,0,y)),zl(a,"linkDataArray",Ms,"linkDataArray",a,null,y,null,E),my(a,y)}Ee.Ey=function(a){if(Array.isArray(a))for(var y=a.length,x=0;xE)return;a.md.splice(E,1)}if(zl(a,"linkDataArray",Zs,"linkDataArray",a,y,null,E,null),x=Zc(a,y,!0),Wh(a,x,y),x=Zc(a,y,!1),Wh(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z=a.count)a.count===1&&(a=a.first(),a.centerX=0,a.centerY=0);else{var y=new Wn;y.addAll(a.iterator),a=new Wn;var x=new Wn,E=this.sort(y),b,z,ee=this.Jp,re=this.arrangement,ae=this.nodeDiameterFormula,le=this.radius;(!isFinite(le)||0>=le)&&(le=NaN);var ce=this.aspectRatio;(!isFinite(ce)||0>=ce)&&(ce=1);var fe=this.startAngle;isFinite(fe)||(fe=0);var Se=this.sweepAngle;if((!isFinite(Se)||360Se)&&(Se=360),y=this.spacing,isFinite(y)||(y=NaN),re===kh&&ae===yg?re=Lh:re===kh&&ae!==yg&&(re=this.arrangement),(this.direction===eg||this.direction===ep)&&this.sorting!==tp){for(ae=0;!(ae>=E.length)&&(a.add(E.M(ae)),!(ae+1>=E.length));ae+=2)x.add(E.M(ae+1));this.direction===eg?(this.arrangement===kh&&a.reverse(),E=new Wn,E.addAll(a),E.addAll(x)):(this.arrangement===kh&&x.reverse(),E=new Wn,E.addAll(x),E.addAll(a))}ae=E.length;for(var we=z=b=0;weSe&&(we===0||we===E.length-1)&&(De/=2),b+=De,z++}if(isNaN(le)||re===kh){if(isNaN(y)&&(y=6),re!==Lh&&re!==kh){for(z=-1/0,ee=0;eele?(le=b,z=le*ce):ee=we/(360<=Se?ae:ae-1)}if(this.kw=re,this.lc=le,this.Zm=ce,this.lw=fe,this.Wp=Se,this.Ti=y,this.me=z,this.Jp=ee,y=E,E=this.kw,re=this.lc,le=this.lw,ce=this.Wp,fe=this.Ti,Se=this.me,ae=this.Jp,this.direction!==eg&&this.direction!==ep||E!==kh)if(this.direction===eg||this.direction===ep){switch(ee=0,E){case Mf:ee=180*xv(this,re,Se,le,ae)/Math.PI;break;case Lh:ae=y=0,ee=a.first(),ee!==null&&(y=kf(ee,Math.PI/2)),ee=x.first(),ee!==null&&(ae=kf(ee,Math.PI/2)),ee=180*xv(this,re,Se,le,fe+(y+ae)/2)/Math.PI;break;case af:ee=ce/y.length}if(this.direction===eg){switch(E){case Mf:Zp(this,a,le,Lf);break;case Lh:Yp(this,a,le,Lf);break;case af:Up(this,a,ce/2,le,Lf)}switch(E){case Mf:Zp(this,x,le+ee,cc);break;case Lh:Yp(this,x,le+ee,cc);break;case af:Up(this,x,ce/2,le+ee,cc)}}else{switch(E){case Mf:Zp(this,x,le,Lf);break;case Lh:Yp(this,x,le,Lf);break;case af:Up(this,x,ce/2,le,Lf)}switch(E){case Mf:Zp(this,a,le+ee,cc);break;case Lh:Yp(this,a,le+ee,cc);break;case af:Up(this,a,ce/2,le+ee,cc)}}}else switch(E){case Mf:Zp(this,y,le,this.direction);break;case Lh:Yp(this,y,le,this.direction);break;case af:Up(this,y,ce,le,this.direction);break;case kh:R1(this,y,ce,le,this.direction)}else R1(this,y,ce,le-ce/2,cc)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Up(a,y,x,E,b){var z=a.Wp,ee=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,ae=0;aex){for(z=E+(b===cc?z:-z);0>z;)z+=360;z%=360,180=ce.length-1));fe++)W1(a,ae,le,ce,fe,b,z)||H1(a,ae,le,ce,fe,b,z),ae=z.x,le=z.y;if(st.free(z),a.mj++,!(23Math.abs(we)?Math.abs(ae-z)<(ce[0].width+ce[ce.length-1].width)/2&&(ee=0):ee=0Math.abs(Se)?0:Se,ae=Math.abs(z)>Math.abs(fe)?0fe:0a.mj?a.lc-ee/(2*Math.PI):5>ce.length&&10=fe.length-1));Se++)W1(a,ae,le,fe,Se,b,ce)||H1(a,ae,le,fe,Se,b,ce),ae=ce.x,le=ce.y;if(st.free(ce),a.mj++,!(23a.mj?a.lc-z/(2*Math.PI):a.lc-(0re){if(z=y-a,z<-re)return ee.x=z,ee.y=le,!1;ce=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ee.x=z,ee.y=le,!1;ce=!0}return le=Math.sqrt(1-Math.min(1,z*z/(re*re)))*ae,0>x!==ce&&(le=-le),Math.abs(x-le)>(E[b].height+E[b+1].height)/2?(ee.x=z,ee.y=le,!1):(ee.x=z,ee.y=le,!0)}function H1(a,y,x,E,b,z,ee){var re=a.lc,ae=a.me,le=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===cc)){if(z=x-a,z<-ae){if(z=x+a,z>ae){ee.x=le,ee.y=z;return}E=!0}}else if(z=x+a,z>ae){if(z=x-a,z<-ae){ee.x=le,ee.y=z;return}E=!0}le=Math.sqrt(1-Math.min(1,z*z/(ae*ae)))*re,0>y!==E&&(le=-le),ee.x=le,ee.y=z}cl.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},cl.prototype.commitNodes=function(){var a=this.group!==null&&this.group.placeholder!==null&&this.group.isSubGraphExpanded,y=a?this.group.location.copy():null,x=this.actualCenter;a?x=new st(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},cl.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function vy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ee=0,re=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),ae=0,le=0;le<=z;le++){E!==void 0&&b!==void 0?ae=E+le*b/z:ae=le*Math.PI/(2*z);var ce=Math.sin(ae);ee+=Math.sqrt(1-a*a*ce*ce)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ee:4*(y>x?y:x)*ee}function Sv(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?vy(a,1,x,E,b):vy(a,1,x))}function xv(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ee=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var re=0;;re++){var ae=Math.sin(E+re*a);if(ee+=(y>x?y:x)*Math.sqrt(1-z*z*ae*ae)*a,ee>=b)return re*a}}cl.prototype.sort=function(a){switch(this.sorting){case wv:break;case Pv:a.reverse();break;case Cv:a.sort(this.comparer);break;case Ev:a.sort(this.comparer),a.reverse();break;case tp:return this.ak(_x(a));default:$t("Invalid sorting type.")}return a};function _x(a){for(var y=[],x=0;xb&&(b=re,z=ee)}else for(ee=0;eeb&&(b=re,z=ee);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),ee=z.sourceEdges;ee.next();)b=a.indexOf(ee.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}cl.prototype.ak=function(a){for(var y=[],x=0;xy[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;xy[x[Ae]].indexOf(x[Ae===x.length-1?0:Ae+1])&&we.push(Ae===x.length-1?0:Ae+1);if(we.length===0)for(Ae=0;Aex.indexOf(qt)||Dtx.indexOf(qt)||Dt=De?Dt+1:Dt)),Ze+=Dt=De&&Dt++,gt>=De&>++,Dt>gt&&(xt=gt,gt=Dt,Dt=xt),gt-Dt<(x.length+2)/2==(Dtwe||we===ce||(Ae=we>ce?we-ce:ce-we,fe+=weee-Ae?1:-1);x.splice(0>fe?ce:ce+1,0,ae),E.splice(re,1),re--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y=a?this.ul=a:this.ul=360,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==kh&&a!==Lh&&a!==Mf&&a!==af||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==cc&&a!==Lf&&a!==eg&&a!==ep||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==wv&&a!==Pv&&a!==Cv&&!Ev&&a!==tp||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==bv&&a!==yg||(this.Nn=a,this.C())}},actualXRadius:{get:function(){return this.lc}},actualYRadius:{get:function(){return this.me}},actualSpacing:{get:function(){return this.Ti}},actualCenter:{get:function(){return this.Zv}}});var Lh=new ln(cl,"ConstantSpacing",0),Mf=new ln(cl,"ConstantDistance",1),af=new ln(cl,"ConstantAngle",2),kh=new ln(cl,"Packed",3),cc=new ln(cl,"Clockwise",4),Lf=new ln(cl,"Counterclockwise",5),eg=new ln(cl,"BidirectionalLeft",6),ep=new ln(cl,"BidirectionalRight",7),wv=new ln(cl,"Forwards",8),Pv=new ln(cl,"Reverse",9),Cv=new ln(cl,"Ascending",10),Ev=new ln(cl,"Descending",11),tp=new ln(cl,"Optimized",12),bv=new ln(cl,"Pythagorean",13),yg=new ln(cl,"Circular",14);cl.className="CircularLayout",cl.ConstantSpacing=Lh,cl.ConstantDistance=Mf,cl.ConstantAngle=af,cl.Packed=kh,cl.Clockwise=cc,cl.Counterclockwise=Lf,cl.BidirectionalLeft=eg,cl.BidirectionalRight=ep,cl.Forwards=wv,cl.Reverse=Pv,cl.Ascending=Cv,cl.Descending=Ev,cl.Optimized=tp,cl.Pythagorean=bv,cl.Circular=yg;function Xp(){this.Pl=-1/0,this.tm=this.mk=null}Xp.prototype.compare=function(a,y){if(0this.Pl||Math.abs(a)a&&0re?(b=Se.x+Se.width/2,z=Se.y+Se.height/2,le[0]=new st(Se.x+Se.width+E.width,Se.y),le[1]=new st(Se.x,Se.y+Se.height+E.height),re=2):(ae=V1(le,re,b,z,Se.width,Se.height,E),fe=le[ae],we=new st(fe.x+Se.width+E.width,fe.y),Se=new st(fe.x,fe.y+Se.height+E.height),ae+1this.network.vertexes.count)return!1;for(var a=0,y=0,x=this.network.vertexes.first().bounds,E=this.network.vertexes.iterator;E.next();){if(E.value.bounds.Yc(x)&&(a++,2a.network.vertexes.count)return!1;for(a.ah=a.network.vertexes.Fa(),a=a.ah,a.sort(function(x,E){return x===null||E===null||x===E?0:E.Vd-x.Vd}),y=a.length-1;0<=y&&1>=a[y].Vd;)y--;return 1=ee))){for(var le=re=0,ce=ae.count-ee;cewe&&(we=1),re=Ot.sqrt((re+we+le*le*4/(ee*ee))/we),ee=(re-1)*ce/2,re=(re-1)*fe/2,b.bounds=new cn(z-Se.x-ee,ae-Se.y-re,ce+2*ee,fe+2*re),b.focus=new st(Se.x+ee,Se.y+re)}}return a.network=E,x}function Gx(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,ee=b.Tv;E.bounds=new cn(E.centerX-z,E.centerY-ee,b.Ss,b.Qs),E.focus=new st(z,ee),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Ux(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,ee=y.height;y.We!==null&&0=fe.Vd?ae++:(re=!0,le++,ee+=Math.atan2(y.centerY-fe.centerY,y.centerX-fe.centerX))}if(ae!==0){for(0>1)+le)*(re%2===0?1:-1),ae.centerX=E+ce*Math.cos(fe),ae.centerY=b+ce*Math.sin(fe),re++}}}}function V1(a,y,x,E,b,z,ee){var re=9e19,ae=-1,le=0;e:for(;lece.y&&a[Se].x-ce.xce.x&&a[Se].y-ce.yy+z?(x=E+b-ee,a=a-y-z,Ot.sqrt(x*x+a*a)):a+xee+re?a>y+z?(x=E-ee-re,a=a-y-z,Ot.sqrt(x*x+a*a)):a+xy+z?a-(y+z):a+x=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,ee=1;eez-x)?y.sort(function(De,tt){return De===null||tt===null||De===tt?0:De.centerX-tt.centerX}):y.sort(function(De,tt){return De===null||tt===null||De===tt?0:De.centerY-tt.centerY}),x=a.Zf;var le=E=re=0;for(z=0;zx||le-ae>x){if(b)break}else if(ce-we>x||we-ce>x){if(!b)break}else{var Ae=K1(ee,Se);1>Ae?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new Mv),Ae=E.random(),re=E.random(),ae>le?(E=Math.abs(Se.bounds.right-ee.bounds.x),E=(1+E)*Ae):aewe?(le=Math.abs(Se.bounds.bottom-ee.bounds.y),le=(1+le)*re):aefe?(fe=a.randomNumberGenerator,fe===null&&(a.randomNumberGenerator=fe=new Mv),re=fe.random(),fe=fe.random(),E=(E>ae?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,le=(ee>ce?1:-1)*(1+(z.height>x.height?z.height:x.height))*fe):(re=re.stiffness*(fe-re.length),E=(ae-E)/fe*re,le=(ce-ee)/fe*re),x.forceX+=E,x.forceY+=le,z.forceX-=E,z.forceY-=le;for(b=E=0;ba.epsilonDistance*a.epsilonDistance}Tu.prototype.moveVertex=function(a){var y=a.forceX,x=a.forceY,E=this.moveLimit;return y<-E?y=-E:y>E&&(y=E),x<-E?x=-E:x>E&&(x=E),a.centerX+=y,a.centerY+=x,y*y+x*x},Tu.prototype.moveFixedVertex=function(){},Tu.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Tu.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=ml,y.toSpot=ml)}},Tu.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=cn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,cn.free(x)}x=cn.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}cn.free(x)},Tu.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Tu.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Tu.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Tu.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Tu.prototype.electricalFieldX=function(){return 0},Tu.prototype.electricalFieldY=function(){return 0},Tu.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Tu.prototype.gravitationalFieldX=function(){return 0},Tu.prototype.gravitationalFieldY=function(){return 0},Tu.prototype.isFixed=function(a){return a.isFixed},un.Object.defineProperties(Tu.prototype,{currentIteration:{get:function(){return this.An}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},arrangesToOrigin:{get:function(){return this.Bm},set:function(a){this.Bm!==a&&(this.Bm=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},maxIterations:{get:function(){return this.dl},set:function(a){this.dl!==a&&0<=a&&(this.dl=a,this.C())}},epsilonDistance:{get:function(){return this.$m},set:function(a){this.$m!==a&&0De&&0De&&0a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]ee)for(var ce=ee+1;ceae;ce--)fe=E[ce],fe.near===le&&fe.Dj===le.Dj||re++;var Se;if(0<=x)for(ae=E[ee].sourceEdgesArrayAccess,le=0;leDe||fe===De&&we>Ae)&&re++,ttfe||De===fe&&Ae>we)&&re++}}}if(0>=x){for(ae=E[ee].destinationEdgesArrayAccess,le=0;leDe||fe===De&&ce>tt)&&re++,Aefe||De===fe&&tt>ce)&&re++)}for(z[ee*b+ee]=re,ae=ee+1;ae=x){for(re=E[ee].destinationEdgesArrayAccess,gt=E[ae].destinationEdgesArrayAccess,le=0;le=x&&(ae=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ce=0,fe=0,Se=re.near;if(Se!==null&&Se.layer===re.layer&&(ce+=Se.column-1,fe++),ae!==null)for(Se=0;Se=x&&(ae=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var ce=0,fe=[],Se=re.near;if(Se!==null&&Se.layer===re.layer&&(fe[ce]=Se.column-1,ce++),re=void 0,ae!==null)for(Se=0;Se>1,z[ee]=ce&1?fe[le]:fe[le-1]+fe[le]>>1)}return Nf(a,y,E),z}function $p(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ee=y.destinationEdges;ee.next();){var re=ee.value,ae=re.toVertex,le=y.layer-ae.layer;re=a.linkMinLength(re),le===re&&$p(a,ae,x,E,b,z)}if(z)for(ee=y.sourceEdges;ee.next();)re=ee.value,ae=re.fromVertex,le=ae.layer-y.layer,re=a.linkMinLength(re),le===re&&$p(a,ae,x,E,b,z)}}function xy(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ee=y.destinationEdges;ee.next();)xy(a,ee.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)xy(a,y.value.fromVertex,x,E,b,z)}}ls.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Cy:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;Zx(a)!==null;){for(b=X1(a);b!==null;)E[x]=b,x--,b.valid=!1,b=X1(a);for(b=J1(a);b!==null;)E[y]=b,y++,b.valid=!1,b=J1(a);b=null;for(var z=0,ee=this.network.vertexes.iterator;ee.next();){var re=ee.value;if(re.valid){for(var ae=0,le=re.destinationEdges;le.next();)le.value.toVertex.valid&&ae++;le=0;for(var ce=re.sourceEdges;ce.next();)ce.value.fromVertex.valid&&le++;(b===null||zy.toVertex.index&&(a.gm(y),y.rev=!0);break;case Dv:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&wy(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&wy(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.LlE){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;xee&&$p(a,re,0,-1,!0,!1)}for($p(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,re=0,ae=null,ee=a.network.vertexes.iterator;ee.next();){var le=ee.value;if(le.component===1){var ce=0,fe=!1,Se=le.sourceEdgesArrayAccess;b=Se.length;for(var we=0;wez)&&!ce&&(re=ee,z=le)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else re.component=0}}}function tx(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}ls.prototype.initializeIndices=function(){switch(this.Qk){default:case My:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case Bv:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&nx(this,x);break;case Ay:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&ix(this,x)}};function nx(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;Ez.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;xz.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x=ee;E--)z=gh(this,E,-1)||z;for(b=this.countCrossings(),b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=gh(this,E,1)||z;for(b=this.countCrossings(),b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=gh(this,E,1)||z;for(b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=gh(this,E,-1)||z;for(b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=gh(this,E,0)||z;for(b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=gh(this,E,0)||z;b>=a?ih(this,y):(a=b,y=Pc(this))}break;default:case Ov:for(x=this.Ia,ee=0,re=a+1;(E=this.countCrossings())=ee;E--)z=gh(this,E,-1)||z;for(b=this.countCrossings(),b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=gh(this,E,1)||z;for(b=this.countCrossings(),b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=gh(this,E,1)||z;for(b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=gh(this,E,-1)||z;for(b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=gh(this,E,0)||z;for(b>=a?ih(this,y):(a=b,y=Pc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=gh(this,E,0)||z;b>=a?ih(this,y):(a=b,y=Pc(this))}}ih(this,y)};function kv(a,y,x){var E=Ff(a,y),b=a.tc[y],z=Z1(a,y,x),ee=Sy(a,y,x);for(x=0;xz+1&&(Se+=4*(ht-z),we+=4*(ht-(z+1)))}for(xt=E[z].destinationEdges.iterator,xt.reset();xt.next();)if(ht=xt.value,gt=ht.toVertex,ht.valid&>.layer===y){for(ht=0;E[ht]!==gt;)ht++;ht===z+1&&(we+=1)}for(xt=E[z+1].sourceEdges.iterator,xt.reset();xt.next();)if(ht=xt.value,gt=ht.fromVertex,ht.valid&>.layer===y){for(ht=0;E[ht]!==gt;)ht++;htz+1&&(Se+=4*(ht-(z+1)),we+=4*(ht-z))}for(xt=E[z+1].destinationEdges.iterator,xt.reset();xt.next();)if(ht=xt.value,gt=ht.toVertex,ht.valid&>.layer===y){for(ht=0;E[ht]!==gt;)ht++;ht===z&&(Se+=1)}ht=gt=0,xt=ee[E[z].index];var Dt=re[E[z].index],qt=ee[E[z+1].index],zi=re[E[z+1].index];xt!==-1&&(gt+=Math.abs(xt-Ae),ht+=Math.abs(xt-Ze)),Dt!==-1&&(gt+=Math.abs(Dt-Ae),ht+=Math.abs(Dt-Ze)),qt!==-1&&(gt+=Math.abs(qt-De),ht+=Math.abs(qt-tt)),zi!==-1&&(gt+=Math.abs(zi-De),ht+=Math.abs(zi-tt)),(we>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=ip(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=ip(this,y,-1)||x;x=ip(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Py(this,y,1);for(y=this.Md-1;0<=y;y--)Py(this,y,-1);Py(this,this.Md,0)}if(a&&(rx(this,-1),rx(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=ip(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=ip(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=ip(this,y,0)||x}}else qx(this)};function ip(a,y,x){for(var E=!1;Xx(a,y,x);)E=!0;return E}function Xx(a,y,x){var E,b=Ff(a,y),z=a.tc[y],ee=Sy(a,y,-1);if(0x)for(E=0;EE-1||ce-b[E-1].column-1>fe+a.nodeMinColumnSpace(b[E-1],!1)?we=ce-1:we=ce,fe=E+1>=z||b[E+1].column-ce-1>Se+a.nodeMinColumnSpace(b[E+1],!0)?ce+1:ce;var Ae=Se=0,De=0;if(0>=x)for(var tt=b[E].sourceEdges.iterator;tt.next();){var Ze=tt.value,ht=Ze.fromVertex;if(Ze.valid&&ht.layer!==y){var gt=yy(Ze),xt=Ze.portFromColOffset;Ze=Ze.portToColOffset,ht=ht.column,Se+=(Math.abs(ce+Ze-(ht+xt))+1)*gt,Ae+=(Math.abs(we+Ze-(ht+xt))+1)*gt,De+=(Math.abs(fe+Ze-(ht+xt))+1)*gt}}if(0<=x)for(tt=b[E].destinationEdges.iterator;tt.next();)Ze=tt.value,ht=Ze.toVertex,Ze.valid&&ht.layer!==y&&(gt=yy(Ze),xt=Ze.portFromColOffset,Ze=Ze.portToColOffset,ht=ht.column,Se+=(Math.abs(ce+xt-(ht+Ze))+1)*gt,Ae+=(Math.abs(we+xt-(ht+Ze))+1)*gt,De+=(Math.abs(fe+xt-(ht+Ze))+1)*gt);Ze=xt=gt=0,tt=ee[b[E].index],ht=re[b[E].index],tt!==-1&&(gt+=Math.abs(tt-ce),xt+=Math.abs(tt-we),Ze+=Math.abs(tt-fe)),ht!==-1&&(gt+=Math.abs(ht-ce),xt+=Math.abs(ht-we),Ze+=Math.abs(ht-fe)),Ae=ee[x]?ce=ae:le<=ee[x]&&(ce=le));ce!==re&&(z=!0,E[x].column=ce)}Nf(a,y,E),a.normalize()}function Jx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),ee=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+ee>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Qx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var ee=a.network.vertexes.iterator;ee.next();){E=ee.value;var re=E.column-a.nodeMinColumnSpace(E,!0),ae=E.column+a.nodeMinColumnSpace(E,!1);re<=y&&ae>=y&&(b[E.layer]=!0),re<=x&&ae>=x&&(z[E.layer]=!0)}for(re=!0,x=!1,E=0;E<=a.Ia;E++)re=re&&!(b[E]&&z[E]);if(re)for(ee.reset();ee.next();)a=ee.value,a.column>y&&(--a.column,x=!0);return x}function rx(a,y){for(var x=0;x<=a.Ra;x++)for(;Jx(a,x););for(a.normalize(),x=0;xz?ih(a,b):eey)for(x=a.Ra;0<=x;x--)for(b=Pc(a),z=Lv(a),E=z+1;zz?ih(a,b):eex)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(xy(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;zx)for(ee=a.Ra;0x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function qx(a){for(var y=ur(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new Cn,$x(y,x);var z=null,ee=null,re=null,ae=null,le=(a.ve&1)!==0,ce=(a.ve&2)!==0,fe=(a.ve&4)!==0,Se=(a.ve&8)!==0;for(le&&(a.verticalAlignment(y,x,!0),z=Fv(a,y,!0,!1)),y.reverse(),fe&&(a.verticalAlignment(y,x,!1),re=Fv(a,y,!1,!1)),E=hn(y),b=E.next();!b.done;b=E.next())b.value.reverse();Se&&(a.verticalAlignment(y,x,!1),ae=Fv(a,y,!1,!0)),y.reverse(),ce&&(a.verticalAlignment(y,x,!0),ee=Fv(a,y,!0,!0)),Nr(y),a.u(z,ee,re,ae),a.network.vertexes.each(function(we){var Ae=ur();le&&Ae.push(z.get(we)),ce&&Ae.push(ee.get(we)),fe&&Ae.push(re.get(we)),Se&&Ae.push(ae.get(we)),Ae.sort(function(tt,Ze){return tt-Ze});var De=Ae.length;De=(Ae[Math.floor((De-1)/2)]+Ae[Math.ceil((De-1)/2)])/2,Nr(Ae),we.zc=De})}function $x(a,y){for(var x=a.length,E=1;Ece)&&y.add(fe);z++}b=ce}}}ls.prototype.verticalAlignment=function(a,y,x){ew(a),a=hn(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=hn(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var ee=x?Fy(z):iw(z),re=ee.length;if(0=y[x].length)&&(ee=y[x][0],ee.sd===ee)){ee.sd.shift===1/0&&(ee.sd.shift=0),ee=x,re=0;do{for(z=y[ee][re];z.align!==z.root;)z=z.align,ee++,0a&&$t("Could not determine previous vertex in layer"),y[x][a-1]}ls.prototype.u=function(a){for(var y=[],x=0;xee;ee++)if(y[ee]){var re=tw(this,y[ee],E,b,ee);reee;z={delta:z.delta},ee++)y[ee]&&(z.delta=ee===0||ee===2?E[x]-E[ee]:b[x]-b[ee],z.delta!==0&&y[ee].each(function(ae){return function(le){le.value+=ae.delta}}(z)));Nr(E),Nr(b)};function tw(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,ee=-1/0;return y.each(function(re){var ae=re.key;re=re.value,ae=a.K===90||a.K===270?ae.width:ae.height,reee&&(ee=re+ae)}),x[b]=z,E[b]=ee,ee-z}ls.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Nv(this,!0),y=Nv(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function Nv(a,y){return a.K===270?y?tu:Ts:a.K===90?y?Ts:tu:a.K===180?y?Vl:xl:y?xl:Vl}ls.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0=fe.bounds.bottom?(fe=fe.bounds.y+fe.bounds.height,y.m(De++,xt,fe+qt),y.m(De++,xt,fe),y.m(De++,xt,fe-gt)):(y.m(De++,xt,Dt+qt),y.m(De++,xt,Dt),y.m(De++,xt,Dt-gt)):this.K===270?Dt<=fe.bounds.y?(fe=fe.bounds.y,y.m(De++,xt,fe-gt),y.m(De++,xt,fe),y.m(De++,xt,fe+qt)):(y.m(De++,xt,Dt-gt),y.m(De++,xt,Dt),y.m(De++,xt,Dt+qt)):this.K===0&&(xt>=fe.bounds.right?(fe=fe.bounds.x+fe.bounds.width,y.m(De++,fe+qt,Dt),y.m(De++,fe,Dt),y.m(De++,fe-gt,Dt)):(y.m(De++,xt+qt,Dt),y.m(De++,xt,Dt),y.m(De++,xt-gt,Dt)));else{y.m(De++,Ze,ht);var zi=0;this.K===180||this.K===0?((this.K===180?xt>=fe.bounds.right:xt<=fe.bounds.x)&&(zi=(this.K===0?-gt:qt)/2),y.m(De++,Ze+zi,Dt)):((this.K===270?Dt>=fe.bounds.bottom:Dt<=fe.bounds.y)&&(zi=(this.K===90?-gt:qt)/2),y.m(De++,xt,ht+zi)),y.m(De++,xt,Dt)}}else gt=Math.max(10,this.he[tt.layer]),qt=Math.max(10,this.Ld[tt.layer]),Se?this.K===180?(y.m(De++,xt-gt-Ae,Dt),y.m(De++,Math.min(xt-gt+Ae/2,xt),Dt),y.m(De++,xt,Dt),y.m(De++,xt,Dt),y.m(De++,Math.max(xt+qt-Ae/2,xt),Dt),y.m(De++,xt+qt+Ae,Dt)):this.K===90?(y.m(De++,xt,Dt+qt+Ae),y.m(De++,xt,Math.max(Dt+qt-Ae/2,Dt)),y.m(De++,xt,Dt),y.m(De++,xt,Dt),y.m(De++,xt,Math.min(Dt-gt+Ae/2,Dt)),y.m(De++,xt,Dt-gt-Ae)):this.K===270?(y.m(De++,xt,Dt-gt-Ae),y.m(De++,xt,Math.min(Dt-gt+Ae/2,Dt)),y.m(De++,xt,Dt),y.m(De++,xt,Dt),y.m(De++,xt,Math.max(Dt+qt-Ae/2,Dt)),y.m(De++,xt,Dt+qt+Ae)):(y.m(De++,xt+qt+Ae,Dt),y.m(De++,Math.max(xt+qt-Ae/2,xt),Dt),y.m(De++,xt,Dt),y.m(De++,xt,Dt),y.m(De++,Math.min(xt-gt+Ae/2,xt),Dt),y.m(De++,xt-gt-Ae,Dt)):y.m(De++,xt,Dt)}fe=tt}(re===null||le!==hl||we)&&(Ze=y.i(De-1).x,ht=y.i(De-1).y,xt=y.i(De).x,Dt=y.i(De).y,we?(Ae=this.Ld[ce.layer],this.K===180||this.K===0?(we=ht,we>=ce.bounds.y&&we<=ce.bounds.bottom&&(this.K===180?xt>=ce.bounds.x:xt<=ce.bounds.right)&&(fe=ce.centerX+(this.K===180?-Ae:Ae),we=ce.bounds.x&&we<=ce.bounds.right&&(this.K===270?Dt>=ce.bounds.y:Dt<=ce.bounds.bottom)&&(fe=ce.centerY+(this.K===270?-Ae:Ae),we=ce.bounds.x?(fe=ce.bounds.x+ce.bounds.width,y.L(De-2,fe,ht),y.L(De-1,fe+qt,ht)):this.K===90&&Dt<=ce.bounds.bottom?(fe=ce.bounds.y,y.L(De-2,Ze,fe),y.L(De-1,Ze,fe-gt)):this.K===270&&Dt>=ce.bounds.y?(fe=ce.bounds.y+ce.bounds.height,y.L(De-2,Ze,fe),y.L(De-1,Ze,fe+qt)):this.K===0&&xt<=ce.bounds.right&&(fe=ce.bounds.x,y.L(De-2,fe,ht),y.L(De-1,fe-gt,ht))):(gt=Math.max(10,this.he[ce.layer]),qt=Math.max(10,this.Ld[ce.layer]),we=0,this.K===180||this.K===0?((this.K===180?xt<=ce.bounds.x:xt>=ce.bounds.right)&&(we=(this.K===0?qt:-gt)/2),y.m(De++,xt+we,ht)):((this.K===270?Dt<=ce.bounds.y:Dt>=ce.bounds.bottom)&&(we=(this.K===90?qt:-gt)/2),y.m(De++,Ze,Dt+we)),y.m(De++,xt,Dt)))}else{for(;ce!==null&&ce!==fe;){for(gt=tt=null,ce=ce.destinationEdges.iterator;ce.next()&&(Ze=ce.value,Ze.link!==x.link||(tt=Ze.toVertex,gt=Ze.fromVertex,gt.node!==null&&(gt=null),tt.node!==null)););if(tt===null)break;tt!==fe&&(Ze=y.i(De-1).x,ht=y.i(De-1).y,xt=tt.centerX,Dt=tt.centerY,we?this.K===180||this.K===0?(gt!==null?gt.centerY:ht)!==Dt&&(gt=this.Ta[tt.layer]+this.Rf.x,De===y.firstPickIndex+1&&(gt=this.K===0?Math.max(gt,Ze):Math.min(gt,Ze)),y.m(De++,gt,ht),y.m(De++,gt,Dt)):(gt!==null?gt.centerX:Ze)!==xt&&(gt=this.Ta[tt.layer]+this.Rf.y,De===y.firstPickIndex+1&&(gt=this.K===90?Math.max(gt,ht):Math.min(gt,ht)),y.m(De++,Ze,gt),y.m(De++,xt,gt)):(gt=Math.max(10,this.he[tt.layer]),qt=Math.max(10,this.Ld[tt.layer]),Se?this.K===180?(y.m(De++,xt+qt+Ae,Dt),y.m(De++,Math.max(xt+qt-Ae/2,xt),Dt),y.m(De++,xt,Dt),y.m(De++,xt,Dt),y.m(De++,Math.min(xt-gt+Ae/2,xt),Dt),y.m(De++,xt-gt-Ae,Dt)):this.K===90?(y.m(De++,xt,Dt-gt-Ae),y.m(De++,xt,Math.min(Dt-gt+Ae/2,Dt)),y.m(De++,xt,Dt),y.m(De++,xt,Dt),y.m(De++,xt,Math.max(Dt+qt-Ae/2,Dt)),y.m(De++,xt,Dt+qt+Ae)):this.K===270?(y.m(De++,xt,Dt+qt+Ae),y.m(De++,xt,Math.max(Dt+qt-Ae/2,Dt)),y.m(De++,xt,Dt),y.m(De++,xt,Dt),y.m(De++,xt,Math.min(Dt-gt+Ae/2,Dt)),y.m(De++,xt,Dt-gt-Ae)):(y.m(De++,xt-gt-Ae,Dt),y.m(De++,Math.min(xt-gt+Ae/2,xt),Dt),y.m(De++,xt,Dt),y.m(De++,xt,Dt),y.m(De++,Math.max(xt+qt-Ae/2,xt),Dt),y.m(De++,xt+qt+Ae,Dt)):this.K===180?(y.m(De++,xt+qt,Dt),y.m(De++,xt-gt,Dt)):this.K===90?(y.m(De++,xt,Dt-gt),y.m(De++,xt,Dt+qt)):this.K===270?(y.m(De++,xt,Dt+qt),y.m(De++,xt,Dt-gt)):(y.m(De++,xt-gt,Dt),y.m(De++,xt+qt,Dt)))),ce=tt}we&&(Ze=y.i(De-1).x,ht=y.i(De-1).y,xt=y.i(De).x,Dt=y.i(De).y,this.K===180||this.K===0?ht!==Dt&&(gt=this.K===0?Math.min(Math.max((xt+Ze)/2,this.Ta[fe.layer]+this.Rf.x),xt):Math.max(Math.min((xt+Ze)/2,this.Ta[fe.layer]+this.Rf.x),xt),y.m(De++,gt,ht),y.m(De++,gt,Dt)):Ze!==xt&&(gt=this.K===90?Math.min(Math.max((Dt+ht)/2,this.Ta[fe.layer]+this.Rf.y),Dt):Math.max(Math.min((Dt+ht)/2,this.Ta[fe.layer]+this.Rf.y),Dt),y.m(De++,Ze,gt),y.m(De++,xt,gt)))}E!==null&&Se&&4<=y.pointsCount&&(ee!==null&&(ee=le===hl?y.getLinkPointFromPoint(b,ee,ee.ga(Sa),y.i(3),!0):y.i(0),le===hl&&(le=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ee.x+le.x)/2,le.y),y.L(2,E.x,(le.y+E.y)/2)):(y.L(1,le.x,(ee.y+le.y)/2),y.L(2,(le.x+E.x)/2,E.y))),ee.w()||ee.set(b.actualBounds.center),y.L(0,ee.x,ee.y)),re!==null&&(b=ae===hl?y.getLinkPointFromPoint(z,re,re.ga(Sa),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ae===hl&&(re=y.i(y.pointsCount-3),ae=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+re.x)/2,re.y),y.L(y.pointsCount-2,ae.x,(re.y+ae.y)/2)):(y.L(y.pointsCount-2,re.x,(b.y+re.y)/2),y.L(y.pointsCount-3,(re.x+ae.x)/2,ae.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ls.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Wn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0z.y&&(ce=le.y>z.y?0:ee.xz.x&&(ce=le.x>z.x?0:ee.yy.layer?1:a.rdy.rd?1:a.Icy.Ic?1:0:0},Ee.Ux=function(a,y){return a instanceof Df&&y instanceof Df&&a!==y?a.firsty.first||a.jy.j||a.rdy.rd?1:a.Icy.Ic?1:0:0},Ee.Js=function(a,y){return a instanceof Df&&y instanceof Df&&a!==y?a.jcy.jc||a.jy.j||a.rdy.rd?1:a.Icy.Ic?1:0:0},Ee.B=function(a,y){return a-=y,-1a},Ee.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&$t("not in range 0 <= from < length: "+x),z===2)E=a[x],b=a[x+1],0=b)a.sort(y);else for(x=a.slice(0,E),x.sort(y),y=0;y=b)for(E=a.slice(x),E.sort(y),y=x;y=a.He.length){for(var E=[],b=0;ba&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var Dv=new ln(ls,"CycleDepthFirst",0),Cy=new ln(ls,"CycleGreedy",1),em=new ln(ls,"CycleFromLayers",2),Tv=new ln(ls,"LayerOptimalLinkLength",0),Ey=new ln(ls,"LayerLongestPathSink",1),by=new ln(ls,"LayerLongestPathSource",2),Bv=new ln(ls,"InitDepthFirstOut",0),Ay=new ln(ls,"InitDepthFirstIn",1),My=new ln(ls,"InitNaive",2),Ly=new ln(ls,"AggressiveNone",0),Ov=new ln(ls,"AggressiveLess",1),ky=new ln(ls,"AggressiveMore",2),nw=8;ls.className="LayeredDigraphLayout",ls.CycleDepthFirst=Dv,ls.CycleGreedy=Cy,ls.CycleFromLayers=em,ls.LayerOptimalLinkLength=Tv,ls.LayerLongestPathSink=Ey,ls.LayerLongestPathSource=by,ls.InitDepthFirstOut=Bv,ls.InitDepthFirstIn=Ay,ls.InitNaive=My,ls.AggressiveNone=Ly,ls.AggressiveLess=Ov,ls.AggressiveMore=ky,ls.PackNone=0,ls.PackExpand=1,ls.PackStraighten=2,ls.PackMedian=4,ls.PackAll=15,ls.AlignNone=0,ls.AlignUpperLeft=1,ls.AlignUpperRight=2,ls.AlignLowerLeft=4,ls.AlignLowerRight=8,ls.AlignAll=15;function Df(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Df.className="SegInfo";function rp(a){Fs.call(this,a)}Ft(rp,Fs),rp.prototype.createVertex=function(){return new rh(this)},rp.prototype.createEdge=function(){return new tm(this)},rp.className="LayeredDigraphNetwork";function rh(a){_l.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}Ft(rh,_l);function lx(a,y){return a.index-y.index}function Iv(a,y){if(!a.$n){for(var x=[],E=hn(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=hn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;$t("Unable to find destination edge to given vertex")}function Fy(a){if(!a.co){for(var y=[],x=hn(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(lx),a.co=y}return a.co}function iw(a){if(!a.ao){for(var y=[],x=hn(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(lx),a.ao=y}return a.ao}rh.prototype.Cl=function(a){_l.prototype.Cl.call(this,a),this.bo=this.co=null},rh.prototype.Kl=function(a){_l.prototype.Kl.call(this,a),this.bo=this.co=null},rh.prototype.zl=function(a){_l.prototype.zl.call(this,a),this.$n=this.ao=null},rh.prototype.Jl=function(a){_l.prototype.Jl.call(this,a),this.$n=this.ao=null},un.Object.defineProperties(rh.prototype,{layer:{get:function(){return this.Ig},set:function(a){this.Ig!==a&&(this.Ig=a)}},column:{get:function(){return this.Ag},set:function(a){this.Ag!==a&&(this.Ag=a)}},index:{get:function(){return this.Za},set:function(a){this.Za!==a&&(this.Za=a)}},component:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},near:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),rh.prototype.deleteDestinationEdge=rh.prototype.Jl,rh.prototype.addDestinationEdge=rh.prototype.zl,rh.prototype.deleteSourceEdge=rh.prototype.Kl,rh.prototype.addSourceEdge=rh.prototype.Cl,rh.className="LayeredDigraphVertex";function tm(a){Oc.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ft(tm,Oc),un.Object.defineProperties(tm.prototype,{fromVertex:{get:function(){return this.kd},set:function(a){this.kd!==a&&(this.kd=a)}},toVertex:{get:function(){return this.qd},set:function(a){this.qd!==a&&(this.qd=a)}},valid:{get:function(){return this.Ha},set:function(a){this.Ha!==a&&(this.Ha=a)}},rev:{get:function(){return this.ia},set:function(a){this.ia!==a&&(this.ia=a)}},forest:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}},portFromPos:{get:function(){return this.u},set:function(a){this.u!==a&&(this.u=a)}},portToPos:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},portFromColOffset:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},portToColOffset:{get:function(){return this.F},set:function(a){this.F!==a&&(this.F=a)}}}),tm.className="LayeredDigraphEdge";function ha(a){$s.call(this),this.Ub=new Cn,this.Wn=Wv,this.ud=wd,this.vo=_v,this.Bq=Hy,this.$v=[],this.td=!0,this.Rb=Vv,this.$d=new fn(10,10).freeze();var y=new Cg(this);this.W=new ph(y),this.Y=new ph(y),this.ru=[],a&&Object.assign(this,a)}Ft(ha,$s),ha.prototype.cloneProtected=function(a){$s.prototype.cloneProtected.call(this,a),a.Wn=this.Wn,a.vo=this.vo,a.Bq=this.Bq,a.td=this.td,a.Rb=this.Rb,a.$d.assign(this.$d),a.W.copyInheritedPropertiesFrom(this.W),a.Y.copyInheritedPropertiesFrom(this.Y)},ha.prototype.qb=function(a){a.classType===ha?a.name.indexOf("Alignment")===0?this.alignment=a:a.name.indexOf("Arrangement")===0?this.arrangement=a:a.name.indexOf("Compaction")===0?this.compaction=a:a.name.indexOf("Path")===0?this.path=a:a.name.indexOf("Sorting")===0?this.sorting=a:a.name.indexOf("Style")===0?this.treeStyle=a:$t("Unknown enum value: "+a):$s.prototype.qb.call(this,a)},ha.prototype.createNetwork=function(){return new Cg(this)},ha.prototype.makeNetwork=function(a){function y(E){if(E instanceof Ki)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof mi){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Et?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof Io?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},ha.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==Kv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Et&&(y=a),this.path===Wv&&y!==null?this.ud=y.isTreePathToChildren?wd:wg:this.ud=this.path===Wv?wd:this.path,0y.level)return!1;a.removeChild(x.parent,x)}return!0}ha.prototype.removeChild=function(a,y){if(a!==null&&y!==null){for(var x=a.children,E=0,b=0;bb?px(this,a,ee,xo,Ze,ht):mx(this,a,ee,xo,Ze,ht),xo=ht.x,Ze=ht.width,ht=ht.height;break;case lf:for(xt=0;xtfe&&(crru&&(xg(a,-ru,0,Bo,qa-1),zv(xt,-ru,0),zv(Dt,-ru,0),ru=0)}Ls.S.h(ru,tr),Ze=Math.max(Ze,qt),ht=Math.max(ht,gt+(gi===0?0:Ae)+Jl.height),cr=qt}else 0fe&&(trru&&(xg(a,0,-ru,Bo,qa-1),zv(xt,0,-ru),zv(Dt,0,-ru),ru=0)),Ls.S.h(cr,ru),ht=Math.max(ht,zi),Ze=Math.max(Ze,gt+(gi===0?0:Ae)+Jl.width),tr=zi;_n++}switch(0le&&(le=0),135De&&(De=0),ae===jd&&(re+=Se/2+a.focus.y),ee+=E+x):y?(a.comments===null?E>Ze&&(Ze=Oy(ae,E-Ze,0),ee=Ze.x,re=Ze.y,Ze=E,le=0):Ze=Ty(a,Ze,le),0>le&&(ee-=le,le=0),135ht&&(ht=Oy(ae,0,tt-ht),ee=ht.x,re=ht.y,ht=tt,De=0):ht=By(a,ht,De),0>De&&(re-=De,De=0),ee+=E+x),0b[0].x?b[2].assign(b[1]):b[1].assign(b[2])),b[3].yb[0].x?b[3].assign(b[2]):b[2].assign(b[3])),gi[0].h(le+E,0),gi[1].h(gi[0].x,tt),gi[2].yb[0].y?b[2].assign(b[1]):b[1].assign(b[2])),b[3].xb[0].y?b[3].assign(b[2]):b[2].assign(b[3])),gi[0].h(0,De+tt),gi[1].h(E,gi[0].y),gi[2].xE?px(a,y,b,_n,gt,xt):mx(a,y,b,_n,gt,xt),_n=xt.x,gt=xt.width,xt=xt.height;break;case lf:for(Se=0;SeSe&&(qtSe&&(zife&&(fe=0),135Ze&&(Ze=0)),y.la.h(fe,Ze),y.Da.h(gt,xt)}}ha.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function px(a,y,x,E,b,z){var ee=x.length;if(ee===0)return new cn(E,0,b,z);if(ee===1)return y=x[0],b=y.Da.width,z=y.Da.height,new cn(E,0,b,z);for(var re=y.nodeSpacing,ae=y.rowSpacing,le=Fh(y)===90,ce=0,fe=0,Se=0,we=0;wele&&(b-=le),z=Math.max(z,Math.max(we,Se)+a+ee.height),0>x.S.x&&(E=Rv(y,x.S.x,!1,E,re))):(x.S.h(b+a,E+re/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Ae,fe)+a+ee.width),Se=E+re/2-x.focus.y-x.la.y,z=Math.max(z,Se+ee.height),0>Se&&(z-=Se),0>x.S.y&&(E=Rv(y,x.S.y,!0,E,re)))),new cn(E,0,b,z)}function mx(a,y,x,E,b,z){var ee=x.length;if(ee===0)return new cn(E,0,b,z);if(ee===1)return x=x[0],b=x.Da.width,z=x.Da.height,new cn(E,0,b,z);for(var re=y.nodeSpacing,ae=y.rowSpacing,le=Fh(y)===270,ce=0,fe=0,Se=0,we=0;wefe&&(b-=fe),z=Math.max(z,Math.abs(Math.min(we,Se))+a+ce.height),0>ae.S.x&&(E=Rv(y,ae.S.x,!1,E,re))):(ae.S.h(-b-ce.width-a,E+re/2-ae.focus.y-ae.la.y),b=Math.max(b,Math.abs(Math.min(Ae,fe))+a+ce.width),Se=E+re/2-ae.focus.y-ae.la.y,z=Math.max(z,Se+ce.height),0>Se&&(z-=Se),0>ae.S.y&&(E=Rv(y,ae.S.y,!0,E,re)))),y=0;yy&&(y=x+a.width),0>x&&(y-=x),y;case Pd:return a.width>y?a.width:y;case Cd:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case sf:case Ed:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case lf:return a.width-a.focus.x+a.nodeSpacing/2+y;case jd:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function By(a,y,x){switch(a.alignment){case Pg:case ap:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Pd:return a.height>y?a.height:y;case Cd:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case sf:case Ed:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case lf:return a.height-a.focus.y+a.nodeSpacing/2+y;case jd:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Oy(a,y,x){switch(a){case ap:y/=2,x/=2;break;case Pg:y/=2,x/=2;break;case Pd:x=y=0;break;case Cd:break;default:$t("Unhandled alignment value "+a.toString())}return new st(y,x)}function tg(a,y,x,E,b,z){y=Oy(y,x,E),xg(a,y.x,y.y,b,z)}function xg(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function jv(a,y,x,E){var b=y.parent;switch(a.ud){case wd:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case wg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:$t("Unhandled path value "+a.ud.toString())}}function zv(a,y,x){for(var E=0;Efe.length||we===null||2>we.length))for(b=x=0;xle&&z.yz.y&&ley.length||x===null||2>x.length)E=null;else{for(ce=Ac(a,y.length+x.length),E=z=ae=0;zae;)le=x[z++],ce[E++].h(le.x+b,le.y);for(x=Ac(a,E),ae=0;aefe.length||z===null||2>z.length)b=null;else{for(ce=Ac(a,fe.length+z.length),b=le=x=0;xz;)ae=fe[x++],ce[b++].h(ae.x,ae.y);for(z=Ac(a,b),x=0;xfe.length||we===null||2>we.length))for(b=x=0;xae&&z.xz.x&&aey.length||x===null||2>x.length)E=null;else{for(ce=Ac(a,y.length+x.length),E=z=ae=0;zae;)le=x[z++],ce[E++].h(le.x,le.y+b);for(x=Ac(a,E),ae=0;aefe.length||z===null||2>z.length)b=null;else{for(ce=Ac(a,fe.length+z.length),b=le=x=0;xz;)ae=fe[x++],ce[b++].h(ae.x,ae.y);for(z=Ac(a,b),x=0;x=a?0:135>=a?90:225>=a?180:315>=a?270:0}ha.prototype.computeLayerSpacing=function(a){var y=Fh(a);y=y===90||y===270;var x=a.layerSpacing;if(0=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==Hv&&a!==am||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==op&&a!==im&&a!==rm&&!om||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==Hv&&a!==am||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var Wv=new ln(ha,"PathDefault",-1),wd=new ln(ha,"PathDestination",0),wg=new ln(ha,"PathSource",1),op=new ln(ha,"SortingForwards",10),im=new ln(ha,"SortingReverse",11),rm=new ln(ha,"SortingAscending",12),om=new ln(ha,"SortingDescending",13),ap=new ln(ha,"AlignmentCenterSubtrees",20),Pg=new ln(ha,"AlignmentCenterChildren",21),Pd=new ln(ha,"AlignmentStart",22),Cd=new ln(ha,"AlignmentEnd",23),sf=new ln(ha,"AlignmentBus",24),Ed=new ln(ha,"AlignmentBusBranching",25),lf=new ln(ha,"AlignmentTopLeftBus",26),jd=new ln(ha,"AlignmentBottomRightBus",27),Hv=new ln(ha,"CompactionNone",30),am=new ln(ha,"CompactionBlock",31),_v=new ln(ha,"StyleLayered",40),Ry=new ln(ha,"StyleLastParents",41),jy=new ln(ha,"StyleAlternating",42),zy=new ln(ha,"StyleRootOnly",43),Vv=new ln(ha,"ArrangementVertical",50),Wy=new ln(ha,"ArrangementHorizontal",51),Kv=new ln(ha,"ArrangementFixedRoots",52),Hy=new ln(ha,"LayerIndividual",60),_y=new ln(ha,"LayerSiblings",61),Gv=new ln(ha,"LayerUniform",62);ha.className="TreeLayout",ha.PathDefault=Wv,ha.PathDestination=wd,ha.PathSource=wg,ha.SortingForwards=op,ha.SortingReverse=im,ha.SortingAscending=rm,ha.SortingDescending=om,ha.AlignmentCenterSubtrees=ap,ha.AlignmentCenterChildren=Pg,ha.AlignmentStart=Pd,ha.AlignmentEnd=Cd,ha.AlignmentBus=sf,ha.AlignmentBusBranching=Ed,ha.AlignmentTopLeftBus=lf,ha.AlignmentBottomRightBus=jd,ha.CompactionNone=Hv,ha.CompactionBlock=am,ha.StyleLayered=_v,ha.StyleLastParents=Ry,ha.StyleAlternating=jy,ha.StyleRootOnly=zy,ha.ArrangementVertical=Vv,ha.ArrangementHorizontal=Wy,ha.ArrangementFixedRoots=Kv,ha.LayerIndividual=Hy,ha.LayerSiblings=_y,ha.LayerUniform=Gv;function Cg(a){Fs.call(this,a)}Ft(Cg,Fs),Cg.prototype.createVertex=function(){return new ph(this)},Cg.prototype.createEdge=function(){return new sp(this)},Cg.className="TreeNetwork";function ph(a){_l.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new st(0,0),this.Da=new fn(0,0),this.la=new st(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=op,this.hd=ly,this.Kb=0,this.Jb=Pg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=am,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=ml,this.wr=!0,this.Dp=ml}Ft(ph,_l),ph.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},un.Object.defineProperties(ph.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;xwe.y+x.rowIndent&&(z=Math.min(z,Math.max(fe.y,z-y.computeNodeIndent(x))))):x.alignment===Pd?(z=E.top+b.y,b.y===0&&fe.ywe.x+x.rowIndent&&(z=Math.min(z,Math.max(fe.x,z-y.computeNodeIndent(x))))):x.alignment===Pd?(z=E.left+b.x,b.x===0&&fe.xwe.y+x.rowIndent&&(z=Math.min(z,Math.max(fe.y,z-y.computeNodeIndent(x))))):x.alignment===Pd?(z=E.top+b.y,b.y===0&&fe.ywe.x+x.rowIndent&&(z=Math.min(z,Math.max(fe.x,z-y.computeNodeIndent(x))))):x.alignment===Pd?(z=E.left+b.x,b.x===0&&fe.x>>6)+pt(128|Ht&63):pt(224|Ht>>>12&15)+pt(128|Ht>>>6&63)+pt(128|Ht&63)}else{var Ht=65536+(Bt.charCodeAt(0)-55296)*1024+(Bt.charCodeAt(1)-56320);return pt(240|Ht>>>18&7)+pt(128|Ht>>>12&63)+pt(128|Ht>>>6&63)+pt(128|Ht&63)}},yt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Vt=function(Bt){return Bt.replace(yt,mt)},ct=function(Bt){var Ht=[0,2,1][Bt.length%3],Jn=Bt.charCodeAt(0)<<16|(Bt.length>1?Bt.charCodeAt(1):0)<<8|(Bt.length>2?Bt.charCodeAt(2):0),qn=[Re.charAt(Jn>>>18),Re.charAt(Jn>>>12&63),Ht>=2?"=":Re.charAt(Jn>>>6&63),Ht>=1?"=":Re.charAt(Jn&63)];return qn.join("")},We=wt.btoa&&typeof wt.btoa=="function"?function(Bt){return wt.btoa(Bt)}:function(Bt){if(Bt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Bt.replace(/[\s\S]{1,3}/g,ct)},Te=function(Bt){return We(Vt(String(Bt)))},ne=function(Bt){return Bt.replace(/[+\/]/g,function(Ht){return Ht=="+"?"-":"_"}).replace(/=/g,"")},te=function(Bt,Ht){return Ht?ne(Te(Bt)):Te(Bt)},ue=function(Bt){return te(Bt,!0)},se;wt.Uint8Array&&(se=function(Bt,Ht){for(var Jn="",qn=0,sn=Bt.length;qn>>18)+Re.charAt(Ne>>>12&63)+(typeof lt!="undefined"?Re.charAt(Ne>>>6&63):"=")+(typeof Ge!="undefined"?Re.charAt(Ne&63):"=")}return Ht?ne(Jn):Jn});var ge=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,me=function(Bt){switch(Bt.length){case 4:var Ht=(7&Bt.charCodeAt(0))<<18|(63&Bt.charCodeAt(1))<<12|(63&Bt.charCodeAt(2))<<6|63&Bt.charCodeAt(3),Jn=Ht-65536;return pt((Jn>>>10)+55296)+pt((Jn&1023)+56320);case 3:return pt((15&Bt.charCodeAt(0))<<12|(63&Bt.charCodeAt(1))<<6|63&Bt.charCodeAt(2));default:return pt((31&Bt.charCodeAt(0))<<6|63&Bt.charCodeAt(1))}},xe=function(Bt){return Bt.replace(ge,me)},Pe=function(Bt){var Ht=Bt.length,Jn=Ht%4,qn=(Ht>0?Je[Bt.charAt(0)]<<18:0)|(Ht>1?Je[Bt.charAt(1)]<<12:0)|(Ht>2?Je[Bt.charAt(2)]<<6:0)|(Ht>3?Je[Bt.charAt(3)]:0),sn=[pt(qn>>>16),pt(qn>>>8&255),pt(qn&255)];return sn.length-=[0,0,2,1][Jn],sn.join("")},Ke=wt.atob&&typeof wt.atob=="function"?function(Bt){return wt.atob(Bt)}:function(Bt){return Bt.replace(/\S{1,4}/g,Pe)},nt=function(Bt){return Ke(String(Bt).replace(/[^A-Za-z0-9\+\/]/g,""))},ft=function(Bt){return xe(Ke(Bt))},qe=function(Bt){return String(Bt).replace(/[-_]/g,function(Ht){return Ht=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},at=function(Bt){return ft(qe(Bt))},jt;wt.Uint8Array&&(jt=function(Bt){return Uint8Array.from(nt(qe(Bt)),function(Ht){return Ht.charCodeAt(0)})});var Mt=function(){var Bt=wt.Base64;return wt.Base64=Qt,Bt};if(wt.Base64={VERSION:Nt,atob:nt,btoa:We,fromBase64:at,toBase64:te,utob:Vt,encode:te,encodeURI:ue,btou:xe,decode:at,noConflict:Mt,fromUint8Array:se,toUint8Array:jt},typeof Object.defineProperty=="function"){var bt=function(Bt){return{value:Bt,enumerable:!1,writable:!0,configurable:!0}};wt.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",bt(function(){return at(this)})),Object.defineProperty(String.prototype,"toBase64",bt(function(Bt){return te(this,Bt)})),Object.defineProperty(String.prototype,"toBase64URI",bt(function(){return te(this,!0)}))}}return wt.Meteor&&(Base64=wt.Base64),Dn.exports?Dn.exports.Base64=wt.Base64:(ve=[],ot=function(){return wt.Base64}.apply(ei,ve),ot!==void 0&&(Dn.exports=ot)),{Base64:wt.Base64}})},15979:function(Dn,ei,be){"use strict";be.d(ei,{hP:function(){return Gt}});var ve=function(Xe,ke){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Me,He){Me.__proto__=He}||function(Me,He){for(var et in He)Object.prototype.hasOwnProperty.call(He,et)&&(Me[et]=He[et])})(Xe,ke)};function ot(Xe,ke){function Me(){this.constructor=Xe}ve(Xe,ke),Xe.prototype=ke===null?Object.create(ke):(Me.prototype=ke.prototype,new Me)}function wt(Xe,ke,Me,He){return new(Me||(Me=Promise))(function(et,Oe){function ut(An){try{jn(He.next(An))}catch(Pn){Oe(Pn)}}function Vn(An){try{jn(He.throw(An))}catch(Pn){Oe(Pn)}}function jn(An){var Pn;An.done?et(An.value):(Pn=An.value,Pn instanceof Me?Pn:new Me(function(si){si(Pn)})).then(ut,Vn)}jn((He=He.apply(Xe,ke||[])).next())})}function Qt(Xe,ke){var Me,He,et,Oe,ut={label:0,sent:function(){if(1&et[0])throw et[1];return et[1]},trys:[],ops:[]};return Oe={next:Vn(0),throw:Vn(1),return:Vn(2)},typeof Symbol=="function"&&(Oe[Symbol.iterator]=function(){return this}),Oe;function Vn(jn){return function(An){return function(Pn){if(Me)throw new TypeError("Generator is already executing.");for(;ut;)try{if(Me=1,He&&(et=2&Pn[0]?He.return:Pn[0]?He.throw||((et=He.return)&&et.call(He),0):He.next)&&!(et=et.call(He,Pn[1])).done)return et;switch(He=0,et&&(Pn=[2&Pn[0],et.value]),Pn[0]){case 0:case 1:et=Pn;break;case 4:return ut.label++,{value:Pn[1],done:!1};case 5:ut.label++,He=Pn[1],Pn=[0];continue;case 7:Pn=ut.ops.pop(),ut.trys.pop();continue;default:if(et=ut.trys,!((et=et.length>0&&et[et.length-1])||Pn[0]!==6&&Pn[0]!==2)){ut=0;continue}if(Pn[0]===3&&(!et||Pn[1]>et[0]&&Pn[1]',"select"),this.addActionButton(He,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(He,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(He,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(He,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(He,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(He,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(He,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Oe){var ut=document.createElement("div");ut.className=""+Me.toolbarButtonStyleClass.name,ut.setAttribute("data-type-name",Oe.typeName),ut.innerHTML=Oe.icon,ut.addEventListener("click",function(){Me.markerToolbarButtonClicked(ut,Oe)}),Me.buttons.push(ut),Me.markerButtons.push(ut)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var et=document.createElement("div");et.className=this.toolbarBlockStyleClass.name,et.style.whiteSpace="nowrap",et.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(et),this.addActionButton(et,'',"render"),this.addActionButton(et,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Xe.prototype.addButtonClickListener=function(ke){this.buttonClickListeners.push(ke)},Xe.prototype.removeButtonClickListener=function(ke){this.buttonClickListeners.indexOf(ke)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(ke),1)},Xe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Xe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var ke=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Me=0;Me0&&this.buttonClickListeners.forEach(function(He){return He("marker",Me)}),this.markerButtonOverflowBlock.style.display="none"},Xe.prototype.actionToolbarButtonClicked=function(ke,Me){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(He){return He("action",Me)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Xe.prototype.setActiveButton=function(ke){this.resetButtonStyles(),ke.className=ke.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),ke.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Xe.prototype.setActiveMarkerButton=function(ke){var Me=this.markerButtons.find(function(He){return He.getAttribute("data-type-name")===ke});Me&&this.setActiveButton(Me)},Xe.prototype.setCurrentMarker=function(ke){var Me=this;this.currentMarker=ke,this.buttons.filter(function(He){return/delete|notes/.test(He.getAttribute("data-action"))}).forEach(function(He){Me.currentMarker===void 0?(He.style.fillOpacity="0.4",He.style.pointerEvents="none"):(He.style.fillOpacity="1",He.style.pointerEvents="all")})},Xe}(),Te=function(){function Xe(ke,Me,He,et){this.panels=[],this.panelButtons=[],this.markerjsContainer=ke,this.displayMode=Me,this.uiStyleSettings=He,this.styles=et,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Xe.prototype.addStyles=function(){var ke;this.toolboxStyleClass=this.styles.addClass(new ct("toolbox",` width: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: sans-serif; `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+` box-sizing: content-box; `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+` `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` overflow: hidden; `)),this.toolboxStyleColorsClass=this.styles.addClass(new ct("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var Me=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ct("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ct("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ct("toolbox-panel-row",` display: flex; `+(this.displayMode==="inline"?"position: absolute;":"")+` `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+` cursor: default; height: `+1.5*this.uiStyleSettings.toolbarHeight+`px; `+(this.displayMode==="inline"?"width: 100%;":"")+` box-sizing: content-box; `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ct("toolbox-panel-row_colors",` background-color: `+((ke=this.uiStyleSettings.toolboxBackgroundColor)!==null&&ke!==void 0?ke:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new ct("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*Me)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*Me)+`px; padding: `+Me+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ct("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ct("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Vt("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Vt("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},Xe.prototype.show=function(ke){var Me;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=ke,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Me=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Me!==void 0?Me:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Xe.prototype.setPanelButtons=function(ke){var Me,He,et=this;this.panels=ke,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Me=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Me!==void 0?Me:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((He=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&He!==void 0?He:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Oe){var ut;Oe.uiStyleSettings=et.uiStyleSettings;var Vn=document.createElement("div");Vn.className=et.toolboxButtonStyleClass.name+" "+((ut=et.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ut!==void 0?ut:et.toolboxButtonStyleColorsClass.name),Vn.innerHTML=Oe.icon,Vn.title=Oe.title,Vn.addEventListener("click",function(){et.panelButtonClick(Oe)}),et.panelButtons.push(Vn),et.buttonRow.appendChild(Vn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Xe.prototype.panelButtonClick=function(ke){var Me=this,He=-1;if(ke!==this.activePanel){He=this.panels.indexOf(ke),this.panelRow.innerHTML="";var et=ke.getUi();et.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(et),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=ke}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Me.displayMode==="inline"?Me.panelRow.style.display="none":Me.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Oe,ut){var Vn,jn;Oe.className=Me.toolboxButtonStyleClass.name+" "+(ut===He?""+((Vn=Me.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Vn!==void 0?Vn:Me.toolboxActiveButtonStyleColorsClass.name):""+((jn=Me.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&jn!==void 0?jn:Me.toolboxButtonStyleColorsClass.name))})},Xe}(),ne=function(Xe,ke){this.title=Xe,this.icon=ke},te=function(Xe){function ke(Me,He,et,Oe){var ut=Xe.call(this,Me,Oe||'')||this;return ut.colors=[],ut.addTransparent=!1,ut.colorBoxes=[],ut.colors=He,ut.currentColor=et,ut.setCurrentColor=ut.setCurrentColor.bind(ut),ut.getColorBox=ut.getColorBox.bind(ut),ut}return ot(ke,Xe),ke.prototype.getUi=function(){var Me=this,He=document.createElement("div");return He.style.overflow="hidden",He.style.whiteSpace="nowrap",this.colors.forEach(function(et){var Oe=Me.getColorBox(et);He.appendChild(Oe),Me.colorBoxes.push(Oe)}),He},ke.prototype.getColorBox=function(Me){var He=this,et=this.uiStyleSettings.toolbarHeight/4,Oe=this.uiStyleSettings.toolbarHeight-et,ut=document.createElement("div");ut.style.display="inline-block",ut.style.boxSizing="content-box",ut.style.width=Oe-2+"px",ut.style.height=Oe-2+"px",ut.style.padding="1px",ut.style.marginRight="2px",ut.style.marginBottom="2px",ut.style.borderWidth="2px",ut.style.borderStyle="solid",ut.style.borderRadius=(Oe+2)/2+"px",ut.style.borderColor=Me===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){He.setCurrentColor(Me,ut)});var Vn=document.createElement("div");return Vn.style.display="inline-block",Vn.style.width=Oe-2+"px",Vn.style.height=Oe-2+"px",Vn.style.backgroundColor=Me,Vn.style.borderRadius=Oe/2+"px",Me==="transparent"&&(Vn.style.fill=this.uiStyleSettings.toolboxAccentColor,Vn.innerHTML=` `),ut.appendChild(Vn),ut},ke.prototype.setCurrentColor=function(Me,He){var et=this;this.currentColor=Me,this.colorBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===He?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Me)},ke}(ne),ue=function(){function Xe(ke,Me,He){this._state="new",this._isSelected=!1,this._container=ke,this._overlayContainer=Me,this.globalSettings=He,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Xe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Xe.prototype.ownsTarget=function(ke){return!1},Object.defineProperty(Xe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Xe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Xe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Xe.prototype.pointerDown=function(ke,Me){},Xe.prototype.dblClick=function(ke,Me){},Xe.prototype.manipulate=function(ke){},Xe.prototype.pointerUp=function(ke){this.stateChanged()},Xe.prototype.dispose=function(){},Xe.prototype.addMarkerVisualToContainer=function(ke){this.container.childNodes.length>0?this.container.insertBefore(ke,this.container.childNodes[0]):this.container.appendChild(ke)},Xe.prototype.getState=function(){return{typeName:Xe.typeName,state:this.state,notes:this.notes}},Xe.prototype.restoreState=function(ke){this._state=ke.state,this.notes=ke.notes},Xe.prototype.scale=function(ke,Me){},Xe.prototype.colorChanged=function(ke){this.onColorChanged&&this.onColorChanged(ke),this.stateChanged()},Xe.prototype.fillColorChanged=function(ke){this.onFillColorChanged&&this.onFillColorChanged(ke),this.stateChanged()},Xe.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var ke=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),ke.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(ke)&&this.onStateChanged(this)}},Xe.typeName="MarkerBase",Xe}(),se=function(){function Xe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Xe.prototype.findGripByVisual=function(ke){return this.topLeft.ownsTarget(ke)?this.topLeft:this.topCenter.ownsTarget(ke)?this.topCenter:this.topRight.ownsTarget(ke)?this.topRight:this.centerLeft.ownsTarget(ke)?this.centerLeft:this.centerRight.ownsTarget(ke)?this.centerRight:this.bottomLeft.ownsTarget(ke)?this.bottomLeft:this.bottomCenter.ownsTarget(ke)?this.bottomCenter:this.bottomRight.ownsTarget(ke)?this.bottomRight:void 0},Xe}(),ge=function(){function Xe(){this.GRIP_SIZE=10,this.visual=Re.createGroup(),this.visual.appendChild(Re.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Re.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Xe.prototype.ownsTarget=function(ke){return ke===this.visual||ke===this.visual.childNodes[0]||ke===this.visual.childNodes[1]},Xe}(),me=function(){function Xe(){}return Xe.toITransformMatrix=function(ke){return{a:ke.a,b:ke.b,c:ke.c,d:ke.d,e:ke.e,f:ke.f}},Xe.toSVGMatrix=function(ke,Me){return ke.a=Me.a,ke.b=Me.b,ke.c=Me.c,ke.d=Me.d,ke.e=Me.e,ke.f=Me.f,ke},Xe}(),xe=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.left=0,Oe.top=0,Oe.width=0,Oe.height=0,Oe.defaultSize={x:50,y:20},Oe.offsetX=0,Oe.offsetY=0,Oe.rotationAngle=0,Oe.CB_DISTANCE=10,Oe._suppressMarkerCreateEvent=!1,Oe.container.transform.baseVal.appendItem(Re.createTransform()),Oe.setupControlBox(),Oe}return ot(ke,Xe),Object.defineProperty(ke.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(ke.prototype,"visual",{get:function(){return this._visual},set:function(Me){this._visual=Me;var He=Re.createTransform();this._visual.transform.baseVal.appendItem(He)},enumerable:!1,configurable:!0}),ke.prototype.ownsTarget=function(Me){return!!Xe.prototype.ownsTarget.call(this,Me)||!!(this.controlGrips.findGripByVisual(Me)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Me))},ke.prototype.pointerDown=function(Me,He){Xe.prototype.pointerDown.call(this,Me,He),this.state==="new"&&(this.left=Me.x,this.top=Me.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var et=this.unrotatePoint(Me);if(this.manipulationStartX=et.x,this.manipulationStartY=et.y,this.offsetX=et.x-this.left,this.offsetY=et.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(He),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(He)){this.activeGrip=this.rotatorGrip;var Oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Oe.x-this.width/2,this.top=Oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ut=this.container.transform.baseVal.getItem(0);ut.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ut,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},ke.prototype.pointerUp=function(Me){var He=this.state;Xe.prototype.pointerUp.call(this,Me),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Me),this._state="select",He==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},ke.prototype.moveVisual=function(Me){this.visual.style.transform="translate("+Me.x+"px, "+Me.y+"px)"},ke.prototype.manipulate=function(Me){var He=this.unrotatePoint(Me);this.state==="creating"?this.resize(Me):this.state==="move"?(this.left=this.manipulationStartLeft+(He.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(He.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(He):this.state==="rotate"&&this.rotate(Me)},ke.prototype.resize=function(Me){var He=this.manipulationStartLeft,et=this.manipulationStartWidth,Oe=this.manipulationStartTop,ut=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:He=this.manipulationStartLeft+Me.x-this.manipulationStartX,et=this.manipulationStartWidth+this.manipulationStartLeft-He;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:et=this.manipulationStartWidth+Me.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Oe=this.manipulationStartTop+Me.y-this.manipulationStartY,ut=this.manipulationStartHeight+this.manipulationStartTop-Oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ut=this.manipulationStartHeight+Me.y-this.manipulationStartY}et>=0?(this.left=He,this.width=et):(this.left=He+et,this.width=-et),ut>=0?(this.top=Oe,this.height=ut):(this.top=Oe+ut,this.height=-ut),this.setSize()},ke.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},ke.prototype.rotate=function(Me){if(Math.abs(Me.x-this.centerX)>.1){var He=Math.sign(Me.x-this.centerX);this.rotationAngle=180*Math.atan((Me.y-this.centerY)/(Me.x-this.centerX))/Math.PI+90*He,this.applyRotation()}},ke.prototype.applyRotation=function(){var Me=this.container.transform.baseVal.getItem(0);Me.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Me,0)},ke.prototype.rotatePoint=function(Me){if(this.rotationAngle===0)return Me;var He=this.container.getCTM(),et=Re.createPoint(Me.x,Me.y);return{x:(et=et.matrixTransform(He)).x,y:et.y}},ke.prototype.unrotatePoint=function(Me){if(this.rotationAngle===0)return Me;var He=this.container.getCTM();He=He.inverse();var et=Re.createPoint(Me.x,Me.y);return{x:(et=et.matrixTransform(He)).x,y:et.y}},ke.prototype.select=function(){Xe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ke.prototype.deselect=function(){Xe.prototype.deselect.call(this),this.controlBox.style.display="none"},ke.prototype.setupControlBox=function(){this.controlBox=Re.createGroup();var Me=Re.createTransform();Me.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Me),this.container.appendChild(this.controlBox),this.controlRect=Re.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=Re.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new se,this.addControlGrips(),this.controlBox.style.display="none"},ke.prototype.adjustControlBox=function(){var Me=this.controlBox.transform.baseVal.getItem(0);Me.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Me,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},ke.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},ke.prototype.createGrip=function(){var Me=new ge;return Me.visual.transform.baseVal.appendItem(Re.createTransform()),this.controlBox.appendChild(Me.visual),Me},ke.prototype.positionGrips=function(){var Me=this.controlGrips.topLeft.GRIP_SIZE,He=-Me/2,et=He,Oe=(this.width+this.CB_DISTANCE)/2-Me/2,ut=(this.height+this.CB_DISTANCE)/2-Me/2,Vn=this.height+this.CB_DISTANCE-Me/2,jn=this.width+this.CB_DISTANCE-Me/2;this.positionGrip(this.controlGrips.topLeft.visual,He,et),this.positionGrip(this.controlGrips.topCenter.visual,Oe,et),this.positionGrip(this.controlGrips.topRight.visual,jn,et),this.positionGrip(this.controlGrips.centerLeft.visual,He,ut),this.positionGrip(this.controlGrips.centerRight.visual,jn,ut),this.positionGrip(this.controlGrips.bottomLeft.visual,He,Vn),this.positionGrip(this.controlGrips.bottomCenter.visual,Oe,Vn),this.positionGrip(this.controlGrips.bottomRight.visual,jn,Vn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Oe,et-3*this.CB_DISTANCE)},ke.prototype.positionGrip=function(Me,He,et){var Oe=Me.transform.baseVal.getItem(0);Oe.setTranslate(He,et),Me.transform.baseVal.replaceItem(Oe,0)},ke.prototype.hideControlBox=function(){this.controlBox.style.display="none"},ke.prototype.showControlBox=function(){this.controlBox.style.display=""},ke.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:me.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:me.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Xe.prototype.getState.call(this))},ke.prototype.restoreState=function(Me){Xe.prototype.restoreState.call(this,Me);var He=Me;this.left=He.left,this.top=He.top,this.width=He.width,this.height=He.height,this.rotationAngle=He.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(me.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,He.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(me.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,He.containerTransformMatrix))},ke.prototype.scale=function(Me,He){Xe.prototype.scale.call(this,Me,He);var et=this.rotatePoint({x:this.left,y:this.top}),Oe=this.unrotatePoint({x:et.x*Me,y:et.y*He});this.left=Oe.x,this.top=Oe.y,this.width=this.width*Me,this.height=this.height*He,this.adjustControlBox()},ke}(ue),Pe=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.fillColor="transparent",Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.opacity=1,Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setFillColor=Oe.setFillColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.createVisual=Oe.createVisual.bind(Oe),Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){return!(!Xe.prototype.ownsTarget.call(this,Me)&&Me!==this.visual)},ke.prototype.createVisual=function(){this.visual=Re.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},ke.prototype.pointerDown=function(Me,He){Xe.prototype.pointerDown.call(this,Me,He),this.state==="new"&&(this.createVisual(),this.moveVisual(Me),this._state="creating")},ke.prototype.manipulate=function(Me){Xe.prototype.manipulate.call(this,Me)},ke.prototype.resize=function(Me){Xe.prototype.resize.call(this,Me),this.setSize()},ke.prototype.setSize=function(){Xe.prototype.setSize.call(this),Re.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},ke.prototype.pointerUp=function(Me){Xe.prototype.pointerUp.call(this,Me),this.setSize()},ke.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.visual&&Re.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Me),this.stateChanged()},ke.prototype.setFillColor=function(Me){this.fillColor=Me,this.visual&&Re.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},ke.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.visual&&Re.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ke.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.visual&&Re.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},ke.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Xe.prototype.getState.call(this))},ke.prototype.restoreState=function(Me){var He=Me;this.fillColor=He.fillColor,this.strokeColor=He.strokeColor,this.strokeWidth=He.strokeWidth,this.strokeDasharray=He.strokeDasharray,this.opacity=He.opacity,this.createVisual(),Xe.prototype.restoreState.call(this,Me),this.setSize()},ke.prototype.scale=function(Me,He){Xe.prototype.scale.call(this,Me,He),this.setSize()},ke.title="Rectangle marker",ke}(xe),Ke=function(Xe){function ke(Me,He,et,Oe){var ut=Xe.call(this,Me,Oe||'')||this;return ut.widths=[],ut.widthBoxes=[],ut.widths=He,ut.currentWidth=et,ut.setCurrentWidth=ut.setCurrentWidth.bind(ut),ut}return ot(ke,Xe),ke.prototype.getUi=function(){var Me=this,He=document.createElement("div");return He.style.display="flex",He.style.overflow="hidden",He.style.flexGrow="2",this.widths.forEach(function(et){var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.flexGrow="2",Oe.style.alignItems="center",Oe.style.justifyContent="space-between",Oe.style.padding="5px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.borderColor=et===Me.currentWidth?Me.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){Me.setCurrentWidth(et,Oe)}),He.appendChild(Oe);var ut=document.createElement("div");ut.innerText=et.toString(),ut.style.marginRight="5px",Oe.appendChild(ut);var Vn=document.createElement("div");Vn.style.minHeight="20px",Vn.style.flexGrow="2",Vn.style.display="flex",Vn.style.alignItems="center";var jn=document.createElement("hr");jn.style.minWidth="20px",jn.style.border="0px",jn.style.borderTop=et+"px solid "+Me.uiStyleSettings.toolboxColor,jn.style.flexGrow="2",Vn.appendChild(jn),Oe.appendChild(Vn),Me.widthBoxes.push(Oe)}),He},ke.prototype.setCurrentWidth=function(Me,He){var et=this;this.currentWidth=Me,this.widthBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===He?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},ke}(ne),nt=function(Xe){function ke(Me,He,et,Oe){var ut=Xe.call(this,Me,Oe||'')||this;return ut.styles=[],ut.styleBoxes=[],ut.styles=He,ut.currentStyle=et,ut.setCurrentStyle=ut.setCurrentStyle.bind(ut),ut}return ot(ke,Xe),ke.prototype.getUi=function(){var Me=this,He=document.createElement("div");return He.style.display="flex",He.style.overflow="hidden",He.style.flexGrow="2",this.styles.forEach(function(et){var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.alignItems="center",Oe.style.justifyContent="space-between",Oe.style.padding="5px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.overflow="hidden",Oe.style.maxWidth=100/Me.styles.length-5+"%",Oe.style.borderColor=et===Me.currentStyle?Me.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){Me.setCurrentStyle(et,Oe)}),He.appendChild(Oe);var ut=document.createElement("div");ut.style.minHeight="20px",ut.style.flexGrow="2",ut.style.overflow="hidden";var Vn=` `;ut.innerHTML=Vn,Oe.appendChild(ut),Me.styleBoxes.push(Oe)}),He},ke.prototype.setCurrentStyle=function(Me,He){var et=this;this.currentStyle=Me,this.styleBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===He?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},ke}(ne),ft=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.strokeColor=et.defaultColor,Oe.strokeWidth=et.defaultStrokeWidth,Oe.strokeDasharray=et.defaultStrokeDasharray,Oe.strokePanel=new te("Line color",et.defaultColorSet,et.defaultColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.strokeWidthPanel=new Ke("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new nt("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe}return ot(ke,Xe),Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Xe.prototype.getState.call(this);return Me.typeName=ke.typeName,Me},ke.typeName="FrameMarker",ke.title="Frame marker",ke.icon='',ke}(Pe),qe=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},at=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.x1=0,Oe.y1=0,Oe.x2=0,Oe.y2=0,Oe.defaultLength=50,Oe.manipulationStartX=0,Oe.manipulationStartY=0,Oe.manipulationStartX1=0,Oe.manipulationStartY1=0,Oe.manipulationStartX2=0,Oe.manipulationStartY2=0,Oe.setupControlBox(),Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){return!!Xe.prototype.ownsTarget.call(this,Me)||!(!this.grip1.ownsTarget(Me)&&!this.grip2.ownsTarget(Me))},ke.prototype.pointerDown=function(Me,He){Xe.prototype.pointerDown.call(this,Me,He),this.manipulationStartX=Me.x,this.manipulationStartY=Me.y,this.state==="new"&&(this.x1=Me.x,this.y1=Me.y,this.x2=Me.x,this.y2=Me.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(He)?this.activeGrip=this.grip1:this.grip2.ownsTarget(He)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},ke.prototype.pointerUp=function(Me){var He=this.state;Xe.prototype.pointerUp.call(this,Me),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Me),this._state="select",He==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},ke.prototype.adjustVisual=function(){},ke.prototype.manipulate=function(Me){this.state==="creating"?this.resize(Me):this.state==="move"?(this.x1=this.manipulationStartX1+Me.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Me.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Me.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Me.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Me)},ke.prototype.resize=function(Me){switch(this.activeGrip){case this.grip1:this.x1=Me.x,this.y1=Me.y;break;case this.grip2:case void 0:this.x2=Me.x,this.y2=Me.y}this.adjustVisual(),this.adjustControlBox()},ke.prototype.select=function(){Xe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},ke.prototype.deselect=function(){Xe.prototype.deselect.call(this),this.controlBox.style.display="none"},ke.prototype.setupControlBox=function(){this.controlBox=Re.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},ke.prototype.adjustControlBox=function(){this.positionGrips()},ke.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},ke.prototype.createGrip=function(){var Me=new ge;return Me.visual.transform.baseVal.appendItem(Re.createTransform()),this.controlBox.appendChild(Me.visual),Me},ke.prototype.positionGrips=function(){var Me=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Me/2,this.y1-Me/2),this.positionGrip(this.grip2.visual,this.x2-Me/2,this.y2-Me/2)},ke.prototype.positionGrip=function(Me,He,et){var Oe=Me.transform.baseVal.getItem(0);Oe.setTranslate(He,et),Me.transform.baseVal.replaceItem(Oe,0)},ke.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Xe.prototype.getState.call(this))},ke.prototype.restoreState=function(Me){Xe.prototype.restoreState.call(this,Me);var He=Me;this.x1=He.x1,this.y1=He.y1,this.x2=He.x2,this.y2=He.y2},ke.prototype.scale=function(Me,He){Xe.prototype.scale.call(this,Me,He),this.x1=this.x1*Me,this.y1=this.y1*He,this.x2=this.x2*Me,this.y2=this.y2*He,this.adjustVisual(),this.adjustControlBox()},ke}(ue),jt=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.strokeColor=et.defaultColor,Oe.strokeWidth=et.defaultStrokeWidth,Oe.strokeDasharray=et.defaultStrokeDasharray,Oe.strokePanel=new te("Line color",et.defaultColorSet,et.defaultColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.strokeWidthPanel=new Ke("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new nt("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){return!(!Xe.prototype.ownsTarget.call(this,Me)&&Me!==this.visual&&Me!==this.selectorLine&&Me!==this.visibleLine)},ke.prototype.createVisual=function(){this.visual=Re.createGroup(),this.selectorLine=Re.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Re.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},ke.prototype.pointerDown=function(Me,He){Xe.prototype.pointerDown.call(this,Me,He),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},ke.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),Re.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Re.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Re.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ke.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.adjustVisual(),this.colorChanged(Me)},ke.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.adjustVisual()},ke.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Xe.prototype.getState.call(this));return Me.typeName=ke.typeName,Me},ke.prototype.restoreState=function(Me){Xe.prototype.restoreState.call(this,Me);var He=Me;this.strokeColor=He.strokeColor,this.strokeWidth=He.strokeWidth,this.strokeDasharray=He.strokeDasharray,this.createVisual(),this.adjustVisual()},ke.typeName="LineMarker",ke.title="Line marker",ke.icon='',ke}(at),Mt=function(Xe){function ke(Me,He,et,Oe){var ut=Xe.call(this,Me,Oe||'')||this;return ut.fonts=[],ut.fontBoxes=[],ut.fonts=He,ut.currentFont=et,ut.setCurrentFont=ut.setCurrentFont.bind(ut),ut}return ot(ke,Xe),ke.prototype.getUi=function(){var Me=this,He=document.createElement("div");return He.style.overflow="hidden",He.style.flexGrow="2",this.fonts.forEach(function(et){var Oe=document.createElement("div");Oe.style.display="inline-block",Oe.style.alignItems="center",Oe.style.justifyContent="space-between",Oe.style.padding="5px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.overflow="hidden",Oe.style.maxWidth=100/Me.fonts.length-5+"%",Oe.style.borderColor=et===Me.currentFont?Me.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){Me.setCurrentFont(et,Oe)}),He.appendChild(Oe);var ut=document.createElement("div");ut.style.display="flex",ut.style.minHeight="20px",ut.style.flexGrow="2",ut.style.fontFamily=et,ut.style.overflow="hidden";var Vn=document.createElement("div");Vn.style.whiteSpace="nowrap",Vn.style.overflow="hidden",Vn.style.textOverflow="ellipsis",Vn.innerHTML="The quick brown fox jumps over the lazy dog",ut.appendChild(Vn),Oe.appendChild(ut),Me.fontBoxes.push(Oe)}),He},ke.prototype.setCurrentFont=function(Me,He){var et=this;this.currentFont=Me,this.fontBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===He?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},ke}(ne),bt=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.color="transparent",Oe.padding=5,Oe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Oe.text=Oe.DEFAULT_TEXT,Oe.isMoved=!1,Oe.color=et.defaultColor,Oe.fontFamily=et.defaultFontFamily,Oe.defaultSize={x:100,y:30},Oe.setColor=Oe.setColor.bind(Oe),Oe.setFont=Oe.setFont.bind(Oe),Oe.renderText=Oe.renderText.bind(Oe),Oe.sizeText=Oe.sizeText.bind(Oe),Oe.textEditDivClicked=Oe.textEditDivClicked.bind(Oe),Oe.showTextEditor=Oe.showTextEditor.bind(Oe),Oe.setSize=Oe.setSize.bind(Oe),Oe.positionTextEditor=Oe.positionTextEditor.bind(Oe),Oe.colorPanel=new te("Color",et.defaultColorSet,et.defaultColor),Oe.colorPanel.onColorChanged=Oe.setColor,Oe.fontFamilyPanel=new Mt("Font",et.defaultFontFamilies,et.defaultFontFamily),Oe.fontFamilyPanel.onFontChanged=Oe.setFont,Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){if(Xe.prototype.ownsTarget.call(this,Me)||Me===this.visual||Me===this.textElement||Me===this.bgRectangle)return!0;var He=!1;return this.textElement.childNodes.forEach(function(et){et===Me&&(He=!0)}),He},ke.prototype.createVisual=function(){this.visual=Re.createGroup(),this.bgRectangle=Re.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Re.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Re.createTransform()),this.textElement.transform.baseVal.appendItem(Re.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},ke.prototype.pointerDown=function(Me,He){Xe.prototype.pointerDown.call(this,Me,He),this.isMoved=!1,this.pointerDownPoint=Me,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Me),this._state="creating")},ke.prototype.renderText=function(){var Me=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(He){Me.textElement.appendChild(Re.createTSpan(He.trim()===""?" ":He.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},ke.prototype.getTextScale=function(){var Me=this.textElement.getBBox(),He=1;if(Me.width>0&&Me.height>0){var et=(1*this.width-this.width*this.padding*2/100)/Me.width,Oe=(1*this.height-this.height*this.padding*2/100)/Me.height;He=Math.min(et,Oe)}return He},ke.prototype.getTextPosition=function(Me){var He=this.textElement.getBBox(),et=0,Oe=0;return He.width>0&&He.height>0&&(et=(this.width-He.width*Me)/2,Oe=this.height/2-He.height*Me/2),{x:et,y:Oe}},ke.prototype.sizeText=function(){var Me=this.textElement.getBBox(),He=this.getTextScale(),et=this.getTextPosition(He);et.y-=Me.y*He,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+et.x+"px, "+et.y+"px) scale("+He+", "+He+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(et.x,et.y),this.textElement.transform.baseVal.getItem(1).setScale(He,He))},ke.prototype.manipulate=function(Me){Xe.prototype.manipulate.call(this,Me),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Me.x-this.pointerDownPoint.x)>5||Math.abs(Me.y-this.pointerDownPoint.y)>5)},ke.prototype.resize=function(Me){Xe.prototype.resize.call(this,Me),this.isMoved=!0,this.setSize(),this.sizeText()},ke.prototype.setSize=function(){Xe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Re.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Re.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},ke.prototype.pointerUp=function(Me){var He=this.state;He==="creating"&&(this._suppressMarkerCreateEvent=!0),Xe.prototype.pointerUp.call(this,Me),this.setSize(),(He==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},ke.prototype.showTextEditor=function(){var Me=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(He){He.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var He=Number.parseFloat(Me.textEditor.style.fontSize);Me.textEditor.clientWidth>=Number.parseInt(Me.textEditor.style.maxWidth)&&He>.9;)He-=.1,Me.textEditor.style.fontSize=Math.max(He,.9)+"em"}),this.textEditor.addEventListener("keyup",function(He){He.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(He){if(He.clipboardData){var et=He.clipboardData.getData("text"),Oe=window.getSelection();if(!Oe.rangeCount)return!1;Oe.deleteFromDocument(),Oe.getRangeAt(0).insertNode(document.createTextNode(et)),He.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Me.textEditDivClicked(Me.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},ke.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Me=this.getTextScale(),He=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),et=this.textElement.getBBox(),Oe={x:et.width*Me,y:et.height*Me};He.x-=Oe.x/2,He.y-=Oe.y/2,this.textEditor.style.top=He.y+"px",this.textEditor.style.left=He.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-He.x+"px",this.textEditor.style.fontSize=Math.max(16*Me,12)+"px",this.textElement.style.display="none"}},ke.prototype.textEditDivClicked=function(Me){this.text=Me.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},ke.prototype.select=function(){Xe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},ke.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Xe.prototype.deselect.call(this)},ke.prototype.dblClick=function(Me,He){Xe.prototype.dblClick.call(this,Me,He),this.showTextEditor()},ke.prototype.setColor=function(Me){this.textElement&&Re.setAttributes(this.textElement,[["fill",Me]]),this.color=Me,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Me)},ke.prototype.setFont=function(Me){this.textElement&&Re.setAttributes(this.textElement,[["font-family",Me]]),this.fontFamily=Me,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},ke.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},ke.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Xe.prototype.getState.call(this));return Me.typeName=ke.typeName,Me},ke.prototype.restoreState=function(Me){var He=Me;this.color=He.color,this.fontFamily=He.fontFamily,this.padding=He.padding,this.text=He.text,this.createVisual(),Xe.prototype.restoreState.call(this,Me),this.setSize()},ke.prototype.scale=function(Me,He){Xe.prototype.scale.call(this,Me,He),this.setSize(),this.sizeText(),this.positionTextEditor()},ke.typeName="TextMarker",ke.title="Text marker",ke.icon='',ke}(xe),Bt=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.color="transparent",Oe.lineWidth=3,Oe.drawing=!1,Oe.pixelRatio=1,Oe.color=et.defaultColor,Oe.lineWidth=et.defaultStrokeWidth,Oe.pixelRatio=et.freehandPixelRatio,Oe.setColor=Oe.setColor.bind(Oe),Oe.addCanvas=Oe.addCanvas.bind(Oe),Oe.finishCreation=Oe.finishCreation.bind(Oe),Oe.setLineWidth=Oe.setLineWidth.bind(Oe),Oe.colorPanel=new te("Color",et.defaultColorSet,et.defaultColor),Oe.colorPanel.onColorChanged=Oe.setColor,Oe.lineWidthPanel=new Ke("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),Oe.lineWidthPanel.onWidthChanged=Oe.setLineWidth,Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){return!(!Xe.prototype.ownsTarget.call(this,Me)&&Me!==this.visual&&Me!==this.drawingImage)},ke.prototype.createVisual=function(){this.visual=Re.createGroup(),this.drawingImage=Re.createImage(),this.visual.appendChild(this.drawingImage);var Me=Re.createTransform();this.visual.transform.baseVal.appendItem(Me),this.addMarkerVisualToContainer(this.visual)},ke.prototype.pointerDown=function(Me,He){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Me.x,Me.y),this.drawing=!0):Xe.prototype.pointerDown.call(this,Me,He)},ke.prototype.manipulate=function(Me){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Me.x,Me.y),this.canvasContext.stroke()):Xe.prototype.manipulate.call(this,Me)},ke.prototype.resize=function(Me){Xe.prototype.resize.call(this,Me),Re.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Re.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},ke.prototype.pointerUp=function(Me){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Xe.prototype.pointerUp.call(this,Me)},ke.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},ke.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Xe.prototype.select.call(this)},ke.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Xe.prototype.deselect.call(this)},ke.prototype.finishCreation=function(){for(var Me=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),He=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],et=He[0],Oe=He[1],ut=He[2],Vn=He[3],jn=!1,An=0;An0&&(jn=!0,AnVn&&(Vn=An),Pn>ut&&(ut=Pn));if(jn){this.left=et/this.pixelRatio,this.top=Oe/this.pixelRatio,this.width=(ut-et)/this.pixelRatio,this.height=(Vn-Oe)/this.pixelRatio;var si=document.createElement("canvas");si.width=ut-et,si.height=Vn-Oe,si.getContext("2d").putImageData(this.canvasContext.getImageData(et,Oe,ut-et,Vn-Oe),0,0),this.drawingImgUrl=si.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},ke.prototype.setDrawingImage=function(){Re.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Re.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},ke.prototype.setColor=function(Me){this.color=Me,this.colorChanged(Me)},ke.prototype.setLineWidth=function(Me){this.lineWidth=Me},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Object.assign({drawingImgUrl:this.drawingImgUrl},Xe.prototype.getState.call(this));return Me.typeName=ke.typeName,Me},ke.prototype.restoreState=function(Me){this.createVisual(),Xe.prototype.restoreState.call(this,Me),this.drawingImgUrl=Me.drawingImgUrl,this.setDrawingImage()},ke.prototype.scale=function(Me,He){Xe.prototype.scale.call(this,Me,He),this.setDrawingImage()},ke.typeName="FreehandMarker",ke.title="Freehand marker",ke.icon='',ke}(xe),Ht=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,et||'')||this;return Oe.typeBoxes=[],Oe.currentType=He,Oe.setCurrentType=Oe.setCurrentType.bind(Oe),Oe}return ot(ke,Xe),ke.prototype.getUi=function(){var Me=this,He=document.createElement("div");He.style.display="flex",He.style.overflow="hidden",He.style.flexGrow="2";for(var et=function(Vn){var jn="both";switch(Vn){case 0:jn="both";break;case 1:jn="start";break;case 2:jn="end";break;case 3:jn="none"}var An=document.createElement("div");if(An.style.display="flex",An.style.flexGrow="2",An.style.alignItems="center",An.style.justifyContent="space-between",An.style.padding="5px",An.style.borderWidth="2px",An.style.borderStyle="solid",An.style.borderColor=jn===Oe.currentType?Oe.uiStyleSettings.toolboxAccentColor:"transparent",An.addEventListener("click",function(){Me.setCurrentType(jn,An)}),He.appendChild(An),jn==="both"||jn==="start"){var Pn=document.createElement("div");Pn.style.display="flex",Pn.style.alignItems="center",Pn.style.minHeight="20px",Pn.innerHTML=` `,Pn.style.marginLeft="5px",An.appendChild(Pn)}var si=document.createElement("div");si.style.display="flex",si.style.alignItems="center",si.style.minHeight="20px",si.style.flexGrow="2";var mn=document.createElement("hr");if(mn.style.minWidth="20px",mn.style.border="0px",mn.style.borderTop="3px solid "+(Oe.uiStyleSettings!==void 0?Oe.uiStyleSettings.toolboxColor:"#eeeeee"),mn.style.flexGrow="2",si.appendChild(mn),An.appendChild(si),jn==="both"||jn==="end"){var Fi=document.createElement("div");Fi.style.display="flex",Fi.style.alignItems="center",Fi.style.minHeight="20px",Fi.innerHTML=` `,Fi.style.marginRight="5px",An.appendChild(Fi)}Oe.typeBoxes.push(An)},Oe=this,ut=0;ut<4;ut++)et(ut);return He},ke.prototype.setCurrentType=function(Me,He){var et=this;this.currentType=Me,this.typeBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===He?et.uiStyleSettings!==void 0?et.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},ke}(ne),Jn=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.arrowType="end",Oe.arrowBaseHeight=10,Oe.arrowBaseWidth=10,Oe.getArrowPoints=Oe.getArrowPoints.bind(Oe),Oe.setArrowType=Oe.setArrowType.bind(Oe),Oe.arrowTypePanel=new Ht("Arrow type","end"),Oe.arrowTypePanel.onArrowTypeChanged=Oe.setArrowType,Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){return!(!Xe.prototype.ownsTarget.call(this,Me)&&Me!==this.arrow1&&Me!==this.arrow2)},ke.prototype.getArrowPoints=function(Me,He){var et=this.arrowBaseWidth+2*this.strokeWidth,Oe=this.arrowBaseHeight+2*this.strokeWidth;return Me-et/2+","+(He+Oe/2)+" "+Me+","+(He-Oe/2)+" "+(Me+et/2)+","+(He+Oe/2)},ke.prototype.createTips=function(){this.arrow1=Re.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Re.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Re.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Re.createTransform()),this.visual.appendChild(this.arrow2)},ke.prototype.pointerDown=function(Me,He){Xe.prototype.pointerDown.call(this,Me,He),this.state==="creating"&&this.createTips()},ke.prototype.adjustVisual=function(){if(Xe.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Re.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Re.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Me=0;Math.abs(this.x1-this.x2)>.1&&(Me=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var He=this.arrow1.transform.baseVal.getItem(0);He.setRotate(Me,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(He,0);var et=this.arrow2.transform.baseVal.getItem(0);et.setRotate(Me+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(et,0)}},ke.prototype.setArrowType=function(Me){this.arrowType=Me,this.adjustVisual(),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Object.assign({arrowType:this.arrowType},Xe.prototype.getState.call(this));return Me.typeName=ke.typeName,Me},ke.prototype.restoreState=function(Me){Xe.prototype.restoreState.call(this,Me);var He=Me;this.arrowType=He.arrowType,this.createTips(),this.adjustVisual()},ke.typeName="ArrowMarker",ke.title="Arrow marker",ke.icon='',ke}(jt),qn=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.fillColor=et.defaultFillColor,Oe.strokeWidth=0,Oe.fillPanel=new te("Color",et.defaultColorSet,et.defaultFillColor),Oe.fillPanel.onColorChanged=Oe.setFillColor,Oe}return ot(ke,Xe),Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Xe.prototype.getState.call(this);return Me.typeName=ke.typeName,Me},ke.typeName="CoverMarker",ke.title="Cover marker",ke.icon='',ke}(Pe),sn=function(Xe){function ke(Me,He,et,Oe){var ut=Xe.call(this,Me,Oe||'')||this;return ut.opacities=[],ut.opacityBoxes=[],ut.opacities=He,ut.currentOpacity=et,ut.setCurrentOpacity=ut.setCurrentOpacity.bind(ut),ut}return ot(ke,Xe),ke.prototype.getUi=function(){var Me=this,He=document.createElement("div");return He.style.display="flex",He.style.overflow="hidden",He.style.flexGrow="2",He.style.justifyContent="space-between",this.opacities.forEach(function(et){var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.alignItems="center",Oe.style.justifyContent="center",Oe.style.padding="5px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.borderColor=et===Me.currentOpacity?Me.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){Me.setCurrentOpacity(et,Oe)}),He.appendChild(Oe);var ut=document.createElement("div");ut.innerText=100*et+"%",Oe.appendChild(ut),Me.opacityBoxes.push(Oe)}),He},ke.prototype.setCurrentOpacity=function(Me,He){var et=this;this.currentOpacity=Me,this.opacityBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===He?et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},ke}(ne),Nn=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.setOpacity=Oe.setOpacity.bind(Oe),Oe.fillColor=et.defaultHighlightColor,Oe.strokeWidth=0,Oe.opacity=et.defaultHighlightOpacity,Oe.fillPanel=new te("Color",et.defaultColorSet,Oe.fillColor),Oe.fillPanel.onColorChanged=Oe.setFillColor,Oe.opacityPanel=new sn("Opacity",et.defaultOpacitySteps,Oe.opacity),Oe.opacityPanel.onOpacityChanged=Oe.setOpacity,Oe}return ot(ke,Xe),ke.prototype.setOpacity=function(Me){this.opacity=Me,this.visual&&Re.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Xe.prototype.getState.call(this);return Me.typeName=ke.typeName,Me},ke.typeName="HighlightMarker",ke.title="Highlight marker",ke.icon='',ke}(qn),lt='',Ge='',Ne=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.bgColor="transparent",Oe.tipPosition={x:0,y:0},Oe.tipBase1Position={x:0,y:0},Oe.tipBase2Position={x:0,y:0},Oe.tipMoving=!1,Oe.color=et.defaultStrokeColor,Oe.bgColor=et.defaultFillColor,Oe.fontFamily=et.defaultFontFamily,Oe.defaultSize={x:100,y:30},Oe.setBgColor=Oe.setBgColor.bind(Oe),Oe.getTipPoints=Oe.getTipPoints.bind(Oe),Oe.positionTip=Oe.positionTip.bind(Oe),Oe.setTipPoints=Oe.setTipPoints.bind(Oe),Oe.colorPanel=new te("Text color",et.defaultColorSet,Oe.color,lt),Oe.colorPanel.onColorChanged=Oe.setColor,Oe.bgColorPanel=new te("Fill color",et.defaultColorSet,Oe.bgColor,Ge),Oe.bgColorPanel.onColorChanged=Oe.setBgColor,Oe.fontFamilyPanel=new Mt("Font",et.defaultFontFamilies,et.defaultFontFamily),Oe.fontFamilyPanel.onFontChanged=Oe.setFont,Oe.tipGrip=new ge,Oe.tipGrip.visual.transform.baseVal.appendItem(Re.createTransform()),Oe.controlBox.appendChild(Oe.tipGrip.visual),Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){return Xe.prototype.ownsTarget.call(this,Me)||this.tipGrip.ownsTarget(Me)||this.tip===Me},ke.prototype.createTip=function(){Re.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Re.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},ke.prototype.pointerDown=function(Me,He){this.state==="new"&&Xe.prototype.pointerDown.call(this,Me,He),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(He)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Xe.prototype.pointerDown.call(this,Me,He)},ke.prototype.pointerUp=function(Me){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Xe.prototype.pointerUp.call(this,Me);else{var He=this.state==="creating";Xe.prototype.pointerUp.call(this,Me),this.setTipPoints(He),this.positionTip()}},ke.prototype.manipulate=function(Me){if(this.tipMoving){var He=this.unrotatePoint(Me);this.tipPosition={x:He.x-this.manipulationStartLeft,y:He.y-this.manipulationStartTop},this.positionTip()}else Xe.prototype.manipulate.call(this,Me)},ke.prototype.setBgColor=function(Me){this.bgRectangle&&this.tip&&(Re.setAttributes(this.bgRectangle,[["fill",Me]]),Re.setAttributes(this.tip,[["fill",Me]])),this.bgColor=Me,this.fillColorChanged(Me)},ke.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},ke.prototype.setTipPoints=function(Me){Me===void 0&&(Me=!1);var He=Math.min(this.height/2,15),et=this.height/5;Me&&(this.tipPosition={x:He+et/2,y:this.height+20});var Oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?Oe.1)){var Me=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),He=this.tip1.transform.baseVal.getItem(0);He.setRotate(Me,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(He,0);var et=this.tip2.transform.baseVal.getItem(0);et.setRotate(Me+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(et,0)}},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Xe.prototype.getState.call(this);return Me.typeName=ke.typeName,Me},ke.prototype.restoreState=function(Me){Xe.prototype.restoreState.call(this,Me),this.createTips(),this.adjustVisual()},ke.typeName="MeasurementMarker",ke.title="Measurement marker",ke.icon='',ke}(jt),Zt=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.strokePanel.colors=et.defaultColorSet,Oe.fillColor="transparent",Oe}return ot(ke,Xe),Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Xe.prototype.getState.call(this);return Me.typeName=ke.typeName,Me},ke.typeName="EllipseFrameMarker",ke.title="Ellipse frame marker",ke.icon='',ke}(Rn),ci=function(){function Xe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Xe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Xe.prototype.addUndoStep=function(ke){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(ke)||(this.undoStack.push(ke),JSON.stringify(this.lastRedoStep)!==JSON.stringify(ke)&&this.redoStack.splice(0,this.redoStack.length))},Xe.prototype.replaceLastUndoStep=function(ke){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=ke)},Xe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Xe.prototype.undo=function(){if(this.undoStack.length>1){var ke=this.undoStack.pop();return ke!==void 0&&this.redoStack.push(ke),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Xe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Xe}(),On=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.curveX=0,Oe.curveY=0,Oe.manipulationStartCurveX=0,Oe.manipulationStartCurveY=0,Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.positionGrips=Oe.positionGrips.bind(Oe),Oe.addControlGrips=Oe.addControlGrips.bind(Oe),Oe.adjustVisual=Oe.adjustVisual.bind(Oe),Oe.setupControlBox=Oe.setupControlBox.bind(Oe),Oe.resize=Oe.resize.bind(Oe),Oe.strokeColor=et.defaultColor,Oe.strokeWidth=et.defaultStrokeWidth,Oe.strokeDasharray=et.defaultStrokeDasharray,Oe.strokePanel=new te("Line color",et.defaultColorSet,et.defaultColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.strokeWidthPanel=new Ke("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new nt("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){return!(!Xe.prototype.ownsTarget.call(this,Me)&&Me!==this.visual&&Me!==this.selectorCurve&&Me!==this.visibleCurve&&!this.curveGrip.ownsTarget(Me))},ke.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},ke.prototype.createVisual=function(){this.visual=Re.createGroup(),this.selectorCurve=Re.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Re.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},ke.prototype.pointerDown=function(Me,He){Xe.prototype.pointerDown.call(this,Me,He),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Me.x,this.curveY=Me.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(He)&&(this.activeGrip=this.curveGrip,this._state="resize")},ke.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Re.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Re.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Re.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},ke.prototype.setupControlBox=function(){Xe.prototype.setupControlBox.call(this),this.curveControlLine1=Re.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Re.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},ke.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Xe.prototype.addControlGrips.call(this)},ke.prototype.positionGrips=function(){Xe.prototype.positionGrips.call(this);var Me=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Me/2,this.curveY-Me/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},ke.prototype.manipulate=function(Me){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Me.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Me.y-this.manipulationStartY),Xe.prototype.manipulate.call(this,Me)},ke.prototype.resize=function(Me){this.activeGrip===this.curveGrip&&(this.curveX=Me.x,this.curveY=Me.y),Xe.prototype.resize.call(this,Me),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},ke.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.adjustVisual(),this.colorChanged(Me)},ke.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.adjustVisual()},ke.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.adjustVisual()},ke.prototype.scale=function(Me,He){this.curveX=this.curveX*Me,this.curveY=this.curveY*He,Xe.prototype.scale.call(this,Me,He)},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Xe.prototype.getState.call(this));return Me.typeName=ke.typeName,Me},ke.prototype.restoreState=function(Me){Xe.prototype.restoreState.call(this,Me);var He=Me;this.strokeColor=He.strokeColor,this.strokeWidth=He.strokeWidth,this.strokeDasharray=He.strokeDasharray,this.curveX=He.curveX,this.curveY=He.curveY,this.createVisual(),this.adjustVisual()},ke.typeName="CurveMarker",ke.title="Curve marker",ke.icon='',ke}(at),Mi=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,He,et)||this;return Oe.fillColor="transparent",Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.textColor="transparent",Oe.fontSize="1rem",Oe.isMoved=!1,Oe.captionText="Caption",Oe.PADDING=5,Oe.captionBoxWidth=0,Oe.captionBoxHeight=0,Oe.strokeColor=et.defaultColor,Oe.strokeWidth=et.defaultStrokeWidth,Oe.strokeDasharray=et.defaultStrokeDasharray,Oe.fillColor=et.defaultFillColor,Oe.textColor=et.defaultStrokeColor,Oe.fontFamily=et.defaultFontFamily,Oe.fontSize=et.defaultCaptionFontSize,Oe.captionText=et.defaultCaptionText,Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setFillColor=Oe.setFillColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.createVisual=Oe.createVisual.bind(Oe),Oe.sizeCaption=Oe.sizeCaption.bind(Oe),Oe.setCaptionText=Oe.setCaptionText.bind(Oe),Oe.showTextEditor=Oe.showTextEditor.bind(Oe),Oe.positionTextEditor=Oe.positionTextEditor.bind(Oe),Oe.finishTextEditing=Oe.finishTextEditing.bind(Oe),Oe.setFont=Oe.setFont.bind(Oe),Oe.setTextColor=Oe.setTextColor.bind(Oe),Oe.strokePanel=new te("Line color",Nt(et.defaultColorSet,["transparent"]),Oe.strokeColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.fillPanel=new te("Fill color",Nt(et.defaultColorSet,["transparent"]),Oe.fillColor,Ge),Oe.fillPanel.onColorChanged=Oe.setFillColor,Oe.strokeWidthPanel=new Ke("Line width",et.defaultStrokeWidths,et.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new nt("Line style",et.defaultStrokeDasharrays,et.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe.fontFamilyPanel=new Mt("Font",et.defaultFontFamilies,et.defaultFontFamily),Oe.fontFamilyPanel.onFontChanged=Oe.setFont,Oe.textColorPanel=new te("Text color",et.defaultColorSet,Oe.textColor,lt),Oe.textColorPanel.onColorChanged=Oe.setTextColor,Oe}return ot(ke,Xe),ke.prototype.ownsTarget=function(Me){return!(!Xe.prototype.ownsTarget.call(this,Me)&&Me!==this.visual&&Me!==this.frame&&Me!==this.captionBg&&Me!==this.captionElement)},ke.prototype.createVisual=function(){this.visual=Re.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Re.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Re.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=Re.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},ke.prototype.setCaptionText=function(Me){this.captionText=Me,this.captionElement.textContent=this.captionText,this.sizeCaption()},ke.prototype.pointerDown=function(Me,He){Xe.prototype.pointerDown.call(this,Me,He),this.isMoved=!1,this.pointerDownPoint=Me,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Me),this._state="creating")},ke.prototype.manipulate=function(Me){Xe.prototype.manipulate.call(this,Me),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Me.x-this.pointerDownPoint.x)>5||Math.abs(Me.y-this.pointerDownPoint.y)>5)},ke.prototype.resize=function(Me){Xe.prototype.resize.call(this,Me),this.setSize()},ke.prototype.sizeCaption=function(){var Me=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Me.width+2*this.PADDING,this.captionBoxHeight=Me.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Re.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),Re.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},ke.prototype.showTextEditor=function(){var Me=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(He){He.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(He){He.key==="Enter"&&Me.finishTextEditing(Me.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(He){He.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Me.finishTextEditing(Me.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Me.finishTextEditing(Me.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},ke.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},ke.prototype.finishTextEditing=function(Me){this.setCaptionText(Me.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},ke.prototype.setFont=function(Me){this.captionElement&&Re.setAttributes(this.captionElement,[["font-family",Me]]),this.fontFamily=Me,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},ke.prototype.setTextColor=function(Me){this.captionElement&&Re.setAttributes(this.captionElement,[["fill",Me]]),this.textColor=Me,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},ke.prototype.setSize=function(){Xe.prototype.setSize.call(this),Re.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},ke.prototype.pointerUp=function(Me){Xe.prototype.pointerUp.call(this,Me),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},ke.prototype.dblClick=function(Me,He){Xe.prototype.dblClick.call(this,Me,He),this.showTextEditor()},ke.prototype.setStrokeColor=function(Me){this.strokeColor=Me,this.frame&&Re.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Me),this.stateChanged()},ke.prototype.setFillColor=function(Me){this.fillColor=Me,this.captionBg&&Re.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Me),this.stateChanged()},ke.prototype.setStrokeWidth=function(Me){this.strokeWidth=Me,this.frame&&Re.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},ke.prototype.setStrokeDasharray=function(Me){this.strokeDasharray=Me,this.frame&&Re.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(ke.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),ke.prototype.getState=function(){var Me=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Xe.prototype.getState.call(this));return Me.typeName=this.typeName,Me},ke.prototype.restoreState=function(Me){var He=Me;this.fillColor=He.fillColor,this.strokeColor=He.strokeColor,this.strokeWidth=He.strokeWidth,this.strokeDasharray=He.strokeDasharray,this.textColor=He.textColor,this.fontFamily=He.fontFamily,this.captionText=He.captionText,this.fontSize=He.fontSize,this.createVisual(),Xe.prototype.restoreState.call(this,Me),this.setSize()},ke.prototype.scale=function(Me,He){Xe.prototype.scale.call(this,Me,He),this.setSize()},ke.typeName="CaptionFrameMarker",ke.title="Caption frame marker",ke.icon='',ke}(xe),Xt=function(){function Xe(ke,Me){Me===void 0&&(Me=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=ke,this.cancelable=Me}return Object.defineProperty(Xe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Xe.prototype.preventDefault=function(){this._defaultPrevented=!0},Xe}(),At=function(Xe){function ke(Me,He,et){var Oe=Xe.call(this,Me,!1)||this;return Oe.dataUrl=He,Oe.state=et,Oe}return ot(ke,Xe),ke}(Xt),on=function(Xe){function ke(Me,He,et){et===void 0&&(et=!1);var Oe=Xe.call(this,Me,et)||this;return Oe.marker=He,Oe}return ot(ke,Xe),ke}(Xt),Si=function(){function Xe(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Xe.prototype.addEventListener=function(ke,Me){this[ke].push(Me)},Xe.prototype.removeEventListener=function(ke,Me){var He=this[ke].indexOf(Me);He>-1&&this[ke].splice(He,1)},Xe}(),Gt=function(){function Xe(ke){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new qe,this._isOpen=!1,this.undoRedoManager=new ci,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Si,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Xe.instanceCounter++,this.styles=new yt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=ke,this.targetRoot=document.body,this.width=ke.clientWidth,this.height=ke.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Xe.prototype,"ALL_MARKER_TYPES",{get:function(){return[ft,Bt,Jn,bt,Zt,Rn,Nn,Ne,ai,qn,jt,On,Mi]},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[ft,Bt,Jn,bt,Rn,Nn,Ne]},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[ft,Bt,Jn,bt,Nn]},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(ke){var Me=this;this._availableMarkerTypes.splice(0),ke.forEach(function(He){if(typeof He=="string"){var et=Me.ALL_MARKER_TYPES.find(function(Oe){return Oe.typeName===He});et!==void 0&&Me._availableMarkerTypes.push(et)}else Me._availableMarkerTypes.push(He)})},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(ke){this._zoomLevel=ke,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Xe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Xe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Je.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Xe.prototype.show=function(){var ke=this;this.styles.styleSheetRoot===void 0&&mt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=mt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Me){return Me(new Xt(ke))})},Xe.prototype.render=function(){return wt(this,void 0,void 0,function(){var ke;return Qt(this,function(Me){switch(Me.label){case 0:return this.setCurrentMarker(),(ke=new pt).naturalSize=this.renderAtNaturalSize,ke.imageType=this.renderImageType,ke.imageQuality=this.renderImageQuality,ke.markersOnly=this.renderMarkersOnly,ke.width=this.renderWidth,ke.height=this.renderHeight,[4,ke.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Me.sent(),[4,ke.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Me.sent()]}})})},Xe.prototype.close=function(ke){var Me=this;if(ke===void 0&&(ke=!1),this.isOpen){var He=!1;ke||this.eventListeners.beforeclose.forEach(function(et){var Oe=new Xt(Me,!0);et(Oe),Oe.defaultPrevented&&(He=!0)}),He||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(et){return et(new Xt(Me))}),this.detachEvents(),this._isOpen=!1)}},Xe.prototype.addMarkersToToolbar=function(){for(var ke,Me=[],He=0;Hethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*ke:this.editorCanvas.clientWidth,He=Me',ke.title="Powered by marker.js",ke.style.display="grid",ke.style.alignItems="center",ke.style.justifyItems="center",ke.style.padding="3px",ke.style.width="20px",ke.style.height="20px",this.logoUI.appendChild(ke),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Xe.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Xe.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Xe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Xe.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var ke=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ke+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new We(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop-1&&this.markers.splice(this.markers.indexOf(ke),1),ke.dispose()},Xe.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Xe.prototype.toolbarButtonClicked=function(ke,Me){if(ke==="marker"&&Me!==void 0)this.createNewMarker(Me);else if(ke==="action")switch(Me){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Xe.prototype.deleteSelectedMarker=function(){var ke=this;if(this._currentMarker!==void 0){var Me=!1;if(this.eventListeners.markerbeforedelete.forEach(function(et){var Oe=new on(ke,ke._currentMarker,!0);et(Oe),Oe.defaultPrevented&&(Me=!0)}),!Me){var He=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(et){return et(new on(ke,He))})}}},Xe.prototype.clear=function(){var ke=this,Me=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ut){var Vn=new on(ke,void 0,!0);ut(Vn),Vn.defaultPrevented&&(Me=!0)}),!Me)){this.setCurrentMarker();for(var He=function(ut){var Vn=et.markers[ut];et.setCurrentMarker(et.markers[ut]),et._currentMarker.dispose(),et.markerImage.removeChild(et._currentMarker.container),et.markers.splice(et.markers.indexOf(et._currentMarker),1),et.eventListeners.markerdelete.forEach(function(jn){return jn(new on(ke,Vn))})},et=this,Oe=this.markers.length-1;Oe>=0;Oe--)He(Oe);this.addUndoStep()}},Object.defineProperty(Xe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Xe.prototype.showNotesEditor=function(){var ke;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(ke=this._currentMarker.notes)!==null&&ke!==void 0?ke:"",this.overlayContainer.appendChild(this.notesArea))},Xe.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Xe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Xe.prototype.addUndoStep=function(){var ke=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Me=this.getState(),He=this.undoRedoManager.getLastUndoStep();if(!He||He.width===Me.width&&He.height===Me.height){var et=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Me),et1&&this.panTo({x:ke.clientX,y:ke.clientY}))},Xe.prototype.onPointerUp=function(ke){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(ke.clientX,ke.clientY)),this.isDragging=!1,this.addUndoStep()},Xe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Xe.prototype.onKeyUp=function(ke){this._currentMarker===void 0||this.notesArea!==void 0||ke.key!=="Delete"&&ke.key!=="Backspace"||this.deleteSelectedMarker()},Xe.prototype.clientToLocalCoordinates=function(ke,Me){var He=this.markerImage.getBoundingClientRect();return{x:(ke-He.left)/this.zoomLevel,y:(Me-He.top)/this.zoomLevel}},Xe.prototype.onWindowResize=function(){this.positionUI()},Xe.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var ke=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=ke+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Xe.prototype.addLicenseKey=function(ke){Je.addKey(ke)},Xe.prototype.addEventListener=function(ke,Me){this.eventListeners.addEventListener(ke,Me)},Xe.prototype.removeEventListener=function(ke,Me){this.eventListeners.removeEventListener(ke,Me)},Xe.prototype.renderState=function(ke){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(ke),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Xe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Xe.prototype.focus=function(){var ke=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Me){return Me(new Xt(ke))}))},Xe.prototype.blur=function(){var ke=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Me){return Me(new Xt(ke))}))},Xe.instanceCounter=0,Xe}()},13272:function(Dn,ei,be){"use strict";be.d(ei,{s:function(){return rs},default:function(){return an}});function ve(){return ve=Object.assign?Object.assign.bind():function(Ce){for(var Le=1;LeCe.length)&&(Le=Ce.length);for(var _e=0,Ye=Array(Le);_eCe.length)&&(Le=Ce.length);for(var _e=0,Ye=new Array(Le);_e=0)&&(_e[kt]=Ce[kt]);return _e}function Ge(Ce,Le){if(Ce==null)return{};var _e=lt(Ce,Le),Ye,kt;if(Object.getOwnPropertySymbols){var _t=Object.getOwnPropertySymbols(Ce);for(kt=0;kt<_t.length;kt++)Ye=_t[kt],!(Le.indexOf(Ye)>=0)&&Object.prototype.propertyIsEnumerable.call(Ce,Ye)&&(_e[Ye]=Ce[Ye])}return _e}var Ne=be(67294);function Rn(Ce){var Le=Ne.useRef();Le.current=Ce;var _e=Ne.useCallback(function(){for(var Ye,kt=arguments.length,_t=new Array(kt),nn=0;nn5&&arguments[5]!==void 0?arguments[5]:!1,Bn=arguments.length>6?arguments[6]:void 0,vn=arguments.length>7?arguments[7]:void 0,Mn=Ne.useMemo(function(){if(at(kt)==="object")return kt.clearIcon;if(_t)return _t},[kt,_t]),Xn=Ne.useMemo(function(){return!!(!nn&&kt&&(Ye.length||Bn)&&!(vn==="combobox"&&Bn===""))},[kt,nn,Ye.length,Bn,vn]);return{allowClear:Xn,clearIcon:Ne.createElement(Ir,{className:"".concat(Le,"-clear"),onMouseDown:_e,customizeIcon:Mn},"\xD7")}},Di=Ne.createContext(null);function $r(){return Ne.useContext(Di)}function Yi(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Le=Ne.useState(!1),_e=Nn(Le,2),Ye=_e[0],kt=_e[1],_t=Ne.useRef(null),nn=function(){window.clearTimeout(_t.current)};Ne.useEffect(function(){return nn},[]);var Bn=function(Mn,Xn){nn(),_t.current=window.setTimeout(function(){kt(Mn),Xn&&Xn()},Ce)};return[Ye,Bn,nn]}function hr(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Le=Ne.useRef(null),_e=Ne.useRef(null);Ne.useEffect(function(){return function(){window.clearTimeout(_e.current)}},[]);function Ye(kt){(kt||Le.current===null)&&(Le.current=kt),window.clearTimeout(_e.current),_e.current=window.setTimeout(function(){Le.current=null},Ce)}return[function(){return Le.current},Ye]}function dr(Ce,Le,_e,Ye){var kt=Ne.useRef(null);kt.current={open:Le,triggerOpen:_e,customizedTrigger:Ye},Ne.useEffect(function(){function _t(nn){var Bn;if(!((Bn=kt.current)!==null&&Bn!==void 0&&Bn.customizedTrigger)){var vn=nn.target;vn.shadowRoot&&nn.composed&&(vn=nn.composedPath()[0]||vn),kt.current.open&&Ce().filter(function(Mn){return Mn}).every(function(Mn){return!Mn.contains(vn)&&Mn!==vn})&&kt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",_t),function(){return window.removeEventListener("mousedown",_t)}},[])}var kn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Le){var _e=Le.keyCode;if(Le.altKey&&!Le.ctrlKey||Le.metaKey||_e>=kn.F1&&_e<=kn.F12)return!1;switch(_e){case kn.ALT:case kn.CAPS_LOCK:case kn.CONTEXT_MENU:case kn.CTRL:case kn.DOWN:case kn.END:case kn.ESC:case kn.HOME:case kn.INSERT:case kn.LEFT:case kn.MAC_FF_META:case kn.META:case kn.NUMLOCK:case kn.NUM_CENTER:case kn.PAGE_DOWN:case kn.PAGE_UP:case kn.PAUSE:case kn.PRINT_SCREEN:case kn.RIGHT:case kn.SHIFT:case kn.UP:case kn.WIN_KEY:case kn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Le){if(Le>=kn.ZERO&&Le<=kn.NINE||Le>=kn.NUM_ZERO&&Le<=kn.NUM_MULTIPLY||Le>=kn.A&&Le<=kn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Le===0)return!0;switch(Le){case kn.SPACE:case kn.QUESTION_MARK:case kn.NUM_PLUS:case kn.NUM_MINUS:case kn.NUM_PERIOD:case kn.NUM_DIVISION:case kn.SEMICOLON:case kn.DASH:case kn.EQUALS:case kn.COMMA:case kn.PERIOD:case kn.SLASH:case kn.APOSTROPHE:case kn.SINGLE_QUOTE:case kn.OPEN_SQUARE_BRACKET:case kn.BACKSLASH:case kn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ii=kn;function ra(Ce){return Ce&&![Ii.ESC,Ii.SHIFT,Ii.BACKSPACE,Ii.TAB,Ii.WIN_KEY,Ii.ALT,Ii.META,Ii.WIN_KEY_RIGHT,Ii.CTRL,Ii.SEMICOLON,Ii.EQUALS,Ii.CAPS_LOCK,Ii.CONTEXT_MENU,Ii.F1,Ii.F2,Ii.F3,Ii.F4,Ii.F5,Ii.F6,Ii.F7,Ii.F8,Ii.F9,Ii.F10,Ii.F11,Ii.F12].includes(Ce)}var Un=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name noValidate nonce open optimum pattern placeholder poster preload radioGroup readOnly rel required reversed role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap`,Kr=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,ia="".concat(Un," ").concat(Kr).split(/[\s\n]+/),sa="aria-",Wa="data-";function ma(Ce,Le){return Ce.indexOf(Le)===0}function Ha(Ce){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_e;Le===!1?_e={aria:!0,data:!0,attr:!0}:Le===!0?_e={aria:!0}:_e=Ht({},Le);var Ye={};return Object.keys(Ce).forEach(function(kt){(_e.aria&&(kt==="role"||ma(kt,sa))||_e.data&&ma(kt,Wa)||_e.attr&&ia.includes(kt))&&(Ye[kt]=Ce[kt])}),Ye}function da(){return da=Object.assign?Object.assign.bind():function(Ce){for(var Le=1;LeCe.length)&&(Le=Ce.length);for(var _e=0,Ye=new Array(Le);_e=0)&&(_e[kt]=Ce[kt]);return _e}function Ft(Ce,Le){if(Ce==null)return{};var _e=Kt(Ce,Le),Ye,kt;if(Object.getOwnPropertySymbols){var _t=Object.getOwnPropertySymbols(Ce);for(kt=0;kt<_t.length;kt++)Ye=_t[kt],!(Le.indexOf(Ye)>=0)&&Object.prototype.propertyIsEnumerable.call(Ce,Ye)&&(_e[Ye]=Ce[Ye])}return _e}var un=be(48555);function Ti(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ri=Ti()?Ne.useLayoutEffect:Ne.useEffect,hi=function(Le,_e){var Ye=Ne.useRef(!0);Ri(function(){return Le(Ye.current)},_e),Ri(function(){return Ye.current=!1,function(){Ye.current=!0}},[])},Ut=function(Le,_e){hi(function(Ye){if(!Ye)return Le()},_e)},zn=hi,xn=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Fr=void 0;function ri(Ce,Le){var _e=Ce.prefixCls,Ye=Ce.invalidate,kt=Ce.item,_t=Ce.renderItem,nn=Ce.responsive,Bn=Ce.responsiveDisabled,vn=Ce.registerSize,Mn=Ce.itemKey,Xn=Ce.className,Qn=Ce.style,Wi=Ce.children,yi=Ce.display,oi=Ce.order,Li=Ce.component,Ui=Li===void 0?"div":Li,sr=Ft(Ce,xn),to=nn&&!yi;function br(mr){vn(Mn,mr)}Ne.useEffect(function(){return function(){br(null)}},[]);var Sr=_t&&kt!==Fr?_t(kt):Wi,wo;Ye||(wo={opacity:to?0:1,height:to?0:Fr,overflowY:to?"hidden":Fr,order:nn?oi:Fr,pointerEvents:to?"none":Fr,position:to?"absolute":Fr});var bi={};to&&(bi["aria-hidden"]=!0);var Xr=Ne.createElement(Ui,da({className:ut()(!Ye&&_e,Xn),style:hn(hn({},wo),Qn)},bi,sr,{ref:Le}),Sr);return nn&&(Xr=Ne.createElement(un.Z,{onResize:function(ao){var po=ao.offsetWidth;br(po)},disabled:Bn},Xr)),Xr}var $t=Ne.forwardRef(ri);$t.displayName="Item";var _i=$t;function Wr(Ce){var Le=Ne.useRef();Le.current=Ce;var _e=Ne.useCallback(function(){for(var Ye,kt=arguments.length,_t=new Array(kt),nn=0;nn1&&arguments[1]!==void 0?arguments[1]:1;Xo+=1;var Ye=Xo;function kt(_t){if(_t===0)aa(Ye),Le();else{var nn=Sn(function(){kt(_t-1)});Na.set(Ye,nn)}}return kt(_e),Ye};ur.cancel=function(Ce){var Le=Na.get(Ce);return aa(Le),or(Le)};var Nr=ur;function io(Ce){if(typeof MessageChannel=="undefined")Nr(Ce);else{var Le=new MessageChannel;Le.port1.onmessage=function(){return Ce()},Le.port2.postMessage(void 0)}}function va(){var Ce=Ne.useRef(null),Le=function(Ye){Ce.current||(Ce.current=[],io(function(){(0,Br.unstable_batchedUpdates)(function(){Ce.current.forEach(function(kt){kt()}),Ce.current=null})})),Ce.current.push(Ye)};return Le}function Ho(Ce,Le){var _e=Ne.useState(Le),Ye=zt(_e,2),kt=Ye[0],_t=Ye[1],nn=Wr(function(Bn){Ce(function(){_t(Bn)})});return[kt,nn]}var pi=Ne.createContext(null),lo=["component"],al=["className"],el=["className"],Ns=function(Le,_e){var Ye=Ne.useContext(pi);if(!Ye){var kt=Le.component,_t=kt===void 0?"div":kt,nn=Ft(Le,lo);return Ne.createElement(_t,da({},nn,{ref:_e}))}var Bn=Ye.className,vn=Ft(Ye,al),Mn=Le.className,Xn=Ft(Le,el);return Ne.createElement(pi.Provider,{value:null},Ne.createElement(_i,da({ref:_e,className:ut()(Bn,Mn)},vn,Xn)))},ln=Ne.forwardRef(Ns);ln.displayName="RawItem";var Yo=ln,Va=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Ao="responsive",ms="invalidate";function Ba(Ce){return"+ ".concat(Ce.length," ...")}function $a(Ce,Le){var _e=Ce.prefixCls,Ye=_e===void 0?"rc-overflow":_e,kt=Ce.data,_t=kt===void 0?[]:kt,nn=Ce.renderItem,Bn=Ce.renderRawItem,vn=Ce.itemKey,Mn=Ce.itemWidth,Xn=Mn===void 0?10:Mn,Qn=Ce.ssr,Wi=Ce.style,yi=Ce.className,oi=Ce.maxCount,Li=Ce.renderRest,Ui=Ce.renderRawRest,sr=Ce.suffix,to=Ce.component,br=to===void 0?"div":to,Sr=Ce.itemComponent,wo=Ce.onVisibleChange,bi=Ft(Ce,Va),Xr=Qn==="full",mr=va(),ao=Ho(mr,null),po=zt(ao,2),Ar=po[0],To=po[1],mo=Ar||0,zo=Ho(mr,new Map),Dr=zt(zo,2),Co=Dr[0],ca=Dr[1],Da=Ho(mr,0),ga=zt(Da,2),Jr=ga[0],Jo=ga[1],ua=Ho(mr,0),Ea=zt(ua,2),es=Ea[0],ba=Ea[1],_o=Ho(mr,0),yo=zt(_o,2),ea=yo[0],Ka=yo[1],Vo=(0,Ne.useState)(null),Zr=zt(Vo,2),ho=Zr[0],fo=Zr[1],Mr=(0,Ne.useState)(null),Gr=zt(Mr,2),Do=Gr[0],ye=Gr[1],Ie=Ne.useMemo(function(){return Do===null&&Xr?Number.MAX_SAFE_INTEGER:Do||0},[Do,Ar]),je=(0,Ne.useState)(!1),Ue=zt(je,2),dt=Ue[0],Wt=Ue[1],Jt="".concat(Ye,"-item"),rn=Math.max(Jr,es),Fn=oi===Ao,Kn=_t.length&&Fn,En=oi===ms,Ci=Kn||typeof oi=="number"&&_t.length>oi,Gi=(0,Ne.useMemo)(function(){var wi=_t;return Kn?Ar===null&&Xr?wi=_t:wi=_t.slice(0,Math.min(_t.length,mo/Xn)):typeof oi=="number"&&(wi=_t.slice(0,oi)),wi},[_t,Xn,Ar,oi,Kn]),Pi=(0,Ne.useMemo)(function(){return Kn?_t.slice(Ie+1):_t.slice(Gi.length)},[_t,Gi,Kn,Ie]),Ai=(0,Ne.useCallback)(function(wi,qi){var Hi;return typeof vn=="function"?vn(wi):(Hi=vn&&(wi==null?void 0:wi[vn]))!==null&&Hi!==void 0?Hi:qi},[vn]),Ni=(0,Ne.useCallback)(nn||function(wi){return wi},[nn]);function ki(wi,qi,Hi){Do===wi&&(qi===void 0||qi===ho)||(ye(wi),Hi||(Wt(wi<_t.length-1),wo==null||wo(wi)),qi!==void 0&&fo(qi))}function wn(wi,qi){To(qi.clientWidth)}function Gn(wi,qi){ca(function(Hi){var Lr=new Map(Hi);return qi===null?Lr.delete(wi):Lr.set(wi,qi),Lr})}function $n(wi,qi){ba(qi),Jo(es)}function fi(wi,qi){Ka(qi)}function rr(wi){return Co.get(Ai(Gi[wi],wi))}zn(function(){if(mo&&typeof rn=="number"&&Gi){var wi=ea,qi=Gi.length,Hi=qi-1;if(!qi){ki(0,null);return}for(var Lr=0;Lrmo){ki(Lr-1,wi-Eo-ea+es);break}}sr&&rr(0)+ea>mo&&fo(null)}},[mo,Co,es,ea,Ai,Gi]);var $i=dt&&!!Pi.length,ar={};ho!==null&&Kn&&(ar={position:"absolute",left:ho,top:0});var Et={prefixCls:Jt,responsive:Kn,component:Sr,invalidate:En},lr=Bn?function(wi,qi){var Hi=Ai(wi,qi);return Ne.createElement(pi.Provider,{key:Hi,value:hn(hn({},Et),{},{order:qi,item:wi,itemKey:Hi,registerSize:Gn,display:qi<=Ie})},Bn(wi,qi))}:function(wi,qi){var Hi=Ai(wi,qi);return Ne.createElement(_i,da({},Et,{order:qi,key:Hi,item:wi,renderItem:Ni,itemKey:Hi,registerSize:Gn,display:qi<=Ie}))},Pr,Or={order:$i?Ie:Number.MAX_SAFE_INTEGER,className:"".concat(Jt,"-rest"),registerSize:$n,display:$i};if(Ui)Ui&&(Pr=Ne.createElement(pi.Provider,{value:hn(hn({},Et),Or)},Ui(Pi)));else{var Oo=Li||Ba;Pr=Ne.createElement(_i,da({},Et,Or),typeof Oo=="function"?Oo(Pi):Oo)}var Ur=Ne.createElement(br,da({className:ut()(!En&&Ye,yi),style:Wi,ref:Le},bi),Gi.map(lr),Ci?Pr:null,sr&&Ne.createElement(_i,da({},Et,{responsive:Fn,responsiveDisabled:!Kn,order:Ie,className:"".concat(Jt,"-suffix"),registerSize:fi,display:!0,style:ar}),sr));return Fn&&(Ur=Ne.createElement(un.Z,{onResize:wn,disabled:!Kn},Ur)),Ur}var Er=Ne.forwardRef($a);Er.displayName="Overflow",Er.Item=Yo,Er.RESPONSIVE=Ao,Er.INVALIDATE=ms;var uo=Er,So=uo,Wn=function(Le,_e){var Ye,kt=Le.prefixCls,_t=Le.id,nn=Le.inputElement,Bn=Le.disabled,vn=Le.tabIndex,Mn=Le.autoFocus,Xn=Le.autoComplete,Qn=Le.editable,Wi=Le.activeDescendantId,yi=Le.value,oi=Le.maxLength,Li=Le.onKeyDown,Ui=Le.onMouseDown,sr=Le.onChange,to=Le.onPaste,br=Le.onCompositionStart,Sr=Le.onCompositionEnd,wo=Le.onBlur,bi=Le.open,Xr=Le.attrs,mr=nn||Ne.createElement("input",null),ao=mr,po=ao.ref,Ar=ao.props,To=Ar.onKeyDown,mo=Ar.onChange,zo=Ar.onMouseDown,Dr=Ar.onCompositionStart,Co=Ar.onCompositionEnd,ca=Ar.onBlur,Da=Ar.style;return"maxLength"in mr.props,mr=Ne.cloneElement(mr,Ht(Ht(Ht({type:"search"},Ar),{},{id:_t,ref:si(_e,po),disabled:Bn,tabIndex:vn,autoComplete:Xn||"off",autoFocus:Mn,className:ut()("".concat(kt,"-selection-search-input"),(Ye=mr)===null||Ye===void 0||(Ye=Ye.props)===null||Ye===void 0?void 0:Ye.className),role:"combobox","aria-expanded":bi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(_t,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(_t,"_list"),"aria-activedescendant":bi?Wi:void 0},Xr),{},{value:Qn?yi:"",maxLength:oi,readOnly:!Qn,unselectable:Qn?null:"on",style:Ht(Ht({},Da),{},{opacity:Qn?null:0}),onKeyDown:function(Jr){Li(Jr),To&&To(Jr)},onMouseDown:function(Jr){Ui(Jr),zo&&zo(Jr)},onChange:function(Jr){sr(Jr),mo&&mo(Jr)},onCompositionStart:function(Jr){br(Jr),Dr&&Dr(Jr)},onCompositionEnd:function(Jr){Sr(Jr),Co&&Co(Jr)},onPaste:to,onBlur:function(Jr){wo(Jr),ca&&ca(Jr)}})),mr},ka=Ne.forwardRef(Wn),Cn=ka;function Po(Ce){return Array.isArray(Ce)?Ce:Ce!==void 0?[Ce]:[]}var Ws=typeof window!="undefined"&&window.document&&window.document.documentElement,ds=Ws;function kl(Ce){return Ce!=null}function Ss(Ce){return!Ce&&Ce!==0}function Ua(Ce){return["string","number"].includes(at(Ce))}function us(Ce){var Le=void 0;return Ce&&(Ua(Ce.title)?Le=Ce.title.toString():Ua(Ce.label)&&(Le=Ce.label.toString())),Le}function tl(Ce,Le){ds?Ne.useLayoutEffect(Ce,Le):Ne.useEffect(Ce,Le)}function ts(Ce){var Le;return(Le=Ce.key)!==null&&Le!==void 0?Le:Ce.value}var wr=function(Le){Le.preventDefault(),Le.stopPropagation()},st=function(Le){var _e=Le.id,Ye=Le.prefixCls,kt=Le.values,_t=Le.open,nn=Le.searchValue,Bn=Le.autoClearSearchValue,vn=Le.inputRef,Mn=Le.placeholder,Xn=Le.disabled,Qn=Le.mode,Wi=Le.showSearch,yi=Le.autoFocus,oi=Le.autoComplete,Li=Le.activeDescendantId,Ui=Le.tabIndex,sr=Le.removeIcon,to=Le.maxTagCount,br=Le.maxTagTextLength,Sr=Le.maxTagPlaceholder,wo=Sr===void 0?function(Mr){return"+ ".concat(Mr.length," ...")}:Sr,bi=Le.tagRender,Xr=Le.onToggleOpen,mr=Le.onRemove,ao=Le.onInputChange,po=Le.onInputPaste,Ar=Le.onInputKeyDown,To=Le.onInputMouseDown,mo=Le.onInputCompositionStart,zo=Le.onInputCompositionEnd,Dr=Le.onInputBlur,Co=Ne.useRef(null),ca=(0,Ne.useState)(0),Da=Nn(ca,2),ga=Da[0],Jr=Da[1],Jo=(0,Ne.useState)(!1),ua=Nn(Jo,2),Ea=ua[0],es=ua[1],ba="".concat(Ye,"-selection"),_o=_t||Qn==="multiple"&&Bn===!1||Qn==="tags"?nn:"",yo=Qn==="tags"||Qn==="multiple"&&Bn===!1||Wi&&(_t||Ea);tl(function(){Jr(Co.current.scrollWidth)},[_o]);var ea=function(Gr,Do,ye,Ie,je){return Ne.createElement("span",{title:us(Gr),className:ut()("".concat(ba,"-item"),bt({},"".concat(ba,"-item-disabled"),ye))},Ne.createElement("span",{className:"".concat(ba,"-item-content")},Do),Ie&&Ne.createElement(Ir,{className:"".concat(ba,"-item-remove"),onMouseDown:wr,onClick:je,customizeIcon:sr},"\xD7"))},Ka=function(Gr,Do,ye,Ie,je,Ue){var dt=function(Jt){wr(Jt),Xr(!_t)};return Ne.createElement("span",{onMouseDown:dt},bi({label:Do,value:Gr,disabled:ye,closable:Ie,onClose:je,isMaxTag:!!Ue}))},Vo=function(Gr){var Do=Gr.disabled,ye=Gr.label,Ie=Gr.value,je=!Xn&&!Do,Ue=ye;if(typeof br=="number"&&(typeof ye=="string"||typeof ye=="number")){var dt=String(Ue);dt.length>br&&(Ue="".concat(dt.slice(0,br),"..."))}var Wt=function(rn){rn&&rn.stopPropagation(),mr(Gr)};return typeof bi=="function"?Ka(Ie,Ue,Do,je,Wt):ea(Gr,Ue,Do,je,Wt)},Zr=function(Gr){if(!kt.length)return null;var Do=typeof wo=="function"?wo(Gr):wo;return typeof bi=="function"?Ka(void 0,Do,!1,!1,void 0,!0):ea({title:Do},Do,!1)},ho=Ne.createElement("div",{className:"".concat(ba,"-search"),style:{width:ga},onFocus:function(){es(!0)},onBlur:function(){es(!1)}},Ne.createElement(Cn,{ref:vn,open:_t,prefixCls:Ye,id:_e,inputElement:null,disabled:Xn,autoFocus:yi,autoComplete:oi,editable:yo,activeDescendantId:Li,value:_o,onKeyDown:Ar,onMouseDown:To,onChange:ao,onPaste:po,onCompositionStart:mo,onCompositionEnd:zo,onBlur:Dr,tabIndex:Ui,attrs:Ha(Le,!0)}),Ne.createElement("span",{ref:Co,className:"".concat(ba,"-search-mirror"),"aria-hidden":!0},_o,"\xA0")),fo=Ne.createElement(So,{prefixCls:"".concat(ba,"-overflow"),data:kt,renderItem:Vo,renderRest:Zr,suffix:ho,itemKey:ts,maxCount:to});return Ne.createElement("span",{className:"".concat(ba,"-wrap")},fo,!kt.length&&!_o&&Ne.createElement("span",{className:"".concat(ba,"-placeholder")},Mn))},St=st,Rt=function(Le){var _e=Le.inputElement,Ye=Le.prefixCls,kt=Le.id,_t=Le.inputRef,nn=Le.disabled,Bn=Le.autoFocus,vn=Le.autoComplete,Mn=Le.activeDescendantId,Xn=Le.mode,Qn=Le.open,Wi=Le.values,yi=Le.placeholder,oi=Le.tabIndex,Li=Le.showSearch,Ui=Le.searchValue,sr=Le.activeValue,to=Le.maxLength,br=Le.onInputKeyDown,Sr=Le.onInputMouseDown,wo=Le.onInputChange,bi=Le.onInputPaste,Xr=Le.onInputCompositionStart,mr=Le.onInputCompositionEnd,ao=Le.onInputBlur,po=Le.title,Ar=Ne.useState(!1),To=Nn(Ar,2),mo=To[0],zo=To[1],Dr=Xn==="combobox",Co=Dr||Li,ca=Wi[0],Da=Ui||"";Dr&&sr&&!mo&&(Da=sr),Ne.useEffect(function(){Dr&&zo(!1)},[Dr,sr]);var ga=Xn!=="combobox"&&!Qn&&!Li?!1:!!Da,Jr=po===void 0?us(ca):po,Jo=Ne.useMemo(function(){return ca?null:Ne.createElement("span",{className:"".concat(Ye,"-selection-placeholder"),style:ga?{visibility:"hidden"}:void 0},yi)},[ca,ga,yi,Ye]);return Ne.createElement("span",{className:"".concat(Ye,"-selection-wrap")},Ne.createElement("span",{className:"".concat(Ye,"-selection-search")},Ne.createElement(Cn,{ref:_t,prefixCls:Ye,id:kt,open:Qn,inputElement:_e,disabled:nn,autoFocus:Bn,autoComplete:vn,editable:Co,activeDescendantId:Mn,value:Da,onKeyDown:br,onMouseDown:Sr,onChange:function(Ea){zo(!0),wo(Ea)},onPaste:bi,onCompositionStart:Xr,onCompositionEnd:mr,onBlur:ao,tabIndex:oi,attrs:Ha(Le,!0),maxLength:Dr?to:void 0})),!Dr&&ca?Ne.createElement("span",{className:"".concat(Ye,"-selection-item"),title:Jr,style:ga?{visibility:"hidden"}:void 0},ca.label):null,Jo)},gn=Rt,Hn=function(Le,_e){var Ye=(0,Ne.useRef)(null),kt=(0,Ne.useRef)(!1),_t=Le.prefixCls,nn=Le.open,Bn=Le.mode,vn=Le.showSearch,Mn=Le.tokenWithEnter,Xn=Le.disabled,Qn=Le.prefix,Wi=Le.autoClearSearchValue,yi=Le.onSearch,oi=Le.onSearchSubmit,Li=Le.onToggleOpen,Ui=Le.onInputKeyDown,sr=Le.onInputBlur,to=Le.domRef;Ne.useImperativeHandle(_e,function(){return{focus:function(Jr){Ye.current.focus(Jr)},blur:function(){Ye.current.blur()}}});var br=hr(0),Sr=Nn(br,2),wo=Sr[0],bi=Sr[1],Xr=function(Jr){var Jo=Jr.which,ua=Ye.current instanceof HTMLTextAreaElement;!ua&&nn&&(Jo===Ii.UP||Jo===Ii.DOWN)&&Jr.preventDefault(),Ui&&Ui(Jr),Jo===Ii.ENTER&&Bn==="tags"&&!kt.current&&!nn&&(oi==null||oi(Jr.target.value)),!(ua&&!nn&&~[Ii.UP,Ii.DOWN,Ii.LEFT,Ii.RIGHT].indexOf(Jo))&&ra(Jo)&&Li(!0)},mr=function(){bi(!0)},ao=(0,Ne.useRef)(null),po=function(Jr){yi(Jr,!0,kt.current)!==!1&&Li(!0)},Ar=function(){kt.current=!0},To=function(Jr){kt.current=!1,Bn!=="combobox"&&po(Jr.target.value)},mo=function(Jr){var Jo=Jr.target.value;if(Mn&&ao.current&&/[\r\n]/.test(ao.current)){var ua=ao.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Jo=Jo.replace(ua,ao.current)}ao.current=null,po(Jo)},zo=function(Jr){var Jo=Jr.clipboardData,ua=Jo==null?void 0:Jo.getData("text");ao.current=ua||""},Dr=function(Jr){var Jo=Jr.target;if(Jo!==Ye.current){var ua=document.body.style.msTouchAction!==void 0;ua?setTimeout(function(){Ye.current.focus()}):Ye.current.focus()}},Co=function(Jr){var Jo=wo();Jr.target!==Ye.current&&!Jo&&!(Bn==="combobox"&&Xn)&&Jr.preventDefault(),(Bn!=="combobox"&&(!vn||!Jo)||!nn)&&(nn&&Wi!==!1&&yi("",!0,!1),Li())},ca={inputRef:Ye,onInputKeyDown:Xr,onInputMouseDown:mr,onInputChange:mo,onInputPaste:zo,onInputCompositionStart:Ar,onInputCompositionEnd:To,onInputBlur:sr},Da=Bn==="multiple"||Bn==="tags"?Ne.createElement(St,me({},Le,ca)):Ne.createElement(gn,me({},Le,ca));return Ne.createElement("div",{ref:to,className:"".concat(_t,"-selector"),onClick:Dr,onMouseDown:Co},Qn&&Ne.createElement("div",{className:"".concat(_t,"-prefix")},Qn),Da)},Oi=Ne.forwardRef(Hn),Yt=Oi,Zn=be(98280),Ji=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],xi=function(Le){var _e=Le===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:_e,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:_e,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:_e,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:_e,adjustY:1},htmlRegion:"scroll"}}},nr=function(Le,_e){var Ye=Le.prefixCls,kt=Le.disabled,_t=Le.visible,nn=Le.children,Bn=Le.popupElement,vn=Le.animation,Mn=Le.transitionName,Xn=Le.dropdownStyle,Qn=Le.dropdownClassName,Wi=Le.direction,yi=Wi===void 0?"ltr":Wi,oi=Le.placement,Li=Le.builtinPlacements,Ui=Le.dropdownMatchSelectWidth,sr=Le.dropdownRender,to=Le.dropdownAlign,br=Le.getPopupContainer,Sr=Le.empty,wo=Le.getTriggerDOMNode,bi=Le.onPopupVisibleChange,Xr=Le.onPopupMouseEnter,mr=Ge(Le,Ji),ao="".concat(Ye,"-dropdown"),po=Bn;sr&&(po=sr(Bn));var Ar=Ne.useMemo(function(){return Li||xi(Ui)},[Li,Ui]),To=vn?"".concat(ao,"-").concat(vn):Mn,mo=typeof Ui=="number",zo=Ne.useMemo(function(){return mo?null:Ui===!1?"minWidth":"width"},[Ui,mo]),Dr=Xn;mo&&(Dr=Ht(Ht({},Dr),{},{width:Ui}));var Co=Ne.useRef(null);return Ne.useImperativeHandle(_e,function(){return{getPopupElement:function(){var Da;return(Da=Co.current)===null||Da===void 0?void 0:Da.popupElement}}}),Ne.createElement(Zn.Z,me({},mr,{showAction:bi?["click"]:[],hideAction:bi?["click"]:[],popupPlacement:oi||(yi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ar,prefixCls:ao,popupTransitionName:To,popup:Ne.createElement("div",{onMouseEnter:Xr},po),ref:Co,stretch:zo,popupAlign:to,popupVisible:_t,getPopupContainer:br,popupClassName:ut()(Qn,bt({},"".concat(ao,"-empty"),Sr)),popupStyle:Dr,getTriggerDOMNode:wo,onPopupVisibleChange:bi}),nn)},Zi=Ne.forwardRef(nr),vi=Zi;function pr(Ce){return Jn(Ce)||Ke(Ce)||nt(Ce)||sn()}function fn(Ce,Le){var _e=Ce.key,Ye;return"value"in Ce&&(Ye=Ce.value),_e!=null?_e:Ye!==void 0?Ye:"rc-index-key-".concat(Le)}function eo(Ce){return typeof Ce!="undefined"&&!Number.isNaN(Ce)}function so(Ce,Le){var _e=Ce||{},Ye=_e.label,kt=_e.value,_t=_e.options,nn=_e.groupLabel,Bn=Ye||(Le?"children":"label");return{label:Bn,value:kt||"value",options:_t||"options",groupLabel:nn||Bn}}function ya(Ce){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_e=Le.fieldNames,Ye=Le.childrenAsData,kt=[],_t=so(_e,!1),nn=_t.label,Bn=_t.value,vn=_t.options,Mn=_t.groupLabel;function Xn(Qn,Wi){Array.isArray(Qn)&&Qn.forEach(function(yi){if(Wi||!(vn in yi)){var oi=yi[Bn];kt.push({key:fn(yi,kt.length),groupOption:Wi,data:yi,label:yi[nn],value:oi})}else{var Li=yi[Mn];Li===void 0&&Ye&&(Li=yi.label),kt.push({key:fn(yi,kt.length),group:!0,data:yi,label:Li}),Xn(yi[vn],!0)}})}return Xn(Ce,!1),kt}function fa(Ce){var Le=Ht({},Ce);return"props"in Le||Object.defineProperty(Le,"props",{get:function(){return et(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Le}}),Le}var Ia=function(Le,_e,Ye){if(!_e||!_e.length)return null;var kt=!1,_t=function Bn(vn,Mn){var Xn=pr(Mn),Qn=Xn[0],Wi=Xn.slice(1);if(!Qn)return[vn];var yi=vn.split(Qn);return kt=kt||yi.length>1,yi.reduce(function(oi,Li){return[].concat(qe(oi),qe(Bn(Li,Wi)))},[]).filter(Boolean)},nn=_t(Le,_e);return kt?typeof Ye!="undefined"?nn.slice(0,Ye):nn:null},ns=Ne.createContext(null),Us=ns;function Ds(Ce){var Le=Ce.visible,_e=Ce.values;if(!Le)return null;var Ye=50;return Ne.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(_e.slice(0,Ye).map(function(kt){var _t=kt.label,nn=kt.value;return["number","string"].includes(at(_t))?_t:nn}).join(", ")),_e.length>Ye?", ...":null)}var fl=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Hs=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],cn=function(Le){return Le==="tags"||Le==="multiple"},nl=Ne.forwardRef(function(Ce,Le){var _e,Ye=Ce.id,kt=Ce.prefixCls,_t=Ce.className,nn=Ce.showSearch,Bn=Ce.tagRender,vn=Ce.direction,Mn=Ce.omitDomProps,Xn=Ce.displayValues,Qn=Ce.onDisplayValuesChange,Wi=Ce.emptyOptions,yi=Ce.notFoundContent,oi=yi===void 0?"Not Found":yi,Li=Ce.onClear,Ui=Ce.mode,sr=Ce.disabled,to=Ce.loading,br=Ce.getInputElement,Sr=Ce.getRawInputElement,wo=Ce.open,bi=Ce.defaultOpen,Xr=Ce.onDropdownVisibleChange,mr=Ce.activeValue,ao=Ce.onActiveValueChange,po=Ce.activeDescendantId,Ar=Ce.searchValue,To=Ce.autoClearSearchValue,mo=Ce.onSearch,zo=Ce.onSearchSplit,Dr=Ce.tokenSeparators,Co=Ce.allowClear,ca=Ce.prefix,Da=Ce.suffixIcon,ga=Ce.clearIcon,Jr=Ce.OptionList,Jo=Ce.animation,ua=Ce.transitionName,Ea=Ce.dropdownStyle,es=Ce.dropdownClassName,ba=Ce.dropdownMatchSelectWidth,_o=Ce.dropdownRender,yo=Ce.dropdownAlign,ea=Ce.placement,Ka=Ce.builtinPlacements,Vo=Ce.getPopupContainer,Zr=Ce.showAction,ho=Zr===void 0?[]:Zr,fo=Ce.onFocus,Mr=Ce.onBlur,Gr=Ce.onKeyUp,Do=Ce.onKeyDown,ye=Ce.onMouseDown,Ie=Ge(Ce,fl),je=cn(Ui),Ue=(nn!==void 0?nn:je)||Ui==="combobox",dt=Ht({},Ie);Hs.forEach(function(Uo){delete dt[Uo]}),Mn==null||Mn.forEach(function(Uo){delete dt[Uo]});var Wt=Ne.useState(!1),Jt=Nn(Wt,2),rn=Jt[0],Fn=Jt[1];Ne.useEffect(function(){Fn(Vn())},[]);var Kn=Ne.useRef(null),En=Ne.useRef(null),Ci=Ne.useRef(null),Gi=Ne.useRef(null),Pi=Ne.useRef(null),Ai=Ne.useRef(!1),Ni=Yi(),ki=Nn(Ni,3),wn=ki[0],Gn=ki[1],$n=ki[2];Ne.useImperativeHandle(Le,function(){var Uo,jr;return{focus:(Uo=Gi.current)===null||Uo===void 0?void 0:Uo.focus,blur:(jr=Gi.current)===null||jr===void 0?void 0:jr.blur,scrollTo:function(os){var vs;return(vs=Pi.current)===null||vs===void 0?void 0:vs.scrollTo(os)},nativeElement:Kn.current||En.current}});var fi=Ne.useMemo(function(){var Uo;if(Ui!=="combobox")return Ar;var jr=(Uo=Xn[0])===null||Uo===void 0?void 0:Uo.value;return typeof jr=="string"||typeof jr=="number"?String(jr):""},[Ar,Ui,Xn]),rr=Ui==="combobox"&&typeof br=="function"&&br()||null,$i=typeof Sr=="function"&&Sr(),ar=mn(En,$i==null||(_e=$i.props)===null||_e===void 0?void 0:_e.ref),Et=Ne.useState(!1),lr=Nn(Et,2),Pr=lr[0],Or=lr[1];ci(function(){Or(!0)},[]);var Oo=At(!1,{defaultValue:bi,value:wo}),Ur=Nn(Oo,2),wi=Ur[0],qi=Ur[1],Hi=Pr?wi:!1,Lr=!oi&&Wi;(sr||Lr&&Hi&&Ui==="combobox")&&(Hi=!1);var Eo=Lr?!1:Hi,vr=Ne.useCallback(function(Uo){var jr=Uo!==void 0?Uo:!Hi;sr||(qi(jr),Hi!==jr&&(Xr==null||Xr(jr)))},[sr,Hi,qi,Xr]),Qr=Ne.useMemo(function(){return(Dr||[]).some(function(Uo){return[` `,`\r `].includes(Uo)})},[Dr]),xr=Ne.useContext(Us)||{},fr=xr.maxCount,Hr=xr.rawValues,Vr=function(jr,Wo,os){if(!(je&&eo(fr)&&(Hr==null?void 0:Hr.size)>=fr)){var vs=!0,Ps=jr;ao==null||ao(null);var bl=Ia(jr,Dr,eo(fr)?fr-Hr.size:void 0),ul=os?null:bl;return Ui!=="combobox"&&ul&&(Ps="",zo==null||zo(ul),vr(!1),vs=!1),mo&&fi!==Ps&&mo(Ps,{source:Wo?"typing":"effect"}),vs}},Aa=function(jr){!jr||!jr.trim()||mo(jr,{source:"submit"})};Ne.useEffect(function(){!Hi&&!je&&Ui!=="combobox"&&Vr("",!1,!1)},[Hi]),Ne.useEffect(function(){wi&&sr&&qi(!1),sr&&!Ai.current&&Gn(!1)},[sr]);var Ya=hr(),bo=Nn(Ya,2),co=bo[0],vo=bo[1],Qo=Ne.useRef(!1),xa=function(jr){var Wo=co(),os=jr.key,vs=os==="Enter";if(vs&&(Ui!=="combobox"&&jr.preventDefault(),Hi||vr(!0)),vo(!!fi),os==="Backspace"&&!Wo&&je&&!fi&&Xn.length){for(var Ps=qe(Xn),bl=null,ul=Ps.length-1;ul>=0;ul-=1){var Nu=Ps[ul];if(!Nu.disabled){Ps.splice(ul,1),bl=Nu;break}}bl&&Qn(Ps,{type:"remove",values:[bl]})}for(var Nl=arguments.length,bu=new Array(Nl>1?Nl-1:0),is=1;is1?Wo-1:0),vs=1;vs1?bl-1:0),Nu=1;Nu=oi},[Bn,oi,Sr==null?void 0:Sr.size]),Dr=function(ho){ho.preventDefault()},Co=function(ho){var fo;(fo=mo.current)===null||fo===void 0||fo.scrollTo(typeof ho=="number"?{index:ho}:ho)},ca=Ne.useCallback(function(Zr){return vn==="combobox"?!1:Sr.has(Zr)},[vn,qe(Sr).toString(),Sr.size]),Da=function(ho){for(var fo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Mr=To.length,Gr=0;Gr1&&arguments[1]!==void 0?arguments[1]:!1;ua(ho);var Mr={source:fo?"keyboard":"mouse"},Gr=To[ho];if(!Gr){Ui(null,-1,Mr);return}Ui(Gr.value,ho,Mr)};(0,Ne.useEffect)(function(){Ea(sr!==!1?Da(0):-1)},[To.length,Mn]);var es=Ne.useCallback(function(Zr){return vn==="combobox"?String(Zr).toLowerCase()===Mn.toLowerCase():Sr.has(Zr)},[vn,Mn,qe(Sr).toString(),Sr.size]);(0,Ne.useEffect)(function(){var Zr=setTimeout(function(){if(!Bn&&nn&&Sr.size===1){var fo=Array.from(Sr)[0],Mr=To.findIndex(function(Gr){var Do=Gr.data;return Do.value===fo});Mr!==-1&&(Ea(Mr),Co(Mr))}});if(nn){var ho;(ho=mo.current)===null||ho===void 0||ho.scrollTo(void 0)}return function(){return clearTimeout(Zr)}},[nn,Mn]);var ba=function(ho){ho!==void 0&&to(ho,{selected:!Sr.has(ho)}),Bn||Xn(!1)};if(Ne.useImperativeHandle(_e,function(){return{onKeyDown:function(ho){var fo=ho.which,Mr=ho.ctrlKey;switch(fo){case Ii.N:case Ii.P:case Ii.UP:case Ii.DOWN:{var Gr=0;if(fo===Ii.UP?Gr=-1:fo===Ii.DOWN?Gr=1:il()&&Mr&&(fo===Ii.N?Gr=1:fo===Ii.P&&(Gr=-1)),Gr!==0){var Do=Da(Jo+Gr,Gr);Co(Do),Ea(Do,!0)}break}case Ii.TAB:case Ii.ENTER:{var ye,Ie=To[Jo];Ie&&!(Ie!=null&&(ye=Ie.data)!==null&&ye!==void 0&&ye.disabled)&&!zo?ba(Ie.value):ba(void 0),nn&&ho.preventDefault();break}case Ii.ESC:Xn(!1),nn&&ho.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ho){Co(ho)}}}),To.length===0)return Ne.createElement("div",{role:"listbox",id:"".concat(_t,"_list"),className:"".concat(Ar,"-empty"),onMouseDown:Dr},Qn);var _o=Object.keys(wo).map(function(Zr){return wo[Zr]}),yo=function(ho){return ho.label};function ea(Zr,ho){var fo=Zr.group;return{role:fo?"presentation":"option",id:"".concat(_t,"_list_").concat(ho)}}var Ka=function(ho){var fo=To[ho];if(!fo)return null;var Mr=fo.data||{},Gr=Mr.value,Do=fo.group,ye=Ha(Mr,!0),Ie=yo(fo);return fo?Ne.createElement("div",me({"aria-label":typeof Ie=="string"&&!Do?Ie:null},ye,{key:ho},ea(fo,ho),{"aria-selected":es(Gr)}),Gr):null},Vo={role:"listbox",id:"".concat(_t,"_list")};return Ne.createElement(Ne.Fragment,null,bi&&Ne.createElement("div",me({},Vo,{style:{height:0,width:0,overflow:"hidden"}}),Ka(Jo-1),Ka(Jo),Ka(Jo+1)),Ne.createElement(_s.Z,{itemKey:"key",ref:mo,data:To,height:mr,itemHeight:ao,fullHeight:!1,onMouseDown:Dr,onScroll:Wi,virtual:bi,direction:Xr,innerProps:bi?null:Vo},function(Zr,ho){var fo=Zr.group,Mr=Zr.groupOption,Gr=Zr.data,Do=Zr.label,ye=Zr.value,Ie=Gr.key;if(fo){var je,Ue=(je=Gr.title)!==null&&je!==void 0?je:Xa(Do)?Do.toString():void 0;return Ne.createElement("div",{className:ut()(Ar,"".concat(Ar,"-group"),Gr.className),title:Ue},Do!==void 0?Do:Ie)}var dt=Gr.disabled,Wt=Gr.title,Jt=Gr.children,rn=Gr.style,Fn=Gr.className,Kn=Ge(Gr,Ra),En=fc(Kn,_o),Ci=ca(ye),Gi=dt||!Ci&&zo,Pi="".concat(Ar,"-option"),Ai=ut()(Ar,Pi,Fn,bt(bt(bt(bt({},"".concat(Pi,"-grouped"),Mr),"".concat(Pi,"-active"),Jo===ho&&!Gi),"".concat(Pi,"-disabled"),Gi),"".concat(Pi,"-selected"),Ci)),Ni=yo(Zr),ki=!br||typeof br=="function"||Ci,wn=typeof Ni=="number"?Ni:Ni||ye,Gn=Xa(wn)?wn.toString():void 0;return Wt!==void 0&&(Gn=Wt),Ne.createElement("div",me({},Ha(En),bi?{}:ea(Zr,ho),{"aria-selected":es(ye),className:Ai,title:Gn,onMouseMove:function(){Jo===ho||Gi||Ea(ho)},onClick:function(){Gi||ba(ye)},style:rn}),Ne.createElement("div",{className:"".concat(Pi,"-content")},typeof po=="function"?po(Zr,{index:ho}):wn),Ne.isValidElement(br)||Ci,ki&&Ne.createElement(Ir,{className:"".concat(Ar,"-option-state"),customizeIcon:br,customizeIconProps:{value:ye,disabled:Gi,isSelected:Ci}},Ci?"\u2713":null))}))},pl=Ne.forwardRef(Is),Mo=pl,$u=function(Ce,Le){var _e=Ne.useRef({values:new Map,options:new Map}),Ye=Ne.useMemo(function(){var _t=_e.current,nn=_t.values,Bn=_t.options,vn=Ce.map(function(Qn){if(Qn.label===void 0){var Wi;return Ht(Ht({},Qn),{},{label:(Wi=nn.get(Qn.value))===null||Wi===void 0?void 0:Wi.label})}return Qn}),Mn=new Map,Xn=new Map;return vn.forEach(function(Qn){Mn.set(Qn.value,Qn),Xn.set(Qn.value,Le.get(Qn.value)||Bn.get(Qn.value))}),_e.current.values=Mn,_e.current.options=Xn,vn},[Ce,Le]),kt=Ne.useCallback(function(_t){return Le.get(_t)||_e.current.options.get(_t)},[Le]);return[Ye,kt]};function Pu(Ce,Le){return Po(Ce).join("").toUpperCase().includes(Le)}var $l=function(Ce,Le,_e,Ye,kt){return Ne.useMemo(function(){if(!_e||Ye===!1)return Ce;var _t=Le.options,nn=Le.label,Bn=Le.value,vn=[],Mn=typeof Ye=="function",Xn=_e.toUpperCase(),Qn=Mn?Ye:function(yi,oi){return kt?Pu(oi[kt],Xn):oi[_t]?Pu(oi[nn!=="children"?nn:"label"],Xn):Pu(oi[Bn],Xn)},Wi=Mn?function(yi){return fa(yi)}:function(yi){return yi};return Ce.forEach(function(yi){if(yi[_t]){var oi=Qn(_e,Wi(yi));if(oi)vn.push(yi);else{var Li=yi[_t].filter(function(Ui){return Qn(_e,Wi(Ui))});Li.length&&vn.push(Ht(Ht({},yi),{},bt({},_t,Li)))}return}Qn(_e,Wi(yi))&&vn.push(yi)}),vn},[Ce,Ye,kt,_e,Le])},ou=0,gc=ai();function kr(){var Ce;return gc?(Ce=ou,ou+=1):Ce="TEST_OR_SSR",Ce}function hl(Ce){var Le=Ne.useState(),_e=Nn(Le,2),Ye=_e[0],kt=_e[1];return Ne.useEffect(function(){kt("rc_select_".concat(kr()))},[]),Ce||Ye}function Rs(Ce){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_e=[];return Ne.Children.forEach(Ce,function(Ye){Ye==null&&!Le.keepEmpty||(Array.isArray(Ye)?_e=_e.concat(Rs(Ye)):(0,jn.isFragment)(Ye)&&Ye.props?_e=_e.concat(Rs(Ye.props.children,Le)):_e.push(Ye))}),_e}var Bu=["children","value"],zu=["children"];function Ou(Ce){var Le=Ce,_e=Le.key,Ye=Le.props,kt=Ye.children,_t=Ye.value,nn=Ge(Ye,Bu);return Ht({key:_e,value:_t!==void 0?_t:_e,children:kt},nn)}function Sa(Ce){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Rs(Ce).map(function(_e,Ye){if(!Ne.isValidElement(_e)||!_e.type)return null;var kt=_e,_t=kt.type.isSelectOptGroup,nn=kt.key,Bn=kt.props,vn=Bn.children,Mn=Ge(Bn,zu);return Le||!_t?Ou(_e):Ht(Ht({key:"__RC_SELECT_GRP__".concat(nn===null?Ye:nn,"__"),label:nn},Mn),{},{options:Sa(vn)})}).filter(function(_e){return _e})}var Lu=function(Le,_e,Ye,kt,_t){return Ne.useMemo(function(){var nn=Le,Bn=!Le;Bn&&(nn=Sa(_e));var vn=new Map,Mn=new Map,Xn=function(yi,oi,Li){Li&&typeof Li=="string"&&yi.set(oi[Li],oi)},Qn=function Wi(yi){for(var oi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Li=0;Li1&&arguments[1]!==void 0?arguments[1]:!1,nn=0;nn0?vr(fr.options):fr.options}):fr})},ki=Ne.useMemo(function(){return to?Ni(Ai):Ai},[Ai,to,Vo]),wn=Ne.useMemo(function(){return ya(ki,{fieldNames:yo,childrenAsData:ba})},[ki,yo,ba]),Gn=function(Qr){var xr=Do(Qr);if(Ue(xr),Jr&&(xr.length!==rn.length||xr.some(function(Vr,Aa){var Ya;return((Ya=rn[Aa])===null||Ya===void 0?void 0:Ya.value)!==(Vr==null?void 0:Vr.value)}))){var fr=ga?xr:xr.map(function(Vr){return Vr.value}),Hr=xr.map(function(Vr){return fa(Fn(Vr.value))});Jr(es?fr:fr[0],es?Hr:Hr[0])}},$n=Ne.useState(null),fi=Nn($n,2),rr=fi[0],$i=fi[1],ar=Ne.useState(0),Et=Nn(ar,2),lr=Et[0],Pr=Et[1],Or=mr!==void 0?mr:Ye!=="combobox",Oo=Ne.useCallback(function(vr,Qr){var xr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},fr=xr.source,Hr=fr===void 0?"keyboard":fr;Pr(Qr),nn&&Ye==="combobox"&&vr!==null&&Hr==="keyboard"&&$i(String(vr))},[nn,Ye]),Ur=function(Qr,xr,fr){var Hr=function(){var no,Rr=Fn(Qr);return[ga?{label:Rr==null?void 0:Rr[yo.label],value:Qr,key:(no=Rr==null?void 0:Rr.key)!==null&&no!==void 0?no:Qr}:Qr,fa(Rr)]};if(xr&&yi){var Vr=Hr(),Aa=Nn(Vr,2),Ya=Aa[0],bo=Aa[1];yi(Ya,bo)}else if(!xr&&oi&&fr!=="clear"){var co=Hr(),vo=Nn(co,2),Qo=vo[0],xa=vo[1];oi(Qo,xa)}},wi=Il(function(vr,Qr){var xr,fr=es?Qr.selected:!0;fr?xr=es?[].concat(qe(rn),[vr]):[vr]:xr=rn.filter(function(Hr){return Hr.value!==vr}),Gn(xr),Ur(vr,fr),Ye==="combobox"?$i(""):(!cn||Wi)&&(Zr(""),$i(""))}),qi=function(Qr,xr){Gn(Qr);var fr=xr.type,Hr=xr.values;(fr==="remove"||fr==="clear")&&Hr.forEach(function(Vr){Ur(Vr.value,!1,fr)})},Hi=function(Qr,xr){if(Zr(Qr),$i(null),xr.source==="submit"){var fr=(Qr||"").trim();if(fr){var Hr=Array.from(new Set([].concat(qe(En),[fr])));Gn(Hr),Ur(fr,!0),Zr("")}return}xr.source!=="blur"&&(Ye==="combobox"&&Gn(Qr),Xn==null||Xn(Qr))},Lr=function(Qr){var xr=Qr;Ye!=="tags"&&(xr=Qr.map(function(Hr){var Vr=Mr.get(Hr);return Vr==null?void 0:Vr.value}).filter(function(Hr){return Hr!==void 0}));var fr=Array.from(new Set([].concat(qe(En),qe(xr))));Gn(fr),fr.forEach(function(Hr){Ur(Hr,!0)})},Eo=Ne.useMemo(function(){var vr=po!==!1&&Ui!==!1;return Ht(Ht({},ho),{},{flattenOptions:wn,onActiveValue:Oo,defaultActiveFirstOption:Or,onSelect:wi,menuItemSelectedIcon:ao,rawValues:En,fieldNames:yo,virtual:vr,direction:Ar,listHeight:mo,listItemHeight:Dr,childrenAsData:ba,maxCount:Jo,optionRender:bi})},[Jo,ho,wn,Oo,Or,wi,ao,En,yo,po,Ui,Ar,mo,Dr,ba,bi]);return Ne.createElement(Us.Provider,{value:Eo},Ne.createElement(dl,me({},ua,{id:Ea,prefixCls:_t,ref:Le,omitDomProps:Cu,mode:Ye,displayValues:Kn,onDisplayValuesChange:qi,direction:Ar,searchValue:Vo,onSearch:Hi,autoClearSearchValue:Wi,onSearchSplit:Lr,dropdownMatchSelectWidth:Ui,OptionList:Mo,emptyOptions:!wn.length,activeValue:rr,activeDescendantId:"".concat(Ea,"_list_").concat(lr)})))}),Hc=ah;Hc.Option=hu,Hc.OptGroup=Ys;var Yh=null,Wu=null;function El(Ce){var Le=Ne.useRef();Le.current=Ce;var _e=Ne.useCallback(function(){for(var Ye,kt=arguments.length,_t=new Array(kt),nn=0;nnCe.length)&&(Le=Ce.length);for(var _e=0,Ye=new Array(Le);_e2&&arguments[2]!==void 0?arguments[2]:!1;Ui.forEach(function(br){if(!(!yi&&Wi!==!1&&Wi>0&&oi.length>=Wi)){var Sr=[].concat(We(sr),[br]),wo=br[Ye.children],bi=to||br.disabled;if((!wo||wo.length===0||nn)&&vn(Le,Sr,{label:Ye.label})){var Xr;oi.push(Je(Je({},br),{},(Xr={disabled:bi},Nt(Xr,Ye.label,Xn(Le,Sr,kt,Ye)),Nt(Xr,Vs,Sr),Nt(Xr,Ye.children,void 0),Xr)))}wo&&Li(br[Ye.children],Sr,bi)}})}return Li(_e,[]),yi&&oi.sort(function(Ui,sr){return yi(Ui[Vs],sr[Vs],Le,Ye)}),Wi!==!1&&Wi>0?oi.slice(0,Wi):oi},[Le,_e,Ye,kt,Xn,nn,vn,yi,Wi])},Fo=Ru,gu="__RC_CASCADER_SPLIT__",Ot="SHOW_PARENT",di="SHOW_CHILD";function Kl(Ce){return Ce.join(gu)}function Yu(Ce){return Ce.map(Kl)}function ec(Ce){return Ce.split(gu)}function pu(Ce){var Le=Ce||{},_e=Le.label,Ye=Le.value,kt=Le.children,_t=Ye||"value";return{label:_e||"label",value:_t,key:_t,children:kt||"children"}}function Eu(Ce,Le){var _e,Ye;return(_e=Ce.isLeaf)!==null&&_e!==void 0?_e:!((Ye=Ce[Le.children])!==null&&Ye!==void 0&&Ye.length)}function pc(Ce){var Le=Ce.parentElement;if(Le){var _e=Ce.offsetTop-Le.offsetTop;_e-Le.scrollTop<0?Le.scrollTo({top:_e}):_e+Ce.offsetHeight-Le.scrollTop>Le.offsetHeight&&Le.scrollTo({top:_e+Ce.offsetHeight-Le.offsetHeight})}}function mc(Ce,Le){return Ce.map(function(_e){var Ye;return(Ye=_e[Vs])===null||Ye===void 0?void 0:Ye.map(function(kt){return kt[Le.value]})})}function wl(Ce){return Array.isArray(Ce)&&Array.isArray(Ce[0])}function Ca(Ce){return Ce?wl(Ce)?Ce:(Ce.length===0?[]:[Ce]).map(function(Le){return Array.isArray(Le)?Le:[Le]}):[]}function mu(Ce,Le,_e){var Ye=new Set(Ce),kt=Le();return Ce.filter(function(_t){var nn=kt[_t],Bn=nn?nn.parent:null,vn=nn?nn.children:null;return nn&&nn.node.disabled?!0:_e===di?!(vn&&vn.some(function(Mn){return Mn.key&&Ye.has(Mn.key)})):!(Bn&&!Bn.node.disabled&&Ye.has(Bn.key))})}function au(Ce,Le,_e){for(var Ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,kt=Le,_t=[],nn=function(){var Mn,Xn,Qn,Wi=Ce[Bn],yi=(Mn=kt)===null||Mn===void 0?void 0:Mn.findIndex(function(Li){var Ui=Li[_e.value];return Ye?String(Ui)===String(Wi):Ui===Wi}),oi=yi!==-1?(Xn=kt)===null||Xn===void 0?void 0:Xn[yi]:null;_t.push({value:(Qn=oi==null?void 0:oi[_e.value])!==null&&Qn!==void 0?Qn:Wi,index:yi,option:oi}),kt=oi==null?void 0:oi[_e.children]},Bn=0;Bn=Ko.F1&&_e<=Ko.F12)return!1;switch(_e){case Ko.ALT:case Ko.CAPS_LOCK:case Ko.CONTEXT_MENU:case Ko.CTRL:case Ko.DOWN:case Ko.END:case Ko.ESC:case Ko.HOME:case Ko.INSERT:case Ko.LEFT:case Ko.MAC_FF_META:case Ko.META:case Ko.NUMLOCK:case Ko.NUM_CENTER:case Ko.PAGE_DOWN:case Ko.PAGE_UP:case Ko.PAUSE:case Ko.PRINT_SCREEN:case Ko.RIGHT:case Ko.SHIFT:case Ko.UP:case Ko.WIN_KEY:case Ko.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Le){if(Le>=Ko.ZERO&&Le<=Ko.NINE||Le>=Ko.NUM_ZERO&&Le<=Ko.NUM_MULTIPLY||Le>=Ko.A&&Le<=Ko.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Le===0)return!0;switch(Le){case Ko.SPACE:case Ko.QUESTION_MARK:case Ko.NUM_PLUS:case Ko.NUM_MINUS:case Ko.NUM_PERIOD:case Ko.NUM_DIVISION:case Ko.SEMICOLON:case Ko.DASH:case Ko.EQUALS:case Ko.COMMA:case Ko.PERIOD:case Ko.SLASH:case Ko.APOSTROPHE:case Ko.SINGLE_QUOTE:case Ko.OPEN_SQUARE_BRACKET:case Ko.BACKSLASH:case Ko.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},lu=Ko,Qe=function(Ce,Le,_e,Ye,kt,_t,nn){var Bn=nn.direction,vn=nn.searchValue,Mn=nn.toggleOpen,Xn=nn.open,Qn=Bn==="rtl",Wi=Ne.useMemo(function(){for(var bi=-1,Xr=Le,mr=[],ao=[],po=Ye.length,Ar=mc(Le,_e),To=function(ca){var Da=Xr.findIndex(function(ga,Jr){return(Ar[Jr]?Kl(Ar[Jr]):ga[_e.value])===Ye[ca]});if(Da===-1)return 1;bi=Da,mr.push(bi),ao.push(Ye[ca]),Xr=Xr[bi][_e.children]},mo=0;mo1){var Xr=oi.slice(0,-1);to(Xr)}else Mn(!1)},wo=function(){var Xr,mr=((Xr=Ui[Li])===null||Xr===void 0?void 0:Xr[_e.children])||[],ao=mr.find(function(Ar){return!Ar.disabled});if(ao){var po=[].concat(We(oi),[ao[_e.value]]);to(po)}};Ne.useImperativeHandle(Ce,function(){return{onKeyDown:function(Xr){var mr=Xr.which;switch(mr){case lu.UP:case lu.DOWN:{var ao=0;mr===lu.UP?ao=-1:mr===lu.DOWN&&(ao=1),ao!==0&&br(ao);break}case lu.LEFT:{if(vn)break;Qn?wo():Sr();break}case lu.RIGHT:{if(vn)break;Qn?Sr():wo();break}case lu.BACKSPACE:{vn||Sr();break}case lu.ENTER:{if(oi.length){var po=Ui[Li],Ar=(po==null?void 0:po[Vs])||[];Ar.length?_t(Ar.map(function(To){return To[_e.value]}),Ar[Ar.length-1]):_t(oi,Ui[Li])}break}case lu.ESC:Mn(!1),Xn&&Xr.stopPropagation()}},onKeyUp:function(){}}})},Lt=Ne.forwardRef(function(Ce,Le){var _e,Ye,kt,_t=Ce.prefixCls,nn=Ce.multiple,Bn=Ce.searchValue,vn=Ce.toggleOpen,Mn=Ce.notFoundContent,Xn=Ce.direction,Qn=Ce.open,Wi=Ce.disabled,yi=Ne.useRef(null),oi=Xn==="rtl",Li=Ne.useContext(ol),Ui=Li.options,sr=Li.values,to=Li.halfValues,br=Li.fieldNames,Sr=Li.changeOnSelect,wo=Li.onSelect,bi=Li.searchOptions,Xr=Li.dropdownPrefixCls,mr=Li.loadData,ao=Li.expandTrigger,po=Xr||_t,Ar=Ne.useState([]),To=ue(Ar,2),mo=To[0],zo=To[1],Dr=function(Mr){if(!(!mr||Bn)){var Gr=au(Mr,Ui,br),Do=Gr.map(function(je){var Ue=je.option;return Ue}),ye=Do[Do.length-1];if(ye&&!Eu(ye,br)){var Ie=Kl(Mr);zo(function(je){return[].concat(We(je),[Ie])}),mr(Do)}}};Ne.useEffect(function(){mo.length&&mo.forEach(function(fo){var Mr=ec(fo),Gr=au(Mr,Ui,br,!0).map(function(ye){var Ie=ye.option;return Ie}),Do=Gr[Gr.length-1];(!Do||Do[br.children]||Eu(Do,br))&&zo(function(ye){return ye.filter(function(Ie){return Ie!==fo})})})},[Ui,mo,br]);var Co=Ne.useMemo(function(){return new Set(Yu(sr))},[sr]),ca=Ne.useMemo(function(){return new Set(Yu(to))},[to]),Da=Zu(nn,Qn),ga=ue(Da,2),Jr=ga[0],Jo=ga[1],ua=function(Mr){Jo(Mr),Dr(Mr)},Ea=function(Mr){if(Wi)return!1;var Gr=Mr.disabled,Do=Eu(Mr,br);return!Gr&&(Do||Sr||nn)},es=function(Mr,Gr){var Do=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;wo(Mr),!nn&&(Gr||Sr&&(ao==="hover"||Do))&&vn(!1)},ba=Ne.useMemo(function(){return Bn?bi:Ui},[Bn,bi,Ui]),_o=Ne.useMemo(function(){for(var fo=[{options:ba}],Mr=ba,Gr=mc(Mr,br),Do=function(){var je=Jr[ye],Ue=Mr.find(function(Wt,Jt){return(Gr[Jt]?Kl(Gr[Jt]):Wt[br.value])===je}),dt=Ue==null?void 0:Ue[br.children];if(!(dt!=null&&dt.length))return 1;Mr=dt,fo.push({options:dt})},ye=0;ye=19)return!0;var kt=isMemo(Le)?Le.type.type:Le.type;return!(typeof kt=="function"&&!((_e=kt.prototype)!==null&&_e!==void 0&&_e.render)&&kt.$$typeof!==ForwardRef||typeof Le=="function"&&!((Ye=Le.prototype)!==null&&Ye!==void 0&&Ye.render)&&Le.$$typeof!==ForwardRef)};function Ro(Ce){return isValidElement(Ce)&&!isFragment(Ce)}var na=function(Le){return Ro(Le)&&ro(Le)},Yr=function(Le){if(Le&&Ro(Le)){var _e=Le;return _e.props.propertyIsEnumerable("ref")?_e.props.ref:_e.ref}return null};function ko(Ce,Le,_e,Ye){if(!Le.length)return _e;var kt=_toArray(Le),_t=kt[0],nn=kt.slice(1),Bn;return!Ce&&typeof _t=="number"?Bn=[]:Array.isArray(Ce)?Bn=_toConsumableArray(Ce):Bn=_objectSpread({},Ce),Ye&&_e===void 0&&nn.length===1?delete Bn[_t][nn[0]]:Bn[_t]=ko(Bn[_t],nn,_e,Ye),Bn}function oo(Ce,Le,_e){var Ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Le.length&&Ye&&_e===void 0&&!get(Ce,Le.slice(0,-1))?Ce:ko(Ce,Le,_e,Ye)}function oa(Ce){return _typeof(Ce)==="object"&&Ce!==null&&Object.getPrototypeOf(Ce)===Object.prototype}function _a(Ce){return Array.isArray(Ce)?[]:{}}var qo=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function cs(){for(var Ce=arguments.length,Le=new Array(Ce),_e=0;_e":sr,br=_e.loadingIcon,Sr=_e.direction,wo=_e.notFoundContent,bi=wo===void 0?"Not Found":wo,Xr=_e.disabled,mr=!!vn,ao=Ts(Mn,{value:Xn,postState:Ca}),po=ue(ao,2),Ar=po[0],To=po[1],mo=Ne.useMemo(function(){return pu(Qn)},[JSON.stringify(Qn)]),zo=sl(mo,Bn),Dr=ue(zo,3),Co=Dr[0],ca=Dr[1],Da=Dr[2],ga=fs(Co,mo),Jr=xs(mr,Ar,ca,Da,ga),Jo=ue(Jr,3),ua=Jo[0],Ea=Jo[1],es=Jo[2],ba=El(function(Zr){if(To(Zr),yi){var ho=Ca(Zr),fo=ho.map(function(Do){return au(Do,Co,mo).map(function(ye){return ye.option})}),Mr=mr?ho:ho[0],Gr=mr?fo:fo[0];yi(Mr,Gr)}}),_o=ju(mr,ba,ua,Ea,es,ca,Da,oi),yo=El(function(Zr){_o(Zr)}),ea=Ne.useMemo(function(){return{options:Co,fieldNames:mo,values:ua,halfValues:Ea,changeOnSelect:Wi,onSelect:yo,checkable:vn,searchOptions:[],dropdownPrefixCls:void 0,loadData:Li,expandTrigger:Ui,expandIcon:to,loadingIcon:br,dropdownMenuColumnStyle:void 0}},[Co,mo,ua,Ea,Wi,yo,vn,Li,Ui,to,br]),Ka="".concat(kt,"-panel"),Vo=!Co.length;return Ne.createElement(ol.Provider,{value:ea},Ne.createElement("div",{className:ut()(Ka,(Le={},Nt(Le,"".concat(Ka,"-rtl"),Sr==="rtl"),Nt(Le,"".concat(Ka,"-empty"),Vo),Le),nn),style:_t},Vo?bi:Ne.createElement(Tt,{prefixCls:kt,searchValue:"",multiple:mr,toggleOpen:ja,open:!0,direction:Sr,disabled:Xr})))}function qs(Ce){var Le=Ce.onPopupVisibleChange,_e=Ce.popupVisible,Ye=Ce.popupClassName,kt=Ce.popupPlacement;warning(!Le,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(_e===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(Ye===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(kt===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Cs(Ce,Le){if(Ce){var _e=function Ye(kt){for(var _t=0;_t":Dr,ca=Ce.loadingIcon,Da=Ce.children,ga=Ce.dropdownMatchSelectWidth,Jr=ga===void 0?!1:ga,Jo=Ce.showCheckedStrategy,ua=Jo===void 0?Ot:Jo,Ea=Ce.optionRender,es=ge(Ce,ze),ba=hl(_e),_o=!!Qn,yo=Ts(nn,{value:Bn,postState:Ca}),ea=ue(yo,2),Ka=ea[0],Vo=ea[1],Zr=Ne.useMemo(function(){return pu(_t)},[JSON.stringify(_t)]),ho=sl(Zr,to),fo=ue(ho,3),Mr=fo[0],Gr=fo[1],Do=fo[2],ye=Ts("",{value:oi,postState:function(wi){return wi||""}}),Ie=ue(ye,2),je=Ie[0],Ue=Ie[1],dt=function(wi,qi){Ue(wi),qi.source!=="blur"&&Li&&Li(wi)},Wt=_c(Ui),Jt=ue(Wt,2),rn=Jt[0],Fn=Jt[1],Kn=Fo(je,Mr,Zr,br||kt,Fn,vn||_o),En=fs(Mr,Zr),Ci=xs(_o,Ka,Gr,Do,En),Gi=ue(Ci,3),Pi=Gi[0],Ai=Gi[1],Ni=Gi[2],ki=Ne.useMemo(function(){var Ur=Yu(Pi),wi=mu(Ur,Gr,ua);return[].concat(We(Ni),We(Do(wi)))},[Pi,Gr,Do,Ni,ua]),wn=ll(ki,Mr,Zr,_o,Xn),Gn=El(function(Ur){if(Vo(Ur),Mn){var wi=Ca(Ur),qi=wi.map(function(Eo){return au(Eo,Mr,Zr).map(function(vr){return vr.option})}),Hi=_o?wi:wi[0],Lr=_o?qi:qi[0];Mn(Hi,Lr)}}),$n=ju(_o,Gn,Pi,Ai,Ni,Gr,Do,ua),fi=El(function(Ur){(!_o||yi)&&Ue(""),$n(Ur)}),rr=function(wi,qi){if(qi.type==="clear"){Gn([]);return}var Hi=qi.values[0],Lr=Hi.valueCells;fi(Lr)},$i=bi!==void 0?bi:wo,ar=mr||Xr,Et=To||Ar,lr=function(wi){mo==null||mo(wi),zo==null||zo(wi)},Pr=Ne.useMemo(function(){return{options:Mr,fieldNames:Zr,values:Pi,halfValues:Ai,changeOnSelect:vn,onSelect:fi,checkable:Qn,searchOptions:Kn,dropdownPrefixCls:br,loadData:Sr,expandTrigger:sr,expandIcon:Co,loadingIcon:ca,dropdownMenuColumnStyle:ao,optionRender:Ea}},[Mr,Zr,Pi,Ai,vn,fi,Qn,Kn,br,Sr,sr,Co,ca,ao,Ea]),Or=!(je?Kn:Mr).length,Oo=je&&Fn.matchInputWidth||Or?{}:{minWidth:"auto"};return Ne.createElement(ol.Provider,{value:Pr},Ne.createElement(dl,ve({},es,{ref:Le,id:ba,prefixCls:kt,autoClearSearchValue:yi,dropdownMatchSelectWidth:Jr,dropdownStyle:Je(Je({},Oo),po),displayValues:wn,onDisplayValuesChange:rr,mode:_o?"multiple":void 0,searchValue:je,onSearch:dt,showSearch:rn,OptionList:dn,emptyOptions:Or,open:$i,dropdownClassName:ar,placement:Et,onDropdownVisibleChange:lr,getRawInputElement:function(){return Da}})))});it.SHOW_PARENT=Ot,it.SHOW_CHILD=di,it.Panel=rs;var vt=it,an=vt},42767:function(Dn,ei){"use strict";var be;var ve=typeof Symbol=="function"&&Symbol.for,ot=ve?Symbol.for("react.element"):60103,wt=ve?Symbol.for("react.portal"):60106,Qt=ve?Symbol.for("react.fragment"):60107,Nt=ve?Symbol.for("react.strict_mode"):60108,Re=ve?Symbol.for("react.profiler"):60114,Je=ve?Symbol.for("react.provider"):60109,pt=ve?Symbol.for("react.context"):60110,mt=ve?Symbol.for("react.async_mode"):60111,yt=ve?Symbol.for("react.concurrent_mode"):60111,Vt=ve?Symbol.for("react.forward_ref"):60112,ct=ve?Symbol.for("react.suspense"):60113,We=ve?Symbol.for("react.suspense_list"):60120,Te=ve?Symbol.for("react.memo"):60115,ne=ve?Symbol.for("react.lazy"):60116,te=ve?Symbol.for("react.block"):60121,ue=ve?Symbol.for("react.fundamental"):60117,se=ve?Symbol.for("react.responder"):60118,ge=ve?Symbol.for("react.scope"):60119;function me(Pe){if(typeof Pe=="object"&&Pe!==null){var Ke=Pe.$$typeof;switch(Ke){case ot:switch(Pe=Pe.type,Pe){case mt:case yt:case Qt:case Re:case Nt:case ct:return Pe;default:switch(Pe=Pe&&Pe.$$typeof,Pe){case pt:case Vt:case ne:case Te:case Je:return Pe;default:return Ke}}case wt:return Ke}}}function xe(Pe){return me(Pe)===yt}be=mt,be=yt,be=pt,be=Je,be=ot,be=Vt,be=Qt,be=ne,be=Te,be=wt,be=Re,be=Nt,be=ct,be=function(Pe){return xe(Pe)||me(Pe)===mt},be=xe,be=function(Pe){return me(Pe)===pt},be=function(Pe){return me(Pe)===Je},be=function(Pe){return typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===ot},be=function(Pe){return me(Pe)===Vt},ei.isFragment=function(Pe){return me(Pe)===Qt},be=function(Pe){return me(Pe)===ne},be=function(Pe){return me(Pe)===Te},be=function(Pe){return me(Pe)===wt},be=function(Pe){return me(Pe)===Re},be=function(Pe){return me(Pe)===Nt},be=function(Pe){return me(Pe)===ct},be=function(Pe){return typeof Pe=="string"||typeof Pe=="function"||Pe===Qt||Pe===yt||Pe===Re||Pe===Nt||Pe===ct||Pe===We||typeof Pe=="object"&&Pe!==null&&(Pe.$$typeof===ne||Pe.$$typeof===Te||Pe.$$typeof===Je||Pe.$$typeof===pt||Pe.$$typeof===Vt||Pe.$$typeof===ue||Pe.$$typeof===se||Pe.$$typeof===ge||Pe.$$typeof===te)},be=me},16357:function(Dn,ei,be){"use strict";Dn.exports=be(42767)},16404:function(Dn,ei){"use strict";var be;var ve=Symbol.for("react.element"),ot=Symbol.for("react.portal"),wt=Symbol.for("react.fragment"),Qt=Symbol.for("react.strict_mode"),Nt=Symbol.for("react.profiler"),Re=Symbol.for("react.provider"),Je=Symbol.for("react.context"),pt=Symbol.for("react.server_context"),mt=Symbol.for("react.forward_ref"),yt=Symbol.for("react.suspense"),Vt=Symbol.for("react.suspense_list"),ct=Symbol.for("react.memo"),We=Symbol.for("react.lazy"),Te=Symbol.for("react.offscreen"),ne;ne=Symbol.for("react.module.reference");function te(ue){if(typeof ue=="object"&&ue!==null){var se=ue.$$typeof;switch(se){case ve:switch(ue=ue.type,ue){case wt:case Nt:case Qt:case yt:case Vt:return ue;default:switch(ue=ue&&ue.$$typeof,ue){case pt:case Je:case mt:case We:case ct:case Re:return ue;default:return se}}case ot:return se}}}be=Je,be=Re,be=ve,be=mt,be=wt,be=We,be=ct,be=ot,be=Nt,be=Qt,be=yt,be=Vt,be=function(){return!1},be=function(){return!1},be=function(ue){return te(ue)===Je},be=function(ue){return te(ue)===Re},be=function(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===ve},be=function(ue){return te(ue)===mt},be=function(ue){return te(ue)===wt},be=function(ue){return te(ue)===We},be=function(ue){return te(ue)===ct},be=function(ue){return te(ue)===ot},be=function(ue){return te(ue)===Nt},be=function(ue){return te(ue)===Qt},be=function(ue){return te(ue)===yt},be=function(ue){return te(ue)===Vt},be=function(ue){return typeof ue=="string"||typeof ue=="function"||ue===wt||ue===Nt||ue===Qt||ue===yt||ue===Vt||ue===Te||typeof ue=="object"&&ue!==null&&(ue.$$typeof===We||ue.$$typeof===ct||ue.$$typeof===Re||ue.$$typeof===Je||ue.$$typeof===mt||ue.$$typeof===ne||ue.getModuleId!==void 0)},be=te},80705:function(Dn,ei,be){"use strict";be(16404)},31457:function(Dn,ei,be){"use strict";be.d(ei,{Z:function(){return on}});var ve=be(4942),ot=be(87462),wt=be(71002),Qt=be(1413),Nt=be(97685),Re=be(94184),Je=be.n(Re),pt=be(67294);function mt(Si){var Gt=pt.useRef();Gt.current=Si;var Xe=pt.useCallback(function(){for(var ke,Me=arguments.length,He=new Array(Me),et=0;et=se.F1&&Xe<=se.F12)return!1;switch(Xe){case se.ALT:case se.CAPS_LOCK:case se.CONTEXT_MENU:case se.CTRL:case se.DOWN:case se.END:case se.ESC:case se.HOME:case se.INSERT:case se.LEFT:case se.MAC_FF_META:case se.META:case se.NUMLOCK:case se.NUM_CENTER:case se.PAGE_DOWN:case se.PAGE_UP:case se.PAUSE:case se.PRINT_SCREEN:case se.RIGHT:case se.SHIFT:case se.UP:case se.WIN_KEY:case se.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Gt){if(Gt>=se.ZERO&&Gt<=se.NINE||Gt>=se.NUM_ZERO&&Gt<=se.NUM_MULTIPLY||Gt>=se.A&&Gt<=se.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Gt===0)return!0;switch(Gt){case se.SPACE:case se.QUESTION_MARK:case se.NUM_PLUS:case se.NUM_MINUS:case se.NUM_PERIOD:case se.NUM_DIVISION:case se.SEMICOLON:case se.DASH:case se.EQUALS:case se.COMMA:case se.PERIOD:case se.SLASH:case se.APOSTROPHE:case se.SINGLE_QUOTE:case se.OPEN_SQUARE_BRACKET:case se.BACKSLASH:case se.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},ge=se,me=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name noValidate nonce open optimum pattern placeholder poster preload radioGroup readOnly rel required reversed role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap`,xe=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Pe="".concat(me," ").concat(xe).split(/[\s\n]+/),Ke="aria-",nt="data-";function ft(Si,Gt){return Si.indexOf(Gt)===0}function qe(Si){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xe;Gt===!1?Xe={aria:!0,data:!0,attr:!0}:Gt===!0?Xe={aria:!0}:Xe=(0,Qt.Z)({},Gt);var ke={};return Object.keys(Si).forEach(function(Me){(Xe.aria&&(Me==="role"||ft(Me,Ke))||Xe.data&&ft(Me,nt)||Xe.attr&&Pe.includes(Me))&&(ke[Me]=Si[Me])}),ke}var at={},jt=[],Mt=function(Gt){jt.push(Gt)};function bt(Si,Gt){if(0)var Xe}function Bt(Si,Gt){if(0)var Xe}function Ht(){at={}}function Jn(Si,Gt,Xe){!Gt&&!at[Xe]&&(Si(!1,Xe),at[Xe]=!0)}function qn(Si,Gt){Jn(bt,Si,Gt)}function sn(Si,Gt){Jn(Bt,Si,Gt)}qn.preMessage=Mt,qn.resetWarned=Ht,qn.noteOnce=sn;var Nn=null,lt=be(81626),Ge=[10,20,50,100],Ne=function(Gt){var Xe=Gt.pageSizeOptions,ke=Xe===void 0?Ge:Xe,Me=Gt.locale,He=Gt.changeSize,et=Gt.pageSize,Oe=Gt.goButton,ut=Gt.quickGo,Vn=Gt.rootPrefixCls,jn=Gt.disabled,An=Gt.buildOptionText,Pn=Gt.showSizeChanger,si=Gt.sizeChangerRender,mn=pt.useState(""),Fi=(0,Nt.Z)(mn,2),Vi=Fi[0],Ir=Fi[1],Qi=function(){return!Vi||Number.isNaN(Vi)?void 0:Number(Vi)},Di=typeof An=="function"?An:function(Kr){return"".concat(Kr," ").concat(Me.items_per_page)},$r=function(ia){Ir(ia.target.value)},Yi=function(ia){Oe||Vi===""||(Ir(""),!(ia.relatedTarget&&(ia.relatedTarget.className.indexOf("".concat(Vn,"-item-link"))>=0||ia.relatedTarget.className.indexOf("".concat(Vn,"-item"))>=0))&&(ut==null||ut(Qi())))},hr=function(ia){Vi!==""&&(ia.keyCode===ge.ENTER||ia.type==="click")&&(Ir(""),ut==null||ut(Qi()))},dr=function(){return ke.some(function(ia){return ia.toString()===et.toString()})?ke:ke.concat([et]).sort(function(ia,sa){var Wa=Number.isNaN(Number(ia))?0:Number(ia),ma=Number.isNaN(Number(sa))?0:Number(sa);return Wa-ma})},kn="".concat(Vn,"-options");if(!Pn&&!ut)return null;var Ii=null,ra=null,Un=null;return Pn&&si&&(Ii=si({disabled:jn,size:et,onSizeChange:function(ia){He==null||He(Number(ia))},"aria-label":Me.page_size,className:"".concat(kn,"-size-changer"),options:dr().map(function(Kr){return{label:Di(Kr),value:Kr}})})),ut&&(Oe&&(Un=typeof Oe=="boolean"?pt.createElement("button",{type:"button",onClick:hr,onKeyUp:hr,disabled:jn,className:"".concat(kn,"-quick-jumper-button")},Me.jump_to_confirm):pt.createElement("span",{onClick:hr,onKeyUp:hr},Oe)),ra=pt.createElement("div",{className:"".concat(kn,"-quick-jumper")},Me.jump_to,pt.createElement("input",{disabled:jn,type:"text",value:Vi,onChange:$r,onKeyUp:hr,onBlur:Yi,"aria-label":Me.page}),Me.page,Un)),pt.createElement("li",{className:kn},Ii,ra)},Rn=Ne,ai=function(Gt){var Xe=Gt.rootPrefixCls,ke=Gt.page,Me=Gt.active,He=Gt.className,et=Gt.showTitle,Oe=Gt.onClick,ut=Gt.onKeyPress,Vn=Gt.itemRender,jn="".concat(Xe,"-item"),An=Je()(jn,"".concat(jn,"-").concat(ke),(0,ve.Z)((0,ve.Z)({},"".concat(jn,"-active"),Me),"".concat(jn,"-disabled"),!ke),He),Pn=function(){Oe(ke)},si=function(Vi){ut(Vi,Oe,ke)},mn=Vn(ke,"page",pt.createElement("a",{rel:"nofollow"},ke));return mn?pt.createElement("li",{title:et?String(ke):null,className:An,onClick:Pn,onKeyDown:si,tabIndex:0},mn):null},Zt=ai,ci=function(Gt,Xe,ke){return ke};function On(){}function Mi(Si){var Gt=Number(Si);return typeof Gt=="number"&&!Number.isNaN(Gt)&&isFinite(Gt)&&Math.floor(Gt)===Gt}function Xt(Si,Gt,Xe){var ke=typeof Si=="undefined"?Gt:Si;return Math.floor((Xe-1)/ke)+1}var At=function(Gt){var Xe=Gt.prefixCls,ke=Xe===void 0?"rc-pagination":Xe,Me=Gt.selectPrefixCls,He=Me===void 0?"rc-select":Me,et=Gt.className,Oe=Gt.current,ut=Gt.defaultCurrent,Vn=ut===void 0?1:ut,jn=Gt.total,An=jn===void 0?0:jn,Pn=Gt.pageSize,si=Gt.defaultPageSize,mn=si===void 0?10:si,Fi=Gt.onChange,Vi=Fi===void 0?On:Fi,Ir=Gt.hideOnSinglePage,Qi=Gt.align,Di=Gt.showPrevNextJumpers,$r=Di===void 0?!0:Di,Yi=Gt.showQuickJumper,hr=Gt.showLessItems,dr=Gt.showTitle,kn=dr===void 0?!0:dr,Ii=Gt.onShowSizeChange,ra=Ii===void 0?On:Ii,Un=Gt.locale,Kr=Un===void 0?lt.Z:Un,ia=Gt.style,sa=Gt.totalBoundaryShowSizeChanger,Wa=sa===void 0?50:sa,ma=Gt.disabled,Ha=Gt.simple,da=Gt.showTotal,la=Gt.showSizeChanger,No=la===void 0?An>Wa:la,ti=Gt.sizeChangerRender,Ee=Gt.pageSizeOptions,pn=Gt.itemRender,hn=pn===void 0?ci:pn,ii=Gt.jumpPrevIcon,Yn=Gt.jumpNextIcon,In=Gt.prevIcon,en=Gt.nextIcon,ni=pt.useRef(null),zt=ue(10,{value:Pn,defaultValue:mn}),Kt=(0,Nt.Z)(zt,2),Ft=Kt[0],un=Kt[1],Ti=ue(1,{value:Oe,defaultValue:Vn,postState:function(eo){return Math.max(1,Math.min(eo,Xt(void 0,Ft,An)))}}),Ri=(0,Nt.Z)(Ti,2),hi=Ri[0],Ut=Ri[1],zn=pt.useState(hi),xn=(0,Nt.Z)(zn,2),Fr=xn[0],ri=xn[1];(0,pt.useEffect)(function(){ri(hi)},[hi]);var $t=Vi!==On,_i="current"in Gt,Wr=Math.max(1,hi-(hr?3:5)),Br=Math.min(Xt(void 0,Ft,An),hi+(hr?3:5));function Sn(fn,eo){var so=fn||pt.createElement("button",{type:"button","aria-label":eo,className:"".concat(ke,"-item-link")});return typeof fn=="function"&&(so=pt.createElement(fn,(0,Qt.Z)({},Gt))),so}function or(fn){var eo=fn.target.value,so=Xt(void 0,Ft,An),ya;return eo===""?ya=eo:Number.isNaN(Number(eo))?ya=Fr:eo>=so?ya=so:ya=Number(eo),ya}function Xo(fn){return Mi(fn)&&fn!==hi&&Mi(An)&&An>0}var Na=An>Ft?Yi:!1;function aa(fn){(fn.keyCode===ge.UP||fn.keyCode===ge.DOWN)&&fn.preventDefault()}function ur(fn){var eo=or(fn);switch(eo!==Fr&&ri(eo),fn.keyCode){case ge.ENTER:va(eo);break;case ge.UP:va(eo-1);break;case ge.DOWN:va(eo+1);break;default:break}}function Nr(fn){va(or(fn))}function io(fn){var eo=Xt(fn,Ft,An),so=hi>eo&&eo!==0?eo:hi;un(fn),ri(so),ra==null||ra(hi,fn),Ut(so),Vi==null||Vi(so,fn)}function va(fn){if(Xo(fn)&&!ma){var eo=Xt(void 0,Ft,An),so=fn;return fn>eo?so=eo:fn<1&&(so=1),so!==Fr&&ri(so),Ut(so),Vi==null||Vi(so,Ft),so}return hi}var Ho=hi>1,pi=hi2?so-2:0),fa=2;faAn?An:hi*Ft])),ka=null,Cn=Xt(void 0,Ft,An);if(Ir&&An<=Ft)return null;var Po=[],Ws={rootPrefixCls:ke,onClick:va,onKeyPress:ln,showTitle:kn,itemRender:hn,page:-1},ds=hi-1>0?hi-1:0,kl=hi+1=ts*2&&hi!==3&&(Po[0]=pt.cloneElement(Po[0],{className:Je()("".concat(ke,"-item-after-jump-prev"),Po[0].props.className)}),Po.unshift(uo)),Cn-hi>=ts*2&&hi!==Cn-2){var Zn=Po[Po.length-1];Po[Po.length-1]=pt.cloneElement(Zn,{className:Je()("".concat(ke,"-item-before-jump-next"),Zn.props.className)}),Po.push(ka)}Hn!==1&&Po.unshift(pt.createElement(Zt,(0,ot.Z)({},Ws,{key:1,page:1}))),Oi!==Cn&&Po.push(pt.createElement(Zt,(0,ot.Z)({},Ws,{key:Cn,page:Cn})))}var Ji=Ba(ds);if(Ji){var xi=!Ho||!Cn;Ji=pt.createElement("li",{title:kn?Kr.prev_page:null,onClick:lo,tabIndex:xi?null:0,onKeyDown:Yo,className:Je()("".concat(ke,"-prev"),(0,ve.Z)({},"".concat(ke,"-disabled"),xi)),"aria-disabled":xi},Ji)}var nr=$a(kl);if(nr){var Zi,vi;Ha?(Zi=!pi,vi=Ho?0:null):(Zi=!pi||!Cn,vi=Zi?null:0),nr=pt.createElement("li",{title:kn?Kr.next_page:null,onClick:al,tabIndex:vi,onKeyDown:Va,className:Je()("".concat(ke,"-next"),(0,ve.Z)({},"".concat(ke,"-disabled"),Zi)),"aria-disabled":Zi},nr)}var pr=Je()(ke,et,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(ke,"-start"),Qi==="start"),"".concat(ke,"-center"),Qi==="center"),"".concat(ke,"-end"),Qi==="end"),"".concat(ke,"-simple"),Ha),"".concat(ke,"-disabled"),ma));return pt.createElement("ul",(0,ot.Z)({className:pr,style:ia,ref:ni},So),Wn,Ji,Ha?tl:Po,nr,pt.createElement(Rn,{locale:Kr,rootPrefixCls:ke,disabled:ma,selectPrefixCls:He,changeSize:io,pageSize:Ft,pageSizeOptions:Ee,quickGo:Na?va:null,goButton:us,showSizeChanger:No,sizeChangerRender:ti}))},on=At},63697:function(Dn,ei,be){"use strict";var ve=be(27484),ot=be.n(ve),wt=be(6833),Qt=be.n(wt),Nt=be(96036),Re=be.n(Nt),Je=be(55183),pt=be.n(Je),mt=be(172),yt=be.n(mt),Vt=be(28734),ct=be.n(Vt),We=be(10285),Te=be.n(We);ot().extend(Te()),ot().extend(ct()),ot().extend(Qt()),ot().extend(Re()),ot().extend(pt()),ot().extend(yt()),ot().extend(function(ge,me){var xe=me.prototype,Pe=xe.format;xe.format=function(nt){var ft=(nt||"").replace("Wo","wo");return Pe.bind(this)(ft)}});var ne={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},te=function(me){var xe=ne[me];return xe||me.split("_")[0]},ue=function(){},se={getNow:function(){var me=ot()();return typeof me.tz=="function"?me.tz():me},getFixedDate:function(me){return ot()(me,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(me){return me.endOf("month")},getWeekDay:function(me){var xe=me.locale("en");return xe.weekday()+xe.localeData().firstDayOfWeek()},getYear:function(me){return me.year()},getMonth:function(me){return me.month()},getDate:function(me){return me.date()},getHour:function(me){return me.hour()},getMinute:function(me){return me.minute()},getSecond:function(me){return me.second()},getMillisecond:function(me){return me.millisecond()},addYear:function(me,xe){return me.add(xe,"year")},addMonth:function(me,xe){return me.add(xe,"month")},addDate:function(me,xe){return me.add(xe,"day")},setYear:function(me,xe){return me.year(xe)},setMonth:function(me,xe){return me.month(xe)},setDate:function(me,xe){return me.date(xe)},setHour:function(me,xe){return me.hour(xe)},setMinute:function(me,xe){return me.minute(xe)},setSecond:function(me,xe){return me.second(xe)},setMillisecond:function(me,xe){return me.millisecond(xe)},isAfter:function(me,xe){return me.isAfter(xe)},isValidate:function(me){return me.isValid()},locale:{getWeekFirstDay:function(me){return ot()().locale(te(me)).localeData().firstDayOfWeek()},getWeekFirstDate:function(me,xe){return xe.locale(te(me)).weekday(0)},getWeek:function(me,xe){return xe.locale(te(me)).week()},getShortWeekDays:function(me){return ot()().locale(te(me)).localeData().weekdaysMin()},getShortMonths:function(me){return ot()().locale(te(me)).localeData().monthsShort()},format:function(me,xe,Pe){return xe.locale(te(me)).format(Pe)},parse:function(me,xe,Pe){for(var Ke=te(me),nt=0;ntye.length)&&(Ie=ye.length);for(var je=0,Ue=Array(Ie);jeye.length)&&(Ie=ye.length);for(var je=0,Ue=new Array(Ie);je=19)return!0;var dt=(0,bt.isMemo)(Ie)?Ie.type.type:Ie.type;return!(typeof dt=="function"&&!((je=dt.prototype)!==null&&je!==void 0&&je.render)&&dt.$$typeof!==bt.ForwardRef||typeof Ie=="function"&&!((Ue=Ie.prototype)!==null&&Ue!==void 0&&Ue.render)&&Ie.$$typeof!==bt.ForwardRef)};function ai(ye){return(0,We.isValidElement)(ye)&&!sn(ye)}var Zt=function(Ie){return ai(Ie)&&Rn(Ie)},ci=function(Ie){if(Ie&&ai(Ie)){var je=Ie;return je.props.propertyIsEnumerable("ref")?je.props.ref:je.ref}return null};function On(ye,Ie,je,Ue){if(!Ie.length)return je;var dt=_toArray(Ie),Wt=dt[0],Jt=dt.slice(1),rn;return!ye&&typeof Wt=="number"?rn=[]:Array.isArray(ye)?rn=_toConsumableArray(ye):rn=_objectSpread({},ye),Ue&&je===void 0&&Jt.length===1?delete rn[Wt][Jt[0]]:rn[Wt]=On(rn[Wt],Jt,je,Ue),rn}function Mi(ye,Ie,je){var Ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Ie.length&&Ue&&je===void 0&&!get(ye,Ie.slice(0,-1))?ye:On(ye,Ie,je,Ue)}function Xt(ye){return _typeof(ye)==="object"&&ye!==null&&Object.getPrototypeOf(ye)===Object.prototype}function At(ye){return Array.isArray(ye)?[]:{}}var on=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Si(){for(var ye=arguments.length,Ie=new Array(ye),je=0;je